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

variable costs pricing #215

Merged
merged 8 commits into from
Nov 1, 2024
Merged

variable costs pricing #215

merged 8 commits into from
Nov 1, 2024

Conversation

stefansc1
Copy link
Collaborator

Add pricing strategy variable_costs. Not a charging strategy, but takes procurement and commodity costs from given price_list instead of fixed from price_sheet.
Also some minor refactoring in costs.py: remove backslashes, more lenient PV warning.

@j-brendel
Copy link
Collaborator

Right now the assumtion seems to be that "procurement" is always given in "price_list".

However, the assumtion should be that either one of "procurement" or "commodity" or both exist.
In none of both columns/dict entrys exist, the cost_calculation should abort with an error "variable price method chosen, but neither variable procurement nor commodity prices given".
If one of both does not exist, the valid parameter should be taken from the price_sheet/ cost_params in the same way as in the "fixed" cost strategies.

stefan.schirmeister added 4 commits October 17, 2024 15:53
When giving price_list as dict, procurement and commodity costs are optional, but at least one must be given.
Added test.
Copy link
Collaborator

@j-brendel j-brendel left a comment

Choose a reason for hiding this comment

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

beautiful!

@j-brendel j-brendel merged commit d593930 into dev Nov 1, 2024
2 checks passed
@j-brendel j-brendel deleted the feature/variable_costs branch November 1, 2024 13:12
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