Production/inventory problem syntax error

15 views
Skip to first unread message

Javier Maldonado

unread,
Oct 28, 2023, 7:42:25 PM10/28/23
to AMPL Modeling Language
Hello!

Im trying to solve a production/inventory problem and ive got syntax error

ampl: model 'C:\AMPL\models\ej5.mod';

C:\AMPL\models\ej5.mod, line 1 (offset 18):

syntax error

context: set Periodos := 1 >>> 2 <<< 3;

ampl: 

ej5.run
ej5.mod

AMPL Google Group

unread,
Oct 30, 2023, 3:56:14 PM10/30/23
to AMPL Modeling Language
In ej5.run, you correctly give the data for set Periodos:

data;

set Periodos := 1 2 3;

But the error message indicates that the error is in your model file, ej5.mod. To fix it, change the first statement in your model file so that it does not specify the data:

set Periodos;


--
Robert Fourer

We're switching to a new, enhanced user forum.
Join it now at discuss.ampl.com.
{#HS:2404384162-120256#}
Reply all
Reply to author
Forward
0 new messages