[AMPL 25049] The problem of solving AMPL

Dear professors, when I used AMPL to solve the model, the following questions appeared:

(1) Can AMPL directly solve the programming problems with norm constraints? My treatment is: for example, for the infinite norm x≤y, I simply remove the absolute value so that every component of the vector x is ≤y, x_i≤y,-x_i≤y; For 1 norm x less than or equal to y, introduce two auxiliary variables a,b, let x=a-b, then the absolute value of x=a +b,a,b≥0, after linearizing the norm constraint, find the dual problem of the original problem, may I ask whether this treatment is correct?

(2) Solutions obtained by different solvers are completely different. For example, for solving the same model, which I consider to be a linear convex optimization problem, I want to compare the solution results of different solvers, but I find that the solutions obtained by local solvers minos, knitro and global solvers baron differ greatly. Even the results between minos and knitro are quite different. It can be said that the results obtained with any kind of solver are quite different from each other. Please kindly answer the reasons for this and tell me where to find the problem and correct it.

(3) If possible, I would like to ask you to check my model and data files. Could you please not send them to the group? As this is a work in progress, I would appreciate it if you could provide your personal email address!

Looking forward to your reply, I wish you all the best!

(1) If you want to minimize the 1-norm or the \infty-norm of some variables, then it is possible to write an equivalent problem that has a linear objective (with some additional continuous variables and linear constraints). However, if the norm expression appears in constraints, then the linearization may be more complicated, involving integer-valued variables.

Your descriptions of the linearizations seem to have the right idea, if you are looking to minimize the norms. But to get more help, you should post the AMPL formulations that you are using. You don’t need to give the whole model, just the part that shows how you linearized the norm.

(2) If your equivalent problem has a linear objective function, and all of the constraint expressions are linear, then you should be using a linear solver. If these solvers are successful, you can expect them to find optimal objective values that are the same to many decimal places. AMPL works with many linear solvers, including CPLEX, Gurobi, Xpress, COPT, MOSEK, HiGHS, SCIP, and CBC.

If you have any expressions in your model that are not linear, then to get more help, you should post some examples of how those expressions appear when they are written in AMPL. (Again, you don’t need to give the whole model.) Note that local nonlinear solvers like MINOS and Knitro are not guaranteed to converge to solutions that have the same objective value.

(3) Since you are the person who has the best knowledge of your application, you have the main responsibility for verifying that the model and data are correct. However, you can use this forum to post specific questions about optimization using AMPL.

Your question has been moved to our new user forum at discuss.ampl.com, and a response has been posted there. To see the response, use this link:


To reply, click the red “Reply” button that follows the response. (Do not send an email reply to this message.)