Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration rules #23

Open
levisc8 opened this issue Apr 29, 2021 · 2 comments
Open

integration rules #23

levisc8 opened this issue Apr 29, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@levisc8
Copy link
Collaborator

levisc8 commented Apr 29, 2021

New options should be "cdf" and "b2b".

It may make sense to re-examine how expressions are evaluated internally now. I think pretty much all vital rates will now have to become call2(<int_rule_fun>, !!! vr_expr) where <int_rule_fun> sets up the meshes and modifies vr_expr appropriately.

e.g. "cdf" needs to change Norm(size_2, mu_g, sd_g) to pnorm(size_2_u, mu_g, sd_g) - pnorm(size_2_l, mu_g, sd_g)

@levisc8 levisc8 added the enhancement New feature or request label Apr 29, 2021
@wpetry
Copy link

wpetry commented Mar 31, 2023

I can help with this. Can you point me to where this is?

@levisc8
Copy link
Collaborator Author

levisc8 commented Sep 5, 2023

Hi Will, sorry for the slow response. Unfortunately, I think this points to a larger design flaw in the package itself - midpoint integration rule isn't implemented anywhere so much as it's baked into the syntax.

Implementing the midpoint rule should be straightforward enough - i think you'd just write a wrapper called midpoint() that evaluates the expressions just as they currently are evaluated.

The cdf approach would require an additional translation layer built into it (maybe see here for an example of what that might look like). However, I'm not sure what step in the make_ipm process is best to implement that translation.

I suspect the b2b approach would require this translation as well, though I have to confess that I've forgotten what that approach actually does (haven't thought about IPMs for a little while now!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants