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

Skip to content
Snippets Groups Projects
Commit 7a542ac4 authored by Raphael LUZ's avatar Raphael LUZ
Browse files

make it compile again

parent 239c4b56
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,6 @@ namespace TUGraz.VectoCore.Models.Connector.Ports
/// <param name="dt">[s]</param>
/// <param name="torque">[Nm]</param>
/// <param name="angularVelocity">[rad/s]</param>
IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, RadianPerSecond angularVelocity);
IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond angularVelocity);
}
}
\ No newline at end of file
......@@ -61,7 +61,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
Contract.Requires(data != null);
return (from DataRow row in data.Rows
select new FullLoadCurveEntry {
EngineSpeed = row.ParseDouble(Fields.EngineSpeed).SI().Rounds.Per.Minute.To<RadianPerSecond>(),
EngineSpeed = row.ParseDouble(Fields.EngineSpeed).SI().Rounds.Per.Minute.To<PerSecond>(),
TorqueFullLoad = row.ParseDouble(Fields.TorqueFullLoad).SI<NewtonMeter>(),
TorqueDrag = row.ParseDouble(Fields.TorqueDrag).SI<NewtonMeter>(),
PT1 = row.ParseDouble(Fields.PT1).SI<Second>()
......@@ -73,7 +73,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
Contract.Requires(data != null);
return (from DataRow row in data.Rows
select new FullLoadCurveEntry {
EngineSpeed = row.ParseDouble(0).SI().Rounds.Per.Minute.To<RadianPerSecond>(),
EngineSpeed = row.ParseDouble(0).SI().Rounds.Per.Minute.To<PerSecond>(),
TorqueFullLoad = row.ParseDouble(1).SI<NewtonMeter>(),
TorqueDrag = row.ParseDouble(2).SI<NewtonMeter>(),
PT1 = row.ParseDouble(3).SI<Second>()
......@@ -85,7 +85,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
/// </summary>
/// <param name="angularFrequency">[rad/s]</param>
/// <returns>[Nm]</returns>
public NewtonMeter FullLoadStationaryTorque(RadianPerSecond angularFrequency)
public NewtonMeter FullLoadStationaryTorque(PerSecond angularFrequency)
{
var idx = FindIndex(angularFrequency);
return VectoMath.Interpolate((double) _entries[idx - 1].EngineSpeed, (double) _entries[idx].EngineSpeed,
......@@ -98,7 +98,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
/// </summary>
/// <param name="angularFrequency">[rad/s]</param>
/// <returns>[W]</returns>
public Watt FullLoadStationaryPower(RadianPerSecond angularFrequency)
public Watt FullLoadStationaryPower(PerSecond angularFrequency)
{
return Formulas.TorqueToPower(FullLoadStationaryTorque(angularFrequency), angularFrequency);
}
......@@ -108,7 +108,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
/// </summary>
/// <param name="angularFrequency">[rad/s]</param>
/// <returns>[Nm]</returns>
public NewtonMeter DragLoadStationaryTorque(RadianPerSecond angularFrequency)
public NewtonMeter DragLoadStationaryTorque(PerSecond angularFrequency)
{
var idx = FindIndex(angularFrequency);
return VectoMath.Interpolate((double) _entries[idx - 1].EngineSpeed, (double) _entries[idx].EngineSpeed,
......@@ -121,7 +121,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
/// </summary>
/// <param name="angularFrequency">[rad/s]</param>
/// <returns>[W]</returns>
public Watt DragLoadStationaryPower(RadianPerSecond angularFrequency)
public Watt DragLoadStationaryPower(PerSecond angularFrequency)
{
Contract.Requires(angularFrequency.HasEqualUnit(new SI().Radian.Per.Second));
Contract.Ensures(Contract.Result<SI>().HasEqualUnit(new SI().Watt));
......@@ -196,7 +196,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
/// <summary>
/// [rad/s] engine speed
/// </summary>
public RadianPerSecond EngineSpeed { get; set; }
public PerSecond EngineSpeed { get; set; }
/// <summary>
/// [Nm] full load torque
......
......@@ -55,7 +55,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
#region IEngineCockpit
RadianPerSecond IEngineCockpit.EngineSpeed()
public PerSecond EngineSpeed()
{
return _previousState.EngineSpeed;
......@@ -74,7 +74,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
#region ITnOutPort
IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, RadianPerSecond engineSpeed)
IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed)
{
_currentState.EngineSpeed = engineSpeed;
_currentState.AbsTime = absTime;
......
......@@ -44,11 +44,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
_outPort = other;
}
public IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed)
#endregion
#region ITnOutPort
IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, RadianPerSecond engineSpeed)
IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed)
{
if (_outPort == null) {
Log.ErrorFormat("{0} cannot handle incoming request - no outport available", absTime);
......
......@@ -47,11 +47,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
_outPort = other;
}
public IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed)
#endregion
#region ITnOutPort
IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, RadianPerSecond engineSpeed)
IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed)
{
if (_outPort == null) {
Log.ErrorFormat("{0} cannot handle incoming request - no outport available", absTime);
......
......@@ -36,11 +36,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
throw new NotImplementedException();
}
public IResponse Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed)
#endregion
#region ITnOutPort
IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, RadianPerSecond engineSpeed)
IResponse ITnOutPort.Request(TimeSpan absTime, TimeSpan dt, NewtonMeter torque, PerSecond engineSpeed)
{
throw new NotImplementedException();
}
......
......@@ -122,8 +122,10 @@
<Compile Include="Models\SimulationComponent\Data\DrivingCycleData.cs" />
<Compile Include="Models\SimulationComponent\Data\Engine\FuelConsumptionMap.cs" />
<Compile Include="Models\SimulationComponent\Data\Engine\FullLoadCurve.cs" />
<Compile Include="Models\SimulationComponent\IClutch.cs" />
<Compile Include="Models\SimulationComponent\IEngineOnlyDrivingCycle.cs" />
<Compile Include="Models\SimulationComponent\IDriverDemandDrivingCycle.cs" />
<Compile Include="Models\SimulationComponent\Impl\Clutch.cs" />
<Compile Include="Utils\Formulas.cs" />
<Compile Include="Utils\IntExtensionMethods.cs" />
<Compile Include="Utils\SI.cs" />
......
......@@ -34,7 +34,7 @@ namespace TUGraz.VectoCore.Tests.Integration.EngineOnlyCycle
var engine = new CombustionEngine(vehicle, engineData);
aux.InShaft().Connect(engine.OutShaft());
gearbox.Connect(aux.OutShaft());
gearbox.InShaft().Connect(aux.OutShaft());
var port = aux.OutShaft();
// IVectoJob job = SimulationFactory.CreateTimeBasedEngineOnlyJob(TestContext.DataRow["EngineFile"].ToString(),
......
......@@ -41,10 +41,6 @@ namespace TUGraz.VectoCore.Tests.Utils
throw new NotImplementedException();
}
public void Connect(IOutPort other)
{
throw new NotImplementedException();
}
public override void CommitSimulationStep(IModalDataWriter writer) {}
}
......
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