1. When I run case M4_wC_ohne_r, I see immediately this output:
ampl: include M1-M4.run
ampl: solve M4_wC_ohne_r;
CPLEX 20.1.0.0: timelimit = 120At the beginning of a CPLEX run, "CPLEX
20.1.0.0:" is always displayed, followed by the options that have been set for the run. In this case, the only option is "timelimit = 120". After 120 seconds, CPLEX displays another message that indicates the time limit has been reached:
CPLEX 20.1.0.0: time limit with integer solution; objective 15510
197482 MIP simplex iterations
1217 branch-and-bound nodes
absmipgap = 15007.7, relmipgap = 0.967612
ampl:At this point, the best solution that CPLEX has found, with objective value 15510, has been returned. Are you having a different experience? You mention something that is happening in 30 seconds, but I am not sure what that is.
2. AMPL has not sent your problem to the solver, because its presolve phase has analyzed the constraints (including the bounds on the variables) and has determined that no feasible solution is possible. With your model and data, presolve gives reasons like this:
presolve, variable delta[40,40]:
impossible deduced bounds: lower = 1, upper = 0Because delta is a binary variable, this can be interpreted as follows: Using some of the constraints and bounds on other variables, presolve could deduce that delta[40,40] must be 0 in any feasible solution; but using other constraints and bounds, presolve could deduce that delta[40,40] must be 1. Since delta[40,40] can't be both 0 and 1, it must be that no feasible solution can exist.
There is no simple and general way to deal with an error like this, but it is possible to suggest some good ways to get started. As an initial troubleshooting step, it is often helpful to use AMPL's
expand command to see see whether AMPL generated the constraints that you expected. By itself,
expand; shows all of the constraints. If there are many of them, you can use, for example,
expand expand C3_ohne_r; to expand all of the constraints that have a particular name. Also you can write, for instance,
expand >listing.txt; or
expand expand C3_ohne_r >listing.txt; to send all of the output to the file listing.txt.
You can also use a command like
display C3.lb, C3.ub; to see all of the lower and upper bounds that presolve deduced on a variable.
You should also consider using AMPL's
drop and restore commands to narrow your search for the cause of the infeasibility. If you drop some constraints and the resulting problem is still infeasible, then you don't need to consider the dropped constraints in looking for the cause of infeasibility. By trying a series of drops, you may be able to determine that infeasibility is being caused by only a small subset of the constraints.
If you are using one of the popular MIP solvers (CPLEX, Gurobi, Xpress) then to get more help with diagnosing the infeasibility, you can ask the solver to compute an irreducible infeasible subset. For more on this topic, search "IIS" at
groups.google.com/group/ampl, and also see the discussion of "infeasibility diagnosis" in chapter 14 of the AMPL book (
https://ampl.com/BOOK/CHAPTERS/17-solvers.pdf#page=25).