Class GenericSolver

    • Constructor Detail

      • GenericSolver

        private GenericSolver()
    • Method Detail

      • countIterations

        protected final int countIterations()
      • countTime

        protected final long countTime()
        The number of ms since solver instantiated or iterations count reset.
      • error

        protected final void error​(java.lang.String messagePattern,
                                   java.lang.Object... arguments)
      • getClassSimpleName

        protected final java.lang.String getClassSimpleName()
      • getDuration

        protected final CalendarDateDuration getDuration()
        The number of s since solver instantiated or iterations count reset.
      • incrementIterationsCount

        protected final int incrementIterationsCount()
        Should be called after a completed iteration. The iterations count is not "1" untill the first iteration is completed.
      • isIterationAllowed

        protected final boolean isIterationAllowed()
        Should be called at the start of an iteration (before it actually starts) to check if you should abort instead. Will return false if either the iterations count or the execution time has reached their respective limits.
      • isLogDebug

        protected final boolean isLogDebug()
        Detailed debug logging
      • isLogOff

        protected final boolean isLogOff()
        No logging
      • isLogProgress

        protected final boolean isLogProgress()
        Cursory progress logging (at least)
      • log

        protected final void log()
      • log

        protected final void log​(int tabs,
                                 java.lang.String messagePattern,
                                 java.lang.Object... arguments)
      • log

        protected final void log​(java.lang.String descripttion,
                                 Access2D<?> matrix)
      • log

        protected final void log​(java.lang.String messagePattern,
                                 java.lang.Object... arguments)
      • logProgress

        protected void logProgress​(int iterationsDone,
                                   java.lang.String classSimpleName,
                                   CalendarDateDuration duration)
      • resetIterationsCount

        protected final void resetIterationsCount()
      • setState

        protected final void setState​(Optimisation.State state)
        As the solver algorithm reaches various states it should be recorded here. It's particularly important to record when a feasible solution has been reached.