@Override
public void solve() {
QueuingNet.QNSolver c = null;
try{
// c = new CoMoMSimpleSolver(qnm, nThreads);
c = new CoMoMBTFSolver(qnm);
c.computeNormalisingConstant();
} catch (Exception e) {
Integer D[][]=new Integer[qnm.M][qnm.R];
Integer Z[]=new Integer[qnm.R];
Integer mi[]=new Integer[qnm.M];
Integer N[]=new Integer[qnm.R];
Integer pert = 1;
Integer newscale = scale * pert;
for (int r=0; r<qnm.R; r++) {
Z[r] = qnm.getDelay(r) * pert;
N[r] = qnm.getPopulationVector().get(r);
for (int i=0; i<qnm.M; i++) {
mi[i] = qnm.getMultiplicitiesVector().get(i);
D[i][r] = (Integer) (qnm.getDemand(i, r) * pert + (Integer) (i + 1) + (Integer) (int) Math.round((int)100*Math.random())); // i is a perturbation of 10^-6 magnitude
}
}
scale = newscale;
QNModel qnm2 = null;
try {
qnm2 = new QNModel(qnm.R, qnm.M, N, Z, mi, D);
} catch (Exception e3) {
}
qnm = qnm2;
try {
c = new CoMoMBTFSolver(qnm);
c.computeNormalisingConstant();
} catch (Exception e1) {
}
}