Bonmin::OsiTMINLPInterface Class Reference

This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so that we can use it for example as the continuous solver in Cbc). More...

#include <BonOsiTMINLPInterface.hpp>

Inheritance diagram for Bonmin::OsiTMINLPInterface:

Inheritance graph
[legend]
Collaboration diagram for Bonmin::OsiTMINLPInterface:

Collaboration graph
[legend]
List of all members.

output for OA cut generation

Todo:
All OA code here should be moved to a separate class sometime.


enum  OaMessagesTypes { CUT_NOT_VIOLATED_ENOUGH = 0, VIOLATED_OA_CUT_GENERATED, OA_CUT_GENERATED, OA_MESSAGES_DUMMY_END }
 OA Messages types. More...
void setOaMessageHandler (const CoinMessageHandler &handler)
 OA Messages types.

Cached information on the problem

void freeCachedColRim ()
 Free cached data relative to variables.
void freeCachedRowRim ()
 Free cached data relative to constraints.
void freeCachedData ()
 Free all cached data.
void extractSenseRhsAndRange () const
 Extract rowsense_ vector rhs_ vector and rowrange_ vector from the lower and upper bounds on the constraints.
char * rowsense_
 Pointer to dense vector of row sense indicators.
double * rhs_
 Pointer to dense vector of row right-hand side values.
double * rowrange_
 Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows).
double * reducedCosts_
 Pointer to dense vector of reduced costs.
double OsiDualObjectiveLimit_
 DualObjectiveLimit is used to store the cutoff in Cbc.
bool hasVarNamesFile_
 does the file variable names exists (will check automatically).

Public Types

 SOLUTION_FOUND
 found a feasible solution
 INFEASIBLE_SOLUTION_FOUND
 found an infeasible problem
 UNSOLVED_PROBLEM_FOUND
 found an unsolved problem
 WARNING_RESOLVING
 Warn that a problem is resolved.
 WARN_SUCCESS_WS
 Problem not solved with warm start but solved without.
 WARN_SUCCESS_RANDOM
 Subproblem not solve with warm start but solved with random point.
 WARN_CONTINUING_ON_FAILURE
 a failure occured but is continuing
 SUSPECT_PROBLEM
 Output the number of the problem.
 SUSPECT_PROBLEM2
 Output the number of the problem.
 IPOPT_SUMMARY
 Output summary statistics on Ipopt solution.
 BETTER_SOL
 Found a better solution with random values.
 LOG_HEAD
 Head of "civilized" log.
 LOG_FIRST_LINE
 First line (first solve) of log.
 LOG_LINE
 standard line (retry solving) of log.
 ALTERNATE_OBJECTIVE
 Recomputed integer feasible with alternate objective function.
 WARN_RESOLVE_BEFORE_INITIAL_SOLVE
 resolve() has been called but there was no previous call to initialSolve().
 ERROR_NO_TNLPSOLVER
 Trying to access non-existent TNLPSolver.
 WARNING_NON_CONVEX_OA
 Warn that there are equality or ranged constraints and OA may works bad.
 OSITMINLPINTERFACE_DUMMY_END
 CUT_NOT_VIOLATED_ENOUGH = 0
 VIOLATED_OA_CUT_GENERATED
 Cut is not violated enough, give violation.
 OA_CUT_GENERATED
 Print the cut which has been generated.
 OA_MESSAGES_DUMMY_END
 Dummy end.
enum  MessagesTypes {
  SOLUTION_FOUND, INFEASIBLE_SOLUTION_FOUND, UNSOLVED_PROBLEM_FOUND, WARNING_RESOLVING,
  WARN_SUCCESS_WS, WARN_SUCCESS_RANDOM, WARN_CONTINUING_ON_FAILURE, SUSPECT_PROBLEM,
  SUSPECT_PROBLEM2, IPOPT_SUMMARY, BETTER_SOL, LOG_HEAD,
  LOG_FIRST_LINE, LOG_LINE, ALTERNATE_OBJECTIVE, WARN_RESOLVE_BEFORE_INITIAL_SOLVE,
  ERROR_NO_TNLPSOLVER, WARNING_NON_CONVEX_OA, OSITMINLPINTERFACE_DUMMY_END
}
 Type of the messages specifically outputed by OsiTMINLPInterface. More...

Public Member Functions

TNLPSolver::UnsolvedErrornewUnsolvedError (int num, Ipopt::SmartPtr< TMINLP2TNLP > problem, std::string name)
void setNumIterationSuspect (int value)
const TMINLP2TNLPproblem () const
 get pointer to the TMINLP2TNLP adapter
TMINLP2TNLPproblem ()
const TMINLPmodel () const
Bonmin::TMINLPmodel ()
const Bonmin::TNLPSolversolver () const
TNLPSolversolver ()
virtual ApplyCutsReturnCode applyCuts (const OsiCuts &cs, double effectivenessLb=0.0)
 Apply a collection of cuts.
virtual void applyRowCuts (int numberCuts, const OsiRowCut *cuts)
 Add a collection of linear cuts to problem formulation.
virtual void applyRowCuts (int numberCuts, const OsiRowCut **cuts)
 Add a collection of linear cuts to the problem formulation.
double getConstraintsViolation (const double *x, double &obj)
 Get infinity norm of constraint violation for x.
double getNonLinearitiesViolation (const double *x, const double obj)
 Get infinity norm of constraint violation for x and error in objective value where obj is the estimated objective value of x.
void extractInterfaceParams ()
virtual void setAppDefaultOptions (Ipopt::SmartPtr< Ipopt::OptionsList > Options)
 To set some application specific defaults.
Ipopt::SmartPtr< Bonmin::RegisteredOptionsregOptions ()
Constructors and destructors
 OsiTMINLPInterface ()
 Default Constructor.
void initialize (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist_, Ipopt::SmartPtr< TMINLP > tminlp)
 Facilitator to initialize interface.
void setModel (Ipopt::SmartPtr< TMINLP > tminlp)
 Set the model to be solved by interface.
void setSolver (Ipopt::SmartPtr< TNLPSolver > app)
 Set the solver to be used by interface.
void use (Ipopt::SmartPtr< TMINLP2TNLP > tminlp2tnlp)
 Sets the TMINLP2TNLP to be used by the interface.
 OsiTMINLPInterface (const OsiTMINLPInterface &)
 Copy constructor.
OsiSolverInterfaceclone (bool copyData=true) const
 Virtual copy constructor.
OsiTMINLPInterfaceoperator= (const OsiTMINLPInterface &rhs)
 Assignment operator.
virtual ~OsiTMINLPInterface ()
 Destructor.
void readOptionFile (const std::string &fileName)
 Read parameter file.
const Ipopt::SmartPtr< Ipopt::OptionsListoptions () const
 Retrieve OsiTMINLPApplication option list.
Ipopt::SmartPtr< Ipopt::OptionsListoptions ()
 Retrieve OsiTMINLPApplication option list.
Solve methods
virtual void initialSolve ()
 Solve initial continuous relaxation.
virtual void resolve ()
 Resolve the continuous relaxation after problem modification.
