Class MyJsonConvergerFactory

java.lang.Object
com.dna.jopt.util.costconverger.MyJsonConvergerFactory

public final class MyJsonConvergerFactory extends Object
Builds an ICostConverger from a JSON OptimizationConvergenceOptions and wires it to an IOptimization. The returned converger is already subscribed to the optimization's progress (subscription happens in the AbstractCostConverger constructor), so it will gracefully stop the run once the configured cost metric stays unchanged for the configured number of cycles while a watched algorithm is running.
  • Method Details

    • create

      public static ICostConverger create(IOptimization opti, com.dna.jopt.config.types.OptimizationConvergenceOptions options)
      Creates and wires a cost converger for the given optimization from the convergence options.
      Parameters:
      opti - the optimization to attach the converger to (must not be null)
      options - the JSON convergence options
      Returns:
      the wired converger (already subscribed to the optimization's progress)