Package org.jacop.examples.set
Class SocialGolfer
java.lang.Object
org.jacop.examples.set.ExampleSet
org.jacop.examples.set.SocialGolfer
It is a Social Golfer example based on set variables.
- Version:
- 4.9
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) SetVar[][]
(package private) int
(package private) int
(package private) int
Fields inherited from class org.jacop.examples.set.ExampleSet
cost, search, store, vars
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
It runs a number of social golfer problems.void
model()
It specifies a standard way of modeling the problem.boolean
search()
It specifies simple search method based on input order and lexigraphical ordering of values.void
setup
(int weeks, int groups, int players) It sets the parameters for the model creation function.Methods inherited from class org.jacop.examples.set.ExampleSet
getSearch, getSearchVariables, getStore, printMatrix, searchAllAtOnce, searchAllOptimal, searchMasterSlave, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchWeightedDegree
-
Field Details
-
weeks
int weeks -
groups
int groups -
players
int players -
golferGroup
SetVar[][] golferGroup
-
-
Constructor Details
-
SocialGolfer
public SocialGolfer()
-
-
Method Details
-
main
It runs a number of social golfer problems.- Parameters:
args
- parameters (none)
-
setup
public void setup(int weeks, int groups, int players) It sets the parameters for the model creation function.- Parameters:
weeks
- how many weeks to playgroups
- how many groups will playplayers
- how many players will play
-
model
public void model()Description copied from class:ExampleSet
It specifies a standard way of modeling the problem.- Specified by:
model
in classExampleSet
-
search
public boolean search()Description copied from class:ExampleSet
It specifies simple search method based on input order and lexigraphical ordering of values.- Overrides:
search
in classExampleSet
- Returns:
- true if there is a solution, false otherwise.
-