Class LPProblemProvider


  • public class LPProblemProvider
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      LPProblemProvider​(lpsolve.LpSolve problem, int num)  
      LPProblemProvider​(lpsolve.LpSolve problem, int num, lpsolve.MsgListener listener, int msgHandle)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deleteLps()  
      void finished​(lpsolve.LpSolve solver)
      Signals that this solver is done and can be used by another thread.
      lpsolve.LpSolve firstAvailable()
      Returns the first available solver.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LPProblemProvider

        public LPProblemProvider​(lpsolve.LpSolve problem,
                                 int num)
                          throws lpsolve.LpSolveException
        Throws:
        lpsolve.LpSolveException
      • LPProblemProvider

        public LPProblemProvider​(lpsolve.LpSolve problem,
                                 int num,
                                 lpsolve.MsgListener listener,
                                 int msgHandle)
                          throws lpsolve.LpSolveException
        Throws:
        lpsolve.LpSolveException
    • Method Detail

      • firstAvailable

        public lpsolve.LpSolve firstAvailable()
        Returns the first available solver. If no solver is available, the current thread is put in a busy-wait state until one becomes available. The returned solver can be used without the need for synchronizing on it. Furthermore, once finished with a solver, it should be returned in the finished method. It is good practice to call the finished() method from a finally block after catching any exception coming from the solver, to make sure no solvers ever get lost.
        Returns:
      • finished

        public void finished​(lpsolve.LpSolve solver)
        Signals that this solver is done and can be used by another thread. It is good practice to call the finished() method from a finally block after catching any exception coming from the solver, to make sure no solvers ever get lost.
        Parameters:
        solver -
      • deleteLps

        public void deleteLps()