We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
for (const de *d = ((expr_va*)e)->L.d; d->e; ++d) { // d->e points to an argument }
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
The text was updated successfully, but these errors were encountered:
Attachment DG.mod by @svigerske created at 2013-10-22 08:51:08
Sorry, something went wrong.
Attachment DG.nl by @svigerske created at 2013-10-22 08:51:16
Comment by @h-i-gassmann created at 2015-03-05 21:10:22
Set assignee to @h-i-gassmann.
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?
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: