From 7bdca4af8580bb88d48fd689db73ff2c196d53b2 Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Mon, 23 Aug 2021 16:39:30 +0200 Subject: [PATCH] code formatting --- .../Models/SimulationComponent/Impl/ElectricMotor.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs index 6b7f735054..804ed23585 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs @@ -12,7 +12,6 @@ using TUGraz.VectoCore.Models.Connector.Ports; using TUGraz.VectoCore.Models.Connector.Ports.Impl; using TUGraz.VectoCore.Models.Simulation; using TUGraz.VectoCore.Models.Simulation.Data; -using TUGraz.VectoCore.Models.Simulation.DataBus; using TUGraz.VectoCore.Models.SimulationComponent.Data; using TUGraz.VectoCore.OutputData; using TUGraz.VectoCore.Utils; @@ -29,7 +28,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl private PerSecond _maxSpeed; protected internal Joule ThermalBuffer = 0.SI<Joule>(); - protected internal bool DeRatingActive = false; + protected internal bool DeRatingActive; public Joule OverloadBuffer { get; } public NewtonMeter ContinuousTorque { get; } @@ -74,9 +73,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl public double[] TransmissionRatioPerGear { get; set; } public PowertrainPosition Position { get; } - public PerSecond MaxSpeed { - get { return _maxSpeed ?? (_maxSpeed = (ModelData.EfficiencyData.MaxSpeed) / ModelData.RatioADC); } - } + public PerSecond MaxSpeed => _maxSpeed ?? (_maxSpeed = ModelData.EfficiencyData.MaxSpeed / ModelData.RatioADC); public Watt DragPower(Volt volt, PerSecond electricMotorSpeed) { @@ -294,7 +291,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl var inTorqueDt = outTorque + emTorqueDt; - IResponse retVal = null; + IResponse retVal; if (NextComponent == null) { if (electricSupplyResponse.MaxPowerDrive.IsEqual(0.SI<Watt>(), 100.SI<Watt>())) { retVal = new ResponseBatteryEmpty(this, electricSupplyResponse); @@ -332,7 +329,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl EngineSpeed = outAngularVelocity }, }; - var busAuxPwr = BusAux?.TorqueDemand(absTime, dt, outTorque, outAngularVelocity, dryRun) ?? 0.SI<NewtonMeter>(); + var busAuxPwr = BusAux?.TorqueDemand(absTime, dt, outTorque, outAngularVelocity) ?? 0.SI<NewtonMeter>(); if (!busAuxPwr.IsEqual(0)) { Log.Warn("Check BusAux config for PEV!"); } -- GitLab