89 for (i = 0; i < n1 ; i++)
90 for (j = 0; j < n3; j++)
94 for (k = 0; k < n2; k++)
95 C(i, j) += A(i, k) * B(k, j);
106 for (i = 0; i < n1 ; i++)
107 for (j = 0; j < n2; j++)
108 C(i, j) = A(i, j) - B(i, j);
118 for (i = 0; i < n1 ; i++)
119 for (j = 0; j < n2; j++)
120 C(i, j) = A(i, j) + B(i, j);
131 for (j = 0; j < n1 ; j++)
135 for (i = 0; i < n ; i++)
142 for (i = 0; i < n ; i++)
144 A(i, j) = A(i, j) / c;
145 B(j, i) = B(j, i) * c;
157 for (j = 0; j < n ; j++)
158 for (i = 0; i < n ; i++)
159 A(i, j) = A(i, j) * delta;
232 ipiv =
new C_INT [n];
243 for (i = 0; i < N; i++)
244 for (j = 0; j < N; j++)
247 for (i = 0; i < N; i++)
272 for (i = 0; i < n; i++)
276 if (tmp < 0 && fabs(tmp) <
mTsc)
281 if (tmp > 0) info = 1;
287 for (i = 0; i < n - 1; i++)
289 if (eigen[i] != eigen[i + 1])
291 tmp = eigen[i + 1 ] / eigen[i];
295 std::cout <<
"tsc[" << i <<
"]/tsc[" << i + 1 <<
"] " << tmp << std::endl;
296 std::cout <<
"mEps " <<
mEps << std::endl;
299 if (tmp > 0 && tmp <
mEps)
304 if (eigen(i) == eigen(i - 1)) k++;
308 if (tmp < 0) info = 1;
317 std::cout <<
"the following time scales are equal: " << std::endl;
318 std::cout <<
"tsc[" << i <<
"] = tsc[" << i + 1 <<
"] " << std::endl;
337 if (eigen[0] == 0.)
return;
341 for (i = 0; i < n ; i++)
342 std::cout <<
"eigen[" << i <<
"] " << eigen[i] << std::endl;
344 for (i = 0; i < n ; i++)
345 std::cout <<
"tsc[" << i <<
"] -" << 1 / eigen[i] << std::endl;
349 for (i = 0; i < n - 1; i++)
352 if (eigen[i + 1] == 0.)
return;
354 if (eigen[i] != eigen[i + 1])
356 tmp = eigen[i + 1 ] / eigen[i];
360 std::cout <<
"tsc[" << i <<
"]/tsc[" << i + 1 <<
"] " << tmp << std::endl;
361 std::cout <<
"mEps " <<
mEps << std::endl;
364 if (tmp > 0 && tmp <
mEps)
369 std::cout <<
"k " << k << std::endl;
373 if (eigen[i] == eigen[i - 1]) k++;
377 if (tmp < 0) info = 1;
388 std::cout <<
"the following time scales are equal: " << std::endl;
389 std::cout <<
"tsc[" << i <<
"] = tsc[" << i + 1 <<
"] " << std::endl;
395 std::cout <<
"k " << k << std::endl;
408 std::cout <<
" ********************* New time step **********************" << std::endl;
409 std::cout <<
"mTime " <<
mTime << std::endl;
429 for (j = 0; j < N; j++)
448 std::cout <<
"current Jacobian " << std::endl;
449 std::cout << J << std::endl;
510 for (i = 0; i < N; i++)
514 tsc[i] = 1. / eigen[i];
518 std::cout <<
"CSP iteration: " << std::endl;
519 std::cout <<
"Eigen values ordered by increasing " << std::endl;
521 for (i = 0; i < N; i++)
522 std::cout <<
"eigen[" << i <<
"] " << eigen[i] << std::endl;
527 std::cout <<
"time scales : " << std::endl;
529 for (i = 0; i < N; i++)
530 std::cout << fabs(tsc[i]) << std::endl;
543 std::cout <<
" Candidates number " << M << std::endl;
560 std::cout <<
"After time scales separation : " << std::endl;
561 std::cout <<
"the number of candidates to fast modes is equal to the total number of modes" << std::endl;
582 std::cout <<
" ************************************** Number of candidates to fast " << M <<
" ************************" << std::endl;
604 for (i = 0; i < N; i++)
605 for (j = 0; j < N; j++)
607 DBDT(i, j) = (B(i, j) -
mB(i, j)) / deltaT;
611 std::cout <<
"time derivatives of B " << std::endl;
612 std::cout << DBDT << std::endl;
616 smmult(B, J, TMP, N, N, N);
622 for (i = 0; i < N; i++)
623 for (j = 0; j < N; j++)
625 TMP(i, j) += DBDT(i, j);
630 smmult(TMP, A, ALA, N, N, N);
633 std::cout <<
"B*J*A should converge to block-diagonal for an ideal basis:" << std::endl;
634 std::cout << ALA << std::endl;
636 std::cout <<
"considered time resolution of the solution " << std::endl;
637 std::cout << fabs(tsc[M]) << std::endl;
649 for (i = 0; i < M; i++)
650 for (j = 0; j < M; j++)
651 ALAM(i, j) = ALA(i, j);
656 TAUM(0, 0) = 1. / ALA(0, 0);
663 std::cout <<
" scaled amplitudes via trial basis : " << std::endl;
665 for (i = 0; i < M; i++)
668 std::cout << F(i, 0) << std::endl;
674 std::cout <<
" |A(i,m) * F(m,0) * tsc[M - 1]| , mYerror[i] " << std::endl;
678 for (j = 0; j < M; j++)
680 std::cout <<
" m " << j << std::endl;
682 for (i = 0; i < N; i++)
684 tmp = fabs(A(i, j) * F(j, 0) * tsc[M - 1]);
685 std::cout << A(i, j) <<
" * " << F(j, 0) <<
" * " << tsc[M - 1] <<
" = " << tmp <<
" " <<
mYerror[i] << std::endl;
698 std::cout <<
"*********************************** CSP refinement iteration " << iter <<
"*******************************" << std::endl;
714 smmult(B1, J, TMP, N, N, N);
720 for (i = 0; i < N; i++)
721 for (j = 0; j < N; j++)
723 DBDT(i, j) = (B1(i, j) -
mB(i, j)) / deltaT;
727 std::cout <<
"time derivatives of B " << std::endl;
728 std::cout << DBDT << std::endl;
734 for (i = 0; i < N; i++)
735 for (j = 0; j < N; j++)
737 TMP(i, j) += DBDT(i, j);
742 smmult(TMP, A1, ALA, N, N, N);
745 std::cout <<
"B1*J*A1 : " << std::endl;
746 std::cout << ALA << std::endl;
752 std::cout <<
" iteration result: " << std::endl;
753 std::cout <<
" 0 - convergence is achieved, 1 - convergence is not achieved, -1 - iterations crucially disconverged " << std::endl;
754 std::cout << result << std::endl;
766 std::cout <<
" the M modes are exhausted, M = " << M << std::endl;
771 for (j = 0; j < N; j++)
793 smmult(A1, B1, QF, N, M, N);
816 if (tsc[M] == tsc[M - 1]) M --;
819 std::cout <<
" iterations converged, but the criterion is not sutisfied for the given absolute an relative errors, the new number of candidates to fast " << M << std::endl;
822 if (M)
goto analyseMmodes;
845 std::cout <<
"scaled amplitudes via refined basis : " << std::endl;
847 for (i = 0; i < M; i++)
850 std::cout << F(i, 0) << std::endl;
853 std::cout <<
" |A(i,m) * F(m,0) * tsc[M - 1]| , mYerror[i] " << std::endl;
857 for (j = 0; j < M; j++)
859 std::cout <<
" m " << j << std::endl;
861 for (i = 0; i < N; i++)
863 tmp = fabs(A1(i, j) * F(j, 0) * tsc[M - 1]);
864 std::cout << A1(i, j) <<
" * " << F(j, 0) <<
" * " << tsc[M - 1] <<
" = " << tmp <<
" " <<
mYerror[i] << std::endl;
875 else if (iter >=
mIter)
881 if (tsc[M] == tsc[M - 1]) M --;
883 if (M)
goto analyseMmodes;
903 if (tsc[M] == tsc[M - 1]) M --;
905 if (M)
goto analyseMmodes;
940 C_INT i, j, imax, jmax, imaxl, jmaxl;
943 std::cout <<
"blocks of ALA : " << std::endl;
945 std::cout <<
"upper - left : " << std::endl;
947 for (i = 0; i < M; i++)
949 for (j = 0 ; j < M; j++)
950 std::cout << ALA(i, j) <<
" ";
952 std::cout << std::endl;
955 std::cout <<
"upper - right : " << std::endl;
957 for (i = 0; i < M; i++)
959 for (j = M ; j < N; j++)
960 std::cout << ALA(i, j) <<
" ";
962 std::cout << std::endl;
965 std::cout <<
"low - left : " << std::endl;
967 for (i = M; i < N; i++)
969 for (j = 0 ; j < M; j++)
970 std::cout << ALA(i, j) <<
" ";
972 std::cout << std::endl;
975 std::cout <<
"low - right : " << std::endl;
977 for (i = M; i < N; i++)
979 for (j = M ; j < N; j++)
980 std::cout << ALA(i, j) <<
" ";
982 std::cout << std::endl;
988 for (i = 0; i < M; i++)
989 for (j = M ; j < N; j++)
990 if (fabs(ALA(i, j)) > max)
992 max = fabs(ALA(i, j));
999 for (i = M; i < N; i++)
1000 for (j = 0 ; j < M; j++)
1001 if (fabs(ALA(i, j)) > maxl)
1003 maxl = fabs(ALA(i, j));
1004 imaxl = i ; jmaxl = j;
1008 std::cout <<
"norm C of the lower-left block of ALA is ALA(" << imaxl <<
"," << jmaxl <<
") = " << maxl << std::endl;
1009 std::cout <<
"the low-left block : " << maxl << std::endl;
1015 std::cout <<
"the norm C of the upper-right block of ALA is ALA(" << imax <<
"," << jmax <<
") = " << max << std::endl;
1016 std::cout <<
"the upper-right block : " << max << std::endl;
1026 std::cout <<
" iterations crucially disconverged " << std::endl;
1031 else if (max <= SMALL) result = 0;
1041 for (m = 0; m < M; m++)
1042 for (i = 0; i < N; i++)
1048 for (m = 0; m < M; m++)
1049 for (r = 0; r < R; r++)
1052 for (m = 0; m < M; m++)
1053 for (r = 0; r < R; r++)
1056 for (i = 0; i < N; i++)
1057 for (r = 0; r < R; r++)
1060 for (i = 0; i < N; i++)
1061 for (r = 0; r < R; r++)
1064 for (i = 0; i < N; i++)
1065 for (r = 0; r < R; r++)
1068 for (r = 0; r < R; r++)
1071 for (r = 0; r < R; r++)
1074 for (i = 0; i < N; i++)
1075 for (r = 0; r < R; r++)
1078 for (i = 0; i < N; i++)
1079 for (r = 0; r < R; r++)
1099 for (i = 0; i < N; i++)
1100 for (j = 0; j < N; j++)
1108 for (j = 0; j < N; j++)
1250 std::cout <<
"Amplitudes of reaction modes :" << std::endl;
1252 for (m = 0; m < M; m++)
1254 std::cout <<
"reaction mode " << m <<
" :" << std::endl;
1256 for (i = 0; i < N; i++)
1258 std::cout <<
" mode " << i <<
" : " <<
mAmplitude[i];
1260 std::cout << std::endl;
1263 std::cout << std::endl;
1264 std::cout <<
"Radical Pointer: whenever is not a small number, species k is said to be CSP radical" << std::endl;
1266 for (i = 0; i < N; i++)
1272 std::cout << std::endl;
1273 std::cout <<
" Fast Reaction Pointer of the m-th reaction mode : whenever is not a small number, " << std::endl;
1274 std::cout <<
" the r-th reaction is said to be a fast reaction " << std::endl;
1276 for (m = 0; m < M; m++)
1278 std::cout <<
"reaction mode " << m <<
" :" << std::endl;
1280 for (r = 0; r < R; r++)
1284 std::cout << std::endl;
1285 std::cout <<
" Participation Index : is a mesure of participation of the r-th elementary reaction " << std::endl;
1286 std::cout <<
" to the balancing act of the i-th mode " << std::endl;
1288 for (i = 0; i < N; i++)
1290 std::cout <<
"reaction mode " << i <<
" :" << std::endl;
1292 for (r = 0; r < R; r++)
1296 std::cout << std::endl;
1297 std::cout <<
" Importance Index: is a mesure of relative importance of the contribution of r-th elementary " << std::endl;
1298 std::cout <<
" reaction to the current reaction rate of i-th spiecies " << std::endl;
1300 for (i = 0; i < N; i++)
1304 <<
" :" << std::endl;
1306 for (r = 0; r < R; r++)
1332 A0.
resize(N, reacs_size);
1333 B0.
resize(reacs_size, N);
1334 TMP.
resize(N, reacs_size);
1341 for (r = 0; r < reacs_size; r++)
1345 for (i = 0; i < N; i++)
1347 A0(i, r) = redStoi(i, r);
1348 tmp += A0(i, r) * A0(i, r);
1351 for (i = 0; i < N; i++)
1352 B0(r, i) = A0(i, r) / tmp;
1362 for (m = 0; m < M ; m++)
1368 for (i = 0; i < N; ++i)
1369 for (j = 0; j < N; ++j)
1371 Qm(i, j) = A(i, m) * B(m, j);
1382 for (i = 0; i < N ; i++)
1396 for (r = 0; r < reacs_size; r++)
1400 for (i = 0; i < N; i++)
1404 for (j = 0; j < N; j++)
1405 TMP(i, r) += Qm(i, j) * A0(j, r);
1408 for (j = 0; j < N; j++)
1409 Pmr += B0(r, j) * TMP(j, r);
1417 for (m = 0; m < M ; m++)
1421 for (r = 0; r < reacs_size; r++)
1424 for (r = 0; r < reacs_size; r++)
1462 for (r = 0; r < reacs_size; ++r)
1463 flux[r] = reacs[r]->calculateParticleFlux();
1465 for (i = 0; i < N; ++i)
1469 for (r = 0; r < reacs_size; ++r)
1474 for (j = 0; j < N; ++j)
1475 P(i, r) += B0(i, j) * redStoi(j, r);
1477 ampl[i] += fabs(P(i, r) * flux[r]);
1482 for (j = 0; j < N; ++j)
1487 estim[i] = fabs(tmp / tauM1);
1490 for (i = 0; i < N; ++i)
1493 for (r = 0; r < reacs_size; ++r)
1495 P(i, r) *= flux[r] / (ampl[i] + estim[i]);
1501 for (r = 0; r < reacs_size; ++r)
1505 for (i = 0; i < M; ++i)
1510 for (i = M; i < N; ++i)
1516 for (i = M; i < N; ++i)
1524 for (i = 0; i < N; ++i)
1528 for (r = 0; r < reacs_size; ++r)
1531 for (r = 0; r < reacs_size; ++r)
1537 for (r = 0; r < reacs_size; ++r)
1541 for (i = 0; i < N; ++i)
1544 for (i = 0; i < N; ++i)
1575 S0.
resize(N, reacs_size);
1591 smmult(Q, S, S0, N, N, reacs_size);
1593 for (r = 0; r < reacs_size; ++r)
1594 flux[r] = reacs[r]->calculateParticleFlux();
1596 for (i = 0; i < N; ++i)
1600 for (r = 0; r < reacs_size; ++r)
1601 g[i] += fabs(S0(i, r) * flux[r]);
1603 estim[i] = fabs(
mYerror[i] / tauM1);
1606 for (i = 0; i < N; ++i)
1609 for (r = 0; r < reacs_size; ++r)
1611 I(i, r) = S0(i, r) * flux[r] / (g[i] + estim[i]);
1619 for (r = 0; r < reacs_size; ++r)
1623 for (i = 0; i < N; ++i)
1626 for (i = 0; i < N; ++i)
1641 for (i = 0; i < N; i++)
1645 for (j = 0; j < N; j++)
1647 for (j = 0; j < N; j++)
1649 F(i, 0) += B(i, j) * g[j];
1669 smmult(A, TAUM, TMP, N, M, M);
1671 for (i = 0; i < N ; i++) dy[i] = 0.;
1673 for (i = 0; i < N ; i++)
1674 for (k = 0; k < M; k++)
1675 dy[i] += TMP(i, k) * F(k, 0);
1679 for (i = 0; i < N; i++)
1704 for (m = 0; m < M; m++)
1705 for (j = M; j < N; j++)
1707 for (n = 0; n < M; n++)
1708 P(m, j) +=
TAU(m, n) * ALA(n, j);
1711 for (j = M ; j < N; j++)
1712 for (m = 0; m < M; m++)
1714 for (n = 0; n < M; n++)
1715 Q(j, m) += ALA(j, n) *
TAU(n, m);
1723 for (m = 0; m < M; m++)
1724 for (i = 0; i < N; i++)
1725 for (j = M ; j < N; j++)
1726 B0(m, i) += P(m, j) * B(j, i);
1728 for (i = 0; i < N; i++)
1729 for (j = M ; j < N; j++)
1730 for (n = 0; n < M ; n++)
1731 A0(i, j) -= A(i, n) * P(n, j);
1739 for (i = M; i < N; i++)
1740 for (j = 0; j < N; j++)
1741 for (n = 0; n < M; n++)
1742 B0(i, j) -= Q(i, n) * B(n, j);
1744 for (i = 0; i < N; i++)
1745 for (m = 0; m < M; m++)
1746 for (j = M; j < N; j++)
1747 A0(i, m) += A(i, j) * Q(j, m);
1762 bool exhausted =
true;
1767 std::cout <<
" |A(i,m) * F(m,0) * tsc[M - 1]| , mYerror[i] " << std::endl;
1770 for (j = 0; j < M; j++)
1773 for (i = 0; i < N; i++)
1775 tmp = fabs(A(i, j) * F(j, 0) * tauM);
1778 std::cout << A(i, j) <<
" * " << F(j, 0) <<
" * " << tauM <<
" = " << tmp <<
" " <<
mYerror[i] << std::endl;
1781 if (tmp >=
mYerror[i]) exhausted =
false;
1813 for (j = 0; j < N; j++)
1866 name =
"Radical Pointer";
1874 pTmp2->
setDescription(
"Radical Pointer: whenever is not a small number, species k is said to be CSP radical ");
1881 name =
"Fast Reaction Pointer";
1889 pTmp3->
setDescription(
"Fast Reaction Pointer of the m-th reaction mode : whenever is not a small number, the r-th reaction is said to be a fast reaction");
1896 name =
"Normed Fast Reaction Pointer";
1904 pTmp3Normed->
setDescription(
"Fast Reaction Pointer of the m-th reaction mode : whenever is not a small number, the r-th reaction is said to be a fast reaction");
1911 name =
"Participation Index";
1919 pTmp4->
setDescription(
"Participation Index : is a measure of participation of the r-th elementary reaction to the balancing act of the i-th mode");
1926 name =
"Normed Participation Index (by column)";
1934 pTmp4NormedColumn->
setDescription(
"Participation Index : is a measure of participation of the r-th elementary reaction to the balancing act of the i-th mode");
1941 name =
"Normed Participation Index (by row)";
1949 pTmp4NormedRow->
setDescription(
"Participation Index : is a measure of participation of the r-th elementary reaction to the balancing act of the i-th mode");
1956 name =
"Fast Participation Index";
1964 pTmp4Fast->
setDescription(
" Fast Participation Index : is a measure of participation of the r-th elementary reaction to the balancing act of fast modes");
1971 name =
"Slow Participation Index";
1980 pTmp4Slow->
setDescription(
"Slow Participation Index : is a measure of participation of the r-th elementary reaction to the balancing act of slow modes");
1987 name =
"Importance Index";
1995 pTmp5->
setDescription(
"Importance Index: is a measure of relative importance of the contribution of r-th elementary reaction to the current reaction rate of i-th species");
2002 name =
"Normed Importance Index (by row)";
2010 pTmp5NormedRow->
setDescription(
"Importance Index: is a measure of relative importance of the contribution of r-th elementary reaction to the current reaction rate of i-th species");
2028 std::stringstream sstr;
2107 for (j = 0; j < N; j++)
2120 std::cout <<
"metab.size " <<
mData.
dim << std::endl;
2121 std::cout <<
"step " << step << std::endl;
2124 std::cout <<
"+++++++++++++++++++++++++++++++++++++++++++ " << std::endl;
2314 C_INT i, r, m, fast;
2329 for (m = 0; m < fast; m++)
2337 for (r = 0; r < reacs_size; r++)
2338 for (i = 0; i < fast; i++)
2345 for (r = 0; r < reacs_size; r++)
2346 for (i = 0; i < fast; i++)
2352 for (r = 0; r < reacs_size; r++)
2353 for (i = 0; i < fast; i++)
2359 for (i = 0; i < reacs_size; i++)
2365 for (i = 0; i < reacs_size; i++)
2371 for (r = 0; r < reacs_size; r++)
2372 for (i = 0; i < fast; i++)
2378 for (r = 0; r < reacs_size; r++)
2379 for (i = 0; i < fast; i++)
2385 for (r = 0; r < reacs_size; r++)
2392 for (r = 0; r < reacs_size; r++)
2421 for (i = 0; i < fast; i++)
2432 for (m = 0; m < fast; m++)
2442 for (r = 0; r < reacs_size; r++)
2443 for (i = 0; i < fast; i++)
2452 for (r = 0; r < reacs_size; r++)
2453 for (i = 0; i < fast; i++)
2463 for (i = 0; i < reacs_size; i++)
2469 for (i = 0; i < reacs_size; i++)
2521 std::ostream & os = *ostream;
2522 C_INT M, i, m, r, istep = 0;
2540 os <<
" Radical Pointer: whenever is not a small number, species k is said to be CSP radical" << std::endl;
2543 os <<
" Fast Reaction Pointer of the m-th reaction mode : whenever is not a small number, " << std::endl;
2544 os <<
" the r-th reaction is said to be a fast reaction " << std::endl;
2547 os <<
" Participation Index : is a measure of participation of the r-th elementary reaction " << std::endl;
2548 os <<
" to the balancing act of the i-th mode " << std::endl;
2551 os <<
" Importance Index: is a measure of relative importance of the contribution of r-th elementary " << std::endl;
2552 os <<
" reaction to the current reaction rate of i-th species " << std::endl;
2555 os <<
" Species : " << std::endl;
2562 os <<
" Reactions : " << std::endl;
2564 for (r = 0; r < (
C_INT) reacs.
size(); r++)
2569 os <<
"%%% Number of fast modes: " << std::endl;
2571 for (istep = 0; istep < stepNumber; istep++)
2577 os <<
"%%% Time step " << istep + 1 << std::endl;
2580 os << M << std::endl;
2586 os <<
"%%% Time scales: " << std::endl;
2588 for (istep = 0; istep < stepNumber; istep++)
2594 os <<
"%%% Time step " << istep + 1 << std::endl;
2606 os <<
"% Radical Pointer " << std::endl;
2611 for (istep = 0; istep < stepNumber; istep++)
2617 os <<
"%%% Time step " << istep + 1 << std::endl;
2620 for (m = 0; m < M; m++)
2637 os << RP(i, m) <<
" ";
2646 os <<
"%%%% Participation Index : " << std::endl;
2648 for (istep = 0; istep < stepNumber; istep++)
2654 os <<
"%%% Time step " << istep + 1 << std::endl;
2659 for (r = 0; r < (
C_INT) reacs.
size(); r++)
2672 os <<
"%%% Importance Index " << std::endl;
2674 for (istep = 0; istep < stepNumber; istep++)
2680 os <<
"%%% Time step " << istep + 1 << std::endl;
2683 for (r = 0; r < (
C_INT) reacs.
size(); r++)
void CSPParticipationIndex(C_INT &N, C_INT &M, C_FLOAT64 &tauM1, CMatrix< C_FLOAT64 > &B0)
std::vector< CMatrix< C_FLOAT64 > > mVec_mImportanceIndex
int dgesv_(integer *n, integer *nrhs, doublereal *a, integer *lda, integer *ipiv, doublereal *b, integer *ldb, integer *info)
CMatrix< C_FLOAT64 > mAmplitudeTab
CCSPMethod(const CCopasiContainer *pParent=NULL)
CMatrix< C_FLOAT64 > mParticipationIndexNormedColumn
CArrayAnnotation * pParticipationIndexNormedRowAnn
CArrayAnnotation * pSlowParticipationIndexAnn
CCopasiProblem * getProblem()
std::vector< C_FLOAT64 > mCurrentTime
CMatrix< C_FLOAT64 > mParticipationIndexTab
std::vector< CMatrix< C_FLOAT64 > > mVec_mFastParticipationIndex
const std::string & getObjectName() const
void findCandidatesNumber(C_INT &n, C_INT &k, CVector< C_FLOAT64 > &tsc, C_INT &info)
CArrayAnnotation * pTmp5NormedRow
virtual size_t size() const
void CSPOutput(C_INT &N, C_INT &M, C_INT &R)
virtual void step(const double &deltaT)
void findTimeScaleSeparation(C_INT &n, C_INT &k, CVector< C_FLOAT64 > &tsc, C_INT &info)
void updateSimulatedValues(const bool &updateMoieties)
virtual size_t numRows() const
std::vector< CMatrix< C_FLOAT64 > > mVec_mRadicalPointer
void calculateJacobianX(CMatrix< C_FLOAT64 > &jacobianX, const C_FLOAT64 &derivationFactor, const C_FLOAT64 &resolution)
std::map< std::string, CArrayAnnotation * > mapTableToName
void sminverse(C_INT &n, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B)
void initializeIntegrationsParameter()
void integrationStep(const double &deltaT)
std::vector< CMatrix< C_FLOAT64 > > mVec_mSlowParticipationIndex
void resize(size_t size, const bool ©=false)
bool modesAreExhausted(C_INT &N, C_INT &M, C_FLOAT64 &tauM, C_FLOAT64 &tauM1, CVector< C_FLOAT64 > &g, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &F)
void calculateJacobian(CMatrix< C_FLOAT64 > &jacobian, const C_FLOAT64 &derivationFactor, const C_FLOAT64 &resolution)
CMatrix< C_FLOAT64 > mFastParticipationIndexTab
void CSPImportanceIndex(C_INT &N, C_FLOAT64 &tauM1, CMatrix< C_FLOAT64 > &Q)
void setDescription(const std::string &s)
void CSPradicalPointer(C_INT &N, C_INT &M, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B)
CMatrix< C_FLOAT64 > mImportanceIndexNormedRow
void smadd(CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &C, C_INT &n1, C_INT &n2)
CMatrix< C_FLOAT64 > mFastReactionPointerNormedTab
const CMatrix< C_FLOAT64 > & getRedStoi() const
std::vector< CMatrix< C_FLOAT64 > > mVec_mParticipationIndexNormedRow
void yCorrection(C_INT &N, C_INT &M, CVector< C_FLOAT64 > &y, CMatrix< C_FLOAT64 > &TAUM, CMatrix< C_FLOAT64 > &F, CMatrix< C_FLOAT64 > &A)
CMatrix< C_FLOAT64 > mImportanceIndex
CVector< C_FLOAT64 > mFastParticipationIndex
void setAnnotationString(size_t d, size_t i, const std::string s)
CArrayAnnotation * pFastReactionPointerNormedAnn
const C_FLOAT64 & getInitialValue() const
void modesAmplitude(C_INT &N, C_INT &M, CVector< C_FLOAT64 > &g, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &F)
std::vector< CMatrix< C_FLOAT64 > > mVec_mAmplitude
CMatrix< C_FLOAT64 > mJacobian_initial
CArrayAnnotation * pTmp4NormedColumn
CVector< C_FLOAT64 > mSlowParticipationIndex
CMatrix< C_FLOAT64 > mParticipationIndexNormedRowTab
void emptyOutputData(C_INT &N, C_INT &M, C_INT &R)
CArrayAnnotation * pParticipationIndexAnn
CMatrix< C_FLOAT64 > mRadicalPointer
const C_FLOAT64 & getNumber2QuantityFactor() const
size_t getNumDependentReactionMetabs() const
std::vector< std::string > tableNames
void createAnnotationsM()
const Value & getValue() const
CMatrix< C_FLOAT64 > mParticipationIndexNormedRow
static CCopasiVector< CCopasiDataModel > * getDatamodelList()
std::vector< CMatrix< C_FLOAT64 > > mVec_mParticipationIndex
CMatrix< C_FLOAT64 > mFastReactionPointerNormed
CArrayAnnotation * pImportanceIndexNormedRowAnn
void setCopasiVector(size_t d, const CCopasiContainer *v)
virtual void print(std::ostream *ostream) const
CModelEntity ** beginIndependent()
CArrayAnnotation * pTmp4Fast
CVector< C_FLOAT64 > mYerror
void smmult(CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &C, C_INT &n1, C_INT &n2, C_INT &n3)
CArrayAnnotation * pTmp4NormedRow
CMatrix< C_FLOAT64 > mSlowParticipationIndexTab
virtual void resize(size_t rows, size_t cols, const bool ©=false)
size_t getNumIndependentReactionMetabs() const
CArrayAnnotation * pAmplitudeAnn
virtual void resize(const size_t &newSize)
void perturbateA(C_INT &n, CMatrix< C_FLOAT64 > &A, C_FLOAT64 delta)
void initializeParameter()
CArrayAnnotation * pImportanceIndexAnn
void setMode(size_t d, Mode m)
void calculateDerivativesX(C_FLOAT64 *derivativesX)
CMatrix< C_FLOAT64 > mParticipationIndex
void setDimensionDescription(size_t d, const std::string &s)
CArrayAnnotation * pTmp3Normed
CMatrix< C_FLOAT64 > mFastReactionPointerTab
std::vector< CVector< C_FLOAT64 > > mVec_TimeScale
CMatrix< C_FLOAT64 > mJacobian
Header file of class CArrayAnnotation.
CMatrix< C_FLOAT64 > mImportanceIndexTab
CArrayAnnotation * pTmp4Slow
std::vector< CMatrix< C_FLOAT64 > > mVec_mImportanceIndexNormedRow
CArrayAnnotation * pParticipationIndexNormedColumnAnn
const CStateTemplate & getStateTemplate() const
CArrayAnnotation * pFastReactionPointerAnn
C_INT isBlockDiagonal(C_INT &N, C_INT &M, CMatrix< C_FLOAT64 > &ALA, C_FLOAT64 SMALL)
void smsubst(CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &C, C_INT &n1, C_INT &n2)
CCopasiVectorNS< CReaction > & getReactions()
virtual void predifineAnnotation()
std::vector< CMatrix< C_FLOAT64 > > mVec_mFastReactionPointerNormed
void calculateDerivatives(C_FLOAT64 *derivatives)
CCopasiParameter * assertParameter(const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
virtual bool setAnnotationM(size_t step)
CArrayAnnotation * pRadicalPointerAnn
CMatrix< C_FLOAT64 > mImportanceIndexNormedRowTab
const CMatrix< C_FLOAT64 > & getStoi() const
void cspstep(const double &deltaT, C_INT &n, C_INT &m, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B)
void setVectors(int fast)
virtual size_t numCols() const
CMatrix< C_FLOAT64 > mRadicalPointerTab
std::vector< CMatrix< C_FLOAT64 > > mVec_mParticipationIndexNormedColumn
CArrayAnnotation * pFastParticipationIndexAnn
CMatrix< C_FLOAT64 > mFastReactionPointer
void integrationMethodStart(const CState *initialState)
std::vector< C_INT > mVec_SlowModes
void smnorm(C_INT &n, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, C_INT &n1)
void printResult(std::ostream *ostream) const
void basisRefinement(C_INT &N, C_INT &M, CMatrix< C_FLOAT64 > &ALA, CMatrix< C_FLOAT64 > &TAU, CMatrix< C_FLOAT64 > &A, CMatrix< C_FLOAT64 > &B, CMatrix< C_FLOAT64 > &A0, CMatrix< C_FLOAT64 > &B0)
std::vector< CMatrix< C_FLOAT64 > > mVec_mFastReactionPointer
virtual void start(const CState *initialState)
CVector< C_FLOAT64 > mAmplitude
CMatrix< C_FLOAT64 > mParticipationIndexNormedColumnTab