[AMPL 25086] Error at _cmdno 26 executing "solve" command

Dear AMPL team,

I am reading my data from spreadsheet and I have a set of only one member and a parameter related to this set. The Excel file is attached. And in the .run file to read the spreadsheet I have thoses statements:

table EPSI_tab IN “amplxl” “EPSI_VAL.xlsx” “epsi”:
[EPSI ], EP_VAL;

read table EPSI_tab;

And I have had the following error message:

«error processing param EP_VAL[…]:
no data for set EPSI
ampl: »

Thank in advance for your help.

(attachments)

EPSI_VAL.xlsx (9.85 KB)

When the set is described as [EPSI] in the table statement, read table EPSI_tab assumes that the members of EPSI are known, and only the values for EP_VAL will be read from the spreadsheet.

To tell the read table statement to read both members of set EPSI and values of param EP_VAL from the spreadsheet, add EPSI <- before [EPSI]:

table EPSI_tab IN "amplxl" "EPSI_VAL.xlsx" "epsi":
   EPSI <- [EPSI], EP_VAL;

Your question has been moved to our new user forum at discuss.ampl.com, and a response has been posted there. To see the response, use this link:

https://discuss.ampl.com/t/ampl-25086-error-at-cmdno-26-executing-solve-command/2219

To reply, click the red “Reply” button that follows the response. (Do not send an email reply to this message.)

Many thanks for your help! I highly appreciate it.