/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifdef _MSC_VER #define _CRT_SECURE_NO_WARNINGS #endif #include #include #include #include #include #include #include #include using namespace std; namespace MiniZinc { /** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** * **/ // Solver Factory NLSolverFactory::NLSolverFactory() { SolverConfig sc("org.minizinc.mzn-nl", MZN_VERSION_MAJOR "." MZN_VERSION_MINOR "." MZN_VERSION_PATCH); sc.name("Generic Non Linear driver"); sc.mznlibVersion(1); sc.description("MiniZinc generic Non Linear solver plugin"); sc.supportsFzn(false); sc.supportsNL(true); sc.requiredFlags({"--nl-cmd"}); sc.tags({"__internal__"}); SolverConfigs::registerBuiltinSolver(sc); } string NLSolverFactory::getDescription(SolverInstanceBase::Options* /*opt*/) { string v = "NL solver plugin, compiled " __DATE__ " " __TIME__; return v; } string NLSolverFactory::getVersion(SolverInstanceBase::Options* /*opt*/) { return MZN_VERSION_MAJOR; } string NLSolverFactory::getId() { return "org.minizinc.mzn-nl"; } void NLSolverFactory::printHelp(ostream& os) { os << "MZN-NL plugin options" << std::endl << " --nl-cmd , --nonlinear-cmd \n The backend solver filename.\n" << " --nl-flags , --backend-flags \n" " Specify option to be passed to the NL solver.\n" << " --nl-flag