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 a6bf95ca authored by Michael KRISPER's avatar Michael KRISPER
Browse files

added ultimate pwheel sico test

parent 97e2b17e
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public PWheelCycle(IVehicleContainer container, DrivingCycleData cycle, double axleRatio,
IDictionary<uint, double> gears) : base(container, cycle)
{
if (!gears.ContainsKey(0)) {
gears[0] = 1;
}
foreach (var entry in Data.Entries) {
entry.AngularVelocity = entry.AngularVelocity / (axleRatio * gears[entry.Gear]);
entry.Torque = entry.PWheel / entry.AngularVelocity;
......
......@@ -3,6 +3,7 @@ using System.Text;
using TUGraz.VectoCore.Utils;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using TUGraz.VectoCore.OutputData;
using TUGraz.VectoCore.Tests.Utils;
using TUGraz.VectoCore.InputData.Reader;
......@@ -118,10 +119,38 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
jobContainer.WaitFinished();
Assert.IsTrue(jobContainer.Runs.All(r => r.Success));
ResultFileHelper.TestSumFile(@"TestData\Results\Pwheel\Atego_ges.v2.vsum", @"TestData\Jobs\Pwheel.vsum");
ResultFileHelper.TestModFile(@"TestData\Results\Pwheel\Atego_ges_Gear2_pt1_rep1_actual.vmod",
@"TestData\Jobs\Pwheel_Gear2_pt1_rep1_actual.vmod");
}
/// <summary>
/// Tests if the simulation works and the modfile and sumfile are correct in Pwheel mode.
/// </summary>
/// <remarks>VECTO-177</remarks>
[TestMethod]
public void Pwheel_ultimate_Run_Test()
{
var jobFile = @"TestData\Jobs\Pwheel_ultimate.vecto";
var fileWriter = new FileOutputWriter(jobFile);
var sumWriter = new SummaryDataContainer(fileWriter);
var jobContainer = new JobContainer(sumWriter);
var inputData = JSONInputDataFactory.ReadJsonJob(jobFile);
var runsFactory = new SimulatorFactory(ExecutionMode.Engineering, inputData, fileWriter);
jobContainer.AddRuns(runsFactory);
jobContainer.Execute();
jobContainer.WaitFinished();
Assert.IsTrue(jobContainer.Runs.All(r => r.Success));
ResultFileHelper.TestModFile(@"TestData\Results\Pwheel\Atego_HDVCO2_RD_#1_AuxStd.vmod",
@"TestData\Jobs\Pwheel_ultimate_RD_#1_Pwheel_AuxStd.vmod");
}
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "TUG ITI (59f3bd5f-1e50-474f-928a-435968d769f6)",
"Date": "23.11.2015 10:27:34",
"AppVersion": "2.2",
"FileVersion": 2
},
"Body": {
"SavedInDeclMode": false,
"VehicleFile": "../Components/Pwheel/Atego.vveh",
"EngineFile": "../Components/Pwheel/OM906.veng",
"GearboxFile": "../Components/Pwheel/G_85-6_6_7-0_17.vgbx",
"Cycles": [
"../Components/Pwheel/RD_#1_Pwheel_AuxStd.vdri"
],
"VACC": "../Components/Pwheel/Truck.vacc",
"EngineOnlyMode": false,
"StartStop": {
"Enabled": false,
"MaxSpeed": 5.0,
"MinTime": 5.0,
"Delay": 0
},
"LAC": {
"Enabled": true,
"Dec": -0.5,
"MinSpeed": 50.0
},
"OverSpeedEcoRoll": {
"Mode": "Off",
"MinSpeed": 0.0,
"OverSpeed": 0.0,
"UnderSpeed": 0.0
}
}
}
\ No newline at end of file
......@@ -797,6 +797,9 @@
<None Include="TestData\Jobs\EngineOnlyJob.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Jobs\Pwheel_ultimate.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="TestData\Jobs\Pwheel.vecto">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
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