public class CACEvent
extends SimEvent
Provides a set of events to be used in the CAC simulator. These events are:
Although the CACEvent
class is common for all events, its meaning (i.e.
action type) depends on the constructor used to get an instance. Take a look
on the description of the constructors to obtain more information.
Modifier and Type | Class and Description |
---|---|
static class |
CACEvent.EventType
Type of event.
|
Constructor and Description |
---|
CACEvent(double eventTime,
int connIdToRelease)
Constructor to define a 'connection release' event.
|
CACEvent(double eventTime,
int demandId,
int routeId,
double durationInSeconds,
double trafficVolumeInErlangs,
double arrivalTimeInSeconds)
Constructor to define a 'connection request' event.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
CACEvent.EventType |
getEventType()
Returns the event type.
|
int |
getReleaseConnectionId()
Returns the connection identifier of the connection to be released.
|
double |
getRequestArrivalTimeInSeconds()
Returns the arrival time of the requested connection.
|
int |
getRequestDemandId()
Returns the demand identifier of the requested connection.
|
double |
getRequestDurationInSeconds()
Returns the duration of the requested connection.
|
int |
getRequestRouteId()
Returns the route identifier associated to the connection.
|
double |
getRequestTrafficVolumeInErlangs()
Returns the traffic volume of the requested connection.
|
int |
hashCode()
Returns a hash code value for the object.
|
String |
toString()
Returns a
String representation of the object. |
public CACEvent(double eventTime, int demandId, int routeId, double durationInSeconds, double trafficVolumeInErlangs, double arrivalTimeInSeconds)
Constructor to define a 'connection request' event.
eventTime
- Event timedemandId
- Demand identifierrouteId
- Route identifier (can be -1, not checked)durationInSeconds
- Duration (in Erlangs)trafficVolumeInErlangs
- Traffic volume (in Erlangs)arrivalTimeInSeconds
- Arrival time of the request (typically equal to eventTime
)public CACEvent(double eventTime, int connIdToRelease)
Constructor to define a 'connection release' event.
eventTime
- Event timeconnIdToRelease
- Connection identifierpublic CACEvent.EventType getEventType()
public String toString()
String
representation of the object.String
representation of the objectpublic int getRequestDemandId()
public int getRequestRouteId()
public double getRequestDurationInSeconds()
public double getRequestTrafficVolumeInErlangs()
public double getRequestArrivalTimeInSeconds()
public int getReleaseConnectionId()
public boolean equals(Object o)
o
- Reference object with which to comparetrue
if this object is the same as the o
argument; false
otherwisepublic int hashCode()
HashMap
.