Class HistoricHomes
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.HistoricHomes
-
public class HistoricHomes extends ExampleFD
It is a simple logic puzzle about houses.- Version:
- 4.8
Each year the Glendale Women's Club sponsors a Historic Homes Tour in which five old houses are (with the owners' permission, of course) opened to the public. This year the five homes are on different streets (Azalea Drive, Crepe Myrtle Court, Jasmine Boulevard, Magnolia Street, and Oleander Road), and each was built in a different year (1860, 1870, 1890, 1900, and 1920). Can you give the order in which the tour visited the five homes (identifying them by street) and match each with its year?
1. The home on Jasmine is 20 years older than the one on Azalea. 2. The third home on the tour was built in 1860. 3. The tour visited the home on Magnolia sometime before the one built in 1890. 4. The tour visited the home on Oleander (which wasn't the last of the five to be built) sometime before it visited the one on Jasmine, which in turn was seen sometime before the one built in 1900.
Determine: Order -- Street -- Year
-
-
Constructor Summary
Constructors Constructor Description HistoricHomes()
-
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()
It specifies a standard way of modeling the problem.-
Methods inherited from class org.jacop.examples.fd.ExampleFD
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
-
-
-
-
Method Detail
-
model
public void model()
Description copied from class:ExampleFD
It specifies a standard way of modeling the problem.
-
main
public static void main(java.lang.String[] args)
It executes the program to solve this simple logic puzzle.- Parameters:
args
- parameters (none)
-
-