org.jacop.examples.fd

Class BlueberryMuffins

• ```public class BlueberryMuffins
extends ExampleFD```
It solves a simple logic puzzle about blueberry muffins.
Version:
4.9

Logic Puzzle: Blueberry Muffins

Description :

Daniel made a dozen blueberry muffins on Friday night -- and by the timehe was ready for brunch on Saturday, there were only two left. The other ten had been snitched by his housemates, all of whom had gotten up early because they had to work on Saturday. The fourhousemates include two men named Bill and Mark, and two women named Calla and Lynn; last names are Ellis, Ingham, Oakley, and Summers, and their differing professions are dogcatcher, flautist, secretary, and zookeeper. Can you discover each one's full name, profession, and number of muffins snitched?

1. Each housemate snitched a different number of muffins from one to four. 2. Bill and Ellis snitched a total of six muffins. 3. The secretary (who is a woman) snitched more than the dogcatcher. 4. Mark snitched two more than Summers did. 5. The flautist snitched twice as many as Ms. Oakley did. 6. Calla's last name isn't Ingham.

Solution:

Calla Oakley dogcatcher 1 muffin Bill Summers flautist 2 muffins Lynn Ingham secretary 3 muffins Mark Ellis zookeeper 4 muffins

Author:

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

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

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

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

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

• BlueberryMuffins

`public BlueberryMuffins()`
• 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 the program solving this puzzle.
Parameters:
`args` - no arguments are read.