Package org.jacop.examples.fd
Class SendMoreMoney
java.lang.Object
org.jacop.examples.fd.ExampleFD
org.jacop.examples.fd.SendMoreMoney
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.9
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
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
-
Constructor Details
-
SendMoreMoney
public SendMoreMoney()
-
-
Method Details
-
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
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.
-