interface package
interface.agents module
Frontend Agent Creation Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.agents.Agents(ec_app_ui)[source]
Bases: object
Defines widgets and functionality of agents page.
-
clear_add_agent()[source]
Clears the add agent page
-
clear_agents()[source]
Clears the agent page
-
agents_tab_btn()[source]
Called when user clicks agent page
-
btn_agents_add()[source]
Displays options for users to enter a new agent
-
btn_agents_save()[source]
Saves agent
-
btn_agents_save_edited()[source]
Saves agent
-
btn_agents_add_component(*args)[source]
Adds component to agent
-
btn_agents_edit()[source]
Allows users to edit the selected agent
-
btn_agents_add_alevel_attr()[source]
Allows Users to add agent level attributes, saves them to backend in required format
-
btn_agents_remove()[source]
Allows a user to delete selected component.
-
on_selected_attr(*args)[source]
When user clicks dropdown
-
btn_agents_insert_attr()[source]
Adds the specified attribute to the attribute value
-
display_selected_attribute(*args)[source]
Saves the attribute the user clicked on.
-
display_selected_agent(*args)[source]
Saves the agent the user clicked on.
-
update_comp_tbl()[source]
Updates the small table of components
-
display_selected_component(*args)[source]
Gets value user selects from the table
-
btn_agents_remove_component()[source]
Removes the component from added components
interface.compile module
Frontend Compile Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.compile.Compile(ec_app_ui)[source]
Bases: object
Defines widgets and functionality of compile page.
-
clear_compile()[source]
Clears the visual elements of the page
-
compile_tab_btn()[source]
Places the visual elements onto the page
-
btn_compile_generate_model()[source]
Creates the model with the given name
interface.components module
Frontend Components Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.components.Components(ec_app_ui)[source]
Bases: object
Defines widgets and functionality of components page.
-
clear_components()[source]
Clears components page
-
clear_add_comp()[source]
Clears add component page
-
components_tab_btn()[source]
This method is opened when the user clicks the component button.
-
on_user_click(*args)[source]
When user selects the combo box
-
btn_components_save_attribute()[source]
Saves attribute to component
-
btn_components_add_new_attribute()[source]
Places the widgets to allow user to add an attribute
-
btn_components_save()[source]
Needs to get values in name and desc and add it to array
Needs to check that name doesn’t exist already
-
btn_components_complete_component()[source]
Clears entry boxes
-
btn_components_add()[source]
Places widgets which allow users to add a component
-
on_selected_primitive()[source]
Required method
-
btn_components_edit()[source]
Places widgets to allows user to edit a component
-
btn_components_save_edited()[source]
Saves the component which the user has edited
-
btn_components_save_attribute_added()[source]
Saves a new attribute added to the component on editing
-
btn_components_add_new_attribute_edit()[source]
Allows user to add new attribute to existing component
-
btn_components_remove()[source]
Allows a user to delete selected component.
-
display_selected_component(*args)[source]
Saves the component the user clicked on.
interface.data_collection module
Frontend Data Collection Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.data_collection.DataCollection(ec_app_ui)[source]
Bases: object
Defines widgets and functionality of data collection page.
-
clear_collectors()[source]
Clears the data collection page
-
data_tab_btn()[source]
This method is called when the user clicks on the Data Collection button
-
btn_collectors_add()[source]
Method called when user clicks the add button.
-
btn_collectors_component_save()[source]
Saves the information about a component being saved
-
btn_collectors_save()[source]
Saves the data collector
-
btn_collectors_edit()[source]
Method called when user clicks the edit button.
-
display_selected_collectors(*args)[source]
Gets the collector in the table that was selected
-
btn_collectors_remove()[source]
Method called when user clicks the remove button.
-
on_selected_agent(*args)[source]
When user selects the agent
-
on_selected_component(*args)[source]
Required method
-
update_tbl()[source]
Updates the component table
-
update_tbl_collectors()[source]
Updates the data collectors table
interface.edit_attributes module
Frontend Edit Attributes Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.edit_attributes.EditAttributes(ec_app_ui)[source]
Bases: object
The class which is responsible for the look and workings of the edit_attributes page.
-
clear_individual_attribute()[source]
Clears the editing of attribute widgets
-
clear_edit_attributes()[source]
Clears the tab as a whole
-
on_user_click(*args)[source]
When user selects the combo box
-
edit_attribute_tab_btn()[source]
Places all wigets on the page
-
btn_edit_attributes_edit()[source]
Fills in known information about the attribute.
-
btn_edit_attributes_remove()[source]
Phase 2
-
btn_edit_attributes_save()[source]
Allows users to save the edited attribute to the backend.
-
on_user_click_edit_attribute()[source]
Checks whether the checkbox is clicked.
-
on_selected_primitive(*args)[source]
Required for dropdown box
-
selected_comp_attr(*args)[source]
Checks which component the user has selected
-
display_selected_attribute(*args)[source]
Saves the attribute the user clicked on.
interface.execute module
Frontend Systems Execute Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
@Reference thepythoncode.com. (n.d.). Code for How to Make a Python Code Editor using Tkinter in Python - Python Code. [online]
Available at: https://thepythoncode.com/code/python-code-editor-using-tkinter-python [Accessed 14 Sep. 2023].
| Used as a basis for the designed code editor used as opposed library options
-
class interface.execute.Execute(ec_app_ui)[source]
Bases: object
This class defines how the execute page looks and works.
-
clear_execute()[source]
This method clears the execute page.
-
execute_tab_btn()[source]
This method creats the execute page.
-
btn_execute_save()[source]
This saves the execute function for the selected system.
-
btn_execute_code(*args)[source]
This method allows the user to edit the execute function for the selected system
-
selected_system(*args)[source]
This method is required by a combobox
-
changes(*args)[source]
Adds the edits
-
search_re(pattern, text)[source]
Searches for patterns
-
rgb(rgb)[source]
RGB value
-
opened_from_systems(system)[source]
If user opened tab from the systems page
interface.home module
Frontend Home Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.home.Home(ec_app_ui)[source]
Bases: object
Defines the home page functionality.
-
clear_home()[source]
Clears home page.
-
home_tab_btn()[source]
Places widgets for the home page.
-
btn_home_make_model()[source]
Saves model into the backend.
-
btn_home_make_exist_model()[source]
Loads new model into the backend.
interface.libraries module
Frontend Libraries Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.libraries.Libraries(ec_app_ui)[source]
Bases: object
This class defines a libraries page
-
clear_lib()[source]
Clears the libtraries page.
-
libraries_tab_btn()[source]
Places widgets when user opens library page.
-
btn_libraries_add()[source]
Allows user to add a library.
-
btn_libraries_edit()[source]
Allows user to edit a library.
-
btn_libraries_remove()[source]
Allows user to remove a library.
-
on_user_click(*args)[source]
Checks what selected type is.
-
btn_libraries_save()[source]
Saves the library to the backend.
-
btn_libraries_save_edit()[source]
Saves the edited library to the backend.
-
display_selected_library(*args)[source]
Saves the component the user clicked on.
-
update_tbl()[source]
Fills table
-
on_tick_gridworld(*args)[source]
When Grid World is clicked
interface.model_details module
Frontend Model Details Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.model_details.Details(ec_app_ui)[source]
Bases: object
Defines widgets and functionality of model details page.
-
clear_details()[source]
Clears all the visual elements of the table
-
details_tab_btn()[source]
Places widgets when user opens model details page.
-
btn_details_save()[source]
Save details about model to the backend
-
btn_details_save_initial_value()[source]
Saves the intial value of the given initial value
interface.systems module
Frontend Systems Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.systems.Systems(ec_app_ui)[source]
Bases: object
This class defines a sytem page
-
clear_systems()[source]
Clears the systems page
-
clear_add_system()[source]
Clears adding a system’s page
-
systems_tab_btn()[source]
Sets up the systems page with the table
-
btn_systems_add()[source]
Method when user clicks add system, places widgets
user will need to do so.
-
btn_systems_save()[source]
Saves the entered system details to the backend.
-
btn_systems_edit()[source]
Allows a user to edit selected system.
-
btn_systems_save_edited()[source]
Edited systems save on this method call
-
btn_systems_remove()[source]
Allows a user to delete selected system.
-
display_selected_system(*args)[source]
Saves the system the user clicked on.
-
on_tick_start(*args)[source]
When user clicks start checkbox
-
on_tick_end(*args)[source]
When user clicks end checkbox
-
on_tick_frequency(*args)[source]
When user clicks frequency checkbox
-
on_tick_generator(*args)[source]
When user clicks generator checkbox
-
btn_systems_add_generator()[source]
Places widgets which allow users to add a generator
-
btn_system_save_attribute()[source]
Saves attribute to component
-
btn_system_add_new_attribute()[source]
Places the widgets to allow user to add an attribute
-
btn_generator_save()[source]
Saves the generator
-
btn_system_complete_generator()[source]
Clears entry boxes
-
btn_systems_done()[source]
Clears page and takes user back to systems main page
-
display_selected_attribute(*args)[source]
Saves the attribute the user clicked on.
-
btn_system_insert_attr()[source]
Adds the specified attribute to the attribute value
-
btn_systems_attr_complete()[source]
Allows Users to add agent level attributes, saves them to backend in required format
-
display_selected_generator(*args)[source]
Gets the generator a user has clicked so it can be deleted
-
btn_system_delete_gen()[source]
Deletes the generator a user has clicked to be removed
-
btn_execute_func()[source]
Takes user to execute page
interface.visualisation module
Frontend Visualisation Page File for AGE-ABM Visual Interface
@Author Meghan Ireland
@Co-Authors Max Hall and Matthew Fleischman
-
class interface.visualisation.Visualisation(ec_app_ui)[source]
Bases: object
Defines widgets and functionality of visualisation page.
-
clear_visual()[source]
Clears visualisation page.
-
generating_data_thread_function(file_name: str)[source]
This function takes a file_name as a parameter and runs the file in a subprocess.
Parameters
- file_namestr
file_name to be run.
Returns
- error termint
Returns 0 on success
Returns 1 if data generation failed
-
start_thread()[source]
Starts the thread
-
clear_plots()[source]
Clears all tabs
-
visual_tab_btn()[source]
Places widgets on opening of page.
-
btn_visual_add()[source]
When user adds agents
-
btn_visual_delete()[source]
When user clicks done
-
on_selected_agent(*args)[source]
When user clicks dropdown of agents
-
progress_bar_success_func()[source]
Removes progress bar and places the plot button
-
on_selected_component(*args)[source]
When user clicks dropdown of components
-
on_selected_attribute(*args)[source]
When user clicks dropdown of attributes
-
on_select_type(*args)[source]
When stats dropdown is selected
-
display_selected_agent(*args)[source]
Gets the selected agent
-
on_tick_compare(*args)[source]
When compare checkbox is clicked
-
update_tbl()[source]
Updates the table
-
btn_visual_plot()[source]
Add the plot type and information
-
on_close_graphs()[source]
Closes graphs when user leaves the window