#include <mpexplore.h>

Collaboration diagram for FSMSADF::MPExplore::State:

List of all members.

Public Member Functions

 State (SGraph *G)
 State (size_t sz)
 ~State ()
Statecopy ()
MPTime consume (Scenario *s, Port *p)
void produce (Scenario *s, Port *p, MPTime t)
bool actorEnabled (Scenario *s, Actor *a)
size_t hashValue () const
bool equals (const State *s) const
int compare (const State *s) const
Stateminus (State *v) const
void add (double factor, State *v)
TokenfirstToken ()
MPDelay normalize ()
MPTime norm ()
void smooth (State *y)
MaxPlus::VectorasVector ()

Static Public Member Functions

static StatezeroState (SGraph *G)
static StatefromVector (SGraph *G, MaxPlus::Vector *v)
static StatezeroScheduleState (SGraph *G)

Private Member Functions

void init (size_t sz)

Private Attributes

MPTime timestamp
vector< TokenFIFO * > table

Detailed Description

class State State represents a distribution of timestamped tokens over the channels of the graph.


Constructor & Destructor Documentation

FSMSADF::MPExplore::State::State ( SGraph G  ) 

State() Constructor.

References FSMSADF::ScenarioGraph::getChannels(), init(), and FSMSADF::MPExplore::SGraph::scenarioGraph.

Referenced by copy(), fromVector(), minus(), zeroScheduleState(), and zeroState().

Here is the call graph for this function:

FSMSADF::MPExplore::State::State ( size_t  sz  ) 

State() Constructor.

References init().

Here is the call graph for this function:

FSMSADF::MPExplore::State::~State (  ) 

~State() Destructor.

References table.


Member Function Documentation

bool FSMSADF::MPExplore::State::actorEnabled ( Scenario s,
Actor a 
)

actorEnabled() The function returns true when the actor is enabled (i.e. ready to fire). Otherwise the function returns false.

References FSMSADF::Port::getChannel(), FSMSADF::GraphComponent::getId(), FSMSADF::Actor::getPorts(), FSMSADF::Port::getRateOfScenario(), FSMSADF::Port::getType(), and table.

Referenced by FSMSADF::MPExplore::Exploration::exploreDelayForSchedule(), and FSMSADF::MPExplore::Exploration::exploreEigen().

Here is the call graph for this function:

void FSMSADF::MPExplore::State::add ( double  factor,
State v 
)

add() The function performs a add operation on all FIFOs.

References FSMSADF::MPExplore::TokenFIFO::add(), and table.

Here is the call graph for this function:

MaxPlus::Vector * FSMSADF::MPExplore::State::asVector ( void   ) 

asVector() The function returns the token production times as a MaxPlus vector.

References table, and v.

Referenced by FSMSADF::MPExplore::Exploration::exploreEigen().

int FSMSADF::MPExplore::State::compare ( const State s  )  const

compare() The function implements a comparison to generate a total order for MS hash_set return -1 if receiver smaller than s, 0 if equal, otherwise 1 performs a lexicographical order on all FIFOs.

References table.

MPTime FSMSADF::MPExplore::State::consume ( Scenario s,
Port p 
) [inline]
State * FSMSADF::MPExplore::State::copy (  ) 

copy() The function returns a copy of this state.

References State(), table, and timestamp.

Referenced by FSMSADF::MPExplore::Exploration::exploreDelayForSchedule(), and FSMSADF::MPExplore::Exploration::exploreEigen().

Here is the call graph for this function:

bool FSMSADF::MPExplore::State::equals ( const State s  )  const

equals() The function performs an equals operation on all FIFOs.

References table.

Referenced by FSMSADF::MPExplore::Exploration::exploreEigen(), and FSMSADF::MPExplore::StateComparator::operator()().

Token * FSMSADF::MPExplore::State::firstToken (  ) 

firstToken() The function returns a pointer to the first token in any of the FIFOs. When all FIFOs are empty, the function returns NULL.

