| 
    solver
    1.0
    
   | 
 
Defines the optimization part of the parallel heuristic, i.e. sub-heuristics and the evaluation of tuples. More...
#include <HeuristicAlgorithms.h>
 Collaboration diagram for HeuristicAlgorithms:Public Member Functions | |
| HeuristicAlgorithms (KnowledgeBase &kb, const RoboticLine &line, const PrecalculatedMapping &mapping) | |
| Constructor makes references to the required data, i.e. the robotic cell, its mapping, and shared data of the heuristic.  | |
| std::vector< std::vector< Location * > > | initializePartialSolution (PartialSolution &ps) const | 
| It appends the fixed movements (implied from fixed locations), and optionally fastest power saving modes to ps data structure.  More... | |
| OptimalTiming | solvePartialProblem (const PartialSolution &ps, const CircuitTuple &t, Algo algo) | 
| Employs Linear Programming to obtain energy-efficient timing for a given tuple.  More... | |
| OptimalTiming | convert (const PartialSolution &ps, const Solution &s) const | 
| Auxiliary method that converts a general form of the solution to the timing of the robotic cell.  More... | |
| CollisionResolution | resolveCollision (ActivityMode *m1, double s1, double d1, ActivityMode *m2, double s2, double d2) const | 
| It checks whether there is a collision between two specified activities, and eventually returns how to resolve this collision.  More... | |
| CollisionResolution | resolveTheWorstCollision (const PartialSolution &ps, const OptimalTiming &ot, const Solution &s) const | 
| It finds the worst collision, i.e. with the longest time of active collision, and returns how to resolve it.  More... | |
| double | heuristicLocationChanges (OptimalTiming &ot, PartialSolution &ps, const std::vector< std::vector< Location * >> &fixed, bool &solutionChanged) const | 
| The sub-heuristic locally optimizes the robot paths (change locations) to reduce energy consumption.  More... | |
| double | heuristicPowerModeSelection (const OptimalTiming &ot, PartialSolution &ps, TabuList &tabuList, bool &solutionChanged) const | 
| The sub-heuristic tries to switch from one power saving mode to another one for a location in order to reduce energy consumption.  More... | |
Private Member Functions | |
| double | scaleGanttToCycleTime (std::vector< ActivityModeInfo > &robotGantt) const | 
| It scales durations of activities in such a way that the robot cycle time is met. Updated start times and durations are reflected in the robotGantt variable.  More... | |
| double | calculateBreakagePenalty (const std::vector< ActivityModeInfo > &robotGantt, const OptimalTiming &ot) const | 
| It calculates the penalty for the violation of time lags and collisions.  More... | |
Private Attributes | |
| KnowledgeBase & | mKB | 
| Access to the shared data of the heuristic.  | |
| const RoboticLine & | mLine | 
| Access to the robotic cell to be optimized.  | |
| const double | mPenaltyMultiplier | 
| Aggregated breakage time (see calculateBreakagePenalty) is multiplied by this constant to get the penalty.  | |
| const PrecalculatedMapping & | mMapping | 
| Fast searching in the data structure of the robotic cell.  | |
Defines the optimization part of the parallel heuristic, i.e. sub-heuristics and the evaluation of tuples.
An instance of this class provides an access to the sub-heuristics and solver for partially fixed problems (called tuples). The solver determines an energy-efficient timing for fixed locations, movements, and power saving modes. The aim of the sub-heuristics is to modify tuples in such a way that would be resulting in an energy reduction.
Definition at line 38 of file HeuristicAlgorithms.h.
      
  | 
  private | 
