Expected number error

19 views
Skip to first unread message

Sarthak Khatri

unread,
Nov 25, 2022, 11:15:39 AM11/25/22
to AMPL Modeling Language
As I am executing the data file it shows this error 
Expected number in place of MM.
Can someone help me with this?
Screen Shot 2022-11-24 at 10.26.50 AM.png
Screen Shot 2022-11-24 at 10.26.31 AM.png

AMPL Google Group

unread,
Nov 25, 2022, 11:05:29 PM11/25/22
to AMPL Modeling Language
Pay close attention to the form of a two-dimensional AMPL data table, as shown for instance in Figure 1-6b of the AMPL book. As an example, the first line of the table for your parameter D should be

param D: 1 2 3 4 :=

(When you write "param D := 1 2 3 4" instead, AMPL interprets it as a one-dimensional table, resulting in many error messages.)


--
Robert Fourer
am...@googlegroups.com
{#HS:2078590139-112972#}
Reply all
Reply to author
Forward
0 new messages