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

Skip to content
Snippets Groups Projects
Commit 4adb3b57 authored by Stefanos DOUMPOULAKIS's avatar Stefanos DOUMPOULAKIS
Browse files

Merge branch 'fix/505_hyphen_localization' into 'amdm2/develop'

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

See merge request vecto/vecto!199
parents 0a61ea98 8353de5b
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