[Coin-discuss] Using Osi/Clp
Jean-Sebastien Roy
js at jeannot.org
Fri Jan 7 02:40:27 EST 2005
Hi !
You will find the Coin-OR documentation here:
http://www.coin-or.org/documentation.html
You will notably find the Clp user guide here:
http://www.coin-or.org/Clp/userguide/index.html
And some nice tutorials here:
http://coral.ie.lehigh.edu/~coin/
The precise syntax for all the operations you are looking for is
available in the Doxygen documentation, included with Coin. You can
build it locally or have look at it here:
http://www.coin-or.org/Doxygen/
For the precise operations you seek :
(disclaimer: I'm no Coin expert)
> 1. Select primal or dual simplex algorithm
Select dual simplex:
(assuming solver is a OsiSolverInterface)
solver.setHintParam(OsiDoDualInInitial,true,OsiHintTry);
> 2. Add a column to the LP matrix
> 3. Add a row to the LP matrix
> 4. Delete and replace a row of the LP matrix
> 5. Replace elements of the LP matrix
Look here:
http://www.coin-or.org/Doxygen/Osi/class_osi_solver_interface.html
for addCols, addRows, and consorts.
> 6. Post solve after modifications
solver.resolve()
> 6. Scale LP problem
solver.setHintParam(OsiDoScale,true,OsiHintTry)
> 7. Save and load an optimal basis
You may have a look at the getBasisStatus/setBasisStatus methods.
> 8. Direct Osi/Clp messages
You may need to write your own CoinMessageHandler and change the one
used by Clp using:
solver.passInMessageHandler(myHandler)
Regards,
Jean-Sebastien
Edgardo Fuchs wrote:
> Dear Coin list members,
>
> I wish to use Osi/Clp within a stochastic optimization model to solve a
> long-term hydro-thermal power generation dispatch problem.
> The model was developed using OSL, but I want to migrate it to Osi/Clp.
>
> >From the example "build.cpp" it is clear how to construct a model from
> scratch and solve it. But I have not found the way to perform additional
> operations required by the dispatch model.
> Could you please give some hints or examples on how to perform the
> following operations using Osi/Clp?
>
> 1. Select primal or dual simplex algorithm
> 2. Add a column to the LP matrix
> 3. Add a row to the LP matrix
> 4. Delete and replace a row of the LP matrix
> 5. Replace elements of the LP matrix
> 6. Post solve after modifications
> 6. Scale LP problem
> 7. Save and load an optimal basis
> 8. Direct Osi/Clp messages
>
> Thank you in advance.
> Sincerely,
>
> Edgardo Fuchs
> KAS Ingeniería
>
> --
>
> Edgardo Fuchs
>
> Santiago, Chile
>
> Tel: +56 (2) 435 0090
> Cel: +56 9837 8433
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
More information about the Coin-discuss
mailing list