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

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

corrected test case for pto changes

parent 8ee642be
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use VECTO except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
*
* https://joinup.ec.europa.eu/community/eupl/og_page/eupl
*
* Unless required by applicable law or agreed to in writing, VECTO
......
......@@ -147,7 +147,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
continue;
}
for (var inTorque = engineData.FullLoadCurve.FullLoadStationaryTorque(angularVelocity) / 3;
inTorque < engineData.FullLoadCurve.FullLoadStationaryTorque(angularVelocity);
inTorque += 2.0 / 3.0 * engineData.FullLoadCurve.FullLoadStationaryTorque(angularVelocity) / 10.0) {
......@@ -183,8 +182,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
return
new ValidationResult(
string.Format(
"Interpolation of AxleGear-LossMap failed with torque={0} and angularSpeed={1} (gear={2}, velocity={3})",
axlegearTorque, axleAngularVelocity.ConvertTo().Rounds.Per.Minute, gear.Key, velocity));
"Interpolation of AxleGear-LossMap failed with torque={0} and angularSpeed={1} (gear={2}, velocity={3})",
axlegearTorque, axleAngularVelocity.ConvertTo().Rounds.Per.Minute, gear.Key, velocity));
}
}
}
......@@ -192,7 +191,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
}
}
if (runData.Cycle.Entries.Any(e => e.PTOActive)) {
if (runData.Cycle != null && runData.Cycle.Entries.Any(e => e.PTOActive)) {
if (runData.PTO == null || runData.PTO.PTOCycle == null)
return new ValidationResult("PTOCycle is used in DrivingCycle, but is not defined in Vehicle-Data.");
}
......
......@@ -92,7 +92,8 @@ namespace TUGraz.VectoCore.Utils
/// <param name="fullHeader">set true is column names should be preserved. Otherwise units are trimed away. default: false.</param>
/// <param name="source"></param>
/// <returns>A DataTable which represents the CSV File.</returns>
public static TableData ReadStream(Stream stream, bool ignoreEmptyColumns = false, bool fullHeader = false, string source = null)
public static TableData ReadStream(Stream stream, bool ignoreEmptyColumns = false, bool fullHeader = false,
string source = null)
{
var retVal = new TableData(source);
ReadCSV(retVal, stream, ignoreEmptyColumns, fullHeader);
......
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