diff --git a/MiniZincIDE/mainwindow.cpp b/MiniZincIDE/mainwindow.cpp index 8436758..e210468 100755 --- a/MiniZincIDE/mainwindow.cpp +++ b/MiniZincIDE/mainwindow.cpp @@ -748,105 +748,46 @@ void MainWindow::init(const QString& projectFile) IDE::instance()->setEditorFont(editorFont); Solver g12fd("G12 fd","flatzinc","-Gg12_fd","",true,false,true); - bool hadg12fd = false; Solver g12lazyfd("G12 lazyfd","flatzinc","-Gg12_lazyfd","-b lazy",true,false,true); - bool hadg12lazyfd = false; Solver g12mip("G12 MIP","flatzinc","-Glinear","-b mip",true,false,true); - bool hadg12mip = false; #ifdef MINIZINC_IDE_BUNDLED Solver gecode("Gecode (bundled)","fzn-gecode","-Ggecode","",true,false,true); - bool hadgecode = false; #ifdef Q_OS_WIN Solver gecodeGist("Gecode (Gist, bundled)","fzn-gecode-gist.bat","-Ggecode","",true,true,true); #else Solver gecodeGist("Gecode (Gist, bundled)","fzn-gecode-gist","-Ggecode","",true,true,true); #endif - bool hadgecodegist = false; Solver chuffed("Chuffed (bundled)","fzn-chuffed","-Gchuffed","",true,false,true); - bool hadchuffed = false; Solver cbc("COIN-OR CBC (bundled)","mzn-cbc","-Glinear","",true,false,true); - bool hadcbc = false; Solver gurobi("Gurobi (bundled)","mzn-gurobi","-Glinear","",true,false,true); - bool hadgurobi = false; #endif int nsolvers = settings.beginReadArray("solvers"); - if (nsolvers==0) { #ifdef MINIZINC_IDE_BUNDLED - solvers.append(gecode); - solvers.append(gecodeGist); -#endif - solvers.append(g12fd); - solvers.append(g12lazyfd); - solvers.append(g12mip); - } else { - IDE::instance()->stats.solvers.clear(); - for (int i=0; istats.solvers.append(solver.name); - } - solvers.append(solver); - } - if (!hadg12fd) - solvers.append(g12fd); - if (!hadg12lazyfd) - solvers.append(g12lazyfd); - if (!hadg12mip) - solvers.append(g12mip); -#ifdef MINIZINC_IDE_BUNDLED - if (!hadgurobi) - solvers.push_front(gurobi); - if (!hadcbc) - solvers.push_front(cbc); - if (!hadchuffed) - solvers.push_back(chuffed); - if (!hadgecodegist) - solvers.push_front(gecodeGist); - if (!hadgecode) - solvers.push_front(gecode); + solvers.append(gecode); + solvers.append(gecodeGist); + solvers.append(chuffed); + solvers.append(cbc); + solvers.append(gurobi); #endif + solvers.append(g12fd); + solvers.append(g12lazyfd); + solvers.append(g12mip); + IDE::instance()->stats.solvers.clear(); + for (int i=0; istats.solvers.append(solver.name); + solvers.append(solver); } settings.endArray(); settings.beginGroup("minizinc");