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

Testing new stanify - replicated? datastructure? #42

Open
hyunjimoon opened this issue Feb 18, 2023 · 7 comments
Open

Testing new stanify - replicated? datastructure? #42

hyunjimoon opened this issue Feb 18, 2023 · 7 comments

Comments

@hyunjimoon
Copy link
Contributor

hyunjimoon commented Feb 18, 2023

@Dashadower compare_vensim_stan.mdl.zip below is a vensim file with the datastructure you've requested -- Light blue variable exog demand is datastructure and dark blue table for order fulfillment ratio is the table function. Could you please check the below?

  1. setting value for exog demand makes this variable no longer datastructure. If my memory is correct, you were trying to receive data only from vensim. However, I don't know how this can be implemented other than the original method (supplying value in python after declaring datastructure in vensim). Happy to be corrected!

  2. time series patterns are replicated in the result from stan's draws2data. For easy comparison, I've set exog demand is 2 * Time + 100 (this requires changing exog demand type (so it's not datastructure anymore ) as shown below.

image

With the value above, please make sure the overshoot of adj ss and smooth adjustment of adj s are visible in the stan-generated time series.
image

compare_vensim_stan.mdl.zip

@Dashadower
Copy link
Collaborator

In the Vensim model you've provided, I couldn't find any instances of exog demand being used with a supplemented argument. Is exog demand supposed to be a single scalar value?

@Dashadower
Copy link
Collaborator

In addition, I request that you provide the Vensim file with exog demand changed to an expression. It's hard to modify Vensim files without an actual Vensim client.

@hyunjimoon
Copy link
Contributor Author

hyunjimoon commented Feb 25, 2023

I couldn't find any instances of exog demand being used

I don't follow; don't you have the following in the zipped mdl file?

EOR= INTEG (
	adjusting eor,
		exog demand)
	~	widget/Week
	~		|

B in=
	exog demand
	~	widget/Week
	~		|

@Dashadower
Copy link
Collaborator

Dashadower commented Feb 25, 2023

Nah, it's there. It's just that exog demand is being used as a static scalar value; I'm not sure when you would generate a function for it like lookup.

@hyunjimoon
Copy link
Contributor Author

From below, exog demand's type is datatype and time series vector is supplied (perhaps through python @ in stanify). in vensim, I recall we implemented as interpolate/lookup structure. Does thie make sense to you? Is everyting good?

exog demand:INTERPOLATE:
~ widget/Week
~ |

@Dashadower
Copy link
Collaborator

Then is the default assumption for Vensim data variables is they exist as a time-vector?

@hyunjimoon
Copy link
Contributor Author

yes

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

No branches or pull requests

2 participants