mattwarkentin / openmpp

Programmatic interface to the OpenM++ microsimulation platform
https://mattwarkentin.github.io/openmpp/
Other
3 stars 1 forks source link

Setting a base run before performing a model run #7

Open barnzilla opened 6 days ago

barnzilla commented 6 days ago

Hi @mattwarkentin,

I'm now using openmpp in a Linux cloud environment and happy to report that it's working well!

One issue I'm having though: I cannot perform a model run with openmpp immediately after compiling a model because I do not have a base model run. Currently, openmpp will abort if the workset object does not have a BaseRunDigest parameter that is set.

Would you be able to either make the BaseRunDigest requirement optional or remove it altogether?

When I remove the highlighted lines below from ClassWorkset.R, I'm able to successfully perform a model run without having a base run:

image

Take care, Joel

mattwarkentin commented 5 days ago

Thanks for opening the issue. Just so I can understand more, you don't need to reference a base model run because the compiled model includes all of the input parameters?

barnzilla commented 5 days ago

Yes, that's correct, Matt. I was chatting with Steve and Anatoly this afternoon and this is a feature of OpenM++ (as opposed to Modgen). A compiled model will have a base scenario in the database (but not a base run).

mattwarkentin commented 5 days ago

Okay, then I think it makes sense to make this optional. Let me think a little bit about how to make this change to respect backward compatibility. But generally happy to make this change.

barnzilla commented 5 days ago

Much appreciated, Matt! And no rush. I have a work-around that I'm using right now.

mattwarkentin commented 5 days ago

Sounds good. And thanks for reporting these bugs. I only get to see how openmpp is used by the users here in our group, so I definitely designed the package to be opinionated for our use cases but I want it to be flexible enough for any OpenM++ user.