Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 3ea516ef authored by Michael KRISPER's avatar Michael KRISPER
Browse files

PCCSegmentPreProcessor: changed to debug.writeline to console.writeline with conditional("DEBUG")

parent 83d2e03e
No related branches found
No related tags found
No related merge requests found
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using TUGraz.VectoCommon.InputData;
......@@ -30,8 +31,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
var maxSpeed = VectoMath.Max(Container.VehicleInfo.MaxVehicleSpeed, Container.RunData.Cycle.Entries.Max(x => x.VehicleTargetSpeed));
var preProcessor = new PCCEcoRollEngineStopPreprocessor(Container, slopes, PCCDriverData.MinSpeed, maxSpeed);
preProcessor.RunPreprocessing();
Debug.WriteLine("Slopes:\n" + string.Join("\n", slopes.Select(p => $"{p.Key.Value()}\t{p.Value.Value()}")));
DebugWriteLine("Slopes:\n" + string.Join("\n", slopes.Select(p => $"{p.Key.Value():F}\t{Math.Tan(p.Value.Value()):P}")));
var runData = Container.RunData;
......@@ -119,6 +120,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
}
}
}
[Conditional("DEBUG")]
private static void DebugWriteLine(object value) => Console.WriteLine(value);
}
}
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