CBC Command Line Interface

CBC Command Line Interface

CBC : COIN-OR Branch-and-Cut A Short Guide to the CBC Command Line Interface Prof. Haroldo Gambini Santos www.decom.ufop.br/haroldo/ Uni ersidade !ederal de Ouro Preto !ebruar# $%&' Contents & . Before we start........................................................................................................................... $ $ . Quic) start................................................................................................................................. * * . +erminal Output........................................................................................................................ , , . +unnin-...................................................................................................................................... ,.& Pre/processin- and root node................................................................................................. ,.$ Linear Pro-rammin- 0ela1ation...........................................................................................' ,.* Branch/and/bound................................................................................................................' ,., Cut Generation.....................................................................................................................2 ,.3 Heuristics............................................................................................................................&% ,.. Limits and +olerances.........................................................................................................&$ 3 . 0eferences................................................................................................................................. &, & 1 . Before we start +his -uide is intend to show the basic usa-e and tunin- of CBC4 the COI5/"0 Branch/and/cut standalone e1ecutable which is called b# the command line. If #ou do not ha e it installed in #our computer #ou -rab its sources accessin- the pro6ect pa-e4 https4//pro6ects.coin/or.or-/Cbc/ or7 more easil#7 installin- one of the pre/built pac)a-es a ailable for #our computin- platform at: http4//www.coin/or.or-/download/binar#/CoinAll/ in a pac)a-e includin- se eral other COI5 components. Althou-h a basic )nowled-e of Inte-er Pro-rammin- is assumed7 concepts are brie8# e1plained whene er it is possible. C09:ITS4 a lar-e part of the content of this -uide was obtained from the CBC ad anced command line help which #ou can access b# t#pin- ;verbose 15” followed b# ;<=> in the CBC interacti e mode. +han)s also to the nice fol)s at cbc?list.coin/or.or-. $ 2 . Quic) start If #ou installed CBC7 #ou can open a shell& and t#pe4 cbc air03.lp solve solu sol.txt to load problem air%*.lp$7 sol e it and sa e the best solution in a @le named sol.txt. An e1ample of a customiAed CBC e1ecution is -i en bellow. In this case7 the parameter cuts recei es alue Off and the parameter passF recei es alue 100 before the be-innin- of the solution process4 cbc air04.lp cuts off passF 100 solve solu sol.txt B# callin- onl# CBC without parameters #ou will enter in interacti e mode. Welcome to the CBC MILP Solver Version: 2.9.8 Build Date: May 6 2016 Revision Number: 2277 CoinSolver takes input from arguments ( - switches to stdin) Enter ? for list of commands or help Coin: +o sol e air%,.lp as we did before in interacti e mode #ou can enter the followin- commands4 Coin: import air03.lp Coin: solve Coin: solu sol.txt & +erminal in Linu17 Command Prompt in Windows $ Can be downloaded from http4//-oo.-l/d lCnD * 3 . +erminal Output +o sol e #our problem cbc uses a ;ba- of tric)s=. It has to d#namicall# decide how much processin- power will be used in different al-orithms/search strate-ies. +o )eep #ou informed of the successes (or failuresG of these attempts it continuall# prints messa-es containin- details about the current search status. Understandin- these messa-es is a )e# step to pinpoint which are the main diHculties in sol in- #our problem. Once #ou ha e this information in #our hands #ou can start to tune cbc so that it will perform better considerin- the t#pe of problem #ou are wor)in- on. Welcome to the CBC MILP Solver Version: 2.9.8 command line - cbc air03.lp solve solu sol.txt (default strategy 1) 1 Continuous objective value is 338864 - 0.05 seconds Cgl0003I 0 fixed, 0 tightened bounds, 0 strengthened rows, 4 substitutions 2 Cgl0004I processed model has 120 rows, 8456 columns (8456 integer) and 71651 elements Cutoff increment increased from 1e-05 to 1.9999 3 Cbc0038I Pass 1: suminf. 8.33333 (22) obj. 341524 iterations 106 Cbc0038I Pass 2: suminf. 8.33333 (22) obj. 341524 iterations 3 Cbc0038I Pass 3: suminf. 8.33333 (22) obj. 341524 iterations 70 Cbc0038I Pass 4: suminf. 7.20000 (20) obj. 342390 iterations 75 Cbc0038I Pass 5: suminf. 1.50000 (3) obj. 343697 iterations 45 Cbc0038I Pass 6: suminf. 1.50000 (3) obj. 343697 iterations 55 ... Cbc0038I Pass 12: suminf. 0.00000 (0) obj. 362176 iterations 144 Cbc0038I Solution found of 362176 ... Iessa-e & indicates that CBC successfull# sol ed the linear pro-rammin- rela1ation of #our problem. +he ob6ecti e alue of this solution pro ides a dual bound F338864G7 which is an optimistic estimate for the optimal solution cost. Iessa-e $ informs that pre/processin- has @nished. Ideall#7 after that step #ou will ha e a smaller problem with a better formulation. Iessa-e * and all messa-es startin- with Cbc0038I7 indicate that cbc is searchin- for an initial inte-er feasible solution usin- the !easibilit# Pump FI. !ischetti7 Glo er7 J Lodi7 $%%3G method. After twel e passes7 it has found a solution with cost 362176. Be now ha e a alid solution for the problem and alid bounds for the optimal solution alue4 [338864,362176]. +he performance of CBC will alwa#s depend on how close are these bounds. A special attention should be -i en to messa-es indicatin- the pro-resses in ti-htenin- these bounds7 which will be discussed in the ne1t para-raphs. ... Cbc0038I Full problem 120 rows 8456 columns, reduced to 0 rows 0 columns 4 Cbc0012I Integer solution of 340160 found by DiveCoefficient after 14 iterations and 0 n odes (0.97 seconds) ... Cbc0031I 5 added rows had average density of 390.8 5 Cbc0013I At root node, 5 cuts changed objective from 338864.25 to 340160 in 2 passes , Cbc0014I Cut generator 0 (Probing) - 0 row cuts average 0.0 elements, 160 column cuts (160 active) in 0.840 seconds - new frequency is 1 Cbc0014I Cut generator 1 (Gomory) - 4 row cuts average 1257.2 elements, 0 column cuts (3 active) in 0.020 seconds - new frequency is -100 Cbc0014I Cut generator 2 (Knapsack) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.020 seconds - new frequency is -100 Cbc0014I Cut generator 3 (Clique) - 10 row cuts average 3.7 elements, 0 column cuts (0 active) in 0.000 seconds - new frequency is 1 Cbc0014I Cut generator 6 (TwoMirCuts) - 0 row cuts average 0.0 elements, 0 column cuts (0 active) in 0.030 seconds - new frequency is -100 ... 6 Result - Finished objective 340160 after 0 nodes and 11 iterations - took 4.75 seconds (total time 5.06) Total time 5.14 Iessa-e , indicates the success of the DiveCoefficient heuristic in @ndin- a better feasible solution. Be now ha e ti-hter bounds4 [338864,340160]. Iessa-es startin- at 3 contain details of the pro-ress achie ed in impro in- the dual bound b# -eneratin- a series of cuts remo in- fractional solutions. In this case * cuts suHce to close the -ap and produce the best possible dual bound4 *,%&.%. Be>re now sure that the pre iousl# found solution is the optimal one. Last messa-es of this lo- inform how each one of the acti e cbc cut -enerators performed. B# these messa-es we can obser e that onl# CliKue and Gomor#(Gomory, 1958) cuts where useful. Gomor# cuts7 as usual7 produced cuts which are much denser. !inall#7 Iessa-e . announces the end of the search7 which too) onl# 3 seconds. In this problem7 cbc performed noticeabl# well4 a -ood feasible solution and a -ood dual bound were obtained at the root node7 so that no further e1ploration in the branch/and/bound tree was needed. ... 7 Cbc0010I After 200 nodes, 46 on tree, 56212 best solution, best possible 55800.3 (148.79 seconds) Cbc0016I Integer solution of 56174 found by strong branching after 116654 iterations and 263 nodes (152.34 seconds) Cbc0038I Full problem 615 rows 7673 columns, reduced to 109 rows 110 columns 8 Cbc0012I Integer solution of 56138 found by RINS after 124176 iterations and 300 nodes (156.76 seconds) Cbc0038I Full problem 615 rows 7673 columns, reduced to 1 rows 2 columns Cbc0010I After 300 nodes, 43 on tree, 56138 best solution, best possible 55805.8 (156.94 seconds) Cbc0038I Full problem 615 rows 7673 columns, reduced to 142 rows 143 columns Cbc0010I After 400 nodes, 55 on tree, 56138 best solution, best possible 55863.5 (166.19 seconds) ... Iessa-e ' shows the resolution of a harder problem. !or this problem (air%,G7 the search ad anced in the Branch/and/bound tree. !reKuent messa-es indicate how man# nodes were e1plored and how man# nodes still open and need to be e1plored. Bhene er a new inte-er solution is found FIessa-e 2G7 information about its cost and which method found it is printed. 3 4 . +unnin- +o modif# cbc default settin-s7 we can specif# options before @nall# call the sol e command. A command line can include as man# options as #ou want, in the format: cbc air04.lp ... option1 parameter 1 option2 ... solve solu sol.txt 5e1t subsection will brie8# present some of the most inportant cbc options and parameters which can impact the search process. Options are presented in the followin- wa#4 ShortName : DataType : DefaultValue : LongName where ShortName indicates the abbre iation necessar# to specif# the optionL :ata+#pe indicates if the parameter is an inte-er7 double or strin- parameterL default alue indicates the alue which is automaticall# selected on cbc startup and @nall#7 Lon-5ame indicates the full parameter name. ,.& Pre-processin- and root node Presolve : String : On : Presolve Presol e tries to remo e redundant constraints and to detect ti-hter bounds for ariables to ma)e the problem simpler. Pret : Integer : 1e-8 : PreToleran e Use lar-er alues Fe.-. &e/') if #our problem is feasible but presol e is declarin- it infeasible.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us