2using System.Threading.Tasks;
16 private double timeCycleUnits;
31 public string Id => this.id;
36 public double N => this.n;
47 public override Task
FromXml(XmlElement Definition)
52 return Task.CompletedTask;
63 return base.Initialize();
73 public virtual int CheckTrigger(
double t1,
double t2,
int NrCycles)
116 this.exported =
true;
121 private bool exported;
129 Output.Append(this.
id);
130 Output.Append(
"PDF(t):=");
138 Output.AppendLine(
");");
Root node of a simulation model
void Register(IDistribution Distribution)
Registers a distribution with the runtime environment of the model.
double TimeCycleUnits
Time cycle, in number of TimeUnit.
double GetRandomDouble()
Generates a new floating-point value between 0 and 1, using a cryptographic random number generator.
Abstract base class for distributions
virtual void ExportPdf(StringBuilder Output)
Exports the PDF function.
virtual int CheckTrigger(double t1, double t2, int NrCycles)
Check if distribution has a sample within the time period.
abstract void ExportPdfBody(StringBuilder Output)
Exports the PDF function body.
string Id
ID of distribution.
double N
Intensity/Frequency/Factor
abstract double GetCumulativeProbability(double t, int NrCycles)
The Cumulative Distribution Function (CDF) of the distribution, excluding intensity (N).
double TimeCycleUnits
Time cycle, in number of Model.TimeUnit.
Distribution(ISimulationNode Parent, Model Model)
Abstract base class for distributions
override Task FromXml(XmlElement Definition)
Sets properties and attributes of class in accordance with XML definition.
void ExportPdfOnceOnly(StringBuilder Output)
Exports the PDF function, if not already exported.
override Task Initialize()
Initialized the node before simulation.
Abstract base class for simulation nodes
ISimulationNode Parent
Parent node in the simulation model.
Helps with parsing of commong data types.
static string Encode(bool x)
Encodes a Boolean for use in XML and other formats.
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
Interface for distributions