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

Dummy class that define required methods for a MIP solver of a scheduling instance. More...

#include <mip_scheduler.h>

Inheritance diagram for delphos::MIPScheduler:
Inheritance graph
Collaboration diagram for delphos::MIPScheduler:
Collaboration graph

Public Member Functions

 MIPScheduler (delphos::SchedulingInstance &si)
 Creates a MIP scheduler with given scheduling instance. More...
 
virtual ~MIPScheduler ()
 The destructor.
 
virtual bool Run ()
 Creates the model and run the optimization. More...
 
virtual void Optimize ()
 Optimizes the model. More...
 
virtual bool CreateModel ()
 Creates the model. More...
 
virtual bool CreateVariables ()
 Creates the variables. More...
 
virtual void WriteLP (const string outfile)
 Writes the LP model in given file. More...
 
virtual void WriteSol (const string outfile)
 Writes the solution in given file. More...
 
virtual const delphos::ScheduleGetSchedule ()
 Returns the result schedule.
 
virtual bool SetSchedule ()
 Set The result schedule This implementation is a dummy version that always returns false.
 
virtual double GetObjValue ()
 Returns the objective value of the optimized model. This implementation is a dummy version that always returns 0.
 
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.
 
virtual const double GetDual (const string &cname)
 Returns the dual value of given constraint. More...
 
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

Dummy class that define required methods for a MIP solver of a scheduling instance.

This class defines the required methods to be implemented by a class that is able to solve a scheduling instance that define a model with integer variables.

Constructor & Destructor Documentation

delphos::MIPScheduler::MIPScheduler ( delphos::SchedulingInstance si)

Creates a MIP scheduler with given scheduling instance.

Parameters
siThe scheduling instance of the MIP scheduler.

Member Function Documentation

bool delphos::MIPScheduler::CreateModel ( )
virtual

Creates the model.

This implementation is a dummy version that always returns false.

Reimplemented in delphos::GurobiMIPScheduler, and delphos::CBCMIPScheduler.

bool delphos::MIPScheduler::CreateVariables ( )
virtual

Creates the variables.

This implementation is a dummy version that always returns false.

Reimplemented in delphos::GurobiMIPScheduler, and delphos::CBCMIPScheduler.

const double delphos::MIPScheduler::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. This implementation is a dummy version that always returns 0.

Reimplemented in delphos::GurobiMIPScheduler, and delphos::CBCMIPScheduler.

void delphos::MIPScheduler::Optimize ( )
virtual

Optimizes the model.

This implementation is a dummy version that always throw an exception.

bool delphos::MIPScheduler::Run ( )
virtual

Creates the model and run the optimization.

This implementation is a dummy version that always throw an exception.

Reimplemented from delphos::Scheduler.

Reimplemented in delphos::GurobiMIPScheduler, and delphos::CBCMIPScheduler.

void delphos::MIPScheduler::SetGap ( const float &  gap)
virtual

Sets the desired gap for the optimization.

Parameters
gapThe desired gap. For a desired gap of 0.01, this corresponds to 1% of relative integer gap. By Default, a value of 0.05 is set.

Reimplemented from delphos::Scheduler.

void delphos::MIPScheduler::SetLogFile ( const string &  name)
virtual

Sets the use of the log with given file name.

Parameters
nameThe name of the log file.

Reimplemented from delphos::Scheduler.

void delphos::MIPScheduler::SetMIPEmphasis ( const Model::Emphasis &  emphasis)

Sets the MIP emphasis for the optimization.

Parameters
emphasisThe emphasis of the optimization. The emphasis can be Model::Emphasis::FEASABILITY, Model::Emphasis::OPTIMALITY or Model::Emphasis::BALANCED.
void delphos::MIPScheduler::SetNumThread ( const unsigned int &  nthreads)

Sets the number of threads used by the solver.

Parameters
nthreadsThe number of threads to be used by the solver.
void delphos::MIPScheduler::SetOptimizationSense ( const Model::OptimizationSense &  sense)

Sets the sense of the optimization model.

Parameters
senseThe sense of the optimization. The sense can be Model::OptimizationSense::MINIMIZATION or Model::OptimizationSense::MAXIMIZATION.
void delphos::MIPScheduler::SetTimeLimit ( const float &  value)

Sets a time limit for the optimization.

Parameters
valueThe desired time limit for the optimization. By Default, there is no time limit.
void delphos::MIPScheduler::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. This implementation is a dummy version that do nothing.

Reimplemented in delphos::GurobiMIPScheduler, and delphos::CBCMIPScheduler.

void delphos::MIPScheduler::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. This implementation is a dummy version that do nothing.

Reimplemented in delphos::GurobiMIPScheduler, and delphos::CBCMIPScheduler.


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