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 bd78505f authored by Harald Martini's avatar Harald Martini
Browse files

revert change to EmOff property, update em in serial hybrid strategy after initialization

parent 62631ad0
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public bool DeRatingActive { get; protected internal set; }
public bool EmOff => PreviousState.EMTorque == null || PreviousState.EMTorque.IsEqual(0) ? true : false;
public bool EmOff => PreviousState.EMTorque == null /*|| PreviousState.EMTorque.IsEqual(0)*/
? true : false;
public BusAuxiliariesAdapter BusAux { protected get; set; }
......@@ -603,7 +604,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
ThermalBuffer = e.ThermalBuffer;
DeRatingActive = e.DeRatingActive;
PreviousState = e.PreviousState.Clone();
CurrentState = e.CurrentState.Clone();
//CurrentState = e.CurrentState.Clone();
return true;
}
......
......@@ -88,9 +88,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
TestPowertrain.Charger.UpdateFrom(maxPowerGenset);
TestPowertrain.HybridController.Initialize(Controller.PreviousState.OutTorque, Controller.PreviousState.OutAngularVelocity);
TestPowertrain.Gearbox?.UpdateFrom(DataBus.GearboxInfo);
TestPowertrain.Brakes.BrakePower = DataBus.Brakes.BrakePower;
TestPowertrain.ElectricMotor.UpdateFrom(DataBus.GetElectricMotors()
.Single(e => e.Position == TestPowertrain.ElectricMotor.Position));
var testResponse = TestPowertrain.HybridController.NextComponent.Request(absTime, dt, outTorque, outAngularVelocity, false);
TestPowertrain.HybridController.ApplyStrategySettings(new HybridStrategyResponse {
CombustionEngineOn = false,
......
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