Package dsc_suite :: Package ds :: Module sequence_triple :: Class SequenceTriple
[hide private]
[frames] | no frames]

Class SequenceTriple

source code

                  object --+    
                           |    
data_structure.DataStructure --+
                               |
                              SequenceTriple

class SequenceTriple(DataStructure) - Sequence Triple implementation

Three sequences used similar as sequence pair. Published by the same group in 2000 (Yamazaki2000).

based on three sequences, so called locii sequence_triple format : [locii_1, locii_2, locii_3, block_rotations]

TODO: detailed docstring

Instance Methods [hide private]
 
__init__(self, benchmark)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
abstract_solutions
get_all_representations()
abstract_solutions ...
source code
 
get_part_of_representation(self, part_index, part_number)
get a single element out of a part of the abstract representation, part_number between 0 and part_lengths[part_index]
source code
 
in_front_of(self, sequence_triple, a, b) source code
 
left_to(self, sequence_triple, a, b) source code
 
below(self, sequence_triple, a, b) source code
 
get_constraint_graph(self, sequence_triple, relation_function) source code
 
get_hcg(self, sequence_triple) source code
 
get_vcg(self, sequence_triple) source code
 
get_dcg(self, sequence_triple) source code
 
create_packing(self, representation)
returns packing in dict format packing = {'name' : [x, y, z, w, h, d], ...
source code
 
packing_to_representation(self, packing)
is not possible with every data structure
source code
 
get_operations(self)
returns a dict of possible operations onto a abstract representation {'name' : [function, globality_factor]} globality_factor ...
source code
 
merge_representations(self, representation_a, representation_b)
Merge two representations into all possible children.
source code
 
exchange_two_labels_in_one_locii(self, representation) source code
 
exchange_two_labels_in_all_locii(self, representation) source code
 
exchange_two_positions_in_all_locii(self, representation) source code
 
exchange_two_locii(self, representation) source code
 
rotate_single_block(self, representation) source code

Inherited from data_structure.DataStructure: __getitem__, convert_part_numbers, cost_evaluation, generate_solution_space, get_part_numbers, get_random_representation, get_representation, set_benchmark

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  name = 'Sequence Triple'

Inherited from data_structure.DataStructure: CONNECTIONS, DIMENSIONS, MODULETYPE, ORIGINAL, ROTATED

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, benchmark)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

get_all_representations()

source code 

abstract_solutions ... list of all possible sequence triples

This method generates all possible sequence triples. len(abstract_solutions) = n!^3, where n is the number of modules

Returns: abstract_solutions
Overrides: data_structure.DataStructure.get_all_representations

get_part_of_representation(self, part_index, part_number)

source code 

get a single element out of a part of the abstract representation, part_number between 0 and part_lengths[part_index]

Overrides: data_structure.DataStructure.get_part_of_representation

create_packing(self, representation)

source code 

returns packing in dict format packing = {'name' : [x, y, z, w, h, d], ...}

Overrides: data_structure.DataStructure.create_packing
(inherited documentation)

packing_to_representation(self, packing)

source code 

is not possible with every data structure

Overrides: data_structure.DataStructure.packing_to_representation
(inherited documentation)

get_operations(self)

source code 

returns a dict of possible operations onto a abstract representation {'name' : [function, globality_factor]} globality_factor ... the higher, the bigger is the solution change this factor is given by the authors but it also can be determined in test runs evaluation the cost influences caused by applying the according function.

Overrides: data_structure.DataStructure.get_operations

merge_representations(self, representation_a, representation_b)

source code 

Merge two representations into all possible children.

Typically, used for genetic and/or evolutionary algorithms. Returns a list with all possible children.

In case of Sequence Triple all possible combinations of the first, second and third sequence as well as the rotation_list are generated. Rotations are currently completely taken from representation a or b, respectively. Thus 2^4 different children are possible.

Overrides: data_structure.DataStructure.merge_representations