Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce calls to solve() function in ModelSystemImpl.cpp #21

Open
schmoelder opened this issue Mar 10, 2020 · 1 comment
Open

Reduce calls to solve() function in ModelSystemImpl.cpp #21

schmoelder opened this issue Mar 10, 2020 · 1 comment
Labels

Comments

@schmoelder
Copy link
Contributor

When solving a single column, the column’s solve() function is called at least twice. This is unnecessary for simple setups that don’t recycle. We could detect that, break the DAG (which otherwise is only a directed graph) up into parallel chunks and solve them from inlets to outlets.

@sleweke
Copy link
Contributor

sleweke commented May 14, 2020

A preliminary version is implemented in 28c6f5c.

The behavior is controlled by /input/model/solver/LINEAR_SOLUTION_MODE.
A value of 1 requests parallel solution of the unit operation models in the ModelSystem. If 2 is specified, sequential solution mode is used if the network is acyclic.
By default (/input/model/solver/LINEAR_SOLUTION_MODE = 0), sequential mode is used if the system has less than 6 unit operations and no cycles. Otherwise, parallel mode is chosen.

The solution mode is applied per switch_XYZ. That is, if sequential mode is selected by the user (/input/model/solver/LINEAR_SOLUTION_MODE = 0) but some switch_XYZ configurations contain cycles, these configurations are solved in parallel.

The acyclic graph is not divided into parallelizable chunks that are solved in parallel. This still needs to be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

3 participants