---
title: "Vehicle Crowd"
canonical: "https://documentation.chaos.com/space/ANIMA/124652281/Vehicle%20Crowd"
format: markdown
---
## **Overview**

---


## **Vehicle Crowd Generation**

---


---


---


---


## **Crowd Variances**

---


### Speed

---

All the vehicles generated will always be trying to reach their respective top speed as long as the conditions in the environment allow it. But, this will not happen very often because, as in real life, there will probably be something on the road that causes the vehicle to react accordingly (a sharp curve, another vehicle with a lower speed blocking the road, intersections, pedestrians, etc.).

Therefore, the speed of each vehicle will be **constantly updated** based on the parameters that are defined by the Road properties where it is driving at that moment, by its own Vehicle properties, and most importantly, by the current state of its closer environment (other vehicles, pedestrians, geometry background, intersections with other roads, etc.).


### **Speed Variance**

---

The **Speed Variance** applies a random value to each vehicle inside the range specified. This random value is then used as a percentage of the road's **Max Speed** and added (or subtracted) to that same **Max Speed** value for that road.


> ℹ️ The **Max Speed** value is defined in the [Road Properties](https://docs-chaos.atlassian.net/wiki/spaces/ANIMA/pages/124749544) section.


For example, a vehicle that drives on a road with 1 lane and a max speed of 50 Km/h, having a speed variance of +50% will be able to speed up to 75 Km/h:

- 50 Km/h + (50 Km/h * (+50/100)) = 50 Km/h + 25 Km/h = **75 Km/h**


However, another vehicle generated on that same road may get a different speed variance of -10%, which will set their own max speed to only 45 Km/h:

- 50 Km/h + (50 Km/h * (-10/100)) = 50 Km/h - 5 Km/h = **45 Km/h**


### **Lane Speed Variance**

---

The **Lane speed variance** parameter (also in the [Road Properties](https://docs.chaos.com/display/CA/Road+Properties) section) is the last step in the speed limit calculation process. It is only used in roads with multiple lanes, distributing the speed range defined across all the lanes of the road, assigning the maximum to the outer lane, and the minimum to the inner lane.

As it happens with the road Speed Variance, the **Lane speed variance** value is used as a percentage of the road's **Max Speed**.

For example, in a road with 3 lanes, if the Max speed of the road is 50 Km/h and the Lane speed variance is from -10 to +10, the speed limit for each lane would be:

- **Outer** lane → *50 Km/h + (50 Km/h * (+10/100)) = 50 Km/h + 5 Km/h = ***55 Km/h**
- **Middle** lane → *50 Km/h + (50 Km/h * (+0/100)) = 50 Km/h + 0 Km/h = ***50 Km/h**
- **Inner** lane → *50 Km/h + (50 Km/h * (-10/100)) = 50 Km/h - 5 Km/h = ***45 Km/h**

This value is updated for each vehicle every time it changes lanes, which usually happens several times during the simulation.


### Inner Lane Tendency

---


### **Road-Staying Tendency**

---

This value defines the tendency for each vehicle to change to another road when entering an intersection or to continue on the same one.

Again, this value is a percentage that means the following:

- **0%** the vehicle will always take an exit at intersections.
- **100%** the vehicle will always stay on the same road and keep the main trajectory through intersections.


### **Vehicle Properties**

---


---