CryPTSys / PharmaPy

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

New changes relating state naming, connectivity and plotting #34

Closed dcasasor-purdue closed 2 years ago

dcasasor-purdue commented 2 years ago

Changes in this pull request can be categorized in two groups:

  1. Plotting
  2. Connectivity/naming

The main effort here is making state naming consistent, in such a way that connectivity is clearer and plotting is facilitated. These changes will render the syntax self.<>Prof outdated. This way of accessing won't be supported by PharmaPy in the near future, and will be changed by uo.dynamic_result.<state_name>, where the available state names <state_name> can be read by doing print(uo.states_di.dynamic_result.

retrieve_results and plot_profiles methods will be significantly simplified for all the UOs under to new conventions, but that cleaning needs to be done very carefully (and patiently) in order to keep things in order.

Last changes were tested on the scripts for our last design paper (batch, hybrid and continuous flowsheets) and results seem to be consistent (dynamic plots and optimal costs/constraints using optimal x). A closer inspection and comparison of those results need to be done to make sure everything is close enough to what we had before.