Commit 1281539e authored by Georgios Dagkakis's avatar Georgios Dagkakis

assertion added to timeSupport

parent 17c858b3
......@@ -38,6 +38,7 @@ class TimeSupportMixin(object):
"""Convert simulation clock time to real world time, as python datetime object.
"""
assert self.initialized, "initializeTimeSupport has not been called"
assert not simulation_time==float("inf"), "cannot convert infinite simulation time to real world time"
return self.now + timedelta(days=simulation_time/self.timeUnitPerDay)
def convertToFormattedRealWorldTime(self, simulation_time):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment