Hi, I have just started my first exercise with AMPL as part of an on-line course but I keep receiving the no variables declared error and I am not sure how to solve it. I put the following data in my file called “capstone”.

var x >=0;

var y >=0;

maximize 25*x+30*y;

subject to x<= 6000;

subject to y<= 4000;

subject to x*1/200+y*1/140 <=40

then in the console I write:

ampl: model capstone.mod;

ampl: option solver cplex;

ampl: solve;

but it keeps giving me “no variables declared”. I have no idea where the error is and I need to finish this project.

Any help would be more than appreciated!

Thank you

Simona