1 #ifndef __ETHEURISTICS_H__
2 #define __ETHEURISTICS_H__
4 #include "../heuristics.h"
6 #include "../../fractional_scheduler/bz/gurobi_bz.h"
7 #include "gurobi_model.h"
10 #include "../../fractional_scheduler/bz/cbc_bz.h"
11 #include "cbc_model.h"
46 vector<double> _exptime;
72 BlockIndexType _nb_blk_with_exptime_in_horizon;
75 set<BlockIndexType> precedenceSet;
76 set<BlockIndexType> succSet;
77 BlockIndexType number;
82 set<unsigned int> index;
89 vector<Node>* CreateGraph();
90 BlockIndexType* TopoSort();
124 Model::OptimizationSense _optimization_sense;
125 Model::Emphasis _mip_emphasis;
142 ,
const string& sched_name=Scheduler::GUROBI_MIPScheduler);
144 ,
const string& sched_name=Scheduler::CBC_MIPScheduler);
157 void SetOptimizationSense(
const Model::OptimizationSense& sense);
163 void SetLogFile(
const string& name);
168 void SetGap(
const float& gap);
174 void SetMIPEmphasis(
const Model::Emphasis& emphasis);
184 class ETInc:
public RankedFractionalScheduleToSchedule {
186 Model::OptimizationSense _optimization_sense;
187 Model::Emphasis _mip_emphasis;
190 const unsigned int _windowsize;
192 const unsigned int _step;
211 ,
const vector<double>& exptime
212 ,
const unsigned int windowsize=1
213 ,
const float delta=0.5
214 ,
const unsigned int step=1
216 ,
const string& sched_name=Scheduler::GUROBI_MIPScheduler);
218 ,
const string& sched_name=Scheduler::CBC_MIPScheduler);
232 void SetOptimizationSense(
const Model::OptimizationSense& sense);
238 void SetLogFile(
const string& name);
243 void SetGap(
const float& gap);
249 void SetMIPEmphasis(
const Model::Emphasis& emphasis);
280 bool RunBZ(
unsigned int nbitermax=1000000);
285 void SetMipAsPitSolver();
291 double* GetRelaxedSol();
297 double* GetRelaxedDecisionSol();
303 vector<double> GetExpectedTime();
309 bool SetExpectedTime(
const string& column);
315 bool ExpectedTimeToTextFile(
const char * exptime_file)
const;
337 bool RunETInc(
const unsigned int& windowsize=1,
const float& delta=0.5,
const unsigned int& step=1
339 ,
const string& sched_name=Scheduler::GUROBI_MIPScheduler);
341 ,
const string& sched_name=Scheduler::CBC_MIPScheduler);
351 bool RunETDelta(
const float& delta=0.5
353 ,
const string& sched_name=Scheduler::GUROBI_MIPScheduler);
355 ,
const string& sched_name=Scheduler::CBC_MIPScheduler);
365 void SetHeurParameters(
const unsigned int& windowsize,
const float& delta,
const unsigned int& step);
371 bool CheckRelaxedSol();
379 bool RelaxedSolToTextFile(
const char * relsol_file,
const char* stocks_file=
"") ;
384 void SetGap(
const double & gap);
389 const double GetGap()
const;
395 void SetEmphasis(
const Model::Emphasis & emph);
400 const Model::Emphasis GetEmphasis()
const;
406 double GetRelaxedObj();
412 unsigned int GetNBIterationsBZ();
418 const map<string,double>& GetBZDuals();
431 bool _use_mip_as_pitsolver;
433 unsigned int _nb_iterations_bz;
436 vector<double> _exptime;
444 bool _TEIncParameterIsSet;
446 Model::Emphasis _emph;
448 Model::OptimizationSense _sense;
Dummy class that define required methods for a Bienstock Zuckerberg solver of a scheduling instance...
Definition: bz.h:14
Dummy class that define required methods for a fractional schedule to schedule heuristic that solve a...
Definition: etheuristics.h:29
Defines a scheduling instance to be solved.
Definition: instance.h:41
Dummy class that define required methods for a heuristic that solve a scheduling instance.
Definition: heuristics.h:18
A dummy class that specifies the methods of an algorithm that can solve a final pit instance...
Definition: fp.h:57
Dummy class that define required methods for a ranked fractional schedule to schedule heuristic that ...
Definition: etheuristics.h:44
Class that defines a modified Topological sort heuristic that solve a scheduling instance. Only PrecedenceConstraint and AttributeSumConstraint are supported. Use of BlockSelection not null in Constraints not implemented. An attempt of considering AttributeAvgConstraint is implemented.
Definition: etheuristics.h:68
Class that defines heuristics that use expected times for blocks, computed by Bienstock Zuckerberg al...
Definition: etheuristics.h:256