Package org.jacop.examples.fd
Class SendMoreMoney
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.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.8
-
-
Constructor Summary
Constructors Constructor Description SendMoreMoney()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 org.jacop.examples.fd.ExampleFD
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
-
-
-
-
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.
-
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.
-
-