Package org.kigalisim.engine.recalc
Class StreamUpdate
java.lang.Object
org.kigalisim.engine.recalc.StreamUpdate
Immutable class representing stream calculation instructions.
Contains parameters needed to execute a stream calculation operation in the engine, including timing constraints, scope, and behavioral flags. This class provides the "instructions" for how to calculate stream values, while SimulationStateUpdate contains the pre-computed "results" ready for storage.
Use StreamUpdate for operations that need calculation logic (set, change, cap, floor). Use SimulationStateUpdate for setting pre-calculated values (recalc strategies, emissions).
- License:
- BSD-3-Clause
-
Method Summary
Modifier and TypeMethodDescriptionGets the optional pre-calculated distribution for sales streams.booleanGets whether to force full recharge for sales substreams.getKey()Gets the optional use key specifying the application/substance scope.getName()Gets the name of the stream to update.booleanGets whether this update should trigger recalculations.booleanGets whether recycling should be subtracted from the value.Gets the optional units string to record for this operation.getValue()Gets the value to set for the stream.Gets the optional year matcher constraining when this update applies.
-
Method Details
-
getName
Gets the name of the stream to update.- Returns:
- the stream name (e.g., "domestic", "import", "sales")
-
getValue
Gets the value to set for the stream.- Returns:
- the stream value with units
-
getYearMatcher
Gets the optional year matcher constraining when this update applies.- Returns:
- optional year matcher, empty if update applies to all years
-
getKey
Gets the optional use key specifying the application/substance scope.- Returns:
- optional use key, empty if using engine's current scope
-
getPropagateChanges
public boolean getPropagateChanges()Gets whether this update should trigger recalculations.- Returns:
- true if recalculations should be triggered, false otherwise
-
getUnitsToRecord
Gets the optional units string to record for this operation.- Returns:
- optional units string for tracking purposes
-
getSubtractRecycling
public boolean getSubtractRecycling()Gets whether recycling should be subtracted from the value.- Returns:
- true if recycling should be subtracted, false otherwise
-
getForceUseFullRecharge
public boolean getForceUseFullRecharge()Gets whether to force full recharge for sales substreams.- Returns:
- true if full recharge should be used, false for proportional distribution
-
getDistribution
Gets the optional pre-calculated distribution for sales streams.- Returns:
- optional sales stream distribution, empty if none specified
-