cudd/cuddAnneal.c File Reference

Reordering of DDs based on simulated annealing. More...

#include "util.h"
#include "cuddInt.h"
Include dependency graph for cuddAnneal.c:

Defines

#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.
static int stopping_criterion (int c1, int c2, int c3, int c4, double temp)
 Checks termination condition.
static double random_generator (DdManager *dd)
 Random number generator.
static int ddExchange (DdManager *table, int x, int y, double temp)
 Exchanges two variables, x and y.
static int ddJumpingAux (DdManager *table, int x, int x_low, int x_high, double temp)
 Moves a variable to a specified position.
static MoveddJumpingUp (DdManager *table, int x, int x_low, int initial_size)
 This function is for jumping up.
static MoveddJumpingDown (DdManager *table, int x, int x_high, int initial_size)
 This function is for jumping down.
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.
static void copyOrder (DdManager *table, int *array, int lower, int upper)
 Copies the current variable order to array.
static int restoreOrder (DdManager *table, int *array, int lower, int upper)
 Restores the variable order in array by a series of sifts up.

Detailed Description

Reordering of DDs based on simulated annealing.

Author:
Jae-Young Jang, Jorgen Sivesind

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.


Function Documentation

static void copyOrder ( DdManager table,
int *  array,
int  lower,
int  upper 
) [static]

Copies the current variable order to array.

At the same time inverts the permutation.

Side effects
None
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.

Returns:
1 in case of success; 0 otherwise.
Side effects
None
static int ddExchange ( DdManager table,
int  x,
int  y,
double  temp 
) [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).

Side effects
None
static int ddJumpingAux ( DdManager table,
int  x,
int  x_low,
int  x_high,
double  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.

Returns:
1 in case of success; 0 otherwise.
Side effects
None
static Move* ddJumpingDown ( DdManager table,
int  x,
int  x_high,
int  initial_size 
) [static]

This function is for jumping down.

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.
Side effects
None
static Move* ddJumpingUp ( DdManager table,
int  x,
int  x_low,
int  initial_size 
) [static]

This function is for jumping up.

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.
Side effects
None
static double random_generator ( DdManager dd  )  [static]

Random number generator.

Returns:
a double precision value between 0.0 and 1.0.
Side effects
None
static int restoreOrder ( DdManager table,
int *  array,
int  lower,
int  upper 
) [static]

Restores the variable order in array by a series of sifts up.

Returns:
1 in case of success; 0 otherwise.
Side effects
None
static int siftBackwardProb ( DdManager table,
Move moves,
int  size,
double  temp 
) [static]

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.

Returns:
1 in case of success; 0 otherwise.
Side effects
None
static int stopping_criterion ( int  c1,
int  c2,
int  c3,
int  c4,
double  temp 
) [static]

Checks termination condition.

If temperature is STOP_TEMP or there is no improvement then terminates.

Returns:
1 if the termination criterion is met; 0 otherwise.
Side effects
None
 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated on 31 Dec 2015 for cudd by  doxygen 1.6.1