p->pr = r;
p->jpr = jr;
- scf_loge("i: %d, c%ldp%ld, p->sr: %lg\n", i, p->cid, p->id, p->sr);
+ scf_loge("path: %d, i: %d, c%ldp%ld, p->sr: %lg\n", path->index, i, p->cid, p->id, p->sr);
}
printf("\n");
if (!p1)
return -EINVAL;
- R = child->r * child->r + child->jr * child->jr;
+ double pr;
+ double jpr;
- double _r = child->r / R;
- double _jr = -child->jr / R;
+ __ses_path_pr(f, path, k, j, NULL, &pr, &jpr);
- __ses_path_pr(f, path, k, j, NULL, &r, &jr);
+ ses_merge_r(&r, &jr, pr, jpr, child->r, child->jr);
- R = r * r + jr * jr;
- r = r / R;
- jr = -jr / R;
-
- r += _r;
- jr += _jr;
-
- R = r * r + jr * jr;
- r = r / R;
- jr = -jr / R;
-
- scf_logw("j: %d, c%ldp%ld, p1->pr: %lg, p1->sr: %lg, r: %lg\n", j, p1->cid, p1->id, p1->pr, p1->sr, r);
-
- double dr = p1->pr - (p0->pr + r);
- double jdr = p1->jpr - (p0->jpr + jr);
+ double dr = pr - r;
+ double jdr = jpr - jr;
p1->pr -= dr;
p1->jpr -= jdr;
p->pr -= dr;
p->jpr -= jdr;
- scf_logw("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg, dr: %lg\n", j, p->cid, p->id, p->pr, p->sr, dr);
+ scf_logi("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg, pr: %lg, dr: %lg\n", j, p->cid, p->id, p->pr, p->sr, pr, dr);
}
- scf_logw("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg, dr: %lg\n", j, p1->cid, p1->id, p1->pr, p1->sr, dr);
+ scf_logi("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg, pr: %lg, dr: %lg\n", j, p1->cid, p1->id, p1->pr, p1->sr, pr, dr);
for (++j; j < path->pins->size; j++) {
p = path->pins->data[j];
p->sr -= dr;
p->jsr -= jdr;
- scf_logw("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg\n", j, p->cid, p->id, p->pr, p->sr);
+ scf_logd("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg\n", j, p->cid, p->id, p->pr, p->sr);
}
- scf_logw("child: %d, r: %lg, dr: %lg\n\n", child->index, child->r, dr);
+ scf_logw("child: %d, r: %lg, dr: %lg\n", child->index, child->r, dr);
}
}
path->r = p->pr;
path->jr = p->jpr;
- scf_loge("path: %d, r: %lg, r0: %lg\n", path->index, path->r, path->r0);
+ scf_loge("path: %d, r: %lg, r0: %lg\n\n", path->index, path->r, path->r0);
return 0;
}
__ses_path_pr(f, path, i, j, NULL, &r, &jr);
- scf_logd("c%ldp%ld--c%ldp%ld, r: %lg\n", p0->cid, p0->id, p1->cid, p1->id, r);
+ scf_loge("c%ldp%ld--c%ldp%ld, r: %lg\n", p0->cid, p0->id, p1->cid, p1->id, r);
int k;
for (k = 0; k < path->childs->size; k++) {
if (child->a >= la)
ses_split_i(&child->a, &child->ja, la, jla, child->r, child->jr, r, jr);
- } else
+ scf_logw("j: %d, c%ldp%ld--c%ldp%ld, v: %lg, child->r: %lg, r: %lg, child->a: %lg, el->a: %lg\n",
+ j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, child->r, r, child->a, la);
+
+ } else {
ses_split_i(&child->a, &child->ja, la, jla, child->r, child->jr, r, jr);
+ scf_logw("j: %d, c%ldp%ld--c%ldp%ld, v: %lg, child->r: %lg, r: %lg, child->a: %lg, el->a: %lg\n",
+ j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, child->r, r, child->a, la);
+ }
+
*a -= child->a;
*ja -= child->ja;