Opened 9 years ago

Closed 8 years ago

#3812 closed enhancement (fixed)

Functions that depend on parameters should only get evaluated once

Reported by: Lennart Ochel Owned by: Patrick Täuber
Priority: high Milestone: Future
Component: Backend Version:
Keywords: Cc: Patrick Täuber, 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 by Lennart Ochel, 9 years ago

Status: newaccepted

comment:2 by Martin Sjölund, 9 years ago

Can the same be done for discrete-variability functions?

in reply to:  2 comment:3 by Lennart Ochel, 9 years ago

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 by Lennart Ochel, 9 years ago

To do this efficiently, we need to split up knownVars (PR636).

comment:5 by Patrick Täuber, 8 years ago

Owner: changed from Lennart Ochel to Patrick Täuber

comment:6 by Patrick Täuber, 8 years ago

Resolution: fixed
Status: acceptedclosed

With a919ef4 constant function calls are only evaluated once.

comment:7 by Patrick Täuber, 8 years ago

Resolution: fixed
Status: closedreopened

comment:8 by Patrick Täuber, 8 years ago

Resolution: fixed
Status: reopenedclosed

With ​2cb1d8f constant function calls are only evaluated once.

Note: See TracTickets for help on using tickets.