public class BasicFacilityActivity extends FacilityActivity
| Modifier and Type | Field and Description |
|---|---|
private Facility |
currentFacility
The current facility.
|
private java.lang.Class<? extends Facility> |
facilityType
The type of facility.
|
private float |
restaurantTime
The restaurant time.
|
private float |
toiletTime
The toilet time.
|
private boolean |
waited
Waited or not.
|
activityModule, agent, map, movement, navigationModule, observations| Constructor and Description |
|---|
BasicFacilityActivity(java.lang.Class<? extends Facility> facilityType)
Creates a shop activity.
|
BasicFacilityActivity(java.lang.Class<? extends Facility> facilityType,
float restaurantTime,
float toiletTime)
Creates a shop activity.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canStart(int timeStep)
Determines if the activity can start.
|
Position |
getActivityPosition()
Gets the activity position.
|
private boolean |
getGoalPositionInShop()
Determine if there is a goal position in the current shop.
|
void |
goToActivity()
Sends the agent to the activity area.
|
private void |
setFacility()
Sets the facility.
|
void |
startActivity()
Starts the activity.
|
void |
update(int timeStep)
Updates the updatable element.
|
endActivity, getActivityState, init, isFinished, isGoingToActivity, isInProgressprivate Facility currentFacility
private java.lang.Class<? extends Facility> facilityType
private boolean waited
private float restaurantTime
private float toiletTime
public BasicFacilityActivity(java.lang.Class<? extends Facility> facilityType)
facilityType - The facility type the agent will visit.public BasicFacilityActivity(java.lang.Class<? extends Facility> facilityType, float restaurantTime, float toiletTime)
facilityType - The facility type the agent will visit.restaurantTime - The restaurant time.toiletTime - The toilet time.public boolean canStart(int timeStep)
Activitypublic Position getActivityPosition()
ActivitygetActivityPosition in class Activityprivate boolean getGoalPositionInShop()
public void goToActivity()
ActivitygoToActivity in class Activityprivate void setFacility()
public void startActivity()
ActivitystartActivity in class Activitypublic void update(int timeStep)
UpdatabletimeStep - The time step of the simulation (in milliseconds).