>
|
|
Solve a linear programming problem specified using algebraic form. The objective function and the constraints are expressions in x and y.
>
|
|
| (1) |
Solve a linear programming problem specified using Matrix form.
>
|
|
| (2) |
Quadratic programming problems can be specified in algebraic form or in Matrix form.
>
|
|
| (3) |
>
|
|
Nonlinear programs can be specified in algebraic form or in Matrix form.
>
|
|
| (5) |
You should provide the gradient of the objective function if you want to use NLPSolve in Matrix form.
>
|
obj := proc(v)
10*v[1]^2 - 2*v[1]*v[2]^2 + v[2]^4 + 1 - 2*v[2] + v[2]^2
end proc:
|
>
|
objgrad := proc(v, w)
w[1] := 20*v[1] - 2*v[2]^2:
w[2] := -4*v[1]*v[2] + 4*v[2]^3 - 2 + 2*v[2]
end proc:
|
>
|
|
| (6) |