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

added files for APTNShiftstrategy and APTNGearbox

parent 75d65677
Branches
Tags
No related merge requests found
...@@ -55,7 +55,7 @@ namespace TUGraz.VectoCommon.Models ...@@ -55,7 +55,7 @@ namespace TUGraz.VectoCommon.Models
case GearboxType.AMT: return "Automated Transmission (AMT)"; case GearboxType.AMT: return "Automated Transmission (AMT)";
case GearboxType.ATSerial: return "Automatic Transmission - Serial (AT-S)"; case GearboxType.ATSerial: return "Automatic Transmission - Serial (AT-S)";
case GearboxType.ATPowerSplit: return "Automatic Transmission - PowerSplit (AT-P)"; case GearboxType.ATPowerSplit: return "Automatic Transmission - PowerSplit (AT-P)";
case GearboxType.APTN: return "Automatic Power Transmission - No Torque Converter (APT-N)"; case GearboxType.APTN: return "Automatic Transmission - No TorqueConverter (APT-N)";
case GearboxType.DrivingCycle: return "Gear from Driving Cycle"; case GearboxType.DrivingCycle: return "Gear from Driving Cycle";
default: throw new ArgumentOutOfRangeException("GearboxType", type, null); default: throw new ArgumentOutOfRangeException("GearboxType", type, null);
} }
......
...@@ -579,6 +579,7 @@ namespace TUGraz.VectoCore.Models.Declaration ...@@ -579,6 +579,7 @@ namespace TUGraz.VectoCore.Models.Declaration
{ {
switch (type) { switch (type) {
case GearboxType.AMT: case GearboxType.AMT:
case GearboxType.APTN:
// TODO MQ: 2020-10-14: compute for AMT with ICE and AMT with EM differently // TODO MQ: 2020-10-14: compute for AMT with ICE and AMT with EM differently
return ComputeEfficiencyShiftPolygon(gearIdx, fullLoadCurve, gears, engine, axlegearRatio, dynamicTyreRadius); return ComputeEfficiencyShiftPolygon(gearIdx, fullLoadCurve, gears, engine, axlegearRatio, dynamicTyreRadius);
case GearboxType.MT: case GearboxType.MT:
......
...@@ -555,7 +555,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl ...@@ -555,7 +555,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
new DummyGearboxInfo(container); new DummyGearboxInfo(container);
new ATClutchInfo(container); new ATClutchInfo(container);
break; break;
case PowertrainPosition.BatteryElectricE2: case PowertrainPosition.BatteryElectricE2 when data.GearboxData.Type != GearboxType.APTN:
var strategy = new PEVAMTShiftStrategy(container); var strategy = new PEVAMTShiftStrategy(container);
em = GetElectricMachine(PowertrainPosition.BatteryElectricE2, data.ElectricMachinesData, em = GetElectricMachine(PowertrainPosition.BatteryElectricE2, data.ElectricMachinesData,
container, es, ctl); container, es, ctl);
...@@ -564,6 +564,17 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl ...@@ -564,6 +564,17 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
.AddComponent(em); .AddComponent(em);
new ATClutchInfo(container); new ATClutchInfo(container);
break; break;
case PowertrainPosition.BatteryElectricE2 when data.GearboxData.Type == GearboxType.APTN:
var strategyAPTN = new APTNShiftStrategy(container);
em = GetElectricMachine(PowertrainPosition.BatteryElectricE2, data.ElectricMachinesData,
container, es, ctl);
powertrain.AddComponent(new AxleGear(container, data.AxleGearData))
.AddComponent(new APTNGearbox(container, strategyAPTN))
.AddComponent(em);
new ATClutchInfo(container);
break;
default: throw new ArgumentOutOfRangeException(nameof(pos), pos, null); default: throw new ArgumentOutOfRangeException(nameof(pos), pos, null);
} }
...@@ -1019,7 +1030,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl ...@@ -1019,7 +1030,6 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
return new PEVAMTShiftStrategy(container); return new PEVAMTShiftStrategy(container);
} }
throw new VectoException("no default gearshift strategy available for gearbox type {0} and job type {1}", runData.GearboxData.Type, runData.JobType); throw new VectoException("no default gearshift strategy available for gearbox type {0} and job type {1}", runData.GearboxData.Type, runData.JobType);
//return new AMTShiftStrategy(runData, container);
case GearboxType.MT: case GearboxType.MT:
runData.ShiftStrategy = MTShiftStrategy.Name; runData.ShiftStrategy = MTShiftStrategy.Name;
return new MTShiftStrategy(container); return new MTShiftStrategy(container);
...@@ -1027,7 +1037,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl ...@@ -1027,7 +1037,9 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
case GearboxType.ATSerial: case GearboxType.ATSerial:
runData.ShiftStrategy = ATShiftStrategyOptimized.Name; runData.ShiftStrategy = ATShiftStrategyOptimized.Name;
return new ATShiftStrategyOptimized(container); return new ATShiftStrategyOptimized(container);
//return new ATShiftStrategy(runData, container); case GearboxType.APTN:
runData.ShiftStrategy = APTNShiftStrategy.Name;
return new APTNShiftStrategy(container);
default: default:
throw new ArgumentOutOfRangeException("GearboxType", throw new ArgumentOutOfRangeException("GearboxType",
$"Unknown Gearbox Type {runData.GearboxData.Type.ToString()}"); $"Unknown Gearbox Type {runData.GearboxData.Type.ToString()}");
......
using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.Simulation;
namespace TUGraz.VectoCore.Models.SimulationComponent.Impl namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{ {
public class APTNGearbox : PEVGearbox public class APTNGearbox : PEVGearbox
{ {
public APTNGearbox(IVehicleContainer container, IShiftStrategy strategy) : base(container, strategy) { } public APTNGearbox(IVehicleContainer container, IShiftStrategy strategy) : base(container, strategy) {
ModelData.TractionInterruption = 0.SI<Second>();
}
public override void TriggerGearshift(Second absTime, Second dt)
{
}
public override bool GearEngaged(Second absTime)
{
return true;
}
} }
} }
\ No newline at end of file
using TUGraz.VectoCore.Models.Simulation;
namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
public class APTNShiftStrategy : PEVAMTShiftStrategy
{
public APTNShiftStrategy(IVehicleContainer dataBus) : base(dataBus) { }
public new static string Name => "APT-N";
}
}
\ No newline at end of file
...@@ -187,7 +187,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -187,7 +187,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return retVal; return retVal;
} }
private bool DoCheckShiftRequired(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, NewtonMeter inTorque, PerSecond inAngularVelocity, GearshiftPosition gear, Second lastShiftTime, IResponse response) private bool DoCheckShiftRequired(Second absTime, Second dt, NewtonMeter outTorque,
PerSecond outAngularVelocity, NewtonMeter inTorque, PerSecond inAngularVelocity,
GearshiftPosition gear, Second lastShiftTime, IResponse response)
{ {
// no shift when vehicle stands // no shift when vehicle stands
if (DataBus.VehicleInfo.VehicleStopped) { if (DataBus.VehicleInfo.VehicleStopped) {
...@@ -424,7 +426,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -424,7 +426,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return nextGear; return nextGear;
} }
if (response.ElectricMotor.TorqueRequestEmMap != null && response.ElectricMotor.TorqueRequestEmMap.IsEqual( if (response.ElectricMotor.TorqueRequestEmMap != null && response.ElectricMotor.MaxRecuperationTorqueEM is null)
Console.WriteLine("DEBUG");
if (response.ElectricMotor.TorqueRequestEmMap != null
&& response.ElectricMotor.MaxRecuperationTorqueEM != null
&& response.ElectricMotor.TorqueRequestEmMap.IsEqual(
response.ElectricMotor.MaxRecuperationTorqueEM, response.ElectricMotor.MaxRecuperationTorqueEM,
response.ElectricMotor.MaxRecuperationTorqueEM * 0.1)) { response.ElectricMotor.MaxRecuperationTorqueEM * 0.1)) {
// no early downshift when close to max recuperation line // no early downshift when close to max recuperation line
...@@ -757,11 +763,4 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -757,11 +763,4 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
#endregion #endregion
} }
public class APTNShiftStrategy : PEVAMTShiftStrategy
{
public APTNShiftStrategy(IVehicleContainer dataBus) : base(dataBus) { }
}
} }
\ No newline at end of file
...@@ -289,6 +289,7 @@ ...@@ -289,6 +289,7 @@
<Compile Include="InputData\Reader\ComponentData\BatteryInternalResistanceReader.cs" /> <Compile Include="InputData\Reader\ComponentData\BatteryInternalResistanceReader.cs" />
<Compile Include="InputData\Reader\ComponentData\BatteryMaxCurrentReader.cs" /> <Compile Include="InputData\Reader\ComponentData\BatteryMaxCurrentReader.cs" />
<Compile Include="Models\SimulationComponent\Impl\APTNGearbox.cs" /> <Compile Include="Models\SimulationComponent\Impl\APTNGearbox.cs" />
<Compile Include="Models\SimulationComponent\Impl\APTNShiftStrategy.cs" />
<Compile Include="Models\SimulationComponent\Impl\BatterySystem.cs" /> <Compile Include="Models\SimulationComponent\Impl\BatterySystem.cs" />
<Compile Include="Models\SimulationComponent\Impl\DummyAxleGearInfo.cs" /> <Compile Include="Models\SimulationComponent\Impl\DummyAxleGearInfo.cs" />
<Compile Include="Models\SimulationComponent\Impl\PEVGearbox.cs" /> <Compile Include="Models\SimulationComponent\Impl\PEVGearbox.cs" />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment