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

Refactor to avoid code repetition in psitest_library.jl #66

Open
GabrielKS opened this issue Oct 16, 2023 · 3 comments
Open

Refactor to avoid code repetition in psitest_library.jl #66

GabrielKS opened this issue Oct 16, 2023 · 3 comments
Labels
good first issue Good for newcomers

Comments

@GabrielKS
Copy link
Collaborator

GabrielKS commented Oct 16, 2023

The psitest_library.jl file is rather repetitive. In particular, the handling of the add_forecasts and other flags is very similar across different systems, sometimes involving identical blocks of code.

@GabrielKS
Copy link
Collaborator Author

As a concrete example, the exact block

for t in 1:2
    ini_time = TimeSeries.timestamp(load_timeseries_DA[t][ix])[1]
    forecast_data[ini_time] = load_timeseries_DA[t][ix]
end

appears fourteen times, plus another seven for the same thing without prefixing timestamp.

@GabrielKS GabrielKS added the good first issue Good for newcomers label Feb 21, 2024
@GabrielKS
Copy link
Collaborator Author

Another concrete example: search for PSY.set_variable_cost!.

@GabrielKS
Copy link
Collaborator Author

ini_time = TimeSeries.timestamp(ORDC_cost_ts[t])[1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant