solver  1.0
VariableMappingLP.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_VARIABLE_MAPPING_LP_H
19 #define HLIDAC_PES_VARIABLE_MAPPING_LP_H
20 
27 #include <map>
28 #include <string>
29 #include <vector>
30 #include "RoboticLine.h"
31 #include "ILPModel/ILPModel.h"
32 
34 using map1to1 = std::map<uint32_t, uint32_t>;
35 
53 
54  uint32_t numberOfVariables() const { return W.size()+s.size()+d.size(); }
62  void addActivities(const std::vector<Activity*>& activities, bool mandatory, bool mapW = true);
63 
71  std::vector<Variable> variables;
73  std::vector<std::string> varDesc;
74 };
75 
82 std::map<uint32_t, double> inverseMapping(const std::vector<double>& solution, const map1to1& mapping);
83 
84 #endif
Instance of this class includes all the data structures and methods related to a robot.
Definition: RoboticLine.h:432
void addActivities(const std::vector< Activity * > &activities, bool mandatory, bool mapW=true)
It adds the mapping for extra activities.
std::vector< Variable > variables
Continuous variables of the problem with the well-specified domains.
Mapping of continuous variables occurring in the energy optimization problem.
std::vector< std::string > varDesc
Description of the continuous variables.
map1to1 s
Maps activity identification to the index of variable corresponding to the start time of this activit...
General model for Integer Linear Programming problem.
VariableMappingLP(Robot *r)
Constructs the mapping of the continuous variables.
std::map< uint32_t, uint32_t > map1to1
Identification of the activity is mapped to the index of the variable.
map1to1 W
Maps activity identification to the index of variable corresponding to the energy consumption of this...
map1to1 d
Maps activity identification to the index of variable corresponding to the duration of this activity...
std::map< uint32_t, double > inverseMapping(const std::vector< double > &solution, const map1to1 &mapping)
It extracts the values of some continuous variables from the solution.
The robotic cell corresponds to an instance of this class.
Definition: RoboticLine.h:563
The file contains various classes devoted to abstract representation of the robotic cell...