Hi there.
I'm not good in math, exuse me for maybe simple question. I have a chain with weights on every edge. I tried different solvers, but all of them shows <= simple random. I need to find two variables for every vertex where the first is multiplies the previous flow and the other adds it. Flow on every edge must be less 1 and greater than zero. Could you hepl me? what I'm doing wrong? Thank you in advance.
public static void nlcfunc2(double[] x, double[] fi, object obj) { fi[0] = 0; double flow = 1; for (int i = 0; i < chain.EdgesCount; i++) { flow = flow * x[chain[i].vertex * 2] + x[chain[i].vertex * 2 + 1]; if (flow > 1) flow = 1; if (flow < 0) flow = 0; fi[0] -= flow * chain[i].delta; } }
|