AMPL API C++: Wrong output for getData() command

20 views
Skip to first unread message

Milan Jain

unread,
Jul 20, 2016, 12:11:11 PM7/20/16
to AMPL Modeling Language
I have a variable SPOT_Status and I want to get first row of this variable. Therefore, I executed following command:
              -> ampl::DataFrame dfSPOTStatusNew = ampl.getData("{j in 1..2} SPOT_Status[1,j]");

However, when I do -> std::cout << dfSPOTStatusNew.toString(), it throws random output. Snapshot of the output is attached with the file. Please help.

Thanks
Milan Jain
Bug.png

Victor Zverovich

unread,
Jul 21, 2016, 7:12:36 PM7/21/16
to am...@googlegroups.com
Thanks for the bug report. This will be fixed in the next corrective release of the API. As a workaround you can get the full data frame and filter it using the C++ code.

HTH,
Victor

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages