-
Notifications
You must be signed in to change notification settings - Fork 56
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
Jd/add thermal time series #1162
Conversation
Performance Results
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1162 +/- ##
==========================================
- Coverage 76.40% 76.30% -0.10%
==========================================
Files 121 121
Lines 13089 13149 +60
==========================================
+ Hits 10000 10034 +34
- Misses 3089 3115 +26
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@rodrigomha and @sourabhdalvi take a look at the branch. I think this can benefit from more testing but this approach should suffice. @daniel-thom Can you confirm the use of |
I expect that this is substantially slower than the PSY 3.0 version because each call to has_time_series corresponds to one SQL query. It's probably the difference between nanoseconds and microseconds/low-milliseconds. If that is concerning, we could make a new function to get components with time series that makes a single SQL query. It could work with either get_components or an existing iterable of components. This depends on how many times the function will be called (how many components).
|
We need to figure this out because this is critical for NTP and other systems and we can't have this kind of performance hit since this is called multiple times in multiple places. We ought to put some other way to compute this property. |
Update README with docs link
This code was consuming a lot of time to lookup time series UUIDs when those values are already cached.
Use cached time series UUID
use service name in meta
Update Project.toml
…SIIP/PowerSimulations.jl into jd/add_thermal_time_series
@@ -11,7 +11,7 @@ get_variable_lower_bound(_, ::PSY.Component, __) = nothing | |||
get_variable_upper_bound(_, ::PSY.Component, __) = nothing | |||
|
|||
get_multiplier_value(x, y::PSY.Component, z) = | |||
error("Unable to get parameter $x for device $y for formulation $z") | |||
error("Unable to get parameter $x for device $(IS.summary(y)) for formulation $z") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we implement this as Base.summary
?
@@ -197,6 +197,10 @@ function _add_time_series_parameters!( | |||
device_names = String[] | |||
initial_values = Dict{String, AbstractArray}() | |||
for device in devices | |||
if !PSY.has_time_series(device, ts_type, ts_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently slower than you want because it involves a database search. Does this need to be made faster? It's only called once during build, right? If it should be cached, should that be here in PSI or in IS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also make this calls for some parameter updates. I think we should have a cache for this in IS.
closes #1153 partially. Still missing situations when this is mixed with dispatch models.
If the approach in this PR is ok, I will implement for dispatch models and two stage simulations.
closes #1174 also by necessity