Class ActionVector

java.lang.Object
neqsim.process.ml.ActionVector
All Implemented Interfaces:
Serializable

public class ActionVector extends Object implements Serializable
Standardized action vector for RL control integration.

Represents control actions that can be applied to process equipment. Actions are defined with physical bounds to ensure safe operation.

Version:
1.0
Author:
ESOL
See Also:
  • Field Details

  • Constructor Details

    • ActionVector

      public ActionVector()
      Create an empty action vector.
  • Method Details

    • define

      public ActionVector define(String name, double lowerBound, double upperBound, String unit)
      Define an action dimension with bounds.
      Parameters:
      name - action name (e.g., "valve_opening", "setpoint")
      lowerBound - minimum allowed value
      upperBound - maximum allowed value
      unit - unit string
      Returns:
      this ActionVector for chaining
    • set

      public ActionVector set(String name, double value)
      Set an action value, clamping to bounds.
      Parameters:
      name - action name
      value - desired value (will be clamped to bounds)
      Returns:
      this ActionVector for chaining
    • setNormalized

      public ActionVector setNormalized(String name, double normalizedValue)
      Set action from normalized value [0, 1].
      Parameters:
      name - action name
      normalizedValue - value in [0, 1] range
      Returns:
      this ActionVector for chaining
    • setFromNormalizedArray

      public ActionVector setFromNormalizedArray(double[] normalizedValues)
      Set all actions from normalized array.
      Parameters:
      normalizedValues - array of values in [0, 1] in definition order
      Returns:
      this ActionVector for chaining
    • get

      public double get(String name)
      Get action value in physical units.
      Parameters:
      name - action name
      Returns:
      value in physical units
    • getActionNames

      public String[] getActionNames()
      Get all action names.
      Returns:
      array of action names
    • size

      public int size()
      Get number of action dimensions.
      Returns:
      action count
    • getLowerBounds

      public double[] getLowerBounds()
      Get lower bounds array.
      Returns:
      array of lower bounds
    • getUpperBounds

      public double[] getUpperBounds()
      Get upper bounds array.
      Returns:
      array of upper bounds
    • toArray

      public double[] toArray()
      Get all values as array.
      Returns:
      array of action values
    • isAtBound

      public boolean isAtBound(String name)
      Check if an action value is at its bounds.
      Parameters:
      name - action name
      Returns:
      true if at lower or upper bound
    • toString

      public String toString()
      Overrides:
      toString in class Object