I'm creating a program to solve assignment problems and so far so good, it works properly and in the end, it solves the problem. I'm using the PuLP library. But I just realized that when the problem has alternative solutions (instead of the unique optimal basic feasible solution) it only shows me the optimal one. Is there any function inside PuLP or any other library that can give me the number of total solutions (for example) or the objective function value for those said alt solutions?
prob.solve()
print(" ");
print("* Status: ", LpStatus[prob.status]);
print(" -------");
print(" ");
for v in prob.variables():
if v.varValue > 0:
print("------>", v.name,"=", v.varValue);
print("Total = ", value(prob.objective))
- Status: Optimal
------> Asignación: Agente 1 Tarea 2 = 1.0
------> Asignación: Agente 2 Tarea 4 = 1.0
------> Asignación: Agente 3 Tarea 3 = 1.0
------> Asignación: Agente 4 Tarea 1 = 1.0
Total = 15.0