fix current and system predicate
This commit is contained in:
@@ -192,6 +192,8 @@
|
||||
#include <stdarg.h>
|
||||
#define VERSION "2.0.0"
|
||||
|
||||
int all_loaded_for_deterministic_variables(namedvars varmap, int disp);
|
||||
|
||||
typedef struct _parameters {
|
||||
int loadfile;
|
||||
int savedfile;
|
||||
@@ -721,14 +723,14 @@ void myexpand(extmanager MyManager, DdNode *Current) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Angelicas Algorithm */
|
||||
/* Angelika's Algorithm */
|
||||
|
||||
double CalcProbability(extmanager MyManager, DdNode *Current) {
|
||||
DdNode *h, *l;
|
||||
hisnode *Found;
|
||||
char *curnode, *dynvalue;
|
||||
char *curnode;
|
||||
double lvalue, hvalue, tvalue;
|
||||
density_integral dynvalue_parsed;
|
||||
|
||||
if (params.debug) {
|
||||
curnode = GetNodeVarNameDisp(MyManager.manager, MyManager.varmap, Current);
|
||||
fprintf(stderr, "%s\n", curnode);
|
||||
@@ -811,7 +813,7 @@ static
|
||||
void PrintNodeQueue(Queue q , extmanager MyManager){
|
||||
|
||||
QueueIterator qiter = QueueIteratorNew(q, 1);
|
||||
fprintf(stderr,"Queue %p is [", *q);
|
||||
fprintf(stderr,"Queue %p is [", &*q);
|
||||
|
||||
while (qiter->currentItem != NULL) {
|
||||
DdNode* val = (DdNode*) qiter->currentItem->element;
|
||||
|
@@ -161,6 +161,7 @@ typedef struct _density_integral {
|
||||
|
||||
|
||||
double sigmoid(double x, double slope);
|
||||
double normal(double x, double mu,double sigma);
|
||||
double Phi(double x);
|
||||
double cumulative_normal(double low, double high, double sigma, double mu);
|
||||
double cumulative_normal_dmu(double low, double high,double mu,double sigma);
|
||||
|
@@ -188,6 +188,9 @@
|
||||
#include <errno.h>
|
||||
#include "simplecudd.h"
|
||||
|
||||
int my_index_calc(int varstart, DdNode *node);
|
||||
int all_loaded_for_deterministic_variables(namedvars varmap, int disp);
|
||||
|
||||
/* BDD manager initialization */
|
||||
|
||||
int _debug = 0;
|
||||
@@ -1717,8 +1720,7 @@ int GetParam(char *inputline, int iParam) {
|
||||
|
||||
void onlinetraverse(DdManager *manager, namedvars varmap, hisqueue *HisQueue, DdNode *bdd) {
|
||||
char buf, *inputline;
|
||||
int icur, maxlinesize, iline, index, iloop, ivalue, iQsize, i, inQ, iRoot;
|
||||
double dvalue;
|
||||
int icur, maxlinesize, iline, index, iloop, iQsize, i, inQ, iRoot;
|
||||
DdNode **Q, **Q2, *h_node, *l_node, *curnode;
|
||||
hisqueue *his;
|
||||
hisnode *hnode;
|
||||
@@ -1756,10 +1758,10 @@ void onlinetraverse(DdManager *manager, namedvars varmap, hisqueue *HisQueue, Dd
|
||||
inQ = 0;
|
||||
for(i = 0; (i < iQsize / 2) && (inQ < 3); i++)
|
||||
inQ = (Q[i] == l_node) || (Q[iQsize - i] == l_node) + 2 * (Q[i] == h_node) || (Q[iQsize - i] == h_node);
|
||||
if (inQ & 1 == 0) inQ = inQ + (GetNode(his, varmap.varstart, l_node) != NULL);
|
||||
if (inQ & 2 == 0) inQ = inQ + 2 * (GetNode(his, varmap.varstart, h_node) != NULL);
|
||||
if (inQ & 1 == 1) inQ = inQ - (l_node == HIGH(manager) || l_node == LOW(manager));
|
||||
if (inQ & 2 == 2) inQ = inQ - 2 * (h_node == HIGH(manager) || h_node == LOW(manager));
|
||||
if ((inQ & 1) == 0) inQ = inQ + (GetNode(his, varmap.varstart, l_node) != NULL);
|
||||
if ((inQ & 2) == 0) inQ = inQ + 2 * (GetNode(his, varmap.varstart, h_node) != NULL);
|
||||
if ((inQ & 1) == 1) inQ = inQ - (l_node == HIGH(manager) || l_node == LOW(manager));
|
||||
if ((inQ & 2) == 2) inQ = inQ - 2 * (h_node == HIGH(manager) || h_node == LOW(manager));
|
||||
inQ = 0;
|
||||
switch(inQ) {
|
||||
case 0:
|
||||
|
Reference in New Issue
Block a user