Class CompressorAgent

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

public class CompressorAgent extends ProcessAgent
RL agent for compressor control with anti-surge protection.

Controls:

  • Compressor speed for pressure/flow control
  • Recycle valve for anti-surge protection

Observations:

  • inlet_pressure - Suction pressure [bar]
  • outlet_pressure - Discharge pressure [bar]
  • compression_ratio - P_out/P_in
  • surge_fraction - Distance from surge line
  • speed - Current speed [normalized]
  • power - Shaft power [normalized]
  • pressure_error - Deviation from setpoint
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • compressor

      private final Compressor compressor
    • currentSpeedFraction

      private double currentSpeedFraction
    • minSpeed

      private double minSpeed
    • maxSpeed

      private double maxSpeed
  • Constructor Details

    • CompressorAgent

      public CompressorAgent(String agentId, Compressor compressor)
      Create compressor agent.
      Parameters:
      agentId - agent ID
      compressor - the compressor
  • 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
    • 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
    • isTerminated

      public boolean isTerminated(StateVector globalState)
      Description copied from interface: Agent
      Check if agent's local termination condition is met.
      Specified by:
      isTerminated in interface Agent
      Overrides:
      isTerminated in class ProcessAgent
      Parameters:
      globalState - current global state
      Returns:
      true if agent triggers termination
    • setDischargePressureSetpoint

      public void setDischargePressureSetpoint(double pressure)
      Set discharge pressure setpoint.
      Parameters:
      pressure - target pressure [bar]
    • getCompressor

      public Compressor getCompressor()
      Get the compressor.
      Returns:
      compressor
    • setSpeedRange

      public void setSpeedRange(double minRpm, double maxRpm)
      Set speed range.
      Parameters:
      minRpm - minimum speed
      maxRpm - maximum speed