Closed bgyori closed 8 years ago
Although one could also argue that the only job of the assembler, as a class, is to retain a set of policies...similar to how the Preassembler's job is mainly to hold on to the enitity and modification hierarchies.
On Wed, Mar 30, 2016 at 2:02 PM, Benjamin M. Gyori <notifications@github.com
wrote:
At some point policies became an argument in the constructor of the PysbAssembler. Wouldn't it make sense to put that back as an argument of make_model? The assembler collects statements and we would want to be able to generate multiple models from the same statements using the assembler by applying different policies.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/sorgerlab/indra/issues/51
Yes but the assembler doesn't use the policies in any way before you call make_model. It has no effect on its state, it only affects the one-time execution of make_model.
Maybe it should be in both places? Something like initial conditions in a pysb model and the solver. A model has its own ICs but you can still pass a different IC vector to the solver. By analogy, we could give the PysbAssembler its own set of "base" policies which could be overridden (partially or totally) in the call to make_model.
I implemented a simple version of Jeremy's suggestion in 34e2aa98cad0a2b5148d0fca6f4ed5e67f0f0fcf This "locally" overwrites the policies if they are passed to make_model.
At some point policies became an argument in the constructor of the PysbAssembler. Wouldn't it make sense to put that back as an argument of make_model? The assembler collects statements and we would want to be able to generate multiple models from the same statements using the assembler by applying different policies.