cudd
3.0.0
The University of Colorado Decision Diagram Package
|
Reordering of DDs based on simulated annealing. More...
Macros | |
#define | BETA 0.6 |
#define | ALPHA 0.90 |
#define | EXC_PROB 0.4 |
#define | JUMP_UP_PROB 0.36 |
#define | MAXGEN_RATIO 15.0 |
#define | STOP_TEMP 1.0 |
Functions | |
int | cuddAnnealing (DdManager *table, int lower, int upper) |
Get new variable-order by simulated annealing algorithm. More... | |
static int | stopping_criterion (int c1, int c2, int c3, int c4, double temp) |
Checks termination condition. More... | |
static double | random_generator (DdManager *dd) |
Random number generator. More... | |
static int | ddExchange (DdManager *table, int x, int y, double temp) |
Exchanges two variables, x and y. More... | |
static int | ddJumpingAux (DdManager *table, int x, int x_low, int x_high, double temp) |
Moves a variable to a specified position. More... | |
static Move * | ddJumpingUp (DdManager *table, int x, int x_low, int initial_size) |
This function is for jumping up. More... | |
static Move * | ddJumpingDown (DdManager *table, int x, int x_high, int initial_size) |
This function is for jumping down. More... | |
static int | siftBackwardProb (DdManager *table, Move *moves, int size, double temp) |
Returns the DD to the best position encountered during sifting if there was improvement. More... | |
static void | copyOrder (DdManager *table, int *array, int lower, int upper) |
Copies the current variable order to array. More... | |
static int | restoreOrder (DdManager *table, int *array, int lower, int upper) |
Restores the variable order in array by a series of sifts up. More... | |
Reordering of DDs based on simulated annealing.
Copyright (c) 1995-2015, Regents of the University of Colorado
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
static |
Copies the current variable order to array.
At the same time inverts the permutation.
int cuddAnnealing | ( | DdManager * | table, |
int | lower, | ||
int | upper | ||
) |
Get new variable-order by simulated annealing algorithm.
Get x, y by random selection. Choose either exchange or jump randomly. In case of jump, choose between jump_up and jump_down randomly. Do exchange or jump and get optimal case. Loop until there is no improvement or temperature reaches minimum.
|
static |
Exchanges two variables, x and y.
This is the same funcion as ddSwapping except for the comparison expression. Use probability function, exp(-size_change/temp).
|
static |
Moves a variable to a specified position.
If x==x_low, it executes jumping_down. If x==x_high, it executes jumping_up. This funcion is similar to ddSiftingAux.
This function is for jumping down.
This is a simplified version of ddSiftingDown. It does not use lower bounding.
This function is for jumping up.
This is a simplified version of ddSiftingUp. It does not use lower bounding.
|
static |
Random number generator.
|
static |
Restores the variable order in array by a series of sifts up.
Returns the DD to the best position encountered during sifting if there was improvement.
Otherwise, "tosses a coin" to decide whether to keep the current configuration or return the DD to the original one.
|
static |
Checks termination condition.
If temperature is STOP_TEMP or there is no improvement then terminates.