NonRevisitingScheme.C

typedef struct NONREVISITINGSCHEME {

                int Activate;                                        //variable to identify it is enable or not

                int Max_no_Leaf;                           

                Cluster_Tree Solution_Tree;       //The cluster tree used in the Non revisiting scheme     

} NonRevisitingScheme;

 

//============ UnConstraint Optimization

void NonRevisitingScheme_UnConstraint_Update(NonRevisitingScheme *cur_NRS, double *cur_Solution, double cur_Goodness);

Input:    cur_NRS               (The whole non-revisiting scheme)

                cur_Solution      (The data)

                cur_Goodness  (Fitness of the data)

This function is used to update the cluster tree. It will insert the data into the cluster tree by calling cluster_Tree_Insertion and maintain the tree path by calling NonRevisitingScheme Unconstraint Treepath (The treepath function will prune the tree).

int  NonRevisitingScheme_UnConstraint_SaturateVerification(double **cur_Interval, int cur_Dimension);

Input:    cur_Interval       (The input interval)

                cur_Dimension (The number of dimension of the GA)

This function is used to verify whether the input interval has space or not. If there is any space (the difference between upper boundary and lower boundary >1 in at any dimension), it will return -1 to indicate it is leaf node (since it is called after insertion of new node, the new added node must be leaf node). If there is no any space ( the difference between upper boundary and lower boundary = 1 in ALL dimension), it will return -2 to indicate it is saturated.

 

void NonRevisitingScheme_UnConstraint_TreePath(Cluster_Node *leaf_Node, double **cur_Interval, int *no_Leaf, int cur_Dimension);

Input:    leaf_Node          (The input node)

                cur_Interval       (The input interval)

                no_Leaf                               (The number of leaf nodes in the cluster tree, only for record)

                cur_Dimension (The number of dimension of the GA)

This function is used to make the path to find the best fitness node. It will be called once new node is added.

 

void NonRevisitingScheme_UnConstraint_NodeSearch(double **cur_Chromosome, int no_gene, Cluster_Tree *population_Tree, Cluster_Node **cur_Node);

Input:    cur_Chromosome           (The input chromosome)

                no_gene                              (the number of genes in each chromosome)

                population_Tree              (The cluster tree)

                cur_Node                            (The result node)

This function is used to search which node in the cluster tree that the input chromosome belongs to. The result will be saved into cur_Node.

 

 

Back to main page