1 #ifndef __DIADES__AUTOMATA__SIMULATOR__HH 2 #define __DIADES__AUTOMATA__SIMULATOR__HH 25 list<Event> & simulation);
38 const ObservableMask & mask,
39 list<Event> & simulation);
52 bool simulate(
const ObservableComponent & component,
53 const set<string> & absentEvents,
57 list<Event> & simulation);
71 bool simulate(ComposableModel & composable,
72 const ObservableMask & mask,
73 const set<string> & absentEvents,
77 list<Event> & simulation);
89 template<
typename InputIterator,
typename OutputIterator>
90 void timeStamp(InputIterator first, InputIterator last, time_duration min, time_duration max, OutputIterator result) {
91 time_duration global(seconds(0));
92 while (first != last) {
93 time_duration new_duration(seconds(
generateRandomValue(min.total_seconds(), max.total_seconds())));
94 global += new_duration;
95 *result = make_pair(global, *first);
Random generation utilities.
Namespace of the Diades project.
bool interactiveSimulation(const ObservableComponent &component, State ¤t, list< Event > &simulation)
bool simulate(const ObservableComponent &component, const set< string > &absentEvents, unsigned obsMin, unsigned obsMax, unsigned seed, list< Event > &simulation)
void timeStamp(InputIterator first, InputIterator last, time_duration min, time_duration max, OutputIterator result)
long generateRandomValue(long lower, long upper)