Class Tunapalooza
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.Tunapalooza
-
public class Tunapalooza extends ExampleFD
It solves a simple logic puzzle about music concert.- Version:
- 4.7
Tim and Keri have a full day ahead for themselves as they plan to see and hear everything at Tunapalooza '98, the annual save-the-tuna benefit concert in their hometown. To cover the most ground, they will have to split up. They have arranged to meet during four rock band acts (Ellyfish, Korrupt, Retread Ed and the Flat Tires, and Yellow Reef) at planned rendezvous points (carnival games, information booth, mosh pit, or T-shirt vendor). Can you help match each band name with the type of music they play (country, grunge, reggae, or speed metal) and Tim and Kerri's prearranged meeting spot while they play?
1. Korrupt isn't a country or grunge music band.
2. Tim and Kerri won't meet at the carnival games during Ellyfish's performance.
3. The pair won't meet at the T-shirt vendor during the reggae band's show.
4. Exactly two of the following three statements are true: a) Ellyfish plays grunge music. b) Tim and Kerri won't meet at the information booth during a performance by Retread Ed and the Flat Tires. c) The two friends won't meet at the T-shirt vendor while Yellow Reef is playing.
5. The country and speed metal acts are, in some order, Retread Ed and the Flat Tires and the act during which Tim and Kerri will meet at the mosh pit.
6. The reggae band is neither Korrupt nor the act during which Tim and Kerri will meet at the information booth.
Determine: Band name -- Music type -- Meeting place
Given solution :
1 Ellyfish, grunge, vendor 2 Korrupt, metal, mosh 3 Retread, country, information 4 Yellow , reggae, carnival
-
-
Constructor Summary
Constructors Constructor Description Tunapalooza()
-
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
- no arguments are used.
-
-