Package org.jacop.examples.set
Class SocialGolfer
- java.lang.Object
-
- org.jacop.examples.set.ExampleSet
-
- org.jacop.examples.set.SocialGolfer
-
public class SocialGolfer extends ExampleSet
It is a Social Golfer example based on set variables.- Version:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description (package private) SetVar[][]golferGroup(package private) intgroups(package private) intplayers(package private) intweeks-
Fields inherited from class org.jacop.examples.set.ExampleSet
cost, search, store, vars
-
-
Constructor Summary
Constructors Constructor Description SocialGolfer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)It 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 Detail
-
weeks
int weeks
-
groups
int groups
-
players
int players
-
golferGroup
SetVar[][] golferGroup
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
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.
-
-