solver  1.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
StaticActivity Class Reference

Collection of locations in which a robot operation (or waiting) can be performed. More...

#include <RoboticLine.h>

+ Inheritance diagram for StaticActivity:
+ Collaboration diagram for StaticActivity:

Public Member Functions

 StaticActivity (const uint32_t &aid)
 
std::vector< Location * > locations () const
 
LocationfindLocation (const uint32_t &lid) const
 It finds a location according to its identification. More...
 
double inputPower (const uint32_t &lid, const uint32_t &pid) const
 
double energyConsumption (double duration, const uint32_t &lid, const uint32_t &pid) const
 
virtual bool mandatory () const
 Each static activity is mandatory since it has to be performed.
 
virtual bool optional () const
 None of static activities is optional since all of them have to be performed.
 
virtual size_t numberOfModes () const
 
virtual Robotparent () const
 
- Public Member Functions inherited from Activity
 Activity (const uint32_t &aid)
 
uint32_t aid () const
 
std::string name () const
 
std::string description () const
 
bool lastInCycle () const
 
std::vector< Activity * > successors () const
 
std::vector< Activity * > predecessors () const
 
double minAbsDuration () const
 
double maxAbsDuration () const
 

Private Member Functions

void addLocation (Location *p)
 
virtual void parent (Robot *parent)
 
void findMovementsForLocations ()
 Method assigns entering and leaving movements to each location in mLocations.
 
virtual void freeAllocatedMemory ()
 

Private Attributes

std::vector< Location * > mLocations
 Each static activity consists of possible robot positions, i.e. locations.
 

Friends

class XmlReader
 Enable an instance of XmlReader class to add locations.
 
class Robot
 Enable the parent robot to call findMovementsForLocations method.
 
class ParallelHeuristicSolver
 It allows the parallel heuristic to directly access mLocations array to avoid copying.
 

Additional Inherited Members

- Protected Member Functions inherited from Activity
void name (const std::string &name)
 
void description (const std::string &description)
 
void lastInCycle (const bool &lastInCycle)
 
void addSuccessor (Activity *successor)
 
void addPredecessor (Activity *predecessor)
 
void minAbsDuration (const double &minAbsDuration)
 
void maxAbsDuration (const double &maxAbsDuration)
 
- Protected Attributes inherited from Activity
uint32_t mAid
 Identification of the activity.
 
bool mLastInCycle
 It determines whether the activity closes the robot cycle.
 
std::string mName
 Name of the activity.
 
std::string mDescription
 Description of the activity.
 
std::vector< Activity * > mSuccessors
 Successors of the activity.
 
std::vector< Activity * > mPredecessors
 Predecessors of the activity.
 
double mMinAbsDuration
 Minimal possible duration of the activity.
 
double mMaxAbsDuration
 Maximal possible duration of the activity.
 
RobotmParent
 Pointer to the parent, i.e. a robot performing this activity.
 

Detailed Description

Collection of locations in which a robot operation (or waiting) can be performed.

The static activity represents a collection of locations, i.e. robot configurations, in which some operation (or waiting) such as e.g. welding, cutting, or assembling can be performed. In the final solution, only one location is selected for each static activity.

Definition at line 304 of file RoboticLine.h.

Member Function Documentation

double StaticActivity::energyConsumption ( double  duration,
const uint32_t &  lid,
const uint32_t &  pid 
) const
Parameters
durationRequested duration of this static activity.
lidIdentification of a location belonging to this activity.
pidIdentification of the power saving mode of the robot Activity::mParent.
Returns
Calculated energy consumption of this activity for given parameters.

Definition at line 182 of file RoboticLine.cpp.

Location * StaticActivity::findLocation ( const uint32_t &  lid) const

It finds a location according to its identification.

Parameters
lidIdentification of a location.
Returns
A pointer to the location with lid identification.
See also
DynamicActivity::findMovement

Definition at line 157 of file RoboticLine.cpp.

double StaticActivity::inputPower ( const uint32_t &  lid,
const uint32_t &  pid 
) const
Parameters
lidIdentification of a location belonging to this activity.
pidIdentification of the power saving mode of the robot Activity::mParent.
Returns
Input power of the robot for the given location and power saving mode.

Definition at line 167 of file RoboticLine.cpp.


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