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 4a9b7150 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge branch...

Merge branch 'hm/feature/VECTO-1638-rundatafactories-and-declarationdataadapter-for-xev' of https://citnet.tech.ec.europa.eu/CITnet/stash/scm/vecto/hm_vecto-dev into hm/feature/VECTO-1638-rundatafactories-and-declarationdataadapter-for-xev

# Conflicts:
#	VectoCore/VectoCore/Models/SimulationComponent/Strategies/SerialHybridStrategy.cs
parents 4786da94 e482903d
Branches
Tags
No related merge requests found
......@@ -318,7 +318,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
public static readonly ModalResultField[] HybridControllerSignals = {
ModalResultField.HybridStrategyScore,
ModalResultField.HybridStrategySolution,
ModalResultField.MaxPropulsionTorqe
ModalResultField.MaxPropulsionTorqe,
ModalResultField.HybridStrategyState,
};
// ------------------------------------------------------------------------------------
......
......@@ -36,6 +36,7 @@ using System.Security.Policy;
using System.Text.RegularExpressions;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.Simulation.DataBus;
using TUGraz.VectoCore.Models.SimulationComponent.Strategies;
namespace TUGraz.VectoCore.Models.Simulation.Data
{
......@@ -368,6 +369,8 @@ namespace TUGraz.VectoCore.Models.Simulation.Data
[ModalResultField(typeof(double))]HybridStrategySolution,
[ModalResultField(typeof(int), caption: "HybridStrategyState")] HybridStrategyState,
[ModalResultField(typeof(int), caption: "BusAux_Overrun [bool]")] BusAux_OverrunFlag,
[ModalResultField(typeof(SI), "P_WHR_el [kW]", outputFactor:1e-3)] P_WHR_el_map,
......
......@@ -1733,7 +1733,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
GetElectricMachine(PowertrainPosition.GEN, data.ElectricMachinesData, container, es, ctl)
.AddComponent(ice);
//AddElectricAuxiliaries(data, container,es, null);
new ATClutchInfo(container);
new DummyGearboxInfo(container, new GearshiftPosition(0));
}
......
......@@ -2186,7 +2186,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
{
container[ModalResultField.HybridStrategyScore] = (CurrentState.Solution?.Score ?? 0) / 1e3;
container[ModalResultField.HybridStrategySolution] = CurrentState.Solution?.U ?? -100;
container[ModalResultField.MaxPropulsionTorqe] = CurrentState.MaxGbxTq ?? 0.SI<NewtonMeter>();
//if (CurrentState.Evaluations != null) {
......
......@@ -43,6 +43,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
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 {
......@@ -120,14 +122,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
public enum StateMachineState
{
Undefined,
Acc_S0, // GEN = 0
Acc_S1, // P_GEN = P_opt, SoC <= SoC_min && P_demand < P_opt || SoC >= SoC_min && SoC <= SoC_target && P_demand <= P_opt
Acc_S2, // P_GEN = P_max, SoC <= S
Acc_S3, // P_GEN = P_max, P_drive = P_GEN
Acc_S0 = 10, // GEN = 0
Acc_S1 = 11, // P_GEN = P_opt, SoC <= SoC_min && P_demand < P_opt || SoC >= SoC_min && SoC <= SoC_target && P_demand <= P_opt
Acc_S2 = 12, // P_GEN = P_max, SoC <= S
Acc_S3 = 13, // P_GEN = P_max, P_drive = P_GEN
Brake_S0,
Brake_S1,
Brake_S2,
Brake_S0 = -10,
Brake_S1 = -11,
Brake_S2 = -12,
}
public enum GensetState
......@@ -769,7 +771,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
public bool AllowEmergencyShift { get; set; }
public void WriteModalResults(Second time, Second simulationInterval, IModalDataContainer container)
{
//throw new NotImplementedException();
container[ModalResultField.HybridStrategyState] = (int)CurrentState.SMState;
}
public void OperatingpointChangedDuringRequest(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity,
......
......@@ -751,6 +751,7 @@ namespace TUGraz.VectoCore.OutputData
ModalResultField.HybridStrategyScore,
ModalResultField.HybridStrategySolution,
ModalResultField.MaxPropulsionTorqe,
ModalResultField.HybridStrategyState,
// WHR
ModalResultField.P_WHR_el_map,
ModalResultField.P_WHR_el_corr,
......@@ -778,6 +779,7 @@ namespace TUGraz.VectoCore.OutputData
return dataColumns.Where(x => Data.Columns.Contains(x)).ToArray();
}
[Obsolete]
private IList<string> GetOutputColumns()
{
var dataColumns = new List<string> { ModalResultField.time.GetName() };
......@@ -921,7 +923,9 @@ namespace TUGraz.VectoCore.OutputData
}
if (_runData.HybridStrategyParameters != null) {
dataColumns.AddRange(new[] {
ModalResultField.HybridStrategyScore, ModalResultField.HybridStrategySolution,
ModalResultField.HybridStrategyScore,
ModalResultField.HybridStrategySolution,
ModalResultField.HybridStrategyState,
ModalResultField.MaxPropulsionTorqe
}.Select(x => x.GetName()));
}
......
......@@ -182,6 +182,7 @@ public class LorrySimulation
ModalResultField.EM_Off_,
ModalResultField.HybridStrategyScore,
ModalResultField.HybridStrategySolution,
ModalResultField.HybridStrategyState,
}.Select(m => m.GetCaption()).Concat(new List<string>() {
"DriverAction",
"EcoRollConditionsMet",
......@@ -821,6 +822,10 @@ public class LorrySimulation
[TestCase(@"HeavyLorry\S-HEV\Group2_HEV_S2_supercap_epto.xml", 8)]
public void EPTO(string jobFile, int nrRuns)
{
//"HeavyLorry\S-HEV\Group2_HEV_S2_supercap_epto.xml"
///Charge is 0 in TestPowertrain but 45,9 kW in real powertrain
/// SM state of serial hybrid strategy in breaking phase was Break_S1 -> selects Accelerate S1 as new accelerate phase -> GEN is on but supercap is (almost full)
var jobContainer = GetJobContainer(jobFile, nrRuns, out var fileWriter, out var runs, out var sumDataContainer,
true);
Assert.IsTrue(runs.Any(run => run.GetContainer().RunData.Mission.MissionType == MissionType.MunicipalUtility));
......@@ -976,7 +981,7 @@ public class LorrySimulation
}
[Test, TestCaseSource(nameof(GetJsonJobs))]
//[Ignore("Just for comparison")]
[Ignore("Just for comparison")]
public void JSONEngineering(string path)
{
RunJsonJob(path, ExecutionMode.Engineering);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment