Class Objective


  • public final class Objective
    extends Object
    Defines the target variable or state that you wish to maximize or minimize. Can be a function.
    • Constructor Detail

      • Objective

        public Objective​(Variable variable,
                         ObjectiveKind kind)
        Initializes a new instance of the {@link com.bayesserver.optimization.objective.} class.
        Parameters:
        variable - The variable to optimize. Can be discrete, continuous or a function.
        kind - The type of optimization to carry out. e.g. Minimize or maximize.
      • Objective

        public Objective​(State state,
                         ObjectiveKind kind)
        Initializes a new instance of the {@link com.bayesserver.optimization.objective.} class.
        Parameters:
        state - The discrete state to optimize.
        kind - The type of optimization to carry out. e.g. Minimize or maximize.
      • Objective

        public Objective​(Variable variable,
                         ObjectiveKind kind,
                         Double value)
        Initializes a new instance of the {@link com.bayesserver.optimization.objective.} class.
        Parameters:
        variable - The variable to optimize. Can be discrete, continuous or a function.
        kind - The type of optimization to carry out. e.g. Minimize, maximize or Target.
        value - The target value when objective kind is Target.
      • Objective

        public Objective​(State state,
                         ObjectiveKind kind,
                         Double value)
        Initializes a new instance of the {@link com.bayesserver.optimization.objective.} class.
        Parameters:
        state - The discrete state to optimize.
        kind - The type of optimization to carry out. e.g. Minimize, maximize or Target.
        value - The target value when objective kind is Target.
    • Method Detail

      • getState

        public State getState()
        Gets the state being optimized. Note that continuous and function variables have a single state.
      • getVariable

        public Variable getVariable()
        Gets the variable being optimized.
      • getKind

        public ObjectiveKind getKind()
        Gets the kind of optimization to carry out. e.g. Maximize/Minimize.
      • getValue

        public Double getValue()
        Gets the objective target value. Only valid when Kind is set to Target.