Class RunPlan
Defined in File RunPlan.h
Class Documentation
-
class RunPlan
Individual run config
Public Functions
-
explicit RunPlan(const ModelDescription &environment)
Constructor this will need to set the random seed to a default value, +1 of previous EnsembleRun would make sense
- Parameters:
environment – EnvironmentDescription to limit properties by
-
void setRandomSimulationSeed(uint64_t random_seed)
Set the random seed passed to this run of the simulation
- Parameters:
random_seed – Seed for random generation during execution
-
void setSteps(unsigned int steps)
Set the number of steps for this instance of the simulation A steps value of 0 requires the ModelDescription to have atleast 1 exit condition
- Parameters:
steps – The number of steps to execute, 0 is unlimited but requires an exit condition
-
void setOutputSubdirectory(const std::string &subdir)
Set the sub directory within the output directory for outputs of this run If left empty, output will not goto subdirectories
- Parameters:
subdir – The subdirectory to output logfiles for this run to
-
template<typename T>
void setProperty(const std::string &name, T value) Set the environment property override for this run of the model
- Parameters:
name – Environment property name
value – Environment property value (override)
- Template Parameters:
T – Type of the environment property
- Throws:
exception::InvalidEnvProperty – If a property of the name does not exist
exception::InvalidEnvPropertyType – If a property with the name has a type different to T
-
template<typename T, flamegpu::size_type N>
void setProperty(const std::string &name, const std::array<T, N> &value) Set the environment property override for this run of the model This version should be used for array properties
- Parameters:
name – Environment property name
value – Environment property value (override)
- Template Parameters:
T – Type of the environment property
N – Length of the array to be returned
- Throws:
exception::InvalidEnvProperty – If a property of the name does not exist
exception::InvalidEnvPropertyType – If a property with the name has a type different to T, or length to N
-
template<typename T, flamegpu::size_type N = 0>
void setProperty(const std::string &name, flamegpu::size_type index, T value) Set the environment property override for this run of the model This version should be used for setting individual elements of array properties
- Parameters:
name – Environment property name
index – Length of the array to be returned
value – Environment property value (override)
- Template Parameters:
T – Type of the environment property
N – (Optional) Length of the array property
- Throws:
exception::InvalidEnvProperty – If a property of the name does not exist
exception::InvalidEnvPropertyType – If a property with the name has a type different to T
exception::OutOfBoundsException – If index is not in range of the length of the property array
-
uint64_t getRandomSimulationSeed() const
Returns the random seed used for this simulation run
-
unsigned int getSteps() const
Returns the number of steps to be executed for this simulation run 0 means unlimited, and is only available if the model description has an exit condition
-
std::string getOutputSubdirectory() const
Returns the currently configured output subdirectory directory Empty string means output for this run will not be placed into a subdirectory
-
template<typename T>
T getProperty(const std::string &name) const Gets the currently configured environment property value
- Parameters:
name – name used for accessing the property
- Template Parameters:
T – Type of the value to be returned
- Throws:
exception::InvalidEnvProperty – If a property of the name does not exist
exception::InvalidEnvPropertyType – If a property with the name has a type different to T
-
template<typename T, flamegpu::size_type N>
std::array<T, N> getProperty(const std::string &name) const Gets the currently configured environment property array value
- Parameters:
name – name used for accessing the property
- Template Parameters:
T – Type of the value to be returned
N – Length of the array to be returned
- Throws:
exception::InvalidEnvProperty – If a property array of the name does not exist
exception::InvalidEnvPropertyType – If a property with the name has a type different to T
-
template<typename T, flamegpu::size_type N = 0>
T getProperty(const std::string &name, flamegpu::size_type index) const Gets an element of the currently configured environment property array
- Parameters:
name – name used for accessing the property
index – element from the environment property array to return
- Template Parameters:
T – Type of the value to be returned
N – (Optional) Length of the array property
- Throws:
exception::InvalidEnvProperty – If a property of the name does not exist
exception::InvalidEnvPropertyType – If a property with the name has a type different to T
exception::OutOfBoundsException – If index is not in range of the length of the property array
-
RunPlanVector operator+(const RunPlan &rhs) const
Operator methods for combining vectors
-
RunPlanVector operator+(const RunPlanVector &rhs) const
-
RunPlanVector operator*(unsigned int rhs) const
Friends
- friend class detail::AbstractSimRunner
- friend class io::JSONLogger
- friend class io::XMLLogger
-
explicit RunPlan(const ModelDescription &environment)