Class GlpkSolver

java.lang.Object
org.tweetyproject.math.opt.solver.Solver
org.tweetyproject.math.opt.solver.GlpkSolver

public class GlpkSolver extends Solver
Provides a Java binding to the Glpk solver (https://www.gnu.org/software/glpk).
Author:
Matthias Thimm
  • Field Details

    • binary

      public static String binary
      Path to the binary or lp_solve
  • Constructor Details

    • GlpkSolver

      public GlpkSolver()
  • Method Details

    • isInstalled

      public static boolean isInstalled() throws UnsupportedOperationException
      Returns:
      if solver is installed
      Throws:
      UnsupportedOperationException - UnsupportedOperationException
    • solve

      Description copied from class: Solver
      Computes a solution to the given constraint satisfaction or optimization problem, i.e. a mapping from variables of the problem to terms.
      Specified by:
      solve in class Solver
      Parameters:
      problem - the actual problem
      Returns:
      a mapping from variables of the problem to terms.
      Throws:
      GeneralMathException - if something went wrong.
    • setBinary

      public static void setBinary(String binary)
      Sets the path to the binary.
      Parameters:
      binary - the path to the binary.
    • setTmpFolder

      public static void setTmpFolder(File path)
      Sets the path for the temporary folder.
      Parameters:
      path - some path.