1 #ifndef __AGGHEURISTICS_H__
2 #define __AGGHEURISTICS_H__
4 #include "../heuristics.h"
5 #include "../../../../data_structures/bm/functors.h"
6 #include "../../../../data_structures/precs/slopes.h"
34 string _agg_sched_name;
35 string _desagg_sched_name;
46 const unsigned int _nblevels;
50 vector<RelativeCoordinatesIndex>* _patterni;
52 bool RunAggregation();
53 bool RunDesAggregation();
55 unsigned int _numthread;
58 unsigned int _swh_window_size[2];
59 unsigned int _swh_sub_window_size[2];
60 unsigned int _swh_step[2];
80 ,
const string& agg_sched_name=Scheduler::GUROBI_SlidingTimeWindowHeuristic
81 ,
const string& desagg_sched_name=Scheduler::GUROBI_SlidingTimeWindowHeuristic
83 ,
const string& agg_sched_name=Scheduler::CBC_SlidingTimeWindowHeuristic
84 ,
const string& desagg_sched_name=Scheduler::CBC_SlidingTimeWindowHeuristic
86 ,
const double& rx=0.0,
const double& ry=0.0,
const double& rz=0.0);
111 void SetGap(
const float& gap);
120 void SetSTWHParam(
const unsigned int & window_size,
const unsigned int & sub_window_size,
const unsigned int & step,
const bool& backward=
true);
125 double GetObjective();
130 double GetAggregatedObjective();
136 void SetLastFixedPeriod(
const unsigned int& lastperiod);
146 void SetNumThread(
const unsigned int& nthread);
166 string _agg_sched_name;
167 string _desagg_sched_name;
168 unsigned int _swh_win_size;
171 unsigned int _nb_aggreg_sub_part;
172 vector<int> _period_unit;
181 bool RunAggregation();
182 bool RunDesAggregation();
197 ,
const string& agg_sched_name=Scheduler::GUROBI_SlidingTimeWindowHeuristic
198 ,
const string& desagg_sched_name=Scheduler::GUROBI_SlidingTimeWindowHeuristic
200 ,
const string& agg_sched_name=Scheduler::CBC_SlidingTimeWindowHeuristic
201 ,
const string& desagg_sched_name=Scheduler::CBC_SlidingTimeWindowHeuristic
203 ,
bool bUseMinTime=
false);
219 void SetGap(
const float& gap);
225 void SetSWHWindowSize(
const unsigned int& ws);
230 double GetObjective();
235 double GetAggregatedObjective();
Class that defines a twos phase Reblocking heuristic that solve a scheduling instance. First phase is a topological aggregation. The second phase is a topoligcal desaggregation that permit to obtain a feasible solution to original problem. This implementation of the heuristic is not working for a model that got multi fractional destination variables. If the scheduling instance has got the PCPSP flag on, an exception is thrown. This implementation of the heuristic is working only for a simple slope precedence. RampPrecedenceConstaint, sinking constraints, GeometricConstraint and BlockSelectionPrecedenceConstraint not implemented. Use of BlockSelection not null in all Constraints not implemented.
Definition: aggheuristics.h:29
Defines a scheduling instance to be solved.
Definition: instance.h:41
Vertical precedence class with utility methods for constant slope precedences.
Definition: slopes.h:62
Abstracts a container of blocks as a table with arbitrary number of attributes that can be accessed b...
Definition: blockmodel.h:62
Dummy class that define required methods for a heuristic that solve a scheduling instance.
Definition: heuristics.h:18
Implements a precedence as an explicit set of arcs between blocks. Provides utility functions...
Definition: precs.h:22
Defines a scheduling of blocks.
Definition: schedule.h:23