solver  1.0
RoboticLineSolverLP.h
Go to the documentation of this file.
1 /*
2  This file is part of the EnergyOptimizatorOfRoboticCells program.
3 
4  EnergyOptimizatorOfRoboticCells is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  EnergyOptimizatorOfRoboticCells is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with EnergyOptimizatorOfRoboticCells. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef HLIDAC_PES_ROBOTIC_LINE_SOLVER_LP_H
19 #define HLIDAC_PES_ROBOTIC_LINE_SOLVER_LP_H
20 
27 #include <vector>
28 #include "Settings.h"
29 #include "RoboticLine.h"
30 #include "Solution/Solution.h"
32 #include "ILPModel/ILPModel.h"
36 
45  std::vector<std::vector<Location*>> locs;
47  std::vector<std::vector<RobotPowerMode*>> pwrms;
49  std::vector<std::vector<Movement*>> mvs;
50 };
51 
59  public:
74 
76  Solution solve() const;
77 
85  void addCollisionResolution(Activity* i, Activity* j, const int32_t& multipleOfCycleTime);
86  private:
95  void construct(const PrecalculatedMapping& m, bool addTimeLags = true);
102  void checkArguments(const PrecalculatedMapping& m, const uint32_t& numberOfRobots = 1u) const;
103 
112 };
113 
114 #endif
void construct(const PrecalculatedMapping &m, bool addTimeLags=true)
Complete construction of the Linear Programming problem for the energy optimization.
void addCollisionResolution(Activity *i, Activity *j, const int32_t &multipleOfCycleTime)
It adds a constraint to resolve a collision where and are start time and duration of the activity ...
The base class incorporating common properties of robot operations and movements. ...
Definition: RoboticLine.h:68
Generation of the (I)LP constraints.
The structure representing a solution found by an algorithm.
Definition: Solution.h:50
Instance of this class includes all the data structures and methods related to a robot.
Definition: RoboticLine.h:432
std::vector< std::vector< Location * > > locs
Selected locations for each robot, time ordered.
ConstraintsGenerator mGenerator
Generator of the constraints.
std::vector< std::vector< RobotPowerMode * > > pwrms
Selected power saving modes of related locations.
PartialSolution mPartialSolution
Partially fixed problem, or in other words, a partial solution.
Mapping of continuous variables of the energy optimization problem.
Integer Linear Programming problem is stored in this data structure.
Definition: ILPModel.h:69
Mapping of continuous variables occurring in the energy optimization problem.
The structures and methods suitable for fast searching in the data structure of the robotic cell...
Declares a class for the generation of constraints.
Fixed locations, power saving modes, and movements.
RoboticLineSolverLP(Robot *r, const PartialSolution &ps, const PrecalculatedMapping &m)
It builds a Linear Programming problem (variables, constraints, criterion) to be solved.
VariableMappingLP mMapper
Mapping of the continuous variables.
General model for Integer Linear Programming problem.
Determines an optimal timing of a partially fixed problem.
It declares the namespace for program settings.
void addVariablesForSelectedDynamicActivities()
It adds additional float variables for optional activities.
ILPModel mModel
Linear Programming problem to be solved.
Solution solve() const
The energy optimal timing is determined by solving Linear Programming problem and the solution is ret...
Declares the class storing the best found solutions, tuples, and information about the heuristic perf...
A representation of the solution that is algorithm independent.
std::vector< std::vector< Movement * > > mvs
Selected movements, implied from the selected locations and their order.
The robotic cell corresponds to an instance of this class.
Definition: RoboticLine.h:563
The structure contains the maps for fast searching in the robotic cell.
void checkArguments(const PrecalculatedMapping &m, const uint32_t &numberOfRobots=1u) const
It checks that the arguments passed to the constructor are valid and correct.
The file contains various classes devoted to abstract representation of the robotic cell...