Robbybp / surrogate-vs-implicit

Comparing surrogate models and implicit function formulations for chemical process models
Other
1 stars 0 forks source link

Profile and debottleneck validation #19

Open Robbybp opened 5 months ago

Robbybp commented 5 months ago

With recent performance improvements in solve_strongly_connected_components, this is no longer the bottleneck in data-validation, especially if https://github.com/Pyomo/pyomo/pull/3190 is used. However, validating a single set of inputs is still slower than I would like. I see the following runtime breakdown:

Identifier   ncalls   cumtime   percall      %
----------------------------------------------
make-model        1     2.267     2.267   17.3
post-solve        1     0.411     0.411    3.1
solve-scc         1     2.062     2.062   15.7
validate          1     8.374     8.374   63.9
==============================================

Validation is quite a bit slower than I would expect, and I suspect this is because we're not exploiting named expressions when evaluating expression in Pyomo. We should confirm this, then possibly try to fix it.