Skip to content

Instantly share code, notes, and snippets.

@JackDunnNZ
Created July 21, 2014 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JackDunnNZ/f059ea72aa8f99ce3457 to your computer and use it in GitHub Desktop.
Save JackDunnNZ/f059ea72aa8f99ce3457 to your computer and use it in GitHub Desktop.
OpenSolver CBC Crash
@echo off
"D:\Jack\Dropbox\Scratch\OpenSolver\OpenSolver\cbc64.exe" -directory C:\Users\Jack\AppData\Local\Temp\ -import "C:\Users\Jack\AppData\Local\Temp\model.lp" -ratioGap .05 -seconds 100 -solve -printingOptions all -solution C:\Users\Jack\AppData\Local\Temp\modelsolution.txt -printingOptions rhs -solution rhsranges.txt -printingOptions objective -solution costranges.txt
\ Model solved using the solver 'CBC'
\ Model for sheet 'Sheet1'
\ It took 0.0078125 seconds to build the model.
\ Model has 2 Excel constraints giving 8 constraint rows and 15 variables.
MINIMIZE
Obj: +10 B14 +30 C14 +40 D14 +40 _E14 +10 F14 +35 B15 +20 C15 +15 D15 +20 _E15 +30 F15 +45 B16 +10 C16 +10 D16 +15 _E16 +15 F16
SUBJECT TO
\ Sheet1!$G$14:$G$16 <= Sheet1!$H$14:$H$16
+1 B14 +1 C14 +1 D14 +1 _E14 +1 F14 <= +150
+1 B15 +1 C15 +1 D15 +1 _E15 +1 F15 <= +300
+1 B16 +1 C16 +1 D16 +1 _E16 +1 F16 <= +350
\ Sheet1!$B$17:$F$17 = Sheet1!$B$18:$F$18
+1 B14 +1 B15 +1 B16 = +100
+1 C14 +1 C15 +1 C16 = +300
+1 D14 +1 D15 +1 D16 = +200
+1 _E14 +1 _E15 +1 _E16 = +100
+1 F14 +1 F15 +1 F16 = +150
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment