solver  1.0
Classes | Typedefs | Functions
PrecalculatedMapping.h File Reference

The structures and methods suitable for fast searching in the data structure of the robotic cell. More...

#include <map>
#include <set>
#include <vector>
#include <utility>
#include <unordered_map>
#include "RoboticLine.h"
#include "Shared/Utils.h"
#include "Solution/Solution.h"
+ Include dependency graph for PrecalculatedMapping.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  std::hash< pair< uint32_t, uint32_t > >
 Template specialization of the hash for a pair of uint32_t. More...
 
struct  std::hash< pair< Location *, Location * > >
 Template specialization of the hash for a pair of Location pointers. More...
 
struct  PrecalculatedMapping
 The structure contains the maps for fast searching in the robotic cell. More...
 

Typedefs

using SpatialCmpTuple = std::tuple< uint32_t, uint32_t, StaticActivity *, StaticActivity *, std::vector< std::pair< Location *, Location * >>>
 Defines the data type for an element of the spatial compatibility, i.e. (rob1 idx, rob2 idx, act1, act2, {{loc1, loc2}*}).
 

Functions

MovementgetSelectedMovement (const Solution &s, const PrecalculatedMapping &m, DynamicActivity *da)
 It extracts the selected movement of the given dynamic activity from the solution. More...
 
template<class X , class Y >
std::vector< Movement * > findMovements (X from, Y to)
 It finds all the movements located between from and to and returns them in the vector. More...
 

Detailed Description

The structures and methods suitable for fast searching in the data structure of the robotic cell.

Author
Libor Bukata

Definition in file PrecalculatedMapping.h.

Function Documentation

template<class X , class Y >
std::vector<Movement*> findMovements ( from,
to 
)

It finds all the movements located between from and to and returns them in the vector.

Parameters
fromSpecifies starting location/activity.
toSpecifies ending location/activity.
Template Parameters
X,YEach of them is either a pointer to location or static activity.
Returns
Movements between from and to.

Definition at line 45 of file PrecalculatedMapping.cpp.

Movement* getSelectedMovement ( const Solution s,
const PrecalculatedMapping m,
DynamicActivity da 
)

It extracts the selected movement of the given dynamic activity from the solution.

Parameters
sSolution of the energy optimization problem.
mMapping calculated for the related robotic cell.
daA dynamic activity located in the robotic cell.
Returns
Movement of the dynamic activity that was selected in the solution.

Definition at line 26 of file PrecalculatedMapping.cpp.