我有一个MILP模型,尝试使用cplex python API解决。我需要获得多个解决方案。问题是,当我从cplex池中获得50个解决方案时,这些解决方案非常相似。在获得这些解决方案之前,如何在不增加新约束的情况下以某种方式改组并尽可能获得彼此不同的解决方案?
答案 0 :(得分:1)
您可以为此使用解决方案池过滤器。使用分集滤波器,可以确保解决方案足够不同。但是,这些过滤器仅适用于二进制变量。
您可以在solution pool documentation和solution pool reference documentation中找到更多详细信息。可以在C库参考文档here和here中找到有关过滤器功能的详细信息。
该用户手册还提供了有关使用另一种策略查找多样化解决方案的示例。参见CPLEX > User's Manual for CPLEX > Discrete optimization Solution pool: generating and keeping multiple solutions > Parameters of the solution pool > Example: diverse solutions through replacement parameter