optimamodel / optima-tb

Optima TB-UCL model
GNU Lesser General Public License v3.0
2 stars 0 forks source link

Performance #84

Closed davidkedz closed 7 years ago

davidkedz commented 7 years ago

Transplants the program-impact deriving component of Model.updateValues() to its own once-calculated method. This is effectively preallocation, reducing the number of calls to interpolateFunc() and the expensive deepcopy within. A budget scenario or optimisation should now run a lot quicker.

critcortex commented 7 years ago

hey @davidkedz - I need to fix the conflicts, but even before those, I was getting unexpected behaviour - i.e. it wasn't successfully running on one branch, but was fine on the other. Will be digging a bit deeper and if necessary posting stack traces, but wanted to let you know that I have started on this PR

davidkedz commented 7 years ago

@critcortex: The presence of those conflicts was strange. Regardless, the performance branch had the right version in all cases, so I've resolved them via the web editor. For plotting.py, it was the addition of a default xlim so a plotting function did not crash. However, you'll probably go over plotting.py at some stage and check the defaults anyway. For programs.py, it was a whole lot of functionality extensions to allow arrays as inputs. Anyway, that's that for conflict resolution. Hopefully your tests will work now.

critcortex commented 7 years ago

All good - thanks!

critcortex commented 7 years ago

Apologies - this latest commit was supposed to go direct to develop ...