Class Solver


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

      Constructors 
      Constructor Description
      Solver​(Data data)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isSolvable()
      Tests whether the Problem is solvable under the current Constraints.
      void isSolvableOrError()
      Tests whether the Problem is solvable under the current Constraints.
      void onSolved​(OnSolved onSolvedCallback)
      Adds a callback for onSolved event.
      protected void setDebugMode​(boolean debugMode)  
      void solve​(SolverStrategy strategy)
      Solve and optimize the equation system.
      • Methods inherited from class java.lang.Object

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

      • Solver

        public Solver​(Data data)
    • Method Detail

      • onSolved

        public void onSolved​(OnSolved onSolvedCallback)
        Adds a callback for onSolved event.
        Parameters:
        onSolvedCallback - the Callback
      • isSolvableOrError

        public void isSolvableOrError()
                               throws OpenemsException
        Tests whether the Problem is solvable under the current Constraints.
        Throws:
        OpenemsException - on error
      • isSolvable

        public boolean isSolvable()
        Tests whether the Problem is solvable under the current Constraints.
        Returns:
        true if the problem is solvable
      • setDebugMode

        protected void setDebugMode​(boolean debugMode)