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: https://www.youtube.com/watch?v=6XBoPbfsk_M
I’ve attached the .mod, .dat and .run files I wrote.
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.