2 #ifndef __GUROBIMIPSCHEDULER_H__ 
    3 #define __GUROBIMIPSCHEDULER_H__ 
   11 #include "mip_scheduler.h" 
   12 #include "gurobi_model.h" 
   13 #include "../../../problems/scheduling/filtering.h" 
   26     bool CreateGoalFunction();
 
   27     bool CreateCoreConstraints();
 
   41     BlockIndexType* _index_in_bs;
 
   42     bool _buser_constraintscreated;
 
   44     BlockIndexType ProcVarId(
 
   45     const BlockIndexType & block_index, 
 
   46     const unsigned int & period, 
 
   47     const unsigned int & destination);
 
   50         const BlockIndexType& block_index, 
 
   51         const unsigned int& period, 
 
   52         const unsigned int& destination);
 
   54     unsigned long _nb_prec; 
 
   56     inline void unsigned_to_decimal( 
unsigned long number, 
char* buffer )
 
   64             char* p_first = buffer;
 
   67                 *buffer++ = 
'0' + number % 10;
 
   70             reverse( p_first, buffer );
 
   85         const unsigned int& stock_index, 
 
   86         const unsigned int& period, 
 
   87         const unsigned int& destination);
 
   89     LinearExpr RealProcVar(
 
   90         const BlockIndexType& block_index, 
 
   91         const unsigned int& period, 
 
   92         const unsigned int& destination);
 
  153     void WriteLP(
const string outfile);
 
  162     void WriteSol(
const string outfile);
 
  182     const double GetDual(
const string& cname); 
 
bool CreateUserConstraints()
Creates the user constraints of the model. 
Definition: gurobimipscheduler.cpp:399
bool SetSchedule()
Set The result schedule This method put the result from the gurobi optimization into a schedule...
Definition: gurobimipscheduler.cpp:1441
virtual ~GurobiMIPScheduler()
The destructor. 
Definition: gurobimipscheduler.cpp:33
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
bool CreateVariables()
Creates the variables of the model. 
Definition: gurobimipscheduler.cpp:77
bool CreateModel()
Inits the solver and load the model in gurobi. 
Definition: gurobimipscheduler.cpp:449
const delphos::Schedule & GetSchedule()
Returns the result schedule. 
Definition: gurobimipscheduler.cpp:1584
Defines a scheduling instance to be solved. 
Definition: instance.h:41
A constraint that prevents certain blocks to be sent to given processes. 
Definition: filtering.h:107
virtual void Optimize()
Optimizes the model. 
Definition: mip_scheduler.cpp:61
void WriteLP(const string outfile)
Writes the LP model in given file. 
Definition: gurobimipscheduler.cpp:1539
A constraint on the average values of attributes of blocks. 
Definition: constraint.h:426
const double GetDual(const string &cname)
Returns the dual value of given constraint. 
Definition: gurobimipscheduler.cpp:1554
GurobiMIPScheduler(delphos::SchedulingInstance &si)
Creates a gurobi MIP scheduler with given scheduling instance. 
Definition: gurobimipscheduler.cpp:18
A geometric constraint. 
Definition: constraint.h:632
A constraint that forces a block to be mined before or at some period. 
Definition: filtering.h:19
void WriteSol(const string outfile)
Writes the solution in given file. 
Definition: gurobimipscheduler.cpp:1546
double GetObjValue()
Returns the objective value of the optimized model. 
Definition: gurobimipscheduler.cpp:523
Abstracts a Gurobi MIP solver that can solve a scheduling instance. 
Definition: gurobimipscheduler.h:22
Dummy class that define required methods for a MIP solver of a scheduling instance. 
Definition: mip_scheduler.h:24
GurobiModel & GetMathematicalModel()
Return the mathematical model. 
Definition: gurobimipscheduler.cpp:518
A precedence constraint. 
Definition: constraint.h:513
A block selection precedence constraint. 
Definition: constraint.h:572
Defines a scheduling of blocks. 
Definition: schedule.h:23
virtual bool Run()
Generates the model in Gurobi and optimize it. 
Definition: gurobimipscheduler.cpp:411
double GetMIPGap()
Returns the relative integer gap. 
Definition: gurobimipscheduler.cpp:1589