StepStrategy

model.entities.spawner.StepStrategy
case class StepStrategy(lowRate: Int, highRate: Int, startTime: Double, endTime: Double) extends SpawningStrategy

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

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def customersAt(time: Double): Int

Calculates the number of customers to spawn at the given time.

Calculates the number of customers to spawn at the given time.

Value parameters

time

the current simulation time point

Attributes

Returns

the number of customers to spawn (must be non-negative)

Definition Classes

Inherited methods

protected def hourPerDay: Double

Attributes

Inherited from:
SpawningStrategy
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product