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
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- bioinformatics
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- Python
- Stelle
- 26
- Fork
- 25
- Merge medio
- 4h 25m
- PR unite (30g)
- 9
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lanl/PyBNF
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse itApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
bug minor
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
-
bug minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Issue simili
-
docs(contributing): the two things that silently block a PRForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaavailable documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 95/100
Nixitov/Riptide-Native#944 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
JTHCode/secretguard#24 ·
I maintainer di solito rispondono entro 1 giorno
-
area: middleware documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 ·
I maintainer di solito rispondono entro 1 giorno