[AMPL 24924] Prolonged run times


My amplpy model used to run in less than 2 minutes and after slight modifications it is taking hours and not leading to an output from the solver.
How should I tackle this problem?


First, you should determine where the hours are being spent. Are you stuck at some Python statement before solving, or at the Python statement that invokes “solve”? If you are stuck during the solve, is only the ampl process executing, or is also the solver process executing? Depending on the answer, further advice can be provided.

If your run is stuck while the solver process is executing, then the next step is to turn on solver logging, so you can see in detail what’s different between the two solver runs. The option for turning on logging depends on the solver; links to solver option descriptions can be found at https://dev.ampl.com/solvers/. For further help, you can post examples of the logs from representative runs before and after making the change.