Name

ampl_evalf — evaluate the objective function and the constraints value of a given AMPL problem

Calling Sequence

[f, c] = ampl_evalf(asl, x)

Parameters

x

the point where we evaluate the objective function and the constraints

asl

a structure which handles the pointer to the problem

f

the value of the objective function

c

a vector which contains the value of the constraints

Description

Evaluate the objective function and the constraints value of a given AMPL problem.

Examples

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

[f, c] = ampl_evalf(asl, x0);

ampl_free(asl); // free the memory
 

See Also

ampl_init, ampl_free, ampl_evalg, ampl_evalw, ampl_get_size, ampl_write_sol

Authors

Yann COLLETTE