WSF
wsf::cyber::random::RandomManager Class Reference

#include <WsfCyberRandom.hpp>

Classes

struct  DrawData
struct  DrawCache
struct  AttackDistributionCache

DrawCache container

Cache data for a specific probability type of a specific named attack. Only a single value type will be used in any given DrawCache, corresponding to the frequency type dictated by user input.

Note
"cALWAYS" draws are not kept here, as they do not require data to be cached. Draws in the "cALWAYS" case will be provided at will, and can be queried locally on the WsfCyberEngagement object.
using AttackCacheMap = std::map<std::string, AttackDistributionCache>
 RandomManager (WsfSimulation *aSimulation)

Draw method

Returns a continuous random variable draw for a named attack, against a specific target, for the required probability type. Queries the draw cache to see if a value is simply fetched and served from the cache, or a new draw is made (and cached for later use). Returns a value of -1.0 on an invalid passed parameter.

double Draw (const std::string &aAttackType, const std::string &aTarget, ProbabilityType aType)
const AttackCacheMapGetCacheMap () const

Member Typedef Documentation

◆ AttackCacheMap

Constructor & Destructor Documentation

◆ RandomManager()

wsf::cyber::random::RandomManager::RandomManager ( WsfSimulation * aSimulation)

Member Function Documentation

◆ Draw()

double wsf::cyber::random::RandomManager::Draw ( const std::string & aAttackType,
const std::string & aTarget,
ProbabilityType aType )

Get the frequency of the probability of the attack we're drawing for

If the draw frequency is "cALWAYS", we always do a draw. Ignore caching. Simply serve a value

References wsf::cyber::random::cALWAYS, wsf::cyber::random::cINTERVAL_PER_SIMULATION, wsf::cyber::random::cINTERVAL_PER_TARGET, wsf::cyber::random::cONCE_PER_SIMULATION, wsf::cyber::random::cONCE_PER_TARGET, wsf::cyber::random::cOTHER, and wsf::cyber::ScenarioExtension::Get().

◆ GetCacheMap()

const AttackCacheMap & wsf::cyber::random::RandomManager::GetCacheMap ( ) const
inline

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved