abc-master
|
Go to the source code of this file.
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 | |
static int | stopping_criterion (int c1, int c2, int c3, int c4, double temp) |
static double | random_generator (void) |
static int | ddExchange (DdManager *table, int x, int y, double temp) |
static int | ddJumpingAux (DdManager *table, int x, int x_low, int x_high, double temp) |
static Move * | ddJumpingUp (DdManager *table, int x, int x_low, int initial_size) |
static Move * | ddJumpingDown (DdManager *table, int x, int x_high, int initial_size) |
static int | siftBackwardProb (DdManager *table, Move *moves, int size, double temp) |
static void | copyOrder (DdManager *table, int *array, int lower, int upper) |
static int | restoreOrder (DdManager *table, int *array, int lower, int upper) |
int | cuddAnnealing (DdManager *table, int lower, int upper) |
Variables | |
static char rcsid[] | DD_UNUSED = "$Id: cuddAnneal.c,v 1.14 2004/08/13 18:04:46 fabio Exp $" |
#define ALPHA 0.90 |
Definition at line 78 of file cuddAnneal.c.
#define BETA 0.6 |
CFile***********************************************************************
FileName [cuddAnneal.c]
PackageName [cudd]
Synopsis [Reordering of DDs based on simulated annealing]
Description [Internal procedures included in this file:
Static procedures included in this file:
]
SeeAlso []
Author [Jae-Young Jang, Jorgen Sivesind]
Copyright [Copyright (c) 1995-2004, 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.]
Definition at line 77 of file cuddAnneal.c.
#define EXC_PROB 0.4 |
Definition at line 79 of file cuddAnneal.c.
#define JUMP_UP_PROB 0.36 |
Definition at line 80 of file cuddAnneal.c.
#define MAXGEN_RATIO 15.0 |
Definition at line 81 of file cuddAnneal.c.
#define STOP_TEMP 1.0 |
Definition at line 82 of file cuddAnneal.c.
|
static |
Function********************************************************************
Synopsis [Copies the current variable order to array.]
Description [Copies the current variable order to array. At the same time inverts the permutation.]
SideEffects [None]
SeeAlso []
Definition at line 762 of file cuddAnneal.c.
int cuddAnnealing | ( | DdManager * | table, |
int | lower, | ||
int | upper | ||
) |
AutomaticEnd Function********************************************************************
Synopsis [Get new variable-order by simulated annealing algorithm.]
Description [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. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 158 of file cuddAnneal.c.
|
static |
Function********************************************************************
Synopsis [This function is for exchanging two variables, x and y.]
Description [This is the same funcion as ddSwapping except for comparison expression. Use probability function, exp(-size_change/temp).]
SideEffects [None]
SeeAlso []
Definition at line 359 of file cuddAnneal.c.
|
static |
Function********************************************************************
Synopsis [Moves a variable to a specified position.]
Description [If x==x_low, it executes jumping_down. If x==x_high, it executes jumping_up. This funcion is similar to ddSiftingAux. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 508 of file cuddAnneal.c.
Function********************************************************************
Synopsis [This function is for jumping down.]
Description [This is a simplified version of ddSiftingDown. It does not use lower bounding. Returns the set of moves in case of success; NULL if memory is full.]
SideEffects [None]
SeeAlso []
Definition at line 638 of file cuddAnneal.c.
Function********************************************************************
Synopsis [This function is for jumping up.]
Description [This is a simplified version of ddSiftingUp. It does not use lower bounding. Returns the set of moves in case of success; NULL if memory is full.]
SideEffects [None]
SeeAlso []
Definition at line 579 of file cuddAnneal.c.
|
static |
Function********************************************************************
Synopsis [Random number generator.]
Description [Returns a double precision value between 0.0 and 1.0.]
SideEffects [None]
SeeAlso []
Definition at line 339 of file cuddAnneal.c.
|
static |
Function********************************************************************
Synopsis [Restores the variable order in array by a series of sifts up.]
Description [Restores the variable order in array by a series of sifts up. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 792 of file cuddAnneal.c.
Function********************************************************************
Synopsis [Returns the DD to the best position encountered during sifting if there was improvement.]
Description [Otherwise, "tosses a coin" to decide whether to keep the current configuration or return the DD to the original one. Returns 1 in case of success; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 698 of file cuddAnneal.c.
|
static |
AutomaticStart
Function********************************************************************
Synopsis [Checks termination condition.]
Description [If temperature is STOP_TEMP or there is no improvement then terminates. Returns 1 if the termination criterion is met; 0 otherwise.]
SideEffects [None]
SeeAlso []
Definition at line 309 of file cuddAnneal.c.
|
static |
Definition at line 99 of file cuddAnneal.c.