GamsFinalize.hpp File Reference

#include "GamsModel.hpp"
#include "GamsMessageHandler.hpp"
#include "OsiSolverInterface.hpp"

Include dependency graph for GamsFinalize.hpp:

Go to the source code of this file.

Functions

void GamsFinalizeOsi (GamsModel *gm, GamsMessageHandler *myout, OsiSolverInterface *solver, bool TimeLimitExceeded=false, bool HaveFeasibleSolution=false, bool swapRowStatus=false)
 Analyze solution stored in an OsiSolverInterface and writes GAMS solution file.
void GamsWriteSolutionOsi (GamsModel *gm, GamsMessageHandler *myout, OsiSolverInterface *solver, bool swapRowStatus=false)
 Writes GAMS solution file for a solution stored in an OsiSolverInterface.


Function Documentation

void GamsFinalizeOsi ( GamsModel gm,
GamsMessageHandler myout,
OsiSolverInterface *  solver,
bool  TimeLimitExceeded = false,
bool  HaveFeasibleSolution = false,
bool  swapRowStatus = false 
)

Analyze solution stored in an OsiSolverInterface and writes GAMS solution file.

See also:
GamsWriteSolutionOsi on how the solution is written.
Parameters:
gm The GamsModel.
myout A GAMS message handler for output.
solver The OSI solver interface to read the solution from.
TimeLimitExceeded Indicate, whether a time limit was exceeded. (Time Limits are not directly supported by OsiSolverInterface.)
HaveFeasibleSolution In case that time or iteration limit is exceeded, this indicates whether a feasible solution was found. (Feasibility checks are not directly supported by OsiSolverInterface.)
swapRowStatus Some OSI solvers think in term of artifical variables when dealing with the basis status of a row. Hence, the row status CoinWarmStartBasis::atLowerBound correponds to GamsModel::NonBasicUpper, and similar for atUpperBound. Setting swapRowStatus to true swaps atLowerBound and atUpperBound so that the row status in GAMS is correct again.

void GamsWriteSolutionOsi ( GamsModel gm,
GamsMessageHandler myout,
OsiSolverInterface *  solver,
bool  swapRowStatus = false 
)

Writes GAMS solution file for a solution stored in an OsiSolverInterface.

If solver->optimalBasisIsAvailable() returns positive, the basis returned by solver->getBasisStatus is used. Else, if solver->getWarmStart() returns a basis, then this basis is used. Otherwise we try to guess a basis, which is likely to fail.

Parameters:
gm The GamsModel.
myout A GAMS message handler for output.
solver The OSI solver interface to read the solution from.
swapRowStatus Some OSI solvers think in term of artifical variables when dealing with the basis status of a row. Hence, the row status CoinWarmStartBasis::atLowerBound correponds to GamsModel::NonBasicUpper, and similar for atUpperBound. Setting swapRowStatus to true swaps atLowerBound and atUpperBound so that the row status in GAMS is correct again.


Generated on Tue Dec 30 03:01:26 2008 for GAMSlinks by  doxygen 1.4.7