Class Solver

    • Constructor Detail

      • Solver

        public Solver()
    • Method Detail

      • setDefaultGeneralSolver

        public static void setDefaultGeneralSolver​(Solver solver)
        Sets the default solver for non-linear (general) optimization problems.
        Parameters:
        solver - some solver
      • setDefaultLinearSolver

        public static void setDefaultLinearSolver​(Solver solver)
        Sets the default solver for linear optimization problems.
        Parameters:
        solver - some solver
      • setDefaultIntegerLinearSolver

        public static void setDefaultIntegerLinearSolver​(Solver solver)
        Sets the default solver for integer linear optimization problems.
        Parameters:
        solver - some solver
      • hasDefaultGeneralSolver

        public static boolean hasDefaultGeneralSolver()
        Returns "true" if a default solver for general optimization problems is configured.
        Returns:
        "true" if a default solver for general optimization problems is configured.
      • hasDefaultLinearSolver

        public static boolean hasDefaultLinearSolver()
        Returns "true" if a default solver for linear optimization problems is configured.
        Returns:
        "true" if a default solver for linear optimization problems is configured.
      • hasDefaultIntegerLinearSolver

        public static boolean hasDefaultIntegerLinearSolver()
        Returns "true" if a default solver for integer linear optimization problems is configured.
        Returns:
        "true" if a default solver for integer linear optimization problems is configured.
      • getDefaultGeneralSolver

        public static Solver getDefaultGeneralSolver()
        Returns the default solver for non-linear (general) optimization problems. If a default solver for general problems has been configured this solver is returned by this method. If no default solver for general problems is configured, a message is printed to stderr pointing out that no default solver is configured and the application is terminated.
        Returns:
        the default solver for non-linear (general) optimization problems.
      • getDefaultIntegerLinearSolver

        public static Solver getDefaultIntegerLinearSolver()
        Returns the default solver for integer linear optimization problems. If a default solver for general problems has been configured this solver is returned by this method. If no default solver for general problems is configured, a message is printed to stderr pointing out that no default solver is configured and the application is terminated.
        Returns:
        the default solver for non-linear (general) optimization problems.
      • getDefaultLinearSolver

        public static Solver getDefaultLinearSolver()
        Returns the default solver for linear optimization problems.

        If a default solver for linear problems has been configured this solver is returned by this method. If no default solver for linear problems is configured, the default solver for general optimization problems is returned. If this one is not defined as well, the ApacheCommonsSimplex solver (net.sf.tweety.math.opt.solver.ApacheCommonsSimplex) is returned (with a default setting of 50000 number of iterations that returns both positive and non-positive results) as a fallback and message is printed to stderr pointing out that no default solver is configured.
        Returns:
        the default solver for linear optimization problems.
      • isInstalled

        public static boolean isInstalled()
                                   throws UnsupportedOperationException
        Checks whether the solver of this class is actually installed, i.e. whether external binaries needed for running the solver are available and dependencies are satisfied.
        Returns:
        "true" if the solver of this class is installed and can therefore be instantiated and used.
        Throws:
        UnsupportedOperationException - if the operation is not supported