model.entities.spawner
Members list
Type members
Classlikes
A spawning strategy that maintains a constant rate of customer creation.
A spawning strategy that maintains a constant rate of customer creation.
Simple strategy that spawns the same number of customers at every time point, useful for maintaining steady simulation load or baseline customer flow.
Value parameters
- rate
-
the constant number of customers to spawn per time unit
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SpawningStrategyclass Objecttrait Matchableclass AnyShow all
A spawning strategy that follows a Gaussian (normal) distribution curve.
A spawning strategy that follows a Gaussian (normal) distribution curve.
Creates a bell-curve pattern of customer spawning, with peak activity at the mean time and decreasing activity further from the center. Useful for modeling natural patterns like rush hours or peak casino times.
Value parameters
- base
-
the minimum baseline number of customers to always spawn
- mean
-
the time point where spawning activity is highest
- peak
-
the maximum number of customers to spawn at the distribution peak
- stdDev
-
the standard deviation controlling the width of the distribution
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SpawningStrategyclass Objecttrait Matchableclass AnyShow all
Entity responsible for spawning new customers into the simulation.
Entity responsible for spawning new customers into the simulation.
The Spawner periodically creates new Customer instances based on its configured spawning strategy and timing parameters. It maintains its own simulation time counter and determines when to spawn customers based on the ticksToSpawn interval.
Spawned customers are created with randomized attributes including position, movement direction, bankroll, and preferred game type to simulate realistic diversity in the casino environment.
Value parameters
- id
-
unique identifier for this spawner instance
- position
-
2D coordinates where customers will be spawned (with random variation)
- strategy
-
the spawning strategy that determines how many customers to create
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Entityclass Objecttrait Matchableclass AnyShow all
Base trait for all customer spawning strategies.
Base trait for all customer spawning strategies.
Defines the interface for determining how many customers should be spawned at any given time point in the simulation. Implementations can provide various distribution patterns such as constant rates, gaussian curves, or step functions.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Builder class for constructing and composing spawning strategies using a fluent API.
Builder class for constructing and composing spawning strategies using a fluent API.
Provides a convenient way to create complex spawning strategies by combining basic strategies with transformations like scaling, offsetting, and clamping. Supports method chaining for readable strategy composition.
Value parameters
- strategy
-
the current strategy being built
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Companion object providing factory methods and implicit conversions for spawning strategies.
Companion object providing factory methods and implicit conversions for spawning strategies.
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
A spawning strategy that switches between two rates at specified time boundaries.
A spawning strategy that switches between two rates at specified time boundaries.
Provides a step function for customer spawning, switching between low and high rates based on time intervals. Supports both normal intervals (start < end) and wrap-around intervals (start > end) for modeling scenarios like overnight periods or day/night cycles.
Value parameters
- endTime
-
the end of the high-activity period
- highRate
-
the number of customers to spawn during high-activity periods
- lowRate
-
the number of customers to spawn during low-activity periods
- startTime
-
the beginning of the high-activity period
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait SpawningStrategyclass Objecttrait Matchableclass AnyShow all