gadget-framework / gadget3

TMB-based gadget implemtation
GNU General Public License v2.0
8 stars 6 forks source link

Resolve formula dependency ordering in add_dependent_formula #156

Closed lentinj closed 1 week ago

lentinj commented 1 month ago
+# TODO: This gets the ordering wrong. Would be nice for g3a_renewal_len_dnorm()
+# out <- adf(g3_formula(
+#     10 + dnorm,
+#     dnorm = g3_formula(
+#         block1 + mean * stddev,
+#         mean = g3_formula(block1),
+#         stddev = g3_formula(block2) )))

Something like sorting by the minimum of position of defined names? Building the graph and walking it is (hopefully) getting carried away.