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

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

reading/writing ssm technology benefits

ALL TESTCASES (BusAux) GREEN
parent f315adb3
No related branches found
No related tags found
No related merge requests found
......@@ -38,202 +38,12 @@
"AH_FuelEnergyToHeatToCoolant": 0.2,
"AH_CoolantHeatTransferredToAirCabinHeater": 0.75
},
"TechList": [
{
"$type": "TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC.TechListBenefitLine, VectoCore",
"Units": "fraction",
"Category": "Cooling",
"BenefitName": "Separate air distribution ducts",
"LowFloorH": 0.0,
"LowFloorV": 0.04,
"LowFloorC": 0.04,
"SemiLowFloorH": 0.0,
"SemiLowFloorV": 0.04,
"SemiLowFloorC": 0.04,
"RaisedFloorH": 0.0,
"RaisedFloorV": 0.04,
"RaisedFloorC": 0.04,
"OnVehicle": false,
"ActiveVH": false,
"ActiveVV": false,
"ActiveVC": true,
"LineType": 0
},
{
"$type": "TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC.TechListBenefitLine, VectoCore",
"Units": "fraction",
"Category": "Heating",
"BenefitName": "Adjustable auxiliary heater",
"LowFloorH": 0.02,
"LowFloorV": 0.02,
"LowFloorC": 0.0,
"SemiLowFloorH": 0.02,
"SemiLowFloorV": 0.02,
"SemiLowFloorC": 0.0,
"RaisedFloorH": 0.02,
"RaisedFloorV": 0.02,
"RaisedFloorC": 0.0,
"OnVehicle": false,
"ActiveVH": true,
"ActiveVV": false,
"ActiveVC": false,
"LineType": 0,
"H": 0.0,
"VH": 0.0,
"VV": 0.0,
"VC": 0.0,
"C": 0.0
},
{
"$type": "TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC.TechListBenefitLine, VectoCore",
"Units": "fraction",
"Category": "Heating",
"BenefitName": "Adjustable coolant thermostat",
"LowFloorH": 0.02,
"LowFloorV": 0.02,
"LowFloorC": 0.0,
"SemiLowFloorH": 0.02,
"SemiLowFloorV": 0.02,
"SemiLowFloorC": 0.0,
"RaisedFloorH": 0.02,
"RaisedFloorV": 0.02,
"RaisedFloorC": 0.0,
"OnVehicle": false,
"ActiveVH": true,
"ActiveVV": false,
"ActiveVC": false,
"LineType": 0,
"H": 0.0,
"VH": 0.0,
"VV": 0.0,
"VC": 0.0,
"C": 0.0
},
{
"$type": "TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC.TechListBenefitLine, VectoCore",
"Units": "fraction",
"Category": "Heating",
"BenefitName": "Engine waste gas heat exchanger",
"LowFloorH": 0.04,
"LowFloorV": 0.04,
"LowFloorC": 0.0,
"SemiLowFloorH": 0.0,
"SemiLowFloorV": 0.0,
"SemiLowFloorC": 0.0,
"RaisedFloorH": 0.0,
"RaisedFloorV": 0.0,
"RaisedFloorC": 0.0,
"OnVehicle": false,
"ActiveVH": true,
"ActiveVV": false,
"ActiveVC": false,
"LineType": 0,
"H": 0.0,
"VH": 0.0,
"VV": 0.0,
"VC": 0.0,
"C": 0.0
},
{
"$type": "TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC.TechListBenefitLine, VectoCore",
"Units": "fraction",
"Category": "Heating",
"BenefitName": "Heat pump systems",
"LowFloorH": 0.06,
"LowFloorV": 0.06,
"LowFloorC": 0.0,
"SemiLowFloorH": 0.04,
"SemiLowFloorV": 0.04,
"SemiLowFloorC": 0.0,
"RaisedFloorH": 0.04,
"RaisedFloorV": 0.04,
"RaisedFloorC": 0.0,
"OnVehicle": false,
"ActiveVH": true,
"ActiveVV": false,
"ActiveVC": false,
"LineType": 0,
"H": 0.0,
"VH": 0.0,
"VV": 0.0,
"VC": 0.0,
"C": 0.0
},
{
"$type": "TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC.TechListBenefitLine, VectoCore",
"Units": "fraction",
"Category": "Insulation",
"BenefitName": "Double-glazing",
"LowFloorH": 0.04,
"LowFloorV": 0.04,
"LowFloorC": 0.04,
"SemiLowFloorH": 0.04,
"SemiLowFloorV": 0.04,
"SemiLowFloorC": 0.04,
"RaisedFloorH": 0.04,
"RaisedFloorV": 0.04,
"RaisedFloorC": 0.04,
"OnVehicle": false,
"ActiveVH": true,
"ActiveVV": true,
"ActiveVC": true,
"LineType": 0,
"H": 0.0,
"VH": 0.0,
"VV": 0.0,
"VC": 0.0,
"C": 0.0
},
{
"$type": "TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC.TechListBenefitLine, VectoCore",
"Units": "fraction",
"Category": "Insulation",
"BenefitName": "Tinted windows",
"LowFloorH": 0.0,
"LowFloorV": 0.0,
"LowFloorC": 0.0,
"SemiLowFloorH": 0.0,
"SemiLowFloorV": 0.0,
"SemiLowFloorC": 0.0,
"RaisedFloorH": 0.0,
"RaisedFloorV": 0.0,
"RaisedFloorC": 0.0,
"OnVehicle": false,
"ActiveVH": false,
"ActiveVV": false,
"ActiveVC": false,
"LineType": 0,
"H": 0.0,
"VH": 0.0,
"VV": 0.0,
"VC": 0.0,
"C": 0.0
},
{
"$type": "TUGraz.VectoCore.Models.BusAuxiliaries.DownstreamModules.Impl.HVAC.TechListBenefitLine, VectoCore",
"Units": "fraction",
"Category": "Ventilation",
"BenefitName": "Fan control strategy (serial/parallel)",
"LowFloorH": 0.02,
"LowFloorV": 0.02,
"LowFloorC": 0.02,
"SemiLowFloorH": 0.02,
"SemiLowFloorV": 0.02,
"SemiLowFloorC": 0.02,
"RaisedFloorH": 0.02,
"RaisedFloorV": 0.02,
"RaisedFloorC": 0.02,
"OnVehicle": false,
"ActiveVH": true,
"ActiveVV": true,
"ActiveVC": true,
"LineType": 1,
"H": 0.0,
"VH": 0.0,
"VV": 0.0,
"VC": 0.0,
"C": 0.0
}
]
"SSMTechologyBenefits": {
"Cooling": 0.0,
"Heating": 0.0,
"Ventilation": 0.0,
"VentilationHeating": 0.0,
"VentilationCooling": 0.0
}
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -78,10 +78,16 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
retVal.FuelEnergyToHeatToCoolant = genInput.GetEx<double>("AH_FuelEnergyToHeatToCoolant");
retVal.CoolantHeatTransferredToAirCabinHeater = genInput.GetEx<double>("AH_CoolantHeatTransferredToAirCabinHeater");
retVal.Technologies = new TechnologyBenefits() {
// TODO: MQ 2020-01-27 read from file!
//CValueVariation =
};
var benefits = body["SSMTechologyBenefits"];
retVal.Technologies = benefits != null
? new TechnologyBenefits() {
CValueVariation = benefits.GetEx<double>("Cooling"),
HValueVariation = benefits.GetEx<double>("Heating"),
VVValueVariation = benefits.GetEx<double>("Ventilation"),
VHValueVariation = benefits.GetEx<double>("VentilationHeating"),
VCValueVariation = benefits.GetEx<double>("VentilationCooling")
}
: new TechnologyBenefits();
return retVal;
}
......
......@@ -30,13 +30,7 @@ namespace TUGraz.VectoCore.OutputData.FileIO
body["EnvironmentalConditions"] = string.IsNullOrWhiteSpace(auxCfg.SSMInputs.EnvironmentalConditions.Source)
? ""
: JSONFileWriter.GetRelativePath(auxCfg.SSMInputs.EnvironmentalConditions.Source, basePath);
body["SSMTechologyBenefits"] = new Dictionary<string, object>() {
{ "Heating", auxCfg.SSMInputs.Technologies.HValueVariation},
{ "Cooling", auxCfg.SSMInputs.Technologies.CValueVariation },
{ "Ventilation", auxCfg.SSMInputs.Technologies.VVValueVariation },
{ "VentilationHeating", auxCfg.SSMInputs.Technologies.VHValueVariation},
{ "VentilationCooling", auxCfg.SSMInputs.Technologies.VCValueVariation}
};
//string.IsNullOrWhiteSpace(auxCfg.SSMInputs.Technologies.Source)
//? ""
//: JSONFileWriter.GetRelativePath(auxCfg.SSMInputs.Technologies.Source, basePath);
......@@ -164,6 +158,13 @@ namespace TUGraz.VectoCore.OutputData.FileIO
try {
var body = new Dictionary<string, object>();
body["SSMInputs"] = SaveGenInputs(ssmInput);
body["SSMTechologyBenefits"] = new Dictionary<string, object>() {
{ "Heating", ssmInput.Technologies.HValueVariation},
{ "Cooling", ssmInput.Technologies.CValueVariation },
{ "Ventilation", ssmInput.Technologies.VVValueVariation },
{ "VentilationHeating", ssmInput.Technologies.VHValueVariation},
{ "VentilationCooling", ssmInput.Technologies.VCValueVariation}
};
//body["TechList"] = SaveTechlist(ssmInput);
JSONInputDataFactory.WriteFile(JToken.FromObject(new Dictionary<string, object>() { { "Header", "AHSM" }, { "Body", body } }), filePath);
......
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