CryPTSys / PharmaPy

A numerical platform for the digital design of pharmaceutical processes
Other
23 stars 14 forks source link

Fixing the get_inputs function #25

Closed dcasasor-purdue closed 2 years ago

dcasasor-purdue commented 2 years ago

This is a long overdue change in PharmaPy. The current get_inputs function has the form get_inputs(time, uo_object, num_species, num_distrib). This has two problems:

  1. If the inputs to a UO are to be determined after running a simulation, the get_inputs function needs to be separately imported from PharmaPy.Connections, and then the UO object needs to be passed as an argument. This is a very cumbersome and non practical way of determining inputs
  2. The current get_inputs function is not comprehensive in terms of what type of inlet streams there are in PharmaPy (one with DynamicInlet, or containing data from an upstream UO, or not data at all)

For this reason, I'm changing the internal syntax, which will also skip the need for an InterpolateInputs method inside each Stream object in PharmaPy. Additionally, a wrapper of get_inputs will be implemented in each UO, so one can determine its inputs in a much easier and cleaner way as UO.get_inputs(time)

dcasasor-purdue commented 2 years ago

Hey @dlakes94 , I think this would be a good opportunity to create our first test. I think this is a significant change that should be contrasted with results that we already know