Class LeastDiff


  • public class LeastDiff
    extends ExampleFD
    Simple least Diff problem.

    Minimize the difference ABCDE - FGHIJ where A..J is all different in the range 0..9.

    The solution is: 50123 - 49876 = 247

    JaCoP Model by Hakan Kjellerstrand (hakank@bonetmail.com) Also see http://www.hakank.org/JaCoP/

    Version:
    4.8
    • Constructor Detail

      • LeastDiff

        public LeastDiff()
    • Method Detail

      • model

        public void model()
        Description copied from class: ExampleFD
        It specifies a standard way of modeling the problem.
        Specified by:
        model in class ExampleFD
      • main

        public static void main​(java.lang.String[] args)
        It executes the program which solves this simple optimization problem.
        Parameters:
        args - parameters (none)