public class CarSequencing extends ExampleFD
Modifier and Type | Field and Description |
---|---|
int[] |
blockSizePerOption
The sequence length for which the maximum number restriction is specified.
|
boolean |
extensionalMDD
It specifies if one extensional constraint based on MDD created from FSM
should be used.
|
int[] |
maxNoOfCarsPerOption
For a given sequence length then can be different maximum number of cars with a given option.
|
int |
noCar
It specifies number of cars.
|
int |
noClass
It specifies the number of different car classes.
|
int[] |
noOfCarsPerClass
It specifies how many cars of each option should be produced.
|
int |
noOption
It specifies the no of options in the car sequencing problem.
|
boolean |
regular
It specifies if the regular constraint should be used.
|
boolean[][] |
required
It specifies if the given class (the first dimension) requires
given option (the second dimension).
|
boolean |
slideDecomposition
It specifies if the slide based decomposition of the regular constraint
should be applied.
|
Constructor and Description |
---|
CarSequencing() |
Modifier and Type | Method and Description |
---|---|
static FSM |
createFSM(int count,
IntervalDomain yes,
IntervalDomain no) |
static void |
main(String[] args)
It executes the program to solve car sequencing problem.
|
void |
model()
It specifies a standard way of modeling the problem.
|
static String[] |
problem()
A simple car sequencing problem.
|
static String[] |
readFile(String file)
It reads the problem description from the file and returns string representation
of the problem.
|
static void |
readFromArray(String[] description,
CarSequencing example)
It transforms string representation of the problem into an array of ints
representation.
|
static void |
test(String[] args)
It executes the program to solve car sequencing problem.
|
static String[] |
toStringArray(CarSequencing example)
It creates a String representation of the problem being supplied.
|
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
public int noCar
public int noOption
public int noClass
public int[] maxNoOfCarsPerOption
public int[] blockSizePerOption
public int[] noOfCarsPerClass
public boolean[][] required
public boolean slideDecomposition
public boolean regular
public boolean extensionalMDD
public static String[] problem()
public static void readFromArray(String[] description, CarSequencing example)
description
- array of strings representing the problem.example
- example in which the passed instance is stored.public static String[] toStringArray(CarSequencing example)
example
- example in which the passed instance is stored.public void model()
ExampleFD
public static FSM createFSM(int count, IntervalDomain yes, IntervalDomain no)
count
- The number of times a value from yes domain needs to be encountered.yes
- the values which are counted.no
- the values which are not counted.public static String[] readFile(String file)
file
- the file containing the problem description.public static void main(String[] args)
args
- parameters (none)public static void test(String[] args)
args
- parameters (none)Copyright © 2022. All rights reserved.