Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
MonteCarlo::BMscDealer Class Reference

#include <montecarlo.h>

Collaboration diagram for MonteCarlo::BMscDealer:
Collaboration graph

Public Types

typedef std::map< EventPtr,
double > 

Public Member Functions

 BMscDealer (SimulationState &state, boost::lagged_fibonacci607 &seeder, float max_message_delay)
double traverse (double time_begin, const BMsc *bmsc)
const EventTimeMapget_timestamps () const

Private Member Functions

double traverse_area (double time_begin, EventArea *area)
double traverse_event (double time_begin, Event *event)
void traverse_matching_event (double time_begin, Event *event)

Private Attributes

boost::lagged_fibonacci607 & m_seeder
< boost::lagged_fibonacci607
&, boost::uniform_real<> > 
 random number generator used to generate message delay More...
EventTimeMap m_timestamps
EventPtrSet m_completed_events

Detailed Description

Definition at line 85 of file montecarlo.h.

Member Typedef Documentation

Definition at line 106 of file montecarlo.h.

Constructor & Destructor Documentation

MonteCarlo::BMscDealer::BMscDealer ( SimulationState state,
boost::lagged_fibonacci607 &  seeder,
float  max_message_delay 

Definition at line 88 of file montecarlo.h.

Member Function Documentation

const EventTimeMap& MonteCarlo::BMscDealer::get_timestamps ( ) const

Definition at line 108 of file montecarlo.h.

double MonteCarlo::BMscDealer::traverse ( double  time_begin,
const BMsc bmsc 

In the (acyclic) graph of events from the given BMSC, it finds the longest path.

The weight of an edge is:

  • generated by the m_delay_rng() function if the edge is a complete message,
  • zero otherwise.

Returns the length of the longest path found in bmsc. Besides, it fills the m_timestamps collection with timestamps of all events in the graph with the longest path found. An event timestamp is the length of the path from any minimal event in the bmsc to the event.

Definition at line 25 of file montecarlo.cpp.

References MonteCarlo::SimulationState::add_measurement(), BMsc::get_instances(), m_state, m_timestamps, and traverse_area().

Referenced by MonteCarlo::do_sample(), and MonteCarlo::HMscDealer::traverse_reference().

double MonteCarlo::BMscDealer::traverse_area ( double  time_begin,
EventArea area 
double MonteCarlo::BMscDealer::traverse_event ( double  time_begin,
Event event 
void MonteCarlo::BMscDealer::traverse_matching_event ( double  time_begin,
Event event 

Definition at line 162 of file montecarlo.cpp.

References MessageEvent::get_matching_event(), and MessageEvent::is_send().

Member Data Documentation

EventPtrSet MonteCarlo::BMscDealer::m_completed_events

Definition at line 125 of file montecarlo.h.

boost::variate_generator<boost::lagged_fibonacci607&, boost::uniform_real<> > MonteCarlo::BMscDealer::m_delay_rng

random number generator used to generate message delay

Definition at line 117 of file montecarlo.h.

boost::lagged_fibonacci607& MonteCarlo::BMscDealer::m_seeder

Definition at line 115 of file montecarlo.h.

SimulationState& MonteCarlo::BMscDealer::m_state

Definition at line 114 of file montecarlo.h.

Referenced by traverse().

EventTimeMap MonteCarlo::BMscDealer::m_timestamps

Definition at line 123 of file montecarlo.h.

Referenced by traverse().

The documentation for this class was generated from the following files: Logo
Generated on Fri Jan 15 2016 16:26:59 for Sequence Chart Studio by  doxygen