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

(Internal development:) use a function to calculate locational marginal prices #557

Closed
cfe316 opened this issue Oct 9, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@cfe316
Copy link
Collaborator

cfe316 commented Oct 9, 2023

Many times in various write_output functions, the value

dual.(EP[:cPowerBalance])./inputs["omega"]*scale_factor

is computed. It would be great to put this in a function

function locational_marginal_prices(EP, inputs, setup)

that returns some data structure (Matrix? DataFrame?) of prices. Potentially it would be even better if this calculation were cached somehow.

This could make several output functions simpler and easier to understand.

@xuqingyu
Copy link
Collaborator

xuqingyu commented Oct 9, 2023

Isn't it write_price.jl?

@cfe316
Copy link
Collaborator Author

cfe316 commented Oct 9, 2023

Well of course that function writes them, but I think it would be much more useful to separate calculating and writing, in order to not have to pass dfPrice back to many other write_xxx functions (and then navigate getting data out of that dataframe).

@xuqingyu
Copy link
Collaborator

xuqingyu commented Oct 9, 2023

Ah, I think I have done that in my branch. If anyone of you actually is working on removing dfPrice from each writing_xxx, check my branch out for an example.

@xuqingyu
Copy link
Collaborator

xuqingyu commented Oct 9, 2023

My branch is Dev_newCO2. I think there are only several places that use dfPrice, right? Maybe we should start with counting how many places are with dfPrice.

@cfe316 cfe316 added the enhancement New feature or request label Oct 13, 2023
@cfe316
Copy link
Collaborator Author

cfe316 commented Nov 28, 2023

This is now completed.

@cfe316 cfe316 closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants