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

Skip to content
Snippets Groups Projects
Commit 51ac5e59 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

SumFile: Time Share Corrected Error for Engine Only (no timeshares available)

parent 4016f668
No related branches found
No related tags found
No related merge requests found
...@@ -283,12 +283,14 @@ namespace TUGraz.VectoCore.OutputData ...@@ -283,12 +283,14 @@ namespace TUGraz.VectoCore.OutputData
row[CRUISE_TIMESHARE] = cruiseTimeShare; row[CRUISE_TIMESHARE] = cruiseTimeShare;
row[STOP_TIMESHARE] = modData.StopTimeShare(); row[STOP_TIMESHARE] = modData.StopTimeShare();
var shareSum = accTimeShare + decTimeShare + cruiseTimeShare; if (accTimeShare != null && decTimeShare != null && cruiseTimeShare != null) {
if (!shareSum.IsEqual(100)) { var shareSum = accTimeShare + decTimeShare + cruiseTimeShare;
Log.Error( if (!shareSum.IsEqual(100)) {
"Sumfile Error: driving behavior timeshares must sum up to 100%: acc: {0}%, dec: {1}%, cruise: {2}%, sum: {3}%", Log.Error(
accTimeShare.ToOutputFormat(1, null, false), decTimeShare.ToOutputFormat(1, null, false), "Sumfile Error: driving behavior timeshares must sum up to 100%: acc: {0}%, dec: {1}%, cruise: {2}%, sum: {3}%",
cruiseTimeShare.ToOutputFormat(1, null, false), shareSum.ToOutputFormat(1, null, false)); accTimeShare.ToOutputFormat(1, null, false), decTimeShare.ToOutputFormat(1, null, false),
cruiseTimeShare.ToOutputFormat(1, null, false), shareSum.ToOutputFormat(1, null, false));
}
} }
} }
......
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