Hello!
I’m new to developing code in AMPL. I started studying some tutorials and I’m trying to solve some exercises available on the internet.
I tried to develop a code for the problem shown at the end of this video link: AMPL Tutorial - YouTube
I’m getting some error messages, but I can’t figure out what’s wrong with my code.
The error that I can´t solve right now is:
“j is not defined”
context: maximize profit: sum{j in J} Pj[j] * Xj[j] - sum{j in J} Kj[j] * DELTAj[j] + >>> Cj[j] <<< * Xj[j] ;
I would greatly appreciate it if anyone could help me with any other errors you may encounter. I’ve attached the .mod, .dat and .run files I wrote.