BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
ExpectedValueFactory.h
Go to the documentation of this file.
1
#ifndef BPMNOS_Model_ExpectedValueFactory_H
2
#define BPMNOS_Model_ExpectedValueFactory_H
3
4
#include <limex.h>
5
#include <cmath>
6
7
namespace
BPMNOS
{
8
9
/**
10
* @brief Factory for expected value functions in LIMEX expressions.
11
*
12
* Registers functions with the same names as random distributions,
13
* but returns the expected (mean) value instead of sampling.
14
*
15
* Expected values:
16
* - uniform(a, b): (a + b) / 2
17
* - uniform_int(a, b): (a + b) / 2
18
* - normal(mean, stddev): mean
19
* - exponential(rate): 1 / rate
20
* - poisson(mean): mean
21
* - bernoulli(p): p
22
* - binomial(n, p): n * p
23
* - gamma(shape, scale): shape * scale
24
* - lognormal(logscale, shape): exp(logscale + shape^2 / 2)
25
* - geometric(p): (1 - p) / p
26
*/
27
class
ExpectedValueFactory
{
28
public
:
29
/**
30
* @brief Register all expected value functions with the given LIMEX handle.
31
*/
32
void
registerFunctions
(LIMEX::Handle<double>& handle);
33
};
34
35
}
// namespace BPMNOS
36
37
#endif
// BPMNOS_Model_ExpectedValueFactory_H
BPMNOS::ExpectedValueFactory
Factory for expected value functions in LIMEX expressions.
Definition
ExpectedValueFactory.h:27
BPMNOS::ExpectedValueFactory::registerFunctions
void registerFunctions(LIMEX::Handle< double > &handle)
Register all expected value functions with the given LIMEX handle.
Definition
ExpectedValueFactory.cpp:7
BPMNOS
Definition
DecisionTask.h:10