virtual void resolveForCost (int numretry, bool keepWs)
 Resolve the problem with different random starting points to try to find a better solution (only makes sense for a non-convex problem.
virtual void resolveForRobustness (int numretry)
 Method to be called when a problem has failed to be solved.
virtual void branchAndBound ()
 Nescessary for compatibility with OsiSolverInterface but does nothing.
Methods returning info on how the solution process terminated
virtual bool isAbandoned () const
 Are there a numerical difficulties?
virtual bool isProvenOptimal () const
 Is optimality proven?
virtual bool isProvenPrimalInfeasible () const
 Is primal infeasiblity proven?
virtual bool isProvenDualInfeasible () const
 Is dual infeasiblity proven?
virtual bool isPrimalObjectiveLimitReached () const
 Is the given primal objective limit reached?
virtual bool isDualObjectiveLimitReached () const
 Is the given dual objective limit reached?
virtual bool isIterationLimitReached () const
 Iteration limit reached?
void continuingOnAFailure ()
 Warn solver that branch-and-bound is continuing after a failure.
bool hasContinuedOnAFailure ()
 Did we continue on a failure.
void ignoreFailures ()
 tell to ignore the failures (don't throw, don't fathom, don't report)
void forceInfeasible ()
 Force current solution to be infeasible.
void forceBranchable ()
 Force current solution to be branched on (make it fractionnal with small objective).
Parameter set/get methods
The set methods return true if the parameter was set to the given value, false otherwise. There can be various reasons for failure: the given parameter is not applicable for the solver (e.g., refactorization frequency for the clp algorithm), the parameter is not yet implemented for the solver or simply the value of the parameter is out of the range the solver accepts. If a parameter setting call returns false check the details of your solver.

The get methods return true if the given parameter is applicable for the solver and is implemented. In this case the value of the parameter is returned in the second argument. Otherwise they return false.

bool setIntParam (OsiIntParam key, int value)
bool setDblParam (OsiDblParam key, double value)
bool setStrParam (OsiStrParam key, const std::string &value)
bool getIntParam (OsiIntParam key, int &value) const
bool getDblParam (OsiDblParam key, double &value) const
bool getStrParam (OsiStrParam key, std::string &value) const
double getPushFact () const
Methods related to querying the input data
virtual int getNumCols () const
 Get number of columns.
virtual int getNumRows () const
 Get number of rows.
const OsiSolverInterface::OsiNameVecgetVarNames ()
 get name of variables
virtual const double * getColLower () const
 Get pointer to array[getNumCols()] of column lower bounds.
virtual const double * getColUpper () const
 Get pointer to array[getNumCols()] of column upper bounds.
virtual const char * getRowSense () const
 Get pointer to array[getNumRows()] of row constraint senses.
virtual const double * getRightHandSide () const
 Get pointer to array[getNumRows()] of rows right-hand sides.
virtual const double * getRowRange () const
 Get pointer to array[getNumRows()] of row ranges.
virtual const double * getRowLower () const
 Get pointer to array[getNumRows()] of row lower bounds.
virtual const double * getRowUpper () const
 Get pointer to array[getNumRows()] of row upper bounds.
virtual double getObjSense () const
 Get objective function sense (1 for min (default), -1 for max) Always minimizes.
virtual bool isContinuous (int colNumber) const
 Return true if column is continuous.
virtual bool isBinary (int columnNumber) const
 Return true if column is binary.
virtual bool isInteger (int columnNumber) const
 Return true if column is integer.
virtual bool isIntegerNonBinary (int columnNumber) const
 Return true if column is general integer.
virtual bool isFreeBinary (int columnNumber) const
 Return true if column is binary and not fixed at either bound.
virtual double getInfinity () const
 Get solver's value for infinity.
const int * getPriorities () const
 Get priorities on integer variables.
const int * getBranchingDirections () const
 get prefered branching directions
const double * getUpPsCosts () const
 Get number of columns.
const double * getDownPsCosts () const
 Get number of columns.
Methods related to querying the solution
virtual const double * getColSolution () const
 Get pointer to array[getNumCols()] of primal solution vector.
virtual const double * getRowPrice () const
 Get pointer to array[getNumRows()] of dual prices.
virtual const double * getReducedCost () const
 Get a pointer to array[getNumCols()] of reduced costs.
virtual const double * getRowActivity () const
 Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vector.
virtual int getIterationCount () const
 Get how many iterations it took to solve the problem (whatever "iteration" mean to the solver.
int nCallOptimizeTNLP ()
 get total number of calls to solve.
double totalNlpSolveTime ()
 get total time taken to solve NLP's.
int totalIterations ()
 get total number of iterations
Methods to modify the objective, bounds, and solution
virtual void setColLower (int elementIndex, double elementValue)
 Set a single column lower bound.
virtual void setColUpper (int elementIndex, double elementValue)
 Set a single column upper bound.
virtual void setColLower (const double *array)
 Set the lower bounds for all columns array [getNumCols()] is an array of values for the objective.
virtual void setColUpper (const double *array)
 Set the upper bounds for all columns array [getNumCols()] is an array of values for the objective.
virtual void setRowLower (int elementIndex, double elementValue)
 Set a single row lower bound.
virtual void setRowUpper (int elementIndex, double elementValue)
 Set a single row upper bound.
virtual void setRowType (int index, char sense, double rightHandSide, double range)
 Set the type of a single row.
virtual void setObjSense (double s)
 Set the objective function sense (disabled).
virtual void setColSolution (const double *colsol)
 Set the primal solution variable values Set the values for the starting point.
virtual void setRowPrice (const double *rowprice)
 Set dual solution variable values.
WarmStart related methods (those should really do nothing for the moment)
virtual CoinWarmStartgetEmptyWarmStart () const
 Get an empty warm start object.
virtual CoinWarmStartgetWarmStart () const
 Get warmstarting information.
virtual bool setWarmStart (const CoinWarmStart *warmstart)
 Set warmstarting information.
void setExposeWarmStart (bool value)
 Get an empty warm start object.
bool getExposeWarmStart ()
 Get an empty warm start object.
void randomStartingPoint ()
 Get an empty warm start object.
virtual bool basisIsAvailable () const
 Get an empty warm start object.
Methods to set variable type
virtual void setContinuous (int index)
 Set the index-th variable to be a continuous variable.
virtual void setInteger (int index)
 Set the index-th variable to be an integer variable.
Dummy functions
Functions which have to be implemented in an OsiSolverInterface, but which do not do anything (but throwing exceptions) here in the case of a minlp solved using an nlp solver for continuous relaxations

virtual int getNumElements () const
 Cbc will understand that no matrix exsits if return -1.
virtual const double * getObjCoefficients () const
 This returns the objective function gradient at the current point.
virtual const CoinPackedMatrixgetMatrixByRow () const
 We have to keep this but it will return NULL.
virtual const CoinPackedMatrixgetMatrixByCol () const
 We have to keep this but it will return NULL.
virtual void setObjCoeff (int elementIndex, double elementValue)
 We have to keep this but it will throw an error.
virtual void addCol (const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
 We have to keep this but it will throw an error.
virtual void deleteCols (const int num, const int *colIndices)
 We have to keep this but it will throw an error.
virtual void addRow (const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
 We have to keep this but it will throw an error.
virtual void addRow (const CoinPackedVectorBase &vec, const char rowsen, const double rowrhs, const double rowrng)
 We have to keep this but it will throw an error.
virtual void deleteRows (const int num, const int *rowIndices)
 We have to keep this but it will throw an error.
virtual void loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)
 We have to keep this but it will throw an error.
virtual void assignProblem (CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, double *&rowlb, double *&rowub)
 We have to keep this but it will throw an error.
virtual void loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const char *rowsen, const double *rowrhs, const double *rowrng)
 We have to keep this but it will throw an error.
virtual void assignProblem (CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, char *&rowsen, double *&rowrhs, double *&rowrng)
 We have to keep this but it will throw an error.
virtual void loadProblem (const int numcols, const int numrows, const int *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)
 We have to keep this but it will throw an error.
virtual void loadProblem (const int numcols, const int numrows, const int *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const char *rowsen, const double *rowrhs, const double *rowrng)
 We have to keep this but it will throw an error.
virtual int readMps (const char *filename, const char *extension="mps")
 We have to keep this but it will throw an error.
virtual void writeMps (const char *filename, const char *extension="mps", double objSense=0.0) const
 We have to keep this but it will throw an error.
virtual std::vector< double * > getDualRays (int maxNumRays) const
 Throws an error.
virtual std::vector< double * > getPrimalRays (int maxNumRays) const
 Throws an error.
Control of Ipopt output
void turnOffSolverOutput ()
void turnOnSolverOutput ()
Sets and Getss
virtual double getObjValue () const
 Get objective function value (can't use default).
Methods to build outer approximations
virtual void extractLinearRelaxation (OsiSolverInterface &si, const double *x, bool getObj=1)
 Extract a linear relaxation of the MINLP.
virtual void extractLinearRelaxation (OsiSolverInterface &si, bool getObj=1, bool solveNlp=1)
 Extract a linear relaxation of the MINLP.
void getOuterApproximation (OsiCuts &cs, bool getObj, const double *x2, bool global)
 Get the outer approximation constraints at the current optimal point.
void getOuterApproximation (OsiCuts &cs, const double *x, bool getObj, const double *x2, bool global)
 Get the outer approximation constraints at provided point.
virtual void getOuterApproximation (OsiCuts &cs, const double *x, bool getObj, const double *x2, double theta, bool global)
 Get the outer approximation constraints at provided point.
virtual void getConstraintOuterApproximation (OsiCuts &cs, int constraintNumber, const double *x, const double *x2, bool global)
 Get the outer approximation at provided point for given constraint.
void getConstraintOuterApproximation (OsiCuts &cs, int constraintNumber, const double *x2, bool global)
 Get the outer approximation at current optimal point for given constraint.
void getBendersCut (OsiCuts &cs, const double *x, const double *lambda, bool getObj=1)
 Get the Benders cut at provided point with provided multipliers.
double getFeasibilityOuterApproximation (int n, const double *x_bar, const int *ind, OsiCuts &cs, bool addOnlyViolated, bool global)
 solve the problem of finding the closest point to x_bar in the subspace of coordinates given by ind (i.e., $ min \sum\limits_{i=1}^n (x_{ind[i]} -\overline{x}_i)^2 $ , and get the corresponding outer-approximation constraints.
double solveFeasibilityProblem (int n, const double *x_bar, const int *ind, double a, double s, int L)
 Given a point x_bar this solves the problem of finding the point which minimize a convex combination between the distance to x_bar and the original objective function f(x): $ min a * (\sum\limits_{i=1}^n ||x_{ind[i]} -\overline{x}_i)||_L) + (1 - a)* s *f(x) $.
Methods related to strong branching
void SetStrongBrachingSolver (Ipopt::SmartPtr< StrongBranchingSolver > strong_branching_solver)
 Set the strong branching solver.
virtual void markHotStart ()
 Create a hot start snapshot of the optimization process.
virtual void solveFromHotStart ()
 Optimize starting from the hot start snapshot.
virtual void unmarkHotStart ()
 Delete the hot start snapshot.

Static Public Member Functions

static void registerOptions (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions)
 Register all possible options to Bonmin.

Protected Types

 uniform = 0
 perturb = 1
 perturb_suffix = 2
enum  RandomGenerationType { uniform = 0, perturb = 1, perturb_suffix = 2 }

Protected Member Functions

int initializeJacobianArrays ()
 Initialize data structures for storing the jacobian.
void createApplication (Ipopt::SmartPtr< Bonmin::RegisteredOptions > roptions, Ipopt::SmartPtr< Ipopt::OptionsList > options, Ipopt::SmartPtr< Ipopt::Journalist > journalist)
 Facilitator to create an application.
 OsiTMINLPInterface (Ipopt::SmartPtr< TNLPSolver > app)
 Constructor without model only for derived classes.
bool internal_setWarmStart (const CoinWarmStart *ws)
 Internal set warm start.
CoinWarmStartinternal_getWarmStart () const
 internal get warm start.
Virtual callbacks for application specific stuff
virtual std::string appName ()
Protected methods
void solveAndCheckErrors (bool doResolve, bool throwOnFailure, const char *whereFrom)
 Call Ipopt to solve or resolve the problem and check for errors.
virtual void applyRowCut (const OsiRowCut &rc)
 Add a linear cut to the problem formulation.
virtual void applyColCut (const OsiColCut &cc)
 We have to keep this but it will throw an error.

Protected Attributes

CoinWarmStartwarmstart_
 Warmstart information for reoptimization.
int nCallOptimizeTNLP_
 number of time NLP has been solved
double totalNlpSolveTime_
 Total solution time of NLP.
int totalIterations_
 toatal number of iterations
double maxRandomRadius_
 max radius for random point
int randomGenerationType_
 Method to pick a random starting point.
double max_perturbation_
 Maximum perturbation value.
double pushValue_
 Ipopt value for pushing initial point inside the bounds.
int numRetryInitial_
 Number of times problem will be resolved in initialSolve (root node).
int numRetryResolve_
 Number of times problem will be resolved in resolve.
int numRetryInfeasibles_
 Number of times infeasible problem will be resolved.
int numRetryUnsolved_
 Number of times problem will be resolved in case of a failure.
Messages messages_
 Messages specific to an OsiTMINLPInterface.
int pretendFailIsInfeasible_
 If not 0 when a problem is not solved (failed to be solved) will pretend that it is infeasible.
bool hasContinuedAfterNlpFailure_
 did we ever continue optimization ignoring a failure.
int numIterationSuspect_
 number iterations above which a problem is considered suspect (-1 is considered $+ \infty $).
bool hasBeenOptimized_
 Has problem been optimized since last change (include setColSolution).
double * obj_
 A fake objective function (all variables to 1) to please Cbc pseudo costs initialization.
Ipopt::SmartPtr< TNLP2FPNLPfeasibilityProblem_
 Adapter for TNLP to a feasibility problem.
Ipopt::TNLP::LinearityTypeconstTypes_
 Store the types of the constraints (linear and nonlinear).
int nNonLinear_
 Number of nonlinear constraint.
double tiny_
 Value for small non-zero element which we will try to remove cleanly in OA cuts.
double veryTiny_
 Value for small non-zero element which we will take the risk to ignore in OA cuts.
double infty_
 Value for infinity.
TNLPSolver::ReturnStatus optimizationStatus_
 status of last optimization.
bool exposeWarmStart_
 Flag indicating if the warm start methods actually do something.
bool firstSolve_
 Is it the first solve (for random starting point at root options).
SmartPtr< CutStrengthenercutStrengthener_
 Object for strengthening cuts.
Model and solver
Ipopt::SmartPtr< TMINLPtminlp_
 TMINLP model.
Ipopt::SmartPtr< TMINLP2TNLPproblem_
 Adapter for a MINLP to a NLP.
Ipopt::SmartPtr< TNLPSolverapp_
 Solver for a TMINLP.
Arrays to store Jacobian matrix
int * jRow_
 Row indices.
int * jCol_
 Column indices.
double * jValues_
 Values.
int nnz_jac
 Number of elements.
output for OA cut generation
Todo:
All OA code here should be moved to a separate class sometime.


OaMessages oaMessages_
 OA Messages.
OaMessageHandleroaHandler_
 OA Message handler.

Static Protected Attributes

static bool hasPrintedOptions
 flag to say wether options have been printed or not.

Private Attributes

SmartPtr< StrongBranchingSolverstrong_branching_solver_
 solver to be used for all strong branching solves
TNLPSolver::ReturnStatus optimizationStatusBeforeHotStart_
 status of last optimization before hot start was marked.

Friends

class BonminParam

Classes

class  Messages
 Messages outputed by an OsiTMINLPInterface. More...
class  OaMessageHandler
 Like a CoinMessageHandler but can print a cut also. More...
class  OaMessages
 Class to store OA Messages. More...
class  SimpleError
 Error class to throw exceptions from OsiTMINLPInterface. More...

Detailed Description

This is class provides an Osi interface for a Mixed Integer Linear Program expressed as a TMINLP (so that we can use it for example as the continuous solver in Cbc).

Definition at line 46 of file BonOsiTMINLPInterface.hpp.


Member Enumeration Documentation

enum Bonmin::OsiTMINLPInterface::MessagesTypes

Type of the messages specifically outputed by OsiTMINLPInterface.

Enumerator:
SOLUTION_FOUND  found a feasible solution
INFEASIBLE_SOLUTION_FOUND  found an infeasible problem
UNSOLVED_PROBLEM_FOUND  found an unsolved problem
WARNING_RESOLVING  Warn that a problem is resolved.
WARN_SUCCESS_WS  Problem not solved with warm start but solved without.
WARN_SUCCESS_RANDOM  Subproblem not solve with warm start but solved with random point.
WARN_CONTINUING_ON_FAILURE  a failure occured but is continuing
SUSPECT_PROBLEM  Output the number of the problem.
SUSPECT_PROBLEM2  Output the number of the problem.
IPOPT_SUMMARY  Output summary statistics on Ipopt solution.
BETTER_SOL  Found a better solution with random values.
LOG_HEAD  Head of "civilized" log.
LOG_FIRST_LINE  First line (first solve) of log.
LOG_LINE  standard line (retry solving) of log.
ALTERNATE_OBJECTIVE  Recomputed integer feasible with alternate objective function.
WARN_RESOLVE_BEFORE_INITIAL_SOLVE  resolve() has been called but there was no previous call to initialSolve().
ERROR_NO_TNLPSOLVER  Trying to access non-existent TNLPSolver.
WARNING_NON_CONVEX_OA  Warn that there are equality or ranged constraints and OA may works bad.
OSITMINLPINTERFACE_DUMMY_END 

Definition at line 87 of file BonOsiTMINLPInterface.hpp.

enum Bonmin::OsiTMINLPInterface::OaMessagesTypes

OA Messages types.

Enumerator:
CUT_NOT_VIOLATED_ENOUGH 
VIOLATED_OA_CUT_GENERATED  Cut is not violated enough, give violation.
OA_CUT_GENERATED  Print the cut which has been generated.
OA_MESSAGES_DUMMY_END  Dummy end.

Definition at line 896 of file BonOsiTMINLPInterface.hpp.

enum Bonmin::OsiTMINLPInterface::RandomGenerationType [protected]

Enumerator:
uniform 
perturb 
perturb_suffix 

Definition at line 1009 of file BonOsiTMINLPInterface.hpp.


Constructor & Destructor Documentation

Bonmin::OsiTMINLPInterface::OsiTMINLPInterface (  ) 

Default Constructor.

Bonmin::OsiTMINLPInterface::OsiTMINLPInterface ( const OsiTMINLPInterface  ) 

Copy constructor.

virtual Bonmin::OsiTMINLPInterface::~OsiTMINLPInterface (  )  [virtual]

Destructor.

Bonmin::OsiTMINLPInterface::OsiTMINLPInterface ( Ipopt::SmartPtr< TNLPSolver app  )  [protected]

Constructor without model only for derived classes.


Member Function Documentation

TNLPSolver::UnsolvedError* Bonmin::OsiTMINLPInterface::newUnsolvedError ( int  num,
Ipopt::SmartPtr< TMINLP2TNLP problem,
std::string  name 
) [inline]

Definition at line 80 of file BonOsiTMINLPInterface.hpp.

References app_, and problem().

void Bonmin::OsiTMINLPInterface::initialize ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions,
Ipopt::SmartPtr< Ipopt::OptionsList options,
Ipopt::SmartPtr< Ipopt::Journalist journalist_,
Ipopt::SmartPtr< TMINLP tminlp 
)

Facilitator to initialize interface.

void Bonmin::OsiTMINLPInterface::setModel ( Ipopt::SmartPtr< TMINLP tminlp  ) 

Set the model to be solved by interface.

void Bonmin::OsiTMINLPInterface::setSolver ( Ipopt::SmartPtr< TNLPSolver app  ) 

Set the solver to be used by interface.

void Bonmin::OsiTMINLPInterface::use ( Ipopt::SmartPtr< TMINLP2TNLP tminlp2tnlp  )  [inline]

Sets the TMINLP2TNLP to be used by the interface.

Definition at line 142 of file BonOsiTMINLPInterface.hpp.

References problem_.

OsiSolverInterface* Bonmin::OsiTMINLPInterface::clone ( bool  copyData = true  )  const [virtual]

Virtual copy constructor.

Implements OsiSolverInterface.

OsiTMINLPInterface& Bonmin::OsiTMINLPInterface::operator= ( const OsiTMINLPInterface rhs  ) 

Assignment operator.

void Bonmin::OsiTMINLPInterface::readOptionFile ( const std::string &  fileName  ) 

Read parameter file.

const Ipopt::SmartPtr<Ipopt::OptionsList> Bonmin::OsiTMINLPInterface::options (  )  const

Retrieve OsiTMINLPApplication option list.

Ipopt::SmartPtr<Ipopt::OptionsList> Bonmin::OsiTMINLPInterface::options (  ) 

Retrieve OsiTMINLPApplication option list.

virtual void Bonmin::OsiTMINLPInterface::initialSolve (  )  [virtual]

Solve initial continuous relaxation.

Implements OsiSolverInterface.

Referenced by extractLinearRelaxation().

virtual void Bonmin::OsiTMINLPInterface::resolve (  )  [virtual]

Resolve the continuous relaxation after problem modification.

initialSolve may or may not have been called before this is called. In any case, this must solve the problem, and speed the process up if it can reuse any remnants of data that might exist from a previous solve.

Implements OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::resolveForCost ( int  numretry,
bool  keepWs 
) [virtual]

Resolve the problem with different random starting points to try to find a better solution (only makes sense for a non-convex problem.

virtual void Bonmin::OsiTMINLPInterface::resolveForRobustness ( int  numretry  )  [virtual]

Method to be called when a problem has failed to be solved.

Will try to resolve it with different settings.

virtual void Bonmin::OsiTMINLPInterface::branchAndBound (  )  [inline, virtual]

Nescessary for compatibility with OsiSolverInterface but does nothing.

Implements OsiSolverInterface.

Definition at line 189 of file BonOsiTMINLPInterface.hpp.

virtual bool Bonmin::OsiTMINLPInterface::isAbandoned (  )  const [virtual]

Are there a numerical difficulties?

Implements OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isProvenOptimal (  )  const [virtual]

Is optimality proven?

Implements OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isProvenPrimalInfeasible (  )  const [virtual]

Is primal infeasiblity proven?

Implements OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isProvenDualInfeasible (  )  const [virtual]

Is dual infeasiblity proven?

Implements OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isPrimalObjectiveLimitReached (  )  const [virtual]

Is the given primal objective limit reached?

Implements OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isDualObjectiveLimitReached (  )  const [virtual]

Is the given dual objective limit reached?

Implements OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isIterationLimitReached (  )  const [virtual]

Iteration limit reached?

Implements OsiSolverInterface.

void Bonmin::OsiTMINLPInterface::continuingOnAFailure (  )  [inline]

Warn solver that branch-and-bound is continuing after a failure.

Definition at line 216 of file BonOsiTMINLPInterface.hpp.

References hasContinuedAfterNlpFailure_.

bool Bonmin::OsiTMINLPInterface::hasContinuedOnAFailure (  )  [inline]

Did we continue on a failure.

Definition at line 221 of file BonOsiTMINLPInterface.hpp.

References hasContinuedAfterNlpFailure_.

void Bonmin::OsiTMINLPInterface::ignoreFailures (  )  [inline]

tell to ignore the failures (don't throw, don't fathom, don't report)

Definition at line 226 of file BonOsiTMINLPInterface.hpp.

References pretendFailIsInfeasible_.

void Bonmin::OsiTMINLPInterface::forceInfeasible (  )  [inline]

Force current solution to be infeasible.

Definition at line 231 of file BonOsiTMINLPInterface.hpp.

References problem_.

void Bonmin::OsiTMINLPInterface::forceBranchable (  )  [inline]

Force current solution to be branched on (make it fractionnal with small objective).

Definition at line 236 of file BonOsiTMINLPInterface.hpp.

References problem_.

bool Bonmin::OsiTMINLPInterface::setIntParam ( OsiIntParam  key,
int  value 
) [virtual]

Reimplemented from OsiSolverInterface.

bool Bonmin::OsiTMINLPInterface::setDblParam ( OsiDblParam  key,
double  value 
) [virtual]

Reimplemented from OsiSolverInterface.

bool Bonmin::OsiTMINLPInterface::setStrParam ( OsiStrParam  key,
const std::string &  value 
) [virtual]

Reimplemented from OsiSolverInterface.

bool Bonmin::OsiTMINLPInterface::getIntParam ( OsiIntParam  key,
int &  value 
) const [virtual]

Reimplemented from OsiSolverInterface.

bool Bonmin::OsiTMINLPInterface::getDblParam ( OsiDblParam  key,
double &  value 
) const [virtual]

Reimplemented from OsiSolverInterface.

bool Bonmin::OsiTMINLPInterface::getStrParam ( OsiStrParam  key,
std::string &  value 
) const [virtual]

Reimplemented from OsiSolverInterface.

double Bonmin::OsiTMINLPInterface::getPushFact (  )  const [inline]

Definition at line 274 of file BonOsiTMINLPInterface.hpp.

References pushValue_.

virtual int Bonmin::OsiTMINLPInterface::getNumCols (  )  const [virtual]

Get number of columns.

Implements OsiSolverInterface.

virtual int Bonmin::OsiTMINLPInterface::getNumRows (  )  const [virtual]

Get number of rows.

Implements OsiSolverInterface.

const OsiSolverInterface::OsiNameVec& Bonmin::OsiTMINLPInterface::getVarNames (  ) 

get name of variables

virtual const double* Bonmin::OsiTMINLPInterface::getColLower (  )  const [virtual]

Get pointer to array[getNumCols()] of column lower bounds.

Implements OsiSolverInterface.

virtual const double* Bonmin::OsiTMINLPInterface::getColUpper (  )  const [virtual]

Get pointer to array[getNumCols()] of column upper bounds.

Implements OsiSolverInterface.

virtual const char* Bonmin::OsiTMINLPInterface::getRowSense (  )  const [virtual]

Get pointer to array[getNumRows()] of row constraint senses.

Implements OsiSolverInterface.

virtual const double* Bonmin::OsiTMINLPInterface::getRightHandSide (  )  const [virtual]

Get pointer to array[getNumRows()] of rows right-hand sides.

Implements OsiSolverInterface.

virtual const double* Bonmin::OsiTMINLPInterface::getRowRange (  )  const [virtual]

Get pointer to array[getNumRows()] of row ranges.

Implements OsiSolverInterface.

virtual const double* Bonmin::OsiTMINLPInterface::getRowLower (  )  const [virtual]

Get pointer to array[getNumRows()] of row lower bounds.

Implements OsiSolverInterface.

virtual const double* Bonmin::OsiTMINLPInterface::getRowUpper (  )  const [virtual]

Get pointer to array[getNumRows()] of row upper bounds.

Implements OsiSolverInterface.

virtual double Bonmin::OsiTMINLPInterface::getObjSense (  )  const [inline, virtual]

Get objective function sense (1 for min (default), -1 for max) Always minimizes.

Implements OsiSolverInterface.

Definition at line 350 of file BonOsiTMINLPInterface.hpp.

virtual bool Bonmin::OsiTMINLPInterface::isContinuous ( int  colNumber  )  const [virtual]

Return true if column is continuous.

Implements OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isBinary ( int  columnNumber  )  const [virtual]

Return true if column is binary.

Reimplemented from OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isInteger ( int  columnNumber  )  const [virtual]

Return true if column is integer.

Note: This function returns true if the the column is binary or a general integer.

Reimplemented from OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isIntegerNonBinary ( int  columnNumber  )  const [virtual]

Return true if column is general integer.

Reimplemented from OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::isFreeBinary ( int  columnNumber  )  const [virtual]

Return true if column is binary and not fixed at either bound.

Reimplemented from OsiSolverInterface.

virtual double Bonmin::OsiTMINLPInterface::getInfinity (  )  const [virtual]

Get solver's value for infinity.

Implements OsiSolverInterface.

const int* Bonmin::OsiTMINLPInterface::getPriorities (  )  const [inline]

Get priorities on integer variables.

Definition at line 377 of file BonOsiTMINLPInterface.hpp.

References Bonmin::TMINLP::BranchingInfo::priorities, and tminlp_.

const int* Bonmin::OsiTMINLPInterface::getBranchingDirections (  )  const [inline]

get prefered branching directions

Definition at line 385 of file BonOsiTMINLPInterface.hpp.

References Bonmin::TMINLP::BranchingInfo::branchingDirections, and tminlp_.

const double* Bonmin::OsiTMINLPInterface::getUpPsCosts (  )  const [inline]

Get number of columns.

Definition at line 392 of file BonOsiTMINLPInterface.hpp.

References tminlp_, and Bonmin::TMINLP::BranchingInfo::upPsCosts.

const double* Bonmin::OsiTMINLPInterface::getDownPsCosts (  )  const [inline]

Get number of columns.

Definition at line 399 of file BonOsiTMINLPInterface.hpp.

References Bonmin::TMINLP::BranchingInfo::downPsCosts, and tminlp_.

virtual const double* Bonmin::OsiTMINLPInterface::getColSolution (  )  const [virtual]

Get pointer to array[getNumCols()] of primal solution vector.

Implements OsiSolverInterface.

Referenced by extractLinearRelaxation(), getConstraintOuterApproximation(), and getOuterApproximation().

virtual const double* Bonmin::OsiTMINLPInterface::getRowPrice (  )  const [virtual]

Get pointer to array[getNumRows()] of dual prices.

Implements OsiSolverInterface.

virtual const double* Bonmin::OsiTMINLPInterface::getReducedCost (  )  const [virtual]

Get a pointer to array[getNumCols()] of reduced costs.

Implements OsiSolverInterface.

virtual const double* Bonmin::OsiTMINLPInterface::getRowActivity (  )  const [virtual]

Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vector.

Implements OsiSolverInterface.

virtual int Bonmin::OsiTMINLPInterface::getIterationCount (  )  const [virtual]

Get how many iterations it took to solve the problem (whatever "iteration" mean to the solver.

Todo:
Figure out what it could mean for Ipopt.

Implements OsiSolverInterface.

int Bonmin::OsiTMINLPInterface::nCallOptimizeTNLP (  )  [inline]

get total number of calls to solve.

Definition at line 433 of file BonOsiTMINLPInterface.hpp.

References nCallOptimizeTNLP_.

double Bonmin::OsiTMINLPInterface::totalNlpSolveTime (  )  [inline]

get total time taken to solve NLP's.

Definition at line 438 of file BonOsiTMINLPInterface.hpp.

References totalNlpSolveTime_.

int Bonmin::OsiTMINLPInterface::totalIterations (  )  [inline]

get total number of iterations

Definition at line 443 of file BonOsiTMINLPInterface.hpp.

References totalIterations_.

virtual void Bonmin::OsiTMINLPInterface::setColLower ( int  elementIndex,
double  elementValue 
) [virtual]

Set a single column lower bound.

Use -getInfinity() for -infinity.

Implements OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setColUpper ( int  elementIndex,
double  elementValue 
) [virtual]

Set a single column upper bound.

Use getInfinity() for infinity.

Implements OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setColLower ( const double *  array  )  [virtual]

Set the lower bounds for all columns array [getNumCols()] is an array of values for the objective.

Reimplemented from OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setColUpper ( const double *  array  )  [virtual]

Set the upper bounds for all columns array [getNumCols()] is an array of values for the objective.

Reimplemented from OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setRowLower ( int  elementIndex,
double  elementValue 
) [virtual]

Set a single row lower bound.

Use -getInfinity() for -infinity.

Implements OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setRowUpper ( int  elementIndex,
double  elementValue 
) [virtual]

Set a single row upper bound.

Use getInfinity() for infinity.

Implements OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setRowType ( int  index,
char  sense,
double  rightHandSide,
double  range 
) [virtual]

Set the type of a single row.

Implements OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setObjSense ( double  s  )  [virtual]

Set the objective function sense (disabled).

(1 for min (default), -1 for max)

Todo:
Make it work.
Bug:
Can not treat maximisation problems.

Implements OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setColSolution ( const double *  colsol  )  [virtual]

Set the primal solution variable values Set the values for the starting point.

Warning:
getColSolution will never return this vector (unless it is optimal).

Implements OsiSolverInterface.

Referenced by extractLinearRelaxation().

virtual void Bonmin::OsiTMINLPInterface::setRowPrice ( const double *  rowprice  )  [virtual]

Set dual solution variable values.

set the values for the starting point.

Warning:
getRowPrice will never return this vector (unless it is optimal).

Implements OsiSolverInterface.

Referenced by extractLinearRelaxation().

virtual CoinWarmStart* Bonmin::OsiTMINLPInterface::getEmptyWarmStart (  )  const [virtual]

Get an empty warm start object.

This routine returns an empty CoinWarmStartBasis object. Its purpose is to provide a way to give a client a warm start basis object of the appropriate type, which can resized and modified as desired.

Implements OsiSolverInterface.

virtual CoinWarmStart* Bonmin::OsiTMINLPInterface::getWarmStart (  )  const [virtual]

Get warmstarting information.

Implements OsiSolverInterface.

virtual bool Bonmin::OsiTMINLPInterface::setWarmStart ( const CoinWarmStart warmstart  )  [virtual]

Set warmstarting information.

Return true/false depending on whether the warmstart information was accepted or not.

Implements OsiSolverInterface.

void Bonmin::OsiTMINLPInterface::setExposeWarmStart ( bool  value  )  [inline]

Get an empty warm start object.

This routine returns an empty CoinWarmStartBasis object. Its purpose is to provide a way to give a client a warm start basis object of the appropriate type, which can resized and modified as desired.

Definition at line 527 of file BonOsiTMINLPInterface.hpp.

References exposeWarmStart_.

bool Bonmin::OsiTMINLPInterface::getExposeWarmStart (  )  [inline]

Get an empty warm start object.

This routine returns an empty CoinWarmStartBasis object. Its purpose is to provide a way to give a client a warm start basis object of the appropriate type, which can resized and modified as desired.

Definition at line 531 of file BonOsiTMINLPInterface.hpp.

References exposeWarmStart_.

void Bonmin::OsiTMINLPInterface::randomStartingPoint (  ) 

Get an empty warm start object.

This routine returns an empty CoinWarmStartBasis object. Its purpose is to provide a way to give a client a warm start basis object of the appropriate type, which can resized and modified as desired.

virtual bool Bonmin::OsiTMINLPInterface::basisIsAvailable (  )  const [inline, virtual]

Get an empty warm start object.

This routine returns an empty CoinWarmStartBasis object. Its purpose is to provide a way to give a client a warm start basis object of the appropriate type, which can resized and modified as desired.

Reimplemented from OsiSolverInterface.

Definition at line 538 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::setContinuous ( int  index  )  [virtual]

Set the index-th variable to be a continuous variable.

Implements OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::setInteger ( int  index  )  [virtual]

Set the index-th variable to be an integer variable.

Implements OsiSolverInterface.

void Bonmin::OsiTMINLPInterface::setNumIterationSuspect ( int  value  )  [inline]

Definition at line 557 of file BonOsiTMINLPInterface.hpp.

References numIterationSuspect_.

virtual int Bonmin::OsiTMINLPInterface::getNumElements (  )  const [inline, virtual]

Cbc will understand that no matrix exsits if return -1.

Implements OsiSolverInterface.

Definition at line 570 of file BonOsiTMINLPInterface.hpp.

virtual const double* Bonmin::OsiTMINLPInterface::getObjCoefficients (  )  const [virtual]

This returns the objective function gradient at the current point.

It seems to be required for Cbc's pseudo cost initialization

Implements OsiSolverInterface.

virtual const CoinPackedMatrix* Bonmin::OsiTMINLPInterface::getMatrixByRow (  )  const [inline, virtual]

We have to keep this but it will return NULL.

Implements OsiSolverInterface.

Definition at line 584 of file BonOsiTMINLPInterface.hpp.

virtual const CoinPackedMatrix* Bonmin::OsiTMINLPInterface::getMatrixByCol (  )  const [inline, virtual]

We have to keep this but it will return NULL.

Implements OsiSolverInterface.

Definition at line 592 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::setObjCoeff ( int  elementIndex,
double  elementValue 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 599 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::addCol ( const CoinPackedVectorBase vec,
const double  collb,
const double  colub,
const double  obj 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 607 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::deleteCols ( const int  num,
const int *  colIndices 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 616 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::addRow ( const CoinPackedVectorBase vec,
const double  rowlb,
const double  rowub 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 624 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::addRow ( const CoinPackedVectorBase vec,
const char  rowsen,
const double  rowrhs,
const double  rowrng 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 632 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::deleteRows ( const int  num,
const int *  rowIndices 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 641 of file BonOsiTMINLPInterface.hpp.

References freeCachedRowRim(), and problem_.

virtual void Bonmin::OsiTMINLPInterface::loadProblem ( const CoinPackedMatrix matrix,
const double *  collb,
const double *  colub,
const double *  obj,
const double *  rowlb,
const double *  rowub 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 651 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::assignProblem ( CoinPackedMatrix *&  matrix,
double *&  collb,
double *&  colub,
double *&  obj,
double *&  rowlb,
double *&  rowub 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 663 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::loadProblem ( const CoinPackedMatrix matrix,
const double *  collb,
const double *  colub,
const double *  obj,
const char *  rowsen,
const double *  rowrhs,
const double *  rowrng 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 673 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::assignProblem ( CoinPackedMatrix *&  matrix,
double *&  collb,
double *&  colub,
double *&  obj,
char *&  rowsen,
double *&  rowrhs,
double *&  rowrng 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 685 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::loadProblem ( const int  numcols,
const int  numrows,
const int *  start,
const int *  index,
const double *  value,
const double *  collb,
const double *  colub,
const double *  obj,
const double *  rowlb,
const double *  rowub 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 697 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::loadProblem ( const int  numcols,
const int  numrows,
const int *  start,
const int *  index,
const double *  value,
const double *  collb,
const double *  colub,
const double *  obj,
const char *  rowsen,
const double *  rowrhs,
const double *  rowrng 
) [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 710 of file BonOsiTMINLPInterface.hpp.

virtual int Bonmin::OsiTMINLPInterface::readMps ( const char *  filename,
const char *  extension = "mps" 
) [inline, virtual]

We have to keep this but it will throw an error.

Reimplemented from OsiSolverInterface.

Definition at line 724 of file BonOsiTMINLPInterface.hpp.

virtual void Bonmin::OsiTMINLPInterface::writeMps ( const char *  filename,
const char *  extension = "mps",
double  objSense = 0.0 
) const [inline, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 734 of file BonOsiTMINLPInterface.hpp.

virtual std::vector<double*> Bonmin::OsiTMINLPInterface::getDualRays ( int  maxNumRays  )  const [inline, virtual]

Throws an error.

Implements OsiSolverInterface.

Definition at line 743 of file BonOsiTMINLPInterface.hpp.

virtual std::vector<double*> Bonmin::OsiTMINLPInterface::getPrimalRays ( int  maxNumRays  )  const [inline, virtual]

Throws an error.

Implements OsiSolverInterface.

Definition at line 750 of file BonOsiTMINLPInterface.hpp.

void Bonmin::OsiTMINLPInterface::turnOffSolverOutput (  )  [inline]

Definition at line 767 of file BonOsiTMINLPInterface.hpp.

References app_.

void Bonmin::OsiTMINLPInterface::turnOnSolverOutput (  )  [inline]

Definition at line 769 of file BonOsiTMINLPInterface.hpp.

References app_.

virtual double Bonmin::OsiTMINLPInterface::getObjValue (  )  const [virtual]

Get objective function value (can't use default).

Implements OsiSolverInterface.

const TMINLP2TNLP* Bonmin::OsiTMINLPInterface::problem (  )  const [inline]

get pointer to the TMINLP2TNLP adapter

Definition at line 781 of file BonOsiTMINLPInterface.hpp.

References Ipopt::GetRawPtr(), and problem_.

Referenced by extractLinearRelaxation(), and newUnsolvedError().

TMINLP2TNLP* Bonmin::OsiTMINLPInterface::problem (  )  [inline]

Definition at line 786 of file BonOsiTMINLPInterface.hpp.

References Ipopt::GetRawPtr(), and problem_.

const TMINLP* Bonmin::OsiTMINLPInterface::model (  )  const [inline]

Definition at line 791 of file BonOsiTMINLPInterface.hpp.

References Ipopt::GetRawPtr(), and tminlp_.

Bonmin::TMINLP* Bonmin::OsiTMINLPInterface::model (  )  [inline]

Definition at line 796 of file BonOsiTMINLPInterface.hpp.

References Ipopt::GetRawPtr(), and tminlp_.

const Bonmin::TNLPSolver* Bonmin::OsiTMINLPInterface::solver (  )  const [inline]

Definition at line 801 of file BonOsiTMINLPInterface.hpp.

References app_, and Ipopt::GetRawPtr().

TNLPSolver* Bonmin::OsiTMINLPInterface::solver (  )  [inline]

Definition at line 806 of file BonOsiTMINLPInterface.hpp.

References app_, and Ipopt::GetRawPtr().

virtual void Bonmin::OsiTMINLPInterface::extractLinearRelaxation ( OsiSolverInterface si,
const double *  x,
bool  getObj = 1 
) [virtual]

Extract a linear relaxation of the MINLP.

Use user-provided point to build first-order outer-approximation constraints at the optimum. And put it in an OsiSolverInterface.

Referenced by extractLinearRelaxation().

virtual void Bonmin::OsiTMINLPInterface::extractLinearRelaxation ( OsiSolverInterface si,
bool  getObj = 1,
bool  solveNlp = 1 
) [inline, virtual]

Extract a linear relaxation of the MINLP.

Solve the continuous relaxation and takes first-order outer-approximation constraints at the optimum. The put everything in an OsiSolverInterface.

Definition at line 825 of file BonOsiTMINLPInterface.hpp.

References app_, extractLinearRelaxation(), getColSolution(), initialSolve(), problem(), setColSolution(), and setRowPrice().

void Bonmin::OsiTMINLPInterface::getOuterApproximation ( OsiCuts cs,
bool  getObj,
const double *  x2,
bool  global 
) [inline]

Get the outer approximation constraints at the current optimal point.

If x2 is different from NULL only add cuts violated by x2. (Only get outer-approximations of nonlinear constraints of the problem.)

Definition at line 840 of file BonOsiTMINLPInterface.hpp.

References getColSolution().

Referenced by getOuterApproximation().

void Bonmin::OsiTMINLPInterface::getOuterApproximation ( OsiCuts cs,
const double *  x,
bool  getObj,
const double *  x2,
bool  global 
) [inline]

Get the outer approximation constraints at provided point.

If x2 is different from NULL only add cuts violated by x2. (Only get outer-approximations of nonlinear constraints of the problem.)

Definition at line 848 of file BonOsiTMINLPInterface.hpp.

References getOuterApproximation().

virtual void Bonmin::OsiTMINLPInterface::getOuterApproximation ( OsiCuts cs,
const double *  x,
bool  getObj,
const double *  x2,
double  theta,
bool  global 
) [virtual]

Get the outer approximation constraints at provided point.

If x2 is different from NULL only add cuts violated by x2 by more than delta. (Only get outer-approximations of nonlinear constraints of the problem.)

virtual void Bonmin::OsiTMINLPInterface::getConstraintOuterApproximation ( OsiCuts cs,
int  constraintNumber,
const double *  x,
const double *  x2,
bool  global 
) [virtual]

Get the outer approximation at provided point for given constraint.

Referenced by getConstraintOuterApproximation().

void Bonmin::OsiTMINLPInterface::getConstraintOuterApproximation ( OsiCuts cs,
int  constraintNumber,
const double *  x2,
bool  global 
) [inline]

Get the outer approximation at current optimal point for given constraint.

Definition at line 863 of file BonOsiTMINLPInterface.hpp.

References getColSolution(), and getConstraintOuterApproximation().

void Bonmin::OsiTMINLPInterface::getBendersCut ( OsiCuts cs,
const double *  x,
const double *  lambda,
bool  getObj = 1 
)

Get the Benders cut at provided point with provided multipliers.

double Bonmin::OsiTMINLPInterface::getFeasibilityOuterApproximation ( int  n,
const double *  x_bar,
const int *  ind,
OsiCuts cs,
bool  addOnlyViolated,
bool  global 
)

solve the problem of finding the closest point to x_bar in the subspace of coordinates given by ind (i.e., $ min \sum\limits_{i=1}^n (x_{ind[i]} -\overline{x}_i)^2 $ , and get the corresponding outer-approximation constraints.

(Only get outer-approximations of nonlinear constraints of the problem.)

Returns:
Distance between feasibility set and x
Parameters:
n number of element in arrays x and ind
ind indices of the coordinate

double Bonmin::OsiTMINLPInterface::solveFeasibilityProblem ( int  n,
const double *  x_bar,
const int *  ind,
double  a,
double  s,
int  L 
)

Given a point x_bar this solves the problem of finding the point which minimize a convex combination between the distance to x_bar and the original objective function f(x): $ min a * (\sum\limits_{i=1}^n ||x_{ind[i]} -\overline{x}_i)||_L) + (1 - a)* s *f(x) $.

Returns:
Distance between feasibility set a x_bar on components in ind
Parameters:
n number of elements in array x_bar and ind
s scaling of the original objective.
a Combination to take between feasibility and original objective (must be between 0 and 1).
L L-norm to use (can be either 1 or 2).

void Bonmin::OsiTMINLPInterface::setOaMessageHandler ( const CoinMessageHandler handler  )  [inline]

OA Messages types.

Definition at line 935 of file BonOsiTMINLPInterface.hpp.

References oaHandler_.

virtual ApplyCutsReturnCode Bonmin::OsiTMINLPInterface::applyCuts ( const OsiCuts cs,
double  effectivenessLb = 0.0 
) [inline, virtual]

Apply a collection of cuts.

Reimplemented from OsiSolverInterface.

Definition at line 944 of file BonOsiTMINLPInterface.hpp.

References freeCachedRowRim(), and problem_.

virtual void Bonmin::OsiTMINLPInterface::applyRowCuts ( int  numberCuts,
const OsiRowCut cuts 
) [virtual]

Add a collection of linear cuts to problem formulation.

Reimplemented from OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::applyRowCuts ( int  numberCuts,
const OsiRowCut **  cuts 
) [inline, virtual]

Add a collection of linear cuts to the problem formulation.

Reimplemented from OsiSolverInterface.

Definition at line 956 of file BonOsiTMINLPInterface.hpp.

References freeCachedRowRim(), and problem_.

double Bonmin::OsiTMINLPInterface::getConstraintsViolation ( const double *  x,
double &  obj 
)

Get infinity norm of constraint violation for x.

Put into obj the objective value of x.

double Bonmin::OsiTMINLPInterface::getNonLinearitiesViolation ( const double *  x,
const double  obj 
)

Get infinity norm of constraint violation for x and error in objective value where obj is the estimated objective value of x.

void Bonmin::OsiTMINLPInterface::extractInterfaceParams (  ) 

virtual void Bonmin::OsiTMINLPInterface::setAppDefaultOptions ( Ipopt::SmartPtr< Ipopt::OptionsList Options  )  [virtual]

To set some application specific defaults.

Reimplemented in Bonmin::CouenneInterface, and Bonmin::AmplInterface.

static void Bonmin::OsiTMINLPInterface::registerOptions ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions  )  [static]

Register all possible options to Bonmin.

Ipopt::SmartPtr<Bonmin::RegisteredOptions> Bonmin::OsiTMINLPInterface::regOptions (  )  [inline]

Definition at line 982 of file BonOsiTMINLPInterface.hpp.

References app_, and Ipopt::IsValid().

void Bonmin::OsiTMINLPInterface::SetStrongBrachingSolver ( Ipopt::SmartPtr< StrongBranchingSolver strong_branching_solver  ) 

Set the strong branching solver.

virtual void Bonmin::OsiTMINLPInterface::markHotStart (  )  [virtual]

Create a hot start snapshot of the optimization process.

In our case, we initialize the StrongBrachingSolver.

Reimplemented from OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::solveFromHotStart (  )  [virtual]

Optimize starting from the hot start snapshot.

In our case, we call the StrongBranchingSolver to give us an approximate solution for the current state of the bounds

Reimplemented from OsiSolverInterface.

virtual void Bonmin::OsiTMINLPInterface::unmarkHotStart (  )  [virtual]

Delete the hot start snapshot.

In our case we deactivate the StrongBrachingSolver.

Reimplemented from OsiSolverInterface.

int Bonmin::OsiTMINLPInterface::initializeJacobianArrays (  )  [protected]

Initialize data structures for storing the jacobian.

virtual std::string Bonmin::OsiTMINLPInterface::appName (  )  [inline, protected, virtual]

Definition at line 1016 of file BonOsiTMINLPInterface.hpp.

void Bonmin::OsiTMINLPInterface::solveAndCheckErrors ( bool  doResolve,
bool  throwOnFailure,
const char *  whereFrom 
) [protected]

Call Ipopt to solve or resolve the problem and check for errors.

virtual void Bonmin::OsiTMINLPInterface::applyRowCut ( const OsiRowCut rc  )  [inline, protected, virtual]

Add a linear cut to the problem formulation.

Implements OsiSolverInterface.

Definition at line 1031 of file BonOsiTMINLPInterface.hpp.

References problem_.

virtual void Bonmin::OsiTMINLPInterface::applyColCut ( const OsiColCut cc  )  [inline, protected, virtual]

We have to keep this but it will throw an error.

Implements OsiSolverInterface.

Definition at line 1038 of file BonOsiTMINLPInterface.hpp.

void Bonmin::OsiTMINLPInterface::freeCachedColRim (  )  [protected]

Free cached data relative to variables.

void Bonmin::OsiTMINLPInterface::freeCachedRowRim (  )  [protected]

Free cached data relative to constraints.

Referenced by applyCuts(), applyRowCuts(), and deleteRows().

void Bonmin::OsiTMINLPInterface::freeCachedData (  )  [protected]

Free all cached data.

void Bonmin::OsiTMINLPInterface::extractSenseRhsAndRange (  )  const [protected]

Extract rowsense_ vector rhs_ vector and rowrange_ vector from the lower and upper bounds on the constraints.

void Bonmin::OsiTMINLPInterface::createApplication ( Ipopt::SmartPtr< Bonmin::RegisteredOptions roptions,
Ipopt::SmartPtr< Ipopt::OptionsList options,
Ipopt::SmartPtr< Ipopt::Journalist journalist 
) [protected]

Facilitator to create an application.

bool Bonmin::OsiTMINLPInterface::internal_setWarmStart ( const CoinWarmStart ws  )  [protected]

Internal set warm start.

CoinWarmStart* Bonmin::OsiTMINLPInterface::internal_getWarmStart (  )  const [protected]

internal get warm start.


Friends And Related Function Documentation

friend class BonminParam [friend]

Definition at line 48 of file BonOsiTMINLPInterface.hpp.


Member Data Documentation

Ipopt::SmartPtr<TMINLP> Bonmin::OsiTMINLPInterface::tminlp_ [protected]

TMINLP model.

Definition at line 1052 of file BonOsiTMINLPInterface.hpp.

Referenced by getBranchingDirections(), getDownPsCosts(), getPriorities(), getUpPsCosts(), and model().

Ipopt::SmartPtr<TMINLP2TNLP> Bonmin::OsiTMINLPInterface::problem_ [protected]

Adapter for a MINLP to a NLP.

Definition at line 1054 of file BonOsiTMINLPInterface.hpp.

Referenced by applyCuts(), applyRowCut(), applyRowCuts(), deleteRows(), forceBranchable(), forceInfeasible(), problem(), and use().

Ipopt::SmartPtr<TNLPSolver> Bonmin::OsiTMINLPInterface::app_ [protected]

Solver for a TMINLP.

Definition at line 1056 of file BonOsiTMINLPInterface.hpp.

Referenced by extractLinearRelaxation(), newUnsolvedError(), regOptions(), solver(), turnOffSolverOutput(), and turnOnSolverOutput().

CoinWarmStart* Bonmin::OsiTMINLPInterface::warmstart_ [protected]

Warmstart information for reoptimization.

Definition at line 1060 of file BonOsiTMINLPInterface.hpp.

char* Bonmin::OsiTMINLPInterface::rowsense_ [mutable, protected]

Pointer to dense vector of row sense indicators.

Definition at line 1074 of file BonOsiTMINLPInterface.hpp.

double* Bonmin::OsiTMINLPInterface::rhs_ [mutable, protected]

Pointer to dense vector of row right-hand side values.

Definition at line 1077 of file BonOsiTMINLPInterface.hpp.

double* Bonmin::OsiTMINLPInterface::rowrange_ [mutable, protected]

Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows).

Definition at line 1080 of file BonOsiTMINLPInterface.hpp.

double* Bonmin::OsiTMINLPInterface::reducedCosts_ [mutable, protected]

Pointer to dense vector of reduced costs.

Warning:
Always 0. with Ipopt

Definition at line 1083 of file BonOsiTMINLPInterface.hpp.

double Bonmin::OsiTMINLPInterface::OsiDualObjectiveLimit_ [protected]

DualObjectiveLimit is used to store the cutoff in Cbc.

Definition at line 1085 of file BonOsiTMINLPInterface.hpp.

bool Bonmin::OsiTMINLPInterface::hasVarNamesFile_ [mutable, protected]

does the file variable names exists (will check automatically).

Definition at line 1087 of file BonOsiTMINLPInterface.hpp.

int Bonmin::OsiTMINLPInterface::nCallOptimizeTNLP_ [protected]

number of time NLP has been solved

Definition at line 1090 of file BonOsiTMINLPInterface.hpp.

Referenced by nCallOptimizeTNLP().

double Bonmin::OsiTMINLPInterface::totalNlpSolveTime_ [protected]

Total solution time of NLP.

Definition at line 1092 of file BonOsiTMINLPInterface.hpp.

Referenced by totalNlpSolveTime().

int Bonmin::OsiTMINLPInterface::totalIterations_ [protected]

toatal number of iterations

Definition at line 1094 of file BonOsiTMINLPInterface.hpp.

Referenced by totalIterations().

double Bonmin::OsiTMINLPInterface::maxRandomRadius_ [protected]

max radius for random point

Definition at line 1096 of file BonOsiTMINLPInterface.hpp.

int Bonmin::OsiTMINLPInterface::randomGenerationType_ [protected]

Method to pick a random starting point.

Definition at line 1098 of file BonOsiTMINLPInterface.hpp.

double Bonmin::OsiTMINLPInterface::max_perturbation_ [protected]

Maximum perturbation value.

Definition at line 1100 of file BonOsiTMINLPInterface.hpp.

double Bonmin::OsiTMINLPInterface::pushValue_ [protected]

Ipopt value for pushing initial point inside the bounds.

Definition at line 1102 of file BonOsiTMINLPInterface.hpp.

Referenced by getPushFact().

int Bonmin::OsiTMINLPInterface::numRetryInitial_ [protected]

Number of times problem will be resolved in initialSolve (root node).

Definition at line 1104 of file BonOsiTMINLPInterface.hpp.

int Bonmin::OsiTMINLPInterface::numRetryResolve_ [protected]

Number of times problem will be resolved in resolve.

Definition at line 1106 of file BonOsiTMINLPInterface.hpp.

int Bonmin::OsiTMINLPInterface::numRetryInfeasibles_ [protected]

Number of times infeasible problem will be resolved.

Definition at line 1108 of file BonOsiTMINLPInterface.hpp.

int Bonmin::OsiTMINLPInterface::numRetryUnsolved_ [protected]

Number of times problem will be resolved in case of a failure.

Definition at line 1110 of file BonOsiTMINLPInterface.hpp.

Messages Bonmin::OsiTMINLPInterface::messages_ [protected]

Messages specific to an OsiTMINLPInterface.

Reimplemented from OsiSolverInterface.

Definition at line 1112 of file BonOsiTMINLPInterface.hpp.

int Bonmin::OsiTMINLPInterface::pretendFailIsInfeasible_ [protected]

If not 0 when a problem is not solved (failed to be solved) will pretend that it is infeasible.

If == 1 will care (i.e. record the fact issue messages to user), if ==2 don't care (somebody else will)

Definition at line 1116 of file BonOsiTMINLPInterface.hpp.

Referenced by ignoreFailures().

bool Bonmin::OsiTMINLPInterface::hasContinuedAfterNlpFailure_ [protected]

did we ever continue optimization ignoring a failure.

Definition at line 1118 of file BonOsiTMINLPInterface.hpp.

Referenced by continuingOnAFailure(), and hasContinuedOnAFailure().

int Bonmin::OsiTMINLPInterface::numIterationSuspect_ [protected]

number iterations above which a problem is considered suspect (-1 is considered $+ \infty $).

If in a call to solve a problem takes more than that number of iterations it will be outputed to files.

Definition at line 1121 of file BonOsiTMINLPInterface.hpp.

Referenced by setNumIterationSuspect().

bool Bonmin::OsiTMINLPInterface::hasBeenOptimized_ [protected]

Has problem been optimized since last change (include setColSolution).

If yes getColSolution will return Ipopt point, otherwise will return initial point.

Definition at line 1125 of file BonOsiTMINLPInterface.hpp.

double* Bonmin::OsiTMINLPInterface::obj_ [mutable, protected]

A fake objective function (all variables to 1) to please Cbc pseudo costs initialization.

AW: I changed this, it will now be the objective gradient at current point.

Definition at line 1129 of file BonOsiTMINLPInterface.hpp.

bool Bonmin::OsiTMINLPInterface::hasPrintedOptions [static, protected]

flag to say wether options have been printed or not.

Definition at line 1131 of file BonOsiTMINLPInterface.hpp.

Ipopt::SmartPtr<TNLP2FPNLP> Bonmin::OsiTMINLPInterface::feasibilityProblem_ [protected]

Adapter for TNLP to a feasibility problem.

Definition at line 1134 of file BonOsiTMINLPInterface.hpp.

int* Bonmin::OsiTMINLPInterface::jRow_ [protected]

Row indices.

Definition at line 1140 of file BonOsiTMINLPInterface.hpp.

int* Bonmin::OsiTMINLPInterface::jCol_ [protected]

Column indices.

Definition at line 1142 of file BonOsiTMINLPInterface.hpp.

double* Bonmin::OsiTMINLPInterface::jValues_ [protected]

Values.

Definition at line 1144 of file BonOsiTMINLPInterface.hpp.

int Bonmin::OsiTMINLPInterface::nnz_jac [protected]

Number of elements.

Definition at line 1146 of file BonOsiTMINLPInterface.hpp.

Ipopt::TNLP::LinearityType* Bonmin::OsiTMINLPInterface::constTypes_ [protected]

Store the types of the constraints (linear and nonlinear).

Definition at line 1150 of file BonOsiTMINLPInterface.hpp.

int Bonmin::OsiTMINLPInterface::nNonLinear_ [protected]

Number of nonlinear constraint.

Definition at line 1153 of file BonOsiTMINLPInterface.hpp.

double Bonmin::OsiTMINLPInterface::tiny_ [protected]

Value for small non-zero element which we will try to remove cleanly in OA cuts.

Definition at line 1155 of file BonOsiTMINLPInterface.hpp.

double Bonmin::OsiTMINLPInterface::veryTiny_ [protected]

Value for small non-zero element which we will take the risk to ignore in OA cuts.

Definition at line 1157 of file BonOsiTMINLPInterface.hpp.

double Bonmin::OsiTMINLPInterface::infty_ [protected]

Value for infinity.

Definition at line 1159 of file BonOsiTMINLPInterface.hpp.

TNLPSolver::ReturnStatus Bonmin::OsiTMINLPInterface::optimizationStatus_ [protected]

status of last optimization.

Definition at line 1161 of file BonOsiTMINLPInterface.hpp.

bool Bonmin::OsiTMINLPInterface::exposeWarmStart_ [protected]

Flag indicating if the warm start methods actually do something.

Definition at line 1163 of file BonOsiTMINLPInterface.hpp.

Referenced by getExposeWarmStart(), and setExposeWarmStart().

bool Bonmin::OsiTMINLPInterface::firstSolve_ [protected]

Is it the first solve (for random starting point at root options).

Definition at line 1165 of file BonOsiTMINLPInterface.hpp.

SmartPtr<CutStrengthener> Bonmin::OsiTMINLPInterface::cutStrengthener_ [protected]

Object for strengthening cuts.

Definition at line 1167 of file BonOsiTMINLPInterface.hpp.

OaMessages Bonmin::OsiTMINLPInterface::oaMessages_ [protected]

OA Messages.

Definition at line 1173 of file BonOsiTMINLPInterface.hpp.

OaMessageHandler* Bonmin::OsiTMINLPInterface::oaHandler_ [protected]

OA Message handler.

Definition at line 1175 of file BonOsiTMINLPInterface.hpp.

Referenced by setOaMessageHandler().

SmartPtr<StrongBranchingSolver> Bonmin::OsiTMINLPInterface::strong_branching_solver_ [private]

solver to be used for all strong branching solves

Definition at line 1192 of file BonOsiTMINLPInterface.hpp.

TNLPSolver::ReturnStatus Bonmin::OsiTMINLPInterface::optimizationStatusBeforeHotStart_ [private]

status of last optimization before hot start was marked.

Definition at line 1194 of file BonOsiTMINLPInterface.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Jun 26 03:47:18 2008 for Bonmin by  doxygen 1.4.7