diff --git a/VectoCore/Models/Connector/Ports/IDriverDemandPort.cs b/VectoCore/Models/Connector/Ports/IDriverDemandPort.cs index e6a7d6c7eaecf2915e13e3ac12a0b66e300f99e8..fc130fd07e488815bff1f40a7479b1c8cd6077b1 100644 --- a/VectoCore/Models/Connector/Ports/IDriverDemandPort.cs +++ b/VectoCore/Models/Connector/Ports/IDriverDemandPort.cs @@ -54,5 +54,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports /// <param name="acceleration">[m/s^2]</param> /// <param name="gradient">[rad]</param> IResponse Request(Second absTime, Second dt, MeterPerSquareSecond acceleration, Radian gradient); + + IResponse Initialize(); } } \ No newline at end of file diff --git a/VectoCore/Models/Connector/Ports/IDrivingCyclePort.cs b/VectoCore/Models/Connector/Ports/IDrivingCyclePort.cs index 37ffe6ac786aa6fbd850cfba2b4d1664fbc6573e..ba08c8a9d5198cc21d89035a1901d931007d9060 100644 --- a/VectoCore/Models/Connector/Ports/IDrivingCyclePort.cs +++ b/VectoCore/Models/Connector/Ports/IDrivingCyclePort.cs @@ -65,5 +65,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports /// <param name="gradient"></param> /// <returns></returns> IResponse Request(Second absTime, Second dt, MeterPerSecond targetVelocity, Radian gradient); + + IResponse Initialize(); } } \ No newline at end of file diff --git a/VectoCore/Models/Connector/Ports/IFvPort.cs b/VectoCore/Models/Connector/Ports/IFvPort.cs index 9589457820ac3a790f3efa56885efe9d68b3d32d..032d9e44437b8e65676f5884c26f250cd3c95bb6 100644 --- a/VectoCore/Models/Connector/Ports/IFvPort.cs +++ b/VectoCore/Models/Connector/Ports/IFvPort.cs @@ -54,5 +54,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports /// <param name="force">[N]</param> /// <param name="velocity">[m/s]</param> IResponse Request(Second absTime, Second dt, Newton force, MeterPerSecond velocity); + + IResponse Initialize(); } } \ No newline at end of file diff --git a/VectoCore/Models/Connector/Ports/ITnPort.cs b/VectoCore/Models/Connector/Ports/ITnPort.cs index c3d74a248578763231e774a85865c8d01c074d7c..8852af31ee520fbd6d265bc6a49bf3964f45b0ff 100644 --- a/VectoCore/Models/Connector/Ports/ITnPort.cs +++ b/VectoCore/Models/Connector/Ports/ITnPort.cs @@ -55,5 +55,7 @@ namespace TUGraz.VectoCore.Models.Connector.Ports /// <param name="torque">[Nm]</param> /// <param name="angularVelocity">[rad/s]</param> IResponse Request(Second absTime, Second dt, NewtonMeter torque, PerSecond angularVelocity); + + IResponse Initialize(); } } \ No newline at end of file diff --git a/VectoCore/Models/Simulation/Impl/VectoRun.cs b/VectoCore/Models/Simulation/Impl/VectoRun.cs index ee2931f0238ee89295818f7ec9b6f130b3bc777d..b6feaf95763ddc640450128ca5f386f3eb6816fc 100644 --- a/VectoCore/Models/Simulation/Impl/VectoRun.cs +++ b/VectoCore/Models/Simulation/Impl/VectoRun.cs @@ -16,7 +16,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl protected Second dt = 1.SI<Second>(); - public VectoRun(IVehicleContainer container) + protected VectoRun(IVehicleContainer container) { Container = container; CyclePort = container.GetCycleOutPort(); @@ -42,7 +42,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl LogManager.GetLogger(GetType()).Info("VectoJob started running."); IResponse response; - + Initialize(); do { response = DoSimulationStep(); if (response.ResponseType == ResponseType.Success) { diff --git a/VectoCore/Models/SimulationComponent/Impl/AxleGear.cs b/VectoCore/Models/SimulationComponent/Impl/AxleGear.cs index d85153b4c853ab3afb0bb74f2fca14dec5048009..17c05816687363a520f3b6e00bed9413d87c0e5b 100644 --- a/VectoCore/Models/SimulationComponent/Impl/AxleGear.cs +++ b/VectoCore/Models/SimulationComponent/Impl/AxleGear.cs @@ -39,6 +39,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl angularVelocity * _gearData.Ratio); } + public IResponse Initialize() + { + return _nextComponent.Initialize(); + } + protected override void DoWriteModalResults(IModalDataWriter writer) { // nothing to write diff --git a/VectoCore/Models/SimulationComponent/Impl/Clutch.cs b/VectoCore/Models/SimulationComponent/Impl/Clutch.cs index 3b29a40f6256d7347e97133b73d1b28bf323a535..ada8fd0d883696d4d4ee8b75dc1321d721cb6056 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Clutch.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Clutch.cs @@ -37,13 +37,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl protected override void DoWriteModalResults(IModalDataWriter writer) { - throw new NotImplementedException(); + // TODO: @@@ + writer[ModalResultField.Pe_clutch] = 0; } protected override void DoCommitSimulationStep() { //todo: implement! - throw new NotImplementedException(); + //throw new NotImplementedException(); } public ITnInPort InPort() @@ -88,6 +89,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return _nextComponent.Request(absTime, dt, torqueIn, engineSpeedIn); } + public IResponse Initialize() + { + return _nextComponent.Initialize(); + } + public void Connect(ITnOutPort other) { _nextComponent = other; diff --git a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs index 04941919258dcce1ed781f167cdb8964f650c123..86fc3ca0ee84052f41d7be3514658e19146d65eb 100644 --- a/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs +++ b/VectoCore/Models/SimulationComponent/Impl/CombustionEngine.cs @@ -83,7 +83,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl _currentState.EnginePowerLoss = InertiaPowerLoss(torque, engineSpeed); var requestedEnginePower = requestedPower + _currentState.EnginePowerLoss; - if (engineSpeed < (double)_data.IdleSpeed - EngineIdleSpeedStopThreshold) { + if (engineSpeed < _data.IdleSpeed.Value() - EngineIdleSpeedStopThreshold) { _currentState.OperationMode = EngineOperationMode.Stopped; //todo: _currentState.EnginePowerLoss = enginePowerLoss; } @@ -107,6 +107,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return new ResponseSuccess(); } + public IResponse Initialize() + { + // Todo: @@@quam + _previousState = new EngineState() { + EngineSpeed = _data.IdleSpeed, + EnginePower = 0.SI<Watt>(), + dt = 1.SI<Second>(), + }; + //_currentState + return new ResponseSuccess(); + } + #endregion #region VectoSimulationComponent diff --git a/VectoCore/Models/SimulationComponent/Impl/DirectAuxiliary.cs b/VectoCore/Models/SimulationComponent/Impl/DirectAuxiliary.cs index 2ea6f21c06629f08cbd8d2f884774c49e14fde5e..f5eb8b25c652eeef56559120bd6db6a59b2017e0 100644 --- a/VectoCore/Models/SimulationComponent/Impl/DirectAuxiliary.cs +++ b/VectoCore/Models/SimulationComponent/Impl/DirectAuxiliary.cs @@ -63,6 +63,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return _outPort.Request(absTime, dt, torque + tq, engineSpeed); } + public IResponse Initialize() + { + return _outPort.Initialize(); + } + #endregion #region VectoSimulationComponent diff --git a/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs b/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs index 9821ec7e20a6fa154547e9171363165dd9e81a51..8657154618af522f3fdc692459232b1486e9a2c6 100644 --- a/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs +++ b/VectoCore/Models/SimulationComponent/Impl/DistanceBasedDrivingCycle.cs @@ -112,8 +112,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl CurrentState.AbsTime = PreviousState.AbsTime + dt; CurrentState.WaitTime = PreviousState.WaitTime + dt; - return _outPort.Request((Second)absTime, (Second)dt, - CycleIntervalIterator.LeftSample.VehicleTargetSpeed, ComputeGradient()); + return _outPort.Request(absTime, dt, CycleIntervalIterator.LeftSample.VehicleTargetSpeed, ComputeGradient()); } private IResponse DriveDistance(Second absTime, Meter ds) @@ -157,8 +156,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl Altitude = first.Altitude, }; CurrentState = PreviousState.Clone(); - return new ResponseSuccess(); - //TODO: return _outPort.Initialize(); + //return new ResponseSuccess(); + return _outPort.Initialize(); } #endregion diff --git a/VectoCore/Models/SimulationComponent/Impl/Driver.cs b/VectoCore/Models/SimulationComponent/Impl/Driver.cs index be635b1d8da954120d9df155b643af2d77b290ce..228e4c3c7bb668f1f696b930508c625cab9041be 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Driver.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Driver.cs @@ -56,6 +56,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return retVal; } + public IResponse Initialize() + { + return Next.Initialize(); + } + protected IResponse DoHandleRequest(Second absTime, Meter ds, MeterPerSecond targetVelocity, Radian gradient) { @@ -103,7 +108,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl if (!targetVelocity.IsEqual(0) || !Cockpit.VehicleSpeed().IsEqual(0)) { throw new NotImplementedException("TargetVelocity or VehicleVelocity is not zero!"); } - return Next.Request(absTime, dt, 0.SI<MeterPerSquareSecond>(), gradient); + var retVal = Next.Request(absTime, dt, 0.SI<MeterPerSquareSecond>(), gradient); + retVal.SimulationInterval = dt; + return retVal; } diff --git a/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs b/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs index 8b50b510be505c8ddac485c94711c64998f6ce8d..b40fa433c490e29532c00bd40e0304b449674ab5 100644 --- a/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs +++ b/VectoCore/Models/SimulationComponent/Impl/EngineOnlyGearbox.cs @@ -62,6 +62,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return _outPort.Request(absTime, dt, torque, engineSpeed); } + public IResponse Initialize() + { + return _outPort.Initialize(); + } + #endregion #region VectoSimulationComponent diff --git a/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs b/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs index 5c59ce99a3450fdd70336d349a1651fc45dc5c33..1716c90aaf7555be2ee4604fd6da1fbf1c2617b7 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Gearbox.cs @@ -53,6 +53,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl throw new NotImplementedException(); } + public IResponse Initialize() + { + return Next.Initialize(); + } + #endregion #region ITnInPort diff --git a/VectoCore/Models/SimulationComponent/Impl/MappingAuxiliary.cs b/VectoCore/Models/SimulationComponent/Impl/MappingAuxiliary.cs index 22d8eb3036d7e45a83fb9e97ab0943e547d16cca..940266f1fd9911483144bfafe37b4671079d1ab0 100644 --- a/VectoCore/Models/SimulationComponent/Impl/MappingAuxiliary.cs +++ b/VectoCore/Models/SimulationComponent/Impl/MappingAuxiliary.cs @@ -91,6 +91,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return _outPort.Request(absTime, dt, torque + torque_aux, angularVelocity); } + public IResponse Initialize() + { + return _outPort.Initialize(); + } + #endregion #region VectoSimulationComponent diff --git a/VectoCore/Models/SimulationComponent/Impl/Retarder.cs b/VectoCore/Models/SimulationComponent/Impl/Retarder.cs index bbbc828e4d3e9167a1354a45ef99c306d9929825..8aeba2624f6fe1bcf3ba57f679a8de1ddc24f5ca 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Retarder.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Retarder.cs @@ -52,5 +52,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return _nextComponent.Request(absTime, dt, torque + retarderTorqueLoss, angularVelocity); } + + public IResponse Initialize() + { + return _nextComponent.Initialize(); + } } } \ No newline at end of file diff --git a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs index 40d056871fe62dc20fc6ef7711e679004a5b8fc3..7f7fa029a0051e7b219924386bf7aa6133a70ce1 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Vehicle.cs @@ -45,7 +45,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl protected override void DoWriteModalResults(IModalDataWriter writer) { - throw new NotImplementedException(); + writer[ModalResultField.v_act] = (_previousState.Velocity + _currentState.Velocity) / 2; } protected override void DoCommitSimulationStep() @@ -66,6 +66,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return _nextInstance.Request(absTime, dt, vehicleAccelerationForce, _currentState.Velocity); } + public IResponse Initialize() + { + return _nextInstance.Initialize(); + } + protected Newton RollingResistance(Radian gradient) { return (Math.Cos(gradient.Value()) * _data.TotalVehicleWeight() * diff --git a/VectoCore/Models/SimulationComponent/Impl/Wheels.cs b/VectoCore/Models/SimulationComponent/Impl/Wheels.cs index 1d998f4f69d14dd85aaf14a083ba760b5e20b58a..2929dda5b6c99da35e463dac73691fe89085c138 100644 --- a/VectoCore/Models/SimulationComponent/Impl/Wheels.cs +++ b/VectoCore/Models/SimulationComponent/Impl/Wheels.cs @@ -44,6 +44,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return _outPort.Request(absTime, dt, torque, angularVelocity); } + public IResponse Initialize() + { + return _outPort.Initialize(); + } + #endregion #region ITnInPort @@ -59,12 +64,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl protected override void DoWriteModalResults(IModalDataWriter writer) { - throw new NotImplementedException(); + // noting to write... } protected override void DoCommitSimulationStep() { - throw new NotImplementedException(); + // nothing to commit } #endregion diff --git a/VectoCoreTest/Integration/SimulationRuns/MinimalPowertrain.cs b/VectoCoreTest/Integration/SimulationRuns/MinimalPowertrain.cs index 5c50b3aeae80ba042755db62801548a7745f7905..d8e30f7db92d9312df001a8a9b736ce7ee82a3fb 100644 --- a/VectoCoreTest/Integration/SimulationRuns/MinimalPowertrain.cs +++ b/VectoCoreTest/Integration/SimulationRuns/MinimalPowertrain.cs @@ -3,7 +3,9 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using TUGraz.VectoCore.FileIO.Reader; using TUGraz.VectoCore.FileIO.Reader.Impl; using TUGraz.VectoCore.Models.Connector.Ports; +using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Declaration; +using TUGraz.VectoCore.Models.Simulation.Data; using TUGraz.VectoCore.Models.Simulation.Impl; using TUGraz.VectoCore.Models.SimulationComponent; using TUGraz.VectoCore.Models.SimulationComponent.Data; @@ -20,6 +22,8 @@ namespace TUGraz.VectoCore.Tests.Integration.SimulationRuns public const string CycleFile = @"TestData\Cycles\Coach_24t_xshort.vdri"; public const string EngineFile = @"TestData\Components\24t Coach.veng"; + public const string AccelerationFile = @"TestData\Components\Truck.vacc"; + [TestMethod] public void TestWheelsAndEngine() { @@ -39,18 +43,59 @@ namespace TUGraz.VectoCore.Tests.Integration.SimulationRuns SavedInDeclarationMode = false, }; - var vehicleContainer = new VehicleContainer(); + var driverData = new DriverData() { + AccelerationCurve = AccelerationCurveData.ReadFromFile(AccelerationFile), + LookAheadCoasting = new DriverData.LACData() { + Enabled = false, + }, + OverSpeedEcoRoll = new DriverData.OverSpeedEcoRollData() { + Mode = DriverData.DriverMode.Off + }, + StartStop = new VectoRunData.StartStopData() { + Enabled = false, + } + }; + + var modalWriter = new TestModalDataWriter(); + var sumWriter = new TestSumWriter(); + var vehicleContainer = new VehicleContainer(modalWriter, sumWriter); var cycle = new DistanceBasedDrivingCycle(vehicleContainer, cycleData); - dynamic tmp = AddComponent(cycle, new MockDriver(vehicleContainer)); + dynamic tmp = AddComponent(cycle, new Driver(vehicleContainer, driverData)); tmp = AddComponent(tmp, new Vehicle(vehicleContainer, vehicleData)); tmp = AddComponent(tmp, new Wheels(vehicleContainer, vehicleData.DynamicTyreRadius)); + tmp = AddComponent(tmp, new Clutch(vehicleContainer, engineData)); AddComponent(tmp, new CombustionEngine(vehicleContainer, engineData)); - var run = new DistanceRun(vehicleContainer); + var gbx = new DummyGearbox(vehicleContainer); + + var cyclePort = cycle.OutPort(); + + cyclePort.Initialize(); + + gbx.CurrentGear = 0; + + var absTime = 0.SI<Second>(); + var response = cyclePort.Request(absTime, 1.SI<Meter>()); - run.Run(); + Assert.IsInstanceOfType(response, typeof(ResponseSuccess)); + + vehicleContainer.CommitSimulationStep(absTime, response.SimulationInterval); + + gbx.CurrentGear = 1; + + for (int i = 0; i < 10; i++) { + absTime += response.SimulationInterval; + + response = cyclePort.Request(absTime, 1.SI<Meter>()); + + Assert.IsInstanceOfType(response, typeof(ResponseSuccess)); + + vehicleContainer.CommitSimulationStep(absTime, response.SimulationInterval); + } + //var run = new DistanceRun(vehicleContainer); + //run.Run(); } @@ -75,10 +120,10 @@ namespace TUGraz.VectoCore.Tests.Integration.SimulationRuns } - protected virtual void AddComponent(IWheels prev, ITnOutProvider next) + protected virtual ITnOutProvider AddComponent(IWheels prev, ITnOutProvider next) { prev.InPort().Connect(next.OutPort()); - //return next; + return next; } protected virtual IPowerTrainComponent AddComponent(IPowerTrainComponent prev, IPowerTrainComponent next) diff --git a/VectoCoreTest/Models/SimulationComponent/ClutchTest.cs b/VectoCoreTest/Models/SimulationComponent/ClutchTest.cs index 964f96cb773f009669d72aee19fc35d63513c479..59b9d5d2f197f1a23ace3899d0c0e28a54226fca 100644 --- a/VectoCoreTest/Models/SimulationComponent/ClutchTest.cs +++ b/VectoCoreTest/Models/SimulationComponent/ClutchTest.cs @@ -33,24 +33,30 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent //Test - Clutch slipping gearbox.CurrentGear = 1; + + clutchOutPort.Request(0.SI<Second>(), 0.SI<Second>(), 100.SI<NewtonMeter>(), 0.SI<PerSecond>()); + + Assert.AreEqual(0, outPort.Torque.Value(), 0.001); + Assert.AreEqual(62.119969, outPort.AngularVelocity.Value(), 0.001); + clutchOutPort.Request(0.SI<Second>(), 0.SI<Second>(), 100.SI<NewtonMeter>(), 30.SI<PerSecond>()); - Assert.AreEqual(48.293649, (double)outPort.Torque, 0.001); - Assert.AreEqual(62.119969, (double)outPort.AngularVelocity, 0.001); + Assert.AreEqual(48.293649, outPort.Torque.Value(), 0.001); + Assert.AreEqual(62.119969, outPort.AngularVelocity.Value(), 0.001); //Test - Clutch opened gearbox.CurrentGear = 0; clutchOutPort.Request(0.SI<Second>(), 0.SI<Second>(), 100.SI<NewtonMeter>(), 30.SI<PerSecond>()); - Assert.AreEqual(0, (double)outPort.Torque, 0.001); - Assert.AreEqual((double)engineData.IdleSpeed, (double)outPort.AngularVelocity, 0.001); + Assert.AreEqual(0, outPort.Torque.Value(), 0.001); + Assert.AreEqual(engineData.IdleSpeed.Value(), outPort.AngularVelocity.Value(), 0.001); //Test - Clutch closed gearbox.CurrentGear = 1; clutchOutPort.Request(0.SI<Second>(), 0.SI<Second>(), 100.SI<NewtonMeter>(), 80.SI<PerSecond>()); - Assert.AreEqual(100.0, (double)outPort.Torque, 0.001); - Assert.AreEqual(80.0, (double)outPort.AngularVelocity, 0.001); + Assert.AreEqual(100.0, outPort.Torque.Value(), 0.001); + Assert.AreEqual(80.0, outPort.AngularVelocity.Value(), 0.001); } } } \ No newline at end of file diff --git a/VectoCoreTest/TestData/Components/Truck.vacc b/VectoCoreTest/TestData/Components/Truck.vacc new file mode 100644 index 0000000000000000000000000000000000000000..54e77864874d21d67e8f8d69a97b35c5c6031749 --- /dev/null +++ b/VectoCoreTest/TestData/Components/Truck.vacc @@ -0,0 +1,6 @@ +v [km/h],acc [m/s²],dec [m/s²] +0,1,-1 +25,1,-1 +50,0.642857143,-1 +60,0.5,-0.5 +120,0.5,-0.5 diff --git a/VectoCoreTest/Utils/DummyGearbox.cs b/VectoCoreTest/Utils/DummyGearbox.cs index cdd3e105bc0f2f463742521c98404f0283657667..31a9089f671e0a5f75a9eebe3d1696bbe74db448 100644 --- a/VectoCoreTest/Utils/DummyGearbox.cs +++ b/VectoCoreTest/Utils/DummyGearbox.cs @@ -40,10 +40,15 @@ namespace TUGraz.VectoCore.Tests.Utils throw new NotImplementedException(); } + public IResponse Initialize() + { + throw new NotImplementedException(); + } + protected override void DoWriteModalResults(IModalDataWriter writer) { - throw new NotImplementedException(); + // noting to write } protected override void DoCommitSimulationStep() {} diff --git a/VectoCoreTest/Utils/MockDriver.cs b/VectoCoreTest/Utils/MockDriver.cs index 26d22e38499ecee4d745103bd6ecf1708e9f7f80..eadf71d3355c2d5aeb7e9bdb036d7ca8f5b59968 100644 --- a/VectoCoreTest/Utils/MockDriver.cs +++ b/VectoCoreTest/Utils/MockDriver.cs @@ -50,6 +50,11 @@ namespace TUGraz.VectoCore.Tests.Utils return new ResponseSuccess() { SimulationInterval = dt }; //_next.Request(absTime, dt, acc, gradient); } + public IResponse Initialize() + { + return new ResponseSuccess(); + } + public void Connect(IDriverDemandOutPort other) { _next = other; diff --git a/VectoCoreTest/Utils/MockPorts.cs b/VectoCoreTest/Utils/MockPorts.cs index ea50b025d8b53ed208c63b53fb4893533ba0e934..7612c0919cfe47ec1425fd831b94aa6e23b967c4 100644 --- a/VectoCoreTest/Utils/MockPorts.cs +++ b/VectoCoreTest/Utils/MockPorts.cs @@ -23,6 +23,11 @@ namespace TUGraz.VectoCore.Tests.Utils absTime, dt, torque, angularVelocity); return new ResponseSuccess(); } + + public IResponse Initialize() + { + throw new NotImplementedException(); + } } public class MockDrivingCycleOutPort : IDrivingCycleOutPort @@ -55,6 +60,11 @@ namespace TUGraz.VectoCore.Tests.Utils absTime, dt, targetVelocity, gradient); return new ResponseSuccess(); } + + public IResponse Initialize() + { + throw new NotImplementedException(); + } } public class MockFvOutPort : IFvOutPort @@ -75,5 +85,10 @@ namespace TUGraz.VectoCore.Tests.Utils .DebugFormat("Request: abstime: {0}, dt: {1}, force: {2}, velocity: {3}", absTime, dt, force, velocity); return new ResponseSuccess(); } + + public IResponse Initialize() + { + throw new NotImplementedException(); + } } } \ No newline at end of file diff --git a/VectoCoreTest/Utils/MockVehicle.cs b/VectoCoreTest/Utils/MockVehicle.cs index c49232b881b01a96b65a9df7839f90ed7874c132..f1286937521f29f71750676de1697f1063895519 100644 --- a/VectoCoreTest/Utils/MockVehicle.cs +++ b/VectoCoreTest/Utils/MockVehicle.cs @@ -66,6 +66,11 @@ namespace TUGraz.VectoCore.Tests.Utils return new ResponseSuccess(); } + public IResponse Initialize() + { + throw new NotImplementedException(); + } + public class RequestData { public Second abstime; diff --git a/VectoCoreTest/VectoCoreTest.csproj b/VectoCoreTest/VectoCoreTest.csproj index 8c3c045555b00e92a446128f01ceea1ebe52af9b..c27e32e348813a7011952ae5fc4952610608f781 100644 --- a/VectoCoreTest/VectoCoreTest.csproj +++ b/VectoCoreTest/VectoCoreTest.csproj @@ -179,6 +179,9 @@ <None Include="TestData\Components\Retarder.vrlm"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> + <None Include="TestData\Components\Truck.vacc"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="TestData\Cycles\Coach_24t_xshort.vdri"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None>