public class SurvoPuzzle extends ExampleFD
Constructor and Description |
---|
SurvoPuzzle() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
It executes the program to solve the specified SurvoPuzzle.
|
void |
model()
model()
|
static void |
printMatrix(IntVar[][] matrix,
int rows,
int cols)
It prints a matrix of variables.
|
void |
readFile(String file)
readFile()
Reads a Survo puzzle in the following format
% From http://www.survo.fi/puzzles/280708.txt
% Survo puzzle 128/2008 (1700) #364-35846
A B C D E F
1 * * * * * * 30
2 * * 18 * * * 86
3 * * * * * * 55
22 11 42 32 27 37
|
creditSearch, getSearch, getSearchVariables, getStore, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
public static void printMatrix(IntVar[][] matrix, int rows, int cols)
matrix
- matrix containing the grounded variables.rows
- number of elements in the first dimension.cols
- number of elements in the second dimension.public void readFile(String file)
file
- the filename containing the problem description.public static void main(String[] args)
args
- the first argument specifies the filename containing the puzzle to be solved.Copyright © 2015. All rights reserved.