Changeset 2412


Ignore:
Timestamp:
Mar 6, 2019 7:17:45 PM (8 months ago)
Author:
stefan
Message:

cleanup clpexe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gh-pages/clpexe.md

    r2410 r2412  
    1 The CLP Executable {#clpexe}
     1The CLP Executable
    22==================
    33
     
    55===========
    66
    7 The result of `make unitTest` (executed in `COIN/Clp`) is an executable
    8 `clp` as well as the CLP and COIN libraries. The executable can be used
     7The result of `make unitTest` (executed in the build directory) is an executable
     8`clp` as well as the CLP and COIN-OR libraries. The executable can be used
    99to perform various unit tests, but can also be used as a standalone
    1010solver. As the executable has a very simple solution file format, the
    11 user may wish to modify `COIN/Clp/Test/ClpMain.cpp`, which contains the
     11user may wish to modify `ClpMain.cpp`, which contains the
    1212source of the executable (modifications could even be offered as a
    1313contribution to CLP).
     
    1919`clp <filename> -primalsimplex` instructs the executable tp import a
    2020file and solve using the primal simplex method. An additional solitary
    21 dash (\"`-`\") starts the prompt mode once the execution of the initial
    22 command has been completed. The \"`-`\" is necessary as part of the
     21dash ("`-`") starts the prompt mode once the execution of the initial
     22command has been completed. The "`-`" is necessary as part of the
    2323command; invoking prompt mode as a separate command will result in the
    2424loss of problem information related to the initial command. So, the
     
    2626maximize a problem using the dual simplex method and write a solution to
    2727file: `solfile`:
     28```
     29$ clp filename -maximize -dualsimplex -solution solfile
     30```
    2831
    29 >         $ clp filename -maximize -dualsimplex -solution solfile
    30 >         
    31 
    32 >         $ clp filename -maximize -
    33 >         Clp:duals
    34 >         Clp:solution solfile
    35 >         Clp:quit
    36 >         
     32```
     33$ clp filename -maximize -
     34Clp:duals
     35Clp:solution solfile
     36Clp:quit
     37```
    3738
    3839The executable is at a very early stage of development. Comments and
     
    4647capabilities.
    4748
    48   Command      Result
    49   ------------- -------------------------------------------------------------------------------------------------------------------------------------
    50   `?`           Gives a list of all commands
    51   `p?`          Gives a list of all commands which begin with \<p\>.
    52   `p??`         Gives a list of all commands which begin with \<p\>., with a short explanation for each.
    53   `primals??`   If is this is enough to uniquely determine a command (in this example, `primalS`, for primal simplex), a long explanation is given.
     49| Command      | Result
     50|--------------|-------------------------------------------------------------------------------------------------------------------------------------
     51| `?`          | Gives a list of all commands |
     52| `p?`         | Gives a list of all commands which begin with `p`. |
     53| `p??`        | Gives a list of all commands which begin with `p`, with a short explanation for each. |
     54| `primals??`  | If is this is enough to uniquely determine a command (in this example, `primalS`, for primal simplex), a long explanation is given. |
    5455
    55   : Command examples for the clp executable
    56 
    57 In addition, matching a name without a ? will either execute the command
     56In addition, matching a name without a `?` will either execute the command
    5857or give the value of the corresponding parameter as follows: `primalw`
    5958will give the current value of the `primalWeight` parameter while
     
    6867basis to all slacks and resets the solution.
    6968
    70         $clp
    71         Coin LP version 0.99.9, build Sep 14 2004
    72         Clp takes input from arguments ( - switches to stdin)
    73         Enter ? for list of commands or help
    74         Clp:import../Mps/Sample/p0033.mps
    75         At line 15 NAME          P0033
    76         At line 16 ROWS
    77         At line 34 COLUMNS
    78         At line 109 RHS
    79         At line 118 BOUNDS
    80         At line 152 ENDATA
    81         Problem P0033 has 16 rows, 33 columns and 98 elements
    82         Model was imported from ./../Mps/Sample/p0033.mps in 0 seconds
    83         Clp:primals
    84         Presolve 15 (-1) rows, 32 (-1) columns and 97 (-1) elements
    85         0  Obj 0 Primal inf 27.2175 (10) Dual inf 6.42094e+11 (32)
    86         32  Obj 2520.57
    87         Optimal - objective value 2520.57
    88         After Postsolve, objective 2520.57, infeasibilities - dual 0 (0), primal 0 (0)
    89         Optimal objective 2520.571739 - 32 iterations time 0.012, Presolve 0.01
    90         Clp:max
    91         Clp:primals
    92         Presolve 11 (-5) rows, 25 (-8) columns and 84 (-14) elements
    93         0  Obj 4807.92 Dual inf 1700.71 (15)
    94         End of values pass after 2 iterations
    95         2  Obj 4921.7 Dual inf 580.637 (5)
    96         9  Obj 5299.7
    97         Optimal - objective value 5299.7
    98         After Postsolve, objective 5299.7, infeasibilities - dual 643.608 (9), primal 27.0826 (10)
    99         Presolved model was optimal, full model needs cleaning up
    100         0  Obj 5299.7
    101         0  Obj 5299.7
    102         Optimal - objective value 5299.7
    103         Optimal objective 5299.698868 - 9 iterations time 0.022, Presolve 0.02
    104         Clp:allslack
    105         Clp:duals
    106         Presolve 11 (-5) rows, 25 (-8) columns and 84 (-14) elements
    107         0  Obj 2752 Primal inf 24.4867 (6) Dual inf 4280.55 (25)
    108         8  Obj 5299.7
    109         Optimal - objective value 5299.7
    110         After Postsolve, objective 5299.7, infeasibilities - dual 704.58 (8), primal 27.0792 (10)
    111         Presolved model was optimal, full model needs cleaning up
    112         0  Obj 5299.7
    113         0  Obj 5299.7
    114         Optimal - objective value 5299.7
    115         Optimal objective 5299.698868 - 8 iterations time 0.032, Presolve 0.01
    116         Clp:min
    117         Clp:duals
    118         Presolve 15 (-1) rows, 32 (-1) columns and 97 (-1) elements
    119         0  Obj 5299.7 Dual inf 4632.26 (28)
    120         16  Obj 2520.57
    121         Optimal - objective value 2520.57
    122         After Postsolve, objective 2520.57, infeasibilities - dual 2052.5 (13), primal 27.1143 (10)
    123         Presolved model was optimal, full model needs cleaning up
    124         0  Obj 2520.57
    125         0  Obj 2520.57
    126         Optimal - objective value 2520.57
    127         Optimal objective 2520.571739 - 16 iterations time 0.012, Presolve 0.01
    128         Clp:allslack
    129         Clp:presolve off
    130         Clp:primals
    131         0  Obj 0 Primal inf 27.2175 (10) Dual inf 6.39167e+11 (32)
    132         32  Obj 2520.57
    133         Optimal - objective value 2520.57
    134         Optimal objective 2520.571739 - 32 iterations time 0.002
    135         Clp:allslack
    136         Clp:maxIt 10
    137         maxIterations was changed from 99999999 to 10
    138         Clp:primals
    139         0  Obj 0 Primal inf 27.2175 (10) Dual inf 6.39167e+11 (32)
    140         Stopped - objective value 4.24664e+10
    141         Stopped objective 4.246637759e+10 - 10 iterations time 0.002
    142         Clp:quit
    143        
     69```
     70$ clp
     71Coin LP version 0.99.9, build Sep 14 2004
     72Clp takes input from arguments ( - switches to stdin)
     73Enter ? for list of commands or help
     74Clp:import../Data/Sample/p0033.mps
     75At line 15 NAME  P0033
     76At line 16 ROWS
     77At line 34 COLUMNS
     78At line 109 RHS
     79At line 118 BOUNDS
     80At line 152 ENDATA
     81Problem P0033 has 16 rows, 33 columns and 98 elements
     82Model was imported from ./../Data/Sample/p0033.mps in 0 seconds
     83Clp:primals
     84Presolve 15 (-1) rows, 32 (-1) columns and 97 (-1) elements
     850  Obj 0 Primal inf 27.2175 (10) Dual inf 6.42094e+11 (32)
     8632  Obj 2520.57
     87Optimal - objective value 2520.57
     88After Postsolve, objective 2520.57, infeasibilities - dual 0 (0), primal 0 (0)
     89Optimal objective 2520.571739 - 32 iterations time 0.012, Presolve 0.01
     90Clp:max
     91Clp:primals
     92Presolve 11 (-5) rows, 25 (-8) columns and 84 (-14) elements
     930  Obj 4807.92 Dual inf 1700.71 (15)
     94End of values pass after 2 iterations
     952  Obj 4921.7 Dual inf 580.637 (5)
     969  Obj 5299.7
     97Optimal - objective value 5299.7
     98After Postsolve, objective 5299.7, infeasibilities - dual 643.608 (9), primal 27.0826 (10)
     99Presolved model was optimal, full model needs cleaning up
     1000  Obj 5299.7
     1010  Obj 5299.7
     102Optimal - objective value 5299.7
     103Optimal objective 5299.698868 - 9 iterations time 0.022, Presolve 0.02
     104Clp:allslack
     105Clp:duals
     106Presolve 11 (-5) rows, 25 (-8) columns and 84 (-14) elements
     1070  Obj 2752 Primal inf 24.4867 (6) Dual inf 4280.55 (25)
     1088  Obj 5299.7
     109Optimal - objective value 5299.7
     110After Postsolve, objective 5299.7, infeasibilities - dual 704.58 (8), primal 27.0792 (10)
     111Presolved model was optimal, full model needs cleaning up
     1120  Obj 5299.7
     1130  Obj 5299.7
     114Optimal - objective value 5299.7
     115Optimal objective 5299.698868 - 8 iterations time 0.032, Presolve 0.01
     116Clp:min
     117Clp:duals
     118Presolve 15 (-1) rows, 32 (-1) columns and 97 (-1) elements
     1190  Obj 5299.7 Dual inf 4632.26 (28)
     12016  Obj 2520.57
     121Optimal - objective value 2520.57
     122After Postsolve, objective 2520.57, infeasibilities - dual 2052.5 (13), primal 27.1143 (10)
     123Presolved model was optimal, full model needs cleaning up
     1240  Obj 2520.57
     1250  Obj 2520.57
     126Optimal - objective value 2520.57
     127Optimal objective 2520.571739 - 16 iterations time 0.012, Presolve 0.01
     128Clp:allslack
     129Clp:presolve off
     130Clp:primals
     1310  Obj 0 Primal inf 27.2175 (10) Dual inf 6.39167e+11 (32)
     13232  Obj 2520.57
     133Optimal - objective value 2520.57
     134Optimal objective 2520.571739 - 32 iterations time 0.002
     135Clp:allslack
     136Clp:maxIt 10
     137maxIterations was changed from 99999999 to 10
     138Clp:primals
     1390  Obj 0 Primal inf 27.2175 (10) Dual inf 6.39167e+11 (32)
     140Stopped - objective value 4.24664e+10
     141Stopped objective 4.246637759e+10 - 10 iterations time 0.002
     142Clp:quit
     143```
Note: See TracChangeset for help on using the changeset viewer.