Calculating infinity norm in ampl

274 views
Skip to first unread message

Juan Pablo Fernández G

unread,
Nov 13, 2014, 11:51:53 AM11/13/14
to am...@googlegroups.com
Hi, I am new user in ampl, i would like to know how can i calculate the infinity norm in ampl?

infinity norm is the maximum of absolute value of a member of vector (simply array.)

thanks for your collaboration.

Robert Fourer

unread,
Nov 16, 2014, 11:11:55 PM11/16/14
to am...@googlegroups.com
If you have

set S;
param a {S};

then the infinity norm of a (considered as a vector) is

max {i in S} abs(a[i])

If you want to use the infinity norm of a vector of variables in your model, however, then you need to convert it to a formulation that uses linear expressions that solvers can handle. The formulation depends on how the inifinity norm expression appears in the model, however -- there is not a single answer that applies to all cases.

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages