<< ampl_evalf AMPL Toolbox ampl_evalw >>

AMPL Toolbox >> AMPL Toolbox > ampl_evalg

ampl_evalg

evaluate the gradient of the objective function and the Jacobian of the constraints of a given AMPL problem

Calling Sequence

[g, jac] = ampl_evalg(asl, x)

Parameters

x

the point where we evaluate the gradient and the Jacobian

asl

a structure which handles the pointer to the problem

g

a vector which contains the value of the gradient (length: n_var)

jac

a matrix which contains the value of the Jacobian (dimension: n_var x n_constr)

Description

Evaluate the gradient of the objective function and the Jacobian of the constraintsof a given AMPL problem.

Examples

[asl, x0, bl, bu, v, cl, cu] = ampl_init('demos/data/ASL/ch03.nl');

[g, jac] = ampl_evalg(asl, x0);

ampl_free(asl); // free the memory

See Also

Authors


Report an issue
<< ampl_evalf AMPL Toolbox ampl_evalw >>