ExamplesJaCoP
Class SendMoreMoney

java.lang.Object
  extended by ExamplesJaCoP.Example
      extended by ExamplesJaCoP.SendMoreMoney

public class SendMoreMoney
extends Example

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:
3.0
Author:
Radoslaw Szymanek

Field Summary
 
Fields inherited from class ExamplesJaCoP.Example
cost, search, store, vars
 
Constructor Summary
SendMoreMoney()
           
 
Method Summary
static void main(java.lang.String[] args)
          It executes the program to solve this simple logic puzzle.
 void model()
          1.
 void modelBasic()
          1.
 boolean search()
          This creates a standard search, which looks for a single solution.
 
Methods inherited from class ExamplesJaCoP.Example
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 Example
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 Example