A rate law that reads time() runs with the clock held fixed over each output step on bngl_backend = bionetgen, so the same job fits a different answer than on bngsim
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- bioinformatics
Línea de trabajo
Start by reproducing the clock.bngl model with perl $BNGPATH/BNG2.pl clock.bngl, then compare the generated .gdat values with the closed form and with bngsim.Model.from_net over t_span=(1, 3). Trace how time() is updated during run_network, including the bngl_backend = bionetgen and bngl_backend = bngsim paths. Done means both backends produce consistent trajectories for the stated model, or unsupported time() use is rejected or clearly warned about with the affected function and backend named.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What you see. A BNGL model whose rate law reads time() gives a different trajectory on bngl_backend = bionetgen than on bngl_backend = bngsim, and the gap depends on the output grid. The same fitting job therefore fits different parameters on the two backends. Nothing warns.
Example. A() -> 0 kt() with kt() = k_deg*time(), k_deg = 0.7, A0 = 1, and simulate({method=>"ode",t_start=>1,t_end=>3,n_steps=>8}). The closed form is A(t) = exp(-k (t² - 1)/2), so A(3) = 0.0608100626.
| run | A(3) | worst relative error over the grid |
|---|---|---|
BNG2.pl 2.9.3, n_steps=>8 |
0.0731234744 | 20% |
BNG2.pl 2.9.3, n_steps=>80 |
0.0621399694 | 2.2% |
bngsim 0.18.0 (.net from the same BNG2.pl run) |
0.0608100321 | 5e-7 |
The BNG2.pl numbers match holding time() at the start of each output interval. For example, A(1.25) = exp(-0.7 × 1 × 0.25) = 0.8395, where the closed form gives 0.8213. So run_network appears to update time() only at output steps, and a coarse grid integrates a different model.
Reproduce. Write the model above with its actions block, then run perl $BNGPATH/BNG2.pl clock.bngl and compare the .gdat with the closed form. Then load the generated .net with bngsim.Model.from_net and run it over t_span=(1, 3).
Possible fixes. Refuse, at load, a BNGL model whose functions read time() when it would run on BNG2.pl, naming the function. Or keep it, state the run_network behaviour, and say what output grid makes it close. Upstream, RuleWorld/bionetgen#275 was closed on the basis that BioNetGen supports time() in ODE rate laws. That may need reopening with these numbers.
Found during independent review of the multiple-shooting batch (#911–#915, #959, #1038, #1049).
- Lenguaje dominante
- Python
- Estrellas
- 26
- Forks
- 25
- Merge medio
- 4 h 25 min
- PR fusionados (30 d)
- 9
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lanl/PyBNF
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse itAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
bug minor
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
-
bug minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Todos los issues de lanl/PyBNF
Issues similares
-
docs(contributing): the two things that silently block a PRPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoavailable documentation good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 95/100
Nixitov/Riptide-Native#944 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
JTHCode/secretguard#24 ·
Los mantenedores suelen responder en 1 día
-
area: middleware documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
omarelshamy25x/shamy-hijri#63 ·
Los mantenedores suelen responder en 1 día