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

Document HybridSystem forecast data #29

Open
rodrigomha opened this issue Mar 14, 2023 · 2 comments
Open

Document HybridSystem forecast data #29

rodrigomha opened this issue Mar 14, 2023 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@rodrigomha
Copy link
Collaborator

rodrigomha commented Mar 14, 2023

Basically, when creating a HybridSystem from components already that has a time_series, the process requires to:

  • first get the timeseries from the subcomponents and copy those
  • remove the subcomponents from the system
  • create the hybrid system with the subcomponents
  • attach the forecast to each subcomponent

(I think?)

@rodrigomha rodrigomha added the documentation Improvements or additions to documentation label Mar 14, 2023
@daniel-thom
Copy link

@rodrigomha You should be able to call add_component!(sys, hybrid) and the the code will do everything required because of the method below, which gets called during the add. These behaviors should definitely be documented.

function handle_component_addition!(
    sys::System,
    subsystem::StaticInjectionSubsystem;
    kwargs...,
)
    for subcomponent in get_subcomponents(subsystem)
        if is_attached(subcomponent, sys)
            IS.mask_component!(sys.data, subcomponent)
            copy_subcomponent_time_series!(subsystem, subcomponent)
        else
            IS.add_masked_component!(sys.data, subcomponent)
        end
    end
end

@rodrigomha
Copy link
Collaborator Author

@rodrigomha You should be able to call add_component!(sys, hybrid) and the the code will do everything required because of the method below, which gets called during the add. These behaviors should definitely be documented.

function handle_component_addition!(
    sys::System,
    subsystem::StaticInjectionSubsystem;
    kwargs...,
)
    for subcomponent in get_subcomponents(subsystem)
        if is_attached(subcomponent, sys)
            IS.mask_component!(sys.data, subcomponent)
            copy_subcomponent_time_series!(subsystem, subcomponent)
        else
            IS.add_masked_component!(sys.data, subcomponent)
        end
    end
end

Thanks Dan. Yeah, I was not aware that adding the hybrid immediately remove the subcomponents for the system.

@jd-lara jd-lara transferred this issue from NREL-Sienna/PowerSystems.jl Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants