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 8353de5b authored by David AMO GONZALEZ's avatar David AMO GONZALEZ
Browse files

Replace invalid character '–' (En Dash; U+2013) by '-' (Hyphen Minus; U+002D) for BatteryTechnology

parent 1f26eb8f
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
.Cast<XmlNode>().Select(x => {
var ratedCapacity = GetNode("RatedCapacity", x).InnerText.ToDouble().SI(Unit.SI.Ampere.Hour).Cast<AmpereSecond>();
var voltage = GetNode("NominalVoltage", x).InnerText.ToDouble().SI<Volt>();
var technology = GetNode("BatteryTechnology", x).InnerText;
var technology = ConvertToValidTechnology(GetNode("BatteryTechnology", x).InnerText);
return new BusAuxBatteryInputData(technology, voltage, ratedCapacity);
})
.Concat(GetNodes(new [] { XMLNames.BusAux_ElectricSystem, "Capacitor" }).Cast<XmlNode>()
......@@ -222,6 +222,12 @@ namespace TUGraz.VectoCore.InputData.FileIO.XML.Declaration.DataProvider
public virtual bool? AirElectricHeater => false;
#endregion
private string ConvertToValidTechnology(string technology)
{
// Replace invalid character '–' (En Dash; U+2013) by '-' (Hyphen Minus; U+002D).
return technology.Contains('–') ? technology.Replace('–', '-') : technology;
}
}
// ---------------------------------------------------------------------------------------
......
technology , SoC range , C-rate
lead-acid battery conventional , 20 , 5
lead-acid battery AGM , 30 , 5
lead-acid battery gel , 40 , 5
lead-acid battery - conventional , 20 , 5
lead-acid battery - AGM , 30 , 5
lead-acid battery - gel , 40 , 5
li-ion battery - high power , 25 , 30
li-ion battery - high energy , 50 , 5
\ No newline at end of file
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