Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Activities.cs
1using System;
2using System.Collections.Generic;
3using System.IO;
4using System.Threading.Tasks;
5
7{
12 {
19 : base(Parent, Model)
20 {
21 }
22
26 public override string LocalName => nameof(Activities);
27
35 {
36 return new Activities(Parent, Model);
37 }
38
43 public string[] ActivityOrder()
44 {
45 List<string> Order = new List<string>();
46
47 foreach (ISimulationNode Node in this.Children)
48 {
49 if (Node is IActivity Activity)
50 Order.Add(Activity.Id);
51 }
52
53 return Order.ToArray();
54 }
55
60 public override Task ExportMarkdown(StreamWriter Output)
61 {
62 Output.WriteLine("Activities");
63 Output.WriteLine("=============");
64 Output.WriteLine();
65
66 this.Model.ExportActivityStartStatistics(Output);
67
68 return base.ExportMarkdown(Output);
69 }
70
71 }
72}
Root node of a simulation model
Definition: Model.cs:49
string[] ActivityOrder()
Gets the declared order of activities in the model.
Definition: Activities.cs:43
override Task ExportMarkdown(StreamWriter Output)
Exports Markdown
Definition: Activities.cs:60
override string LocalName
Local name of XML element defining contents of class.
Definition: Activities.cs:26
override ISimulationNode Create(ISimulationNode Parent, Model Model)
Creates a new instance of the node.
Definition: Activities.cs:34
Activities(ISimulationNode Parent, Model Model)
Container for activities.
Definition: Activities.cs:18
Represents an activity that can be executed as the result of triggered events.
Definition: Activity.cs:17
Abstract base class for simulation nodes with children
ISimulationNode Parent
Parent node in the simulation model.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...