Class ProcessAgent
java.lang.Object
neqsim.process.ml.multiagent.ProcessAgent
- All Implemented Interfaces:
Serializable, Agent
- Direct Known Subclasses:
CompressorAgent, SeparatorAgent
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 Summary
FieldsModifier and TypeFieldDescriptionprotected double[]protected double[]protected String[]protected final Stringprotected final ProcessEquipmentInterfaceprotected final ConstraintManagerprotected String[]private static final long -
Constructor Summary
ConstructorsConstructorDescriptionProcessAgent(String agentId, ProcessEquipmentInterface equipment) Create a process agent. -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleCompute constraint penalty.doublecomputeReward(StateVector globalState, double[] action) Compute agent's local reward.protected doublecomputeSetpointReward(StateVector state) Compute setpoint tracking reward.intGet the dimension of this agent's action space.double[]Get action upper bounds.double[]Get action lower bounds.String[]Get action names.Get the agent's unique identifier.Get the controlled equipment.Get local constraint manager.intGet the dimension of this agent's observation space.String[]Get observation names.doublegetSetpoint(String variableName) Get setpoint value.booleanisTerminated(StateVector globalState) Check if agent's local termination condition is met.setSetpoint(String variableName, double value, double weight) Set a control setpoint.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Agent
applyAction, getLocalObservation, getMessage, receiveMessages
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
agentId
-
equipment
-
localConstraints
-
observationNames
-
actionNames
-
actionLow
protected double[] actionLow -
actionHigh
protected double[] actionHigh -
setpoints
-
setpointWeights
-
-
Constructor Details
-
ProcessAgent
Create a process agent.- Parameters:
agentId- unique identifierequipment- controlled equipment
-
-
Method Details
-
getAgentId
Description copied from interface:AgentGet the agent's unique identifier.- Specified by:
getAgentIdin interfaceAgent- Returns:
- agent ID
-
getObservationDim
public int getObservationDim()Description copied from interface:AgentGet the dimension of this agent's observation space.- Specified by:
getObservationDimin interfaceAgent- Returns:
- observation dimension
-
getActionDim
public int getActionDim()Description copied from interface:AgentGet the dimension of this agent's action space.- Specified by:
getActionDimin interfaceAgent- Returns:
- action dimension
-
setSetpoint
Set a control setpoint.- Parameters:
variableName- variable namevalue- setpoint valueweight- reward weight for tracking error- Returns:
- this agent for chaining
-
getSetpoint
Get setpoint value.- Parameters:
variableName- variable name- Returns:
- setpoint value or NaN if not set
-
computeSetpointReward
Compute setpoint tracking reward.- Parameters:
state- current state- Returns:
- negative reward based on setpoint errors
-
computeConstraintPenalty
Compute constraint penalty.- Parameters:
state- current state- Returns:
- negative reward for constraint violations
-
computeReward
Description copied from interface:AgentCompute agent's local reward.- Specified by:
computeRewardin interfaceAgent- Parameters:
globalState- current global stateaction- action taken- Returns:
- local reward
-
isTerminated
Description copied from interface:AgentCheck if agent's local termination condition is met.- Specified by:
isTerminatedin interfaceAgent- Parameters:
globalState- current global state- Returns:
- true if agent triggers termination
-
getEquipment
-
getLocalConstraints
-
getObservationNames
-
getActionNames
-
getActionLow
public double[] getActionLow()Get action lower bounds.- Returns:
- lower bounds
-
getActionHigh
public double[] getActionHigh()Get action upper bounds.- Returns:
- upper bounds
-