Class BabySitting
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.BabySitting
-
public class BabySitting extends ExampleFD
It is a simple logic puzzle about babysitting.- Version:
- 4.7
Each weekday, Bonnie takes care of five of the neighbors' children. The children's names are Keith, Libby, Margo, Nora, and Otto; last names are Fell, Grant, Hall, Ivey, and Jule. Each is a different number of years old, from two to six. Can you find each child's full name and age?
1. One child is named Libby Jule. 2. Keith is one year older than the Ivey child, who is one year older than Nora. 3. The Fell child is three years older than Margo. 4. Otto is twice as many years old as the Hall child.
Determine: First name - Last name - Age
Given solution :
Keith Fell, five years old Libby Jule, six years old Margo Hall, two years old Nora Grant, three years old Otto Ivey, four years old
-
-
Constructor Summary
Constructors Constructor Description BabySitting()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
It runs the program solving this 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 runs the program solving this puzzle.- Parameters:
args
- no arguments are read.
-
-