Open svigerske opened 5 years ago
Comment by @h-i-gassmann created at 2015-03-05 21:10:22
Set assignee to @h-i-gassmann.
Comment by @h-i-gassmann created at 2015-03-05 21:10:22
Changing status from new to assigned.
Comment by JunMa created at 2015-03-13 17:57:27
Sorry for the late reply. Do you still encounter the same issue?
Issue created by migration from Trac.
Original creator: @svigerske
Original creation time: 2013-10-22 08:50:39
Version:
The MAXLIST operand in an AMPL expression is not handled correctly. The attached files should demonstrate this behavior.
I talked to Victor at AMPL and the correct way to handle MAXLIST is to do the following:
You should first cast a pointer to an expression representing max (MAXLIST) from expr to expr_va (https://github.com/ampl/ampl/blob/master/solvers/nlp.h#L100). Then you can iterate over arguments as follows:
Here's a simple C++ wrapper around expr_va which can be used as an example: https://github.com/ampl/ampl/blob/master/solvers/util/expr.h#L446