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

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

#include <cbc_fractional_scheduler.h>

Inheritance diagram for delphos::CBCFractionalScheduler:
Inheritance graph
Collaboration diagram for delphos::CBCFractionalScheduler:
Collaboration graph

Public Member Functions

 CBCFractionalScheduler (delphos::SchedulingInstance &si)
 Creates a CBC fractional scheduler with given scheduling instance. More...
 
virtual ~CBCFractionalScheduler ()
 The destructor.
 
virtual bool Run ()
 Generates the model in CBC and optimize it. More...
 
const bool IsStock ()
 Return true only if the inner scheduling instance has stoks.
 
bool CreateModel ()
 Inits the solver and load the model in CBC. More...
 
void SetOptimizationSense (const Model::OptimizationSense &sense)
 Set the sense of the optimization model. More...
 
void WriteLP (const string outfile)
 Writes the LP model 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...
 
void SetLogLevel (const unsigned int &level)
 Set the nivel of log. More...
 
void SetNumThread (const unsigned int &nthreads)
 Set the number of threads used by CBC. More...
 
const double GetDual (const string &cname)
 Returns the dual value of given constraint. More...
 
void ComputeExpectedTime (const string column)
 Computes the expected times. More...
 
const delphos::FractionalScheduleGetFractionalSchedule ()
 Returns the result fractional schedule.
 
void SetLogFile (const string &name)
 Set the use of the log with given file name. More...
 
- Public Member Functions inherited from delphos::FractionalScheduler
 FractionalScheduler (delphos::SchedulingInstance &si)
 Creates a new scheduler. More...
 
virtual ~FractionalScheduler ()
 The destructor.
 
delphos::SchedulingInstanceGetInstance ()
 Returns the associated scheduling instance.
 
virtual const bool Optimized ()
 Returns true only if the scheduler has run succesfully.
 
void SetLPMethod (const int &lpcode)
 Set LP method. More...
 
- 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...
 

Detailed Description

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

Constructor & Destructor Documentation

delphos::CBCFractionalScheduler::CBCFractionalScheduler ( delphos::SchedulingInstance si)

Creates a CBC fractional scheduler with given scheduling instance.

Parameters
siThe scheduling instance of the CBC LP scheduler.

Member Function Documentation

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

Adds a setting for the solve process.

Parameters
settingThe setting to be added.
void delphos::CBCFractionalScheduler::ComputeExpectedTime ( const string  column)
virtual

Computes the expected times.

Parameters
columnThe column name in which the expected times are saved.

Reimplemented from delphos::FractionalScheduler.

bool delphos::CBCFractionalScheduler::CreateModel ( )

Inits the solver and load the model in CBC.

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

const double delphos::CBCFractionalScheduler::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::FractionalScheduler.

bool delphos::CBCFractionalScheduler::Run ( )
virtual

Generates the model in CBC and optimize it.

Return true only if the model has been successfully optimized.

Reimplemented from delphos::FractionalScheduler.

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

Set the use of the log with given file name.

Parameters
nameThe name of the log file.

Reimplemented from delphos::FractionalScheduler.

void delphos::CBCFractionalScheduler::SetLogLevel ( const unsigned int &  level)

Set the nivel of log.

Parameters
levelThe nivel of log to be set.
void delphos::CBCFractionalScheduler::SetNumThread ( const unsigned int &  nthreads)

Set the number of threads used by CBC.

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

Set 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::CBCFractionalScheduler::WriteLP ( const string  outfile)

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.

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