Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
labust::control::PNController Class Reference

#include <PNController.hpp>

List of all members.

Classes

struct  edge_writer
struct  EdgeProperty
struct  PlaceInfo
struct  pn_writer
struct  VertexProperty

Public Member Functions

void addToGraph (const navcon_msgs::RegisterControllerRequest &info)
void get_firing (const std::string &name)
void get_firing_r (const std::string &name)
void getDotDesc (std::string &desc)
 PNController ()
void reachability ()

Private Types

typedef boost::adjacency_list
< boost::vecS, boost::vecS,
boost::directedS,
VertexProperty,
boost::property
< boost::edge_name_t, int > > 
GraphType

Private Member Functions

bool firing_rec (int des_place, std::set< int > &skip_transitions, std::set< int > &visited_places)
template<class PropertyMap , class NameMap >
edge_writer< PropertyMap, NameMap > make_edge_writer (PropertyMap pmap, NameMap map)

Private Attributes

std::vector
< GraphType::vertex_descriptor > 
all_idx
std::vector< Eigen::VectorXi > all_markings
Eigen::MatrixXi Dm
Eigen::MatrixXi Dp
std::vector< int > firing_seq
Eigen::MatrixXi I
Eigen::VectorXi marking
std::map< std::string, PlaceInfonameMap
std::map< int, std::string > placeMap
int pnum
GraphType rgraph
int tnum
std::map< int, std::string > transitionMap

Detailed Description

The class contains implementation of Petri-Net builder and controller.

Todo:

Add multiple desired places setup

Add place turn-off option

Add additional state enabled place in parallel with the control place.

Add weighted transitions for multi DOF controllers ?

Add simulation step for activation to detect wrong firing sequences.

Extract reachability graph building and ploting

Extract debugging information and structure it in a debug class

Possible optimizations: Incremental graph building

Possible optimizations: BFS only on a subset of the graph ?

Possible optimizations: Spin-off BFS for the new state in a thread to have it ready in advance

Recommended optimizations: Reachability calculation memory/time/copying/std::find usage

Add detection of faulty controller registrations or setups. -analyze if they have indirect dependencies to DOFs

Possible optimizations: Find sequences that can fire simultaneously

Definition at line 68 of file PNController.hpp.


Member Typedef Documentation

typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, VertexProperty, boost::property<boost::edge_name_t, int> > labust::control::PNController::GraphType [private]

Definition at line 164 of file PNController.hpp.


Constructor & Destructor Documentation

Main constructor

Definition at line 49 of file PNController.cpp.


Member Function Documentation

void PNController::addToGraph ( const navcon_msgs::RegisterControllerRequest &  info)

Add controller to the petri-net.

Definition at line 65 of file PNController.cpp.

bool PNController::firing_rec ( int  des_place,
std::set< int > &  skip_transitions,
std::set< int > &  visited_places 
) [private]

Firing sequence recursive calculation.

Definition at line 113 of file PNController.cpp.

void PNController::get_firing ( const std::string &  name)

Get the firing sequence for the named controller.

Definition at line 234 of file PNController.cpp.

void PNController::get_firing_r ( const std::string &  name)

Get the firing sequence for the named controller.

Definition at line 324 of file PNController.cpp.

void PNController::getDotDesc ( std::string &  desc)

Get the reachability graph DOT description.

Definition at line 543 of file PNController.cpp.

template<class PropertyMap , class NameMap >
edge_writer<PropertyMap, NameMap> labust::control::PNController::make_edge_writer ( PropertyMap  pmap,
NameMap  map 
) [inline, private]

Definition at line 197 of file PNController.hpp.

Calculates the reachability graph.

Definition at line 451 of file PNController.cpp.


Member Data Documentation

std::vector<GraphType::vertex_descriptor> labust::control::PNController::all_idx [private]

Definition at line 205 of file PNController.hpp.

Definition at line 204 of file PNController.hpp.

Eigen::MatrixXi labust::control::PNController::Dm [private]

PN matrices.

Definition at line 124 of file PNController.hpp.

Eigen::MatrixXi labust::control::PNController::Dp [private]

Definition at line 124 of file PNController.hpp.

The last firing sequence.

Definition at line 140 of file PNController.hpp.

Eigen::MatrixXi labust::control::PNController::I [private]

Definition at line 124 of file PNController.hpp.

Eigen::VectorXi labust::control::PNController::marking [private]

Definition at line 128 of file PNController.hpp.

std::map<std::string, PlaceInfo> labust::control::PNController::nameMap [private]

Helper name to p/t mapping.

Definition at line 136 of file PNController.hpp.

std::map<int, std::string> labust::control::PNController::placeMap [private]

Helper maps for debugging.

Definition at line 132 of file PNController.hpp.

The place and transition number.

Definition at line 120 of file PNController.hpp.

Definition at line 202 of file PNController.hpp.

Definition at line 120 of file PNController.hpp.

std::map<int, std::string> labust::control::PNController::transitionMap [private]

Definition at line 132 of file PNController.hpp.


The documentation for this class was generated from the following files:


labust_execution
Author(s): Gyula Nagy
autogenerated on Fri Feb 7 2014 11:36:24