![]() |
MineLink
|
Abstracts a CBC MIP solver that can solve a scheduling instance. More...
#include <cbcmipscheduler.h>
Public Member Functions | |
bool | SetSchedule () |
Set The result schedule This method put the result from the CBC optimization into a schedule. | |
CBCMIPScheduler (delphos::SchedulingInstance &si) | |
Creates a CBC MIP scheduler with given scheduling instance. More... | |
virtual | ~CBCMIPScheduler () |
The destructor. | |
virtual bool | Run () |
Generates the model in CBC and optimize it. More... | |
const delphos::Schedule & | GetSchedule () |
Returns the result schedule. | |
bool | CreateModel () |
Inits the solver and load the model in CBC. More... | |
bool | CreateVariables () |
Creates the variables of the model. | |
bool | CreateUserConstraints () |
Creates the user constraints. | |
void | WriteLP (const string outfile) |
Writes the LP model in given file. More... | |
void | WriteSol (const string outfile) |
Writes the solution in given file. More... | |
CBCModel & | GetMathematicalModel () |
Returns the mathematical model. | |
double | GetObjValue () |
Returns the objective value of the optimized model. | |
void | AddSetting (const string &setting) |
Adds a setting for the solve process. More... | |
const double | GetDual (const string &cname) |
Returns the dual value of given constraint. More... | |
void | SetLogLevel (const unsigned int &level) |
Set the nivel of log. More... | |
double | GetMIPGap () |
Returns the relative integer gap. | |
![]() | |
MIPScheduler (delphos::SchedulingInstance &si) | |
Creates a MIP scheduler with given scheduling instance. More... | |
virtual | ~MIPScheduler () |
The destructor. | |
virtual void | Optimize () |
Optimizes the model. More... | |
void | SetOptimizationSense (const Model::OptimizationSense &sense) |
Sets the sense of the optimization model. More... | |
void | SetLogFile (const string &name) |
Sets the use of the log with given file name. More... | |
void | SetGap (const float &gap) |
Sets the desired gap for the optimization. More... | |
void | SetTimeLimit (const float &value) |
Sets a time limit for the optimization. More... | |
void | SetMIPEmphasis (const Model::Emphasis &emphasis) |
Sets the MIP emphasis for the optimization. More... | |
void | SetNoOutput () |
Sets that no output is desired meanwhile optimization. | |
const bool | CreatedVars () const |
Returns true only if all the variables of the MIP are created. | |
const bool | Optimized () |
Returns true only if the MIP have been succesfully optimized. | |
void | SetNumThread (const unsigned int &nthreads) |
Sets the number of threads used by the solver. More... | |
![]() | |
Scheduler (delphos::SchedulingInstance &si) | |
Creates a new scheduler. More... | |
virtual | ~Scheduler () |
The destructor. | |
delphos::SchedulingInstance & | GetInstance () |
Returns the associated scheduling instance. | |
const bool | IsStock () |
Returns true only if the inner scheduling instance has stoks. | |
![]() | |
BlockModelEntity (delphos::BlockModel &bm) | |
Creates a new block instance associated to a given block model. More... | |
delphos::BlockModel & | GetBlockModel () |
Retrieves the block model to which the entity is associated. More... | |
const delphos::BlockModel & | GetBlockModel () const |
Retrieves the block model to which the entity is associated. More... | |
Additional Inherited Members | |
![]() | |
static const string | CBC_MIPScheduler =string("CBC_MIPScheduler") |
Name of the CBC MIP scheduler. | |
static const string | CBC_SlidingTimeWindowHeuristic =string("CBC_SlidingTimeWindowHeuristic") |
Name of the CBC implemtation of the sliding time window heuristic. | |
static const string | GUROBI_MIPScheduler =string("GUROBI_MIPScheduler") |
Name of the gurobi MIP scheduler. | |
static const string | GUROBI_SlidingTimeWindowHeuristic =string("GUROBI_SlidingTimeWindowHeuristic") |
Name of the gurobi implemtation of the sliding time window heuristic. | |
Abstracts a CBC MIP solver that can solve a scheduling instance.
delphos::CBCMIPScheduler::CBCMIPScheduler | ( | delphos::SchedulingInstance & | si | ) |
Creates a CBC MIP scheduler with given scheduling instance.
si | The scheduling instance of the CBC MIP scheduler. |
void delphos::CBCMIPScheduler::AddSetting | ( | const string & | setting | ) |
Adds a setting for the solve process.
setting | The setting to be added. |
|
virtual |
Inits the solver and load the model in CBC.
Return true if the model has been successfully loaded in CBC.
Reimplemented from delphos::MIPScheduler.
|
virtual |
Returns the dual value of given constraint.
cname | The name of the constraint of which the dual value is returned. |
the cname of constraint of original name name can be name_lower and name_upper that corresponds to lower bound constraint and upper bound constraint.
Reimplemented from delphos::MIPScheduler.
|
virtual |
Generates the model in CBC and optimize it.
Return true only if the model has been successfully optimized.
Reimplemented from delphos::MIPScheduler.
void delphos::CBCMIPScheduler::SetLogLevel | ( | const unsigned int & | level | ) |
Set the nivel of log.
level | The nivel of log to be set. |
|
virtual |
Writes the LP model in given file.
outfile | The name of the outfile in which the model is writen in LP format. Return true only if the model has been successfully writen in the LP format in given file. This method can only be used after the method InitSolver. |
Reimplemented from delphos::MIPScheduler.
|
virtual |
Writes the solution in given file.
outfile | The name of the outfile in which the solution of the model is writen. Return true only if the solution of the model has been successfully writen in given file. This method can only be used after the method RunSolver. |
Reimplemented from delphos::MIPScheduler.