Does the order of the constraint list matter?

Does the order of the constraint list matter?

The short answer is yes.

The main reason is that there can be many equivalent solutions to a problem. Changing the order of the variables and constraints can change some of the internal algorithmic decisions that HiGHS makes during the solution algorithm, and this can cause it to find one solution before another.

However, even if it finds different solutions in x, the objective value of each optimal decision will be the same (to within the optimality tolerance).

You can see the final objective value with objective_value(model).

2 Likes