2 #ifndef __CBCFractionalScheduler_H__ 
    3 #define __CBCFractionalScheduler_H__ 
    9 #include "fractional_scheduler.h" 
   10 #include "cbc_model.h" 
   11 #include "../../../problems/scheduling/filtering.h" 
   28     unsigned int _loglevel;
 
   29     unsigned int _numthread;
 
   35     Model::OptimizationSense _optimization_sense;
 
   37     bool CreateVariables();
 
   39     bool CreateCoreConstraints();
 
   40     bool CreateUserConstraints();
 
   54     bool SetFractionalSchedule();
 
   55     bool CreateGoalFunction();
 
   56     vector<BlockIndexType> _index_in_bs;
 
   57     unsigned long _nb_prec; 
 
   62         const BlockIndexType& block_index, 
 
   63         const unsigned int& period, 
 
   64         const unsigned int& destination);
 
   67         const unsigned int& stock_index, 
 
   68         const unsigned int& period, 
 
   69         const unsigned int& destination);
 
   71     LinearExpr RealProcVar(
 
   72         const BlockIndexType& block_index, 
 
   73         const unsigned int& period, 
 
   74         const unsigned int& destination);
 
   76     BlockIndexType ProcVarId(
 
   77         const delphos::BlockIndexType& block_index, 
 
   78         const unsigned int& period, 
 
   79         const unsigned int& destination);
 
   81     BlockIndexType StockVarId(
 
   82         const unsigned int& stock_index, 
 
   83         const unsigned int& period, 
 
   84         const unsigned int& destination);
 
   86     static string ProcVarName(
 
   87         const BlockIndexType& block_index, 
 
   88         const unsigned int& period, 
 
   89         const unsigned int& destination);
 
   91     static string StockVarName(
 
   92         const unsigned long& stock_index, 
 
   93         const unsigned int& period, 
 
   94         const unsigned int& destination);       
 
  151     void WriteLP(
const string outfile);
 
  191     const double GetDual(
const string& cname); 
 
A constraint on the addition of the attributes of a block. 
Definition: constraint.h:264
A constraint limiting the period at which a block should be mined. 
Definition: filtering.h:62
void SetLogLevel(const unsigned int &level)
Set the nivel of log. 
Definition: cbc_fractional_scheduler.cpp:929
Defines a scheduling instance to be solved. 
Definition: instance.h:41
bool CreateModel()
Inits the solver and load the model in CBC. 
Definition: cbc_fractional_scheduler.cpp:215
A constraint that prevents certain blocks to be sent to given processes. 
Definition: filtering.h:107
void SetNumThread(const unsigned int &nthreads)
Set the number of threads used by CBC. 
Definition: cbc_fractional_scheduler.cpp:934
A constraint on the average values of attributes of blocks. 
Definition: constraint.h:426
CBCModel & GetMathematicalModel()
Returns the mathematical model. 
Definition: cbc_fractional_scheduler.cpp:54
Abstracts a CBC LP solver that can solve a scheduling instance. 
Definition: cbc_fractional_scheduler.h:20
void SetOptimizationSense(const Model::OptimizationSense &sense)
Set the sense of the optimization model. 
Definition: cbc_fractional_scheduler.cpp:967
void SetLogFile(const string &name)
Set the use of the log with given file name. 
Definition: cbc_fractional_scheduler.cpp:1226
A geometric constraint. 
Definition: constraint.h:632
const double GetDual(const string &cname)
Returns the dual value of given constraint. 
Definition: cbc_fractional_scheduler.cpp:299
A constraint that forces a block to be mined before or at some period. 
Definition: filtering.h:19
virtual bool Run()
Generates the model in CBC and optimize it. 
Definition: cbc_fractional_scheduler.cpp:181
Defines a fractional scheduling of blocks. 
Definition: fractional_schedule.h:22
double GetObjValue()
Returns the objective value of the optimized model. 
Definition: cbc_fractional_scheduler.cpp:270
CBCFractionalScheduler(delphos::SchedulingInstance &si)
Creates a CBC fractional scheduler with given scheduling instance. 
Definition: cbc_fractional_scheduler.cpp:42
void ComputeExpectedTime(const string column)
Computes the expected times. 
Definition: cbc_fractional_scheduler.cpp:1096
Defines the base class for all constraints. 
Definition: constraint.h:33
const delphos::FractionalSchedule & GetFractionalSchedule()
Returns the result fractional schedule. 
Definition: cbc_fractional_scheduler.cpp:1091
virtual ~CBCFractionalScheduler()
The destructor. 
Definition: cbc_fractional_scheduler.cpp:254
A precedence constraint. 
Definition: constraint.h:513
A block selection precedence constraint. 
Definition: constraint.h:572
Dummy class that define required methods for a solver of a scheduling instance. 
Definition: fractional_scheduler.h:14
void WriteLP(const string outfile)
Writes the LP model in given file. 
Definition: cbc_fractional_scheduler.cpp:289
const bool IsStock()
Return true only if the inner scheduling instance has stoks. 
Definition: cbc_fractional_scheduler.cpp:949
void AddSetting(const string &setting)
Adds a setting for the solve process. 
Definition: cbc_fractional_scheduler.cpp:312