整数変数の値が異なる解を列挙するには,
PoolSearchModeを2に設定する.
列挙する解の個数を制限する.
PoolGapを0にする.
として問題を解けばよい.
from gurobipy import *model = Model("count the number of optimal solutions")model.setParam("PoolSearchMode", 2)model.setParam("PoolSolutions", 200)mod
Name
MURAKAMI Yoshihiro
Academic Status
Lecturer (from 2000 Apr.)
Affiliation
Kansai University, Faculty of Engineering Science
Department of Mechanical Engineering
Dynamics and Control Engineering Laboratory
Academic Degrees
Master