org.jacop.examples.fd

Class StonesOfHeaven

• ```public class StonesOfHeaven
extends ExampleFD```
It solves a simple logic puzzle about artifacts.
Version:
4.9

Title: Stones of Heaven Author: Jo Mason Publication: Dell Logic Puzzles Issue: April, 1998 Page: 13

Wan Li, a dealer in Chinese antiques and artifacts, had an excellent month recently when he made sales to four customers from around the world -- Finland, Italy, Japan, and the United States -- who were willing and able to pay very good prices. The four items were rare jade figurines (a belt buckle, dragon, grasshopper, and horse), each carved from a different color of jade (dark green, light green, red, and white). Each piece dates from a different Chinese dynasty (Ching, Ming, Sung, and Tang). Can you match each figurine with its color and dynasty, and give the home country of each buyer?

1. The rare white dragon (which the American didn't buy) didn't come from the Sung dynasty.

2. The exquisite belt buckle (which wasn't any shade of green) was created in 618 A.D. for an emperor of the Tang dynasty.

3. Three of the figurines were the one bought by the Finn (which wasn't the dragon), the one from the Ching dynasty (which didn't go to the buyer from Japan), and the light green object (which wasn't the horse).

4. The American decided against both the grasshopper and the piece from the Sung dynasty, neither of which she felt would match her home decor.

Belt buckle, red, Tang, U.S Dragon, white, Ching, Italy Grasshopper, light green, Ming, Japan Horse, dark green, Sung, Finland

Author:
Janusz Kociolek, Sebastian Czypek, and Radoslaw Szymanek

• Fields inherited from class org.jacop.examples.fd.ExampleFD

`cost, search, store, vars`
• Constructor Summary

Constructors
Constructor and Description
`StonesOfHeaven()`
• Method Summary

All Methods
Modifier and Type Method and Description
`static void` `main(String[] args)`
It executes a simple program to solve this 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`
• Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• Constructor Detail

• StonesOfHeaven

`public StonesOfHeaven()`
• Method Detail

• model

`public void model()`
Description copied from class: `ExampleFD`
It specifies a standard way of modeling the problem.
Specified by:
`model` in class `ExampleFD`
• main

`public static void main(String[] args)`
It executes a simple program to solve this logic puzzle.
Parameters:
`args` - command arguments (none here)