Drake
Drake C++ Documentation
monte_carlo.h File Reference
#include <functional>
#include <memory>
#include <utility>
#include <vector>
#include "drake/common/parallelism.h"
#include "drake/systems/analysis/simulator.h"
Include dependency graph for monte_carlo.h:

Classes

struct  RandomSimulationResult
 A snapshot of the generator used to produce the random simulation. More...
 

Namespaces

 drake
 
 drake::systems
 
 drake::systems::analysis
 

Typedefs

typedef std::function< std::unique_ptr< Simulator< double > > RandomGenerator *generator)> SimulatorFactory
 
typedef std::function< double(const System< double > &system, const Context< double > &context)> ScalarSystemFunction
 

Functions

double RandomSimulation (const SimulatorFactory &make_simulator, const ScalarSystemFunction &output, double final_time, RandomGenerator *generator)
 Run a deterministic simulation of a (stochastic) System using the generator to instantiate all "random" quantities. More...
 
std::vector< RandomSimulationResult > MonteCarloSimulation (const SimulatorFactory &make_simulator, const ScalarSystemFunction &output, double final_time, int num_samples, RandomGenerator *generator=nullptr, Parallelism parallelism=false)
 Generates samples of a scalar random variable output by running many random simulations drawn from independent samples of the distributions governing the stochastic simulation. More...