Class CompressorAgent
java.lang.Object
neqsim.process.ml.multiagent.ProcessAgent
neqsim.process.ml.multiagent.CompressorAgent
- All Implemented Interfaces:
Serializable, Agent
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final Compressorprivate doubleprivate doubleprivate doubleprivate static final longFields inherited from class ProcessAgent
actionHigh, actionLow, actionNames, agentId, equipment, localConstraints, observationNames, setpoints, setpointWeights -
Constructor Summary
ConstructorsConstructorDescriptionCompressorAgent(String agentId, Compressor compressor) Create compressor agent. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAction(double[] action) Apply agent's action to the process.doublecomputeReward(StateVector globalState, double[] action) Compute agent's local reward.Get the compressor.double[]getLocalObservation(StateVector globalState) Get the agent's local observation from global state.private voidbooleanisTerminated(StateVector globalState) Check if agent's local termination condition is met.voidsetDischargePressureSetpoint(double pressure) Set discharge pressure setpoint.voidsetSpeedRange(double minRpm, double maxRpm) Set speed range.Methods inherited from class ProcessAgent
computeConstraintPenalty, computeSetpointReward, getActionDim, getActionHigh, getActionLow, getActionNames, getAgentId, getEquipment, getLocalConstraints, getObservationDim, getObservationNames, getSetpoint, 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:
-
compressor
-
currentSpeedFraction
private double currentSpeedFraction -
minSpeed
private double minSpeed -
maxSpeed
private double maxSpeed
-
-
Constructor Details
-
CompressorAgent
Create compressor agent.- Parameters:
agentId- agent IDcompressor- the compressor
-
-
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
-
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
-
isTerminated
Description copied from interface:AgentCheck if agent's local termination condition is met.- Specified by:
isTerminatedin interfaceAgent- Overrides:
isTerminatedin classProcessAgent- 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
-
setSpeedRange
public void setSpeedRange(double minRpm, double maxRpm) Set speed range.- Parameters:
minRpm- minimum speedmaxRpm- maximum speed
-