public abstract class MultiplierPenalty extends PenaltyFunction
Function.EvaluationException
Modifier and Type | Field and Description |
---|---|
protected Constraints |
constraints
the constraint/cost functions
|
protected double[] |
weights
the weights for the constraints
|
Constructor and Description |
---|
MultiplierPenalty(Constraints constraints)
Construct a multiplier penalty function from a collection of constraints.
|
MultiplierPenalty(Constraints constraints,
double weight)
Construct a multiplier penalty function from a collection of constraints.
|
MultiplierPenalty(Constraints constraints,
double[] weights)
Construct a multiplier penalty function from a collection of constraints.
|
Modifier and Type | Method and Description |
---|---|
int |
dimensionOfDomain()
Get the number of variables the function has.
|
dimensionOfRange
protected final double[] weights
protected final Constraints constraints
public MultiplierPenalty(Constraints constraints, double[] weights)
constraints
- a collection of constraintsweights
- the weights assigned to the constraintspublic MultiplierPenalty(Constraints constraints, double weight)
constraints
- a collection of equality constraintsweight
- the same weight assigned to all constraintspublic MultiplierPenalty(Constraints constraints)
constraints
- a collection of constraintspublic int dimensionOfDomain()
Function
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.