Human

class Human<T> @JvmOverloads constructor(randomGenerator: RandomGenerator, val node: Node<T>, val age: Age, val gender: Gender, val speed: Speed = Speed(age, gender, randomGenerator), val compliance: Double = Compliance(age, gender).level, val helpAttitude: HelpAttitude = HelpAttitude(age, gender)) : AbstractNodeProperty<T> , HumanProperty<T, Euclidean2DPosition, Euclidean2DTransformation>

A pedestrian's individual characteristics.

Constructors

Link copied to clipboard
constructor(randomGenerator: RandomGenerator, node: Node<T>, age: Any, gender: String, speed: Speed = Speed(Age.fromAny(age), Gender.fromString(gender), randomGenerator), compliance: Double = Compliance(Age.fromAny(age), Gender.fromString(gender)).level, helpAttitude: HelpAttitude = HelpAttitude(Age.fromAny(age), Gender.fromString(gender)))
constructor(randomGenerator: RandomGenerator, node: Node<T>, age: Age, gender: Gender, speed: Speed = Speed(age, gender, randomGenerator), compliance: Double = Compliance(age, gender).level, helpAttitude: HelpAttitude = HelpAttitude(age, gender))

Properties

Link copied to clipboard
open override val age: Age

The age of this pedestrian.

Link copied to clipboard
open override val compliance: Double

Value between 0 and 1 representing the attitude towards conforming to social rules of this pedestrian.

Link copied to clipboard
open override val gender: Gender

The gender of this pedestrian.

Link copied to clipboard
open override val helpAttitude: HelpAttitude

The attitude of an agent towards helping another agent.

Link copied to clipboard
open override val node: Node<T>
Link copied to clipboard
open override val speed: Speed

The speed of an agent considering its age, gender and a random factor.

Functions

Link copied to clipboard
open override fun cloneOnNewNode(node: Node<T>): Human<T>
Link copied to clipboard

Value between 0 and 1 representing the probability this pedestrian will help another pedestrian in difficulty.

Link copied to clipboard
open override fun toString(): String