Package org.kigalisim.engine.state
Class SimulationStateUpdate
java.lang.Object
org.kigalisim.engine.state.SimulationStateUpdate
Immutable class representing a simulation state update value ready to be set.
This class encapsulates the result of stream calculations and contains all parameters needed to update simulation state. Unlike StreamUpdate which contains calculation instructions, SimulationStateUpdate contains pre-computed results ready for storage.
Use StreamUpdate for operations that need calculation logic (set, change, cap, floor). Use SimulationStateUpdate for setting pre-computed values (recalc strategies, emissions).
- License:
- BSD-3-Clause
-
Method Summary
Modifier and TypeMethodDescriptionGets the optional pre-calculated distribution for sales streams.booleanGets whether this update should invalidate prior equipment cumulative bases.getName()Gets the name of the stream to set.booleanGets whether recycling should be subtracted from the value.Gets the use key containing application and substance.getValue()Gets the pre-calculated value to set for the stream.booleanGets whether this stream requires sales distribution logic.
-
Method Details
-
getUseKey
Gets the use key containing application and substance.- Returns:
- the use key specifying the scope
-
getName
Gets the name of the stream to set.- Returns:
- the stream name (e.g., "domestic", "import", "recycle")
-
getValue
Gets the pre-calculated value to set for the stream.- Returns:
- the stream value with units
-
getSubtractRecycling
public boolean getSubtractRecycling()Gets whether recycling should be subtracted from the value.- Returns:
- true if recycling should be subtracted, false for direct setting
-
getDistribution
Gets the optional pre-calculated distribution for sales streams.- Returns:
- optional sales stream distribution, empty if none specified
-
isSalesDistributionRequired
public boolean isSalesDistributionRequired()Gets whether this stream requires sales distribution logic.- Returns:
- true if this is a sales stream that needs distribution, false for outcome streams
-
getInvalidatesPriorEquipment
public boolean getInvalidatesPriorEquipment()Gets whether this update should invalidate prior equipment cumulative bases.- Returns:
- true if this update should trigger base invalidation, false otherwise
-