Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 21e6e461 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

add a name attribute to the distance-run (to know which cycle/loading...

add a name attribute to the distance-run (to know which cycle/loading combination is currently running)
parent 7d1ca986
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,12 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
{
public class DistanceRun : VectoRun
{
public DistanceRun(IVehicleContainer container) : base(container) {}
public string Name { get; protected set; }
public DistanceRun(string name, IVehicleContainer container) : base(container)
{
Name = name;
}
protected override IResponse DoSimulationStep()
{
......@@ -48,6 +53,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
protected override IResponse Initialize()
{
Log.Info("Starting {0}", Name);
return CyclePort.Initialize();
}
}
......
......@@ -71,7 +71,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
if (data.IsEngineOnly) {
run = new TimeRun(builder.Build(data));
} else {
run = new DistanceRun(builder.Build(data));
var runCaption = string.Format("Cycle: {0} Loading: {1}", data.Cycle.Name, data.ModFileSuffix);
run = new DistanceRun(runCaption, builder.Build(data));
}
yield return run;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment