Package com.bayesserver.optimization
Class Objective
- java.lang.Object
-
- com.bayesserver.optimization.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 Summary
Constructors Constructor Description Objective(State state, ObjectiveKind kind)
Initializes a new instance of the {@link com.bayesserver.optimization.objective.} class.Objective(State state, ObjectiveKind kind, Double value)
Initializes a new instance of the {@link com.bayesserver.optimization.objective.} class.Objective(Variable variable, ObjectiveKind kind)
Initializes a new instance of the {@link com.bayesserver.optimization.objective.} class.Objective(Variable variable, ObjectiveKind kind, Double value)
Initializes a new instance of the {@link com.bayesserver.optimization.objective.} class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectiveKind
getKind()
Gets the kind of optimization to carry out.State
getState()
Gets the state being optimized.Double
getValue()
Gets the objective target value.Variable
getVariable()
Gets the variable being optimized.
-
-
-
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 whenKind
is set to Target.
-
-