Class SimulationStateUpdate

java.lang.Object
org.kigalisim.engine.state.SimulationStateUpdate

public final class SimulationStateUpdate extends Object
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 Details

    • getUseKey

      public UseKey getUseKey()
      Gets the use key containing application and substance.
      Returns:
      the use key specifying the scope
    • getName

      public String getName()
      Gets the name of the stream to set.
      Returns:
      the stream name (e.g., "domestic", "import", "recycle")
    • getValue

      public EngineNumber 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

      public Optional<SalesStreamDistribution> 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