Skip to content

Test case for re-using problem class - #524

Open
FJanssen-TNO wants to merge 5 commits into
mainfrom
test_reuse_problem_class
Open

Test case for re-using problem class#524
FJanssen-TNO wants to merge 5 commits into
mainfrom
test_reuse_problem_class

Conversation

@FJanssen-TNO

Copy link
Copy Markdown
Collaborator

For specific workflows or cases where the same problem class and ESDL can be used multiple times, example being a rolling horizon optimization. This reduces the time spent in initialising the problem. Timeseries, indexing and many settings can still be updated.

start_index=10,
end_index=20,
)
np.testing.assert_allclose(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the heating demand profile differs for problem 1 and 2, which is also nice because the start and end index is then also applicable. So what about adding a check that problem_1.objective_value != problem_2.objective_value and that the heat demand differs for some timesteps between these 2 problems?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added checks that the heat demand is matched, therefore also update the heat demand matching test to take the proper indices and added the check that the objective values of problem 1 and 2 should be different. If the objective values are different than the heat demand is different also different.

@KobusVanRooyen

Copy link
Copy Markdown
Collaborator

@FJanssen-TNO review has been completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants