Package org.ptolemy.optimization
Class ObjectiveFunctionWithSoftConstraints
- java.lang.Object
-
- org.ptolemy.optimization.ObjectiveFunctionWithSoftConstraints
-
public class ObjectiveFunctionWithSoftConstraints extends java.lang.Object
The objective function class which is used in Phase 1 of the interior point method. In the interior point method, a starting point X must be a feasible point that satisfies all constraints. If the feasible point couldn't be found, the interior point method solve the problem using this class treating the hard constraints as soft constraints.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Shuhei Emoto
- Pt.AcceptedRating:
- Pt.ProposedRating:
- Red (shuhei)
-
-
Field Summary
Fields Modifier and Type Field Description double[]
currentX
double[]
f0Gradient
double[][]
f0Hessian
double
f0Result
double[][]
fiGradients
double[][][]
fiHessians
double[]
fiResults
int
iterationCounter
boolean
quasiNewtonMethod
boolean
stopRequested
-
Constructor Summary
Constructors Constructor Description ObjectiveFunctionWithSoftConstraints(org.ptolemy.optimization.ObjectiveFunction a_source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calcFuncInternal(double[] x)
Objective function called in optimization class.boolean
calcFunction(double[] x)
Objective function and constraint functions.boolean
checkFeasibility()
check feasibility of current pointprotected void
clearMatrix(double[][] matrix)
Clear Matrixdouble[]
getCurrentPoint()
get current point
-
-
-
Field Detail
-
f0Result
public double f0Result
-
fiResults
public double[] fiResults
-
f0Gradient
public double[] f0Gradient
-
fiGradients
public double[][] fiGradients
-
f0Hessian
public double[][] f0Hessian
-
fiHessians
public double[][][] fiHessians
-
currentX
public double[] currentX
-
iterationCounter
public int iterationCounter
-
stopRequested
public boolean stopRequested
-
quasiNewtonMethod
public boolean quasiNewtonMethod
-
-
Method Detail
-
calcFunction
public boolean calcFunction(double[] x)
Objective function and constraint functions. In this function, all results(f0_result, fi_results) and gradients(f0_gradient, fi_gradients) must be updated.- Parameters:
x
- : input variables- Returns:
- If calculation was terminated by user input, return "false".
-
calcFuncInternal
public void calcFuncInternal(double[] x)
Objective function called in optimization class.- Parameters:
x
- input variables
-
checkFeasibility
public boolean checkFeasibility()
check feasibility of current point- Returns:
- : true if all of constraints are negative
-
getCurrentPoint
public double[] getCurrentPoint()
get current point- Returns:
- : current point X
-
clearMatrix
protected void clearMatrix(double[][] matrix)
Clear Matrix- Parameters:
matrix
- : matrix which is to be zero-matrix.
-
-