[Cbc] Pass model and/or data to the executable via standard input

John Forrest john.forrest at fastercoin.com
Tue Apr 16 11:49:41 EDT 2013


Pietro,


Does seem to work.  So using an example money.mod

bin/cbc ../ThirdParty/Glpk/glpk/examples/money.mod% -solve -gsolution x.x
Welcome to the CBC MILP Solver
Version: Trunk (unstable)
Build Date: Apr 13 2013
Revision Number: 1899

command line - bin/cbc ../ThirdParty/Glpk/glpk/examples/money.mod% 
-solve -gsolution x.x (default strategy 1)
GMPL model file ./../ThirdParty/Glpk/glpk/examples/money.mod and data 
file ./
Reading model section from ./../ThirdParty/Glpk/glpk/examples/money.mod...
62 lines were read
Generating one...
Generating alldiff...
Generating map...
Generating sum1...
Generating sum2...
Generating sum3...
Generating sum4...
Generating note...
Model has been successfully generated
Problem money has 31 rows, 91 columns and 259 elements
Model was imported from ./../ThirdParty/Glpk/glpk/examples/money.mod in 
0.004 seconds
Continuous objective value is 0 - 0.00 seconds
Cgl0003I 15 fixed, 9 tightened bounds, 0 strengthened rows, 0 substitutions
Cgl0003I 20 fixed, 0 tightened bounds, 0 strengthened rows, 1 substitutions
Cgl0003I 14 fixed, 0 tightened bounds, 0 strengthened rows, 18 substitutions
Cgl0003I 0 fixed, 0 tightened bounds, 0 strengthened rows, 7 substitutions
Cgl0004I processed model has 12 rows, 25 columns (25 integer) and 79 
elements
Cbc0038I Pass   1: suminf.    0.45455 (1) obj. 0 iterations 3
Cbc0038I Pass   2: suminf.    0.45455 (1) obj. 0 iterations 3
Cbc0038I Pass   3: suminf.    1.00000 (5) obj. 0 iterations 9
Cbc0038I Pass   4: suminf.    0.80909 (5) obj. 0 iterations 7
Cbc0038I Pass   5: suminf.    0.80909 (5) obj. 0 iterations 3
Cbc0038I Pass   6: suminf.    1.12121 (3) obj. 0 iterations 7
Cbc0038I Pass   7: suminf.    1.12121 (3) obj. 0 iterations 4
Cbc0038I Pass   8: suminf.    0.18182 (1) obj. 0 iterations 7
Cbc0038I Pass   9: suminf.    0.18182 (1) obj. 0 iterations 5
Cbc0038I Pass  10: suminf.    0.18182 (1) obj. 0 iterations 2
Cbc0038I Pass  11: suminf.    0.18182 (1) obj. 0 iterations 3
Cbc0038I Pass  12: suminf.    0.18182 (1) obj. 0 iterations 3
Cbc0038I Pass  13: suminf.    0.18182 (1) obj. 0 iterations 1
Cbc0038I Pass  14: suminf.    0.18182 (1) obj. 0 iterations 5
Cbc0038I Pass  15: suminf.    0.18182 (1) obj. 0 iterations 6
Cbc0038I Pass  16: suminf.    0.18182 (1) obj. 0 iterations 4
Cbc0038I Pass  17: suminf.    0.18182 (1) obj. 0 iterations 4
Cbc0038I Pass  18: suminf.    0.27273 (1) obj. 0 iterations 3
Cbc0038I Pass  19: suminf.    0.27273 (1) obj. 0 iterations 2
Cbc0038I Pass  20: suminf.    0.27273 (1) obj. 0 iterations 2
Cbc0038I Pass  21: suminf.    0.36364 (1) obj. 0 iterations 5
Cbc0038I Pass  22: suminf.    0.36364 (1) obj. 0 iterations 3
Cbc0038I Pass  23: suminf.    0.36364 (1) obj. 0 iterations 1
Cbc0038I Pass  24: suminf.    3.13636 (7) obj. 0 iterations 6
Cbc0038I Pass  25: suminf.    0.00000 (0) obj. 0 iterations 3
Cbc0038I Solution found of 0
Cbc0038I Before mini branch and bound, 7 integers at bound fixed and 0 
continuous
Cbc0038I Mini branch and bound did not improve solution (0.02 seconds)
Cbc0038I After 0.02 seconds - Feasibility pump exiting with objective of 
0 - took 0.01 seconds
Cbc0012I Integer solution of 0 found by feasibility pump after 0 
iterations and 0 nodes (0.02 seconds)
Cbc0001I Search completed - best objective 0, took 0 iterations and 0 
nodes (0.02 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Cuts at root node changed objective from 0 to 0
Probing was tried 0 times and created 0 cuts of which 0 were active 
after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after 
adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active 
after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after 
adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 
were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active 
after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active 
after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                0.00000000
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.02
Time (Wallclock seconds):       0.02

Reading MIP solution from `./x.x'...
124 lines were read
Display statement at line 59
dig[D].val = 7
dig[E].val = 5
dig[M].val = 1
dig[N].val = 6
dig[O].val = 0
dig[R].val = 8
dig[S].val = 9
dig[Y].val = 2
Model has been successfully processed
Total time (CPU seconds):       0.02   (Wallclock seconds): 0.02




More information about the Cbc mailing list