My Project
KnitroSolver Class Reference

the KnitroSolver class solves problems using Knitro. More...

#include <OSKnitroSolver.h>

Inheritance diagram for KnitroSolver:
DefaultSolver

Public Member Functions

 KnitroSolver ()
 the KnitroSolver class constructor
 
 ~KnitroSolver ()
 the KnitroSolver class constructor
 
virtual void buildSolverInstance ()
 buildSolverInstance is a virtual function – the actual solvers will implement their own buildSolverInstance method – the solver instance is the instance the individual solver sees in its API
 
virtual void setSolverOptions ()
 The implementation of the virtual functions.
 
virtual void solve ()
 solve results in an instance being read into the Knitro data structrues and optimized
 
void dataEchoCheck ()
 use this for debugging, print out the instance that the solver thinks it has and compare this with the OSiL file
 
- Public Member Functions inherited from DefaultSolver
 DefaultSolver ()
 default constructor.
 
virtual ~DefaultSolver ()=0
 default destructor.
 

Private Attributes

OSrLWriterosrlwriter
 

Methods to block default compiler methods.

The compiler automatically generates the following three methods.

Since the default compiler implementation is generally not what you want (for all but the most simple classes), we usually put the declarations of these methods in the private section and never implement them. This prevents the compiler from implementing an incorrect "default" behavior without us knowing. (See Scott Meyers book, "Effective C++")

std::string knitroErrorMsg
 
 KnitroSolver (const KnitroSolver &)
 
KnitroSolveroperator= (const KnitroSolver &)
 

Additional Inherited Members

- Public Attributes inherited from DefaultSolver
std::string osil
 osil holds the problem instance as a std::string
 
std::string osol
 osol holds the options for the solver
 
std::string osrl
 osrl holds the solution or result of the model
 
OSInstanceosinstance
 osinstance holds the problem instance in-memory as an OSInstance object
 
OSOptionosoption
 osoption holds the solver options in-memory as an OSOption object
 
OSResultosresult
 osresult holds the solution or result of the model in-memory as an OSResult object
 
std::string sSolverName
 sSolverName is the name of the Coin solver used, e.g.
 
bool bCallbuildSolverInstance
 bCallbuildSolverInstance is set to true if buildSolverService has been called
 
bool bSetSolverOptions
 bSetSolverOptions is set to true if setSolverOptions has been called, false otherwise
 

Detailed Description

the KnitroSolver class solves problems using Knitro.

Author
Robert Fourer, Jun Ma, Kipp Martin
Version
1.0, 03/14/2004
Since
OS 1.0
Remarks
this class takes an OSiL instance and optimizes it using the Knitro solver

Definition at line 144 of file OSKnitroSolver.h.

Constructor & Destructor Documentation

◆ KnitroSolver() [1/2]

KnitroSolver::KnitroSolver ( )

the KnitroSolver class constructor

Definition at line 571 of file OSKnitroSolver.cpp.

◆ ~KnitroSolver()

KnitroSolver::~KnitroSolver ( )

the KnitroSolver class constructor

Definition at line 615 of file OSKnitroSolver.cpp.

◆ KnitroSolver() [2/2]

KnitroSolver::KnitroSolver ( const KnitroSolver & )
private

Member Function Documentation

◆ buildSolverInstance()

void KnitroSolver::buildSolverInstance ( )
virtual

buildSolverInstance is a virtual function – the actual solvers will implement their own buildSolverInstance method – the solver instance is the instance the individual solver sees in its API

Implements DefaultSolver.

Definition at line 580 of file OSKnitroSolver.cpp.

◆ setSolverOptions()

virtual void KnitroSolver::setSolverOptions ( )
virtual

The implementation of the virtual functions.

Returns
void.

Implements DefaultSolver.

◆ solve()

void KnitroSolver::solve ( )
virtual

solve results in an instance being read into the Knitro data structrues and optimized

Implements DefaultSolver.

Definition at line 631 of file OSKnitroSolver.cpp.

◆ dataEchoCheck()

void KnitroSolver::dataEchoCheck ( )

use this for debugging, print out the instance that the solver thinks it has and compare this with the OSiL file

Definition at line 876 of file OSKnitroSolver.cpp.

◆ operator=()

KnitroSolver & KnitroSolver::operator= ( const KnitroSolver & )
private

Member Data Documentation

◆ osrlwriter

OSrLWriter* KnitroSolver::osrlwriter
private

Definition at line 180 of file OSKnitroSolver.h.

◆ knitroErrorMsg

std::string KnitroSolver::knitroErrorMsg
private

Definition at line 197 of file OSKnitroSolver.h.


The documentation for this class was generated from the following files: