Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

updated cycles due to stricter cycle format check

parent 1041a7e3
No related branches found
No related tags found
No related merge requests found
......@@ -161,38 +161,6 @@ namespace TUGraz.VectoCore.Tests.Models.Simulation
AssertHelper.AreRelativeEqual(-0.000202379727237.SI<Radian>(), outPort.Gradient);
}
[TestMethod]
public void Test_TimeBased_TimeFieldMissing()
{
var container = new VehicleContainer(new MockModalDataContainer());
var cycleData = DrivingCycleDataReader.ReadFromFile(@"TestData\Cycles\Cycle time field missing.vdri",
CycleType.MeasuredSpeed, false);
var cycle = new TimeBasedDrivingCycle(container, cycleData);
var outPort = new MockDrivingCycleOutPort();
var inPort = cycle.InPort();
var cycleOut = cycle.OutPort();
inPort.Connect(outPort);
var absTime = 0.SI<Second>();
var dt = 1.SI<Second>();
while (cycleOut.Request(absTime, dt) is ResponseSuccess) {
Assert.AreEqual(absTime, outPort.AbsTime);
Assert.AreEqual(dt, outPort.Dt);
var time = absTime + dt / 2;
var simulationInterval = dt;
container.CommitSimulationStep(time, simulationInterval);
absTime += dt;
}
}
[TestMethod]
public void DrivingCycle_AutoDetect()
{
......
<t>,<v>,<grad>,<n>,<Padd>,<Aux_ALT1>,<Aux_ALT2>,<Aux_ALT3>
0,0,-0.020237973,2,6.1,0.25,0.25,0.25
\ No newline at end of file
<t>,<v>,<grad>,<Padd>,<Aux_ALT1>,<Aux_ALT2>,<Aux_ALT3>
0,0,-0.020237973,6.1,0.25,0.25,0.25
\ No newline at end of file
<t> , <v> , <grad> , <n> , <Padd> , <Aux_ALT1> , <Aux_ALT2> , <Aux_ALT3>
0 , 0 , -0.020237973 , 2 , 6.1 , 0 , 0.25 , 0.25
1 , 64 , -0.020237973 , 0 , 3.1 , 0.3724 , 0.25 , 0.25
2 , 64 , -0.020237973 , 0 , 2.3 , 0.4802 , 0.25 , 0.25
3 , 64 , -0.020237973 , 0 , 4.5 , 0.6272 , 0.25 , 0.25
4 , 64 , -0.020237973 , 0 , 6.1 , 0.735 , 0.25 , 0.25
5 , 64 , -0.020237973 , 0 , 6.1 , 1.0976 , 0.25 , 0.25
6 , 64 , -0.020237973 , 0 , 6.1 , 1.3916 , 0.25 , 0.25
7 , 64 , -0.020237973 , 0 , 6.1 , 1.6464 , 0.25 , 0.25
8 , 64 , -0.020237973 , 0 , 6.1 , 1.911 , 0.25 , 0.25
9 , 64 , -0.020237973 , 0 , 6.1 , 2.0776 , 0.25 , 0.25
10 , 64 , -0.020237973 , 0 , 6.1 , 2.254 , 0.25 , 0.25
\ No newline at end of file
<t> , <v> , <grad> , <Padd> , <Aux_ALT1> , <Aux_ALT2> , <Aux_ALT3>
0 , 0 , -0.020237973 , 6.1 , 0 , 0.25 , 0.25
1 , 64 , -0.020237973 , 3.1 , 0.3724 , 0.25 , 0.25
2 , 64 , -0.020237973 , 2.3 , 0.4802 , 0.25 , 0.25
3 , 64 , -0.020237973 , 4.5 , 0.6272 , 0.25 , 0.25
4 , 64 , -0.020237973 , 6.1 , 0.735 , 0.25 , 0.25
5 , 64 , -0.020237973 , 6.1 , 1.0976 , 0.25 , 0.25
6 , 64 , -0.020237973 , 6.1 , 1.3916 , 0.25 , 0.25
7 , 64 , -0.020237973 , 6.1 , 1.6464 , 0.25 , 0.25
8 , 64 , -0.020237973 , 6.1 , 1.911 , 0.25 , 0.25
9 , 64 , -0.020237973 , 6.1 , 2.0776 , 0.25 , 0.25
10 , 64 , -0.020237973 , 6.1 , 2.254 , 0.25 , 0.25
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment