decisionMakingSystem
Class GMTTime
java.lang.Object
decisionMakingSystem.GMTTime
- All Implemented Interfaces:
- Serializable
public final class GMTTime
- extends Object
- implements Serializable
Takes care about time or more specifically about time changes.
Agent can travel to different time zones. As we have to cope with this in some ways
this class provides a way of setting the GMT at one place and operates with the time
consistently keeping the counter (of ticks of logic) away from this.
- Author:
- Ondrej
- See Also:
- Serialized Form
|
Constructor Summary |
protected |
GMTTime()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GMTTime
protected GMTTime()
getGMT
public static double getGMT()
setGMT
public static void setGMT(double GMT,
DecisionModuleImpl module)
- Sets new difference and replans the plan. In fact it creates new plan
starting at the moment designated by the new time after the time switch.
- Parameters:
GMT - - note, that the difference must be in the interval (-12,12)module - - the current instance of DecisionModuleImpl
getRealTimeInTicks
public static int getRealTimeInTicks(int counter)
- Returns real time in the ticks of logic
- Parameters:
counter -
- Returns:
isMidnight
public static boolean isMidnight(int counter)
- Parameters:
counter - - ticks of logic
- Returns:
- true if it is midnight
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.