using BilevelJuMP, MibS_jll model = BilevelModel() K = 1:1 V = 1:3 v0 = 1 a = 10 C = [0 6 11; 10 0 7; 8 9 0] @variable(Upper(model), x1[k=K], Bin) @variable(Lower(model), x2[i=V, j=V] >= 0, Bin) @objective(Upper(model), Max, a * sum(x1[k] for k in K)) @objective(Lower(model), Min, sum(C[i, j] * x2[i, j] for i in V for j in V if i != j)) for j in V @constraint(Lower(model), x2[j, j] <= 0) end for j in V @constraint(Lower(model), sum(x2[i, j] for i in V if i != j) <= x1[1]) @constraint(Lower(model), sum(x2[i, j] for i in V if i != j) >= x1[1]) end solution = BilevelJuMP.solve_with_MibS(model, MibS_jll.mibs; verbose_results=true) for (var_name, value) in solution.all_lower println("$var_name = $value") end ============================================ Output: Optimal solution: Cost = -10 x[0] = 1 y[0] = 1 y[1] = 1 y[6] = 1 Number of problems (VF) solved = 1 Number of problems (UB) solved = 1 Time for solving problem (VF) = 0 Time for solving problem (UB) = 0 ============================================ x2[3,2] = 0 x2[3,3] = 0 x2[2,1] = 1.0 x2[1,3] = 1.0 x2[1,1] = 1.0 x2[2,3] = 0 x2[3,1] = 0 x2[1,2] = 0 x2[2,2] = 0 ============================================ ============================================ expected Output (lower variables): x2[3,2] = 0 x2[3,3] = 0 x2[2,1] = 0 x2[1,3] = 0 x2[1,1] = 0 x2[2,3] = 1.0 x2[3,1] = 0 x2[1,2] = 1.0 x2[2,2] = 0 ============================================