I fixed index_vars by adding constraints to recommended the desired result. However, the desirable result was recommended without any problem. Therefore, there is no collision of constraints.
I added CF num constraint not to recommend unnecessary CF. e.g. If there are 11 CFs and one of them is not used, force CF num <= 10. This recommended the desired result without any Exception.
Therefore, this bug is not produced by constraints. Therefore, this possibly produced by the objective function.
The optimization is executed by three steps, cost, cost + index num, cost + index num + size. Gurobi outputs this warning when optimization is executed.
Warning: Model contains large matrix coefficient range
Consider reformulating model or setting NumericFocus parameter
to avoid numerical issues.
Solutions
fork mipper and set parameters.
# strict gap
Gurobi.GRBsetintparam @ptr, Gurobi::GRB_INT_PAR_OUTPUTFLAG, 0
# strict gap
Gurobi.GRBsetintparam @ptr, Gurobi::GRB_DBL_ATTR_MIPGAP, 0
Gurobi.GRBsetintparam @ptr, Gurobi::GRB_DBL_PAR_MIPGAPABS, 0
some coefficients in the objective function were multiplied by Interval
setting interval not in seconds but in minutes (3600 -> 60) fixed this problem
increased coefficient for CF creation cost and the coefficient for migration support query to reduce the coefficient range
Problem
Some recommended CFs are never used in any timestep
Cause
The numerical issue in Gurobi solver.
Isn't the cause is constraints?
Therefore, this bug is not produced by constraints. Therefore, this possibly produced by the objective function.
Solutions