0
Javaを使用してCplexでモデルを解決しようとしています。しかし、私がcplex.getSolnPoolNsolns()を使って解決策プールの解決策を得ようとしているとき、0の値を返しています。それはどういう意味ですか?cplex.getSolnPoolNsolns()を使用してソリューションを取得しない
Javaを使用してCplexでモデルを解決しようとしています。しかし、私がcplex.getSolnPoolNsolns()を使って解決策プールの解決策を得ようとしているとき、0の値を返しています。それはどういう意味ですか?cplex.getSolnPoolNsolns()を使用してソリューションを取得しない
コードがCPLEXの次の標準例と一致するかどうか確認してください。
public static void main(String[] args) {
if (args.length != 1) {
usage();
return;
}
try {
IloCplex cplex = new IloCplex();
cplex.importModel(args[0]);
/* Set the solution pool relative gap parameter to obtain solutions
of objective value within 10% of the optimal */
cplex.setParam(IloCplex.DoubleParam.SolnPoolGap, 0.1);
if (cplex.populate()) {
System.out.println("Solution status = " + cplex.getStatus());
System.out.println("Incumbent objective value = "
+ cplex.getObjValue());
/* Get the number of solutions in the solution pool */
int numsol = cplex.getSolnPoolNsolns();
System.out.println("The solution pool contains " + numsol +
" solutions.");
}
}
cplex.populate()
のような手順がありません。