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

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

rundata factory: in cas of ovc vehicles, max charging power must be greater than 0

parent c18110bb
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,10 @@ namespace TUGraz.VectoCore.InputData.Reader.Impl.DeclarationMode.HeavyLorryRunDa
foreach (var loading in mission.Loadings)
{
if (vehicle.OvcHev) {
if (vehicle.MaxChargingPower.IsEqual(0)) {
throw new VectoException(
"MaxChargingPower has to be greater than 0 if OVC is selected");
}
yield return CreateVectoRunData(vehicle, mission, loading, modeIdx, VectoRunData.OvcHevMode.ChargeDepleting);
yield return CreateVectoRunData(vehicle, mission, loading, modeIdx, VectoRunData.OvcHevMode.ChargeSustaining);
} else {
......
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