Opened 8 years ago
Closed 7 years ago
#3812 closed enhancement (fixed)
Functions that depend on parameters should only get evaluated once
Reported by: | lochel | Owned by: | ptaeuber |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | |
Keywords: | Cc: | ptaeuber, jhagemann@… |
Description
In certain cases, function evaluations is a bottleneck in simulation performance. Therefore, function calls should only get evaluated if necessary. Some of this optimizations are already implemented in the optimization module wrapFunctionCalls. However, there are still function calls which depend on parameter expressions and get evaluated for each simulation step. This is totally unnecessary.
Change History (8)
comment:1 Changed 8 years ago by lochel
- Status changed from new to accepted
comment:2 follow-up: ↓ 3 Changed 8 years ago by sjoelund.se
comment:3 in reply to: ↑ 2 Changed 8 years ago by lochel
Replying to sjoelund.se:
Can the same be done for discrete-variability functions?
I have that in mind as well. However, that would require different changes and thus it's a different story. I have plans to split the simulation into continuous simulation and discrete simulation which would solve this issue in a nice way.
comment:4 Changed 8 years ago by lochel
To do this efficiently, we need to split up knownVars (PR636).
comment:5 Changed 7 years ago by ptaeuber
- Owner changed from lochel to ptaeuber
comment:6 Changed 7 years ago by ptaeuber
- Resolution set to fixed
- Status changed from accepted to closed
With a919ef4 constant function calls are only evaluated once.
comment:7 Changed 7 years ago by ptaeuber
- Resolution fixed deleted
- Status changed from closed to reopened
comment:8 Changed 7 years ago by ptaeuber
- Resolution set to fixed
- Status changed from reopened to closed
With 2cb1d8f constant function calls are only evaluated once.
Can the same be done for discrete-variability functions?