Skip to content

Update DERA output and minor fixes #302

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

Merged
merged 4 commits into from
Dec 19, 2022
Merged

Update DERA output and minor fixes #302

merged 4 commits into from
Dec 19, 2022

Conversation

rodrigomha
Copy link
Contributor

The change include an error for DynamicInjection cases.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

Performance Results

Version Precompile Time
Master 10.045166857
This Branch 10.018774848
Version Run Time
Master-Build ResidualModel 8.313738172
Master-Execute ResidualModel 52.509160697
Master-Build MassMatrixModel 0.972340119
Master-Execute MassMatrixModel 44.613301994
This Branch-Build ResidualModel 8.154493507
This Branch-Execute ResidualModel 51.408030393
This Branch-Build MassMatrixModel 0.997965732
This Branch-Execute MassMatrixModel 44.109011082

ResidualModel and MassMatrixModel performance results should be compared between versions and not between models due to the execution order of the tests

@codecov
Copy link

codecov bot commented Dec 5, 2022

Codecov Report

Merging #302 (dc76275) into master (30cc1fc) will increase coverage by 0.63%.
The diff coverage is 92.72%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #302      +/-   ##
==========================================
+ Coverage   90.16%   90.80%   +0.63%     
==========================================
  Files          63       63              
  Lines        7637     7634       -3     
==========================================
+ Hits         6886     6932      +46     
+ Misses        751      702      -49     
Flag Coverage Δ
unittests 90.80% <92.72%> (+0.63%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/post_processing/post_proc_generator.jl 98.74% <90.90%> (-0.98%) ⬇️
src/initialization/init_device.jl 96.83% <100.00%> (+<0.01%) ⬆️
src/models/device.jl 94.32% <100.00%> (-0.12%) ⬇️
src/base/simulation.jl 87.80% <0.00%> (+0.84%) ⬆️
src/base/perturbations.jl 59.02% <0.00%> (+9.02%) ⬆️

Copy link
Collaborator

@m-bossart m-bossart left a comment

Choose a reason for hiding this comment

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

This change looks good. The DERA model is currently not fully complete --- the low and high voltage / frequency tripping and reconnection logic is not yet implemented. We had some discussion a while back and I think the conclusion was the capability did not yet exist to properly implement these timer based functionalities without major new features in PSID. Should there be a warning with this model? Should it be documented?

@rodrigomha
Copy link
Contributor Author

This change looks good. The DERA model is currently not fully complete --- the low and high voltage / frequency tripping and reconnection logic is not yet implemented. We had some discussion a while back and I think the conclusion was the capability did not yet exist to properly implement these timer based functionalities without major new features in PSID. Should there be a warning with this model? Should it be documented?

The warning that we currently have when constructing the Simulation is sufficient for now IMO

Copy link
Member

@jd-lara jd-lara left a comment

Choose a reason for hiding this comment

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

There is change in the setters but I don't get why the change if we don't use it.

@@ -571,6 +571,7 @@ function initialize_dynamic_device!(
end

set_P_ref(dynamic_wrapper, Pref)
PSY.set_P_ref!(dynamic_device, Pref)
Copy link
Member

Choose a reason for hiding this comment

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

we need to either fix all the setters or not overload this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is part of a major issue related with output results that we would need to properly fix once we do a restructure of output results.

I need to add this line because I need Pref to compute the output current, but I don't have access to the wrapper in the simulation outputs, that is the one that has the information about Pref. So I overload this info in the initialization.

This creates another problem though, because if we change Pref from a callback, only the information stored in the wrapper will change (and hence correctly in the simulation), but the output result will not change. We would need to correct this, since is similar as the issue #269

@jd-lara jd-lara added the enhancement New feature or request label Dec 6, 2022
@jd-lara jd-lara merged commit 5b18600 into master Dec 19, 2022
@jd-lara jd-lara deleted the rh/fix_DERA_outputs branch January 6, 2023 22:58
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

Successfully merging this pull request may close these issues.

3 participants