Class SendMoreMoney


  • public class SendMoreMoney
    extends ExampleFD
    It is a simple arithmetic logic puzzle, where SEND+MORE=MONEY.

    Find for the equation on the left what digits are represented by the letters different letters represent different digits

    SEND 9567 +MORE =======>+1085 MONEY 10652

    Version:
    4.7
    • Constructor Detail

      • SendMoreMoney

        public SendMoreMoney()
    • Method Detail

      • modelBasic

        public void modelBasic()
        1. Every CP program consists of two parts. The first one is a model and the second one is the specification of the search.

        The model consists of variables and constraints.

      • search

        public boolean search()
        This creates a standard search, which looks for a single solution.
        Overrides:
        search in class ExampleFD
        Returns:
        true if there is a solution, false otherwise.
      • main

        public static void main​(java.lang.String[] args)
        It executes the program to solve this simple logic puzzle.
        Parameters:
        args - no arguments used.
      • model

        public void model()
        1. Every CP program consists of two parts. The first one is a model and the second one is the specification of the search. This creates a model which uses global constraints to provide consize modeling. The model consists of variables and constraints.
        Specified by:
        model in class ExampleFD