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

Skip to content
Snippets Groups Projects
Commit ad41997d authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

writing declaration aux for PEV vehicles

parent 3ba19061
No related branches found
No related tags found
No related merge requests found
......@@ -1052,6 +1052,26 @@ public class JSONFileWriter : IOutputFileWriter
}
body.Add("Padd_electric", input.JobInputData.Vehicle.Components.AuxiliaryInputData.Auxiliaries.ElectricPowerDemand.Value());
if (job.SavedInDeclarationMode && job.Vehicle is IVehicleDeclarationInputData declVehicle) {
var aux = declVehicle.Components.AuxiliaryInputData;
var auxList = new List<object>();
foreach (var auxEntry in aux.Auxiliaries) {
var auxOut = new Dictionary<string, object>();
var engineeringAuxEntry = auxEntry;
if (!job.SavedInDeclarationMode) {
auxOut.Add("Type", auxEntry.Type.Name());
auxOut.Add("Technology", new string[] { });
} else {
auxOut.Add("ID", auxEntry.Type.Key());
auxOut.Add("Type", auxEntry.Type.Name());
auxOut.Add("Technology", engineeringAuxEntry.Technology);
}
auxList.Add(auxOut);
}
body.Add("Aux", auxList);
}
if (!job.SavedInDeclarationMode && job.Vehicle is IVehicleEngineeringInputData engVehicle) {
var aux = engVehicle.Components.AuxiliaryInputData;
if (aux.BusAuxiliariesData != null) {
......
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