Example: Equidistant Frequency Permutation Arrays More...
Public Member Functions | |
EFPA (const EFPAOptions &opt) | |
Actual model. | |
virtual void | print (std::ostream &os) const |
Print instance and solution. | |
EFPA (bool share, EFPA &s) | |
Constructor for cloning s. | |
virtual Space * | copy (bool share) |
Copy during cloning. | |
Protected Attributes | |
int | v |
Number of sequences. | |
int | q |
Number of symbols. | |
int | l |
Number of sets of symbols for a sequence ( ![]() | |
int | d |
Hamming distance between any pair of sequences. | |
int | n |
Length of sequence ( ![]() | |
int | nseqpair |
Number of sequence pairs ( ![]() | |
IntVarArray | c |
Variables for sequences. | |
BoolVarArray | diff |
Differences between sequences. |
Example: Equidistant Frequency Permutation Arrays
This example solves instances of the equidistant frequency permutation arrays problem.
The model of the problem is mostly taken from "Modelling Equidistant Frequency Permutation Arrays in Constraints", by Ian P. Gent, Paul McKay, Peter Nightingale, and Sophie Huczynska. It implements the non-Boolean model without SAC.
EFPA::EFPA | ( | const EFPAOptions & | opt | ) | [inline] |
EFPA::EFPA | ( | bool | share, |
EFPA & | s | ||
) | [inline] |
virtual void EFPA::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print instance and solution.
Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.
virtual Space* EFPA::copy | ( | bool | share | ) | [inline, virtual] |
int EFPA::l [protected] |
int EFPA::d [protected] |
int EFPA::nseqpair [protected] |
IntVarArray EFPA::c [protected] |
BoolVarArray EFPA::diff [protected] |