DefaultSimulationEngine

floodsim.controller.engine.DefaultSimulationEngine
final class DefaultSimulationEngine(val params: SimulationParams, val waterFlowService: WaterFlowService, val weatherEffectService: WeatherEffectService) extends SimulationEngine

Default implementation of the simulation engine.

Value parameters

params

the parameters used to configure the simulation

waterFlowService

service to calculate water movement between cells

weatherEffectService

service to apply weather effects to cells

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Computes the next state of the simulation based on the current state.

Computes the next state of the simulation based on the current state.

Value parameters

currentState

the current state of the simulation

Attributes

Returns

the next state of the simulation after one time step

Generates the initial state of the simulation.

Generates the initial state of the simulation.

Attributes

Returns

the starting state for the simulation

def isSimulationComplete(state: SimulationState): Boolean

Checks if the simulation has reached its termination condition.

Checks if the simulation has reached its termination condition.

Value parameters

state

the current state to check

Attributes

Returns

true if the simulation should terminate

Regenerates the ground grid while preserving other simulation elements.

Regenerates the ground grid while preserving other simulation elements.

Value parameters

oldState

the current state to modify

Attributes

Returns

a new state with a regenerated ground grid

Concrete fields

Parameters used to configure the simulation.

Parameters used to configure the simulation.

Attributes