I have a basic vehicle routing problem (VRP) model that I aim to solve using CPLEX and JuMP. Although I manually verified that the problem configuration(including the number of customers, drivers, locations, and costs) is feasible, the JuMP solver generates an Infeasibility row " ERROR: syntax: extra token "row" after end of expression" which corresponds to one of the routing constraints that require every individual to reach their destination, Mathematically
sum(x[i,j,d] for (i,j,d) if (j==destination[d]) == 1) for all d.
The output displays an associated equation in JuMP forms is:
Destination_constraints["6d"] Destination_constraints["6d"]: x[(5, 2,"6d")] + x[(8, 2, "6d")] + x[(11, 2, "6d")] + x[(3, 2, "6d")] == 1.0
where "6d" is the id of the one of the drivers. Clearly, the LHS indicates three decision variables that can take a value of one, and the RHS is one. But it show the error of:
julia> Infeasibility row 'Destination_constraints["6d"]': 0 = 1.
ERROR: syntax: extra token "row" after end of expression
 top-level scope
I ran it for a number of other instances and there was no issue. What could be the problem here , and how can it be resolved?
Do you have any suggestion to debug it? I honestly have no idea why for “6d” I cannot see a solution but excluding this one and working with for example “1d”, “2d”,…“205d” has an optimal solution.
What is exaclty confusing for me is that is return 0==1 and by 0 it means the LHS of the relevant constraints which is Destination_constraints["6d"] which is the same as : x[(5, 2,"6d")] + x[(8, 2, "6d")] + x[(11, 2, "6d")] + x[(3, 2, "6d")] becomes zero. But Ido not see any conflict between having a value of one for any of the variable above (like x[(5, 2,"6d")] ) and the rest of the solutions.
Thanks@odow, I have attempted to create a small, reproducible instance of the problem but have been unsuccessful. Interestingly, in the equation that I was working with, the left-hand-side was not empty. Specifically, it was of the form Destination_constraints[“6d”] Destination_constraints[“6d”]: x[(5, 2,“6d”)] + x[(8, 2, “6d”)] + x[(11, 2, “6d”)] + x[(3, 2, “6d”)] == 1.0.
Not sure but after isolating just “6d” and examination of related constraints, it appears that one of the constraints has an inappropriate Big-M value, which is causing a conflict. But what this has do with non-empty LHS is ambigious part of it.
The general method is to solve your problem. Double check it’s infeasible. Comment out a constraint. Re-solve. Etc.
For example you could try
# @constraint(model, Destination_constraints[d in Dset], sum(x[(i, j, d)] for (i, j, d) in Edge_set[d] if j== Destination[d]) ==1)
@constraint(model, Destination_constraints[d in ["6d"]], sum(x[(i, j, d)] for (i, j, d) in Edge_set[d] if j== Destination[d]) ==1)
It that’s still infeasible, keep going. If not, then the problem is elsewhere, and the error message from CPLEX is misleading.
It might be that CPLEX has presolved out some variables, and the error is coming from the presolved version of the model, not the original model that you input.