Interface to COIN OSI. More...
#include <osi.h>


Classes | |
| class | ColItem |
| class | RowItem |
Public Member Functions | |
| OSISolver (const MipProblem &mip) | |
| int | nr_col () |
| int | nr_row () |
| void | set_tol (double tol) |
| void | set_maxiter (int maxiter) |
| void | reset () |
| Next solve will be a cold start. | |
| SolutionStatus | solve () |
| Apply warm start if possible. | |
| SolutionStatus | solve (const UserVector< double > &x) |
| Cold start from primal starting point. | |
| SolutionStatus | solveMIP () |
| SolutionStatus | feasible () |
| Checks the problem for feasiblity. | |
| void | get_primal (UserVector< double > &x) |
| The last point, we found. | |
| double | get_primal (const MIPSolver::ColItem &colitem) |
| Gives the primal value for a specific column. | |
| int | get_colindex (const MIPSolver::ColItem &colitem) |
| void | get_dual (UserVector< double > &mu) |
| Gives the dual variables for the rows. | |
| double | get_dual (const MIPSolver::RowItem &rowitem) |
| Gives the dual for a specific row. | |
| void | get_reducedcosts (UserVector< double > &rc) |
| Gives the reduced costs for the columns. | |
| double | get_reducedcosts (const MIPSolver::ColItem &colitem) |
| Gives the reduced costs for a specific column. | |
| void | get_rowactivity (UserVector< double > &rowact) |
| Gives the row activities for the rows. | |
| double | get_rowactivity (const MIPSolver::RowItem &rowitem) |
| Gives the row activities for a specific row. | |
| double | get_optval () |
| The last optimal value. | |
| int | get_iter () |
| void | set_obj (const UserVector< double > &obj, double obj_const_=0.) |
| void | modify_obj (int i, double coeff) |
| const MIPSolver::RowItem * | add_row (const UserVector< double > &row, double low, double up) |
| Adds a constraint to the problem. | |
| const MIPSolver::RowItem * | add_row (const UserVector< double > &row, const ivector &indices, double low, double up) |
| void | add_rows (const vector< pair< dvector, ivector > > &rows, const dvector &low, const dvector &up) |
| void | add_rows (list< const MIPSolver::RowItem * > &rowitems, const vector< pair< dvector, ivector > > &rows, const dvector &low, const dvector &up) |
| void | delete_row (const MIPSolver::RowItem &rowitem) |
| void | delete_rows (const list< const MIPSolver::RowItem * > &rowitems) |
| void | modify_row (const MIPSolver::RowItem &rowitem, double low, double up) |
| void | modify_row (int index, double low, double up) |
| const MIPSolver::ColItem * | add_col (double low, double up, MipProblem::VarType vartype=MipProblem::CONTINUOUS) |
| const MIPSolver::ColItem * | add_col (const UserVector< double > &col, double obj_coeff, double low, double up, MipProblem::VarType vartype=MipProblem::CONTINUOUS) |
| void | add_cols (list< const MIPSolver::ColItem * > &colitems, const dvector &low, const dvector &up) |
| void | add_cols (list< const MIPSolver::ColItem * > &colitems, vector< Pointer< UserVector< double > > > &cols, const vector< double > &obj_coeff, const dvector &low, const dvector &up) |
| void | delete_col (const MIPSolver::ColItem &colitem) |
| void | delete_cols (const list< const MIPSolver::ColItem * > &colitems) |
| void | modify_col (const MIPSolver::ColItem &colitem, double low, double up, MipProblem::VarType type) |
| void | modify_col (const MIPSolver::ColItem &colitem, const UserVector< double > &col, double obj_coeff, double low, double up, MipProblem::VarType vartype) |
| void | modify_col (int index, double low, double up, MipProblem::VarType type) |
| If you are sure, which index your variable is. | |
| double | get_collow (int index) |
| double | get_colup (int index) |
| int | generate_cuts (list< Pointer< SimpleCut > > &rowcuts) |
Private Member Functions | |
| bool | lastpoint_feasible () |
Private Attributes | |
| Pointer< OsiSolverInterface > | osisolver |
| The OSI-Solver, we use. | |
| Pointer< CglCutGenerator > | cutgenerator |
| double | obj_const |
| To constant of the objective function. | |
| bool | cold_start |
| Indicates, whether the next solve() will be a cold start or not. | |
| list< RowItem > | addedrows |
| list< ColItem > | addedcols |
Interface to COIN OSI.
Definition at line 19 of file osi.h.
| OSISolver::OSISolver | ( | const MipProblem & | mip | ) |
| bool OSISolver::lastpoint_feasible | ( | ) | [private] |
| int OSISolver::nr_col | ( | ) | [virtual] |
Implements MIPSolver.
| int OSISolver::nr_row | ( | ) | [virtual] |
Implements MIPSolver.
| void OSISolver::set_tol | ( | double | tol | ) | [virtual] |
Implements MIPSolver.
| void OSISolver::set_maxiter | ( | int | maxiter | ) | [virtual] |
Implements MIPSolver.
| void OSISolver::reset | ( | ) | [virtual] |
Next solve will be a cold start.
All added rows and columns will be deleted. Modified columns and rows are NOT set to their original values!
Implements MIPSolver.
| SolutionStatus OSISolver::solve | ( | ) | [virtual] |
Apply warm start if possible.
Implements MIPSolver.
| SolutionStatus OSISolver::solve | ( | const UserVector< double > & | x | ) | [virtual] |
Cold start from primal starting point.
Reimplemented from MIPSolver.
| SolutionStatus OSISolver::solveMIP | ( | ) | [virtual] |
Implements MIPSolver.
| SolutionStatus OSISolver::feasible | ( | ) | [virtual] |
Checks the problem for feasiblity.
This method can never return the SolutionStatus SOLVED.
Implements MIPSolver.
| void OSISolver::get_primal | ( | UserVector< double > & | x | ) | [virtual] |
The last point, we found.
If last SolutionStatus was SOLVED, the solution. If it was FEASIBLE, a feasible point. Sets x to the primal values of the first x.dim() columns.
Implements MIPSolver.
| double OSISolver::get_primal | ( | const MIPSolver::ColItem & | colitem | ) | [virtual] |
Gives the primal value for a specific column.
Implements MIPSolver.
| int OSISolver::get_colindex | ( | const MIPSolver::ColItem & | colitem | ) | [inline, virtual] |
| void OSISolver::get_dual | ( | UserVector< double > & | mu | ) | [virtual] |
Gives the dual variables for the rows.
Sets mu to the dual values of the first mu.dim() rows.
| mu | To store the duals. |
Implements MIPSolver.
| double OSISolver::get_dual | ( | const MIPSolver::RowItem & | rowitem | ) | [virtual] |
Gives the dual for a specific row.
Implements MIPSolver.
| void OSISolver::get_reducedcosts | ( | UserVector< double > & | rc | ) | [virtual] |
Gives the reduced costs for the columns.
Sets rc to the reduced costs of the first rc.dim() columns.
| rc | To store the reduced costs. |
Implements MIPSolver.
| double OSISolver::get_reducedcosts | ( | const MIPSolver::ColItem & | colitem | ) | [virtual] |
Gives the reduced costs for a specific column.
Implements MIPSolver.
| void OSISolver::get_rowactivity | ( | UserVector< double > & | rowact | ) | [virtual] |
Gives the row activities for the rows.
| rowact | To store the row activities of the first rowact.dim() rows. |
Implements MIPSolver.
| double OSISolver::get_rowactivity | ( | const MIPSolver::RowItem & | rowitem | ) | [virtual] |
Gives the row activities for a specific row.
Implements MIPSolver.
| double OSISolver::get_optval | ( | ) | [virtual] |
The last optimal value.
Implements MIPSolver.
| int OSISolver::get_iter | ( | ) | [virtual] |
Implements MIPSolver.
| void OSISolver::set_obj | ( | const UserVector< double > & | obj, | |
| double | obj_const_ = 0. | |||
| ) | [virtual] |
Implements MIPSolver.
| void OSISolver::modify_obj | ( | int | i, | |
| double | coeff | |||
| ) | [virtual] |
Implements MIPSolver.
| const MIPSolver::RowItem* OSISolver::add_row | ( | const UserVector< double > & | row, | |
| double | low, | |||
| double | up | |||
| ) | [virtual] |
| const MIPSolver::RowItem* OSISolver::add_row | ( | const UserVector< double > & | row, | |
| const ivector & | indices, | |||
| double | low, | |||
| double | up | |||
| ) | [virtual] |
Reimplemented from MIPSolver.
| void OSISolver::add_rows | ( | const vector< pair< dvector, ivector > > & | rows, | |
| const dvector & | low, | |||
| const dvector & | up | |||
| ) | [virtual] |
Reimplemented from MIPSolver.
| void OSISolver::add_rows | ( | list< const MIPSolver::RowItem * > & | rowitems, | |
| const vector< pair< dvector, ivector > > & | rows, | |||
| const dvector & | low, | |||
| const dvector & | up | |||
| ) |
| void OSISolver::delete_row | ( | const MIPSolver::RowItem & | rowitem | ) | [inline, virtual] |
| void OSISolver::delete_rows | ( | const list< const MIPSolver::RowItem * > & | rowitems | ) |
| void OSISolver::modify_row | ( | const MIPSolver::RowItem & | rowitem, | |
| double | low, | |||
| double | up | |||
| ) | [virtual] |
Implements MIPSolver.
| void OSISolver::modify_row | ( | int | index, | |
| double | low, | |||
| double | up | |||
| ) | [virtual] |
Implements MIPSolver.
| const MIPSolver::ColItem* OSISolver::add_col | ( | double | low, | |
| double | up, | |||
| MipProblem::VarType | vartype = MipProblem::CONTINUOUS | |||
| ) | [virtual] |
Implements MIPSolver.
| const MIPSolver::ColItem* OSISolver::add_col | ( | const UserVector< double > & | col, | |
| double | obj_coeff, | |||
| double | low, | |||
| double | up, | |||
| MipProblem::VarType | vartype = MipProblem::CONTINUOUS | |||
| ) | [virtual] |
Implements MIPSolver.
| void OSISolver::add_cols | ( | list< const MIPSolver::ColItem * > & | colitems, | |
| const dvector & | low, | |||
| const dvector & | up | |||
| ) |
| void OSISolver::add_cols | ( | list< const MIPSolver::ColItem * > & | colitems, | |
| vector< Pointer< UserVector< double > > > & | cols, | |||
| const vector< double > & | obj_coeff, | |||
| const dvector & | low, | |||
| const dvector & | up | |||
| ) |
| void OSISolver::delete_col | ( | const MIPSolver::ColItem & | colitem | ) | [inline, virtual] |
| void OSISolver::delete_cols | ( | const list< const MIPSolver::ColItem * > & | colitems | ) |
| void OSISolver::modify_col | ( | const MIPSolver::ColItem & | colitem, | |
| double | low, | |||
| double | up, | |||
| MipProblem::VarType | type | |||
| ) | [virtual] |
Implements MIPSolver.
| void OSISolver::modify_col | ( | const MIPSolver::ColItem & | colitem, | |
| const UserVector< double > & | col, | |||
| double | obj_coeff, | |||
| double | low, | |||
| double | up, | |||
| MipProblem::VarType | vartype | |||
| ) | [virtual] |
Implements MIPSolver.
| void OSISolver::modify_col | ( | int | index, | |
| double | low, | |||
| double | up, | |||
| MipProblem::VarType | type | |||
| ) | [virtual] |
If you are sure, which index your variable is.
Implements MIPSolver.
| double OSISolver::get_collow | ( | int | index | ) | [virtual] |
Implements MIPSolver.
| double OSISolver::get_colup | ( | int | index | ) | [virtual] |
Implements MIPSolver.
Implements MIPSolver.
Pointer<OsiSolverInterface> OSISolver::osisolver [private] |
Pointer<CglCutGenerator> OSISolver::cutgenerator [private] |
double OSISolver::obj_const [private] |
bool OSISolver::cold_start [private] |
list<RowItem> OSISolver::addedrows [private] |
list<ColItem> OSISolver::addedcols [private] |
1.6.1