A list for the developers of CellML tools

Text archives Help


[cellml-dev] r3050 - CellML_DOM_API/trunk/CIS/sources


Chronological Thread 
  • From: alan.garny at dpag.ox.ac.uk (Alan Garny)
  • Subject: [cellml-dev] r3050 - CellML_DOM_API/trunk/CIS/sources
  • Date: Wed, 4 Feb 2009 22:51:31 -0000

Hmm... I am assuming that this is only a temporary solution, right?
Otherwise, I think it would be worth mentioning this kind of thing somewhere
in the documentation.

Alan

> -----Original Message-----
> From: automated-notifications-bounces at cellml.org [mailto:automated-
> notifications-bounces at cellml.org] On Behalf Of CellML Automated
> Notifications
> Sent: 04 February 2009 22:25
> To: automated-notifications at cellml.org
> Subject: r3050 - CellML_DOM_API/trunk/CIS/sources
>
> Author: amil082
> Date: 2009-02-05 11:24:58 +1300 (Thu, 05 Feb 2009)
> New Revision: 3050
>
> Modified:
> CellML_DOM_API/trunk/CIS/sources/CISSolve.cxx
> Log:
> Fix tracker item 1563 by increasing the number of random starts if we
don't
> get an acceptable solution to start with. Also, this uses a fixed random
> seed, as discussed in tracker item 1497, and multiplies the tolerance by
> system size to aid in solving larger systems.
>
> Modified: CellML_DOM_API/trunk/CIS/sources/CISSolve.cxx
> ===================================================================
> --- CellML_DOM_API/trunk/CIS/sources/CISSolve.cxx 2009-02-04 21:21:17
UTC
> (rev 3049)
> +++ CellML_DOM_API/trunk/CIS/sources/CISSolve.cxx 2009-02-04 22:24:58
UTC
> (rev 3050)
> @@ -735,9 +735,11 @@
> return ((inum % iden) == 0) ? 1.0 : 0.0;
> }
>
> -#define NR_RANDOM_STARTS 100
> +#define NR_RANDOM_STARTS_MIN 100
> +#define NR_RANDOM_STARTS_MAX 10000000
> #define NR_MAX_STEPS 1000
> #define NR_MAX_STEPS_INITIAL 10
> +#define RANDOM_SEED 0x7ce4176c
>
> static double
> random_double_logUniform()
> @@ -802,9 +804,12 @@
> {
> double info[9], best = INFINITY;
> uint32_t i = 0, k;
> + double tolerance = 1E-6 * size;
>
> memcpy(bp, params, sizeof(double) * size);
>
> + srand(RANDOM_SEED);
> +
> do
> {
> /* XXX casting away constness is bad, but it seems in this case
> dlevmar_dif is
> @@ -821,9 +826,10 @@
> for (k = 0; k < size; k++)
> bp[k] = random_double_logUniform();
> }
> - while (i++ < 100);
> + while ((i++ < NR_RANDOM_STARTS_MIN) ||
> + (best > tolerance && i <= NR_RANDOM_STARTS_MAX));
>
> /* XXX we shouldn't hard-code the tolerance... */
> - if (best > 1E-6)
> + if (best > tolerance)
> *pret = 1;
> }
>
> _______________________________________________
> automated-notifications mailing list
> automated-notifications at cellml.org
> http://www.cellml.org/mailman/listinfo/automated-notifications





Archive powered by MHonArc 2.6.18.

Top of page