Internals
Index
EnergyModelsGUI.AbstractGUIObjEnergyModelsGUI.AbstractSystemEnergyModelsGUI.ConnectionEnergyModelsGUI.EnergySystemIteratorEnergyModelsGUI.NothingElementEnergyModelsGUI.ProcInvDataEnergyModelsGUI.SystemEnergyModelsGUI.SystemGeoBase.iterateEnergyModelsBase.get_elements_vecEnergyModelsBase.get_linksEnergyModelsBase.get_nodesEnergyModelsBase.get_productsEnergyModelsBase.get_time_structEnergyModelsBase.get_time_structEnergyModelsBase.get_time_structEnergyModelsGUI._type_to_headerEnergyModelsGUI.add_component!EnergyModelsGUI.add_description!EnergyModelsGUI.add_description!EnergyModelsGUI.add_description!EnergyModelsGUI.add_description!EnergyModelsGUI.add_inspector_to_poly!EnergyModelsGUI.adjust_limits!EnergyModelsGUI.alignEnergyModelsGUI.angleEnergyModelsGUI.angle_differenceEnergyModelsGUI.boxEnergyModelsGUI.clear_selectionEnergyModelsGUI.closeEnergyModelsGUI.connect!EnergyModelsGUI.connect!EnergyModelsGUI.convert_arrayEnergyModelsGUI.create_descriptionEnergyModelsGUI.create_labelEnergyModelsGUI.create_makie_objectsEnergyModelsGUI.define_event_functionsEnergyModelsGUI.design_fileEnergyModelsGUI.draw_box!EnergyModelsGUI.draw_icon!EnergyModelsGUI.draw_label!EnergyModelsGUI.export_svgEnergyModelsGUI.export_to_fileEnergyModelsGUI.export_to_replEnergyModelsGUI.export_xlsxEnergyModelsGUI.export_xlsxEnergyModelsGUI.extract_data_selectionEnergyModelsGUI.extract_svgEnergyModelsGUI.find_iconEnergyModelsGUI.find_min_max_coordinatesEnergyModelsGUI.find_min_max_coordinatesEnergyModelsGUI.find_type_fieldEnergyModelsGUI.format_numberEnergyModelsGUI.get_EMGUI_objEnergyModelsGUI.get_JuMP_dictEnergyModelsGUI.get_JuMP_namesEnergyModelsGUI.get_all_periods!EnergyModelsGUI.get_available_dataEnergyModelsGUI.get_axEnergyModelsGUI.get_axesEnergyModelsGUI.get_buttonEnergyModelsGUI.get_capexEnergyModelsGUI.get_changeEnergyModelsGUI.get_childrenEnergyModelsGUI.get_colorEnergyModelsGUI.get_colorsEnergyModelsGUI.get_combinationsEnergyModelsGUI.get_componentsEnergyModelsGUI.get_connectionsEnergyModelsGUI.get_connectionsEnergyModelsGUI.get_dataEnergyModelsGUI.get_default_colorsEnergyModelsGUI.get_designEnergyModelsGUI.get_elementEnergyModelsGUI.get_elementEnergyModelsGUI.get_elementEnergyModelsGUI.get_element_labelEnergyModelsGUI.get_figEnergyModelsGUI.get_fileEnergyModelsGUI.get_fromEnergyModelsGUI.get_hover_stringEnergyModelsGUI.get_iconEnergyModelsGUI.get_inv_dataEnergyModelsGUI.get_inv_dataEnergyModelsGUI.get_inv_timesEnergyModelsGUI.get_investment_timesEnergyModelsGUI.get_jump_axis_typesEnergyModelsGUI.get_legendEnergyModelsGUI.get_linestyleEnergyModelsGUI.get_linestyleEnergyModelsGUI.get_linestyleEnergyModelsGUI.get_linked_nodes!EnergyModelsGUI.get_max_installedEnergyModelsGUI.get_menuEnergyModelsGUI.get_menusEnergyModelsGUI.get_mode_to_transmission_mapEnergyModelsGUI.get_modelEnergyModelsGUI.get_nested_valueEnergyModelsGUI.get_nth_fieldEnergyModelsGUI.get_obj_valueEnergyModelsGUI.get_opEnergyModelsGUI.get_parentEnergyModelsGUI.get_parentEnergyModelsGUI.get_parentEnergyModelsGUI.get_periodsEnergyModelsGUI.get_plotablesEnergyModelsGUI.get_plotsEnergyModelsGUI.get_plotsEnergyModelsGUI.get_plotted_dataEnergyModelsGUI.get_ref_elementEnergyModelsGUI.get_ref_elementEnergyModelsGUI.get_repr_dictEnergyModelsGUI.get_representative_period_indicesEnergyModelsGUI.get_resource_colorsEnergyModelsGUI.get_resource_colorsEnergyModelsGUI.get_resource_colorsEnergyModelsGUI.get_results_legendEnergyModelsGUI.get_root_designEnergyModelsGUI.get_scenario_indicesEnergyModelsGUI.get_screenEnergyModelsGUI.get_sector_pointsEnergyModelsGUI.get_selected_plotsEnergyModelsGUI.get_selected_systemsEnergyModelsGUI.get_selection_colorEnergyModelsGUI.get_supertypesEnergyModelsGUI.get_systemEnergyModelsGUI.get_text_alignmentEnergyModelsGUI.get_time_axisEnergyModelsGUI.get_toEnergyModelsGUI.get_toggleEnergyModelsGUI.get_topo_legendEnergyModelsGUI.get_total_sum_timeEnergyModelsGUI.get_valuesEnergyModelsGUI.get_varEnergyModelsGUI.get_varsEnergyModelsGUI.get_vis_plotsEnergyModelsGUI.get_visible_dataEnergyModelsGUI.get_wallEnergyModelsGUI.get_xyEnergyModelsGUI.getfirstEnergyModelsGUI.has_investedEnergyModelsGUI.includes_areaEnergyModelsGUI.initialize_available_data!EnergyModelsGUI.initialize_plot!EnergyModelsGUI.installedEnergyModelsGUI.l2_normEnergyModelsGUI.merge_dictsEnergyModelsGUI.merge_svg_stringsEnergyModelsGUI.mouse_within_axisEnergyModelsGUI.nested_eltypeEnergyModelsGUI.new_global_delta_hEnergyModelsGUI.parse_caseEnergyModelsGUI.pick_component!EnergyModelsGUI.pixel_to_dataEnergyModelsGUI.place_nodes_in_circleEnergyModelsGUI.plot_design!EnergyModelsGUI.print_nested_structure!EnergyModelsGUI.results_availableEnergyModelsGUI.save_designEnergyModelsGUI.save_designEnergyModelsGUI.scroll_ylimEnergyModelsGUI.select_data!EnergyModelsGUI.square_intersectionEnergyModelsGUI.square_intersectionEnergyModelsGUI.sub_systemEnergyModelsGUI.toggle_inspector!EnergyModelsGUI.toggle_selection_color!EnergyModelsGUI.transfer_modelEnergyModelsGUI.update!EnergyModelsGUI.update!EnergyModelsGUI.update!EnergyModelsGUI.update!EnergyModelsGUI.update_available_data_menu!EnergyModelsGUI.update_axis!EnergyModelsGUI.update_barplot_dodge!EnergyModelsGUI.update_descriptive_names!EnergyModelsGUI.update_distances!EnergyModelsGUI.update_info_box!EnergyModelsGUI.update_legend!EnergyModelsGUI.update_limits!EnergyModelsGUI.update_limits!EnergyModelsGUI.update_plot!EnergyModelsGUI.update_plot!EnergyModelsGUI.update_plot!EnergyModelsGUI.update_plot!EnergyModelsGUI.update_sub_system_locations!EnergyModelsGUI.update_title!
Types
EnergyModelsGUI.AbstractGUIObj — TypeAbstractGUIObjSupertype for EnergyModelsGUI objects representing Nodes/Links/Areas/Transmissions.
EnergyModelsGUI.AbstractSystem — TypeAbstractSystemSupertype for EnergyModelsGUI objects representing a sub system of a Case.
EnergyModelsGUI.Connection — TypeConnection <: AbstractGUIObjMutable type for providing a flexible data structure for connections between EnergySystemDesigns.
Fields
from::EnergySystemDesignis theEnergySystemDesignfrom which the connection originates.to::EnergySystemDesignis theEnergySystemDesignto which the connection is linked to.connection::AbstractElementis the EMX connection structure.colors::Vector{RGB}is the associated colors of the connection.plots::Vector{Any}is a vector with all Makie object associated with this object.invest_data::ProcInvDatastores processed investment data.
EnergyModelsGUI.EnergySystemIterator — TypeEnergySystemIteratorType for iterating over nested EnergySystemDesign structures, enabling recursion through AbstractGUIObjs.
Fields
stack::Vector{<:AbstractGUIObj}is the stack used to manage the iteration through the nestedEnergySystemDesigncomponents (and its connections). It starts with the initialEnergySystemDesignobject and progressively includes its subcomponents as the iteration proceeds.
EnergyModelsGUI.NothingElement — TypeNothingElement <: AbstractElementType for representing an empty Element (the "nothing" element).
EnergyModelsGUI.ProcInvData — TypeProcInvDataType for storing processed investment data.
Fields
inv_times::Vector{String}is a vector of formatted strings for added investments.capex::Vector{Number}contains the capex of all times with added investments.invested::Boolindicates if the element has been invested in.
EnergyModelsGUI.System — TypeSystemType for storing processed system data from EnergyModelsBase.
Fields
T::TimeStructureis the time structure of the model.products::Vector{<:Resource}are the resources that should be incorporated into the model.elements::Vector{Vector}are the vectors ofAbstractElementthat should be included in the analysis.children::Vector{<:EMB.Node}are the children of the system.connections::Vector{<:Link}are the connections between system parts.parent::AbstractElementis the parent of the system (e.g., theAreanode of the referenceGeoAvailabilitynode).ref_element::AbstractElementis the reference element of the system (firstAvailabilitynode).
EnergyModelsGUI.SystemGeo — TypeSystemGeoType for storing processed system data from EnergyModelsGeography.
Fields
T::TimeStructureis the time structure of the model.products::Vector{<:Resource}are the resources that should be incorporated into the model.elements::Vector{Vector}are the vectors ofAbstractElementthat should be included in the analysis.children::Vector{<:EMB.Node}are the children of the system.connections::Vector{<:Link}are the connections between system parts.parent::AbstractElementis the parent of the system.ref_element::AbstractElementis the reference element of the system.
Functions
Base.iterate — Functioniterate(itr::EnergySystemIterator)Initialize the iteration over an EnergySystemIterator, returning the first EnergySystemDesign object in the stack and the iterator itself. If the stack is empty, return nothing.
EnergyModelsBase.get_elements_vec — MethodEMB.get_elements_vec(system::AbstractSystem)Returns the vector of element-vectors of the AbstractSystem system.
EnergyModelsBase.get_links — MethodEMB.get_links(system::AbstractSystem)Returns the links of a AbstractSystem system.
EnergyModelsBase.get_nodes — MethodEMB.get_nodes(system::AbstractSystem)Returns the nodes of a AbstractSystem system.
EnergyModelsBase.get_products — MethodEMB.get_products(system::AbstractSystem)Returns the vector of products of the AbstractSystem system.
EnergyModelsBase.get_time_struct — MethodEMB.get_time_struct(system::AbstractSystem)Returns the time structure of the AbstractSystem system.
EnergyModelsBase.get_time_struct — MethodEMB.get_time_struct(design::EnergySystemDesign)Returns the time structure of the EnergySystemDesign design.
EnergyModelsBase.get_time_struct — MethodEMB.get_time_struct(gui::GUI)Returns the time structure of the GUI gui.
EnergyModelsGUI._type_to_header — Method_type_to_header(::Type{<:TS.AbstractStrategicPeriod})
_type_to_header(::Type{<:TS.AbstractRepresentativePeriod})
_type_to_header(::Type{<:TS.AbstractOperationalScenario})
_type_to_header(::Type{<:TS.TimePeriod})
_type_to_header(::Type{<:TS.TimeStructure})
_type_to_header(::Type{<:Resource})
_type_to_header(::Type{<:AbstractElement})Map types to header symbols for saving results.
EnergyModelsGUI.add_component! — Methodadd_component!(gui::GUI, component::EnergySystemDesign)Draw a box containing the icon and add a label with the id of the EnergySystemDesign component with its type in parantheses.
EnergyModelsGUI.add_description! — Methodadd_description!(
field::Any,
name::String,
::String,
pre_desc::String,
element,
available_data::Vector{Dict},
gui::GUI,
)Loop through all struct fieldnames of field (i.e.,for the field level of type NoStartInvData) and update available_data with an added description.
EnergyModelsGUI.add_description! — Methodadd_description!(
field::Dict,
name::String,
key_str::String,
pre_desc::String,
selection::Vector,
available_data::Vector{Dict},
gui::GUI,
)Loop through all dictnames for a field of type Dict (e.g. for the field penalty having the keys :deficit and surplus) and update available_data with an added description.
EnergyModelsGUI.add_description! — Methodadd_description!(
field::TS.TimeProfile,
name::String,
key_str::String,
pre_desc::String,
selection::Vector,
available_data::Vector{Dict},
gui::GUI,
)Create a container with a description, and add container to available_data.
EnergyModelsGUI.add_description! — Methodadd_description!(
field::Vector,
name::String,
key_str::String,
pre_desc::String,
selection::Vector,
available_data::Vector{Dict},
gui::GUI,
)Loop through all elements of field of type Vector (i.e.,for the field data) and update available_data with an added description.
EnergyModelsGUI.add_inspector_to_poly! — Methodadd_inspector_to_poly!(p::Makie.AbstractPlot, inspector_label::Function)Add inspector_label for Poly and Mesh plots in plot p.
EnergyModelsGUI.adjust_limits! — Methodadjust_limits!(gui::GUI)Adjust the limits of get_axes(gui)[:topo] based on its content.
EnergyModelsGUI.align — Methodalign(gui::GUI, align::Symbol)Align components in get_selected_systems(gui) based on the value of Symbol align.
The following values are allowed
:horizontalfor horizontal alignment.:verticalfor vertical alignment.
EnergyModelsGUI.angle — Methodangle(node_1::EnergySystemDesign, node_2::EnergySystemDesign)Based on the location of node_1 and node_2, return the angle between the x-axis and node_2 with node_1 being the origin.
EnergyModelsGUI.angle_difference — Methodangle_difference(angle1, angle2)Compute the difference between two angles.
EnergyModelsGUI.box — Methodfunction box(x, y, Δ)Get the coordinates of a box with half side lengths Δ and centered at (x,y) starting at the upper right corner.
EnergyModelsGUI.clear_selection — Methodclear_selection(gui::GUI; clear_topo=true, clear_results=true)Clear the color selection of components within 'getdesign(gui)' instance and reset the `getselected_systems(gui)` variable.
EnergyModelsGUI.close — Methodclose(gui::GUI)Closes the GUI gui.
EnergyModelsGUI.connect! — Methodconnect!(gui::GUI, connection::Connection, two_way::Bool)When a boolean argument two_way is specified, draw the lines in both directions.
EnergyModelsGUI.connect! — Methodconnect!(gui::GUI, design::EnergySystemDesign)Draws lines between connected nodes/areas in GUI gui using EnergySystemDesign design.
EnergyModelsGUI.convert_array — Methodconvert_array(v::AbstractArray, dict::Dict)Apply the transformation of the dict to the array v.
EnergyModelsGUI.create_description — Methodcreate_description(
gui::GUI,
key_str::String;
pre_desc::String="",
)Create description from get_var(gui,:descriptive_names) if available
EnergyModelsGUI.create_label — Methodcreate_label(selection::Vector{Any})Return a label for a given selection to be used in the getmenus(gui)[:availabledata] menu.
EnergyModelsGUI.create_makie_objects — Methodcreate_makie_objects(vars::Dict, design::EnergySystemDesign)Create Makie figure and all its objects (buttons, menus, toggles and axes) for EnergySystemDesign design and the options vars.
EnergyModelsGUI.define_event_functions — Methoddefine_event_functions(gui::GUI)Define event functions (handling button clicks, plot updates, etc.) for the GUI gui.
EnergyModelsGUI.design_file — Methoddesign_file(system::AbstractSystem, path::String)Construct the path for the .yml file for system in the folder path.
EnergyModelsGUI.draw_box! — Methoddraw_box!(gui::GUI, design::EnergySystemDesign)Draw a box for EnergySystemDesign design and it's appearance, including style, color, size.
EnergyModelsGUI.draw_icon! — Methoddraw_icon!(gui::GUI, design::EnergySystemDesign)Draw an icon for EnergySystemDesign design.
EnergyModelsGUI.draw_label! — Methoddraw_label!(gui::GUI, component::EnergySystemDesign)Add a label to an EnergySystemDesign component.
EnergyModelsGUI.export_svg — Methodexport_svg(ax::Makie.Block, filename::String)Export the ax to a .svg file with path given by filename.
EnergyModelsGUI.export_to_file — Methodexport_to_file(gui::GUI)Export results based on the state of gui to a file located within the folder specified through the path_to_results keyword of GUI.
EnergyModelsGUI.export_to_repl — Methodexport_to_repl(gui::GUI)Export results based on the state of gui to the REPL.
EnergyModelsGUI.export_xlsx — Methodexport_xlsx(gui::GUI, filename::String)Export the JuMP fields to an xlsx file with path given by filename.
EnergyModelsGUI.export_xlsx — Methodexport_xlsx(plots::Vector, filename::String, xlabel::Symbol)Export the plots to a .xlsx file with path given by filename and top header xlabel.
EnergyModelsGUI.extract_data_selection — Methodextract_data_selection(var::SparseVars, selection::Vector, i_T::Int64, periods::Vector)
extract_data_selection(var::Jump.Containers.DenseAxisArray, selection::Vector, i_T::Int64, ::Vector)
extract_data_selection(var::DataFrame, selection::Vector, ::Int64, ::Vector)Extract data from var having its time dimension at index i_T for all time periods in periods.
EnergyModelsGUI.extract_svg — Methodextract_svg(svg_string)Extracts the raw SVG content from the representation.
EnergyModelsGUI.find_icon — Methodfind_icon(system::AbstractSystem, id_to_icon_map::Dict)Find the icon associated with a given system's node id utilizing the mapping provided through id_to_icon_map.
EnergyModelsGUI.find_min_max_coordinates — Methodfind_min_max_coordinates(
design::EnergySystemDesign,
min_x::Number,
max_x::Number,
min_y::Number,
max_y::Number
)Find the minimum and maximum coordinates of the components of EnergySystemDesign design given the minimum and maximum coordinates min_x, min_y, max_x, and max_y.
EnergyModelsGUI.find_min_max_coordinates — Methodfind_min_max_coordinates(design::EnergySystemDesign)Find the minimum and maximum coordinates of the components of EnergySystemDesign design.
EnergyModelsGUI.find_type_field — Methodfind_type_field(dict::Dict, x::Any)Return closest supertype of a key being of same type as x.
EnergyModelsGUI.format_number — Methodformat_number(x::Number)Format number x to two decimals and add thousands seperators (comma).
EnergyModelsGUI.get_EMGUI_obj — Methodget_EMGUI_obj(plt)Get the EnergySystemDesign/Connection assosiated with plt. Note that due to the nested structure of Makie, we must iteratively look through up to three nested layers to find where this object is stored.
EnergyModelsGUI.get_JuMP_dict — Methodget_JuMP_dict(model::Model)
get_JuMP_dict(model::Dict)Get the dictionary of the model results. If the model is a JuMP.Model, it returns the object dictionary.
EnergyModelsGUI.get_JuMP_names — Methodget_JuMP_names(gui::GUI)Get all names registered in the model as a vector except the names to be ignored.
EnergyModelsGUI.get_all_periods! — Methodget_all_periods!(vec::Vector, ts::TwoLevel)
get_all_periods!(vec::Vector, ts::RepresentativePeriods)
get_all_periods!(vec::Vector, ts::OperationalScenarios)
get_all_periods!(vec::Vector, ts::Any)Get all TimeStructures in ts and append them to vec.
EnergyModelsGUI.get_available_data — Methodget_available_data(gui::GUI)Get the vector of containers for the available data from the gui.
EnergyModelsGUI.get_ax — Methodget_ax(gui::GUI, ax_name::Symbol)Returns the ax object with name ax_name of a GUI gui.
EnergyModelsGUI.get_axes — Methodget_axes(gui::GUI)Returns the axes field of a GUI gui.
EnergyModelsGUI.get_button — Methodget_button(gui::GUI, button_name::Symbol)Returns the button with name button_name of a GUI gui.
EnergyModelsGUI.get_capex — Methodget_capex(data::ProcInvData)
get_capex(design::AbstractGUIObj)Returns the capex of the investments of a ProcInvData/AbstractGUIObj object data.
EnergyModelsGUI.get_change — Methodget_change(::GUI, ::Val)Handle different keyboard inputs (events) and return changes in x, y coordinates in the design object gui.
EnergyModelsGUI.get_children — Methodget_children(system::AbstractSystem)Returns the parent field of a AbstractSystem system.
EnergyModelsGUI.get_color — Methodget_color(design::EnergySystemDesign)Returns the color field of a EnergySystemDesign design.
EnergyModelsGUI.get_colors — Methodget_colors(conn::Connection)Returns the colors field of a Connection conn.
EnergyModelsGUI.get_combinations — Methodget_combinations(var::SparseVars, i_T::Int)
get_combinations(var::JuMP.Containers.DenseAxisArray, i_T::Int)
get_combinations(var::DataFrame, ::Int)Get an iterator of combinations of unique indices excluding the time index located at index i_T.
EnergyModelsGUI.get_components — Methodget_components(design::EnergySystemDesign)Returns the components field of a EnergySystemDesign design.
EnergyModelsGUI.get_connections — Methodget_connections(system::AbstractSystem)Returns the connections field of a AbstractSystem system.
EnergyModelsGUI.get_connections — Methodget_connections(design::EnergySystemDesign)Returns the connections field of a EnergySystemDesign design.
EnergyModelsGUI.get_data — Methodget_data(
model::Union{JuMP.Model, Dict},
selection::Dict{Symbol, Any},
T::TS.TimeStructure,
sp::Int64,
rp::Int64,
sc::Int64,
)Get the values from the JuMP model, or the input data, at selection for all periods in T restricted to strategic period sp, representative period rp, and scenario sc.
EnergyModelsGUI.get_default_colors — Methodget_default_colors()Get the default colors in the EnergyModelsGUI repository at src/colors.yml.
EnergyModelsGUI.get_design — Methodget_design(gui::GUI)Returns the design field of a GUI gui.
EnergyModelsGUI.get_element — Methodget_element(conn::Connection)Returns the assosiated Transmission/Link of conn
EnergyModelsGUI.get_element — Methodget_element(system::System)Returns the element assosiated of a System system.
EnergyModelsGUI.get_element — Methodget_element(design::EnergySystemDesign)Returns the system node (i.e., availability node for areas) of a EnergySystemDesign design.
EnergyModelsGUI.get_element_label — Methodget_element_label(element)Get the label of the element based on its id field. If the id is a number it returns the built in Base.display() functionality of node, otherwise, the id field is converted to a string.
EnergyModelsGUI.get_fig — Methodget_fig(gui::GUI)Returns the fig field of a GUI gui.
EnergyModelsGUI.get_file — Methodget_file(design::EnergySystemDesign)Returns the file field of a EnergySystemDesign design.
EnergyModelsGUI.get_from — Methodget_from(conn::Connection)Returns the from field of a Connection conn.
EnergyModelsGUI.get_hover_string — Methodget_hover_string(obj::AbstractGUIObj)Return the string for a EMB.Node/Area/Link/Transmission to be shown on hovering.
EnergyModelsGUI.get_icon — Methodget_icon(design::EnergySystemDesign)Returns the icon field of a EnergySystemDesign design.
EnergyModelsGUI.get_inv_data — Methodget_inv_data(design::Connection)Returns the inv_data field of a Connection design.
EnergyModelsGUI.get_inv_data — Methodget_inv_data(design::EnergySystemDesign)Returns the inv_data field of a EnergySystemDesign design.
EnergyModelsGUI.get_inv_times — Methodget_inv_times(data::ProcInvData)
get_inv_times(design::AbstractGUIObj)Returns the inv_times field of a ProcInvData/AbstractGUIObj object data.
EnergyModelsGUI.get_investment_times — Methodget_investment_times(gui::GUI, max_inst::Float64)Calculate when investments has taken place and store the information. An investement is assumed to have taken place if any investment_indicators are larger than getvar(gui,:tol) relative to `maxinst`.
EnergyModelsGUI.get_jump_axis_types — Methodget_jump_axis_types(data::JuMP.Containers.DenseAxisArray)
get_jump_axis_types(data::SparseVars)
get_jump_axis_types(data::DataFrame)Get the types for each axis in the data.
EnergyModelsGUI.get_legend — Methodget_legend(gui::GUI, key::Symbol)Returns the legend object key of a GUI gui.
EnergyModelsGUI.get_linestyle — Methodget_linestyle(::GUI, ::AbstractElement)Dispatchable function for the EnergyModelsGeography extension.
EnergyModelsGUI.get_linestyle — Methodget_linestyle(gui::GUI, connection::Connection)Get the line style for an Connection connection based on its properties.
EnergyModelsGUI.get_linestyle — Methodget_linestyle(gui::GUI, design::EnergySystemDesign)Get the line style for an EnergySystemDesign design based on its properties.
EnergyModelsGUI.get_linked_nodes! — Methodget_linked_nodes!(
node::EMB.Node,
links::Vector{Link},
area_links::Vector{Link},
area_nodes::Vector{EMB.Node},
indices::Vector{Int},
)Recursively find all nodes connected (directly or indirectly) to node in a system of links and store the found links in area_links and nodes in area_nodes.
Here, indices contains the indices where the next link and node is to be stored, respectively.
EnergyModelsGUI.get_max_installed — Methodget_max_installed(n, t::Vector{<:TS.TimeStructure})Get the maximum capacity installable by an investemnt.
EnergyModelsGUI.get_menu — Methodget_menu(gui::GUI, menu_name::Symbol)Returns the menu with name menu_name of a GUI gui.
EnergyModelsGUI.get_menus — Methodget_menus(gui::GUI)Returns the menus field of a GUI gui.
EnergyModelsGUI.get_mode_to_transmission_map — Methodget_mode_to_transmission_map(::System)Dispatchable function to get the mapping between modes and transmissions for a GeoSystem.
EnergyModelsGUI.get_model — Methodget_model(gui::GUI)Returns the model field of a GUI gui.
EnergyModelsGUI.get_nested_value — Methodget_nested_value(dict::Dict, keys_str::String)Get value of a nested dict based on keys in the string key_str separated by periods.
EnergyModelsGUI.get_nth_field — Methodget_nth_field(s::String, delimiter::Char, n::Int)Get n'th value of a string s separated by the character delimiter.
EnergyModelsGUI.get_obj_value — Methodget_obj_value(model::Model)
get_obj_value(model::Dict)Get the objective value of the model.
EnergyModelsGUI.get_op — Methodget_op(tp::TS.TimePeriod)Get the operational period of TimePeriod tp.
EnergyModelsGUI.get_parent — Methodget_parent(system::AbstractSystem)Returns the parent field of a AbstractSystem system.
EnergyModelsGUI.get_parent — Methodget_parent(design::EnergySystemDesign)Returns the parent field of a EnergySystemDesign design.
EnergyModelsGUI.get_parent — Methodget_parent(gui::GUI)Returns the parent field of a GUI gui.
EnergyModelsGUI.get_periods — Methodget_periods(T::TS.TimeStructure, type::Type, sp::Int64, rp::Int64, sc::Int64)Get the periods for a given TimePeriod/TimeProfile type (e.g., TS.StrategicPeriod, TS.RepresentativePeriod, TS.OperationalPeriod) restricted to the strategic period sp, representative period rp and the scenario sc.
EnergyModelsGUI.get_plotables — Methodget_plotables(system::System)Returns the Nodes and Links of a System system.
EnergyModelsGUI.get_plots — Methodget_plots(conn::Connection)Returns the plots field of a Connection conn.
EnergyModelsGUI.get_plots — Methodget_plots(design::EnergySystemDesign)Returns the plots field of a EnergySystemDesign design.
EnergyModelsGUI.get_plotted_data — Methodget_plotted_data(gui::GUI)Get the plots from the gui.
EnergyModelsGUI.get_ref_element — Methodget_ref_element(system::AbstractSystem)Returns the ref_element field of a AbstractSystem system.
EnergyModelsGUI.get_ref_element — Methodget_ref_element(design::EnergySystemDesign)Returns the ref_element field of a EnergySystemDesign design.
EnergyModelsGUI.get_repr_dict — Methodget_repr_dict(vec::AbstractVector{T}) where TGet a dictionary with the string representation of each element in vec as keys.
EnergyModelsGUI.get_representative_period_indices — Methodget_representative_period_indices(T::TS.TimeStructure, sp::Int64)Return indices in the time structure T of the representative periods for strategic period sp.
EnergyModelsGUI.get_resource_colors — Methodget_resource_colors(l::Vector{Link}, id_to_color_map::Dict{Any,Any})Get the colors linked to the resources in the link l based on the mapping id_to_color_map.
EnergyModelsGUI.get_resource_colors — Methodget_resource_colors(resources::Vector{Resource}, id_to_color_map::Dict{Any,Any})Get the colors linked the the resources in resources based on the mapping id_to_color_map.
EnergyModelsGUI.get_resource_colors — Methodget_resource_colors(::Vector{Any}, ::Dict{Any,Any})Return empty RGB vector for empty input.
EnergyModelsGUI.get_results_legend — Methodget_results_legend(gui::GUI)Get the legend from the current visible time axis from the gui.
EnergyModelsGUI.get_root_design — Methodget_root_design(gui::GUI)Returns the root_design field of a GUI gui.
EnergyModelsGUI.get_scenario_indices — Methodget_scenario_indices(T::TS.TimeStructure, sp::Int64, rp::Int64)Return indices of the scenarios in the time structure T for strategic period number sp and representative period rp.
EnergyModelsGUI.get_screen — Methodget_screen(gui::GUI)Returns the screen field of a GUI gui.
EnergyModelsGUI.get_sector_points — Methodget_sector_points(;
center::Tuple{Real,Real} = (0.0, 0.0),
Δ::Real = 1.0,
θ₁::Real = 0,
θ₂::Real = π/4,
steps::Int=200,
geometry::Symbol = :circle)Get points for the boundary of a sector defined by the center c, radius/halfsidelength Δ, and angles θ₁ and θ₂ for a square (geometry = :rect), a circle (geometry = :circle), or a triangle (geometry = :triangle).
EnergyModelsGUI.get_selected_plots — Methodget_selected_plots(gui::GUI, time_axis::Symbol)Get the selected plots from the gui in the category time_axis.
EnergyModelsGUI.get_selected_systems — Methodget_selected_systems(gui::GUI)Get the selected systems from the gui.
EnergyModelsGUI.get_selection_color — Methodget_selection_color(gui::GUI)Get the selection color for the gui.
EnergyModelsGUI.get_supertypes — Methodget_supertypes(x::Any)Return the vector of the supertypes of x.
EnergyModelsGUI.get_system — Methodget_system(design::EnergySystemDesign)Returns the system field of a EnergySystemDesign design.
EnergyModelsGUI.get_text_alignment — Methodget_text_alignment(wall::Symbol)Get the text alignment for a label attached to a wall.
EnergyModelsGUI.get_time_axis — Methodget_time_axis(
data::Union{
JuMP.Containers.DenseAxisArray,
JuMP.Containers.SparseAxisArray,
SparseVariables.IndexedVarArray,
},
)Get the index of the axis/column of data (i.e.,from a JuMP variable) corresponding to TS.TimePeriod and return this index (i_T) alongside its TimeStruct type.
EnergyModelsGUI.get_to — Methodget_to(conn::Connection)Returns the to field of a Connection conn.
EnergyModelsGUI.get_toggle — Methodget_toggles(gui::GUI, toggle_name::Symbol)Returns the toggle with name toggle_name of a GUI gui.
EnergyModelsGUI.get_topo_legend — Methodget_topo_legend(gui::GUI)Get the legend from the topology axis from the gui.
EnergyModelsGUI.get_total_sum_time — Methodget_total_sum_time(data::JuMP.Containers.DenseAxisArray, ::Vector{<:TS.TimeStructure})
get_total_sum_time(data::DataFrame, periods::Vector{<:TS.TimeStructure})Get the total sum of the data for each time period in data.
EnergyModelsGUI.get_values — Methodget_values(vals::SparseVars)
get_values(vals::JuMP.Containers.DenseAxisArray)
get_values(vals::DataFrame)
get_values(vals::JuMP.Containers.SparseAxisArray, ts::Vector)
get_values(vals::SparseVariables.IndexedVarArray, ts::Vector)
get_values(vals::JuMP.Containers.DenseAxisArray, ts::Vector)
get_values(vals::DataFrame, ts::Vector)Get the values of the variables in vals. If a vector of time periods ts is provided, it returns the values for the times in ts.
EnergyModelsGUI.get_var — Methodget_var(gui::GUI, key::Symbol)Returns the vars field at key of a GUI gui.
EnergyModelsGUI.get_vars — Methodget_vars(gui::GUI)Returns the vars field of a GUI gui.
EnergyModelsGUI.get_vis_plots — Methodget_vis_plots(ax::Axis)Get visible BarPlots and Stairs plots.
EnergyModelsGUI.get_visible_data — Methodget_visible_data(gui::GUI, time_axis::Symbol)Get the visible plots from the gui in the category time_axis.
EnergyModelsGUI.get_wall — Methodget_wall(design::EnergySystemDesign)Returns the wall field of a EnergySystemDesign design.
EnergyModelsGUI.get_xy — Methodget_xy(design::EnergySystemDesign)Returns the xy field of a EnergySystemDesign design.
EnergyModelsGUI.getfirst — Methodgetfirst(f::Function, a::Vector)Return the first element of Vector a satisfying the requirement of Function f.
EnergyModelsGUI.has_invested — Methodhas_invested(data::ProcInvData)
has_invested(data::AbstractGUIObj)Returns a boolean indicator if investment has occured.
EnergyModelsGUI.includes_area — Methodincludes_area(case::Case)Check if the case includes elements from the EnergyModelsGeography package.
EnergyModelsGUI.initialize_available_data! — Methodinitialize_available_data!(gui)For all plotable objects, initialize the available data menu with items.
EnergyModelsGUI.initialize_plot! — Methodinitialize_plot!(gui::GUI, design::EnergySystemDesign)Initialize the plot of the topology of design object gui given an EnergySystemDesign design.
EnergyModelsGUI.installed — Methodfunction installed()Get a list of installed packages (from the depricated Pkg.installed()).
EnergyModelsGUI.l2_norm — Methodl2_norm(x::Vector{<:Real})Compute the l2-norm of a vector.
EnergyModelsGUI.merge_dicts — Methodmerge_dicts(dict1::Dict, dict2::Dict)Merge dict1 and dict2 (in case of overlap, dict2 overwrites entries in dict1).
EnergyModelsGUI.merge_svg_strings — Methodmerge_svg_strings(svg1, svg2)Merge two SVG strings svg1 and svg2 into one with header from svg1.
EnergyModelsGUI.mouse_within_axis — Methodmouse_within_axis(ax::Makie.AbstractAxis, mouse_pos::Tuple{Float64,Float64})Check if mouse position is within the pixel area of ax.
EnergyModelsGUI.nested_eltype — Methodnested_eltype(x::TimeProfile)Return the type of the lowest TimeProfile, of a nested TimeProfile x, not being a FixedProfile.
EnergyModelsGUI.new_global_delta_h — Methodnew_global_delta_h(gui::GUI)Recalculate the sizes of the boxes in get_axes(gui)[:topo] such that their size is independent of zooming an resizing the window.
EnergyModelsGUI.parse_case — Methodparse_case(case::Case)Parse the case and return a AbstractSystem instance.
EnergyModelsGUI.pick_component! — Methodpick_component!(gui::GUI)Check if a system is found under the mouse pointer and if it is an EnergySystemDesign or a Connection and update state variables.
EnergyModelsGUI.pixel_to_data — Methodpixel_to_data(gui::GUI, pixel_size::Real)Convert pixel_size to data widths (in x- and y-direction) in design object gui.
EnergyModelsGUI.place_nodes_in_circle — Methodplace_nodes_in_circle(total_nodes::Int, current_node::Int, r::Real, xₒ::Real, yₒ::Real)Return coordinate for point number i of a total of n points evenly distributed around a circle of radius r centered at (xₒ, yₒ) from -π/4 to 5π/4.
EnergyModelsGUI.plot_design! — Methodplot_design!(
gui::GUI, design::EnergySystemDesign; visible::Bool=true, expand_all::Bool=true
)Plot the topology of get_design(gui) (only if not already available), and toggle visibility based on the optional argument visible.
EnergyModelsGUI.print_nested_structure! — Methodprint_nested_structure!(
element,
output;
indent::Int64=0,
vector_limit::Int64=typemax(Int64),
)Appends the nested structure of element in a nice format to the output[] string. The parameter vector_limit is used to truncate large vectors.
EnergyModelsGUI.results_available — Methodresults_available(model::Model)
results_available(model::String)Check if the model has a feasible solution.
EnergyModelsGUI.save_design — Methodsave_design(design::EnergySystemDesign, file::String)Save the x,y-coordinates of design_dict to a .yml file at location and filename given by file.
EnergyModelsGUI.save_design — Methodsave_design(design::EnergySystemDesign)Save the x,y-coordinates of EnergySystemDesign design to a .yml file specifield in the field file of design.
EnergyModelsGUI.scroll_ylim — Methodscroll_ylim(ax::Makie.AbstractAxis, val::Float64)Shift the ylim with val units to mimic scrolling feature of an axis ax.
EnergyModelsGUI.select_data! — Methodselect_data(name::String, menu)Select the data with name name from the menu
EnergyModelsGUI.square_intersection — Methodsquare_intersection(
c::Tuple{Tc, Tc},
θ::Tθ, Δ::TΔ
) where {Tc<:Real, Tx<:Real, Tθ<:Real, TΔ<:Real}Calculate the intersection point between a line starting at c and direction described by θ and a square with half side lengths Δ centered at center c.
EnergyModelsGUI.square_intersection — Methodsquare_intersection(
c::Vector{Tc}, x::Vector{Tx},
θ::Tθ, Δ::TΔ
) where {Tc<:Real, Tx<:Real, Tθ<:Real, TΔ<:Real}Calculate the intersection point between a line starting at x and direction described by θ and a square with half side lengths Δ centered at center c.
EnergyModelsGUI.sub_system — Methodsub_system(system::SystemGeo, element::AbstractElement)Create a sub-system of system with the element as the reference node.
EnergyModelsGUI.toggle_inspector! — Methodtoggle_inspector!(p::Makie.AbstractPlot, toggle::Bool)Toggle the inspector of a Makie plot p using the boolean toggle.
EnergyModelsGUI.toggle_selection_color! — Methodtoggle_selection_color!(gui::GUI, selection, selected::Bool)Set the color of selection to get_selection_color(gui) if selected, and its original color otherwise using the argument selected.
EnergyModelsGUI.transfer_model — Methodtransfer_model(model::Model, system::AbstractSystem)
transfer_model(model::String, system::AbstractSystem)Convert the model to a DataFrame if it is provided as a path to a directory.
EnergyModelsGUI.update! — Methodupdate!(gui::GUI, element; updateplot::Bool=true)Based on element, update the text in get_axes(gui)[:info] and update plot in get_axes(gui)[:results] if updateplot = true.
EnergyModelsGUI.update! — Methodupdate!(gui::GUI, connection::Connection; updateplot::Bool=true)Based on Connection, update the text in get_axes(gui)[:info] and update plot in get_axes(gui)[:results] if updateplot = true.
EnergyModelsGUI.update! — Methodupdate!(gui::GUI, design::EnergySystemDesign; updateplot::Bool=true)Based on design, update the text in get_axes(gui)[:info] and update plot in get_axes(gui)[:results] if updateplot = true.
EnergyModelsGUI.update! — Methodupdate!(gui::GUI)Upon release of left mouse button update plots.
EnergyModelsGUI.update_available_data_menu! — Methodupdate_available_data_menu!(gui::GUI, element)Update the get_menus(gui)[:available_data] with the available data of element.
EnergyModelsGUI.update_axis! — Methodupdate_axislabels!(gui::GUI, time_axis::Symbol)Update the xlabel, ylabel and ticks of the :results axis
EnergyModelsGUI.update_barplot_dodge! — Methodupdate_barplot_dodge!(gui::GUI)Update the barplot of the state of the GUI (such that the bars are dodged away from each other).
EnergyModelsGUI.update_descriptive_names! — Methodupdate_descriptive_names!(gui::GUI)Update the dictionary of descriptive_names where the Dict is appended/overwritten in the following order:
- The default descriptive names found in
src/descriptive_names.yml. - Any descriptive_names.yml file found in the ext/EMGUIExt folder of any other EMX package.
- Descriptive names from a user defined file (from the GUI input argument
path_to_descriptive_names). - Descriptive names from a user defined Dict (from the GUI input argument
descriptive_names_dict).
EnergyModelsGUI.update_distances! — Methodupdate_distances!(gui::GUI)Find the minimum distance between the elements in the design object gui and update Δh such that neighbouring icons do not overlap.
EnergyModelsGUI.update_info_box! — Methodupdate_info_box!(gui::GUI, element; indent::Int64=0)Based on element update the text in info box.
EnergyModelsGUI.update_legend! — Methodupdate_legend!(gui::GUI)Update the legend based on the visible plots of type time_axis.
EnergyModelsGUI.update_limits! — Methodupdate_limits!(ax::Axis, limits::GLMakie.HyperRectangle)Set the limits based on limits.
EnergyModelsGUI.update_limits! — Methodupdate_limits!(ax::Axis)Adjust limits automatically to take into account legend and machine epsilon issues.
EnergyModelsGUI.update_plot! — Methodupdate_plot!(gui::GUI)Based on selected_systems update plots.
EnergyModelsGUI.update_plot! — Methodupdate_plot!(gui::GUI, element)Based on element update the results in get_axes(gui)[:results].
EnergyModelsGUI.update_plot! — Methodupdate_plot!(gui::GUI, design::EnergySystemDesign)Based on connection update plots.
EnergyModelsGUI.update_plot! — Methodupdate_plot!(gui::GUI, design::EnergySystemDesign)Based on design update plots.
EnergyModelsGUI.update_sub_system_locations! — Methodupdate_sub_system_locations!(design::EnergySystemDesign, Δ::Tuple{Real,Real})Update the coordinates of a subsystem of design based on the movement of EnergySystemDesign design.
EnergyModelsGUI.update_title! — Methodupdate_title!(gui::GUI)Update the title of get_axes(gui)[:topo] based on get_design(gui).