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

Missing Vensim function LOOKUP AREA #421

Open
rogersamso opened this issue Jul 19, 2023 · 1 comment
Open

Missing Vensim function LOOKUP AREA #421

rogersamso opened this issue Jul 19, 2023 · 1 comment

Comments

@rogersamso
Copy link
Contributor

Vensim's LOOKUP AREA function is not currently implemented in PySD.

@enekomartinmartinez
Copy link
Collaborator

I think about two possible approaches.

The first one would be to use a numerical integration, this may be the easiest one to implement. It may be straightforward with scipy.integrate.quad for floats. But in the case of having dimensions, we need to check if there is something supporting xarray.DataArray inputs.

The other option would be to compute an analytical integration. This is, the LOOKUP AREA function integration should retrieve the x, y pairs from the Lookup object and using the slopes compute the exact area in each section of the lookup.

I currently don't have time to work on this but could help with support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants