MineLink
 All Data Structures Functions Variables Pages
delphos::CBCMIPScheduler Class Reference

Abstracts a CBC MIP solver that can solve a scheduling instance. More...

#include <cbcmipscheduler.h>

Inheritance diagram for delphos::CBCMIPScheduler:
Inheritance graph
Collaboration diagram for delphos::CBCMIPScheduler:
Collaboration graph

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::ScheduleGetSchedule ()
 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.
 
- Public Member Functions inherited from delphos::MIPScheduler
 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...
 
- Public Member Functions inherited from delphos::Scheduler
 Scheduler (delphos::SchedulingInstance &si)
 Creates a new scheduler. More...
 
virtual ~Scheduler ()
 The destructor.
 
delphos::SchedulingInstanceGetInstance ()
 Returns the associated scheduling instance.
 
const bool IsStock ()
 Returns true only if the inner scheduling instance has stoks.
 
- Public Member Functions inherited from delphos::BlockModelEntity
 BlockModelEntity (delphos::BlockModel &bm)
 Creates a new block instance associated to a given block model. More...
 
delphos::BlockModelGetBlockModel ()
 Retrieves the block model to which the entity is associated. More...
 
const delphos::BlockModelGetBlockModel () const
 Retrieves the block model to which the entity is associated. More...
 

Additional Inherited Members

- Static Public Attributes inherited from delphos::Scheduler
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.
 

Detailed Description

Abstracts a CBC MIP solver that can solve a scheduling instance.

Constructor & Destructor Documentation

delphos::CBCMIPScheduler::CBCMIPScheduler ( delphos::SchedulingInstance si)

Creates a CBC MIP scheduler with given scheduling instance.

Parameters
siThe scheduling instance of the CBC MIP scheduler.

Member Function Documentation

void delphos::CBCMIPScheduler::AddSetting ( const string &  setting)

Adds a setting for the solve process.

Parameters
settingThe setting to be added.
bool delphos::CBCMIPScheduler::CreateModel ( )
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.

const double delphos::CBCMIPScheduler::GetDual ( const string &  cname)
virtual

Returns the dual value of given constraint.

Parameters
cnameThe 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.

bool delphos::CBCMIPScheduler::Run ( )
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.

Parameters
levelThe nivel of log to be set.
void delphos::CBCMIPScheduler::WriteLP ( const string  outfile)
virtual

Writes the LP model in given file.

Parameters
outfileThe 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.

void delphos::CBCMIPScheduler::WriteSol ( const string  outfile)
virtual

Writes the solution in given file.

Parameters
outfileThe 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.


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