Class SeparatorAgent

java.lang.Object
neqsim.process.ml.multiagent.ProcessAgent
neqsim.process.ml.multiagent.SeparatorAgent
All Implemented Interfaces:
Serializable, Agent

public class SeparatorAgent extends ProcessAgent
RL agent for separator level and pressure control.

Controls:

  • Liquid outlet valve for level control
  • Gas outlet valve for pressure control (optional)

Observations:

  • liquid_level - Current level [0-1]
  • pressure - Separator pressure [bar]
  • level_error - Deviation from level setpoint
  • pressure_error - Deviation from pressure setpoint
  • liquid_valve_pos - Liquid valve position [0-1]
  • gas_valve_pos - Gas valve position [0-1] (if controlled)
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • separator

      private final Separator separator
    • liquidValve

      private ThrottlingValve liquidValve
    • gasValve

      private ThrottlingValve gasValve
    • controlGasValve

      private boolean controlGasValve
    • currentLiquidValvePos

      private double currentLiquidValvePos
    • currentGasValvePos

      private double currentGasValvePos
  • Constructor Details

    • SeparatorAgent

      public SeparatorAgent(String agentId, Separator separator, ThrottlingValve liquidValve)
      Create separator agent with level control only.
      Parameters:
      agentId - agent ID
      separator - the separator
      liquidValve - liquid outlet valve
    • SeparatorAgent

      public SeparatorAgent(String agentId, Separator separator, ThrottlingValve liquidValve, ThrottlingValve gasValve)
      Create separator agent with level and pressure control.
      Parameters:
      agentId - agent ID
      separator - the separator
      liquidValve - liquid outlet valve
      gasValve - gas outlet valve
  • Method Details

    • initializeSpaces

      private void initializeSpaces()
    • getLocalObservation

      public double[] getLocalObservation(StateVector globalState)
      Description copied from interface: Agent
      Get the agent's local observation from global state.
      Parameters:
      globalState - full system state
      Returns:
      local observation array
    • applyAction

      public void applyAction(double[] action)
      Description copied from interface: Agent
      Apply agent's action to the process.
      Parameters:
      action - action array
    • applyValvePosition

      private void applyValvePosition(ThrottlingValve valve, double position)
    • computeReward

      public double computeReward(StateVector globalState, double[] action)
      Description copied from interface: Agent
      Compute agent's local reward.
      Specified by:
      computeReward in interface Agent
      Overrides:
      computeReward in class ProcessAgent
      Parameters:
      globalState - current global state
      action - action taken
      Returns:
      local reward
    • setLevelSetpoint

      public void setLevelSetpoint(double level)
      Set level setpoint.
      Parameters:
      level - target level [0-1]
    • setPressureSetpoint

      public void setPressureSetpoint(double pressure)
      Set pressure setpoint.
      Parameters:
      pressure - target pressure [bar]
    • getSeparator

      public Separator getSeparator()
      Get the separator.
      Returns:
      separator