It calculates the penalty for the violation of time lags and collisions.
| robotGantt | Timing of the robot activities where the robot cycle time is met. | 
| ot | Timing of the whole robotic cell. | 
Definition at line 599 of file HeuristicAlgorithms.cpp.
| OptimalTiming HeuristicAlgorithms::convert | ( | const PartialSolution & | ps, | 
| const Solution & | s | ||
| ) | const | 
Auxiliary method that converts a general form of the solution to the timing of the robotic cell.
| ps | A partial problem with fixed locations, movements, and power saving modes. | 
| s | Solution of the partially fixed problem. | 
Definition at line 199 of file HeuristicAlgorithms.cpp.
| double HeuristicAlgorithms::heuristicLocationChanges | ( | OptimalTiming & | ot, | 
| PartialSolution & | ps, | ||
| const std::vector< std::vector< Location * >> & | fixed, | ||
| bool & | solutionChanged | ||
| ) | const | 
The sub-heuristic locally optimizes the robot paths (change locations) to reduce energy consumption.
| [in,out] | ot | Timing of the robotic cell. | 
| [in,out] | ps | A partial problem with fixed locations, movements, and power saving modes. | 
| fixed | Locations that cannot be changed because the spatial compatibility has to be preserved. | |
| [out] | solutionChanged | It indicates whether the partially fixed problem was modified. | 
Definition at line 305 of file HeuristicAlgorithms.cpp.
| double HeuristicAlgorithms::heuristicPowerModeSelection | ( | const OptimalTiming & | ot, | 
| PartialSolution & | ps, | ||
| TabuList & | tabuList, | ||
| bool & | solutionChanged | ||
| ) | const | 
The sub-heuristic tries to switch from one power saving mode to another one for a location in order to reduce energy consumption.
| ot | Timing of the robotic cell. | |
| [in,out] | ps | A partial problem with fixed locations, movements, and power saving modes. | 
| tabuList | A list with the forbidden modifications. | |
| [out] | solutionChanged | It indicates whether the partially fixed problem was modified. | 
Definition at line 410 of file HeuristicAlgorithms.cpp.
| vector< vector< Location * > > HeuristicAlgorithms::initializePartialSolution | ( | PartialSolution & | ps | ) | const | 
It appends the fixed movements (implied from fixed locations), and optionally fastest power saving modes to ps data structure.
| [in,out] | ps | A partial problem with given fixed locations (+their order). | 
Definition at line 107 of file HeuristicAlgorithms.cpp.
| CollisionResolution HeuristicAlgorithms::resolveCollision | ( | ActivityMode * | m1, | 
| double | s1, | ||
| double | d1, | ||
| ActivityMode * | m2, | ||
| double | s2, | ||
| double | d2 | ||
| ) | const | 
It checks whether there is a collision between two specified activities, and eventually returns how to resolve this collision.
| m1 | A movement or location of the first considered activity. | 
| s1,d1 | Start time and duration of the first activity, respectively. | 
| m2 | A movement or location of the second considered activity. | 
| s2,d2 | Start time and duration of the second activity, respectively. | 
Definition at line 251 of file HeuristicAlgorithms.cpp.
| CollisionResolution HeuristicAlgorithms::resolveTheWorstCollision | ( | const PartialSolution & | ps, | 
| const OptimalTiming & | ot, | ||
| const Solution & | s | ||
| ) | const | 
It finds the worst collision, i.e. with the longest time of active collision, and returns how to resolve it.
| ps | A partial problem with fixed locations, movements, and power saving modes. | 
| ot | Timing of the robotic cell. | 
| s | Solution of the Linear Programming problem. | 
Definition at line 282 of file HeuristicAlgorithms.cpp.
      
  | 
  private | 
It scales durations of activities in such a way that the robot cycle time is met. Updated start times and durations are reflected in the robotGantt variable.
| [in,out] | robotGantt | Timing of the robot activities where some activities have modified durations. | 
Definition at line 505 of file HeuristicAlgorithms.cpp.
| OptimalTiming HeuristicAlgorithms::solvePartialProblem | ( | const PartialSolution & | ps, | 
| const CircuitTuple & | t, | ||
| Algo | algo | ||
| ) | 
Employs Linear Programming to obtain energy-efficient timing for a given tuple.
| ps | A partial problem with fixed locations, movements, and power saving modes. | 
| t | A tuple corresponding to the partial problem. | 
| algo | Specifies what was called before solving this partial problem, i.e. either a sub-heuristic or initialization phase. | 
Definition at line 138 of file HeuristicAlgorithms.cpp.
 1.8.9.1