Class LeastDiff

java.lang.Object
org.jacop.examples.fd.ExampleFD
org.jacop.examples.fd.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 Details

    • LeastDiff

      public LeastDiff()
  • Method Details

    • 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(String[] args)
      It executes the program which solves this simple optimization problem.
      Parameters:
      args - parameters (none)