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

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

Merge pull request #40 in VECTO/vecto-sim from...

Merge pull request #40 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:bugfix/VECTO-77-vectosimulationcomponent-for-auxiliaries to develop

* commit '5c885dd3':
  throw exception if no power demand can be found
parents 286a2a78 5c885dd3
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
// Log.ErrorFormat("could not find entry in driving cycle for time {0}", absTime.TotalSeconds);
// return 0;
//}
Log.ErrorFormat("Found Entry at index {0}", entry);
if (entry == -1) {
Log.ErrorFormat("time: {0} could not find power demand for auxiliary {1}", absTime.TotalSeconds, _auxiliaryId);
throw new VectoSimulationException(String.Format("time: {0} could not find power demand for auxiliary {1}", absTime.TotalSeconds, _auxiliaryId));
}
return _auxiliaryId == null ? _drivingCycle.Entries[entry].AdditionalAuxPowerDemand : _drivingCycle.Entries[entry].AuxiliarySupplyPower[_auxiliaryId];
}
......
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