ampl_get_size AMPL Toolbox ampl_init

AMPL Toolbox >> AMPL Toolbox > ampl_get_type

ampl_get_type

return the type of variables of a given AMPL problem

Calling Sequence

var_type = ampl_get_type(asl)

Parameters

asl

a structure which handles the pointer to the problem

var_type

a string which contains one charactere by variable. The meaning of each character is:

  • 'n': nonlinear variable

  • 'a': linear arcs

  • 'o': other linear

  • 'b': binary variable

  • 'i': integer variable

Description

Return the type of variables of a given AMPL problem.

Examples

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

var_type = ampl_get_type(asl);

printf('Type of each variable: %s\n', var_type);

ampl_free(asl); // free the memory

See Also

Authors

ampl_get_size AMPL Toolbox ampl_init