References FSMSADF::MPExplore::TokenFIFO::first(), FSMSADF::MPExplore::TokenFIFO::size(), and table.

Here is the call graph for this function:

State * FSMSADF::MPExplore::State::fromVector ( SGraph G,
MaxPlus::Vector v 
) [static]

fromVector() Initialize this state as an initial state (i.e. channels contains only initial tokens and no time has passed so far). The production times of the initial tokens are taken from the vector v.

References c, MaxPlus::Vector::get(), FSMSADF::ScenarioGraph::getChannels(), FSMSADF::GraphComponent::getId(), FSMSADF::Channel::getInitialTokens(), FSMSADF::MPExplore::SGraph::scenarioGraph, State(), FSMSADF::MPExplore::SGraph::synchStorage, table, timestamp, and TokenFIFO.

Referenced by FSMSADF::MPExplore::Exploration::exploreDelayForSchedule().

Here is the call graph for this function:

size_t FSMSADF::MPExplore::State::hashValue (  )  const

hashValue() The function returns a hash value for this state.

References table.

Referenced by FSMSADF::MPExplore::StateHasher::operator()().

void FSMSADF::MPExplore::State::init ( size_t  sz  )  [private]

init() Initialize the state.

References table, and TokenFIFO.

Referenced by State().

State * FSMSADF::MPExplore::State::minus ( State v  )  const

minus() The function performs a minus operation on all FIFOs.

References FSMSADF::MPExplore::TokenFIFO::minus(), State(), and table.

Referenced by FSMSADF::MPExplore::Exploration::exploreDelayForSchedule().

Here is the call graph for this function:

MPTime FSMSADF::MPExplore::State::norm (  ) 

norm() The function returns the norm of the token production times.

References MaxPlus::MP_MAX(), and table.

Referenced by FSMSADF::MPExplore::Exploration::exploreDelayForSchedule(), and normalize().

Here is the call graph for this function:

MPDelay FSMSADF::MPExplore::State::normalize (  ) 

normalize() The function normalizes the production time fo the tokens in all FIFOs.

References norm(), table, and timestamp.

Referenced by FSMSADF::MPExplore::Exploration::exploreDelayForSchedule(), and FSMSADF::MPExplore::Exploration::exploreEigen().

Here is the call graph for this function:

void FSMSADF::MPExplore::State::produce ( Scenario s,
Port p,
MPTime  t 
) [inline]
void FSMSADF::MPExplore::State::smooth ( State y  ) 

smooth() The function performs a smooth operation on all FIFOs.

References table.

Referenced by FSMSADF::MPExplore::Exploration::exploreEigen().

State * FSMSADF::MPExplore::State::zeroScheduleState ( SGraph G  )  [static]

zeroScheduleState() Initialize this state (i.e. channels contains only initial tokens). The production times of the initial tokens are equal to a counter which is raised on each initial tokens that is placed in a FIFO.

References c, FSMSADF::ScenarioGraph::getChannels(), FSMSADF::GraphComponent::getId(), FSMSADF::Channel::getInitialTokens(), FSMSADF::MPExplore::SGraph::scenarioGraph, State(), FSMSADF::MPExplore::SGraph::synchStorage, table, and TokenFIFO.

Here is the call graph for this function:

State * FSMSADF::MPExplore::State::zeroState ( SGraph G  )  [static]

zeroState() Initialize this state as an initial state (i.e. channels contains only initial tokens and no time has passed so far).

References c, FSMSADF::ScenarioGraph::getChannels(), FSMSADF::GraphComponent::getId(), FSMSADF::Channel::getInitialTokens(), FSMSADF::MPExplore::SGraph::scenarioGraph, State(), FSMSADF::MPExplore::SGraph::synchStorage, table, timestamp, and TokenFIFO.

Referenced by FSMSADF::MPExplore::Exploration::exploreEigen().

Here is the call graph for this function:


Member Data Documentation


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