Class ProcessAgent

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

public abstract class ProcessAgent extends Object implements Agent, Serializable
Base class for process equipment control agents.

Provides common functionality for agents that control process equipment:

  • Equipment reference and state extraction
  • Action bounds and clipping
  • Local constraint management
  • Setpoint tracking rewards
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • agentId

      protected final String agentId
    • equipment

      protected final ProcessEquipmentInterface equipment
    • localConstraints

      protected final ConstraintManager localConstraints
    • observationNames

      protected String[] observationNames
    • actionNames

      protected String[] actionNames
    • actionLow

      protected double[] actionLow
    • actionHigh

      protected double[] actionHigh
    • setpoints

      protected Map<String,Double> setpoints
    • setpointWeights

      protected Map<String,Double> setpointWeights
  • Constructor Details

    • ProcessAgent

      public ProcessAgent(String agentId, ProcessEquipmentInterface equipment)
      Create a process agent.
      Parameters:
      agentId - unique identifier
      equipment - controlled equipment
  • Method Details

    • getAgentId

      public String getAgentId()
      Description copied from interface: Agent
      Get the agent's unique identifier.
      Specified by:
      getAgentId in interface Agent
      Returns:
      agent ID
    • getObservationDim

      public int getObservationDim()
      Description copied from interface: Agent
      Get the dimension of this agent's observation space.
      Specified by:
      getObservationDim in interface Agent
      Returns:
      observation dimension
    • getActionDim

      public int getActionDim()
      Description copied from interface: Agent
      Get the dimension of this agent's action space.
      Specified by:
      getActionDim in interface Agent
      Returns:
      action dimension
    • setSetpoint

      public ProcessAgent setSetpoint(String variableName, double value, double weight)
      Set a control setpoint.
      Parameters:
      variableName - variable name
      value - setpoint value
      weight - reward weight for tracking error
      Returns:
      this agent for chaining
    • getSetpoint

      public double getSetpoint(String variableName)
      Get setpoint value.
      Parameters:
      variableName - variable name
      Returns:
      setpoint value or NaN if not set
    • computeSetpointReward

      protected double computeSetpointReward(StateVector state)
      Compute setpoint tracking reward.
      Parameters:
      state - current state
      Returns:
      negative reward based on setpoint errors
    • computeConstraintPenalty

      protected double computeConstraintPenalty(StateVector state)
      Compute constraint penalty.
      Parameters:
      state - current state
      Returns:
      negative reward for constraint violations
    • computeReward

      public double computeReward(StateVector globalState, double[] action)
      Description copied from interface: Agent
      Compute agent's local reward.
      Specified by:
      computeReward in interface Agent
      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
      Parameters:
      globalState - current global state
      Returns:
      true if agent triggers termination
    • getEquipment

      public ProcessEquipmentInterface getEquipment()
      Get the controlled equipment.
      Returns:
      equipment
    • getLocalConstraints

      public ConstraintManager getLocalConstraints()
      Get local constraint manager.
      Returns:
      constraints
    • getObservationNames

      public String[] getObservationNames()
      Get observation names.
      Returns:
      observation variable names
    • getActionNames

      public String[] getActionNames()
      Get action names.
      Returns:
      action variable names
    • getActionLow

      public double[] getActionLow()
      Get action lower bounds.
      Returns:
      lower bounds
    • getActionHigh

      public double[] getActionHigh()
      Get action upper bounds.
      Returns:
      upper bounds