Class MinConNonlin
- All Implemented Interfaces:
Serializable,Cloneable
MinConNonlin is based on the following FORTRAN subroutines
licensed from Prof. Dr. K. Schittkowski (1986) by agreement dated 12/2/1985:
NLPQL, NLPQL, MERIT, LINSEA,
QL, LDL. More recent versions on these routines
are available from Dr. Schittkowski.
$$\mathop {\min }\limits_{x\; \in \;R^n } f\left( x \right)$$
subject to
$${\rm{ }}g_j \left( x \right) = 0, {\rm{for}} \,\, j = 1,\; \ldots ,\;m_e$$
$$g_j \left( x \right) \ge 0, \rm{for} \,\, {j = m_e + 1,\; \ldots ,\;m}$$
$$x_l \le x \le x_u$$
where all problem functions are assumed to be continuously differentiable. The method, based on the iterative formulation and solution of quadratic programming (QP) subproblems, obtains these subproblems by using a quadratic approximation of the Lagrangian and by linearizing the constraints. That is,
$$\mathop {\min }\limits_{x\; \in \;R^n } \frac{1}{2}d^T B_k d + \nabla f\left( {x_k } \right)^T d$$
subject to
$$\nabla g_j \left( {x_k } \right)^T d + g_j \left( {x_k } \right) = 0,{\rm{for}} \,\, j = 1,\; \ldots ,\;m_e$$
$$\nabla g_j \left( {x_k } \right)^T d + g_j \left( {x_k } \right) \ge 0, {\rm{for}} \,\, j = m_e + 1,\; \ldots ,\;m$$
$$x_l - x_k \le d \le x_u - x_k$$
where \(B_k\) is a positive definite approximation of the Hessian, and \(x_k\) is the current iterate. Let \(d_k\) be the solution of the subproblem. A line search is used to find a new point \(x_{k+1}\),
$$x_{k + 1} = x_k + \lambda d_k \,\,\,\,\lambda \in \left( {0,1} \right]$$
such that a "merit function" will have a lower function value at the new point. Here, the augmented Lagrange function (Schittkowski 1986) is used as the merit function.
When optimality is not achieved, \(B_k\) is updated according to the modified BFGS formula (Powell 1978). Note that this algorithm may generate infeasible points during the solution process. Therefore, if feasibility must be maintained for intermediate points, this function may not be suitable. For more theoretical and practical details, see Stoer (1985), Schittkowski (1980, 1983, 1986) and Gill et al. (1985).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.MinConNonlinhas been replaced byMinConNLP.static interfaceDeprecated.MinConNonlinhas been replaced byMinConNLP.static classDeprecated.MinConNonlinhas been replaced byMinConNLP.static classDeprecated.MinConNonlinhas been replaced byMinConNLP.static classDeprecated.MinConNonlinhas been replaced byMinConNLP.static classDeprecated.MinConNonlinhas been replaced byMinConNLP.static classDeprecated.MinConNonlinhas been replaced byMinConNLP. -
Constructor Summary
ConstructorsConstructorDescriptionMinConNonlin(int mTotalConstraints, int mEqualityConstraints, int nVariables) Deprecated.Nonlinear programming solver constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAccuracy(double acc) Deprecated.Set the final accuracy.voidsetGuess(double[] xguess) Deprecated.Set the initial guess of the minimum point of the input function.voidsetMaxIterations(int maxIterations) Deprecated.Set the maximum number of iterations allowed.voidsetScalingVariable(double scbnd) Deprecated.Set the scaling variable for the problem function.voidsetXlowerBound(double[] xlb) Deprecated.Set the lower bounds on the variables.voidsetXscale(double[] xscale) Deprecated.Set the diagonal scaling matrix for the variables.voidsetXupperBound(double[] xub) Deprecated.Set the upper bounds on the variables.double[]Deprecated.Solve a general nonlinear programming problem using the successive quadratic programming algorithm with a finite-difference gradient or with a user-supplied gradient.
-
Constructor Details
-
MinConNonlin
public MinConNonlin(int mTotalConstraints, int mEqualityConstraints, int nVariables) throws IllegalArgumentException Deprecated.Nonlinear programming solver constructor.- Parameters:
mTotalConstraints- Anintscalar value which defines the total number of constraintsmEqualityConstraints- Anintscalar value which defines the number of equality constraintsnVariables- Anintscalar value which defines the number of variables.- Throws:
IllegalArgumentException
-
-
Method Details
-
solve
public double[] solve(MinConNonlin.Function F) throws MinConNonlin.UphillSearchCalcException, MinConNonlin.LineSearchException, MinConNonlin.TooManyIterationsException, MinConNonlin.ZeroSearchDirectionException, MinConNonlin.QPConstraintsException Deprecated.Solve a general nonlinear programming problem using the successive quadratic programming algorithm with a finite-difference gradient or with a user-supplied gradient.- Parameters:
F- defines the user-supplied function to evaluate the function at a given point. F can be used to supply a gradient of the function. If F implementsGradientthe user-supplied gradient is used. Otherwise,an attempt to solve the problem is made using a finite-difference gradient.- Returns:
- a
doublearray containing the solution of the nonlinear programming problem. - Throws:
MinConNonlin.UphillSearchCalcExceptionMinConNonlin.LineSearchExceptionMinConNonlin.TooManyIterationsExceptionMinConNonlin.ZeroSearchDirectionExceptionMinConNonlin.QPConstraintsException
-
setGuess
public void setGuess(double[] xguess) Deprecated.Set the initial guess of the minimum point of the input function. If this member function is not called, the elements of this array are set to 0.0..- Parameters:
xguess- adoublearray specifying the initial guess of the minimum point of the input function
-
setXscale
public void setXscale(double[] xscale) Deprecated.Set the diagonal scaling matrix for the variables. If this member function is not called, the elements of this array are set to 1.0..- Parameters:
xscale- adoublearray specifying the diagonal scaling matrix for the variables- Throws:
IllegalArgumentException- is thrown if any of the elements of xscale is less than or equal to 0
-
setXlowerBound
public void setXlowerBound(double[] xlb) Deprecated.Set the lower bounds on the variables. If this member function is not called, the elements of this array are set to -1.0e6.- Parameters:
xlb- adoublearray specifying the lower bounds on the variables
-
setXupperBound
public void setXupperBound(double[] xub) Deprecated.Set the upper bounds on the variables. If this member function is not called, the elements of this array are set to 1.0e6.- Parameters:
xub- adoublearray specifying the upper bounds on the variables
-
setAccuracy
public void setAccuracy(double acc) Deprecated.Set the final accuracy. If this member function is not called, acc is set to 1.7e-8.- Parameters:
acc- adoublescalar value specifying the final accuracy.- Throws:
IllegalArgumentException- is thrown if acc is less than or equal to 0.0
-
setScalingVariable
public void setScalingVariable(double scbnd) Deprecated.Set the scaling variable for the problem function. If this member function is not called, scbnd is set to 1.0e3.- Parameters:
scbnd- adoublescalar value specifying the scaling variable for the problem function.- Throws:
IllegalArgumentException- is thrown if scbnd is less than or equal to 0.0
-
setMaxIterations
public void setMaxIterations(int maxIterations) Deprecated.Set the maximum number of iterations allowed. If this member function is not called, the maximum number of iterations is set to 100.- Parameters:
maxIterations- anintspecifying the maximum number of iterations allowed- Throws:
IllegalArgumentException- is thrown ifmaxIterationsis less than or equal to 0
-
MinConNonlinhas been replaced byMinConNLP.