Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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
Branches
Tags
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.
Please register or to comment