Simpact Cyan
Population based event driven simulation using mNRM
|
Starting from a particular hazard, this modified hazard returns a constant value for times larger that a certain value. More...
#include <hazardfunction.h>
Public Member Functions | |
TimeLimitedHazardFunction (HazardFunction &h, double tMax) | |
This constructor specifies that the base hazard h should be used for times smaller than tMax , and that the constant value h(tMax) should be the hazard for times larger than tMax. More... | |
double | evaluate (double t) |
Evaluate the hazard at time t . More... | |
double | calculateInternalTimeInterval (double t0, double dt) |
Map the real-world time dt to an internal time interval. More... | |
double | solveForRealTimeInterval (double t0, double Tdiff) |
For the specified internal time interval Tdiff, calculate the corresponding real-world time interval. More... | |
Starting from a particular hazard, this modified hazard returns a constant value for times larger that a certain value.
The advantage of this, is that hazards which could not be used in the mNRM because a mapping of internal time dT to real-world time dt was impossible, now become useable.
For example, if the hazard is used, there's a problem for the mNRM: in this algorithm, a random number is first picked and then mapped onto a real-world time by solving the following equation for :
Now, the integral of is bounded, with
Because can easily be larger than one, this means that calculating the corresponding value by solving the integral equation above, may simply not be possible.
By using a modified hazard instead, where
this integral becomes solvable again.
For more information, some calculations can be found in hazard_tmax.pdf
|
inline |
This constructor specifies that the base hazard h
should be used for times smaller than tMax
, and that the constant value h(tMax) should be the hazard for times larger than tMax.
|
inlinevirtual |
Map the real-world time dt
to an internal time interval.
This calculates:
Implements HazardFunction.
|
inlinevirtual |
Evaluate the hazard at time t
.
Implements HazardFunction.
|
inlinevirtual |
For the specified internal time interval Tdiff, calculate the corresponding real-world time interval.
This solves the following equation for :
Implements HazardFunction.