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

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

#include <gurobimipscheduler.h>

Inheritance diagram for delphos::GurobiMIPScheduler:
Inheritance graph
Collaboration diagram for delphos::GurobiMIPScheduler:
Collaboration graph

Public Member Functions

bool SetSchedule ()
 Set The result schedule This method put the result from the gurobi optimization into a schedule.
 
 GurobiMIPScheduler (delphos::SchedulingInstance &si)
 Creates a gurobi MIP scheduler with given scheduling instance. More...
 
virtual ~GurobiMIPScheduler ()
 The destructor.
 
virtual bool Run ()
 Generates the model in Gurobi and optimize it. More...
 
const delphos::ScheduleGetSchedule ()
 Returns the result schedule.
 
bool CreateModel ()
 Inits the solver and load the model in gurobi. More...
 
bool CreateVariables ()
 Creates the variables of the model.
 
bool CreateUserConstraints ()
 Creates the user constraints of the model.
 
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...
 
GurobiModel & GetMathematicalModel ()
 Return the mathematical model.
 
double GetObjValue ()
 Returns the objective value of the optimized model.
 
const double GetDual (const string &cname)
 Returns the dual value of given constraint. 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 Gurobi MIP solver that can solve a scheduling instance.

Constructor & Destructor Documentation

delphos::GurobiMIPScheduler::GurobiMIPScheduler ( delphos::SchedulingInstance si)

Creates a gurobi MIP scheduler with given scheduling instance.

Parameters
siThe scheduling instance of the gurobi MIP scheduler.

Member Function Documentation

bool delphos::GurobiMIPScheduler::CreateModel ( )
virtual

Inits the solver and load the model in gurobi.

Return true if the model has been successfully loaded in gurobi.

Reimplemented from delphos::MIPScheduler.

const double delphos::GurobiMIPScheduler::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::GurobiMIPScheduler::Run ( )
virtual

Generates the model in Gurobi and optimize it.

Return true only if the model has been successfully optimized.

Reimplemented from delphos::MIPScheduler.

void delphos::GurobiMIPScheduler::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::GurobiMIPScheduler::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: