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.10
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) SetVar[][](package private) int(package private) int(package private) intFields inherited from class org.jacop.examples.set.ExampleSet
cost, search, store, vars -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidIt runs a number of social golfer problems.voidmodel()It specifies a standard way of modeling the problem.booleansearch()It specifies simple search method based on input order and lexigraphical ordering of values.voidsetup(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:ExampleSetIt specifies a standard way of modeling the problem.- Specified by:
modelin classExampleSet
-
search
public boolean search()Description copied from class:ExampleSetIt specifies simple search method based on input order and lexigraphical ordering of values.- Overrides:
searchin classExampleSet- Returns:
- true if there is a solution, false otherwise.
-