Class FletcherPenalty
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.general.penaltymethod.PenaltyFunction
-
- dev.nm.solver.multivariate.constrained.general.penaltymethod.MultiplierPenalty
-
- dev.nm.solver.multivariate.constrained.general.penaltymethod.FletcherPenalty
-
- All Implemented Interfaces:
Function<Vector,Double>
,RealScalarFunction
public class FletcherPenalty extends MultiplierPenalty
This penalty function sums up the squared costs penalties. It applies to inequality constrained problems.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
-
Field Summary
-
Fields inherited from class dev.nm.solver.multivariate.constrained.general.penaltymethod.MultiplierPenalty
constraints, weights
-
-
Constructor Summary
Constructors Constructor Description FletcherPenalty(LessThanConstraints constraints)
Construct a Fletcher penalty function from a collection of inequality constraints.FletcherPenalty(LessThanConstraints constraints, double weight)
Construct a Fletcher penalty function from a collection of inequality constraints.FletcherPenalty(LessThanConstraints constraints, double[] weights)
Construct a Fletcher penalty function from a collection of inequality constraints.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Double
evaluate(Vector x)
Evaluate the function f at x, where x is from the domain.-
Methods inherited from class dev.nm.solver.multivariate.constrained.general.penaltymethod.MultiplierPenalty
dimensionOfDomain
-
Methods inherited from class dev.nm.solver.multivariate.constrained.general.penaltymethod.PenaltyFunction
dimensionOfRange
-
-
-
-
Constructor Detail
-
FletcherPenalty
public FletcherPenalty(LessThanConstraints constraints, double[] weights)
Construct a Fletcher penalty function from a collection of inequality constraints.- Parameters:
constraints
- a collection of inequality constraintsweights
- the weights assigned to the constraints
-
FletcherPenalty
public FletcherPenalty(LessThanConstraints constraints, double weight)
Construct a Fletcher penalty function from a collection of inequality constraints. We assign the same weight to all constraints.- Parameters:
constraints
- a collection of inequality constraintsweight
- the same weight assigned to the constraints
-
FletcherPenalty
public FletcherPenalty(LessThanConstraints constraints)
Construct a Fletcher penalty function from a collection of inequality constraints. We assign the same default weight to all constraints.- Parameters:
constraints
- a collection of inequality constraints
-
-