|  | MineLink
    | 
Class that defines heuristics that use expected times for blocks, computed by Bienstock Zuckerberg algorithm (BZ). More...
#include <etheuristics.h>


| Public Member Functions | |
| BZHeuristic (delphos::SchedulingInstance &si, delphos::FinalPitSolver *fps=NULL) | |
| Defines a BZ heuristic to solve given scheduling instance.  More... | |
| virtual | ~BZHeuristic () | 
| The destructor. | |
| virtual bool | Run () | 
| Run the BZ that defines expected times, then the ETInc heuristic. | |
| bool | RunBZ (unsigned int nbitermax=1000000) | 
| Run the Bienstock Zuckerberg algorithm. | |
| void | SetMipAsPitSolver () | 
| use MIP solver for flow model instead of flow algorithm in BZ. | |
| double * | GetRelaxedSol () | 
| Returns the relaxed sol encountered by the BZ. RunBZ() method have to be applied before using this method. | |
| double * | GetRelaxedDecisionSol () | 
| Returns the relaxed decision sol encountered by the BZ. RunBZ() method have to be applied before using this method. | |
| vector< double > | GetExpectedTime () | 
| Returns the expected times. RunBZ() method have to be applied before using this method. | |
| bool | SetExpectedTime (const string &column) | 
| Save expected times as a block model attribute with given name.  More... | |
| bool | ExpectedTimeToTextFile (const char *exptime_file) const | 
| Writes the expected times in given file.  More... | |
| bool | RunTopoHeur () | 
| Run the modified Topological sort heuristic. RunBZ() method have to be applied before using this method. | |
| void | SetHeurParameters (const unsigned int &windowsize, const float &delta, const unsigned int &step) | 
| Run the ETInc heuristic.  More... | |
| bool | CheckRelaxedSol () | 
| Check If the relaxed solution respect the constraints defined in the scheduling instance. RunBZ() method have to be applied before using this method. | |
| bool | RelaxedSolToTextFile (const char *relsol_file, const char *stocks_file="") | 
| Writes the relaxed solution in given text files.  More... | |
| void | SetGap (const double &gap) | 
| Set the desired relative integer gap used by solving sub problems of ETInc and ETDelta. | |
| const double | GetGap () const | 
| Returns the desired gap. | |
| void | SetEmphasis (const Model::Emphasis &emph) | 
| Set the desired emphasis used by solving sub problems of ETInc and ETDelta. The emphasis can be Model::Emphasis::FEASABILITY, Model::Emphasis::OPTIMALITY or Model::Emphasis::BALANCED. | |
| const Model::Emphasis | GetEmphasis () const | 
| Returns the desired emphasis. | |
| double | GetRelaxedObj () | 
| Returns the relaxed objective encountered by BZ. RunBZ() method have to be applied before using this method. | |
| unsigned int | GetNBIterationsBZ () | 
| Returns the number of iterations of BZ algorithm. RunBZ() method have to be applied before using this method. | |
| const map< string, double > & | GetBZDuals () | 
| Returns the dual value encountered by BZ for each constraint. RunBZ() method have to be applied before using this method. | |
| bool | IsFeasible () | 
| Returns true only if BZ run correctly. RunBZ() method have to be applied before using this method. | |
|  Public Member Functions inherited from delphos::SchedulingHeuristic | |
| SchedulingHeuristic (SchedulingInstance &si) | |
| Creates a heuristic with given scheduling instance.  More... | |
| virtual | ~SchedulingHeuristic () | 
| The destructor. | |
| const Schedule & | GetSchedule () | 
| Returns the result schedule. | |
| void | SetCallBack (delphos::CallBackPtr fp) | 
| Set a time advance user callback.  More... | |
| delphos::CallBackPtr | GetCallBack () | 
| Returns the call back if it exists. | |
| const bool | Optimized () | 
| Returns true only if the MIP have been succesfully optimized. | |
| void | SetLogFile (const string &name) | 
| Set the use of the log with given file name.  More... | |
|  Public Member Functions inherited from delphos::Scheduler | |
| Scheduler (delphos::SchedulingInstance &si) | |
| Creates a new scheduler.  More... | |
| virtual | ~Scheduler () | 
| The destructor. | |
| delphos::SchedulingInstance & | GetInstance () | 
| Returns the associated scheduling instance. | |
| virtual void | SetGap (const float &gap) | 
| Sets the desired gap for the optimization.  More... | |
| const bool | IsStock () | 
| Returns true only if the inner scheduling instance has stoks. | |
|  Public Member Functions inherited from delphos::BlockModelEntity | |
| BlockModelEntity (delphos::BlockModel &bm) | |
| Creates a new block instance associated to a given block model.  More... | |
| delphos::BlockModel & | GetBlockModel () | 
| Retrieves the block model to which the entity is associated.  More... | |
| const delphos::BlockModel & | GetBlockModel () const | 
| Retrieves the block model to which the entity is associated.  More... | |
| Additional Inherited Members | |
|  Static Public Attributes inherited from delphos::Scheduler | |
| static const string | CBC_MIPScheduler =string("CBC_MIPScheduler") | 
| Name of the CBC MIP scheduler. | |
| static const string | CBC_SlidingTimeWindowHeuristic =string("CBC_SlidingTimeWindowHeuristic") | 
| Name of the CBC implemtation of the sliding time window heuristic. | |
| static const string | GUROBI_MIPScheduler =string("GUROBI_MIPScheduler") | 
| Name of the gurobi MIP scheduler. | |
| static const string | GUROBI_SlidingTimeWindowHeuristic =string("GUROBI_SlidingTimeWindowHeuristic") | 
| Name of the gurobi implemtation of the sliding time window heuristic. | |
Class that defines heuristics that use expected times for blocks, computed by Bienstock Zuckerberg algorithm (BZ).
| delphos::BZHeuristic::BZHeuristic | ( | delphos::SchedulingInstance & | si, | 
| delphos::FinalPitSolver * | fps = NULL | ||
| ) | 
Defines a BZ heuristic to solve given scheduling instance.
| si | The sheduling instance that defines the problem to be solved. | 
| fps | The finalpit solver that will be used by the BZ algorithm. The implementation of the heuristics creates a schedule and not a fractional schedule. If the scheduling instance has got the PCPSP flag on, an exception is thrown. | 
| bool delphos::BZHeuristic::ExpectedTimeToTextFile | ( | const char * | exptime_file | ) | const | 
Writes the expected times in given file.
| exptime_file | The name of the file in which the expected times are written. | 
| bool delphos::BZHeuristic::RelaxedSolToTextFile | ( | const char * | relsol_file, | 
| const char * | stocks_file = "" | ||
| ) | 
Writes the relaxed solution in given text files.
| relsol_file | The file in which the relaxed solution for the blocks is written. | 
| stocks_file | The file in which the relaxed solution for the stocks is written. RunBZ() method have to be applied before using this method. | 
| bool delphos::BZHeuristic::SetExpectedTime | ( | const string & | column | ) | 
Save expected times as a block model attribute with given name.
| column | The column attribute name in which the expected times will be saved. | 
| void delphos::BZHeuristic::SetHeurParameters | ( | const unsigned int & | windowsize, | 
| const float & | delta, | ||
| const unsigned int & | step | ||
| ) | 
Run the ETInc heuristic.
| windowsize | The window size of the ETInc heuristic | 
| delta | The delta used to the expected time to select the blocks. | 
| step | The step of the ETInc. | 
| sched_name | The scheduler name to be used to solve the sub problems. RunBZ() method have to be applied before using this method. ETinc heuristic is a rolling time type heuristic. It uses esperate times to select which blocks will be selected to be scheduled for the current window. A block is selected for the current time window if its esperate time is inferior or equal to delta + upper bound of current time window. Default values for the window size is 1 period, default value for delta is 0.5, default step is 1 period. Set the heuristics parameters | 
| windowsize | The window size. | 
| delta | The delta value. | 
| step | The step. |