Class SeparatorAgent
java.lang.Object
neqsim.process.ml.multiagent.ProcessAgent
neqsim.process.ml.multiagent.SeparatorAgent
- All Implemented Interfaces:
Serializable, Agent
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 Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate doubleprivate doubleprivate ThrottlingValveprivate ThrottlingValveprivate final Separatorprivate static final longFields inherited from class ProcessAgent
actionHigh, actionLow, actionNames, agentId, equipment, localConstraints, observationNames, setpoints, setpointWeights -
Constructor Summary
ConstructorsConstructorDescriptionSeparatorAgent(String agentId, Separator separator, ThrottlingValve liquidValve) Create separator agent with level control only.SeparatorAgent(String agentId, Separator separator, ThrottlingValve liquidValve, ThrottlingValve gasValve) Create separator agent with level and pressure control. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAction(double[] action) Apply agent's action to the process.private voidapplyValvePosition(ThrottlingValve valve, double position) doublecomputeReward(StateVector globalState, double[] action) Compute agent's local reward.double[]getLocalObservation(StateVector globalState) Get the agent's local observation from global state.Get the separator.private voidvoidsetLevelSetpoint(double level) Set level setpoint.voidsetPressureSetpoint(double pressure) Set pressure setpoint.Methods inherited from class ProcessAgent
computeConstraintPenalty, computeSetpointReward, getActionDim, getActionHigh, getActionLow, getActionNames, getAgentId, getEquipment, getLocalConstraints, getObservationDim, getObservationNames, getSetpoint, isTerminated, setSetpointMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Agent
getMessage, receiveMessages
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
separator
-
liquidValve
-
gasValve
-
controlGasValve
private boolean controlGasValve -
currentLiquidValvePos
private double currentLiquidValvePos -
currentGasValvePos
private double currentGasValvePos
-
-
Constructor Details
-
SeparatorAgent
Create separator agent with level control only.- Parameters:
agentId- agent IDseparator- the separatorliquidValve- 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 IDseparator- the separatorliquidValve- liquid outlet valvegasValve- gas outlet valve
-
-
Method Details
-
initializeSpaces
private void initializeSpaces() -
getLocalObservation
Description copied from interface:AgentGet 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:AgentApply agent's action to the process.- Parameters:
action- action array
-
applyValvePosition
-
computeReward
Description copied from interface:AgentCompute agent's local reward.- Specified by:
computeRewardin interfaceAgent- Overrides:
computeRewardin classProcessAgent- Parameters:
globalState- current global stateaction- 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
-