Traffic Goto

Traffic Goto Behavior (beTrafficGoto) adds a target destination, or a wander behavior, to entities already using the Traffic behavior

Traffic Goto behavior in the behavior editor

For more information on traffic in Golaem Crowd, see Traffic Locator & Traffic tutorial

To use a Traffic Goto Behavior, a Traffic Locator and a Traffic behavior are mandatory. 

If no target is found, the target will wander as if there was no Traffic Goto.

CREATION

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBe Traffic Goto Node
  • MEL command: glmCrowdBeTrafficGotoCmd;

CONFIGURATION

A Traffic Goto Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.

Traffic Goto Attributes

attributes of a Traffic Goto Behavior

The target position is defined by a bound locator. The target will NOT be updated in real time during simulation (no animated target). Following a specific path can be achieved by chaining several Traffic GoTo.

Target Mode

The Traffic Goto will either wander forever, or try to reach a target and stop, according to the mode :

  • Random Target In Environment : in this mode, the car wanders, choses a new lane each time it reaches a crossing. Thus it keeps wandering forever (if the traffic network has no dead ends)
  • Use Target Poptool : each entity picks a slot in the provided Population Tool as target
  • Target Particle System : the target pcisk a random particle and use it as target
  • Per Particle Target Attribute : the target is provided as a vector ppAttribute.
  • Target Expression : the target is produced by an expression outputing a vector.
Target Reach Treshold

For all modes having a specific target, this is the limit distance where the goto consider to be arrived, and exit

In Target Poptool See "Use Target Poptool" mode above.
Slot Assign Mode

Available in "Use Target Poptool" mode. This determines the way the population tool slots are assigned as goto targets

  • By Id: the population tool slots are assigned according to the entity id
  • Random: the population tool slots are assigned randomly. A random slot of the poptool will be chosen as target each time the behavior is restarted or if "Target is Dynamic" is checked.
  • MEL Command: the user can control how the slots are assigned through a MEL function specified by the "Slot Assign MEL" attribute. The MEL function uses the index of the entity. Here's a template for this function (equivalent to the "By Id" mode):
global proc int defaultSlotAssign(int $index)
{
    return $index;
}
Slot Assign MEL See "Slot Assign Mode" above
In Particle System See "Target Particle System" mode above.
Target Id PPName See "Target Particle System" mode above.
Target PPName See "Per Particle Target Attribute" mode above.
In Target Expression

An Expression with a vector output.

Traffic Goto Advanced Attributes

advanced attributes of a Traffic Goto Behavior
U Turn Mode
  • Forbidden : cars will never make a U Turn. If a car reaches a dead end road, with or without crossing at its end, it will just stops (the goto stay active)
  • If only possible path : cars will tend to avoid U Turn, but if a car reaches a road ending with a crossing with only a U Turn exit possible, it will use it.
  • Every time it is faster : when a car has a target, if a U Turn is the fastest way to reach the requested road/position, the car will use that U Turn.
Stop On Target Reached

By default, Go To behaviors stop when reaching their target. This has no effect in wander mode