Class TripGeneratorFactory<Obj extends TripGenerator>

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AbstrBasicTripGenFactory, AbstrBurstTripGenFactory, AbstrRoundTripGenFactory

public abstract class TripGeneratorFactory<Obj extends TripGenerator> extends AbstractActorFactory<Obj>
Base class for trip generator factories. The parameters this factory defines are:
  • "initialDelay" - the time in seconds at which a traffic generator starts running. A value of 0.0 (the default) is the simulation's current time when the traffic generator is created (typically, the simulation's starting time).
  • "probabilityFunction" - a SimFunctionTwo that provides a probability function. The probability function is defined as a real-valued function f(d1,d2) whose range is [0.0, 1.0] and whose domain contains non-negative values of its arguments. When called, d1 will be the estimated delay computed using the delay table for the source hub's user domain and d2 will be the delay computed using the delay table for the parent domain of the source hub's user domain. The probability this function computes is the probability that the delay used is d1. If the function is null, the d1 will be used if it is less than d2. If d2 is used, bicycles will not be removed or added to a hub as the trip is assumed to use some other service.
  • "timeline.running" - an integer-keyed timeline parameter (see below) whose value may be "true" or "false". If not provided, this parameter is ignored. It is used to turn the traffic generator on or off at specific times.
The parameters this factory inherits from its superclasses are:
  • "domainMember". Used to configure an instance of DomainMember for handling domain membership.
  • "domains". Used to clear a set of domains explicitly provided, but cannot be used to set or add domains.
  • "domain". Used to specify a domain that can added or removed from the actor's domain set. For this parameter, the key is the domain and the value is a boolean that is true if conditions for that domain should be tracked; false otherwise. If a specified domain was already joined by a shared domain member, an explicit request to join that domain will be ignored when an actor is created.
  • "timeline" - an integer-keyed set of values that define changes in the object's configuration. Subclasses may provide additional parameters. The default parameters are:
    • "timeline.time" - the time at which timeline parameters are to change. This parameter must be provided if a timeline entry exists. The units are those used by the double-precession time unit for the simulation (for animations, this is generally seconds).
    • "timeline.traceSetMode" - indicates how the parameter "timeline.traceSets" is interpreted. the values are enumeration constants of type TraceSetMode and are used as follows:
      • "KEEP" - keep the existing trace sets, adding additional ones specified by the parameter "timeline.traceSets".
      • "REMOVE" - remove the trace sets specified by the parameter "timeline.traceSets".
      • "REPLACE" - remove all existing trace sets and replace those with the ones specified by the timeline.traceSets parameter.
    • "timeline.traceSets" - a parameter representing a set of TraceSet objects (the three-argument 'add' method is used to add entries).
  • "traceSets" - a set of TraceSets a SimObject will use for tracing. One should use the add and remove factory methods as this parameter refers to a set of values.