public class Golomb extends ExampleFD
Golomb ruler is a special sequence of natural numbers an example is 0 1 4 6
a sequence is a Golomb ruler if all differences are different (1-0), (4-0), (6-0), (4-1), (6-1), (6-4) 1 4 6 3 5 2 All differences above have different values A Golomb ruler is optimal if the length of it (the last mark) has the smallest possible value The presented ruler with 4 marks of length 6 is optimal
Modifier and Type | Field and Description |
---|---|
int |
bound
It specifies the upper bound of the optimal solution.
|
int |
noMarks
It specifies the number of marks (number of natural numbers in
the sequence).
|
List<IntVar> |
subs
It contains all differences between all possible pairs of marks.
|
Constructor and Description |
---|
Golomb() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
It executes the program which computes the optimal Golomb ruler.
|
void |
model()
It specifies a standard way of modeling the problem.
|
boolean |
searchOptimalInfo()
It specifies specific search for the optimal solution search procedure, which
printouts intermediate search results and shows how the search is progressing.
|
static void |
test(String[] args)
It executes the program which first computes the optimal Golomb ruler.
|
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
public int noMarks
public int bound
public void model()
ExampleFD
public boolean searchOptimalInfo()
public static void main(String[] args)
args
- the first argument specifies the number of marks, the second argument specifies the upper bound of the optimal solution.public static void test(String[] args)
args
- the first argument specifies the number of marks, the second argument specifies the upper bound of the optimal solution.Copyright © 2022. All rights reserved.