From 9f1f69481655c1ded6e6e778d21316b6f66755c6 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Thu, 9 Nov 2017 16:22:52 -0200 Subject: Base form files organized --- docs/doxygen/html/_about_form_8cpp_source.html | 105 ---- docs/doxygen/html/_about_form_8h.html | 6 +- docs/doxygen/html/_about_form_8h_source.html | 105 ---- docs/doxygen/html/_art_metro_8cpp_source.html | 103 ---- docs/doxygen/html/_art_metro_8h_source.html | 104 ---- docs/doxygen/html/_branch_8cpp_source.html | 116 ----- docs/doxygen/html/_branch_8h.html | 8 +- docs/doxygen/html/_branch_8h_source.html | 125 ----- docs/doxygen/html/_bus_8cpp_source.html | 135 ------ docs/doxygen/html/_bus_8h.html | 8 +- docs/doxygen/html/_bus_8h_source.html | 116 ----- docs/doxygen/html/_bus_form_8cpp_source.html | 118 ----- docs/doxygen/html/_bus_form_8h.html | 6 +- docs/doxygen/html/_bus_form_8h_source.html | 106 ---- .../html/_bus_form_bitmaps_8cpp_source.html | 103 ---- docs/doxygen/html/_camera_8cpp_source.html | 104 ---- docs/doxygen/html/_camera_8h.html | 4 +- docs/doxygen/html/_camera_8h_source.html | 104 ---- docs/doxygen/html/_capacitor_8cpp_source.html | 131 ----- docs/doxygen/html/_capacitor_8h.html | 6 +- docs/doxygen/html/_capacitor_8h_source.html | 111 ----- docs/doxygen/html/_chart_view_8cpp_source.html | 108 ----- docs/doxygen/html/_chart_view_8h.html | 6 +- docs/doxygen/html/_chart_view_8h_source.html | 107 ---- .../doxygen/html/_chart_view_base_8cpp_source.html | 103 ---- docs/doxygen/html/_chart_view_base_8h_source.html | 104 ---- .../html/_chart_view_bitmaps_8cpp_source.html | 103 ---- .../doxygen/html/_connection_line_8cpp_source.html | 115 ----- docs/doxygen/html/_connection_line_8h.html | 6 +- docs/doxygen/html/_connection_line_8h_source.html | 115 ----- docs/doxygen/html/_constant_8cpp_source.html | 119 ----- docs/doxygen/html/_constant_8h.html | 8 +- docs/doxygen/html/_constant_8h_source.html | 117 ----- docs/doxygen/html/_constant_form_8cpp_source.html | 107 ---- docs/doxygen/html/_constant_form_8h.html | 6 +- docs/doxygen/html/_constant_form_8h_source.html | 106 ---- docs/doxygen/html/_control_editor_8cpp_source.html | 165 ------- docs/doxygen/html/_control_editor_8h.html | 10 +- docs/doxygen/html/_control_editor_8h_source.html | 127 ----- .../html/_control_editor_base_8cpp_source.html | 103 ---- .../html/_control_editor_base_8h_source.html | 105 ---- .../html/_control_editor_bitmaps_8cpp_source.html | 103 ---- .../doxygen/html/_control_element_8cpp_source.html | 108 ----- docs/doxygen/html/_control_element_8h.html | 8 +- docs/doxygen/html/_control_element_8h_source.html | 108 ----- .../_control_element_container_8cpp_source.html | 125 ----- .../html/_control_element_container_8h.html | 26 +- .../html/_control_element_container_8h_source.html | 117 ----- .../html/_control_element_solver_8cpp_source.html | 128 ----- docs/doxygen/html/_control_element_solver_8h.html | 4 +- .../html/_control_element_solver_8h_source.html | 117 ----- .../html/_control_system_test_8cpp_source.html | 107 ---- docs/doxygen/html/_control_system_test_8h.html | 6 +- .../html/_control_system_test_8h_source.html | 106 ---- docs/doxygen/html/_data_report_8cpp_source.html | 124 ----- docs/doxygen/html/_data_report_8h.html | 6 +- docs/doxygen/html/_data_report_8h_source.html | 107 ---- .../html/_data_report_base_8cpp_source.html | 103 ---- docs/doxygen/html/_data_report_base_8h_source.html | 104 ---- .../html/_data_report_bitmaps_8cpp_source.html | 103 ---- .../html/_degrees_and_radians_8h_source.html | 103 ---- docs/doxygen/html/_divider_8cpp_source.html | 111 ----- docs/doxygen/html/_divider_8h.html | 6 +- docs/doxygen/html/_divider_8h_source.html | 109 ----- .../html/_electric_calculation_8cpp_source.html | 144 ------ docs/doxygen/html/_electric_calculation_8h.html | 28 +- .../html/_electric_calculation_8h_source.html | 127 ----- .../html/_electromechanical_8cpp_source.html | 131 ----- docs/doxygen/html/_electromechanical_8h.html | 6 +- .../doxygen/html/_electromechanical_8h_source.html | 114 ----- docs/doxygen/html/_element_8cpp_source.html | 135 ------ docs/doxygen/html/_element_8h.html | 8 +- docs/doxygen/html/_element_8h_source.html | 167 ------- .../html/_element_data_object_8cpp_source.html | 108 ----- docs/doxygen/html/_element_data_object_8h.html | 6 +- .../html/_element_data_object_8h_source.html | 106 ---- docs/doxygen/html/_element_form_8cpp_source.html | 103 ---- docs/doxygen/html/_element_form_8h_source.html | 121 ----- .../html/_element_form_bitmaps_8cpp_source.html | 103 ---- .../html/_element_plot_data_8cpp_source.html | 105 ---- docs/doxygen/html/_element_plot_data_8h.html | 4 +- .../doxygen/html/_element_plot_data_8h_source.html | 105 ---- docs/doxygen/html/_exponential_8cpp_source.html | 115 ----- docs/doxygen/html/_exponential_8h.html | 6 +- docs/doxygen/html/_exponential_8h_source.html | 115 ----- .../html/_exponential_form_8cpp_source.html | 107 ---- docs/doxygen/html/_exponential_form_8h.html | 6 +- docs/doxygen/html/_exponential_form_8h_source.html | 106 ---- docs/doxygen/html/_fault_8cpp_source.html | 129 ----- docs/doxygen/html/_fault_8h.html | 6 +- docs/doxygen/html/_fault_8h_source.html | 112 ----- docs/doxygen/html/_file_handing_8cpp_source.html | 202 -------- docs/doxygen/html/_file_handing_8h.html | 14 +- docs/doxygen/html/_file_handing_8h_source.html | 113 ----- docs/doxygen/html/_gain_8cpp_source.html | 118 ----- docs/doxygen/html/_gain_8h.html | 8 +- docs/doxygen/html/_gain_8h_source.html | 119 ----- docs/doxygen/html/_gain_form_8cpp_source.html | 107 ---- docs/doxygen/html/_gain_form_8h.html | 6 +- docs/doxygen/html/_gain_form_8h_source.html | 106 ---- .../html/_general_properties_form_8cpp_source.html | 107 ---- docs/doxygen/html/_general_properties_form_8h.html | 6 +- .../html/_general_properties_form_8h_source.html | 106 ---- .../html/_generator_stab_form_8cpp_source.html | 115 ----- docs/doxygen/html/_generator_stab_form_8h.html | 6 +- .../html/_generator_stab_form_8h_source.html | 109 ----- .../html/_graphical_element_8cpp_source.html | 105 ---- docs/doxygen/html/_graphical_element_8h.html | 6 +- .../doxygen/html/_graphical_element_8h_source.html | 106 ---- docs/doxygen/html/_i_o_control_8cpp_source.html | 119 ----- docs/doxygen/html/_i_o_control_8h.html | 8 +- docs/doxygen/html/_i_o_control_8h_source.html | 117 ----- .../html/_i_o_control_form_8cpp_source.html | 106 ---- docs/doxygen/html/_i_o_control_form_8h.html | 8 +- docs/doxygen/html/_i_o_control_form_8h_source.html | 107 ---- docs/doxygen/html/_ind_motor_8cpp_source.html | 124 ----- docs/doxygen/html/_ind_motor_8h.html | 6 +- docs/doxygen/html/_ind_motor_8h_source.html | 112 ----- docs/doxygen/html/_ind_motor_form_8cpp_source.html | 116 ----- docs/doxygen/html/_ind_motor_form_8h.html | 6 +- docs/doxygen/html/_ind_motor_form_8h_source.html | 106 ---- docs/doxygen/html/_inductor_8cpp_source.html | 131 ----- docs/doxygen/html/_inductor_8h.html | 6 +- docs/doxygen/html/_inductor_8h_source.html | 111 ----- docs/doxygen/html/_limiter_8cpp_source.html | 114 ----- docs/doxygen/html/_limiter_8h.html | 6 +- docs/doxygen/html/_limiter_8h_source.html | 114 ----- docs/doxygen/html/_limiter_form_8cpp_source.html | 107 ---- docs/doxygen/html/_limiter_form_8h.html | 6 +- docs/doxygen/html/_limiter_form_8h_source.html | 106 ---- docs/doxygen/html/_line_8cpp_source.html | 148 ------ docs/doxygen/html/_line_8h.html | 8 +- docs/doxygen/html/_line_8h_source.html | 115 ----- docs/doxygen/html/_line_form_8cpp_source.html | 121 ----- docs/doxygen/html/_line_form_8h.html | 6 +- docs/doxygen/html/_line_form_8h_source.html | 107 ---- docs/doxygen/html/_load_8cpp_source.html | 134 ----- docs/doxygen/html/_load_8h.html | 8 +- docs/doxygen/html/_load_8h_source.html | 113 ----- docs/doxygen/html/_load_form_8cpp_source.html | 119 ----- docs/doxygen/html/_load_form_8h.html | 6 +- docs/doxygen/html/_load_form_8h_source.html | 107 ---- docs/doxygen/html/_machines_8cpp_source.html | 131 ----- docs/doxygen/html/_machines_8h.html | 6 +- docs/doxygen/html/_machines_8h_source.html | 124 ----- docs/doxygen/html/_main_frame_8cpp_source.html | 148 ------ docs/doxygen/html/_main_frame_8h.html | 10 +- docs/doxygen/html/_main_frame_8h.js | 18 +- docs/doxygen/html/_main_frame_8h_source.html | 116 ----- .../doxygen/html/_main_frame_base_8cpp_source.html | 103 ---- docs/doxygen/html/_main_frame_base_8h_source.html | 104 ---- .../html/_main_frame_bitmaps_8cpp_source.html | 103 ---- docs/doxygen/html/_math_operation_8cpp_source.html | 109 ----- docs/doxygen/html/_math_operation_8h.html | 6 +- docs/doxygen/html/_math_operation_8h_source.html | 113 ----- docs/doxygen/html/_multiplier_8cpp_source.html | 112 ----- docs/doxygen/html/_multiplier_8h.html | 6 +- docs/doxygen/html/_multiplier_8h_source.html | 109 ----- docs/doxygen/html/_open_g_l_text_8cpp_source.html | 105 ---- docs/doxygen/html/_open_g_l_text_8h.html | 4 +- docs/doxygen/html/_open_g_l_text_8h_source.html | 104 ---- docs/doxygen/html/_power_element_8cpp_source.html | 130 ----- docs/doxygen/html/_power_element_8h.html | 16 +- docs/doxygen/html/_power_element_8h_source.html | 160 ------ docs/doxygen/html/_power_flow_8cpp_source.html | 117 ----- docs/doxygen/html/_power_flow_8h.html | 6 +- docs/doxygen/html/_power_flow_8h_source.html | 106 ---- .../doxygen/html/_properties_data_8cpp_source.html | 104 ---- docs/doxygen/html/_properties_data_8h.html | 8 +- docs/doxygen/html/_properties_data_8h_source.html | 110 ----- .../doxygen/html/_properties_form_8cpp_source.html | 103 ---- docs/doxygen/html/_properties_form_8h_source.html | 106 ---- .../html/_properties_form_bitmaps_8cpp_source.html | 103 ---- docs/doxygen/html/_rate_limiter_8cpp_source.html | 115 ----- docs/doxygen/html/_rate_limiter_8h.html | 6 +- docs/doxygen/html/_rate_limiter_8h_source.html | 115 ----- .../html/_rate_limiter_form_8cpp_source.html | 107 ---- docs/doxygen/html/_rate_limiter_form_8h.html | 6 +- .../doxygen/html/_rate_limiter_form_8h_source.html | 106 ---- .../_reactive_shunt_element_form_8cpp_source.html | 118 ----- .../html/_reactive_shunt_element_form_8h.html | 6 +- .../_reactive_shunt_element_form_8h_source.html | 108 ----- docs/doxygen/html/_shunt_8cpp_source.html | 121 ----- docs/doxygen/html/_shunt_8h.html | 8 +- docs/doxygen/html/_shunt_8h_source.html | 118 ----- .../_simulations_settings_form_8cpp_source.html | 113 ----- .../html/_simulations_settings_form_8h.html | 6 +- .../html/_simulations_settings_form_8h_source.html | 106 ---- docs/doxygen/html/_sum_8cpp_source.html | 117 ----- docs/doxygen/html/_sum_8h.html | 6 +- docs/doxygen/html/_sum_8h_source.html | 115 ----- docs/doxygen/html/_sum_form_8cpp_source.html | 107 ---- docs/doxygen/html/_sum_form_8h.html | 6 +- docs/doxygen/html/_sum_form_8h_source.html | 106 ---- docs/doxygen/html/_switching_form_8cpp_source.html | 113 ----- docs/doxygen/html/_switching_form_8h.html | 6 +- docs/doxygen/html/_switching_form_8h_source.html | 106 ---- docs/doxygen/html/_sync_generator_8cpp_source.html | 127 ----- docs/doxygen/html/_sync_generator_8h.html | 6 +- docs/doxygen/html/_sync_generator_8h_source.html | 118 ----- .../html/_sync_machine_form_8cpp_source.html | 124 ----- docs/doxygen/html/_sync_machine_form_8h.html | 6 +- .../doxygen/html/_sync_machine_form_8h_source.html | 108 ----- docs/doxygen/html/_sync_motor_8cpp_source.html | 123 ----- docs/doxygen/html/_sync_motor_8h.html | 6 +- docs/doxygen/html/_sync_motor_8h_source.html | 117 ----- docs/doxygen/html/_text_8cpp_source.html | 165 ------- docs/doxygen/html/_text_8h.html | 10 +- docs/doxygen/html/_text_8h_source.html | 125 ----- docs/doxygen/html/_text_form_8cpp_source.html | 131 ----- docs/doxygen/html/_text_form_8h.html | 10 +- docs/doxygen/html/_text_form_8h_source.html | 109 ----- .../html/_transfer_function_8cpp_source.html | 119 ----- docs/doxygen/html/_transfer_function_8h.html | 8 +- .../doxygen/html/_transfer_function_8h_source.html | 120 ----- .../html/_transfer_function_form_8cpp_source.html | 107 ---- docs/doxygen/html/_transfer_function_form_8h.html | 6 +- .../html/_transfer_function_form_8h_source.html | 106 ---- docs/doxygen/html/_transformer_8cpp_source.html | 142 ------ docs/doxygen/html/_transformer_8h.html | 6 +- docs/doxygen/html/_transformer_8h_source.html | 114 ----- .../html/_transformer_form_8cpp_source.html | 118 ----- docs/doxygen/html/_transformer_form_8h.html | 6 +- docs/doxygen/html/_transformer_form_8h_source.html | 107 ---- docs/doxygen/html/_workspace_8cpp_source.html | 199 -------- docs/doxygen/html/_workspace_8h.html | 10 +- docs/doxygen/html/_workspace_8h_source.html | 125 ----- docs/doxygen/html/_workspace_base_8cpp_source.html | 103 ---- docs/doxygen/html/_workspace_base_8h_source.html | 104 ---- .../html/_workspace_bitmaps_8cpp_source.html | 103 ---- docs/doxygen/html/annotated.html | 206 ++++---- docs/doxygen/html/annotated_dup.js | 30 +- docs/doxygen/html/class_about_form-members.html | 32 +- docs/doxygen/html/class_about_form.html | 89 +--- docs/doxygen/html/class_about_form.png | Bin 661 -> 470 bytes .../html/class_about_form_base-members.html | 132 ----- docs/doxygen/html/class_about_form_base.html | 212 -------- docs/doxygen/html/class_about_form_base.js | 30 -- docs/doxygen/html/class_about_form_base.png | Bin 663 -> 0 bytes docs/doxygen/html/class_branch.html | 38 +- docs/doxygen/html/class_bus.html | 34 +- docs/doxygen/html/class_bus_form-members.html | 108 +---- docs/doxygen/html/class_bus_form.html | 254 +--------- docs/doxygen/html/class_bus_form.png | Bin 611 -> 431 bytes docs/doxygen/html/class_bus_form_base-members.html | 194 -------- docs/doxygen/html/class_bus_form_base.html | 398 --------------- docs/doxygen/html/class_bus_form_base.js | 92 ---- docs/doxygen/html/class_bus_form_base.png | Bin 620 -> 0 bytes docs/doxygen/html/class_camera.html | 8 +- docs/doxygen/html/class_capacitor.html | 26 +- docs/doxygen/html/class_chart_view-members.html | 88 +--- docs/doxygen/html/class_chart_view.html | 128 +---- docs/doxygen/html/class_chart_view.png | Bin 694 -> 501 bytes .../html/class_chart_view_base-members.html | 157 ------ docs/doxygen/html/class_chart_view_base.html | 287 ----------- docs/doxygen/html/class_chart_view_base.js | 55 --- docs/doxygen/html/class_chart_view_base.png | Bin 700 -> 0 bytes docs/doxygen/html/class_connection_line.html | 22 +- docs/doxygen/html/class_constant.html | 22 +- docs/doxygen/html/class_constant_form-members.html | 26 +- docs/doxygen/html/class_constant_form.html | 50 +- docs/doxygen/html/class_constant_form.png | Bin 716 -> 526 bytes .../html/class_constant_form_base-members.html | 121 ----- docs/doxygen/html/class_constant_form_base.html | 179 ------- docs/doxygen/html/class_constant_form_base.js | 19 - docs/doxygen/html/class_constant_form_base.png | Bin 722 -> 0 bytes .../doxygen/html/class_control_editor-members.html | 106 ++-- docs/doxygen/html/class_control_editor.html | 68 +-- docs/doxygen/html/class_control_editor.png | Bin 709 -> 513 bytes .../html/class_control_editor_base-members.html | 140 ------ docs/doxygen/html/class_control_editor_base.html | 238 --------- docs/doxygen/html/class_control_editor_base.js | 38 -- docs/doxygen/html/class_control_editor_base.png | Bin 723 -> 0 bytes docs/doxygen/html/class_control_element.html | 14 +- .../doxygen/html/class_control_element_button.html | 8 +- .../html/class_control_element_container.html | 8 +- .../doxygen/html/class_control_element_solver.html | 10 +- .../html/class_control_system_test-members.html | 42 +- docs/doxygen/html/class_control_system_test.html | 110 +---- docs/doxygen/html/class_control_system_test.png | Bin 890 -> 669 bytes .../class_control_system_test_base-members.html | 141 ------ .../html/class_control_system_test_base.html | 239 --------- .../doxygen/html/class_control_system_test_base.js | 39 -- .../html/class_control_system_test_base.png | Bin 896 -> 0 bytes docs/doxygen/html/class_data_report-members.html | 74 +-- docs/doxygen/html/class_data_report.html | 128 +---- docs/doxygen/html/class_data_report.png | Bin 687 -> 493 bytes .../html/class_data_report_base-members.html | 152 ------ docs/doxygen/html/class_data_report_base.html | 272 ----------- docs/doxygen/html/class_data_report_base.js | 50 -- docs/doxygen/html/class_data_report_base.png | Bin 687 -> 0 bytes docs/doxygen/html/class_divider.html | 10 +- docs/doxygen/html/class_electric_calculation.html | 34 +- docs/doxygen/html/class_electromechanical.html | 8 +- docs/doxygen/html/class_element.html | 138 +----- docs/doxygen/html/class_element_data_object.html | 8 +- docs/doxygen/html/class_element_plot_data.html | 9 +- docs/doxygen/html/class_exponential.html | 22 +- .../html/class_exponential_form-members.html | 28 +- docs/doxygen/html/class_exponential_form.html | 68 +-- docs/doxygen/html/class_exponential_form.png | Bin 770 -> 565 bytes .../html/class_exponential_form_base-members.html | 127 ----- docs/doxygen/html/class_exponential_form_base.html | 197 -------- docs/doxygen/html/class_exponential_form_base.js | 25 - docs/doxygen/html/class_exponential_form_base.png | Bin 774 -> 0 bytes docs/doxygen/html/class_fault.html | 18 +- docs/doxygen/html/class_file_handing.html | 8 +- docs/doxygen/html/class_gain.html | 26 +- docs/doxygen/html/class_gain_form-members.html | 26 +- docs/doxygen/html/class_gain_form.html | 50 +- docs/doxygen/html/class_gain_form.png | Bin 655 -> 470 bytes .../doxygen/html/class_gain_form_base-members.html | 121 ----- docs/doxygen/html/class_gain_form_base.html | 179 ------- docs/doxygen/html/class_gain_form_base.js | 19 - docs/doxygen/html/class_gain_form_base.png | Bin 658 -> 0 bytes .../class_general_properties_form-members.html | 28 +- .../html/class_general_properties_form.html | 62 +-- .../doxygen/html/class_general_properties_form.png | Bin 945 -> 716 bytes ...class_general_properties_form_base-members.html | 125 ----- .../html/class_general_properties_form_base.html | 191 -------- .../html/class_general_properties_form_base.js | 23 - .../html/class_general_properties_form_base.png | Bin 952 -> 0 bytes .../html/class_generator_stab_form-members.html | 130 +---- docs/doxygen/html/class_generator_stab_form.html | 338 +------------ docs/doxygen/html/class_generator_stab_form.png | Bin 882 -> 661 bytes .../class_generator_stab_form_base-members.html | 222 --------- .../html/class_generator_stab_form_base.html | 482 ------------------ .../doxygen/html/class_generator_stab_form_base.js | 120 ----- .../html/class_generator_stab_form_base.png | Bin 889 -> 0 bytes docs/doxygen/html/class_graphical_element.html | 8 +- docs/doxygen/html/class_i_o_control.html | 22 +- .../html/class_i_o_control_form-members.html | 36 +- docs/doxygen/html/class_i_o_control_form.html | 62 +-- docs/doxygen/html/class_i_o_control_form.png | Bin 690 -> 500 bytes .../html/class_i_o_control_form_base-members.html | 127 ----- docs/doxygen/html/class_i_o_control_form_base.html | 197 -------- docs/doxygen/html/class_i_o_control_form_base.js | 25 - docs/doxygen/html/class_i_o_control_form_base.png | Bin 693 -> 0 bytes docs/doxygen/html/class_ind_motor.html | 16 +- .../doxygen/html/class_ind_motor_form-members.html | 44 +- docs/doxygen/html/class_ind_motor_form.html | 92 +--- docs/doxygen/html/class_ind_motor_form.png | Bin 706 -> 512 bytes .../html/class_ind_motor_form_base-members.html | 136 ------ docs/doxygen/html/class_ind_motor_form_base.html | 224 --------- docs/doxygen/html/class_ind_motor_form_base.js | 34 -- docs/doxygen/html/class_ind_motor_form_base.png | Bin 710 -> 0 bytes docs/doxygen/html/class_inductor.html | 26 +- docs/doxygen/html/class_limiter.html | 20 +- docs/doxygen/html/class_limiter_form-members.html | 30 +- docs/doxygen/html/class_limiter_form.html | 62 +-- docs/doxygen/html/class_limiter_form.png | Bin 670 -> 482 bytes .../html/class_limiter_form_base-members.html | 125 ----- docs/doxygen/html/class_limiter_form_base.html | 191 -------- docs/doxygen/html/class_limiter_form_base.js | 23 - docs/doxygen/html/class_limiter_form_base.png | Bin 673 -> 0 bytes docs/doxygen/html/class_line.html | 50 +- docs/doxygen/html/class_line_form-members.html | 80 +-- docs/doxygen/html/class_line_form.html | 206 +------- docs/doxygen/html/class_line_form.png | Bin 634 -> 448 bytes .../doxygen/html/class_line_form_base-members.html | 174 ------- docs/doxygen/html/class_line_form_base.html | 338 ------------- docs/doxygen/html/class_line_form_base.js | 72 --- docs/doxygen/html/class_line_form_base.png | Bin 633 -> 0 bytes docs/doxygen/html/class_load.html | 24 +- docs/doxygen/html/class_load_form-members.html | 90 +--- docs/doxygen/html/class_load_form.html | 230 +-------- docs/doxygen/html/class_load_form.png | Bin 633 -> 447 bytes .../doxygen/html/class_load_form_base-members.html | 183 ------- docs/doxygen/html/class_load_form_base.html | 365 -------------- docs/doxygen/html/class_load_form_base.js | 81 ---- docs/doxygen/html/class_load_form_base.png | Bin 640 -> 0 bytes docs/doxygen/html/class_machines.html | 34 +- docs/doxygen/html/class_main_app.html | 7 +- docs/doxygen/html/class_main_frame-members.html | 71 +-- docs/doxygen/html/class_main_frame.html | 140 +----- docs/doxygen/html/class_main_frame.png | Bin 700 -> 509 bytes .../html/class_main_frame_base-members.html | 197 -------- docs/doxygen/html/class_main_frame_base.html | 358 -------------- docs/doxygen/html/class_main_frame_base.js | 95 ---- docs/doxygen/html/class_main_frame_base.png | Bin 708 -> 0 bytes docs/doxygen/html/class_math_operation.html | 18 +- docs/doxygen/html/class_multiplier.html | 10 +- docs/doxygen/html/class_node.html | 8 +- docs/doxygen/html/class_open_g_l_colour.html | 14 +- docs/doxygen/html/class_open_g_l_text.html | 8 +- docs/doxygen/html/class_plot_data.html | 6 +- docs/doxygen/html/class_power_element.html | 30 +- docs/doxygen/html/class_power_flow.html | 8 +- docs/doxygen/html/class_properties_data.html | 8 +- docs/doxygen/html/class_rate_limiter.html | 22 +- .../html/class_rate_limiter_form-members.html | 22 +- docs/doxygen/html/class_rate_limiter_form.html | 62 +-- docs/doxygen/html/class_rate_limiter_form.png | Bin 747 -> 557 bytes .../html/class_rate_limiter_form_base-members.html | 125 ----- .../doxygen/html/class_rate_limiter_form_base.html | 191 -------- docs/doxygen/html/class_rate_limiter_form_base.js | 23 - docs/doxygen/html/class_rate_limiter_form_base.png | Bin 751 -> 0 bytes .../class_reactive_shunt_element_form-members.html | 28 +- .../html/class_reactive_shunt_element_form.html | 74 +-- .../html/class_reactive_shunt_element_form.png | Bin 974 -> 739 bytes ...s_reactive_shunt_element_form_base-members.html | 130 ----- .../class_reactive_shunt_element_form_base.html | 206 -------- .../html/class_reactive_shunt_element_form_base.js | 28 -- .../class_reactive_shunt_element_form_base.png | Bin 983 -> 0 bytes docs/doxygen/html/class_shunt.html | 26 +- .../class_simulations_settings_form-members.html | 138 +----- .../html/class_simulations_settings_form.html | 404 +-------------- .../html/class_simulations_settings_form.png | Bin 1012 -> 774 bytes ...ass_simulations_settings_form_base-members.html | 241 --------- .../html/class_simulations_settings_form_base.html | 539 --------------------- .../html/class_simulations_settings_form_base.js | 139 ------ .../html/class_simulations_settings_form_base.png | Bin 1015 -> 0 bytes docs/doxygen/html/class_sum.html | 20 +- docs/doxygen/html/class_sum_form-members.html | 20 +- docs/doxygen/html/class_sum_form.html | 50 +- docs/doxygen/html/class_sum_form.png | Bin 645 -> 460 bytes docs/doxygen/html/class_sum_form_base-members.html | 121 ----- docs/doxygen/html/class_sum_form_base.html | 179 ------- docs/doxygen/html/class_sum_form_base.js | 19 - docs/doxygen/html/class_sum_form_base.png | Bin 651 -> 0 bytes .../doxygen/html/class_switching_form-members.html | 45 +- docs/doxygen/html/class_switching_form.html | 77 +-- docs/doxygen/html/class_switching_form.png | Bin 778 -> 581 bytes .../html/class_switching_form_base-members.html | 136 ------ docs/doxygen/html/class_switching_form_base.html | 224 --------- docs/doxygen/html/class_switching_form_base.js | 34 -- docs/doxygen/html/class_switching_form_base.png | Bin 779 -> 0 bytes docs/doxygen/html/class_sync_generator.html | 20 +- .../html/class_sync_machine_form-members.html | 88 +--- docs/doxygen/html/class_sync_machine_form.html | 260 +--------- docs/doxygen/html/class_sync_machine_form.png | Bin 870 -> 653 bytes .../html/class_sync_machine_form_base-members.html | 194 -------- .../doxygen/html/class_sync_machine_form_base.html | 398 --------------- docs/doxygen/html/class_sync_machine_form_base.js | 92 ---- docs/doxygen/html/class_sync_machine_form_base.png | Bin 876 -> 0 bytes docs/doxygen/html/class_sync_motor.html | 18 +- docs/doxygen/html/class_text.html | 18 +- docs/doxygen/html/class_text_form-members.html | 48 +- docs/doxygen/html/class_text_form.html | 134 +---- docs/doxygen/html/class_text_form.png | Bin 646 -> 464 bytes .../doxygen/html/class_text_form_base-members.html | 156 ------ docs/doxygen/html/class_text_form_base.html | 284 ----------- docs/doxygen/html/class_text_form_base.js | 54 --- docs/doxygen/html/class_text_form_base.png | Bin 654 -> 0 bytes docs/doxygen/html/class_transfer_function.html | 26 +- .../html/class_transfer_function_form-members.html | 22 +- .../doxygen/html/class_transfer_function_form.html | 62 +-- docs/doxygen/html/class_transfer_function_form.png | Bin 882 -> 655 bytes .../class_transfer_function_form_base-members.html | 125 ----- .../html/class_transfer_function_form_base.html | 191 -------- .../html/class_transfer_function_form_base.js | 23 - .../html/class_transfer_function_form_base.png | Bin 889 -> 0 bytes docs/doxygen/html/class_transformer.html | 40 +- .../html/class_transformer_form-members.html | 90 +--- docs/doxygen/html/class_transformer_form.html | 266 +--------- docs/doxygen/html/class_transformer_form.png | Bin 797 -> 582 bytes .../html/class_transformer_form_base-members.html | 194 -------- docs/doxygen/html/class_transformer_form_base.html | 398 --------------- docs/doxygen/html/class_transformer_form_base.js | 92 ---- docs/doxygen/html/class_transformer_form_base.png | Bin 805 -> 0 bytes docs/doxygen/html/class_workspace-members.html | 44 +- docs/doxygen/html/class_workspace.html | 26 +- docs/doxygen/html/class_workspace.png | Bin 672 -> 483 bytes .../doxygen/html/class_workspace_base-members.html | 124 ----- docs/doxygen/html/class_workspace_base.html | 188 ------- docs/doxygen/html/class_workspace_base.js | 22 - docs/doxygen/html/class_workspace_base.png | Bin 673 -> 0 bytes docs/doxygen/html/classes.html | 74 ++- .../classwx_ribbon_metro_art_provider-members.html | 125 ----- .../html/classwx_ribbon_metro_art_provider.html | 186 ------- .../html/classwx_ribbon_metro_art_provider.js | 23 - .../html/classwx_ribbon_metro_art_provider.png | Bin 718 -> 0 bytes .../html/dir_ffd1f789ec7bd0a45fc6ad92579c5070.html | 136 +++--- .../html/dir_ffd1f789ec7bd0a45fc6ad92579c5070.js | 96 +--- docs/doxygen/html/dynsections.js | 7 - docs/doxygen/html/files.html | 232 +++------ docs/doxygen/html/hierarchy.html | 247 +++++----- docs/doxygen/html/hierarchy.js | 171 ++++--- docs/doxygen/html/main_8cpp_source.html | 108 ----- docs/doxygen/html/navtreedata.js | 24 +- docs/doxygen/html/navtreeindex0.js | 500 +++++++++---------- docs/doxygen/html/navtreeindex1.js | 500 +++++++++---------- docs/doxygen/html/navtreeindex10.js | 253 ---------- docs/doxygen/html/navtreeindex11.js | 253 ---------- docs/doxygen/html/navtreeindex12.js | 253 ---------- docs/doxygen/html/navtreeindex13.js | 253 ---------- docs/doxygen/html/navtreeindex14.js | 139 ------ docs/doxygen/html/navtreeindex2.js | 500 +++++++++---------- docs/doxygen/html/navtreeindex3.js | 500 +++++++++---------- docs/doxygen/html/navtreeindex4.js | 500 +++++++++---------- docs/doxygen/html/navtreeindex5.js | 500 +++++++++---------- docs/doxygen/html/navtreeindex6.js | 500 +++++++++---------- docs/doxygen/html/navtreeindex7.js | 500 +++++++++---------- docs/doxygen/html/navtreeindex8.js | 391 ++++++--------- docs/doxygen/html/navtreeindex9.js | 253 ---------- docs/doxygen/html/search/all_0.js | 1 - docs/doxygen/html/search/all_1.js | 3 +- docs/doxygen/html/search/all_10.js | 5 +- docs/doxygen/html/search/all_12.js | 4 +- docs/doxygen/html/search/all_2.js | 6 +- docs/doxygen/html/search/all_3.js | 1 - docs/doxygen/html/search/all_4.js | 3 +- docs/doxygen/html/search/all_6.js | 3 - docs/doxygen/html/search/all_8.js | 2 - docs/doxygen/html/search/all_9.js | 5 +- docs/doxygen/html/search/all_a.js | 1 - docs/doxygen/html/search/all_e.js | 2 - docs/doxygen/html/search/all_f.js | 4 - docs/doxygen/html/search/classes_0.js | 3 +- docs/doxygen/html/search/classes_1.js | 3 +- docs/doxygen/html/search/classes_10.js | 4 +- docs/doxygen/html/search/classes_2.js | 6 +- docs/doxygen/html/search/classes_3.js | 1 - docs/doxygen/html/search/classes_4.js | 3 +- docs/doxygen/html/search/classes_6.js | 3 - docs/doxygen/html/search/classes_7.js | 4 +- docs/doxygen/html/search/classes_8.js | 5 +- docs/doxygen/html/search/classes_9.js | 1 - docs/doxygen/html/search/classes_d.js | 4 +- docs/doxygen/html/search/classes_e.js | 4 - docs/doxygen/html/search/classes_f.js | 5 +- docs/doxygen/html/search/functions_11.html | 26 - docs/doxygen/html/search/functions_11.js | 9 - docs/doxygen/html/struct_bus_electrical_data.html | 11 +- .../html/struct_capacitor_electrical_data.html | 7 +- docs/doxygen/html/struct_elements_lists.html | 7 +- docs/doxygen/html/struct_general_data.html | 7 +- .../html/struct_ind_motor_electrical_data.html | 7 +- .../html/struct_inductor_electrical_data.html | 7 +- docs/doxygen/html/struct_integration_constant.html | 10 +- docs/doxygen/html/struct_line_electrical_data.html | 7 +- docs/doxygen/html/struct_load_electrical_data.html | 7 +- docs/doxygen/html/struct_reactive_limits.html | 7 +- docs/doxygen/html/struct_simulation_data.html | 7 +- docs/doxygen/html/struct_switching_data.html | 10 +- .../struct_sync_generator_electrical_data.html | 9 +- .../html/struct_sync_machine_model_data.html | 14 +- .../html/struct_sync_motor_electrical_data.html | 9 +- .../struct_transfer_function_1_1_space_state.html | 7 +- .../html/struct_transformer_electrical_data.html | 7 +- 540 files changed, 3297 insertions(+), 42511 deletions(-) delete mode 100644 docs/doxygen/html/_about_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_about_form_8h_source.html delete mode 100644 docs/doxygen/html/_art_metro_8cpp_source.html delete mode 100644 docs/doxygen/html/_art_metro_8h_source.html delete mode 100644 docs/doxygen/html/_branch_8cpp_source.html delete mode 100644 docs/doxygen/html/_branch_8h_source.html delete mode 100644 docs/doxygen/html/_bus_8cpp_source.html delete mode 100644 docs/doxygen/html/_bus_8h_source.html delete mode 100644 docs/doxygen/html/_bus_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_bus_form_8h_source.html delete mode 100644 docs/doxygen/html/_bus_form_bitmaps_8cpp_source.html delete mode 100644 docs/doxygen/html/_camera_8cpp_source.html delete mode 100644 docs/doxygen/html/_camera_8h_source.html delete mode 100644 docs/doxygen/html/_capacitor_8cpp_source.html delete mode 100644 docs/doxygen/html/_capacitor_8h_source.html delete mode 100644 docs/doxygen/html/_chart_view_8cpp_source.html delete mode 100644 docs/doxygen/html/_chart_view_8h_source.html delete mode 100644 docs/doxygen/html/_chart_view_base_8cpp_source.html delete mode 100644 docs/doxygen/html/_chart_view_base_8h_source.html delete mode 100644 docs/doxygen/html/_chart_view_bitmaps_8cpp_source.html delete mode 100644 docs/doxygen/html/_connection_line_8cpp_source.html delete mode 100644 docs/doxygen/html/_connection_line_8h_source.html delete mode 100644 docs/doxygen/html/_constant_8cpp_source.html delete mode 100644 docs/doxygen/html/_constant_8h_source.html delete mode 100644 docs/doxygen/html/_constant_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_constant_form_8h_source.html delete mode 100644 docs/doxygen/html/_control_editor_8cpp_source.html delete mode 100644 docs/doxygen/html/_control_editor_8h_source.html delete mode 100644 docs/doxygen/html/_control_editor_base_8cpp_source.html delete mode 100644 docs/doxygen/html/_control_editor_base_8h_source.html delete mode 100644 docs/doxygen/html/_control_editor_bitmaps_8cpp_source.html delete mode 100644 docs/doxygen/html/_control_element_8cpp_source.html delete mode 100644 docs/doxygen/html/_control_element_8h_source.html delete mode 100644 docs/doxygen/html/_control_element_container_8cpp_source.html delete mode 100644 docs/doxygen/html/_control_element_container_8h_source.html delete mode 100644 docs/doxygen/html/_control_element_solver_8cpp_source.html delete mode 100644 docs/doxygen/html/_control_element_solver_8h_source.html delete mode 100644 docs/doxygen/html/_control_system_test_8cpp_source.html delete mode 100644 docs/doxygen/html/_control_system_test_8h_source.html delete mode 100644 docs/doxygen/html/_data_report_8cpp_source.html delete mode 100644 docs/doxygen/html/_data_report_8h_source.html delete mode 100644 docs/doxygen/html/_data_report_base_8cpp_source.html delete mode 100644 docs/doxygen/html/_data_report_base_8h_source.html delete mode 100644 docs/doxygen/html/_data_report_bitmaps_8cpp_source.html delete mode 100644 docs/doxygen/html/_degrees_and_radians_8h_source.html delete mode 100644 docs/doxygen/html/_divider_8cpp_source.html delete mode 100644 docs/doxygen/html/_divider_8h_source.html delete mode 100644 docs/doxygen/html/_electric_calculation_8cpp_source.html delete mode 100644 docs/doxygen/html/_electric_calculation_8h_source.html delete mode 100644 docs/doxygen/html/_electromechanical_8cpp_source.html delete mode 100644 docs/doxygen/html/_electromechanical_8h_source.html delete mode 100644 docs/doxygen/html/_element_8cpp_source.html delete mode 100644 docs/doxygen/html/_element_8h_source.html delete mode 100644 docs/doxygen/html/_element_data_object_8cpp_source.html delete mode 100644 docs/doxygen/html/_element_data_object_8h_source.html delete mode 100644 docs/doxygen/html/_element_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_element_form_8h_source.html delete mode 100644 docs/doxygen/html/_element_form_bitmaps_8cpp_source.html delete mode 100644 docs/doxygen/html/_element_plot_data_8cpp_source.html delete mode 100644 docs/doxygen/html/_element_plot_data_8h_source.html delete mode 100644 docs/doxygen/html/_exponential_8cpp_source.html delete mode 100644 docs/doxygen/html/_exponential_8h_source.html delete mode 100644 docs/doxygen/html/_exponential_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_exponential_form_8h_source.html delete mode 100644 docs/doxygen/html/_fault_8cpp_source.html delete mode 100644 docs/doxygen/html/_fault_8h_source.html delete mode 100644 docs/doxygen/html/_file_handing_8cpp_source.html delete mode 100644 docs/doxygen/html/_file_handing_8h_source.html delete mode 100644 docs/doxygen/html/_gain_8cpp_source.html delete mode 100644 docs/doxygen/html/_gain_8h_source.html delete mode 100644 docs/doxygen/html/_gain_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_gain_form_8h_source.html delete mode 100644 docs/doxygen/html/_general_properties_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_general_properties_form_8h_source.html delete mode 100644 docs/doxygen/html/_generator_stab_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_generator_stab_form_8h_source.html delete mode 100644 docs/doxygen/html/_graphical_element_8cpp_source.html delete mode 100644 docs/doxygen/html/_graphical_element_8h_source.html delete mode 100644 docs/doxygen/html/_i_o_control_8cpp_source.html delete mode 100644 docs/doxygen/html/_i_o_control_8h_source.html delete mode 100644 docs/doxygen/html/_i_o_control_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_i_o_control_form_8h_source.html delete mode 100644 docs/doxygen/html/_ind_motor_8cpp_source.html delete mode 100644 docs/doxygen/html/_ind_motor_8h_source.html delete mode 100644 docs/doxygen/html/_ind_motor_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_ind_motor_form_8h_source.html delete mode 100644 docs/doxygen/html/_inductor_8cpp_source.html delete mode 100644 docs/doxygen/html/_inductor_8h_source.html delete mode 100644 docs/doxygen/html/_limiter_8cpp_source.html delete mode 100644 docs/doxygen/html/_limiter_8h_source.html delete mode 100644 docs/doxygen/html/_limiter_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_limiter_form_8h_source.html delete mode 100644 docs/doxygen/html/_line_8cpp_source.html delete mode 100644 docs/doxygen/html/_line_8h_source.html delete mode 100644 docs/doxygen/html/_line_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_line_form_8h_source.html delete mode 100644 docs/doxygen/html/_load_8cpp_source.html delete mode 100644 docs/doxygen/html/_load_8h_source.html delete mode 100644 docs/doxygen/html/_load_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_load_form_8h_source.html delete mode 100644 docs/doxygen/html/_machines_8cpp_source.html delete mode 100644 docs/doxygen/html/_machines_8h_source.html delete mode 100644 docs/doxygen/html/_main_frame_8cpp_source.html delete mode 100644 docs/doxygen/html/_main_frame_8h_source.html delete mode 100644 docs/doxygen/html/_main_frame_base_8cpp_source.html delete mode 100644 docs/doxygen/html/_main_frame_base_8h_source.html delete mode 100644 docs/doxygen/html/_main_frame_bitmaps_8cpp_source.html delete mode 100644 docs/doxygen/html/_math_operation_8cpp_source.html delete mode 100644 docs/doxygen/html/_math_operation_8h_source.html delete mode 100644 docs/doxygen/html/_multiplier_8cpp_source.html delete mode 100644 docs/doxygen/html/_multiplier_8h_source.html delete mode 100644 docs/doxygen/html/_open_g_l_text_8cpp_source.html delete mode 100644 docs/doxygen/html/_open_g_l_text_8h_source.html delete mode 100644 docs/doxygen/html/_power_element_8cpp_source.html delete mode 100644 docs/doxygen/html/_power_element_8h_source.html delete mode 100644 docs/doxygen/html/_power_flow_8cpp_source.html delete mode 100644 docs/doxygen/html/_power_flow_8h_source.html delete mode 100644 docs/doxygen/html/_properties_data_8cpp_source.html delete mode 100644 docs/doxygen/html/_properties_data_8h_source.html delete mode 100644 docs/doxygen/html/_properties_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_properties_form_8h_source.html delete mode 100644 docs/doxygen/html/_properties_form_bitmaps_8cpp_source.html delete mode 100644 docs/doxygen/html/_rate_limiter_8cpp_source.html delete mode 100644 docs/doxygen/html/_rate_limiter_8h_source.html delete mode 100644 docs/doxygen/html/_rate_limiter_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_rate_limiter_form_8h_source.html delete mode 100644 docs/doxygen/html/_reactive_shunt_element_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_reactive_shunt_element_form_8h_source.html delete mode 100644 docs/doxygen/html/_shunt_8cpp_source.html delete mode 100644 docs/doxygen/html/_shunt_8h_source.html delete mode 100644 docs/doxygen/html/_simulations_settings_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_simulations_settings_form_8h_source.html delete mode 100644 docs/doxygen/html/_sum_8cpp_source.html delete mode 100644 docs/doxygen/html/_sum_8h_source.html delete mode 100644 docs/doxygen/html/_sum_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_sum_form_8h_source.html delete mode 100644 docs/doxygen/html/_switching_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_switching_form_8h_source.html delete mode 100644 docs/doxygen/html/_sync_generator_8cpp_source.html delete mode 100644 docs/doxygen/html/_sync_generator_8h_source.html delete mode 100644 docs/doxygen/html/_sync_machine_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_sync_machine_form_8h_source.html delete mode 100644 docs/doxygen/html/_sync_motor_8cpp_source.html delete mode 100644 docs/doxygen/html/_sync_motor_8h_source.html delete mode 100644 docs/doxygen/html/_text_8cpp_source.html delete mode 100644 docs/doxygen/html/_text_8h_source.html delete mode 100644 docs/doxygen/html/_text_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_text_form_8h_source.html delete mode 100644 docs/doxygen/html/_transfer_function_8cpp_source.html delete mode 100644 docs/doxygen/html/_transfer_function_8h_source.html delete mode 100644 docs/doxygen/html/_transfer_function_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_transfer_function_form_8h_source.html delete mode 100644 docs/doxygen/html/_transformer_8cpp_source.html delete mode 100644 docs/doxygen/html/_transformer_8h_source.html delete mode 100644 docs/doxygen/html/_transformer_form_8cpp_source.html delete mode 100644 docs/doxygen/html/_transformer_form_8h_source.html delete mode 100644 docs/doxygen/html/_workspace_8cpp_source.html delete mode 100644 docs/doxygen/html/_workspace_8h_source.html delete mode 100644 docs/doxygen/html/_workspace_base_8cpp_source.html delete mode 100644 docs/doxygen/html/_workspace_base_8h_source.html delete mode 100644 docs/doxygen/html/_workspace_bitmaps_8cpp_source.html delete mode 100644 docs/doxygen/html/class_about_form_base-members.html delete mode 100644 docs/doxygen/html/class_about_form_base.html delete mode 100644 docs/doxygen/html/class_about_form_base.js delete mode 100644 docs/doxygen/html/class_about_form_base.png delete mode 100644 docs/doxygen/html/class_bus_form_base-members.html delete mode 100644 docs/doxygen/html/class_bus_form_base.html delete mode 100644 docs/doxygen/html/class_bus_form_base.js delete mode 100644 docs/doxygen/html/class_bus_form_base.png delete mode 100644 docs/doxygen/html/class_chart_view_base-members.html delete mode 100644 docs/doxygen/html/class_chart_view_base.html delete mode 100644 docs/doxygen/html/class_chart_view_base.js delete mode 100644 docs/doxygen/html/class_chart_view_base.png delete mode 100644 docs/doxygen/html/class_constant_form_base-members.html delete mode 100644 docs/doxygen/html/class_constant_form_base.html delete mode 100644 docs/doxygen/html/class_constant_form_base.js delete mode 100644 docs/doxygen/html/class_constant_form_base.png delete mode 100644 docs/doxygen/html/class_control_editor_base-members.html delete mode 100644 docs/doxygen/html/class_control_editor_base.html delete mode 100644 docs/doxygen/html/class_control_editor_base.js delete mode 100644 docs/doxygen/html/class_control_editor_base.png delete mode 100644 docs/doxygen/html/class_control_system_test_base-members.html delete mode 100644 docs/doxygen/html/class_control_system_test_base.html delete mode 100644 docs/doxygen/html/class_control_system_test_base.js delete mode 100644 docs/doxygen/html/class_control_system_test_base.png delete mode 100644 docs/doxygen/html/class_data_report_base-members.html delete mode 100644 docs/doxygen/html/class_data_report_base.html delete mode 100644 docs/doxygen/html/class_data_report_base.js delete mode 100644 docs/doxygen/html/class_data_report_base.png delete mode 100644 docs/doxygen/html/class_exponential_form_base-members.html delete mode 100644 docs/doxygen/html/class_exponential_form_base.html delete mode 100644 docs/doxygen/html/class_exponential_form_base.js delete mode 100644 docs/doxygen/html/class_exponential_form_base.png delete mode 100644 docs/doxygen/html/class_gain_form_base-members.html delete mode 100644 docs/doxygen/html/class_gain_form_base.html delete mode 100644 docs/doxygen/html/class_gain_form_base.js delete mode 100644 docs/doxygen/html/class_gain_form_base.png delete mode 100644 docs/doxygen/html/class_general_properties_form_base-members.html delete mode 100644 docs/doxygen/html/class_general_properties_form_base.html delete mode 100644 docs/doxygen/html/class_general_properties_form_base.js delete mode 100644 docs/doxygen/html/class_general_properties_form_base.png delete mode 100644 docs/doxygen/html/class_generator_stab_form_base-members.html delete mode 100644 docs/doxygen/html/class_generator_stab_form_base.html delete mode 100644 docs/doxygen/html/class_generator_stab_form_base.js delete mode 100644 docs/doxygen/html/class_generator_stab_form_base.png delete mode 100644 docs/doxygen/html/class_i_o_control_form_base-members.html delete mode 100644 docs/doxygen/html/class_i_o_control_form_base.html delete mode 100644 docs/doxygen/html/class_i_o_control_form_base.js delete mode 100644 docs/doxygen/html/class_i_o_control_form_base.png delete mode 100644 docs/doxygen/html/class_ind_motor_form_base-members.html delete mode 100644 docs/doxygen/html/class_ind_motor_form_base.html delete mode 100644 docs/doxygen/html/class_ind_motor_form_base.js delete mode 100644 docs/doxygen/html/class_ind_motor_form_base.png delete mode 100644 docs/doxygen/html/class_limiter_form_base-members.html delete mode 100644 docs/doxygen/html/class_limiter_form_base.html delete mode 100644 docs/doxygen/html/class_limiter_form_base.js delete mode 100644 docs/doxygen/html/class_limiter_form_base.png delete mode 100644 docs/doxygen/html/class_line_form_base-members.html delete mode 100644 docs/doxygen/html/class_line_form_base.html delete mode 100644 docs/doxygen/html/class_line_form_base.js delete mode 100644 docs/doxygen/html/class_line_form_base.png delete mode 100644 docs/doxygen/html/class_load_form_base-members.html delete mode 100644 docs/doxygen/html/class_load_form_base.html delete mode 100644 docs/doxygen/html/class_load_form_base.js delete mode 100644 docs/doxygen/html/class_load_form_base.png delete mode 100644 docs/doxygen/html/class_main_frame_base-members.html delete mode 100644 docs/doxygen/html/class_main_frame_base.html delete mode 100644 docs/doxygen/html/class_main_frame_base.js delete mode 100644 docs/doxygen/html/class_main_frame_base.png delete mode 100644 docs/doxygen/html/class_rate_limiter_form_base-members.html delete mode 100644 docs/doxygen/html/class_rate_limiter_form_base.html delete mode 100644 docs/doxygen/html/class_rate_limiter_form_base.js delete mode 100644 docs/doxygen/html/class_rate_limiter_form_base.png delete mode 100644 docs/doxygen/html/class_reactive_shunt_element_form_base-members.html delete mode 100644 docs/doxygen/html/class_reactive_shunt_element_form_base.html delete mode 100644 docs/doxygen/html/class_reactive_shunt_element_form_base.js delete mode 100644 docs/doxygen/html/class_reactive_shunt_element_form_base.png delete mode 100644 docs/doxygen/html/class_simulations_settings_form_base-members.html delete mode 100644 docs/doxygen/html/class_simulations_settings_form_base.html delete mode 100644 docs/doxygen/html/class_simulations_settings_form_base.js delete mode 100644 docs/doxygen/html/class_simulations_settings_form_base.png delete mode 100644 docs/doxygen/html/class_sum_form_base-members.html delete mode 100644 docs/doxygen/html/class_sum_form_base.html delete mode 100644 docs/doxygen/html/class_sum_form_base.js delete mode 100644 docs/doxygen/html/class_sum_form_base.png delete mode 100644 docs/doxygen/html/class_switching_form_base-members.html delete mode 100644 docs/doxygen/html/class_switching_form_base.html delete mode 100644 docs/doxygen/html/class_switching_form_base.js delete mode 100644 docs/doxygen/html/class_switching_form_base.png delete mode 100644 docs/doxygen/html/class_sync_machine_form_base-members.html delete mode 100644 docs/doxygen/html/class_sync_machine_form_base.html delete mode 100644 docs/doxygen/html/class_sync_machine_form_base.js delete mode 100644 docs/doxygen/html/class_sync_machine_form_base.png delete mode 100644 docs/doxygen/html/class_text_form_base-members.html delete mode 100644 docs/doxygen/html/class_text_form_base.html delete mode 100644 docs/doxygen/html/class_text_form_base.js delete mode 100644 docs/doxygen/html/class_text_form_base.png delete mode 100644 docs/doxygen/html/class_transfer_function_form_base-members.html delete mode 100644 docs/doxygen/html/class_transfer_function_form_base.html delete mode 100644 docs/doxygen/html/class_transfer_function_form_base.js delete mode 100644 docs/doxygen/html/class_transfer_function_form_base.png delete mode 100644 docs/doxygen/html/class_transformer_form_base-members.html delete mode 100644 docs/doxygen/html/class_transformer_form_base.html delete mode 100644 docs/doxygen/html/class_transformer_form_base.js delete mode 100644 docs/doxygen/html/class_transformer_form_base.png delete mode 100644 docs/doxygen/html/class_workspace_base-members.html delete mode 100644 docs/doxygen/html/class_workspace_base.html delete mode 100644 docs/doxygen/html/class_workspace_base.js delete mode 100644 docs/doxygen/html/class_workspace_base.png delete mode 100644 docs/doxygen/html/classwx_ribbon_metro_art_provider-members.html delete mode 100644 docs/doxygen/html/classwx_ribbon_metro_art_provider.html delete mode 100644 docs/doxygen/html/classwx_ribbon_metro_art_provider.js delete mode 100644 docs/doxygen/html/classwx_ribbon_metro_art_provider.png delete mode 100644 docs/doxygen/html/main_8cpp_source.html delete mode 100644 docs/doxygen/html/navtreeindex10.js delete mode 100644 docs/doxygen/html/navtreeindex11.js delete mode 100644 docs/doxygen/html/navtreeindex12.js delete mode 100644 docs/doxygen/html/navtreeindex13.js delete mode 100644 docs/doxygen/html/navtreeindex14.js delete mode 100644 docs/doxygen/html/navtreeindex9.js delete mode 100644 docs/doxygen/html/search/functions_11.html delete mode 100644 docs/doxygen/html/search/functions_11.js (limited to 'docs/doxygen/html') diff --git a/docs/doxygen/html/_about_form_8cpp_source.html b/docs/doxygen/html/_about_form_8cpp_source.html deleted file mode 100644 index 252b47f..0000000 --- a/docs/doxygen/html/_about_form_8cpp_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - -Project/AboutForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
AboutForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "AboutForm.h"
19 
20 AboutForm::AboutForm(wxWindow* parent) : AboutFormBase(parent) { Init(); }
21 AboutForm::~AboutForm() {}
22 void AboutForm::Init()
23 {
24  // Create developers table
25  m_gridCredits->EnableGridLines(false);
26  wxFont headerFont = m_gridCredits->GetDefaultCellFont();
27  headerFont.SetWeight(wxFONTWEIGHT_BOLD);
28  headerFont.SetPointSize(headerFont.GetPointSize() + 1);
29  wxColour headerColour(200, 200, 200);
30  wxColour hyperlinkColour(6, 69, 173);
31 
32  m_gridCredits->AppendCols(3);
33  m_gridCredits->AppendRows(6);
34  m_gridCredits->HideColLabels();
35  m_gridCredits->HideRowLabels();
36  m_gridCredits->SetCellSize(0, 0, 1, 3);
37  m_gridCredits->SetCellSize(3, 0, 1, 3);
38 
39  m_gridCredits->SetCellValue(0, 0, _("Developers"));
40  m_gridCredits->SetCellAlignment(0, 0, wxALIGN_CENTRE, wxALIGN_CENTRE);
41  m_gridCredits->SetCellBackgroundColour(0, 0, headerColour);
42  m_gridCredits->SetCellFont(0, 0, headerFont);
43  m_gridCredits->SetCellValue(1, 0, wxT("Thales Lima Oliveira"));
44  m_gridCredits->SetCellValue(1, 1, _("Main developer and project admin"));
45  m_gridCredits->SetCellValue(1, 2, wxT("thales@ufu.br"));
46 
47  m_gridCredits->SetRowMinimalHeight(2, 30);
48 
49  m_gridCredits->SetCellValue(3, 0, _("Contributors / Special Thanks"));
50  m_gridCredits->SetCellAlignment(3, 0, wxALIGN_CENTRE, wxALIGN_CENTRE);
51  m_gridCredits->SetCellBackgroundColour(3, 0, headerColour);
52  m_gridCredits->SetCellFont(3, 0, headerFont);
53  // Caixeta
54  m_gridCredits->SetCellValue(4, 0, wxT("Geraldo Caixeta Guimar") + static_cast<wxString>(L'\u00E3') + wxT("es"));
55  m_gridCredits->SetCellValue(4, 1, _("Chief advisor"));
56  m_gridCredits->SetCellValue(4, 2, wxT("gcaixeta@ufu.br"));
57  // Marcio Tamashiro
58  m_gridCredits->SetCellValue(5, 0, wxT("M") + static_cast<wxString>(L'\u00E1') + wxT("rcio Augusto Tamashiro"));
59  m_gridCredits->SetCellValue(5, 1, "");
60  m_gridCredits->SetCellValue(5, 2, wxT("tamashiro@ifto.edu.br"));
61 
62  for(int i = 0; i < m_gridCredits->GetNumberRows(); ++i) {
63  m_gridCredits->SetCellTextColour(i, 2, hyperlinkColour);
64  }
65 
66  m_gridCredits->AutoSize();
67 
68  // Last col size
69  int lastColSize = m_notebook->GetPage(1)->GetSize().GetWidth();
70  int lastColNumber = m_gridCredits->GetNumberCols() - 1;
71  for(int i = 0; i < lastColNumber; ++i) {
72  lastColSize -= m_gridCredits->GetColSize(i);
73  }
74  m_gridCredits->SetColSize(lastColNumber, lastColSize);
75  m_gridCredits->SetSize(m_notebook->GetPage(1)->GetSize());
76 
77  // Load license file
78  wxString licenseStr = "";
79  wxTextFile file;
80  wxFileName fn(wxStandardPaths::Get().GetExecutablePath());
81  wxString licensePath = fn.GetPath() + wxFileName::DirName("\\..\\data\\LICENSE", wxPATH_WIN).GetPath();
82  if(!file.Open(licensePath)) {
83  // Error message
84  } else {
85  licenseStr += file.GetFirstLine() + "\n";
86  while(!file.Eof()) {
87  licenseStr += file.GetNextLine() + "\n";
88  }
89  }
90  wxFont font = m_richTextCtrlLicense->GetFont();
91  font.SetFamily(wxFONTFAMILY_TELETYPE);
92  m_richTextCtrlLicense->SetFont(font);
93  m_richTextCtrlLicense->SetEditable(false);
94  m_richTextCtrlLicense->AppendText(licenseStr);
95 }
- -
-
- - - - diff --git a/docs/doxygen/html/_about_form_8h.html b/docs/doxygen/html/_about_form_8h.html index 1c822d8..8b4934b 100644 --- a/docs/doxygen/html/_about_form_8h.html +++ b/docs/doxygen/html/_about_form_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_about_form_8h.html','');});
AboutForm.h File Reference
-
#include "PropertiesForm.h"
+
#include "base/PropertiesFormBase.h"
#include <wx/textfile.h>
#include <wx/stdpaths.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_about_form_8h_source.html b/docs/doxygen/html/_about_form_8h_source.html deleted file mode 100644 index 9f7fec3..0000000 --- a/docs/doxygen/html/_about_form_8h_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - -Project/AboutForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  AboutForm
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
AboutForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ABOUTFORM_H
19 #define ABOUTFORM_H
20 #include "PropertiesForm.h"
21 
22 #include <wx/textfile.h>
23 #include <wx/stdpaths.h>
24 
32 class AboutForm : public AboutFormBase
33 {
34  public:
35  AboutForm(wxWindow* parent);
36  virtual ~AboutForm();
37  virtual void Init();
38 
39  protected:
40  virtual void OnOKButtonClick(wxCommandEvent& event) { EndModal(wxID_OK); };
41 };
42 #endif // ABOUTFORM_H
-
Form to show some informations.
Definition: AboutForm.h:32
-
-
- - - - diff --git a/docs/doxygen/html/_art_metro_8cpp_source.html b/docs/doxygen/html/_art_metro_8cpp_source.html deleted file mode 100644 index a56d2ef..0000000 --- a/docs/doxygen/html/_art_metro_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/ArtMetro.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ArtMetro.cpp
-
-
-
1 // Name: src/ribbon/art_msw.cpp
3 // Purpose: MSW style art provider for ribbon interface
4 // Author: Peter Cawley
5 // Modified by:
6 // Created: 2009-05-25
7 // RCS-ID: $Id$
8 // Copyright: (C) Peter Cawley
9 // Licence: wxWindows licence
11 
12 #include "wx/wxprec.h"
13 #include <wx/frame.h>
14 
15 #ifdef __BORLANDC__
16  #pragma hdrstop
17 #endif
18 
19 #include "wx/ribbon/art.h"
20 #include "wx/ribbon/art_internal.h"
21 #include "wx/ribbon/bar.h"
22 #include "wx/ribbon/buttonbar.h"
23 #include "wx/ribbon/gallery.h"
24 #include "wx/ribbon/toolbar.h"
25 
26 #include "ArtMetro.h"
27 
28 #ifndef WX_PRECOMP
29 #include "wx/dcmemory.h"
30 #endif
31 
32 #ifdef __WXMSW__
33 #include "wx/msw/private.h"
34 #endif
35 
36 static const char* const gallery_up_xpm[] = {
37  "5 5 2 1",
38  " c None",
39  "x c #FF00FF",
40  " ",
41  " x ",
42  " xxx ",
43  "xxxxx",
44  " "};
45 
46 static const char* const gallery_down_xpm[] = {
47  "5 5 2 1",
48  " c None",
49  "x c #FF00FF",
50  " ",
51  "xxxxx",
52  " xxx ",
53  " x ",
54  " "};
55 
56 static const char* const gallery_left_xpm[] = {
57  "5 5 2 1",
58  " c None",
59  "x c #FF00FF",
60  " x ",
61  " xx ",
62  " xxx ",
63  " xx ",
64  " x "};
65 
66 static const char* const gallery_right_xpm[] = {
67  "5 5 2 1",
68  " c None",
69  "x c #FF00FF",
70  " x ",
71  " xx ",
72  " xxx ",
73  " xx ",
74  " x "};
75 
76 static const char* const gallery_extension_xpm[] = {
77  "5 5 2 1",
78  " c None",
79  "x c #FF00FF",
80  "xxxxx",
81  " ",
82  "xxxxx",
83  " xxx ",
84  " x "};
85 
86 static const char* const panel_extension_xpm[] = {
87  "7 7 2 1",
88  " c None",
89  "x c #FF00FF",
90  "xxxxxx ",
91  "x ",
92  "x ",
93  "x x x",
94  "x xxx",
95  "x xxx",
96  " xxxx"};
97 
98 wxRibbonMetroArtProvider::wxRibbonMetroArtProvider(bool set_colour_scheme) : wxRibbonMSWArtProvider (set_colour_scheme)
99 {
100  m_flags = 0;
101  m_tab_label_font = *wxNORMAL_FONT;
102  m_button_bar_label_font = m_tab_label_font;
103  m_panel_label_font = m_tab_label_font;
104 
105  if(set_colour_scheme)
106  {
107  SetColourScheme(
108  wxColour(255, 255, 255),
109  wxColour(120, 174, 229),
110  wxColour( 0, 0, 0));
111  }
112 
113  m_cached_tab_separator_visibility = -10.0; // valid visibilities are in range [0, 1]
114  m_tab_separation_size = 3;
115  m_page_border_left = 2;
116  m_page_border_top = 1;
117  m_page_border_right = 2;
118  m_page_border_bottom = 3;
119  m_panel_x_separation_size = 2;
120  m_panel_y_separation_size = 1;
121  m_tool_group_separation_size = 3;
122  m_gallery_bitmap_padding_left_size = 4;
123  m_gallery_bitmap_padding_right_size = 4;
124  m_gallery_bitmap_padding_top_size = 4;
125  m_gallery_bitmap_padding_bottom_size = 4;
126 }
127 
128 wxRibbonMetroArtProvider::~wxRibbonMetroArtProvider()
129 {
130 }
131 void wxRibbonMetroArtProvider::GetColourScheme(
132  wxColour* primary,
133  wxColour* secondary,
134  wxColour* tertiary) const
135 {
136  if(primary != NULL)
137  *primary = m_primary_scheme_colour;
138  if(secondary != NULL)
139  *secondary = m_secondary_scheme_colour;
140  if(tertiary != NULL)
141  *tertiary = m_tertiary_scheme_colour;
142 }
143 void wxRibbonMetroArtProvider::SetColourScheme(
144  const wxColour& primary,
145  const wxColour& secondary,
146  const wxColour& tertiary)
147 {
148  m_primary_scheme_colour = primary;
149  m_secondary_scheme_colour = secondary;
150  m_tertiary_scheme_colour = tertiary;
151 
152  wxRibbonHSLColour primary_hsl(primary);
153  wxRibbonHSLColour secondary_hsl(secondary);
154  // tertiary not used for anything
155 
156  // Map primary saturation from [0, 1] to [.25, .75]
157  bool primary_is_gray = false;
158  static const double gray_saturation_threshold = 0.01;
159  if(primary_hsl.saturation <= gray_saturation_threshold)
160  primary_is_gray = true;
161  else
162  {
163  primary_hsl.saturation = cos(primary_hsl.saturation * M_PI)
164  * -0.25 + 0.5;
165  }
166 
167  // Map primary luminance from [0, 1] to [.23, .83]
168  primary_hsl.luminance = cos(primary_hsl.luminance * M_PI) * -0.3 + 0.53;
169 
170  // Map secondary saturation from [0, 1] to [0.16, 0.84]
171  bool secondary_is_gray = false;
172  if(secondary_hsl.saturation <= gray_saturation_threshold)
173  secondary_is_gray = true;
174  else
175  {
176  secondary_hsl.saturation = cos(secondary_hsl.saturation * M_PI)
177  * -0.34 + 0.5;
178  }
179 
180  // Map secondary luminance from [0, 1] to [0.1, 0.9]
181  secondary_hsl.luminance = cos(secondary_hsl.luminance * M_PI) * -0.4 + 0.5;
182 
183 #define LikePrimary(h, s, l) \
184  primary_hsl.ShiftHue(h ## f).Saturated(primary_is_gray ? 0 : s ## f) \
185  .Lighter(l ## f).ToRGB()
186 #define LikeSecondary(h, s, l) \
187  secondary_hsl.ShiftHue(h ## f).Saturated(secondary_is_gray ? 0 : s ## f) \
188  .Lighter(l ## f).ToRGB()
189 
190  m_page_border_pen = wxColour(218,219,220); // LikePrimary(1.4, 0.00, -0.2); // LikePrimary(1.4, 0.00, -0.08);
191 
192  // these are all needed for galleries (which are drawn using base class methods)
193  m_page_background_top_colour = wxColour(245,246,247); // wxColour(254,254,254); //
194  m_page_background_top_gradient_colour = wxColour(245,246,247); // wxColour(242,244,246);
195  m_page_background_colour = wxColour(245,246,247);
196  m_page_background_gradient_colour = wxColour(245,246,247); // wxColour(229,233,238);
197 
198  m_tab_active_background_colour = wxColour(245,246,247); // LikePrimary(1.0, 1.0, 0.94);
199  m_tab_active_background_gradient_colour = *wxBLUE; // wxColour(250,250,250); // LikePrimary(1.0, 1.0, 0.94);
200  m_tab_separator_colour = wxColour (245,246,247); // LikePrimary(0.9, 0.24, 0.05);
201  m_tab_ctrl_background_brush = wxColour(254,254,254); // LikePrimary(1.0, 0.39, 0.07);
202  m_tab_hover_background_colour = wxColour(253,253,253); // LikePrimary(1.3, 0.15, 0.10);
203  m_tab_hover_background_top_colour = *wxBLUE; // wxColour(254,254,254); // LikePrimary(1.4, 0.36, 0.08);
204  m_tab_border_pen = wxColour(218,219,220); // LikePrimary(1.4, 0.03, -0.05);
205  m_tab_separator_gradient_colour = LikePrimary(1.7, -0.15, -0.18);
206  m_tab_hover_background_top_gradient_colour = *wxBLUE; // wxColour(254,254,254); // LikePrimary(1.8, 0.34, 0.13);
207  m_tab_label_colour = LikePrimary(4.3, 0.13, -0.49);
208  m_tab_hover_background_gradient_colour = *wxBLUE; // LikeSecondary(-1.5, -0.34, 0.01);
209 
210  m_panel_minimised_border_gradient_pen = wxColour(232,239,247); // LikePrimary(-6.9, -0.17, -0.09);
211  m_panel_minimised_border_pen = wxColour(164, 206, 249); // LikePrimary(-5.3, -0.24, -0.06);
212  m_panel_border_gradient_pen = *wxBLUE; // LikePrimary(-5.2, -0.15, -0.06);
213  m_panel_border_pen = wxColour(226,227,228); // LikePrimary(-2.8, -0.32, 0.02);
214  m_panel_hover_label_background_brush = *wxBLUE; // LikePrimary(1.0, 0.30, 0.09);
215  m_panel_active_background_colour = LikePrimary(1.6, -0.18, 0.18);
216  m_panel_active_background_gradient_colour = LikePrimary(0.5, 0.34, 0.05);
217  m_panel_label_colour = LikePrimary(2.8, -0.14, -0.45); // LikePrimary(2.8, -0.14, -0.35);
218  m_panel_minimised_label_colour = m_tab_label_colour;
219  m_panel_hover_button_background_brush = wxColour(232,239,247); //LikeSecondary(-0.9, 0.16, -0.07);
220  m_panel_hover_button_border_pen = wxColour(164, 206, 249); // LikeSecondary(-3.9, -0.16, -0.14);
221  SetColour(wxRIBBON_ART_PANEL_BUTTON_FACE_COLOUR, LikePrimary(1.4, -0.21, -0.23));
222  SetColour(wxRIBBON_ART_PANEL_BUTTON_HOVER_FACE_COLOUR, LikePrimary(1.5, -0.24, -0.29));
223 
224  m_button_bar_label_colour = LikePrimary(2.8, -0.14, -0.6); // m_tab_label_colour;
225  m_button_bar_hover_border_pen = wxColour(164, 206, 249); // LikeSecondary(-6.2, 0.47, -0.1); // LikeSecondary(-6.2, -0.47, -0.14);
226  m_button_bar_hover_background_gradient_colour = wxColour(232,239,247); // LikeSecondary(-0.6, 0.16, 0.2); // LikeSecondary(-0.6, 0.16, 0.04);
227  m_button_bar_hover_background_colour = wxColour(232,239,247); // LikeSecondary(-0.2, 0.16, -0.01); // LikeSecondary(-0.2, 0.16, -0.10);
228  m_button_bar_hover_background_top_gradient_colour = wxColour(232,239,247); // LikeSecondary(0.2, 0.16, 0.03); // LikeSecondary(0.2, 0.16, 0.03);
229  // m_button_bar_hover_background_top_colour = *wxRED; // LikeSecondary(8.8, 0.16, 0.17); // LikeSecondary(8.8, 0.16, 0.17);
230  m_button_bar_active_border_pen = wxColour(102,167,232); // LikeSecondary(-6.2, -0.47, -0.25);
231  m_button_bar_active_background_top_colour = *wxYELLOW; // LikeSecondary(-8.4, 0.08, 0.06);
232  m_button_bar_active_background_top_gradient_colour = *wxYELLOW; // LikeSecondary(-9.7, 0.13, -0.07);
233  m_button_bar_active_background_colour = wxColour(209,232,255); // LikeSecondary(-9.9, 0.14, -0.14);
234  m_button_bar_active_background_gradient_colour = *wxYELLOW; // LikeSecondary(-8.7, 0.17, -0.03);
235 
236  m_gallery_button_disabled_background_colour = LikePrimary(-2.8, -0.46, 0.09);
237  m_gallery_button_disabled_background_top_brush = LikePrimary(-2.8, -0.36, 0.15);
238  m_gallery_hover_background_brush = LikePrimary(-0.8, 0.05, 0.15);
239  m_gallery_border_pen = LikePrimary(0.7, -0.02, 0.03);
240  m_gallery_button_background_top_brush = LikePrimary(0.8, 0.34, 0.13);
241  m_gallery_button_background_colour = LikePrimary(1.3, 0.10, 0.08);
242  // SetColour used so that the relevant bitmaps are generated
243  SetColour(wxRIBBON_ART_GALLERY_BUTTON_FACE_COLOUR, LikePrimary(1.4, -0.21, -0.23));
244  SetColour(wxRIBBON_ART_GALLERY_BUTTON_HOVER_FACE_COLOUR, LikePrimary(1.5, -0.24, -0.29));
245  SetColour(wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_FACE_COLOUR, LikePrimary(1.5, -0.24, -0.29));
246  SetColour(wxRIBBON_ART_GALLERY_BUTTON_DISABLED_FACE_COLOUR, LikePrimary(0.0, -1.0, 0.0));
247  m_gallery_button_disabled_background_gradient_colour = LikePrimary(1.5, -0.43, 0.12);
248  m_gallery_button_background_gradient_colour = LikePrimary(1.7, 0.11, 0.09);
249  m_gallery_item_border_pen = LikeSecondary(-3.9, -0.16, -0.14);
250  m_gallery_button_hover_background_colour = m_button_bar_hover_background_colour; // LikeSecondary(-0.9, 0.16, -0.07);
251  m_gallery_button_hover_background_gradient_colour = m_button_bar_hover_background_gradient_colour; // LikeSecondary(0.1, 0.12, 0.03);
252  m_gallery_button_hover_background_top_brush = m_button_bar_hover_background_top_gradient_colour; // LikeSecondary(4.3, 0.16, 0.17);
253  m_gallery_button_active_background_colour = LikeSecondary(-9.9, 0.03, -0.22);
254  m_gallery_button_active_background_gradient_colour = LikeSecondary(-9.5, 0.14, -0.11);
255  m_gallery_button_active_background_top_brush = LikeSecondary(-9.0, 0.15, -0.08);
256 
257  m_toolbar_border_pen = m_button_bar_hover_border_pen; // LikePrimary(1.4, -0.21, -0.16);
258  SetColour(wxRIBBON_ART_TOOLBAR_FACE_COLOUR, LikePrimary(1.4, -0.17, -0.22));
259  m_tool_background_top_colour = LikePrimary(-1.9, -0.07, 0.06);
260  m_tool_background_top_gradient_colour = LikePrimary(1.4, 0.12, 0.08);
261  m_tool_background_colour = wxColour(232,239,247); // LikePrimary(1.4, -0.09, 0.03);
262  m_tool_background_gradient_colour = *wxRED; // LikePrimary(1.9, 0.11, 0.09);
263  m_tool_hover_background_top_colour = m_button_bar_hover_background_top_colour; // LikeSecondary(3.4, 0.11, 0.16);
264  m_tool_hover_background_top_gradient_colour = m_button_bar_hover_background_top_gradient_colour; // LikeSecondary(-1.4, 0.04, 0.08);
265  m_tool_hover_background_colour = m_button_bar_hover_background_colour; // LikeSecondary(-1.8, 0.16, -0.12);
266  m_tool_hover_background_gradient_colour = m_button_bar_hover_background_gradient_colour; // LikeSecondary(-2.6, 0.16, 0.05);
267  m_tool_active_background_top_colour = LikeSecondary(-9.9, -0.12, -0.09);
268  m_tool_active_background_top_gradient_colour = LikeSecondary(-8.5, 0.16, -0.12);
269  m_tool_active_background_colour = LikeSecondary(-7.9, 0.16, -0.20);
270  m_tool_active_background_gradient_colour = LikeSecondary(-6.6, 0.16, -0.10);
271 
272 #undef LikePrimary
273 #undef LikeSecondary
274 
275  // Invalidate cached tab separator
276  m_cached_tab_separator_visibility = -1.0;
277 }
278 
279 void wxRibbonMetroArtProvider::SetFlags(long flags)
280 {
281  if((flags ^ m_flags) & wxRIBBON_BAR_FLOW_VERTICAL)
282  {
283  if(flags & wxRIBBON_BAR_FLOW_VERTICAL)
284  {
285  m_page_border_left++;
286  m_page_border_right++;
287  m_page_border_top--;
288  m_page_border_bottom--;
289  }
290  else
291  {
292  m_page_border_left--;
293  m_page_border_right--;
294  m_page_border_top++;
295  m_page_border_bottom++;
296  }
297  }
298  m_flags = flags;
299 
300  // Need to reload some bitmaps when flags change
301 #define Reload(setting) SetColour(setting, GetColour(setting))
302  Reload(wxRIBBON_ART_GALLERY_BUTTON_FACE_COLOUR);
303  Reload(wxRIBBON_ART_GALLERY_BUTTON_HOVER_FACE_COLOUR);
304  Reload(wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_FACE_COLOUR);
305  Reload(wxRIBBON_ART_GALLERY_BUTTON_DISABLED_FACE_COLOUR);
306  Reload(wxRIBBON_ART_PANEL_BUTTON_FACE_COLOUR);
307  Reload(wxRIBBON_ART_PANEL_BUTTON_HOVER_FACE_COLOUR);
308 #undef Reload
309 }
310 void wxRibbonMetroArtProvider::DrawTabCtrlBackground(
311  wxDC& dc,
312  wxWindow* WXUNUSED(wnd),
313  const wxRect& rect)
314 {
315  dc.SetPen(*wxTRANSPARENT_PEN);
316  dc.SetBrush(m_tab_ctrl_background_brush);
317  dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
318 
319  dc.SetPen(m_page_border_pen);
320  if(rect.width > 6)
321  {
322  dc.DrawLine(rect.x, rect.y + rect.height - 1, rect.x + rect.width, rect.y + rect.height - 1);
323  }
324  else
325  {
326  dc.DrawLine(rect.x, rect.y + rect.height - 1, rect.x + rect.width, rect.y + rect.height - 1);
327  }
328 }
329 
330 void wxRibbonMetroArtProvider::DrawTab(
331  wxDC& dc,
332  wxWindow* WXUNUSED(wnd),
333  const wxRibbonPageTabInfo& tab)
334 {
335  if(tab.rect.height <= 2)
336  return;
337 
338  if(tab.active || tab.hovered)
339  {
340  if(tab.active)
341  {
342  wxRect background(tab.rect);
343 
344  background.x += 2;
345  background.y += 1;
346  background.width -= 3;
347  background.height -= 1;
348 
349  dc.SetPen(*wxTRANSPARENT_PEN);
350  dc.SetBrush(m_tab_active_background_colour);
351  dc.DrawRectangle(background);
352 
353  // TODO: active and hovered
354  }
355  else if(tab.hovered)
356  {
357  wxRect background(tab.rect);
358 
359  background.x += 2;
360  background.y += 1;
361  background.width -= 3;
362  background.height -= 2;
363  dc.SetPen(*wxTRANSPARENT_PEN);
364  dc.SetBrush(m_tab_hover_background_colour);
365  dc.DrawRectangle(background);
366  }
367 
368  wxPoint border_points[4];
369  border_points[0] = wxPoint(1, tab.rect.height - 2);
370  border_points[1] = wxPoint(1, 0);
371  border_points[2] = wxPoint(tab.rect.width - 1, 0);
372  border_points[3] = wxPoint(tab.rect.width - 1, tab.rect.height - 1);
373 
374  if (tab.active)
375  dc.SetPen(m_tab_border_pen);
376  else
377  dc.SetPen(m_tab_border_pen); // TODO: introduce hover border pen colour
378  dc.DrawLines(sizeof(border_points)/sizeof(wxPoint), border_points, tab.rect.x, tab.rect.y);
379  }
380 
381  if(m_flags & wxRIBBON_BAR_SHOW_PAGE_ICONS)
382  {
383  wxBitmap icon = tab.page->GetIcon();
384  if(icon.IsOk())
385  {
386  int x = tab.rect.x + 4;
387  if((m_flags & wxRIBBON_BAR_SHOW_PAGE_LABELS) == 0)
388  x = tab.rect.x + (tab.rect.width - icon.GetWidth()) / 2;
389  dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 -
390  icon.GetHeight()) / 2, true);
391  }
392  }
393  if(m_flags & wxRIBBON_BAR_SHOW_PAGE_LABELS)
394  {
395  wxString label = tab.page->GetLabel();
396  if(!label.IsEmpty())
397  {
398  dc.SetFont(m_tab_label_font);
399  dc.SetTextForeground(m_tab_label_colour);
400  dc.SetBackgroundMode(wxTRANSPARENT);
401 
402  int text_height;
403  int text_width;
404  dc.GetTextExtent(label, &text_width, &text_height);
405  int width = tab.rect.width - 5;
406  int x = tab.rect.x + 3;
407  if(m_flags & wxRIBBON_BAR_SHOW_PAGE_ICONS)
408  {
409  x += 3 + tab.page->GetIcon().GetWidth();
410  width -= 3 + tab.page->GetIcon().GetWidth();
411  }
412  int y = tab.rect.y + (tab.rect.height - text_height) / 2;
413 
414  if(width <= text_width)
415  {
416  dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height);
417  dc.DrawText(label, x, y);
418  }
419  else
420  {
421  dc.DrawText(label, x + (width - text_width) / 2 + 1, y);
422  }
423  }
424  }
425 }
426 
427 void wxRibbonMetroArtProvider::DrawPartialPageBackground(wxDC& dc,
428  wxWindow* wnd, const wxRect& rect, wxRibbonPage* page,
429  wxPoint offset, bool hovered)
430 {
431  wxRect background;
432  // Expanded panels need a background - the expanded panel at
433  // best size may have a greater Y dimension higher than when
434  // on the bar if it has a sizer. AUI art provider does not need this
435  // because it paints the panel without reference to its parent's size.
436  // Expanded panels use a wxFrame as parent (not a wxRibbonPage).
437 
438  if(wnd->GetSizer() && wnd->GetParent() != page)
439  {
440  background = wnd->GetParent()->GetSize();
441  offset = wxPoint(0,0);
442  }
443  else
444  {
445  background = page->GetSize();
446  page->AdjustRectToIncludeScrollButtons(&background);
447  background.height -= 2;
448  }
449  // Page background isn't dependant upon the width of the page
450  // (at least not the part of it intended to be painted by this
451  // function). Set to wider than the page itself for when externally
452  // expanded panels need a background - the expanded panel can be wider
453  // than the bar.
454  background.x = 0;
455  background.width = INT_MAX;
456 
457  wxRect paint_rect(rect);
458 
459  dc.SetPen(*wxTRANSPARENT_PEN);
460  dc.SetBrush(m_page_background_colour);
461  dc.DrawRectangle(rect);
462 }
463 
464 void wxRibbonMetroArtProvider::DrawPageBackground(
465  wxDC& dc,
466  wxWindow* WXUNUSED(wnd),
467  const wxRect& rect)
468 {
469  wxRect background(rect);
470 
471  dc.SetPen(*wxTRANSPARENT_PEN);
472  dc.SetBrush(m_page_background_colour);
473  dc.DrawRectangle(background);
474  background.width += 1;
475  dc.SetPen(m_page_border_pen);
476  dc.DrawLine(background.GetBottomLeft(), background.GetBottomRight());
477 }
478 
479 void wxRibbonMetroArtProvider::DrawPanelBackground(
480  wxDC& dc,
481  wxRibbonPanel* wnd,
482  const wxRect& rect)
483 {
484  DrawPartialPageBackground(dc, wnd, rect, false);
485 
486  wxRect true_rect(rect);
487  RemovePanelPadding(&true_rect);
488  bool has_ext_button = wnd->HasExtButton();
489 
490  // draw panel label
491  {
492  // int label_height;
493  dc.SetFont(m_panel_label_font);
494  dc.SetPen(*wxTRANSPARENT_PEN);
495  dc.SetBrush(*wxTRANSPARENT_BRUSH);
496  dc.SetTextForeground(m_panel_label_colour);
497 
498  wxRect label_rect(true_rect);
499  wxString label = wnd->GetLabel();
500  bool clip_label = false;
501  wxSize label_size(dc.GetTextExtent(label));
502 
503  label_rect.SetX(label_rect.GetX() + 1);
504  label_rect.SetWidth(label_rect.GetWidth() - 2);
505  label_rect.SetHeight(label_size.GetHeight() + 2);
506  label_rect.SetY(true_rect.GetBottom() - label_rect.GetHeight());
507  // label_height = label_rect.GetHeight();
508 
509  wxRect label_bg_rect = label_rect;
510 
511  if(has_ext_button)
512  label_rect.SetWidth(label_rect.GetWidth() - 13);
513 
514  if(label_size.GetWidth() > label_rect.GetWidth())
515  {
516  // Test if there is enough length for 3 letters and ...
517  wxString new_label = label.Mid(0, 3) + wxT("...");
518  label_size = dc.GetTextExtent(new_label);
519  if(label_size.GetWidth() > label_rect.GetWidth())
520  {
521  // Not enough room for three characters and ...
522  // Display the entire label and just crop it
523  clip_label = true;
524  }
525  else
526  {
527  // Room for some characters and ...
528  // Display as many characters as possible and append ...
529  for(size_t len = label.Len() - 1; len >= 3; --len)
530  {
531  new_label = label.Mid(0, len) + wxT("...");
532  label_size = dc.GetTextExtent(new_label);
533  if(label_size.GetWidth() <= label_rect.GetWidth())
534  {
535  label = new_label;
536  break;
537  }
538  }
539  }
540  }
541 
542  dc.DrawRectangle(label_bg_rect);
543  if(clip_label)
544  {
545  wxDCClipper clip(dc, label_rect);
546  dc.DrawText(label, label_rect.x, label_rect.y +
547  (label_rect.GetHeight() - label_size.GetHeight()) / 2);
548  }
549  else
550  {
551  dc.DrawText(label, label_rect.x +
552  (label_rect.GetWidth() - label_size.GetWidth()) / 2,
553  label_rect.y +
554  (label_rect.GetHeight() - label_size.GetHeight()) / 2);
555  }
556 
557  if(has_ext_button)
558  {
559  if(wnd->IsExtButtonHovered())
560  {
561  dc.SetPen(m_panel_hover_button_border_pen);
562  dc.SetBrush(m_panel_hover_button_background_brush);
563  dc.DrawRectangle(label_rect.GetRight(), label_rect.GetBottom() - 14, 14, 14);
564  dc.DrawBitmap(m_panel_extension_bitmap[1], label_rect.GetRight() + 3, label_rect.GetBottom() - 10, true);
565  }
566  else
567  dc.DrawBitmap(m_panel_extension_bitmap[0], label_rect.GetRight() + 3, label_rect.GetBottom() - 10, true);
568  }
569  }
570 
571  if (wnd->GetParent()->IsKindOf(CLASSINFO(wxFrame))) // expanded panels are in their own wxFrame otherwise normal panel
572  {
573  wxRect shadow(rect);
574  shadow.x +=4;
575  shadow.y +=4;
576  dc.SetPen(*wxRED);
577  dc.DrawLine(shadow.GetBottomLeft(), shadow.GetBottomRight());
578  dc.DrawLine(shadow.GetTopRight(), shadow.GetBottomRight());
579  dc.SetBrush(*wxTRANSPARENT_BRUSH);
580  dc.SetPen(m_panel_border_pen);
581  dc.DrawRoundedRectangle(rect, 1.0);
582  }
583  else
584  DrawPanelBorder(dc, true_rect, m_panel_border_pen, m_panel_border_gradient_pen);
585 }
586 
587 void wxRibbonMetroArtProvider::DrawPanelBorder(wxDC& dc, const wxRect& rect,
588  wxPen& primary_colour,
589  wxPen& secondary_colour)
590 {
591  dc.SetPen(m_panel_border_pen);
592  dc.DrawLine(rect.GetTopRight(), rect.GetBottomRight());
593 }
594 
595 void wxRibbonMetroArtProvider::DrawMinimisedPanel(
596  wxDC& dc,
597  wxRibbonPanel* wnd,
598  const wxRect& rect,
599  wxBitmap& bitmap)
600 {
601  DrawPartialPageBackground(dc, wnd, rect, false);
602 
603  wxRect true_rect(rect);
604  // RemovePanelPadding(&true_rect);
605 
606  wxRect client_rect(true_rect);
607  client_rect.width -= 2;
608  client_rect.y++;
609  client_rect.height -= 2;
610 
611  if(wnd->GetExpandedPanel() != NULL)
612  {
613  dc.SetPen(m_button_bar_active_border_pen);
614  dc.SetBrush (m_button_bar_active_background_colour);
615  dc.DrawRectangle(client_rect);
616  }
617  else if(wnd->IsHovered())
618  {
619  dc.SetPen(m_button_bar_hover_border_pen);
620  dc.SetBrush (m_panel_active_background_colour);
621  dc.DrawRectangle(client_rect);
622  }
623  else {
624  dc.SetPen(m_button_bar_hover_border_pen);
625  dc.SetBrush (m_button_bar_hover_background_colour);
626  dc.DrawRectangle(client_rect);
627  }
628 
629  wxRect preview;
630  DrawMinimisedPanelCommon(dc, wnd, true_rect, &preview);
631  dc.SetBrush(m_panel_active_background_colour);
632  dc.SetPen(m_button_bar_hover_border_pen);
633  dc.DrawRectangle(preview);
634 
635  if(bitmap.IsOk())
636  {
637  dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetWidth()) / 2,
638  preview.y + (preview.height - 7 - bitmap.GetHeight()) / 2, true);
639  }
640 
641  DrawPanelBorder(dc, true_rect, m_panel_border_pen, m_panel_border_gradient_pen);
642 }
643 
644 void wxRibbonMetroArtProvider::DrawMinimisedPanelCommon(
645  wxDC& dc,
646  wxRibbonPanel* wnd,
647  const wxRect& true_rect,
648  wxRect* preview_rect)
649 {
650  wxRect preview(0, 0, 32, 32);
651  if(m_flags & wxRIBBON_BAR_FLOW_VERTICAL)
652  {
653  preview.x = true_rect.x + 4;
654  preview.y = true_rect.y + (true_rect.height - preview.height) / 2;
655  }
656  else
657  {
658  preview.x = true_rect.x + (true_rect.width - preview.width) / 2;
659  preview.y = true_rect.y + 4;
660  }
661  if(preview_rect)
662  *preview_rect = preview;
663 
664  wxCoord label_width, label_height;
665  dc.SetFont(m_panel_label_font);
666  dc.GetTextExtent(wnd->GetLabel(), &label_width, &label_height);
667 
668  int xpos = true_rect.x + (true_rect.width - label_width + 1) / 2;
669  int ypos = preview.y + preview.height + 5;
670 
671  if(m_flags & wxRIBBON_BAR_FLOW_VERTICAL)
672  {
673  xpos = preview.x + preview.width + 5;
674  ypos = true_rect.y + (true_rect.height - label_height) / 2;
675  }
676 
677  dc.SetTextForeground(m_panel_minimised_label_colour);
678  dc.DrawText(wnd->GetLabel(), xpos, ypos);
679 
680 
681  wxPoint arrow_points[3];
682  if(m_flags & wxRIBBON_BAR_FLOW_VERTICAL)
683  {
684  xpos += label_width;
685  arrow_points[0] = wxPoint(xpos + 5, ypos + label_height / 2);
686  arrow_points[1] = arrow_points[0] + wxPoint(-3, 3);
687  arrow_points[2] = arrow_points[0] + wxPoint(-3, -3);
688  }
689  else
690  {
691  ypos += label_height;
692  arrow_points[0] = wxPoint(true_rect.width / 2, ypos + 5);
693  arrow_points[1] = arrow_points[0] + wxPoint(-3, -3);
694  arrow_points[2] = arrow_points[0] + wxPoint( 3, -3);
695  }
696 
697  dc.SetPen(*wxTRANSPARENT_PEN);
698  wxBrush B(m_panel_minimised_label_colour);
699  dc.SetBrush(B);
700  dc.DrawPolygon(sizeof(arrow_points)/sizeof(wxPoint), arrow_points,
701  true_rect.x, true_rect.y);
702 }
703 
704 void wxRibbonMetroArtProvider::DrawButtonBarBackground(
705  wxDC& dc,
706  wxWindow* wnd,
707  const wxRect& rect)
708 {
709  DrawPartialPageBackground(dc, wnd, rect, true);
710 }
711 
712 void wxRibbonMetroArtProvider::DrawPartialPageBackground(
713  wxDC& dc,
714  wxWindow* wnd,
715  const wxRect& rect,
716  bool allow_hovered)
717 {
718  // Assume the window is a child of a ribbon page, and also check for a
719  // hovered panel somewhere between the window and the page, as it causes
720  // the background to change.
721  wxPoint offset(wnd->GetPosition());
722  wxRibbonPage* page = NULL;
723  wxWindow* parent = wnd->GetParent();
724  wxRibbonPanel* panel = wxDynamicCast(wnd, wxRibbonPanel);
725  bool hovered = false;
726 
727  if(panel != NULL)
728  {
729  hovered = allow_hovered && panel->IsHovered();
730  if(panel->GetExpandedDummy() != NULL)
731  {
732  offset = panel->GetExpandedDummy()->GetPosition();
733  parent = panel->GetExpandedDummy()->GetParent();
734  }
735  }
736  for(; parent; parent = parent->GetParent())
737  {
738  if(panel == NULL)
739  {
740  panel = wxDynamicCast(parent, wxRibbonPanel);
741  if(panel != NULL)
742  {
743  hovered = allow_hovered && panel->IsHovered();
744  if(panel->GetExpandedDummy() != NULL)
745  {
746  parent = panel->GetExpandedDummy();
747  }
748  }
749  }
750  page = wxDynamicCast(parent, wxRibbonPage);
751  if(page != NULL)
752  {
753  break;
754  }
755  offset += parent->GetPosition();
756  }
757  if(page != NULL)
758  {
759  DrawPartialPageBackground(dc, wnd, rect, page, offset, hovered);
760  return;
761  }
762 
763  // No page found - fallback to painting with a stock brush
764  dc.SetBrush(*wxWHITE_BRUSH);
765  dc.SetPen(*wxTRANSPARENT_PEN);
766  dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height);
767 }
768 
769 void wxRibbonMetroArtProvider::DrawButtonBarButton(
770  wxDC& dc,
771  wxWindow* WXUNUSED(wnd),
772  const wxRect& rect,
773  wxRibbonButtonKind kind,
774  long state,
775  const wxString& label,
776  const wxBitmap& bitmap_large,
777  const wxBitmap& bitmap_small)
778 {
779  if(kind == wxRIBBON_BUTTON_TOGGLE)
780  {
781  kind = wxRIBBON_BUTTON_NORMAL;
782  if(state & wxRIBBON_BUTTONBAR_BUTTON_TOGGLED)
783  state ^= wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK;
784  }
785 
786  if(state & (wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK |
787  wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK))
788  {
789  if(state & wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK)
790  dc.SetPen(m_button_bar_active_border_pen);
791  else
792  dc.SetPen(m_button_bar_hover_border_pen);
793 
794  wxRect bg_rect(rect);
795  bg_rect.x++;
796  bg_rect.y++;
797  bg_rect.width -= 2;
798  bg_rect.height -= 2;
799 
800  wxRect bg_rect_top(bg_rect);
801  bg_rect_top.height /= 3;
802  bg_rect.y += bg_rect_top.height;
803  bg_rect.height -= bg_rect_top.height;
804 
805  if(kind == wxRIBBON_BUTTON_HYBRID)
806  {
807  switch(state & wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK)
808  {
809  case wxRIBBON_BUTTONBAR_BUTTON_LARGE:
810  {
811  int iYBorder = rect.y + bitmap_large.GetHeight() + 4;
812  wxRect partial_bg(rect);
813  if(state & wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED)
814  {
815  partial_bg.SetBottom(iYBorder - 1);
816  }
817  else
818  {
819  partial_bg.height -= (iYBorder - partial_bg.y + 1);
820  partial_bg.y = iYBorder + 1;
821  }
822  dc.DrawLine(rect.x, iYBorder, rect.x + rect.width, iYBorder);
823  bg_rect.Intersect(partial_bg);
824  bg_rect_top.Intersect(partial_bg);
825  }
826  break;
827  case wxRIBBON_BUTTONBAR_BUTTON_MEDIUM:
828  {
829  int iArrowWidth = 9;
830  if(state & wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED)
831  {
832  bg_rect.width -= iArrowWidth;
833  bg_rect_top.width -= iArrowWidth;
834  dc.DrawLine(bg_rect_top.x + bg_rect_top.width,
835  rect.y, bg_rect_top.x + bg_rect_top.width,
836  rect.y + rect.height);
837  }
838  else
839  {
840  --iArrowWidth;
841  bg_rect.x += bg_rect.width - iArrowWidth;
842  bg_rect_top.x += bg_rect_top.width - iArrowWidth;
843  bg_rect.width = iArrowWidth;
844  bg_rect_top.width = iArrowWidth;
845  dc.DrawLine(bg_rect_top.x - 1, rect.y,
846  bg_rect_top.x - 1, rect.y + rect.height);
847  }
848  }
849  break;
850  case wxRIBBON_BUTTONBAR_BUTTON_SMALL:
851  break;
852  }
853  }
854 
855  if(state & wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK)
856  {
857  dc.SetPen(*wxTRANSPARENT_PEN);
858  dc.SetBrush(m_button_bar_active_background_colour);
859  dc.DrawRectangle(bg_rect_top);
860  dc.DrawRectangle(bg_rect);
861 
862  }
863  else
864  {
865  dc.SetPen(*wxTRANSPARENT_PEN);
866  dc.SetBrush(m_button_bar_hover_background_colour);
867  dc.DrawRectangle(bg_rect_top);
868  dc.DrawRectangle(bg_rect);
869  }
870 
871  if(state & wxRIBBON_BUTTONBAR_BUTTON_ACTIVE_MASK)
872  dc.SetPen(m_button_bar_active_border_pen);
873  else
874  dc.SetPen(m_button_bar_hover_border_pen);
875 
876  dc.SetBrush(*wxTRANSPARENT_BRUSH);
877  dc.DrawRectangle(rect);
878  }
879 
880  dc.SetFont(m_button_bar_label_font);
881  dc.SetTextForeground(m_button_bar_label_colour);
882  DrawButtonBarButtonForeground(dc, rect, kind, state, label, bitmap_large,
883  bitmap_small);
884 }
885 
886 void wxRibbonMetroArtProvider::DrawButtonBarButtonForeground(
887  wxDC& dc,
888  const wxRect& rect,
889  wxRibbonButtonKind kind,
890  long state,
891  const wxString& label,
892  const wxBitmap& bitmap_large,
893  const wxBitmap& bitmap_small)
894 {
895  switch(state & wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK)
896  {
897  case wxRIBBON_BUTTONBAR_BUTTON_LARGE:
898  {
899  const int padding = 2;
900  dc.DrawBitmap(bitmap_large,
901  rect.x + (rect.width - bitmap_large.GetWidth()) / 2,
902  rect.y + padding, true);
903  int ypos = rect.y + padding + bitmap_large.GetHeight() + padding;
904  int arrow_width = kind == wxRIBBON_BUTTON_NORMAL ? 0 : 8;
905  wxCoord label_w, label_h;
906  dc.GetTextExtent(label, &label_w, &label_h);
907  if(label_w + 2 * padding <= rect.width)
908  {
909  dc.DrawText(label, rect.x + (rect.width - label_w) / 2, ypos);
910  if(arrow_width != 0)
911  {
912  DrawDropdownArrow(dc, rect.x + rect.width / 2,
913  ypos + (label_h * 3) / 2,
914  m_button_bar_label_colour);
915  }
916  }
917  else
918  {
919  size_t breaki = label.Len();
920  do
921  {
922  --breaki;
923  if(wxRibbonCanLabelBreakAtPosition(label, breaki))
924  {
925  wxString label_top = label.Mid(0, breaki);
926  dc.GetTextExtent(label_top, &label_w, &label_h);
927  if(label_w + 2 * padding <= rect.width)
928  {
929  dc.DrawText(label_top,
930  rect.x + (rect.width - label_w) / 2, ypos);
931  ypos += label_h;
932  wxString label_bottom = label.Mid(breaki + 1);
933  dc.GetTextExtent(label_bottom, &label_w, &label_h);
934  label_w += arrow_width;
935  int iX = rect.x + (rect.width - label_w) / 2;
936  dc.DrawText(label_bottom, iX, ypos);
937  if(arrow_width != 0)
938  {
939  DrawDropdownArrow(dc,
940  iX + 2 +label_w - arrow_width,
941  ypos + label_h / 2 + 1,
942  m_button_bar_label_colour);
943  }
944  break;
945  }
946  }
947  } while(breaki > 0);
948  }
949  }
950  break;
951  case wxRIBBON_BUTTONBAR_BUTTON_MEDIUM:
952  {
953  int x_cursor = rect.x + 2;
954  dc.DrawBitmap(bitmap_small, x_cursor,
955  rect.y + (rect.height - bitmap_small.GetHeight())/2, true);
956  x_cursor += bitmap_small.GetWidth() + 2;
957  wxCoord label_w, label_h;
958  dc.GetTextExtent(label, &label_w, &label_h);
959  dc.DrawText(label, x_cursor,
960  rect.y + (rect.height - label_h) / 2);
961  x_cursor += label_w + 3;
962  if(kind != wxRIBBON_BUTTON_NORMAL)
963  {
964  DrawDropdownArrow(dc, x_cursor, rect.y + rect.height / 2,
965  m_button_bar_label_colour);
966  }
967  break;
968  }
969  default:
970  // TODO
971  break;
972  }
973 }
974 
975 void wxRibbonMetroArtProvider::DrawToolBarBackground(
976  wxDC& dc,
977  wxWindow* wnd,
978  const wxRect& rect)
979 {
980  DrawPartialPageBackground(dc, wnd, rect);
981 }
982 
983 void wxRibbonMetroArtProvider::DrawToolGroupBackground(
984  wxDC& dc,
985  wxWindow* WXUNUSED(wnd),
986  const wxRect& rect)
987 {
988  // TODO: there is no DrawToolGroupSeparator method currently
989  wxRect line;
990  line.x = rect.GetRight() + 4;
991  line.y = rect.GetY() + 5;
992  line.width = 1;
993  line.height = rect.GetHeight() - 10;
994  dc.GradientFillLinear(line, wxColour(232,234,237), wxColour(178,183,189), wxSOUTH);
995 }
996 
997 void wxRibbonMetroArtProvider::DrawTool(
998  wxDC& dc,
999  wxWindow* WXUNUSED(wnd),
1000  const wxRect& rect,
1001  const wxBitmap& bitmap,
1002  wxRibbonButtonKind kind,
1003  long state)
1004 {
1005  if(kind == wxRIBBON_BUTTON_TOGGLE)
1006  {
1007  if(state & wxRIBBON_TOOLBAR_TOOL_TOGGLED)
1008  state ^= wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK;
1009  }
1010 
1011  wxRect bg_rect(rect);
1012  bg_rect.Deflate(1);
1013  if((state & wxRIBBON_TOOLBAR_TOOL_LAST) == 0)
1014  bg_rect.width++;
1015 
1016  bool is_split_hybrid = (kind == wxRIBBON_BUTTON_HYBRID && (state &
1017  (wxRIBBON_TOOLBAR_TOOL_HOVER_MASK | wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK)));
1018 
1019  dc.SetPen(m_toolbar_border_pen);
1020 
1021  if(state & wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK)
1022  {
1023  dc.SetBrush(m_tool_background_colour);
1024  dc.DrawRectangle(rect);
1025  }
1026  else if(state & wxRIBBON_TOOLBAR_TOOL_HOVER_MASK)
1027  {
1028  dc.SetBrush(m_tool_hover_background_colour);
1029  dc.DrawRectangle(rect);
1030  }
1031 
1032  // remove the highlight from the non-active split part of the hybrid
1033  if(is_split_hybrid)
1034  {
1035  wxRect nonrect(bg_rect);
1036  if(state & (wxRIBBON_TOOLBAR_TOOL_DROPDOWN_HOVERED |
1037  wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE))
1038  {
1039  nonrect.width -= 8;
1040  }
1041  else
1042  {
1043  nonrect.x += nonrect.width - 8;
1044  nonrect.width = 7;
1045  }
1046  dc.SetPen(*wxTRANSPARENT_PEN);
1047  dc.SetBrush(m_page_background_top_gradient_colour);
1048  dc.DrawRectangle(nonrect.x, nonrect.y, nonrect.width, nonrect.height);
1049  }
1050 
1051  // Foreground
1052  int avail_width = bg_rect.GetWidth();
1053  if(kind & wxRIBBON_BUTTON_DROPDOWN)
1054  {
1055  avail_width -= 8;
1056  if(is_split_hybrid)
1057  {
1058  dc.SetPen(m_toolbar_border_pen);
1059  dc.DrawLine(rect.x + avail_width + 1, rect.y,
1060  rect.x + avail_width + 1, rect.y + rect.height);
1061  }
1062  dc.DrawBitmap(m_toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
1063  bg_rect.y + (bg_rect.height / 2) - 2, true);
1064  }
1065  dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetWidth()) / 2,
1066  bg_rect.y + (bg_rect.height - bitmap.GetHeight()) / 2, true);
1067 }
1068 
-
- - - - diff --git a/docs/doxygen/html/_art_metro_8h_source.html b/docs/doxygen/html/_art_metro_8h_source.html deleted file mode 100644 index b64d1d2..0000000 --- a/docs/doxygen/html/_art_metro_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/ArtMetro.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ArtMetro.h
-
-
-
1 // Name: wx/ribbon/art.h
3 // Purpose: Art providers for ribbon-bar-style interface
4 // Author: Peter Cawley
5 // Modified by:
6 // Created: 2009-05-25
7 // RCS-ID: $Id$
8 // Copyright: (C) Peter Cawley
9 // Licence: wxWindows licence
11 
12 #ifndef _WX_RIBBON_METRO_ART_H_
13 #define _WX_RIBBON_METRO_ART_H_
14 
15 #include "wx/defs.h"
16 
17 #include "wx/ribbon/art.h"
18 #include "wx/brush.h"
19 #include "wx/colour.h"
20 #include "wx/font.h"
21 #include "wx/pen.h"
22 #include "wx/bitmap.h"
23 
24 class WXDLLIMPEXP_FWD_CORE wxDC;
25 class WXDLLIMPEXP_FWD_CORE wxWindow;
26 
27 // class WXDLLIMPEXP_RIBBON wxRibbonMetroArtProvider : public wxRibbonArtProvider
28 class wxRibbonMetroArtProvider : public wxRibbonMSWArtProvider
29 {
30 public:
31  wxRibbonMetroArtProvider(bool set_colour_scheme = true);
32  virtual ~wxRibbonMetroArtProvider();
33  void SetFlags(long flags);
34 
35  void GetColourScheme(wxColour* primary,
36  wxColour* secondary,
37  wxColour* tertiary) const;
38  /*
39  int GetTabCtrlHeight(
40  wxDC& dc,
41  wxWindow* wnd,
42  const wxRibbonPageTabInfoArray& pages);
43  */
44  void SetColourScheme(const wxColour& primary,
45  const wxColour& secondary,
46  const wxColour& tertiary);
47  void DrawTabCtrlBackground(
48  wxDC& dc,
49  wxWindow* wnd,
50  const wxRect& rect);
51 
52  void DrawTab(wxDC& dc,
53  wxWindow* wnd,
54  const wxRibbonPageTabInfo& tab);
55 
56  void DrawPageBackground(
57  wxDC& dc,
58  wxWindow* wnd,
59  const wxRect& rect);
60 
61  void DrawPanelBackground(
62  wxDC& dc,
63  wxRibbonPanel* wnd,
64  const wxRect& rect);
65 
66  void DrawMinimisedPanel(
67  wxDC& dc,
68  wxRibbonPanel* wnd,
69  const wxRect& rect,
70  wxBitmap& bitmap);
71 
72  void DrawButtonBarBackground(
73  wxDC& dc,
74  wxWindow* wnd,
75  const wxRect& rect);
76 
77  void DrawButtonBarButton(
78  wxDC& dc,
79  wxWindow* wnd,
80  const wxRect& rect,
81  wxRibbonButtonKind kind,
82  long state,
83  const wxString& label,
84  const wxBitmap& bitmap_large,
85  const wxBitmap& bitmap_small);
86 
87  void DrawToolBarBackground(
88  wxDC& dc,
89  wxWindow* wnd,
90  const wxRect& rect);
91 
92  void DrawToolGroupBackground(
93  wxDC& dc,
94  wxWindow* wnd,
95  const wxRect& rect);
96 
97  void DrawTool(
98  wxDC& dc,
99  wxWindow* wnd,
100  const wxRect& rect,
101  const wxBitmap& bitmap,
102  wxRibbonButtonKind kind,
103  long state);
104 
105 protected:
106  // void ReallyDrawTabSeparator(wxWindow* wnd, const wxRect& rect, double visibility);
107  void DrawPartialPageBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect,
108  bool allow_hovered = true);
109  void DrawPartialPageBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect,
110  wxRibbonPage* page, wxPoint offset, bool hovered = false);
111  void DrawPanelBorder(wxDC& dc, const wxRect& rect, wxPen& primary_colour,
112  wxPen& secondary_colour);
113 
114  void DrawButtonBarButtonForeground(
115  wxDC& dc,
116  const wxRect& rect,
117  wxRibbonButtonKind kind,
118  long state,
119  const wxString& label,
120  const wxBitmap& bitmap_large,
121  const wxBitmap& bitmap_small);
122  void DrawMinimisedPanelCommon(
123  wxDC& dc,
124  wxRibbonPanel* wnd,
125  const wxRect& rect,
126  wxRect* preview_rect);
127 };
128 
129 #endif // _WX_RIBBON_METRO_ART_H_
-
-
- - - - diff --git a/docs/doxygen/html/_branch_8cpp_source.html b/docs/doxygen/html/_branch_8cpp_source.html deleted file mode 100644 index cdf0040..0000000 --- a/docs/doxygen/html/_branch_8cpp_source.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - -Project/Branch.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Branch.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Branch.h"
19 
20 Branch::Branch() : PowerElement() {}
21 Branch::~Branch() {}
22 bool Branch::NodeContains(wxPoint2DDouble position)
23 {
24  wxRect2DDouble nodeRect1(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
25  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
26  wxRect2DDouble nodeRect2(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize,
27  m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize, 10 + 2.0 * m_borderSize,
28  10 + 2.0 * m_borderSize);
29 
30  if(nodeRect1.Contains(position)) {
31  m_activeNodeID = 1;
32  return true;
33  }
34  if(nodeRect2.Contains(position)) {
35  m_activeNodeID = 2;
36  return true;
37  }
38 
39  m_activeNodeID = 0;
40  return false;
41 }
42 
44 {
45  if(m_activeNodeID == 1 && parent == m_parentList[0]) return false;
46  if(m_activeNodeID == 2 && parent == m_parentList[1]) return false;
47 
48  if(parent && m_activeNodeID != 0) {
49  wxRect2DDouble nodeRect(0, 0, 0, 0);
50  if(m_activeNodeID == 1) {
51  nodeRect = wxRect2DDouble(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
52  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
53  }
54  if(m_activeNodeID == 2) {
55  nodeRect = wxRect2DDouble(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize,
56  m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize,
57  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
58  }
59 
60  if(parent->Intersects(nodeRect)) {
61  if(m_activeNodeID == 1) {
62  // Check if the user is trying to connect the same bus.
63  if(m_parentList[1] == parent) {
64  m_activeNodeID = 0;
65  return false;
66  }
67 
68  m_parentList[0] = parent;
69 
70  // Centralize the node on bus.
71  wxPoint2DDouble parentPt = parent->RotateAtPosition(
72  m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position.
73  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
74  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle());
75  m_pointList[0] = parentPt;
76 
77  UpdateSwitchesPosition();
78  return true;
79  }
80  if(m_activeNodeID == 2) {
81  if(m_parentList[0] == parent) {
82  m_activeNodeID = 0;
83  return false;
84  }
85 
86  m_parentList[1] = parent;
87 
88  wxPoint2DDouble parentPt =
89  parent->RotateAtPosition(m_pointList[m_pointList.size() - 1], -parent->GetAngle());
90  parentPt.m_y = parent->GetPosition().m_y;
91  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle());
92  m_pointList[m_pointList.size() - 1] = parentPt;
93 
94  UpdateSwitchesPosition();
95  return true;
96  }
97  } else {
98  if(m_activeNodeID == 1) m_parentList[0] = NULL;
99  if(m_activeNodeID == 2) m_parentList[1] = NULL;
100  }
101  }
102  return false;
103 }
104 
106 {
107  for(int i = 0; i < 2; i++) {
108  if(parent == m_parentList[i]) {
109  m_parentList[i] = NULL;
110  m_online = false;
111  UpdateSwitchesPosition();
112  }
113  }
114 }
115 
117 {
118  if(m_parentList[0]) {
119  wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
120  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
121 
122  if(!m_parentList[0]->Intersects(nodeRect)) {
123  m_parentList[0]->RemoveChild(this);
124  m_parentList[0] = NULL;
125  m_online = false;
126  UpdateSwitchesPosition();
127  }
128  }
129  if(m_parentList[1]) {
130  wxRect2DDouble nodeRect = wxRect2DDouble(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize,
131  m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize,
132  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
133 
134  if(!m_parentList[1]->Intersects(nodeRect)) {
135  m_parentList[1]->RemoveChild(this);
136  m_parentList[1] = NULL;
137  m_online = false;
138  UpdateSwitchesPosition();
139  }
140  }
141 }
142 
143 void Branch::RotateNode(Element* parent, bool clockwise)
144 {
145  double rotAngle = m_rotationAngle;
146  if(!clockwise) rotAngle = -m_rotationAngle;
147 
148  if(parent == m_parentList[0]) {
149  m_pointList[0] = parent->RotateAtPosition(m_pointList[0], rotAngle);
150  } else if(parent == m_parentList[1]) {
151  m_pointList[m_pointList.size() - 1] = parent->RotateAtPosition(m_pointList[m_pointList.size() - 1], rotAngle);
152  }
153  UpdateSwitchesPosition();
154 }
155 
156 void Branch::UpdateSwitchesPosition()
157 {
158  if(m_parentList[0]) {
159  m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], m_pointList[2]);
160  } else {
161  m_pointList[1] = m_pointList[0];
162  }
163  if(m_parentList[1]) {
164  m_pointList[m_pointList.size() - 2] =
165  GetSwitchPoint(m_parentList[1], m_pointList[m_pointList.size() - 1], m_pointList[m_pointList.size() - 3]);
166  } else {
167  m_pointList[m_pointList.size() - 2] = m_pointList[m_pointList.size() - 1];
168  }
169  UpdateSwitches();
170 }
171 
173 {
174  wxPoint2DDouble swCenter = wxPoint2DDouble((m_pointList[0].m_x + m_pointList[1].m_x) / 2.0,
175  (m_pointList[0].m_y + m_pointList[1].m_y) / 2.0);
176  m_switchRect[0] = wxRect2DDouble(swCenter.m_x - m_switchSize / 2.0, swCenter.m_y - m_switchSize / 2.0, m_switchSize,
177  m_switchSize);
178 
179  if(m_switchRect.size() > 1) {
180  swCenter =
181  wxPoint2DDouble((m_pointList[m_pointList.size() - 1].m_x + m_pointList[m_pointList.size() - 2].m_x) / 2.0,
182  (m_pointList[m_pointList.size() - 1].m_y + m_pointList[m_pointList.size() - 2].m_y) / 2.0);
183  m_switchRect[1] = wxRect2DDouble(swCenter.m_x - m_switchSize / 2.0, swCenter.m_y - m_switchSize / 2.0,
184  m_switchSize, m_switchSize);
185  }
186 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Branch.cpp:105
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Branch.cpp:43
-
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
-
virtual bool Intersects(wxRect2DDouble rect) const =0
Check if the element&#39;s rect intersects other rect.
-
virtual void UpdateSwitches()
Update the switch position.
Definition: Branch.cpp:172
- -
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
Definition: Branch.cpp:116
-
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement...
Definition: Branch.cpp:22
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Branch.cpp:143
-
-
- - - - diff --git a/docs/doxygen/html/_branch_8h.html b/docs/doxygen/html/_branch_8h.html index 1f595ab..99b481b 100644 --- a/docs/doxygen/html/_branch_8h.html +++ b/docs/doxygen/html/_branch_8h.html @@ -90,11 +90,9 @@ $(document).ready(function(){initNavTree('_branch_8h.html','');});
Branch.h File Reference
-
#include "PowerElement.h"
-#include "Bus.h"
-
-

Go to the source code of this file.

- +
#include "PowerElement.h"
+#include "Bus.h"
+
diff --git a/docs/doxygen/html/_branch_8h_source.html b/docs/doxygen/html/_branch_8h_source.html deleted file mode 100644 index 9042af4..0000000 --- a/docs/doxygen/html/_branch_8h_source.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - -Project/Branch.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Branch
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Branch.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef BRANCH_H
19 #define BRANCH_H
20 
21 #include "PowerElement.h"
22 #include "Bus.h"
23 
31 class Branch : public PowerElement
32 {
33  public:
34  Branch();
35  ~Branch();
36 
37  virtual bool Contains(wxPoint2DDouble position) const { return false; }
38  virtual void Draw(wxPoint2DDouble translation, double scale) const {}
39  virtual void Move(wxPoint2DDouble position) {}
40  virtual void StartMove(wxPoint2DDouble position) {}
41  virtual void MoveNode(Element* parent, wxPoint2DDouble position) {}
42  virtual bool NodeContains(wxPoint2DDouble position);
43  virtual bool SetNodeParent(Element* parent);
44  virtual void RemoveParent(Element* parent);
45  virtual void UpdateNodes();
46  virtual wxCursor GetBestPickboxCursor() const { return wxCURSOR_ARROW; }
47  virtual bool Intersects(wxRect2DDouble rect) const { return false; }
48  virtual void MovePickbox(wxPoint2DDouble position) {}
49  virtual bool PickboxContains(wxPoint2DDouble position) { return false; }
50  virtual void RotateNode(Element* parent, bool clockwise = true);
51  virtual void AddPoint(wxPoint2DDouble point){};
52  virtual bool GetContextMenu(wxMenu& menu) { return false; }
53  virtual void UpdateSwitchesPosition();
54  virtual void UpdateSwitches();
55 
56  protected:
57  bool m_inserted = false;
58 };
59 
60 #endif // BRANCH_H
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Branch.h:38
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Branch.cpp:105
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Branch.cpp:43
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: Branch.h:52
-
virtual void MovePickbox(wxPoint2DDouble position)
Move the pickbox.
Definition: Branch.h:48
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Branch.h:40
- -
virtual void UpdateSwitches()
Update the switch position.
Definition: Branch.cpp:172
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Branch.h:37
-
virtual void AddPoint(wxPoint2DDouble point)
Add point to the list of points that connect the element to the bus.
Definition: Branch.h:51
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Branch.h:47
- -
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
Definition: Branch.cpp:116
-
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement...
Definition: Branch.cpp:22
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
virtual bool PickboxContains(wxPoint2DDouble position)
Check if a pickbox contains a point. If contains the attributes related to pickbox movement will be c...
Definition: Branch.h:49
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Branch.h:39
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Branch.cpp:143
-
virtual void MoveNode(Element *parent, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
Definition: Branch.h:41
-
virtual wxCursor GetBestPickboxCursor() const
Get the best cursor to shown to the user when the mouse is above a pickbox.
Definition: Branch.h:46
-
Abstract class for branch power elements.
Definition: Branch.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_bus_8cpp_source.html b/docs/doxygen/html/_bus_8cpp_source.html deleted file mode 100644 index cd7c2f2..0000000 --- a/docs/doxygen/html/_bus_8cpp_source.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - -Project/Bus.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Bus.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Bus.h"
19 #ifdef USING_WX_3_0_X
20 #include "DegreesAndRadians.h"
21 #endif
22 
23 Bus::Bus() : PowerElement() {}
24 Bus::Bus(wxPoint2DDouble position) : PowerElement()
25 {
26  m_width = 100.0;
27  m_height = 5.0;
28  SetPosition(position);
29 }
30 
31 Bus::Bus(wxPoint2DDouble position, wxString name)
32 {
33  m_width = 100.0;
34  m_height = 5.0;
35  SetPosition(position);
36 
37  m_electricalData.name = name;
38 }
39 
40 Bus::~Bus() {}
41 void Bus::Draw(wxPoint2DDouble translation, double scale) const
42 {
43  // Draw selection (layer 1)
44  if(m_selected) {
45  // If the object is selected, the matrix is reset to remove scale effects applied to it, thus keeping the
46  // edges with fixed sizes for all zoom levels.
47  glPushMatrix();
48  glLoadIdentity();
49  // The matrix was reset, so we must use screen coordinates (WorldToScreen).
50  wxPoint2DDouble screenPt = WorldToScreen(translation, scale);
51  glTranslated(screenPt.m_x, screenPt.m_y, 0.0);
52  glRotated(m_angle, 0.0, 0.0, 1.0);
53  glTranslated(-screenPt.m_x, -screenPt.m_y, 0.0);
54 
55  glColor4dv(m_selectionColour.GetRGBA());
56 
57  wxPoint2DDouble pts[4] = {WorldToScreen(translation, scale, -(m_width / 2.0), -(m_height / 2.0)) -
58  wxPoint2DDouble(m_borderSize, m_borderSize),
59  WorldToScreen(translation, scale, -(m_width / 2.0), (m_height / 2.0)) -
60  wxPoint2DDouble(m_borderSize, -m_borderSize),
61  WorldToScreen(translation, scale, (m_width / 2.0), (m_height / 2.0)) -
62  wxPoint2DDouble(-m_borderSize, -m_borderSize),
63  WorldToScreen(translation, scale, (m_width / 2.0), -(m_height / 2.0)) -
64  wxPoint2DDouble(-m_borderSize, m_borderSize)};
65  DrawRectangle(pts);
66  glPopMatrix();
67  }
68  // Draw bus (layer 2)
69  // Push the current matrix on stack.
70  glPushMatrix();
71  // Rotate the matrix around the object position.
72  glTranslated(m_position.m_x, m_position.m_y, 0.0);
73  glRotated(m_angle, 0.0, 0.0, 1.0);
74  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
75 
76  if(m_dynEvent)
77  glColor4dv(m_dynamicEventColour.GetRGBA());
78  else
79  glColor4dv(m_busColour.GetRGBA());
80 
81  DrawRectangle(m_position, m_width, m_height);
82  // Pop the old matrix back.
83  glPopMatrix();
84 
85  // Draw pickbox (layer 3)
86  if(m_showPickbox) {
87  glPushMatrix();
88  glLoadIdentity();
89 
90  wxPoint2DDouble screenPt = WorldToScreen(translation, scale);
91  glTranslated(screenPt.m_x, screenPt.m_y, 0.0);
92  glRotated(m_angle, 0.0, 0.0, 1.0);
93  glTranslated(-screenPt.m_x, -screenPt.m_y, 0.0);
94 
95  wxPoint2DDouble pbPosition[2] = {WorldToScreen(translation, scale, m_width / 2.0),
96  WorldToScreen(translation, scale, -m_width / 2.0)};
97  DrawPickbox(pbPosition[0]);
98  DrawPickbox(pbPosition[1]);
99 
100  glPopMatrix();
101  }
102 }
103 
104 bool Bus::Contains(wxPoint2DDouble position) const
105 {
106  wxPoint2DDouble ptR = RotateAtPosition(position, -m_angle);
107  return m_rect.Contains(ptR);
108 }
109 
110 bool Bus::Intersects(wxRect2DDouble rect) const
111 {
112  if(m_angle == 0.0 || m_angle == 180.0) return m_rect.Intersects(rect);
113 
114  return RotatedRectanglesIntersects(m_rect, rect, m_angle, 0.0);
115 }
116 
117 bool Bus::PickboxContains(wxPoint2DDouble position)
118 {
119  m_activePickboxID = ID_PB_NONE;
120 
121  wxPoint2DDouble ptR = RotateAtPosition(position, -m_angle);
122 
123  wxPoint2DDouble center(m_position.m_x + m_width / 2.0, m_position.m_y);
124  wxRect2DDouble rectRight(center.m_x - 5.0, center.m_y - 5.0, 10.0, 10.0);
125 
126  center = wxPoint2DDouble(m_position.m_x - m_width / 2.0, m_position.m_y);
127  wxRect2DDouble rectLeft(center.m_x - 5.0, center.m_y - 5.0, 10.0, 10.0);
128 
129  if(rectRight.Contains(ptR)) {
130  m_activePickboxID = ID_PB_RIGHT;
131  return true;
132  }
133  if(rectLeft.Contains(ptR)) {
134  m_activePickboxID = ID_PB_LEFT;
135  return true;
136  }
137 
138  return false;
139 }
140 
142 {
143  double angle = m_angle;
144  while(angle >= 157.5) angle -= 180.0;
145 
146  if(angle >= -22.5 && angle < 22.5)
147  return wxCursor(wxCURSOR_SIZEWE);
148  else if(angle >= 22.5 && angle < 67.5)
149  return wxCursor(wxCURSOR_SIZENWSE);
150  else if(angle >= 67.5 && angle < 112.5)
151  return wxCursor(wxCURSOR_SIZENS);
152  else if(angle >= 112.5 && angle < 157.5)
153  return wxCursor(wxCURSOR_SIZENESW);
154 
155  return wxCursor(wxCURSOR_ARROW);
156 }
157 
158 void Bus::MovePickbox(wxPoint2DDouble position)
159 {
160  if(m_activePickboxID == ID_PB_NONE) return;
161 
162  wxPoint2DDouble ptR = RotateAtPosition(position, -m_angle);
163 
164  double dx = 0.0;
165  if(m_activePickboxID == ID_PB_RIGHT)
166  dx = ptR.m_x - m_position.m_x - m_width / 2.0;
167  else if(m_activePickboxID == ID_PB_LEFT)
168  dx = m_position.m_x - m_width / 2.0 - ptR.m_x;
169 
170  if(m_width + dx < 20.0) return;
171 
172  if(m_activePickboxID == ID_PB_RIGHT) {
173  m_position.m_x += (dx / 2.0) * std::cos(wxDegToRad(m_angle));
174  m_position.m_y += (dx / 2.0) * std::sin(wxDegToRad(m_angle));
175  } else if(m_activePickboxID == ID_PB_LEFT) {
176  m_position.m_x -= (dx / 2.0) * std::cos(wxDegToRad(m_angle));
177  m_position.m_y -= (dx / 2.0) * std::sin(wxDegToRad(m_angle));
178  }
179  m_width += dx;
180 
181  SetPosition(m_position);
182 }
183 
184 void Bus::Rotate(bool clockwise)
185 {
186  double rotAngle = m_rotationAngle;
187  if(!clockwise) rotAngle = -m_rotationAngle;
188 
189  m_angle += rotAngle;
190  if(m_angle >= 360 || m_angle <= -360) m_angle = 0.0;
191 }
192 
193 bool Bus::GetContextMenu(wxMenu& menu)
194 {
195  menu.Append(ID_EDIT_ELEMENT, _("Edit bus"));
196  GeneralMenuItens(menu);
197  return true;
198 }
199 
200 bool Bus::ShowForm(wxWindow* parent, Element* element)
201 {
202  BusForm* busForm = new BusForm(parent, this);
203  if(busForm->ShowModal() == wxID_OK) {
204  busForm->Destroy();
205  return true;
206  }
207 
208  busForm->Destroy();
209  return false;
210 }
211 
213 {
214  Bus* copy = new Bus();
215  *copy = *this;
216  return copy;
217 }
218 wxString Bus::GetTipText() const
219 {
220  wxString tipText = m_electricalData.name;
221  tipText += wxString::Format(" (%d)", m_electricalData.number + 1);
222  tipText += "\n";
223  tipText += StringFromDouble(m_electricalData.nominalVoltage, 1) +
224  (m_electricalData.nominalVoltageUnit == UNIT_V ? _(" V") : _(" kV"));
225  tipText += "\n";
226  tipText += _("\nV = ") + wxString::FromDouble(std::abs(m_electricalData.voltage), 5) + _(" p.u.");
227  tipText += "\n";
228  tipText += wxString(L'\u03B8') + " = " + wxString::FromDouble(wxRadToDeg(std::arg(m_electricalData.voltage)), 5) +
229  " " + wxString(L'\u00B0');
230 
231  tipText += _("\n\nFault info:");
232  tipText += _("\nVa = ") + wxString::FromDouble(std::abs(m_electricalData.faultVoltage[0]), 5) + _(" p.u.");
233  tipText += _("\nVb = ") + wxString::FromDouble(std::abs(m_electricalData.faultVoltage[1]), 5) + _(" p.u.");
234  tipText += _("\nVc = ") + wxString::FromDouble(std::abs(m_electricalData.faultVoltage[2]), 5) + _(" p.u.");
235  if(m_electricalData.hasFault) {
236  tipText += _("\nIa = ") + wxString::FromDouble(std::abs(m_electricalData.faultCurrent[0]), 5) + _(" p.u.");
237  tipText += _("\nIb = ") + wxString::FromDouble(std::abs(m_electricalData.faultCurrent[1]), 5) + _(" p.u.");
238  tipText += _("\nIc = ") + wxString::FromDouble(std::abs(m_electricalData.faultCurrent[2]), 5) + _(" p.u.");
239  }
240 
241  tipText += _("\n\nSsc = ") + wxString::FromDouble(std::abs(m_electricalData.scPower), 5) + _(" p.u.");
242 
243  return tipText;
244 }
245 
247 {
248  if(!m_electricalData.plotBus) return false;
249  plotData.SetName(m_electricalData.name);
250  plotData.SetCurveType(ElementPlotData::CT_BUS);
251 
252  std::vector<double> absVoltage, argVoltage;
253  for(unsigned int i = 0; i < m_electricalData.stabVoltageVector.size(); ++i) {
254  absVoltage.push_back(std::abs(m_electricalData.stabVoltageVector[i]));
255  argVoltage.push_back(wxRadToDeg(std::arg(m_electricalData.stabVoltageVector[i])));
256  }
257  plotData.AddData(absVoltage, _("Voltage"));
258  plotData.AddData(argVoltage, _("Angle"));
259  return true;
260 }
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Bus.cpp:200
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- - -
virtual void MovePickbox(wxPoint2DDouble position)
Move the pickbox.
Definition: Bus.cpp:158
-
virtual wxPoint2DDouble WorldToScreen(wxPoint2DDouble translation, double scale, double offsetX=0.0, double offsetY=0.0) const
Convert the element position to screen position.
Definition: Element.cpp:124
-
virtual wxString GetTipText() const
Get the tip text.
Definition: Bus.cpp:218
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: Bus.cpp:193
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Bus.cpp:41
-
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
-
Form to edit the bus power data.
Definition: BusForm.h:31
-
virtual void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode=GL_QUADS) const
Draw rectangle.
Definition: Element.cpp:69
- -
virtual void GeneralMenuItens(wxMenu &menu)
Insert general itens to context menu.
Definition: Element.cpp:245
-
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
virtual bool GetPlotData(ElementPlotData &plotData)
Fill the plot data.
Definition: Bus.cpp:246
- -
void SetPosition(const wxPoint2DDouble position)
Set the element position and update the rectangle.
Definition: Element.cpp:25
-
virtual wxCursor GetBestPickboxCursor() const
Get the best cursor to shown to the user when the mouse is above a pickbox.
Definition: Bus.cpp:141
-
virtual void DrawPickbox(wxPoint2DDouble position) const
Draw pickbox.
Definition: Element.cpp:98
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Bus.cpp:184
-
virtual bool PickboxContains(wxPoint2DDouble position)
Check if a pickbox contains a point. If contains the attributes related to pickbox movement will be c...
Definition: Bus.cpp:117
- -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- -
Abstract class of power elements.
Definition: PowerElement.h:117
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Bus.cpp:212
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Bus.cpp:104
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Bus.cpp:110
-
virtual bool RotatedRectanglesIntersects(wxRect2DDouble rect1, wxRect2DDouble rect2, double angle1, double angle2) const
Check if two roteted rectangles intersect.
Definition: Element.cpp:147
- -
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
-
- - - - diff --git a/docs/doxygen/html/_bus_8h.html b/docs/doxygen/html/_bus_8h.html index b589e3e..62b9132 100644 --- a/docs/doxygen/html/_bus_8h.html +++ b/docs/doxygen/html/_bus_8h.html @@ -90,11 +90,9 @@ $(document).ready(function(){initNavTree('_bus_8h.html','');});
Bus.h File Reference
-
#include "BusForm.h"
-#include "PowerElement.h"
-
-

Go to the source code of this file.

- +
#include "BusForm.h"
+#include "PowerElement.h"
+
diff --git a/docs/doxygen/html/_bus_8h_source.html b/docs/doxygen/html/_bus_8h_source.html deleted file mode 100644 index 970bebe..0000000 --- a/docs/doxygen/html/_bus_8h_source.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - -Project/Bus.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  BusElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Bus.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef BUS_H
19 #define BUS_H
20 
21 #include "BusForm.h"
22 #include "PowerElement.h"
23 
25  int number = 0;
26  wxString name = "";
27  double nominalVoltage = 138.0;
28  ElectricalUnit nominalVoltageUnit = UNIT_kV;
29  bool isVoltageControlled = false;
30  double controlledVoltage = 1.0;
31  int controlledVoltageUnitChoice = 0; // 0 = p.u., 1 = same as nominalVoltageUnit (UNIT_V or UNIT_kV).
32  bool slackBus = false;
33 
34  // Power flow (p.u.)
35  std::complex<double> voltage = std::complex<double>(1.0, 0.0);
36  std::complex<double> power = std::complex<double>(0.0, 0.0);
37  int busType = 2; // PQ
38 
39  // Fault
40  bool hasFault = false;
41  FaultData faultType = FAULT_THREEPHASE;
42  FaultData faultLocation = FAULT_LINE_A;
43  // p.u. fault data
44  double faultResistance = 0.0;
45  double faultReactance = 0.0;
46  std::complex<double> faultCurrent[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0),
47  std::complex<double>(0.0, 0.0)};
48  std::complex<double> faultVoltage[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0),
49  std::complex<double>(0.0, 0.0)};
50  double scPower = 0.0;
51 
52  // Stability
53  bool plotBus = false;
54  bool stabHasFault = false;
55  double stabFaultTime = 0.0;
56  double stabFaultLength = 0.0;
57  double stabFaultResistance = 0.0;
58  double stabFaultReactance = 0.0;
59  std::vector<std::complex<double> > stabVoltageVector;
60 };
61 
69 class Bus : public PowerElement
70 {
71  public:
72  Bus();
73  Bus(wxPoint2DDouble position);
74  Bus(wxPoint2DDouble position, wxString name);
75  ~Bus();
76  virtual Element* GetCopy();
77  virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return true; }
78  virtual bool Contains(wxPoint2DDouble position) const;
79  virtual bool Intersects(wxRect2DDouble rect) const;
80  virtual void Draw(wxPoint2DDouble translation, double scale) const;
81  virtual void Rotate(bool clockwise = true);
82  virtual wxCursor GetBestPickboxCursor() const;
83  virtual void MovePickbox(wxPoint2DDouble position);
84  virtual bool PickboxContains(wxPoint2DDouble position);
85  virtual bool GetContextMenu(wxMenu& menu);
86  virtual wxString GetTipText() const;
87  virtual BusElectricalData GetElectricalData() const { return m_electricalData; }
88  virtual void SetElectricalData(BusElectricalData electricalData) { m_electricalData = electricalData; }
89  virtual bool ShowForm(wxWindow* parent, Element* element);
90  virtual bool GetPlotData(ElementPlotData& plotData);
91 
92  protected:
93  BusElectricalData m_electricalData;
94 };
95 
96 #endif // BUS_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
FaultData
Information about fault (type and location).
Definition: PowerElement.h:55
- - -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
- - - - -
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Bus.h:77
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
-
- - - - diff --git a/docs/doxygen/html/_bus_form_8cpp_source.html b/docs/doxygen/html/_bus_form_8cpp_source.html deleted file mode 100644 index 0be2845..0000000 --- a/docs/doxygen/html/_bus_form_8cpp_source.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - -Project/BusForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
BusForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "BusForm.h"
19 #include "Bus.h"
20 
21 BusForm::BusForm(wxWindow* parent, Bus* bus) : BusFormBase(parent)
22 {
23  m_choiceFaultType->SetString(0, _("Three-phase"));
24  m_choiceFaultType->SetString(1, _("Line-to-line"));
25  m_choiceFaultType->SetString(2, _("Double line-to-ground"));
26  m_choiceFaultType->SetString(3, _("Line-to-ground"));
27 
28  SetSize(GetBestSize());
29 
30  m_parent = parent;
31  m_bus = bus;
32 
33  m_textCtrlName->SetValue(bus->GetElectricalData().name);
34  m_textCtrlNomVoltage->SetValue(bus->StringFromDouble(bus->GetElectricalData().nominalVoltage));
35 
36  if(bus->GetElectricalData().nominalVoltageUnit == UNIT_V)
37  m_choiceNomVoltage->SetSelection(0);
38  else
39  m_choiceNomVoltage->SetSelection(1);
40 
41  m_checkBoxCtrlVoltage->SetValue(bus->GetElectricalData().isVoltageControlled);
42  m_textCtrlCtrlVoltage->SetValue(bus->StringFromDouble(bus->GetElectricalData().controlledVoltage));
43  m_choiceCtrlVoltage->SetSelection(bus->GetElectricalData().controlledVoltageUnitChoice);
44  m_checkBoxSlackBus->SetValue(bus->GetElectricalData().slackBus);
45 
46  m_checkBoxFault->SetValue(bus->GetElectricalData().hasFault);
47  switch(bus->GetElectricalData().faultType) {
48  case FAULT_THREEPHASE: {
49  m_choiceFaultType->SetSelection(0);
50  } break;
51  case FAULT_2LINE: {
52  m_choiceFaultType->SetSelection(1);
53  } break;
54  case FAULT_2LINE_GROUND: {
55  m_choiceFaultType->SetSelection(2);
56  } break;
57  case FAULT_LINE_GROUND: {
58  m_choiceFaultType->SetSelection(3);
59  } break;
60  default:
61  break;
62  }
63  switch(bus->GetElectricalData().faultLocation) {
64  case FAULT_LINE_A: {
65  m_choiceFaultPlace->SetSelection(0);
66  } break;
67  case FAULT_LINE_B: {
68  m_choiceFaultPlace->SetSelection(1);
69  } break;
70  case FAULT_LINE_C: {
71  m_choiceFaultPlace->SetSelection(2);
72  } break;
73  default:
74  break;
75  }
76  m_textCtrlFaultResistance->SetValue(bus->StringFromDouble(bus->GetElectricalData().faultResistance));
77  m_textCtrlFaultReactance->SetValue(bus->StringFromDouble(bus->GetElectricalData().faultReactance));
78 
79  m_checkBoxPlotData->SetValue(bus->GetElectricalData().plotBus);
80  m_checkBoxStabFault->SetValue(bus->GetElectricalData().stabHasFault);
81  m_textCtrlStabFaultTime->SetValue(bus->StringFromDouble(bus->GetElectricalData().stabFaultTime));
82  m_textCtrlStabFaultLength->SetValue(bus->StringFromDouble(bus->GetElectricalData().stabFaultLength));
83  m_textCtrlStabFaultResistance->SetValue(bus->StringFromDouble(bus->GetElectricalData().stabFaultResistance));
84  m_textCtrlStabFaultReactance->SetValue(bus->StringFromDouble(bus->GetElectricalData().stabFaultReactance));
85 
86  EnableCtrlVoltageFields(bus->GetElectricalData().isVoltageControlled);
87  EnableFaultFields(bus->GetElectricalData().hasFault);
88  EnableStabFaultFields(bus->GetElectricalData().stabHasFault);
89 }
90 
91 BusForm::~BusForm() {}
92 void BusForm::OnButtonCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
93 void BusForm::OnButtonOKClick(wxCommandEvent& event)
94 {
95  BusElectricalData data = m_bus->GetElectricalData();
96  data.name = m_textCtrlName->GetValue();
97  if(!m_bus->DoubleFromString(m_parent, m_textCtrlNomVoltage->GetValue(), data.nominalVoltage,
98  _("Value entered incorrectly in the field \"Rated voltage\".")))
99  return;
100  data.nominalVoltageUnit = m_choiceNomVoltage->GetSelection() == 0 ? UNIT_V : UNIT_kV;
101  data.isVoltageControlled = m_checkBoxCtrlVoltage->GetValue();
102  if(data.isVoltageControlled) {
103  if(!m_bus->DoubleFromString(m_parent, m_textCtrlCtrlVoltage->GetValue(), data.controlledVoltage,
104  _("Value entered incorrectly in the field \"Controlled voltage\".")))
105  return;
106  data.controlledVoltageUnitChoice = m_choiceCtrlVoltage->GetSelection();
107  }
108  data.slackBus = m_checkBoxSlackBus->GetValue();
109 
110  data.hasFault = m_checkBoxFault->GetValue();
111  switch(m_choiceFaultType->GetSelection()) {
112  case 0: {
113  data.faultType = FAULT_THREEPHASE;
114  } break;
115  case 1: {
116  data.faultType = FAULT_2LINE;
117  } break;
118  case 2: {
119  data.faultType = FAULT_2LINE_GROUND;
120  } break;
121  case 3: {
122  data.faultType = FAULT_LINE_GROUND;
123  } break;
124  }
125 
126  switch(m_choiceFaultPlace->GetSelection()) {
127  case 0: {
128  data.faultLocation = FAULT_LINE_A;
129  } break;
130  case 1: {
131  data.faultLocation = FAULT_LINE_B;
132  } break;
133  case 2: {
134  data.faultLocation = FAULT_LINE_C;
135  } break;
136  }
137 
138  if(!m_bus->DoubleFromString(m_parent, m_textCtrlFaultResistance->GetValue(), data.faultResistance,
139  _("Value entered incorrectly in the field \"Fault resistance\".")))
140  return;
141 
142  if(!m_bus->DoubleFromString(m_parent, m_textCtrlFaultReactance->GetValue(), data.faultReactance,
143  _("Value entered incorrectly in the field \"Fault reactance\".")))
144  return;
145 
146  data.plotBus = m_checkBoxPlotData->GetValue();
147  data.stabHasFault = m_checkBoxStabFault->GetValue();
148 
149  if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultTime->GetValue(), data.stabFaultTime,
150  _("Value entered incorrectly in the field \"Time\".")))
151  return;
152 
153  if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultLength->GetValue(), data.stabFaultLength,
154  _("Value entered incorrectly in the field \"Fault lenght\".")))
155  return;
156 
157  if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultResistance->GetValue(), data.stabFaultResistance,
158  _("Value entered incorrectly in the field \"Fault resistence (stability)\".")))
159  return;
160 
161  if(!m_bus->DoubleFromString(m_parent, m_textCtrlStabFaultReactance->GetValue(), data.stabFaultReactance,
162  _("Value entered incorrectly in the field \"Fault reactance (stability)\".")))
163  return;
164 
165  m_bus->SetElectricalData(data);
166 
167  if(data.stabHasFault)
168  m_bus->SetDynamicEvent(true);
169  else
170  m_bus->SetDynamicEvent(false);
171 
172  EndModal(wxID_OK);
173 }
174 
175 void BusForm::OnNominalVoltageChoice(wxCommandEvent& event) { UpdateChoiceBoxes(); }
176 void BusForm::OnFaultTypeChoice(wxCommandEvent& event) { UpdateChoiceBoxes(); }
177 void BusForm::OnControlledVoltageClick(wxCommandEvent& event)
178 {
179  EnableCtrlVoltageFields(m_checkBoxCtrlVoltage->GetValue());
180 }
181 void BusForm::OnInsertFaultClick(wxCommandEvent& event) { EnableFaultFields(m_checkBoxFault->GetValue()); }
182 void BusForm::OnInsertStabFaultClick(wxCommandEvent& event) { EnableStabFaultFields(m_checkBoxStabFault->GetValue()); }
183 void BusForm::EnableCtrlVoltageFields(bool enable)
184 {
185  m_textCtrlCtrlVoltage->Enable(enable);
186  m_choiceCtrlVoltage->Enable(enable);
187 
188  UpdateChoiceBoxes();
189 }
190 
191 void BusForm::EnableFaultFields(bool enable)
192 {
193  m_choiceFaultType->Enable(enable);
194  m_choiceFaultPlace->Enable(enable);
195  m_textCtrlFaultReactance->Enable(enable);
196  m_textCtrlFaultResistance->Enable(enable);
197  m_staticTextPU_1->Enable(enable);
198  m_staticTextPU_2->Enable(enable);
199 
200  UpdateChoiceBoxes();
201 }
202 
203 void BusForm::EnableStabFaultFields(bool enable)
204 {
205  m_textCtrlStabFaultTime->Enable(enable);
206  m_textCtrlStabFaultLength->Enable(enable);
207  m_staticTextS_1->Enable(enable);
208  m_staticTextS_2->Enable(enable);
209  m_textCtrlStabFaultReactance->Enable(enable);
210  m_textCtrlStabFaultResistance->Enable(enable);
211  m_staticTextPU_3->Enable(enable);
212  m_staticTextPU_4->Enable(enable);
213 }
214 
215 void BusForm::UpdateChoiceBoxes()
216 {
217  switch(m_choiceFaultType->GetSelection()) {
218  case 0: // three-phase
219  {
220  m_choiceFaultPlace->Enable(false);
221  } break;
222  case 1: // line-to-line
223  case 2: // double line-to-line
224  {
225  if(m_checkBoxFault->GetValue()) m_choiceFaultPlace->Enable(true);
226  m_choiceFaultPlace->SetString(0, _("Lines AB"));
227  m_choiceFaultPlace->SetString(1, _("Lines BC"));
228  m_choiceFaultPlace->SetString(2, _("Lines CA"));
229  } break;
230  case 3: // line-to-ground
231  {
232  if(m_checkBoxFault->GetValue()) m_choiceFaultPlace->Enable(true);
233  m_choiceFaultPlace->SetString(0, _("Line A"));
234  m_choiceFaultPlace->SetString(1, _("Line B"));
235  m_choiceFaultPlace->SetString(2, _("Line C"));
236  } break;
237  default:
238  break;
239  }
240  switch(m_choiceNomVoltage->GetSelection()) {
241  case 0: {
242  m_choiceCtrlVoltage->SetString(1, _("V"));
243  } break;
244  case 1: {
245  m_choiceCtrlVoltage->SetString(1, _("kV"));
246  } break;
247  default:
248  break;
249  }
250 }
- - - - - - - -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
- - - - -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- -
-
- - - - diff --git a/docs/doxygen/html/_bus_form_8h.html b/docs/doxygen/html/_bus_form_8h.html index 27fa1f9..bb1525e 100644 --- a/docs/doxygen/html/_bus_form_8h.html +++ b/docs/doxygen/html/_bus_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_bus_form_8h.html','');});
BusForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_bus_form_8h_source.html b/docs/doxygen/html/_bus_form_8h_source.html deleted file mode 100644 index 4f4106d..0000000 --- a/docs/doxygen/html/_bus_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/BusForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  BusForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
BusForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef BUSFORM_H
19 #define BUSFORM_H
20 
21 #include "ElementForm.h"
22 class Bus;
23 
31 class BusForm : public BusFormBase
32 {
33  public:
34  BusForm(wxWindow* parent, Bus* bus);
35  virtual ~BusForm();
36 
37  protected:
38  virtual void OnFaultTypeChoice(wxCommandEvent& event);
39  virtual void OnControlledVoltageClick(wxCommandEvent& event);
40  virtual void OnInsertFaultClick(wxCommandEvent& event);
41  virtual void OnInsertStabFaultClick(wxCommandEvent& event);
42  virtual void OnNominalVoltageChoice(wxCommandEvent& event);
43  virtual void OnButtonCancelClick(wxCommandEvent& event);
44  virtual void OnButtonOKClick(wxCommandEvent& event);
45  virtual void EnableCtrlVoltageFields(bool enable = true);
46  virtual void EnableFaultFields(bool enable = true);
47  virtual void EnableStabFaultFields(bool enable = true);
48  virtual void UpdateChoiceBoxes();
49 
50  Bus* m_bus = NULL;
51  wxWindow* m_parent = NULL;
52 };
53 #endif // BUSFORM_H
Form to edit the bus power data.
Definition: BusForm.h:31
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
-
- - - - diff --git a/docs/doxygen/html/_bus_form_bitmaps_8cpp_source.html b/docs/doxygen/html/_bus_form_bitmaps_8cpp_source.html deleted file mode 100644 index f5ed2a2..0000000 --- a/docs/doxygen/html/_bus_form_bitmaps_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/BusFormBitmaps.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
BusFormBitmaps.cpp
-
-
-
1 //
2 // This file was automatically generated by wxrc, do not edit by hand.
3 //
4 
5 #include <wx/wxprec.h>
6 
7 #ifdef __BORLANDC__
8  #pragma hdrstop
9 #endif
10 
11 #include <wx/filesys.h>
12 #include <wx/fs_mem.h>
13 #include <wx/xrc/xmlres.h>
14 #include <wx/xrc/xh_all.h>
15 
16 #if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
17  #define XRC_ADD_FILE(name, data, size, mime) \
18  wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
19 #else
20  #define XRC_ADD_FILE(name, data, size, mime) \
21  wxMemoryFSHandler::AddFile(name, data, size)
22 #endif
23 
24 static size_t xml_res_size_0 = 137;
25 static unsigned char xml_res_file_0[] = {
26 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
27 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
28 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
29 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
30 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
31 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
32 45,62,10,60,47,114,101,115,111,117,114,99,101,62,10};
33 
34 void wxCF637InitBitmapResources()
35 {
36 
37  // Check for memory FS. If not present, load the handler:
38  {
39  wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
40  wxFileSystem fsys;
41  wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
42  wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
43  if (f) delete f;
44  else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
45  }
46 
47  XRC_ADD_FILE(wxT("XRC_resource/BusFormBitmaps.cpp$C__Users_Thales_Documents_GitHub_PSP_Project_BusFormBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml"));
48  wxXmlResource::Get()->Load(wxT("memory:XRC_resource/BusFormBitmaps.cpp$C__Users_Thales_Documents_GitHub_PSP_Project_BusFormBitmaps.xrc"));
49 }
-
- - - - diff --git a/docs/doxygen/html/_camera_8cpp_source.html b/docs/doxygen/html/_camera_8cpp_source.html deleted file mode 100644 index 361e9c2..0000000 --- a/docs/doxygen/html/_camera_8cpp_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/Camera.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Camera.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Camera.h"
19 
20 Camera::Camera()
21 {
22  m_translation = wxPoint2DDouble(0, 0);
23  m_scale = 1.0;
24 }
25 
26 Camera::~Camera() {}
27 wxPoint2DDouble Camera::ScreenToWorld(wxPoint2DDouble screenCoords) const
28 {
29  return wxPoint2DDouble(screenCoords.m_x / m_scale - m_translation.m_x,
30  screenCoords.m_y / m_scale - m_translation.m_y);
31 }
32 
33 void Camera::SetTranslation(wxPoint2DDouble screenPoint)
34 {
35  m_translation = screenPoint / m_scale - m_translationStartPt;
36 }
37 
38 void Camera::SetScale(wxPoint2DDouble screenPoint, double delta)
39 {
40  m_translation -= screenPoint * (1.0 - m_scale) / m_scale;
41 
42  m_scale += delta;
43 
44  // Limits: 5% - 300%
45  if(m_scale < m_zoomMin) m_scale = m_zoomMin;
46  if(m_scale > m_zoomMax) m_scale = m_zoomMax;
47 
48  m_translation += screenPoint * (1.0 - m_scale) / m_scale;
49 }
50 
51 wxPoint2DDouble Camera::GetMousePosition(bool worldCoords) const
52 {
53  if(worldCoords) return ScreenToWorld(m_mousePosition);
54  return m_mousePosition;
55 }
-
-
- - - - diff --git a/docs/doxygen/html/_camera_8h.html b/docs/doxygen/html/_camera_8h.html index 0bfb58f..7deaef6 100644 --- a/docs/doxygen/html/_camera_8h.html +++ b/docs/doxygen/html/_camera_8h.html @@ -91,9 +91,7 @@ $(document).ready(function(){initNavTree('_camera_8h.html','');});
#include <wx/geometry.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_camera_8h_source.html b/docs/doxygen/html/_camera_8h_source.html deleted file mode 100644 index 385e607..0000000 --- a/docs/doxygen/html/_camera_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/Camera.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Camera
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Camera.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CAMERA_H
19 #define CAMERA_H
20 
21 #include <wx/geometry.h>
22 
30 class Camera
31 {
32  public:
33  Camera();
34  ~Camera();
35 
36  void SetScale(wxPoint2DDouble screenPoint, double delta);
37  void SetScale(double scale) { m_scale = scale; }
38  void SetTranslation(wxPoint2DDouble screenPoint);
39  void StartTranslation(wxPoint2DDouble startPoint) { this->m_translationStartPt = startPoint; }
40  void UpdateMousePosition(wxPoint2DDouble mousePosition) { this->m_mousePosition = mousePosition; }
41  double GetScale() const { return m_scale; }
42  wxPoint2DDouble GetTranslation() const { return m_translation; }
43  wxPoint2DDouble GetMousePosition(bool worldCoords = true) const;
44  wxPoint2DDouble ScreenToWorld(wxPoint2DDouble screenCoords) const;
45  double GetZoomMin() const { return m_zoomMin; }
46  double GetZoomMax() const { return m_zoomMax; }
47  protected:
48  wxPoint2DDouble m_translation;
49  wxPoint2DDouble m_translationStartPt;
50  double m_scale;
51 
52  wxPoint2DDouble m_mousePosition;
53 
54  double m_zoomMin = 0.01;
55  double m_zoomMax = 3.0;
56 };
57 
58 #endif // CAMERA_H
Class responsible for the correct visualization of the elements on screen.
Definition: Camera.h:30
-
-
- - - - diff --git a/docs/doxygen/html/_capacitor_8cpp_source.html b/docs/doxygen/html/_capacitor_8cpp_source.html deleted file mode 100644 index e97535d..0000000 --- a/docs/doxygen/html/_capacitor_8cpp_source.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - -Project/Capacitor.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Capacitor.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
19 #include "Capacitor.h"
20 
21 Capacitor::Capacitor() : Shunt() {}
22 Capacitor::Capacitor(wxString name) : Shunt() { m_electricalData.name = name; }
23 Capacitor::~Capacitor() {}
24 bool Capacitor::AddParent(Element* parent, wxPoint2DDouble position)
25 {
26  if(parent) {
27  m_parentList.push_back(parent);
28  parent->AddChild(this);
29  wxPoint2DDouble parentPt =
30  parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position.
31  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
32  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back.
33 
34  m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus.
35  m_width = 40;
36  m_height = 30;
37  m_rect = wxRect2DDouble(m_position.m_x - m_width / 2.0, m_position.m_y - m_height / 2.0, m_width, m_height);
38 
39  m_pointList.push_back(parentPt);
40  m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_position));
41  m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -m_height / 2.0 - 10.0));
42  m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -m_height / 2.0));
43 
44  m_inserted = true;
45 
46  wxRect2DDouble genRect(0, 0, 0, 0);
47  m_switchRect.push_back(genRect); // Push a general rectangle.
48  UpdateSwitches();
49 
50  return true;
51  }
52  return false;
53 }
54 
55 void Capacitor::Draw(wxPoint2DDouble translation, double scale) const
56 {
57  OpenGLColour elementColour;
58  if(m_online) {
59  if(m_dynEvent)
60  elementColour = m_dynamicEventColour;
61  else
62  elementColour = m_onlineElementColour;
63  } else
64  elementColour = m_offlineElementColour;
65 
66  if(m_inserted) {
67  std::vector<wxPoint2DDouble> capPts;
68  capPts.push_back(wxPoint2DDouble(m_position.m_x - m_width / 2.0, m_position.m_y - m_height / 2.0));
69  capPts.push_back(wxPoint2DDouble(m_position.m_x + m_width / 2.0, m_position.m_y - m_height / 2.0));
70  capPts.push_back(wxPoint2DDouble(m_position.m_x - m_width / 2.0, m_position.m_y - m_height / 2.0 + 10.0));
71  capPts.push_back(wxPoint2DDouble(m_position.m_x + m_width / 2.0, m_position.m_y - m_height / 2.0 + 10.0));
72 
73  if(m_selected) {
74  glLineWidth(1.5 + m_borderSize * 2.0);
75  glColor4dv(m_selectionColour.GetRGBA());
76 
77  DrawLine(m_pointList);
78 
79  glPushMatrix();
80  glTranslated(m_position.m_x, m_position.m_y, 0.0);
81  glRotated(m_angle, 0.0, 0.0, 1.0);
82  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
83 
84  DrawLine(capPts, GL_LINES);
85 
86  DrawGround(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 10.0));
87 
88  glPopMatrix();
89 
90  // Draw node selection.
91  DrawCircle(m_pointList[0], 5.0 + m_borderSize / scale, 10, GL_POLYGON);
92  }
93  // Draw Capacitor (layer 2).
94  glLineWidth(1.5);
95  glColor4dv(elementColour.GetRGBA());
96  DrawCircle(m_pointList[0], 5.0, 10, GL_POLYGON);
97  DrawLine(m_pointList);
98 
99  DrawSwitches();
100 
101  glPushMatrix();
102  glTranslated(m_position.m_x, m_position.m_y, 0.0);
103  glRotated(m_angle, 0.0, 0.0, 1.0);
104  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
105 
106  glColor4dv(elementColour.GetRGBA());
107  DrawLine(capPts, GL_LINES);
108 
109  DrawGround(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 10.0));
110 
111  glPopMatrix();
112  }
113 }
114 
115 void Capacitor::Rotate(bool clockwise)
116 {
117  double rotAngle = m_rotationAngle;
118  if(!clockwise) rotAngle = -m_rotationAngle;
119 
120  m_angle += rotAngle;
121  if(m_angle >= 360 || m_angle <= -360) m_angle = 0.0;
122  m_pointList[2] = RotateAtPosition(m_pointList[2], rotAngle);
123  m_pointList[3] = RotateAtPosition(m_pointList[3], rotAngle);
124  UpdateSwitchesPosition();
125 }
126 
127 bool Capacitor::GetContextMenu(wxMenu& menu)
128 {
129  menu.Append(ID_EDIT_ELEMENT, _("Edit Capacitor"));
130  GeneralMenuItens(menu);
131  return true;
132 }
133 
134 bool Capacitor::Contains(wxPoint2DDouble position) const
135 {
136  wxPoint2DDouble ptR = RotateAtPosition(position, -m_angle);
137  return m_rect.Contains(ptR);
138 }
139 
140 bool Capacitor::Intersects(wxRect2DDouble rect) const
141 {
142  return RotatedRectanglesIntersects(m_rect, rect, m_angle, 0.0);
143 }
144 
145 bool Capacitor::ShowForm(wxWindow* parent, Element* element)
146 {
147  ReactiveShuntElementForm* capacitorForm = new ReactiveShuntElementForm(parent, this);
148  capacitorForm->SetTitle(_("Capacitor"));
149  if(capacitorForm->ShowModal() == wxID_OK) {
150  capacitorForm->Destroy();
151  return true;
152  }
153  capacitorForm->Destroy();
154  return false;
155 }
156 
157 CapacitorElectricalData Capacitor::GetPUElectricalData(double systemPowerBase)
158 {
159  CapacitorElectricalData data = m_electricalData;
160  switch(data.reactivePowerUnit) {
161  case UNIT_VAr: {
162  data.reactivePower = data.reactivePower / systemPowerBase;
163  data.reactivePowerUnit = UNIT_PU;
164  } break;
165  case UNIT_kVAr: {
166  data.reactivePower = (data.reactivePower * 1e3) / systemPowerBase;
167  data.reactivePowerUnit = UNIT_PU;
168  } break;
169  case UNIT_MVAr: {
170  data.reactivePower = (data.reactivePower * 1e6) / systemPowerBase;
171  data.reactivePowerUnit = UNIT_PU;
172  } break;
173  default:
174  break;
175  }
176 
177  return data;
178 }
179 
181 {
182  Capacitor* copy = new Capacitor();
183  *copy = *this;
184  return copy;
185 }
186 
187 wxString Capacitor::GetTipText() const
188 {
189  wxString tipText = m_electricalData.name;
190 
191  // TODO: Avoid reactive power calculation.
192  double reactivePower = m_electricalData.reactivePower;
193  if(!m_online)
194  reactivePower = 0.0;
195  else {
196  std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetElectricalData().voltage;
197  reactivePower *= std::pow(std::abs(v), 2);
198  }
199  tipText += "\n";
200  tipText += _("\nQ = ") + wxString::FromDouble(reactivePower, 5);
201  switch(m_electricalData.reactivePowerUnit) {
202  case UNIT_PU: {
203  tipText += _(" p.u.");
204  } break;
205  case UNIT_VAr: {
206  tipText += _(" VAr");
207  } break;
208  case UNIT_kVAr: {
209  tipText += _(" kVAr");
210  } break;
211  case UNIT_MVAr: {
212  tipText += _(" MVAr");
213  } break;
214  default:
215  break;
216  }
217 
218  return tipText;
219 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Capacitor.cpp:145
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: Capacitor.cpp:127
- -
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Capacitor.cpp:115
- -
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
- -
virtual Element * GetCopy()
Get a the element copy.
Definition: Capacitor.cpp:180
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Capacitor.cpp:134
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Capacitor.cpp:140
-
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Capacitor.cpp:55
- -
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
- - -
Class to manage color of OpenGL.
Definition: Element.h:67
-
Shunt capactior power element.
Definition: Capacitor.h:38
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
Abstract class for shunt power elements.
Definition: Shunt.h:31
-
virtual wxString GetTipText() const
Get the tip text.
Definition: Capacitor.cpp:187
- -
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Capacitor.cpp:24
-
Form to edit the reactive shunt element power data.
- -
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
-
- - - - diff --git a/docs/doxygen/html/_capacitor_8h.html b/docs/doxygen/html/_capacitor_8h.html index 88cfe9e..171eeb7 100644 --- a/docs/doxygen/html/_capacitor_8h.html +++ b/docs/doxygen/html/_capacitor_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_capacitor_8h.html','');});
Capacitor.h File Reference
-
#include "Shunt.h"
-
-

Go to the source code of this file.

- +
#include "Shunt.h"
+
diff --git a/docs/doxygen/html/_capacitor_8h_source.html b/docs/doxygen/html/_capacitor_8h_source.html deleted file mode 100644 index 311d0db..0000000 --- a/docs/doxygen/html/_capacitor_8h_source.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - -Project/Capacitor.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  CapacitorElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Capacitor.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CAPACITOR_H
19 #define CAPACITOR_H
20 
21 #include "Shunt.h"
22 
24 
26  wxString name;
27  double reactivePower = 100.0;
28  ElectricalUnit reactivePowerUnit = UNIT_MVAr;
29 };
30 
38 class Capacitor : public Shunt
39 {
40  public:
41  Capacitor();
42  Capacitor(wxString name);
43  ~Capacitor();
44 
45  virtual Element* GetCopy();
46  virtual bool AddParent(Element* parent, wxPoint2DDouble position);
47  virtual void Draw(wxPoint2DDouble translation, double scale) const;
48  virtual bool Contains(wxPoint2DDouble position) const;
49  virtual bool Intersects(wxRect2DDouble rect) const;
50  virtual void Rotate(bool clockwise = true);
51  virtual bool GetContextMenu(wxMenu& menu);
52  virtual wxString GetTipText() const;
53  virtual bool ShowForm(wxWindow* parent, Element* element);
54  virtual CapacitorElectricalData GetElectricalData() { return m_electricalData; }
55  virtual CapacitorElectricalData GetPUElectricalData(double systemPowerBase);
56  virtual void SetElectricalData(CapacitorElectricalData electricalData) { m_electricalData = electricalData; }
57  protected:
58  CapacitorElectricalData m_electricalData;
59 };
60 
61 #endif // CAPACITOR_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- -
Shunt capactior power element.
Definition: Capacitor.h:38
-
Abstract class for shunt power elements.
Definition: Shunt.h:31
-
Form to edit the reactive shunt element power data.
- -
-
- - - - diff --git a/docs/doxygen/html/_chart_view_8cpp_source.html b/docs/doxygen/html/_chart_view_8cpp_source.html deleted file mode 100644 index 6521f7c..0000000 --- a/docs/doxygen/html/_chart_view_8cpp_source.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - -Project/ChartView.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ChartView.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ChartView.h"
19 #include "ElementPlotData.h"
20 
21 ChartView::ChartView(wxWindow* parent, std::vector<ElementPlotData> epdList, std::vector<double> time)
22  : ChartViewBase(parent)
23 {
24  m_epdList = epdList;
25  m_time = time;
26  m_xAxisValues = time;
27 
28  m_menuItemShowGrid->Check(m_hideGrid ? false : true);
29  m_menuItemShowLabel->Check(m_showLeg);
30  m_menuItemShowCoordinates->Check(m_showCoords);
31  m_menuItemDarkTheme->Check(m_darkTheme);
32 
33  // Create color property.
34  m_pgPropColor = m_pgMgr->Insert(m_pgPropLineProp, 1, new wxColourProperty(_("Color")));
35  m_pgPropColor->SetEditor(wxT("ChoiceAndButton"));
36  m_pgPropColor->SetValue(static_cast<wxVariant>(static_cast<wxAny>(*wxBLACK)));
37 
38  // Set margins and axis limit to composed mode.
39  m_pgPropMargins->SetValue(wxT("<composed>"));
40  m_pgMgr->Collapse(m_pgPropMargins);
41  m_pgPropAxisLimit->SetValue(wxT("<composed>"));
42  m_pgMgr->Collapse(m_pgPropAxisLimit);
43 
44  // Add line type choices
45  m_pgProplineType->AddChoice(_("Solid"), wxPENSTYLE_SOLID);
46  m_pgProplineType->AddChoice(_("Dot"), wxPENSTYLE_DOT);
47  m_pgProplineType->AddChoice(_("Dash"), wxPENSTYLE_SHORT_DASH);
48  m_pgProplineType->AddChoice(_("Dot and dash"), wxPENSTYLE_DOT_DASH);
49  m_pgProplineType->AddChoice(_("Cross"), wxPENSTYLE_CROSS_HATCH);
50  m_pgProplineType->AddChoice(_("Driagonal cross"), wxPENSTYLE_CROSSDIAG_HATCH);
51 
52  SetMPWindow();
53  GetSizer()->Add(m_mpWindow, 1, wxEXPAND, WXC_FROM_DIP(5));
54  SetTreectrl();
55  Layout();
56  SetInitialSize();
57 
58  BuildColourList();
59 }
60 
61 ChartView::~ChartView() {}
62 void ChartView::SetMPWindow()
63 {
64  m_mpWindow = new mpWindow(this, wxID_ANY);
65 
66  m_mpWindow->SetDoubleBuffered(true);
67 
68  m_mpWindow->SetMargins(20, 10, 40, 60);
69  m_xaxis = new mpScaleX("", mpALIGN_BOTTOM, true);
70  m_yaxis = new mpScaleY("", mpALIGN_LEFT, true);
71  m_xaxis->SetDrawOutsideMargins(false);
72  m_yaxis->SetDrawOutsideMargins(false);
73  m_xaxis->SetTicks(m_hideGrid);
74  m_yaxis->SetTicks(m_hideGrid);
75 
76  m_leg = new mpInfoLegend(wxRect(200, 20, 40, 40), wxWHITE_BRUSH);
77  m_coords = new mpInfoCoords(wxRect(0, 0, 0, 0), wxWHITE_BRUSH);
78 
79  m_chartTitle = new mpText("", 50, 0);
80  wxFont chartTitleFont(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD);
81  m_chartTitle->SetFont(chartTitleFont);
82 
83  m_mpWindow->AddLayer(m_xaxis);
84  m_mpWindow->AddLayer(m_yaxis);
85  m_mpWindow->AddLayer(m_leg);
86  m_mpWindow->AddLayer(m_coords);
87  m_mpWindow->AddLayer(m_chartTitle);
88 
89  m_leg->SetVisible(m_showLeg);
90  m_coords->SetVisible(m_showCoords);
91 
92  m_mpWindow->EnableDoubleBuffer(true);
93  m_mpWindow->LockAspect(false);
94  Fit();
95 }
96 
97 void ChartView::SetTreectrl()
98 {
99  wxTreeItemId rootID = m_treeCtrl->AddRoot(wxT("root"));
100  m_treeTimeID = m_treeCtrl->AppendItem(rootID, _("Time"));
101  m_treeCtrl->SetItemTextColour(m_treeTimeID, *wxRED);
102 
103  bool firstElement[ElementPlotData::NUM_ELEMENTS];
104  for(int i = 0; i < ElementPlotData::NUM_ELEMENTS; ++i) firstElement[i] = true;
105 
106  wxString rootElementName[ElementPlotData::NUM_ELEMENTS];
107  rootElementName[ElementPlotData::CT_BUS] = _("Bus");
108  rootElementName[ElementPlotData::CT_IND_MOTOR] = _("Induction motor");
109  rootElementName[ElementPlotData::CT_LINE] = _("Line");
110  rootElementName[ElementPlotData::CT_LOAD] = _("Load");
111  rootElementName[ElementPlotData::CT_SHUNT_CAPACITOR] = _("Capacitor");
112  rootElementName[ElementPlotData::CT_SHUNT_INDUCTOR] = _("Inductor");
113  rootElementName[ElementPlotData::CT_SYNC_COMPENSATOR] = _("Synchronous compensator");
114  rootElementName[ElementPlotData::CT_SYNC_GENERATOR] = _("Synchronous generator");
115  rootElementName[ElementPlotData::CT_TRANSFORMER] = _("Transformer");
116  rootElementName[ElementPlotData::CT_TEST] = _("Test");
117 
118  wxTreeItemId rootItemID[ElementPlotData::NUM_ELEMENTS];
119 
120  for(auto it = m_epdList.begin(), itEnd = m_epdList.end(); it != itEnd; ++it) {
121  ElementPlotData data = *it;
122  ElementPlotData::CurveType curveType = data.GetCurveType();
123 
124  if(firstElement[curveType]) {
125  rootItemID[curveType] = m_treeCtrl->AppendItem(rootID, rootElementName[curveType]);
126  firstElement[curveType] = false;
127  }
128  wxTreeItemId itemID = m_treeCtrl->AppendItem(rootItemID[curveType], data.GetName());
129  for(int i = 0; i < data.GetElementDataNumber(); ++i) {
130  m_treeCtrl->AppendItem(itemID, data.GetDataName(i), -1, -1, data.GetPlotData(i));
131  }
132  }
133 }
134 
135 void ChartView::OnPropertyGridChange(wxPropertyGridEvent& event)
136 {
137  bool fit = false;
138 
139  if(m_treeCtrl->GetSelection()) {
140  if(PlotData* data = dynamic_cast<PlotData*>(m_treeCtrl->GetItemData(m_treeCtrl->GetSelection()))) {
141  if(event.GetPropertyName() == _("Draw")) {
142  bool isPlotting = m_pgPropDraw->GetValue();
143  data->SetPlot(isPlotting);
144  if(isPlotting) {
145  wxColour colour = GetNextColour();
146  data->SetColour(colour);
147  m_pgPropColor->SetValue(static_cast<wxVariant>(static_cast<wxAny>(colour)));
148  m_treeCtrl->SetItemBold(m_treeCtrl->GetSelection(), true);
149  } else {
150  m_treeCtrl->SetItemBold(m_treeCtrl->GetSelection(), false);
151  }
152  fit = true;
153  } else if(event.GetPropertyName() == _("Color")) {
154  wxColour colour;
155  colour << m_pgPropColor->GetValue();
156  data->SetColour(colour);
157  } else if(event.GetPropertyName() == _("Thickness")) {
158  data->SetThick(m_pgProplineThick->GetValue().GetInteger());
159  } else if(event.GetPropertyName() == _("Type")) {
160  data->SetPenType(static_cast<wxPenStyle>(m_pgProplineType->GetValue().GetInteger()));
161  } else if(event.GetPropertyName() == _("Axis")) {
162  int axis = m_pgProplineAxis->GetValue().GetInteger();
163  if(axis == 1) { // Y
164  // All lines to Y axis
165  AllToYAxis(m_treeCtrl->GetRootItem());
166  // curva selecionada para o eixo X
167  m_treeCtrl->SetItemTextColour(m_treeCtrl->GetSelection(), *wxRED);
168  m_xAxisValues = data->GetValues();
169  }
170  data->SetAxis(axis);
171  fit = true;
172  }
173  }
174  }
175 
176  if(event.GetPropertyName() == _("Margins")) {
177  m_mpWindow->SetMargins(m_pgPropMarginsUp->GetValue().GetLong(), m_pgPropMarginsRight->GetValue().GetLong(),
178  m_pgPropMarginsBot->GetValue().GetLong(), m_pgPropMarginsLeft->GetValue().GetLong());
179  m_mpWindow->UpdateAll();
180  }
181  if(event.GetPropertyName() == _("Axis limit")) {
182  m_mpWindow->Fit(m_pgPropXMin->GetValue().GetDouble(), m_pgPropXMax->GetValue().GetDouble(),
183  m_pgPropYMin->GetValue().GetDouble(), m_pgPropYMax->GetValue().GetDouble());
184  m_mpWindow->UpdateAll();
185  }
186  UpdatePlot(fit);
187 }
188 
189 void ChartView::OnMenuDarkThemeClick(wxCommandEvent& event)
190 {
191  m_darkTheme = event.IsChecked();
192  wxColour grey(96, 96, 96);
193 
194  if(m_darkTheme) {
195  m_mpWindow->SetColourTheme(*wxBLACK, *wxWHITE, grey);
196  m_leg->SetBrush(*wxBLACK_BRUSH);
197  m_coords->SetBrush(*wxBLACK_BRUSH);
198  } else {
199  m_mpWindow->SetColourTheme(*wxWHITE, *wxBLACK, grey);
200  m_leg->SetBrush(*wxWHITE_BRUSH);
201  m_coords->SetBrush(*wxWHITE_BRUSH);
202  }
203 
204  m_mpWindow->UpdateAll();
205 }
206 
207 void ChartView::OnMenuSaveImageClick(wxCommandEvent& event)
208 {
209  int x = m_mpWindow->GetScreenPosition().x;
210  int y = m_mpWindow->GetScreenPosition().y;
211  int width = m_mpWindow->GetSize().GetWidth();
212  int height = m_mpWindow->GetSize().GetHeight();
213 
214  wxScreenDC dcScreen;
215  wxBitmap screenshot(width, height);
216 
217  wxMemoryDC memDC;
218  memDC.SelectObject(screenshot);
219 
220  memDC.Blit(0, 0, width, height, &dcScreen, x, y);
221  memDC.SelectObject(wxNullBitmap);
222 
223  wxFileDialog saveFileDialog(
224  this, _("Save image"), "", "",
225  "PNG image file (*.png)|*.png|Bitmap image file (*.bmp)|*.bmp|JPEG image file (*.jpg)|*.jpg",
226  wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
227  if(saveFileDialog.ShowModal() == wxID_CANCEL) return;
228 
229  wxFileName imagePath(saveFileDialog.GetPath());
230  wxBitmapType imageType = wxBITMAP_TYPE_BMP;
231 
232  if(imagePath.GetExt() == "png")
233  imageType = wxBITMAP_TYPE_PNG;
234  else if(imagePath.GetExt() == "jpg")
235  imageType = wxBITMAP_TYPE_JPEG;
236 
237  screenshot.SaveFile(imagePath.GetFullPath(), imageType);
238 }
239 
240 void ChartView::OnMenuSendClipClick(wxCommandEvent& event)
241 {
242  int x = m_mpWindow->GetScreenPosition().x;
243  int y = m_mpWindow->GetScreenPosition().y;
244  int width = m_mpWindow->GetSize().GetWidth();
245  int height = m_mpWindow->GetSize().GetHeight();
246 
247  wxScreenDC dcScreen;
248  wxBitmap screenshot(width, height);
249 
250  wxMemoryDC memDC;
251  memDC.SelectObject(screenshot);
252 
253  memDC.Blit(0, 0, width, height, &dcScreen, x, y);
254  memDC.SelectObject(wxNullBitmap);
255 
256  if(wxTheClipboard->Open()) {
257  wxTheClipboard->SetData(new wxBitmapDataObject(screenshot));
258  wxTheClipboard->Close();
259 
260  wxMessageDialog msgDialog(this, _("Chart send to clipboard"), _("Info"), wxOK | wxICON_INFORMATION,
261  wxDefaultPosition);
262  msgDialog.ShowModal();
263  } else {
264  wxMessageDialog msgDialog(this, _("It was not possible to send to clipboard"), _("Error"), wxOK | wxICON_ERROR,
265  wxDefaultPosition);
266  msgDialog.ShowModal();
267  }
268 }
269 
270 void ChartView::OnMenuShowCoordinatesClick(wxCommandEvent& event)
271 {
272  m_showCoords = event.IsChecked();
273  m_coords->SetVisible(m_showCoords);
274  m_mpWindow->UpdateAll();
275 }
276 
277 void ChartView::OnMenuShowGridClick(wxCommandEvent& event)
278 {
279  m_hideGrid = event.IsChecked() ? false : true;
280  m_xaxis->SetTicks(m_hideGrid);
281  m_yaxis->SetTicks(m_hideGrid);
282  m_mpWindow->UpdateAll();
283 }
284 
285 void ChartView::OnMenuShowLabelClick(wxCommandEvent& event)
286 {
287  m_showLeg = event.IsChecked();
288  m_leg->SetVisible(m_showLeg);
289  m_mpWindow->UpdateAll();
290 }
291 
292 void ChartView::Fit()
293 {
294  m_mpWindow->Fit();
295  double bBox[4];
296  m_mpWindow->GetBoundingBox(bBox);
297 
298  m_pgPropXMin->SetValue(bBox[0]);
299  m_pgPropXMax->SetValue(bBox[1]);
300  m_pgPropYMin->SetValue(bBox[2]);
301  m_pgPropYMax->SetValue(bBox[3]);
302 }
303 
304 void ChartView::UpdatePlot(bool fit)
305 {
306  wxRect legRect = m_leg->GetRectangle();
307  wxRect coordsRect = m_coords->GetRectangle();
308  m_mpWindow->DelAllLayers(true, false);
309 
310  // GoAllTrees(treeCtrl_ChartSelection->GetRootItem());
311  UpdateAllPlots(m_treeCtrl->GetRootItem());
312 
313  m_xaxis = new mpScaleX(m_pgPropXLabel->GetValueAsString(), mpALIGN_BOTTOM, true);
314  m_yaxis = new mpScaleY(m_pgPropYLabel->GetValueAsString(), mpALIGN_LEFT, true);
315  m_leg = new mpInfoLegend(legRect, wxWHITE_BRUSH);
316  m_coords = new mpInfoCoords(coordsRect, wxWHITE_BRUSH);
317 
318  m_xaxis->SetDrawOutsideMargins(false);
319  m_yaxis->SetDrawOutsideMargins(false);
320  m_xaxis->SetTicks(m_hideGrid);
321  m_yaxis->SetTicks(m_hideGrid);
322 
323  mpText* chartTitle = new mpText(m_pgPropChartTitle->GetValueAsString(), 50, 0);
324  wxFont chartTitleFont(12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD);
325  chartTitle->SetFont(chartTitleFont);
326 
327  m_mpWindow->AddLayer(m_xaxis);
328  m_mpWindow->AddLayer(m_yaxis);
329  m_mpWindow->AddLayer(m_leg);
330  m_mpWindow->AddLayer(m_coords);
331  m_mpWindow->AddLayer(chartTitle);
332 
333  m_leg->SetVisible(m_showLeg);
334  m_coords->SetVisible(m_showCoords);
335 
336  if(fit) Fit();
337 
338  wxColour grey(96, 96, 96);
339  if(m_darkTheme) {
340  m_mpWindow->SetColourTheme(*wxBLACK, *wxWHITE, grey);
341  m_leg->SetBrush(*wxBLACK_BRUSH);
342  m_coords->SetBrush(*wxBLACK_BRUSH);
343  } else {
344  m_mpWindow->SetColourTheme(*wxWHITE, *wxBLACK, grey);
345  m_leg->SetBrush(*wxWHITE_BRUSH);
346  m_coords->SetBrush(*wxWHITE_BRUSH);
347  }
348 }
349 
350 void ChartView::OnTreeItemActivated(wxTreeEvent& event)
351 {
352  if(PlotData* data = dynamic_cast<PlotData*>(m_treeCtrl->GetItemData(event.GetItem()))) {
353  bool isPlotting = data->IsPlot() ? false : true;
354  data->SetPlot(isPlotting);
355  m_pgPropDraw->SetValue(data->IsPlot());
356  if(isPlotting) {
357  wxColour colour = GetNextColour();
358  data->SetColour(colour);
359  m_pgPropColor->SetValue(static_cast<wxVariant>(static_cast<wxAny>(colour)));
360  m_treeCtrl->SetItemBold(m_treeCtrl->GetSelection(), true);
361  } else {
362  m_treeCtrl->SetItemBold(m_treeCtrl->GetSelection(), false);
363  }
364  UpdatePlot(true);
365  }
366 
367  if(event.GetItem() == m_treeTimeID) {
368  AllToYAxis(m_treeCtrl->GetRootItem());
369  m_treeCtrl->SetItemTextColour(m_treeTimeID, *wxRED);
370  m_xAxisValues = m_time;
371  UpdatePlot(true);
372  }
373 
374  event.Skip();
375 }
376 
377 void ChartView::OnTreeItemSelectionChanged(wxTreeEvent& event)
378 {
379  if(PlotData* data = dynamic_cast<PlotData*>(m_treeCtrl->GetItemData(event.GetItem()))) {
380  m_pgPropDraw->SetValue(data->IsPlot());
381  wxVariant colour;
382  colour << data->GetColour();
383  m_pgPropColor->SetValue(colour);
384  m_pgProplineThick->SetValue(data->GetThick());
385  m_pgProplineType->SetValue(data->GetPenType());
386  m_pgProplineAxis->SetValue(data->GetAxis());
387  }
388  event.Skip();
389 }
390 
391 void ChartView::BuildColourList()
392 {
393  m_colourList.push_back(wxColour(255, 0, 0));
394  m_colourList.push_back(wxColour(0, 0, 255));
395  m_colourList.push_back(wxColour(0, 255, 0));
396  m_colourList.push_back(wxColour(255, 128, 0));
397  m_colourList.push_back(wxColour(128, 0, 255));
398  m_colourList.push_back(wxColour(0, 255, 128));
399  m_colourList.push_back(wxColour(255, 255, 0));
400  m_colourList.push_back(wxColour(255, 0, 255));
401  m_colourList.push_back(wxColour(0, 255, 255));
402  m_colourList.push_back(wxColour(128, 255, 0));
403  m_colourList.push_back(wxColour(255, 0, 128));
404  m_colourList.push_back(wxColour(0, 128, 255));
405  m_colourList.push_back(wxColour(128, 128, 128));
406  m_colourList.push_back(*wxBLACK);
407  m_itColourList = --m_colourList.end();
408 }
409 
410 wxColour ChartView::GetNextColour()
411 {
412  if(*m_itColourList == *wxBLACK)
413  m_itColourList = m_colourList.begin();
414  else
415  ++m_itColourList;
416 
417  return *m_itColourList;
418 }
419 
420 wxTreeItemId ChartView::AllToYAxis(wxTreeItemId root)
421 {
422  wxTreeItemIdValue cookie;
423  wxTreeItemId item = m_treeCtrl->GetFirstChild(root, cookie);
424  wxTreeItemId child;
425 
426  while(item.IsOk()) {
427  m_treeCtrl->SetItemTextColour(item, *wxBLACK);
428  if(PlotData* data = dynamic_cast<PlotData*>(m_treeCtrl->GetItemData(item))) data->SetAxis(0); // X axis.
429 
430  if(m_treeCtrl->ItemHasChildren(item)) {
431  wxTreeItemId nextChild = AllToYAxis(item);
432  if(nextChild.IsOk()) return nextChild;
433  }
434  item = m_treeCtrl->GetNextChild(root, cookie);
435  }
436 
437  wxTreeItemId dummyID;
438  return dummyID;
439 }
440 
441 wxTreeItemId ChartView::UpdateAllPlots(wxTreeItemId root)
442 {
443  wxTreeItemIdValue cookie;
444  wxTreeItemId item = m_treeCtrl->GetFirstChild(root, cookie);
445  wxTreeItemId child;
446 
447  while(item.IsOk()) {
448  if(PlotData* data = dynamic_cast<PlotData*>(m_treeCtrl->GetItemData(item))) {
449  if(data->IsPlot()) {
450  wxString parentName = m_treeCtrl->GetItemText(m_treeCtrl->GetItemParent(item));
451  mpFXYVector* newLayer = new mpFXYVector(data->GetName() + " (" + parentName + ")");
452  newLayer->SetData(m_xAxisValues, data->GetValues());
453  newLayer->SetContinuity(true);
454  wxPen layerPen(data->GetColour(), data->GetThick(), data->GetPenType());
455  newLayer->SetPen(layerPen);
456  newLayer->SetDrawOutsideMargins(false);
457  newLayer->ShowName(false);
458 
459  m_mpWindow->AddLayer(newLayer);
460  }
461  }
462 
463  if(m_treeCtrl->ItemHasChildren(item)) {
464  wxTreeItemId nextChild = UpdateAllPlots(item);
465  if(nextChild.IsOk()) return nextChild;
466  }
467  item = m_treeCtrl->GetNextChild(root, cookie);
468  }
469 
470  wxTreeItemId dummyID;
471  return dummyID;
472 }
473 
474 void ChartView::OnMenuExpCSVClick(wxCommandEvent& event)
475 {
476  wxFileDialog saveFileDialog(this, _("Save CSV file"), "", "", "CSV file (*.csv)|*.csv",
477  wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
478  if(saveFileDialog.ShowModal() == wxID_CANCEL) return;
479 
480  wxTextFile csvFile(saveFileDialog.GetPath());
481  if(!csvFile.Create()) {
482  if(!csvFile.Open()) {
483  wxMessageDialog msgDialog(this, _("It was not possible to open or create the selected file."), _("Error"),
484  wxOK | wxCENTRE | wxICON_ERROR);
485  msgDialog.ShowModal();
486  }
487  } else
488  csvFile.Open();
489  if(csvFile.IsOpened()) {
490  csvFile.Clear();
491  csvFile.AddLine(GetActiveCurvesCSV());
492  csvFile.Write();
493  csvFile.Close();
494  }
495 }
496 
497 wxString ChartView::GetActiveCurvesCSV()
498 {
499  std::vector<PlotData*> activePlotDataList;
500  GetActivePlotData(m_treeCtrl->GetRootItem(), activePlotDataList);
501 
502  std::vector<double> xValues;
503  wxString xName = "";
504 
505  // Find X axis curve, if none is found, X is the m_time.
506  bool foundXAxis = false;
507  for(auto it = activePlotDataList.begin(), itEnd = activePlotDataList.end(); it != itEnd; ++it) {
508  PlotData* data = *it;
509  if(data->GetAxis() == 1) {
510  xValues = data->GetValues();
511  xName = data->GetName();
512  foundXAxis = true;
513  activePlotDataList.erase(it);
514  delete data;
515  break;
516  }
517  }
518  if(!foundXAxis) {
519  xValues = m_time;
520  xName = _("Time");
521  }
522 
523  // Build CSV text.
524  wxString csvText = xName + ";";
525  // Header
526  for(auto it = activePlotDataList.begin(), itEnd = activePlotDataList.end(); it != itEnd; ++it) {
527  PlotData* data = *it;
528  csvText += data->GetName() + ";";
529  }
530  csvText[csvText.length() - 1] = '\n';
531  // Values
532  for(unsigned int i = 0; i < xValues.size(); ++i) {
533  csvText += wxString::FromCDouble(xValues[i], 13) + ";";
534  for(unsigned int j = 0; j < activePlotDataList.size(); ++j) {
535  double value = 0.0;
536  if(i < activePlotDataList[j]->GetValues().size()) {
537  value = activePlotDataList[j]->GetValues()[i];
538  }
539  csvText += wxString::FromCDouble(value, 13) + ";";
540  }
541  csvText[csvText.length() - 1] = '\n';
542  }
543 
544  // Clear active plot data vector.
545  for(auto it = activePlotDataList.begin(); it != activePlotDataList.end(); ++it) {
546  delete(*it);
547  }
548  activePlotDataList.clear();
549 
550  return csvText;
551 }
552 
553 wxTreeItemId ChartView::GetActivePlotData(wxTreeItemId root, std::vector<PlotData*>& plotDataList)
554 {
555  wxTreeItemIdValue cookie;
556  wxTreeItemId item = m_treeCtrl->GetFirstChild(root, cookie);
557  wxTreeItemId child;
558 
559  while(item.IsOk()) {
560  if(PlotData* data = dynamic_cast<PlotData*>(m_treeCtrl->GetItemData(item))) {
561  if(data->IsPlot() || data->GetAxis() == 1) {
562  wxString parentName = m_treeCtrl->GetItemText(m_treeCtrl->GetItemParent(item));
563 
564  PlotData* dataCopy = new PlotData();
565  *dataCopy = *data;
566  dataCopy->SetName(data->GetName() + " (" + parentName + ")");
567  plotDataList.push_back(dataCopy);
568  }
569  }
570 
571  if(m_treeCtrl->ItemHasChildren(item)) {
572  wxTreeItemId nextChild = GetActivePlotData(item, plotDataList);
573  if(nextChild.IsOk()) return nextChild;
574  }
575  item = m_treeCtrl->GetNextChild(root, cookie);
576  }
577 
578  wxTreeItemId dummyID;
579  return dummyID;
580 }
- - - -
This class is responsible to manage the graphical data of electromechanical result to be plotted on c...
-
-
- - - - diff --git a/docs/doxygen/html/_chart_view_8h.html b/docs/doxygen/html/_chart_view_8h.html index 90336b5..d3336d0 100644 --- a/docs/doxygen/html/_chart_view_8h.html +++ b/docs/doxygen/html/_chart_view_8h.html @@ -90,7 +90,7 @@ $(document).ready(function(){initNavTree('_chart_view_8h.html','');});
ChartView.h File Reference
-
#include "ChartViewBase.h"
+
#include "base/ChartViewBase.h"
#include "wxMathPlot/mathplot.h"
#include <wx/msgdlg.h>
#include <wx/clipbrd.h>
@@ -98,9 +98,7 @@ $(document).ready(function(){initNavTree('_chart_view_8h.html','');}); #include <wx/dcscreen.h>
#include <wx/filedlg.h>
#include <wx/textfile.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_chart_view_8h_source.html b/docs/doxygen/html/_chart_view_8h_source.html deleted file mode 100644 index f861742..0000000 --- a/docs/doxygen/html/_chart_view_8h_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/ChartView.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ChartView
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ChartView.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CHARTVIEW_H
19 #define CHARTVIEW_H
20 #include "ChartViewBase.h"
21 #include "wxMathPlot/mathplot.h"
22 
23 #include <wx/msgdlg.h>
24 #include <wx/clipbrd.h>
25 #include <wx/bitmap.h>
26 #include <wx/dcscreen.h>
27 #include <wx/filedlg.h>
28 #include <wx/textfile.h>
29 
30 class PlotData;
31 class ElementPlotData;
32 
40 class ChartView : public ChartViewBase
41 {
42  public:
43  ChartView(wxWindow* parent, std::vector<ElementPlotData> epdList, std::vector<double> time);
44  virtual ~ChartView();
45 
46  void Fit();
47  void UpdatePlot(bool fit = true);
48 
49  protected:
50  virtual void OnMenuExpCSVClick(wxCommandEvent& event);
51  virtual void OnTreeItemActivated(wxTreeEvent& event);
52  virtual void OnTreeItemSelectionChanged(wxTreeEvent& event);
53  virtual void OnMenuDarkThemeClick(wxCommandEvent& event);
54  virtual void OnMenuExitClick(wxCommandEvent& event) { Close(); }
55  virtual void OnMenuFitClick(wxCommandEvent& event) { Fit(); }
56  virtual void OnMenuSaveImageClick(wxCommandEvent& event);
57  virtual void OnMenuSendClipClick(wxCommandEvent& event);
58  virtual void OnMenuShowCoordinatesClick(wxCommandEvent& event);
59  virtual void OnMenuShowGridClick(wxCommandEvent& event);
60  virtual void OnMenuShowLabelClick(wxCommandEvent& event);
61  virtual void OnPropertyGridChange(wxPropertyGridEvent& event);
62  virtual void SetMPWindow();
63  virtual void SetTreectrl();
64  virtual void BuildColourList();
65  virtual wxColour GetNextColour();
66  virtual wxTreeItemId AllToYAxis(wxTreeItemId root);
67  virtual wxTreeItemId UpdateAllPlots(wxTreeItemId root);
68  virtual wxString GetActiveCurvesCSV();
69  virtual wxTreeItemId GetActivePlotData(wxTreeItemId root, std::vector<PlotData*>& plotDataList);
70 
71  wxPGProperty* m_pgPropColor = NULL;
72 
73  wxTreeItemId m_treeTimeID;
74 
75  std::vector<ElementPlotData> m_epdList;
76  std::vector<double> m_time;
77  std::vector<double> m_xAxisValues;
78 
79  mpWindow* m_mpWindow = NULL;
80  mpScaleX* m_xaxis = NULL;
81  mpScaleY* m_yaxis = NULL;
82  mpText* m_chartTitle = NULL;
83  mpInfoCoords* m_coords = NULL;
84  mpInfoLegend* m_leg = NULL;
85 
86  bool m_hideGrid = true;
87  bool m_showLeg = true;
88  bool m_showCoords = false;
89  bool m_darkTheme = false;
90 
91  std::vector<wxColour> m_colourList;
92  std::vector<wxColour>::iterator m_itColourList;
93 };
94 #endif // CHARTVIEW_H
- -
This class is responsible to manage the charts generated in the transient electromechanical studies...
Definition: ChartView.h:40
-
This class is responsible to manage the graphical data of electromechanical result to be plotted on c...
-
-
- - - - diff --git a/docs/doxygen/html/_chart_view_base_8cpp_source.html b/docs/doxygen/html/_chart_view_base_8cpp_source.html deleted file mode 100644 index 0825678..0000000 --- a/docs/doxygen/html/_chart_view_base_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/ChartViewBase.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ChartViewBase.cpp
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: ChartView.wxcp
4 // Do not modify this file by hand!
6 
7 #include "ChartViewBase.h"
8 
9 
10 // Declare the bitmap loading function
11 extern void wxCE3EBInitBitmapResources();
12 
13 static bool bBitmapLoaded = false;
14 
15 
16 ChartViewBase::ChartViewBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
17  : wxFrame(parent, id, title, pos, size, style)
18 {
19  if ( !bBitmapLoaded ) {
20  // We need to initialise the default bitmap handler
21  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
22  wxCE3EBInitBitmapResources();
23  bBitmapLoaded = true;
24  }
25  // Set icon(s) to the application/dialog
26  wxIconBundle app_icons;
27  {
28  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart16"));
29  wxIcon icn;
30  icn.CopyFromBitmap(iconBmp);
31  app_icons.AddIcon( icn );
32  }
33  {
34  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart32"));
35  wxIcon icn;
36  icn.CopyFromBitmap(iconBmp);
37  app_icons.AddIcon( icn );
38  }
39  {
40  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart64"));
41  wxIcon icn;
42  icn.CopyFromBitmap(iconBmp);
43  app_icons.AddIcon( icn );
44  }
45  {
46  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart128"));
47  wxIcon icn;
48  icn.CopyFromBitmap(iconBmp);
49  app_icons.AddIcon( icn );
50  }
51  {
52  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart256"));
53  wxIcon icn;
54  icn.CopyFromBitmap(iconBmp);
55  app_icons.AddIcon( icn );
56  }
57  SetIcons( app_icons );
58 
59 
60  m_menuBar = new wxMenuBar(0);
61  this->SetMenuBar(m_menuBar);
62 
63  m_menuFile = new wxMenu();
64  m_menuBar->Append(m_menuFile, _("File"));
65 
66  m_menuItemSaveImage = new wxMenuItem(m_menuFile, wxID_ANY, _("Save chart as image"), wxT(""), wxITEM_NORMAL);
67  m_menuFile->Append(m_menuItemSaveImage);
68 
69  m_menuItemSendToClipboard = new wxMenuItem(m_menuFile, wxID_ANY, _("Send to clipboard"), wxT(""), wxITEM_NORMAL);
70  m_menuFile->Append(m_menuItemSendToClipboard);
71 
72  m_menuItemExportCSV = new wxMenuItem(m_menuFile, wxID_ANY, _("Export CSV..."), wxT(""), wxITEM_NORMAL);
73  m_menuFile->Append(m_menuItemExportCSV);
74 
75  m_menuFile->AppendSeparator();
76 
77  m_menuItemExit = new wxMenuItem(m_menuFile, wxID_ANY, _("Exit"), wxT(""), wxITEM_NORMAL);
78  m_menuFile->Append(m_menuItemExit);
79 
80  m_menuView = new wxMenu();
81  m_menuBar->Append(m_menuView, _("View"));
82 
83  m_menuItemFit = new wxMenuItem(m_menuView, wxID_ANY, _("Fit"), wxT(""), wxITEM_NORMAL);
84  m_menuView->Append(m_menuItemFit);
85 
86  m_menuView->AppendSeparator();
87 
88  m_menuItemShowGrid = new wxMenuItem(m_menuView, wxID_ANY, _("Show grid"), wxT(""), wxITEM_CHECK);
89  m_menuView->Append(m_menuItemShowGrid);
90 
91  m_menuItemShowLabel = new wxMenuItem(m_menuView, wxID_ANY, _("Show label"), wxT(""), wxITEM_CHECK);
92  m_menuView->Append(m_menuItemShowLabel);
93 
94  m_menuItemShowCoordinates = new wxMenuItem(m_menuView, wxID_ANY, _("Show coordinates"), wxT(""), wxITEM_CHECK);
95  m_menuView->Append(m_menuItemShowCoordinates);
96 
97  m_menuItemDarkTheme = new wxMenuItem(m_menuView, wxID_ANY, _("Dark theme"), wxT(""), wxITEM_CHECK);
98  m_menuView->Append(m_menuItemDarkTheme);
99 
100  wxBoxSizer* boxSizer_lvl1_1 = new wxBoxSizer(wxHORIZONTAL);
101  this->SetSizer(boxSizer_lvl1_1);
102 
103  wxBoxSizer* boxSizer_lvl2_1 = new wxBoxSizer(wxVERTICAL);
104 
105  boxSizer_lvl1_1->Add(boxSizer_lvl2_1, 0, wxEXPAND, WXC_FROM_DIP(5));
106 
107  m_treeCtrl = new wxTreeCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT);
108 
109  boxSizer_lvl2_1->Add(m_treeCtrl, 1, 0, WXC_FROM_DIP(5));
110  m_treeCtrl->SetMinSize(wxSize(250,-1));
111 
112  wxArrayString m_pgMgrArr;
113  wxUnusedVar(m_pgMgrArr);
114  wxArrayInt m_pgMgrIntArr;
115  wxUnusedVar(m_pgMgrIntArr);
116  m_pgMgr = new wxPropertyGridManager(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
117 
118  boxSizer_lvl2_1->Add(m_pgMgr, 0, 0, WXC_FROM_DIP(5));
119 
120  m_pgPropLineProp = m_pgMgr->Append( new wxPropertyCategory( _("Line properties") ) );
121  m_pgPropLineProp->SetHelpString(wxT(""));
122 
123  m_pgPropDraw = m_pgMgr->AppendIn( m_pgPropLineProp, new wxBoolProperty( _("Draw"), wxPG_LABEL, 1) );
124  m_pgPropDraw->SetHelpString(wxT(""));
125  m_pgPropDraw->SetEditor( wxT("CheckBox") );
126 
127  m_pgProplineThick = m_pgMgr->AppendIn( m_pgPropLineProp, new wxIntProperty( _("Thickness"), wxPG_LABEL, 1) );
128  m_pgProplineThick->SetHelpString(wxT(""));
129  m_pgProplineThick->SetEditor( wxT("TextCtrl") );
130 
131  m_pgMgrArr.Clear();
132  m_pgMgrIntArr.Clear();
133  m_pgProplineType = m_pgMgr->AppendIn( m_pgPropLineProp, new wxEnumProperty( _("Type"), wxPG_LABEL, m_pgMgrArr, m_pgMgrIntArr, 0) );
134  m_pgProplineType->SetHelpString(wxT(""));
135  m_pgProplineType->SetEditor( wxT("Choice") );
136 
137  m_pgMgrArr.Clear();
138  m_pgMgrIntArr.Clear();
139  m_pgMgrArr.Add(_("Y"));
140  m_pgMgrArr.Add(_("X"));
141  m_pgProplineAxis = m_pgMgr->AppendIn( m_pgPropLineProp, new wxEnumProperty( _("Axis"), wxPG_LABEL, m_pgMgrArr, m_pgMgrIntArr, 0) );
142  m_pgProplineAxis->SetHelpString(wxT(""));
143  m_pgProplineAxis->SetEditor( wxT("Choice") );
144 
145  m_pgPropChartProp = m_pgMgr->Append( new wxPropertyCategory( _("Chart properties") ) );
146  m_pgPropChartProp->SetHelpString(wxT(""));
147 
148  m_pgPropChartTitle = m_pgMgr->AppendIn( m_pgPropChartProp, new wxStringProperty( _("Chart title"), wxPG_LABEL, wxT("")) );
149  m_pgPropChartTitle->SetHelpString(wxT(""));
150  m_pgPropChartTitle->SetEditor( wxT("TextCtrl") );
151 
152  m_pgPropXLabel = m_pgMgr->AppendIn( m_pgPropChartProp, new wxStringProperty( _("X axis label"), wxPG_LABEL, wxT("")) );
153  m_pgPropXLabel->SetHelpString(wxT(""));
154  m_pgPropXLabel->SetEditor( wxT("TextCtrl") );
155 
156  m_pgPropYLabel = m_pgMgr->AppendIn( m_pgPropChartProp, new wxStringProperty( _("Y axis label"), wxPG_LABEL, wxT("")) );
157  m_pgPropYLabel->SetHelpString(wxT(""));
158  m_pgPropYLabel->SetEditor( wxT("TextCtrl") );
159 
160  m_pgPropMargins = m_pgMgr->AppendIn( m_pgPropChartProp, new wxStringProperty( _("Margins"), wxPG_LABEL, wxT("")) );
161  m_pgPropMargins->SetHelpString(wxT(""));
162 
163  m_pgPropMarginsUp = m_pgMgr->AppendIn( m_pgPropMargins, new wxIntProperty( _("Up"), wxPG_LABEL, 20) );
164  m_pgPropMarginsUp->SetHelpString(wxT(""));
165 
166  m_pgPropMarginsBot = m_pgMgr->AppendIn( m_pgPropMargins, new wxIntProperty( _("Botton"), wxPG_LABEL, 40) );
167  m_pgPropMarginsBot->SetHelpString(wxT(""));
168 
169  m_pgPropMarginsLeft = m_pgMgr->AppendIn( m_pgPropMargins, new wxIntProperty( _("Left"), wxPG_LABEL, 60) );
170  m_pgPropMarginsLeft->SetHelpString(wxT(""));
171 
172  m_pgPropMarginsRight = m_pgMgr->AppendIn( m_pgPropMargins, new wxIntProperty( _("Right"), wxPG_LABEL, 10) );
173  m_pgPropMarginsRight->SetHelpString(wxT(""));
174 
175  m_pgPropAxisLimit = m_pgMgr->AppendIn( m_pgPropChartProp, new wxStringProperty( _("Axis limit"), wxPG_LABEL, wxT("")) );
176  m_pgPropAxisLimit->SetHelpString(wxT(""));
177 
178  m_pgPropXMin = m_pgMgr->AppendIn( m_pgPropAxisLimit, new wxFloatProperty( _("X min"), wxPG_LABEL, 0) );
179  m_pgPropXMin->SetHelpString(wxT(""));
180 
181  m_pgPropXMax = m_pgMgr->AppendIn( m_pgPropAxisLimit, new wxFloatProperty( _("X max"), wxPG_LABEL, 1) );
182  m_pgPropXMax->SetHelpString(wxT(""));
183 
184  m_pgPropYMin = m_pgMgr->AppendIn( m_pgPropAxisLimit, new wxFloatProperty( _("Y min"), wxPG_LABEL, 0) );
185  m_pgPropYMin->SetHelpString(wxT(""));
186 
187  m_pgPropYMax = m_pgMgr->AppendIn( m_pgPropAxisLimit, new wxFloatProperty( _("Y max"), wxPG_LABEL, 1) );
188  m_pgPropYMax->SetHelpString(wxT(""));
189  m_pgMgr->SetMinSize(wxSize(250,250));
190 
191  SetName(wxT("ChartViewBase"));
192  SetSize(-1,-1);
193  if (GetSizer()) {
194  GetSizer()->Fit(this);
195  }
196  if(GetParent()) {
197  CentreOnParent(wxBOTH);
198  } else {
199  CentreOnScreen(wxBOTH);
200  }
201 #if wxVERSION_NUMBER >= 2900
202  if(!wxPersistenceManager::Get().Find(this)) {
203  wxPersistenceManager::Get().RegisterAndRestore(this);
204  } else {
205  wxPersistenceManager::Get().Restore(this);
206  }
207 #endif
208  // Connect events
209  this->Connect(m_menuItemSaveImage->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuSaveImageClick), NULL, this);
210  this->Connect(m_menuItemSendToClipboard->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuSendClipClick), NULL, this);
211  this->Connect(m_menuItemExportCSV->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuExpCSVClick), NULL, this);
212  this->Connect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuExitClick), NULL, this);
213  this->Connect(m_menuItemFit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuFitClick), NULL, this);
214  this->Connect(m_menuItemShowGrid->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuShowGridClick), NULL, this);
215  this->Connect(m_menuItemShowLabel->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuShowLabelClick), NULL, this);
216  this->Connect(m_menuItemShowCoordinates->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuShowCoordinatesClick), NULL, this);
217  this->Connect(m_menuItemDarkTheme->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuDarkThemeClick), NULL, this);
218  m_treeCtrl->Connect(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler(ChartViewBase::OnTreeItemActivated), NULL, this);
219  m_treeCtrl->Connect(wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler(ChartViewBase::OnTreeItemSelectionChanged), NULL, this);
220  m_pgMgr->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(ChartViewBase::OnPropertyGridChange), NULL, this);
221 
222 }
223 
224 ChartViewBase::~ChartViewBase()
225 {
226  this->Disconnect(m_menuItemSaveImage->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuSaveImageClick), NULL, this);
227  this->Disconnect(m_menuItemSendToClipboard->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuSendClipClick), NULL, this);
228  this->Disconnect(m_menuItemExportCSV->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuExpCSVClick), NULL, this);
229  this->Disconnect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuExitClick), NULL, this);
230  this->Disconnect(m_menuItemFit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuFitClick), NULL, this);
231  this->Disconnect(m_menuItemShowGrid->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuShowGridClick), NULL, this);
232  this->Disconnect(m_menuItemShowLabel->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuShowLabelClick), NULL, this);
233  this->Disconnect(m_menuItemShowCoordinates->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuShowCoordinatesClick), NULL, this);
234  this->Disconnect(m_menuItemDarkTheme->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ChartViewBase::OnMenuDarkThemeClick), NULL, this);
235  m_treeCtrl->Disconnect(wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler(ChartViewBase::OnTreeItemActivated), NULL, this);
236  m_treeCtrl->Disconnect(wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler(ChartViewBase::OnTreeItemSelectionChanged), NULL, this);
237  m_pgMgr->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(ChartViewBase::OnPropertyGridChange), NULL, this);
238 
239 }
-
- - - - diff --git a/docs/doxygen/html/_chart_view_base_8h_source.html b/docs/doxygen/html/_chart_view_base_8h_source.html deleted file mode 100644 index e729e4c..0000000 --- a/docs/doxygen/html/_chart_view_base_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/ChartViewBase.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ChartViewBase.h
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: ChartView.wxcp
4 // Do not modify this file by hand!
6 
7 #ifndef _PSP_PROJECT_CHARTVIEW_BASE_CLASSES_H
8 #define _PSP_PROJECT_CHARTVIEW_BASE_CLASSES_H
9 
10 #include <wx/settings.h>
11 #include <wx/xrc/xmlres.h>
12 #include <wx/xrc/xh_bmp.h>
13 #include <wx/frame.h>
14 #include <wx/iconbndl.h>
15 #include <wx/artprov.h>
16 #include <wx/sizer.h>
17 #include <wx/menu.h>
18 #include <wx/treectrl.h>
19 #include <wx/propgrid/manager.h>
20 #include <wx/propgrid/property.h>
21 #include <wx/propgrid/advprops.h>
22 #if wxVERSION_NUMBER >= 2900
23 #include <wx/persist.h>
24 #include <wx/persist/toplevel.h>
25 #include <wx/persist/bookctrl.h>
26 #include <wx/persist/treebook.h>
27 #endif
28 
29 #ifdef WXC_FROM_DIP
30 #undef WXC_FROM_DIP
31 #endif
32 #if wxVERSION_NUMBER >= 3100
33 #define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
34 #else
35 #define WXC_FROM_DIP(x) x
36 #endif
37 
38 
39 class ChartViewBase : public wxFrame
40 {
41 protected:
42  wxMenuBar* m_menuBar;
43  wxMenu* m_menuFile;
44  wxMenuItem* m_menuItemSaveImage;
45  wxMenuItem* m_menuItemSendToClipboard;
46  wxMenuItem* m_menuItemExportCSV;
47  wxMenuItem* m_menuItemSeparator_1;
48  wxMenuItem* m_menuItemExit;
49  wxMenu* m_menuView;
50  wxMenuItem* m_menuItemFit;
51  wxMenuItem* m_menuItemSeparator_2;
52  wxMenuItem* m_menuItemShowGrid;
53  wxMenuItem* m_menuItemShowLabel;
54  wxMenuItem* m_menuItemShowCoordinates;
55  wxMenuItem* m_menuItemDarkTheme;
56  wxTreeCtrl* m_treeCtrl;
57  wxPropertyGridManager* m_pgMgr;
58  wxPGProperty* m_pgPropLineProp;
59  wxPGProperty* m_pgPropDraw;
60  wxPGProperty* m_pgProplineThick;
61  wxPGProperty* m_pgProplineType;
62  wxPGProperty* m_pgProplineAxis;
63  wxPGProperty* m_pgPropChartProp;
64  wxPGProperty* m_pgPropChartTitle;
65  wxPGProperty* m_pgPropXLabel;
66  wxPGProperty* m_pgPropYLabel;
67  wxPGProperty* m_pgPropMargins;
68  wxPGProperty* m_pgPropMarginsUp;
69  wxPGProperty* m_pgPropMarginsBot;
70  wxPGProperty* m_pgPropMarginsLeft;
71  wxPGProperty* m_pgPropMarginsRight;
72  wxPGProperty* m_pgPropAxisLimit;
73  wxPGProperty* m_pgPropXMin;
74  wxPGProperty* m_pgPropXMax;
75  wxPGProperty* m_pgPropYMin;
76  wxPGProperty* m_pgPropYMax;
77 
78 protected:
79  virtual void OnMenuSaveImageClick(wxCommandEvent& event) { event.Skip(); }
80  virtual void OnMenuSendClipClick(wxCommandEvent& event) { event.Skip(); }
81  virtual void OnMenuExpCSVClick(wxCommandEvent& event) { event.Skip(); }
82  virtual void OnMenuExitClick(wxCommandEvent& event) { event.Skip(); }
83  virtual void OnMenuFitClick(wxCommandEvent& event) { event.Skip(); }
84  virtual void OnMenuShowGridClick(wxCommandEvent& event) { event.Skip(); }
85  virtual void OnMenuShowLabelClick(wxCommandEvent& event) { event.Skip(); }
86  virtual void OnMenuShowCoordinatesClick(wxCommandEvent& event) { event.Skip(); }
87  virtual void OnMenuDarkThemeClick(wxCommandEvent& event) { event.Skip(); }
88  virtual void OnTreeItemActivated(wxTreeEvent& event) { event.Skip(); }
89  virtual void OnTreeItemSelectionChanged(wxTreeEvent& event) { event.Skip(); }
90  virtual void OnPropertyGridChange(wxPropertyGridEvent& event) { event.Skip(); }
91 
92 public:
93  wxMenuBar* GetMenuBar() { return m_menuBar; }
94  wxTreeCtrl* GetTreeCtrl() { return m_treeCtrl; }
95  wxPropertyGridManager* GetPgMgr() { return m_pgMgr; }
96  ChartViewBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Chart viewer"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_FRAME_STYLE);
97  virtual ~ChartViewBase();
98 };
99 
100 #endif
-
-
- - - - diff --git a/docs/doxygen/html/_chart_view_bitmaps_8cpp_source.html b/docs/doxygen/html/_chart_view_bitmaps_8cpp_source.html deleted file mode 100644 index 8424734..0000000 --- a/docs/doxygen/html/_chart_view_bitmaps_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/ChartViewBitmaps.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ChartViewBitmaps.cpp
-
-
-
1 //
2 // This file was automatically generated by wxrc, do not edit by hand.
3 //
4 
5 #include <wx/wxprec.h>
6 
7 #ifdef __BORLANDC__
8  #pragma hdrstop
9 #endif
10 
11 #include <wx/filesys.h>
12 #include <wx/fs_mem.h>
13 #include <wx/xrc/xmlres.h>
14 #include <wx/xrc/xh_all.h>
15 
16 #if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
17  #define XRC_ADD_FILE(name, data, size, mime) \
18  wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
19 #else
20  #define XRC_ADD_FILE(name, data, size, mime) \
21  wxMemoryFSHandler::AddFile(name, data, size)
22 #endif
23 
24 static size_t xml_res_size_0 = 3278;
25 static unsigned char xml_res_file_0[] = {
26 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,128,0,0,0,128,8,6,0,
27 0,0,195,62,97,203,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
28 72,89,115,0,0,21,211,0,0,21,211,1,251,209,60,11,0,0,0,25,116,69,88,116,
29 83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,
30 101,46,111,114,103,155,238,60,26,0,0,12,75,73,68,65,84,120,156,237,157,
31 121,116,21,213,25,192,127,55,9,33,33,160,64,136,85,64,212,82,168,162,162,
32 30,212,163,7,212,138,130,27,214,106,177,5,165,81,17,194,86,15,160,213,138,
33 138,68,20,42,10,138,11,178,184,69,80,118,227,82,177,238,90,197,189,173,
34 82,80,4,142,82,203,81,34,88,1,129,188,240,150,220,254,17,34,9,121,239,101,
35 238,125,119,150,100,238,239,63,242,230,155,249,14,243,155,111,230,125,247,
36 206,187,130,73,31,74,178,178,176,132,147,44,98,17,168,174,246,59,15,139,
37 79,100,33,37,86,130,240,82,83,251,173,4,161,101,223,205,223,74,16,74,234,
38 63,253,89,9,66,71,78,131,191,236,149,160,251,193,237,24,126,226,65,142,
39 118,178,112,245,15,124,82,81,105,58,55,139,7,52,20,0,64,74,58,231,199,25,
40 127,114,17,217,217,217,141,238,100,85,69,196,10,208,68,73,221,0,144,146,
41 221,187,119,147,72,36,60,76,199,226,53,105,59,64,210,74,16,40,218,178,147,
42 92,98,70,247,217,104,11,208,74,16,28,238,22,247,179,65,92,194,88,177,152,
43 150,68,141,236,211,81,15,216,74,224,63,135,179,153,98,86,208,133,10,102,
44 50,131,117,98,32,37,60,67,14,153,157,19,199,131,0,86,2,127,41,21,243,234,
45 149,255,195,216,204,92,49,149,245,226,18,74,120,134,108,244,190,186,43,
46 141,2,213,74,16,143,199,181,14,102,209,163,27,155,184,156,191,37,253,236,
47 8,190,101,174,152,202,106,49,136,98,86,40,139,160,60,12,40,165,164,178,
48 178,210,74,224,33,147,196,188,70,75,253,81,108,228,9,81,202,191,247,138,
49 144,229,80,4,173,113,96,43,129,119,28,197,70,6,241,138,227,237,123,236,
50 21,225,53,49,198,209,246,218,19,1,172,4,222,80,42,230,105,221,223,223,164,
51 151,163,237,50,154,9,82,43,129,180,15,134,174,112,52,95,49,144,55,148,227,
52 254,199,129,220,39,7,59,218,54,227,169,64,82,74,226,123,34,80,109,37,48,
53 205,100,230,56,190,151,215,101,6,67,248,145,2,71,219,26,154,11,38,33,86,
54 101,37,48,200,9,172,227,98,241,150,114,220,247,180,229,65,249,59,199,219,
55 155,155,12,40,173,4,38,185,77,204,69,32,149,227,166,201,43,216,73,43,199,
56 219,155,157,13,106,37,48,66,47,214,50,128,149,202,113,21,20,242,16,3,149,
57 98,204,79,7,182,18,100,204,237,98,142,246,213,95,73,158,82,140,59,243,193,
58 173,4,218,156,202,106,206,227,61,229,184,205,116,96,46,151,40,199,185,247,
59 66,128,149,64,139,201,204,209,138,155,194,80,34,180,84,142,115,247,141,
60 16,43,129,18,189,89,197,217,226,35,229,184,77,252,140,71,228,69,90,199,
61 116,255,149,32,43,129,99,238,96,182,86,220,20,134,178,135,92,173,88,111,
62 222,9,179,18,52,74,95,241,49,191,18,255,84,142,251,154,67,120,92,94,168,
63 125,92,239,94,10,148,18,162,182,99,152,138,73,242,97,173,184,201,114,24,
64 81,90,104,31,215,251,183,66,173,4,13,56,135,247,57,93,124,162,28,247,37,
65 157,153,207,5,25,29,219,159,215,130,173,4,245,40,69,255,234,143,211,248,
66 180,253,116,248,247,94,120,52,2,9,59,148,124,1,43,57,69,172,86,142,219,
67 192,161,44,228,220,140,143,239,239,15,3,196,170,66,47,193,36,161,119,245,
68 79,146,35,50,190,250,193,111,1,32,212,18,252,70,188,197,73,124,174,28,247,
69 57,71,176,132,126,70,114,240,95,0,8,165,4,2,201,36,205,123,127,169,44,161,
70 218,208,169,11,134,0,16,58,9,126,43,222,224,120,214,43,199,173,161,43,79,
71 211,215,88,30,193,17,0,66,35,65,22,213,76,228,81,173,216,137,140,52,118,
72 245,215,228,18,52,66,32,193,239,121,149,158,108,80,142,251,23,71,242,156,
73 60,195,104,46,193,19,0,154,181,4,217,84,51,81,232,93,253,147,40,65,34,140,
74 230,147,252,247,1,130,64,172,10,200,131,236,250,41,150,240,12,125,196,167,
75 188,207,177,188,39,143,99,13,93,73,4,212,227,100,92,198,75,28,197,70,229,
76 184,143,228,209,188,192,105,198,243,9,174,0,80,79,130,150,68,121,80,220,
77 205,48,158,5,224,15,188,8,2,118,147,207,167,116,103,165,60,158,119,57,142,
78 247,57,150,239,105,235,111,222,41,200,166,154,155,197,99,90,177,183,50,
79 194,112,54,53,4,91,0,128,88,21,93,216,78,121,206,77,244,98,109,131,143,
80 11,136,208,155,85,244,22,171,0,144,8,214,114,56,15,113,41,179,228,165,94,
81 103,155,150,98,86,240,75,190,86,142,123,79,246,228,101,78,117,33,163,160,
82 62,3,212,161,143,248,148,215,227,67,233,153,104,120,242,147,33,144,244,
83 96,35,211,120,128,131,248,193,229,236,156,211,130,56,183,104,222,251,111,
84 101,164,225,108,246,17,88,1,4,146,113,98,17,207,113,29,69,108,163,50,6,
85 49,133,241,163,2,34,252,137,39,221,75,80,145,171,248,43,63,231,27,229,184,
86 149,242,120,94,231,36,23,50,170,33,144,2,180,161,146,5,226,86,74,169,255,
87 94,156,170,4,163,197,242,64,84,129,150,68,181,239,253,55,139,209,134,179,
88 169,79,224,4,232,198,38,94,21,163,83,206,139,87,145,160,128,8,215,137,167,
89 12,102,167,199,48,241,28,93,168,80,142,123,77,158,204,219,242,4,23,50,218,
90 71,160,4,56,159,119,121,93,140,226,200,70,30,148,84,36,24,195,50,95,171,
91 64,30,81,110,164,76,43,118,50,195,204,38,147,132,64,8,144,77,53,165,204,
92 227,41,49,145,3,216,237,40,198,169,4,126,87,129,17,162,156,206,108,81,142,
93 123,73,158,202,59,184,123,245,67,0,4,40,100,7,79,115,3,227,196,34,229,183,
94 97,156,74,224,87,21,200,35,202,245,204,215,138,45,165,196,112,54,201,241,
95 85,128,19,89,203,59,98,184,214,108,216,90,156,72,224,215,55,130,49,98,41,
96 157,216,170,28,247,130,236,195,135,28,227,66,70,13,241,77,128,65,188,204,
97 11,98,60,29,53,254,131,246,199,137,4,94,127,35,40,32,194,13,44,80,142,147,
98 8,38,51,220,133,140,146,227,185,0,45,137,114,191,152,206,28,113,39,121,
99 236,49,182,223,198,36,240,250,89,224,26,150,104,9,247,44,103,240,49,61,
100 92,200,40,57,158,10,208,137,45,188,200,88,138,89,225,202,254,43,99,16,77,
101 35,129,87,207,2,173,169,228,90,177,80,57,78,34,184,77,122,115,239,175,197,
102 51,1,206,228,31,188,45,74,232,37,190,48,178,191,84,195,162,145,52,18,120,
103 85,5,198,177,136,34,182,41,199,45,231,44,86,209,205,133,140,82,227,186,
104 0,181,45,221,229,226,207,20,178,195,200,62,215,208,149,115,121,128,72,138,
105 119,225,211,73,224,118,21,56,144,93,140,215,184,250,171,201,226,118,121,
106 181,11,25,165,199,85,1,90,19,161,140,219,26,180,116,51,97,25,103,211,79,
107 206,226,67,121,116,218,119,226,82,73,80,64,132,107,81,63,65,78,25,207,66,
108 218,243,163,114,220,98,250,179,154,95,184,144,81,122,92,19,160,27,155,120,
109 77,140,226,34,241,119,35,251,139,147,77,41,37,12,151,55,255,244,30,252,
110 125,12,74,89,5,32,181,4,127,20,75,93,169,2,109,217,201,88,177,88,57,46,
111 225,211,213,15,46,9,224,180,165,235,148,173,180,227,98,121,55,51,247,251,
112 237,187,239,104,79,25,3,210,198,38,147,192,173,42,112,189,88,64,91,118,
113 42,199,61,201,249,124,193,225,198,243,113,130,81,1,116,90,186,141,241,129,
114 60,150,211,228,195,41,219,162,51,229,224,180,85,0,146,75,96,186,10,20,178,
115 131,107,88,162,28,151,32,139,169,242,42,99,121,168,98,76,128,76,90,186,
116 169,40,99,0,191,102,6,21,20,166,220,198,73,21,128,134,18,20,16,97,188,88,
117 100,34,77,0,110,16,243,105,131,250,186,73,101,92,200,122,186,24,203,67,
118 21,35,2,116,97,51,111,137,145,25,181,116,235,82,69,46,163,229,141,140,147,
119 215,57,122,247,221,73,21,128,134,18,232,54,107,246,167,136,109,140,102,
120 185,114,92,140,28,166,200,161,25,31,63,19,140,8,112,189,152,207,161,26,
121 227,221,201,248,138,78,156,37,31,98,33,231,56,142,113,90,5,160,190,4,166,
122 170,192,4,202,104,173,113,245,63,202,69,108,164,99,198,199,207,4,35,2,228,
123 102,184,108,73,45,175,200,83,232,43,103,243,25,93,149,99,157,86,1,168,47,
124 65,166,85,224,16,190,103,132,40,87,142,139,210,130,105,242,10,237,227,154,
125 194,247,225,96,168,233,234,205,148,131,25,196,20,182,211,70,107,31,42,85,
126 0,246,73,144,105,21,152,64,25,173,168,82,142,155,199,197,252,135,67,180,
127 143,107,10,223,5,216,73,43,134,48,153,82,50,127,227,117,166,28,76,149,194,
128 111,229,213,74,160,91,5,58,178,149,97,226,89,229,184,42,114,185,83,94,169,
129 28,231,6,190,10,176,134,174,156,46,31,102,133,236,99,100,127,223,209,158,
130 50,233,188,10,64,141,4,45,18,122,85,96,162,120,148,124,141,17,205,217,114,
131 32,223,80,164,28,231,6,190,9,176,132,126,244,147,179,140,63,4,205,68,173,
132 10,64,141,4,37,137,165,116,96,187,227,152,195,216,204,80,158,87,77,143,
133 74,242,184,139,98,229,56,183,240,92,128,218,150,238,8,121,147,214,79,155,
134 54,70,5,133,202,85,0,32,59,86,201,216,132,243,9,28,183,136,199,180,86,241,
135 156,37,47,77,219,215,240,26,79,5,72,213,210,53,205,189,92,166,92,5,0,174,
136 142,47,165,40,209,248,12,165,218,69,28,85,217,77,62,211,25,162,28,231,38,
137 158,9,208,88,75,215,36,58,207,2,0,173,168,98,84,236,73,72,164,191,178,247,
138 95,196,209,41,247,49,136,45,180,87,142,115,19,79,4,112,210,210,53,141,110,
139 21,24,41,202,233,16,251,14,226,201,215,230,77,183,136,99,58,118,209,202,
140 245,202,167,131,171,2,168,182,116,77,162,218,23,168,165,21,85,140,102,89,
141 141,0,73,36,112,178,136,99,50,238,225,50,182,210,78,57,206,109,92,19,64,
142 167,165,107,26,213,190,64,45,35,69,121,205,55,130,253,36,232,206,127,149,
143 22,113,172,101,7,173,3,121,245,131,75,2,100,210,210,53,73,5,133,218,85,
144 96,148,216,59,184,83,71,130,219,197,108,173,153,77,51,184,156,109,28,160,
145 28,231,5,70,5,48,209,210,53,141,118,21,160,124,95,95,32,30,165,71,124,157,
146 235,139,56,250,129,49,1,76,182,116,77,162,91,5,10,136,236,171,2,192,132,
147 248,92,98,113,245,171,127,186,116,190,136,163,31,24,57,83,203,101,95,78,
148 147,143,24,107,233,154,102,166,28,68,149,198,138,26,35,40,167,61,63,210,
149 147,13,12,16,43,169,138,195,30,133,31,47,219,74,59,30,196,249,34,142,126,
150 96,68,128,87,57,37,16,35,91,169,168,160,3,79,104,244,5,90,19,97,140,88,
151 202,77,226,241,159,102,57,169,72,112,151,44,102,151,194,34,142,126,16,156,
152 90,237,50,247,50,88,171,10,140,97,57,231,240,65,189,191,57,145,64,103,17,
153 71,63,8,141,0,186,85,32,143,61,73,231,56,54,38,129,206,34,142,126,16,26,
154 1,64,191,59,152,138,84,18,232,46,226,232,7,161,18,160,130,66,158,144,153,
155 173,177,179,63,201,36,208,93,196,209,15,66,37,0,152,175,2,80,95,130,76,
156 22,113,244,131,208,9,224,70,21,128,125,18,100,178,136,163,31,132,78,0,112,
157 167,10,0,108,136,31,204,227,177,204,23,114,242,146,80,10,80,65,33,243,57,
158 223,248,126,167,201,98,162,241,234,148,67,201,65,36,148,2,0,220,35,47,55,
159 90,5,54,210,145,197,244,175,249,71,138,161,228,32,18,90,1,76,87,129,105,
160 178,184,254,50,110,77,68,130,208,10,0,230,170,192,151,116,98,57,103,55,
161 252,160,9,72,16,106,1,76,85,129,191,200,171,82,47,226,24,112,9,66,45,0,
162 100,94,5,190,224,48,202,57,51,253,70,1,150,32,244,2,84,80,200,2,121,158,
163 118,252,157,242,74,103,243,31,2,42,65,232,5,128,154,190,128,78,243,230,
164 51,186,242,60,167,59,15,8,160,4,86,0,224,91,138,152,47,213,159,5,166,226,
165 240,234,175,75,192,36,176,2,236,101,6,67,148,158,5,86,209,157,23,101,111,
166 189,131,5,72,130,224,175,26,230,17,21,20,114,164,92,70,91,118,57,218,126,
167 7,173,51,91,196,177,86,128,28,127,199,13,172,0,117,216,78,27,111,103,51,
168 7,64,2,123,11,240,27,159,111,7,86,128,32,224,163,4,86,128,160,224,147,4,
169 86,128,32,17,143,66,204,220,34,26,78,176,2,4,141,68,204,83,9,172,0,65,196,
170 67,9,172,0,65,197,35,9,172,0,65,198,3,9,172,0,65,199,101,9,172,0,77,1,23,
171 37,176,2,52,21,92,146,192,10,208,148,112,65,2,43,64,83,195,176,4,41,71,
172 3,115,178,156,15,117,182,201,205,166,168,192,14,44,122,135,132,236,4,162,
173 133,179,249,11,219,171,18,68,19,201,151,241,73,121,214,142,57,40,223,113,
174 58,211,251,119,102,122,255,206,142,183,183,152,33,55,55,151,252,252,198,
175 207,211,185,79,173,231,229,47,147,175,101,104,111,1,77,152,104,52,74,36,
176 18,201,104,31,86,128,38,78,166,18,88,1,154,1,209,104,148,202,74,245,69,
177 171,192,10,208,108,136,197,98,90,18,88,1,154,17,58,18,88,1,154,25,170,18,
178 88,1,154,33,42,18,88,1,154,41,78,37,176,2,52,99,156,72,144,178,19,248,252,
179 186,29,180,207,115,214,222,149,134,86,11,183,184,195,87,91,146,119,1,1,
180 4,19,222,180,103,47,12,100,231,64,139,134,63,93,107,111,1,97,33,17,135,
181 88,195,53,142,173,0,97,34,137,4,86,128,176,177,159,4,86,128,48,82,71,2,
182 59,139,35,172,36,226,64,21,255,7,181,153,56,45,184,129,88,206,0,0,0,0,73,
183 69,78,68,174,66,96,130};
184 
185 static size_t xml_res_size_1 = 560;
186 static unsigned char xml_res_file_1[] = {
187 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
188 0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
189 72,89,115,0,0,2,186,0,0,2,186,1,219,5,165,194,0,0,0,25,116,69,88,116,83,
190 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
191 46,111,114,103,155,238,60,26,0,0,1,173,73,68,65,84,56,141,149,147,63,72,
192 28,65,28,133,191,209,185,91,148,104,226,33,130,160,32,92,115,136,141,145,
193 112,130,85,42,17,141,40,241,76,229,191,78,33,54,169,44,130,70,16,212,11,
194 8,130,162,156,26,8,4,133,96,170,84,73,8,136,49,218,120,133,34,8,162,22,
195 34,68,137,133,38,81,55,187,115,55,22,114,171,203,90,172,175,154,249,189,
196 121,31,143,97,70,24,111,86,117,121,241,67,182,79,76,76,149,230,190,202,
197 42,123,32,88,235,8,19,46,48,124,135,6,196,12,79,89,191,6,0,152,166,137,
198 86,150,175,112,5,123,244,51,75,139,248,126,3,0,72,219,22,248,128,12,137,
199 41,108,36,195,186,203,13,0,174,1,202,34,136,125,103,184,138,109,26,89,38,
200 161,155,57,164,232,14,0,80,157,74,178,147,122,198,174,104,38,143,11,151,
201 55,40,18,152,4,25,166,211,153,185,0,221,124,226,51,175,200,86,151,148,168,
202 67,94,138,143,142,23,101,139,122,86,152,162,133,95,20,122,1,175,197,28,
203 35,98,130,36,17,158,232,247,252,180,35,244,170,15,78,139,65,145,224,156,
204 28,226,186,221,213,202,1,52,240,131,25,221,68,163,30,227,136,66,70,69,39,
205 185,234,140,158,212,2,53,108,80,203,26,147,196,56,38,228,2,200,204,162,
206 143,94,166,41,119,140,175,58,74,146,8,221,106,158,58,86,249,43,115,121,
207 171,219,60,23,235,52,88,210,85,30,51,78,7,33,254,80,169,54,25,179,99,156,
208 240,200,115,70,122,38,183,244,133,106,190,17,165,148,35,198,213,115,192,
209 2,25,244,15,0,136,233,145,155,77,230,161,221,130,200,236,44,1,64,73,94,
210 128,255,62,63,147,144,32,2,6,7,103,22,178,52,63,0,192,98,107,216,87,56,
211 35,195,48,120,252,110,23,185,114,240,143,23,139,251,252,190,176,81,105,
212 125,47,200,254,105,154,43,206,33,140,175,150,245,39,228,0,0,0,0,73,69,78,
213 68,174,66,96,130};
214 
215 static size_t xml_res_size_2 = 6410;
216 static unsigned char xml_res_file_2[] = {
217 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,0,0,0,1,0,8,6,0,0,0,
218 92,114,168,102,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,
219 89,115,0,0,43,165,0,0,43,165,1,137,102,26,50,0,0,0,25,116,69,88,116,83,
220 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
221 46,111,114,103,155,238,60,26,0,0,24,135,73,68,65,84,120,156,237,221,105,
222 120,85,213,185,192,241,255,10,73,152,81,68,20,84,174,181,22,171,32,85,107,
223 181,173,15,125,180,74,65,64,133,130,85,164,14,113,66,172,94,161,106,69,
224 171,64,64,173,120,169,138,67,85,16,209,160,12,82,172,114,11,181,181,150,
225 58,161,60,90,43,215,214,129,50,22,28,65,40,40,25,200,25,214,253,16,3,9,
226 156,36,103,88,251,221,211,251,251,210,199,152,179,223,45,37,255,189,206,
227 201,58,251,24,38,189,153,2,138,80,74,197,78,17,181,213,126,159,131,82,202,
228 39,69,164,147,104,4,148,138,167,186,165,127,58,165,17,80,42,134,118,63,
229 247,215,8,40,21,59,141,95,252,211,8,40,21,43,123,191,250,175,17,80,42,54,
230 50,255,250,79,35,160,84,44,52,253,251,255,250,8,88,43,120,58,74,41,73,205,
231 111,0,74,167,32,81,163,17,80,42,162,90,222,1,168,17,80,42,178,178,219,2,
232 172,17,80,42,146,138,179,254,206,250,8,148,180,161,67,235,86,180,47,105,
233 229,244,68,118,166,210,108,171,73,57,61,166,82,170,121,217,7,0,118,69,96,
234 226,143,122,114,253,73,221,156,158,200,31,87,111,103,224,220,85,78,143,
235 169,148,106,94,238,239,2,76,167,72,212,84,99,245,233,128,82,161,151,215,
236 219,128,211,169,36,85,85,85,26,1,165,66,46,239,251,0,36,147,26,1,165,194,
237 174,160,27,129,104,4,148,10,183,130,239,4,164,17,80,42,188,156,220,10,76,
238 35,160,212,222,78,53,111,114,32,91,253,62,141,102,57,187,23,96,50,153,164,
239 178,178,82,35,160,20,208,158,106,230,113,11,107,205,16,238,53,119,209,141,
240 45,126,159,82,70,78,111,6,154,74,165,52,2,74,1,99,152,207,1,108,165,29,
241 53,92,195,124,86,155,31,115,175,185,43,112,43,2,231,119,3,214,8,168,184,
242 235,68,37,215,153,39,27,125,173,61,213,187,66,48,133,7,232,204,23,62,157,
243 93,99,158,220,14,92,35,160,226,108,44,243,216,175,137,31,240,14,84,49,206,
244 84,240,111,115,38,83,120,128,125,249,82,248,236,26,243,236,243,0,52,2,42,
245 142,246,97,7,99,205,188,22,191,175,227,87,33,88,99,134,82,206,12,246,97,
246 135,192,217,237,205,211,15,4,209,8,168,184,185,142,57,57,45,239,247,227,
247 11,38,154,71,118,133,160,19,149,30,158,221,222,60,255,68,32,141,128,138,
248 139,46,108,103,76,22,87,255,166,30,91,31,130,113,166,130,182,236,116,124,
249 118,153,137,124,36,152,70,64,197,193,245,230,201,130,175,224,251,179,141,
250 41,60,192,122,115,22,227,76,5,109,168,117,116,118,153,137,125,38,160,70,
251 64,69,217,254,108,227,42,22,56,59,222,1,108,101,10,15,240,47,51,140,49,
252 102,190,103,33,16,253,80,80,141,128,138,170,113,166,130,142,84,57,63,110,
253 15,62,99,26,119,177,210,12,103,140,153,79,107,199,33,16,255,84,96,141,128,
254 138,154,110,108,225,103,44,244,116,198,127,241,41,211,184,139,119,205,185,
255 92,200,18,12,110,126,126,124,249,88,112,141,128,138,146,27,121,156,118,
256 212,136,204,58,156,15,185,208,44,193,98,156,28,207,151,0,128,70,64,69,67,
257 119,62,103,148,121,70,116,230,100,46,119,118,44,223,2,0,26,1,21,126,55,
258 51,75,236,87,118,0,127,226,251,188,108,143,115,118,60,95,3,0,26,1,21,94,
259 61,248,140,203,204,34,209,153,229,14,175,254,16,128,0,64,93,4,106,170,171,
260 244,115,7,84,168,220,98,30,117,254,170,124,115,22,219,190,44,183,125,156,
261 30,51,16,1,0,72,167,82,144,208,207,34,84,225,112,40,159,80,198,98,209,153,
262 46,159,251,215,11,76,0,0,72,167,53,2,42,20,38,152,153,148,146,16,155,247,
263 172,61,133,55,233,229,252,184,193,10,0,104,4,84,224,29,206,135,92,200,18,
264 177,121,22,195,36,15,174,254,16,196,0,128,70,64,5,218,4,51,147,98,228,62,
265 198,110,33,167,177,130,35,60,57,118,48,3,0,26,1,21,72,61,217,200,72,254,
266 40,54,47,77,17,183,217,75,60,59,126,112,3,0,117,17,168,213,8,168,224,152,
267 100,166,139,94,253,159,226,71,188,67,79,207,142,31,236,0,0,88,141,128,10,
268 134,94,172,227,92,254,44,54,47,69,17,183,218,75,61,157,17,252,0,128,70,
269 64,5,66,185,153,65,17,105,177,121,115,24,200,251,28,230,233,140,112,4,0,
270 52,2,202,87,71,179,134,225,44,21,155,151,162,136,95,217,139,61,159,19,158,
271 0,128,70,64,249,230,86,30,22,189,250,87,112,6,43,57,212,243,57,225,10,0,
272 104,4,148,184,111,243,1,67,204,75,98,243,18,20,115,187,135,175,252,55,20,
273 190,0,64,131,8,200,21,89,197,215,36,166,59,187,1,71,54,102,217,179,88,203,
274 193,34,179,194,25,0,248,42,2,53,26,1,229,169,239,152,247,25,108,150,137,
275 205,171,165,132,41,148,137,205,11,111,0,64,35,160,60,119,27,15,137,94,253,
276 31,177,67,89,79,119,177,121,225,14,0,104,4,148,103,78,50,239,48,128,215,
277 197,230,213,80,42,122,245,135,40,4,0,52,2,202,19,147,121,88,116,222,195,
278 12,231,67,14,16,157,25,141,0,128,70,64,57,213,215,172,224,52,222,20,155,
279 87,67,41,83,237,5,98,243,234,69,39,0,160,17,80,206,220,198,67,162,243,30,
280 224,28,62,166,171,232,76,136,90,0,64,35,160,10,214,207,188,193,201,252,
281 93,108,94,37,109,125,185,250,67,20,3,0,26,1,85,144,9,204,20,157,119,63,
282 231,178,137,253,68,103,214,139,102,0,64,35,160,242,114,186,121,157,31,240,
283 182,216,188,29,180,227,110,59,82,108,222,158,162,27,0,208,8,168,156,149,
284 51,67,116,222,61,118,36,155,233,44,58,179,161,104,7,0,52,2,42,107,103,242,
285 10,223,229,159,98,243,182,211,129,105,156,39,54,47,147,232,7,0,52,2,170,
286 69,6,203,120,35,251,220,255,110,251,83,182,210,73,116,230,158,226,17,0,
287 208,8,168,102,13,229,37,78,224,61,177,121,219,232,200,125,156,43,54,175,
288 41,241,9,0,104,4,84,70,6,203,68,35,251,220,127,170,189,128,109,116,20,157,
289 153,73,188,2,0,26,1,181,151,159,240,23,142,97,149,216,188,45,236,195,253,
290 1,184,250,67,28,3,0,26,1,181,75,17,105,110,49,143,138,206,188,147,139,248,
291 146,118,162,51,155,18,207,0,128,70,64,1,48,130,231,233,195,106,177,121,
292 155,233,204,67,118,184,216,188,150,196,55,0,160,17,136,185,86,164,25,47,
293 124,245,191,131,50,118,4,228,234,15,113,15,0,104,4,98,236,124,254,192,145,
294 172,23,155,247,9,251,51,221,14,19,155,151,13,13,0,104,4,98,168,21,105,126,
295 105,30,19,157,249,43,123,49,85,180,17,157,217,18,13,64,61,141,64,172,148,
296 241,123,142,96,131,216,188,143,233,202,163,12,17,155,151,45,13,64,67,26,
297 129,88,40,33,41,126,245,191,213,94,74,53,173,69,103,102,67,3,176,39,141,
298 64,228,93,202,34,190,206,71,98,243,54,208,141,89,156,37,54,47,23,26,128,
299 76,244,115,7,34,171,148,4,227,76,133,232,204,201,246,50,106,41,17,157,153,
300 45,13,64,83,172,213,8,68,208,40,158,225,107,124,34,54,111,61,221,121,130,
301 65,98,243,114,165,1,104,142,70,32,82,218,80,43,126,245,47,183,163,2,123,
302 245,7,13,64,203,52,2,145,113,165,89,200,33,108,18,155,183,138,30,204,97,
303 160,216,188,124,104,0,178,81,31,129,180,70,32,172,218,178,147,235,121,82,
304 116,102,185,29,69,146,86,162,51,115,165,1,200,150,181,144,208,8,132,213,
305 213,102,1,7,177,89,108,222,123,28,198,124,250,139,205,203,151,6,32,23,26,
306 129,80,106,79,181,248,213,127,146,29,69,58,4,63,94,193,63,195,160,201,35,
307 2,39,154,119,185,136,197,162,59,207,212,110,215,152,167,56,128,173,98,243,
308 254,193,55,88,200,169,98,243,10,81,236,247,9,132,82,125,4,74,218,66,81,
309 243,13,29,197,51,220,207,84,74,77,2,128,47,104,207,27,182,55,203,56,134,
310 183,56,138,87,56,54,16,119,134,137,170,14,84,241,115,230,138,206,44,39,
311 28,87,127,208,0,228,175,133,8,180,161,150,251,205,84,46,227,217,70,95,239,
312 68,37,253,204,27,244,227,13,0,82,20,177,146,67,121,149,99,89,102,235,162,
313 240,30,135,97,49,34,255,25,81,119,45,115,233,202,127,196,230,189,205,55,
314 121,198,158,34,54,175,80,26,128,66,52,17,129,30,124,198,66,198,113,34,239,
315 182,120,136,86,164,233,197,58,122,177,142,81,230,25,0,62,165,11,127,179,
316 71,241,22,71,241,170,169,11,67,16,247,145,7,221,62,236,96,172,153,39,58,
317 115,162,189,34,84,241,214,0,20,106,143,8,244,55,203,153,203,45,116,97,123,
318 222,135,236,198,22,206,48,175,114,6,175,2,80,107,74,248,187,61,146,229,
319 230,104,94,179,223,226,105,78,13,205,18,211,79,215,49,135,206,124,33,54,
320 239,77,122,177,152,190,98,243,92,208,191,69,46,88,139,73,84,113,131,125,
321 156,63,48,166,160,31,254,76,74,73,240,61,243,15,198,50,143,5,230,38,206,
322 102,169,211,227,71,81,23,182,51,70,175,254,45,210,0,56,208,129,106,42,152,
323 200,205,137,223,136,252,138,112,162,153,65,17,250,171,200,230,92,199,147,
324 116,162,82,108,222,235,244,225,57,78,18,155,231,138,6,160,64,61,217,200,
325 11,230,74,206,226,101,172,133,202,4,164,60,254,217,236,197,58,93,5,52,99,
326 127,182,113,181,89,32,58,115,2,163,69,231,185,162,1,40,192,32,150,177,212,
327 140,230,72,254,189,235,107,82,17,208,85,64,211,198,153,10,58,82,37,54,111,
328 25,199,240,130,61,81,108,158,75,26,128,60,20,147,162,156,25,204,49,227,
329 51,254,69,147,136,128,174,2,50,235,198,22,126,198,66,209,153,183,112,165,
330 232,60,151,52,0,57,234,202,127,120,150,235,25,107,230,97,176,77,126,159,
331 68,4,38,152,71,116,21,176,135,113,166,130,118,212,136,205,91,106,79,224,
332 69,123,188,216,60,215,52,0,57,56,150,149,44,53,63,163,175,89,145,213,247,
333 123,29,129,222,172,213,85,64,3,221,249,156,43,248,157,232,204,73,230,114,
334 209,121,174,105,0,178,84,198,98,158,55,255,77,15,62,205,233,113,94,71,64,
335 95,11,216,237,102,102,209,150,157,98,243,254,196,247,121,217,30,39,54,207,
336 11,26,128,22,180,161,150,251,204,175,153,102,238,162,148,68,94,199,240,
337 50,2,189,88,199,112,93,5,208,131,207,184,204,44,18,157,89,78,184,175,254,
338 160,1,104,214,193,108,98,9,99,184,144,37,5,31,203,203,8,76,212,215,2,184,
339 153,89,180,166,86,108,222,18,250,178,220,246,17,155,231,21,13,64,19,250,
340 154,21,188,104,70,115,188,249,192,217,49,189,138,64,111,214,198,122,21,
341 112,40,159,112,177,249,189,232,204,73,54,252,87,127,208,0,236,197,96,185,
342 142,57,44,226,58,79,222,69,230,85,4,38,152,153,177,93,5,140,55,143,230,
343 253,244,44,31,139,56,153,55,233,37,54,207,75,26,128,6,58,80,77,133,41,103,
344 188,153,73,43,15,127,152,188,136,192,209,172,137,229,42,224,112,62,228,
345 34,22,139,205,179,24,202,237,40,177,121,94,211,0,124,165,225,150,94,9,94,
346 68,32,142,175,5,76,48,51,41,38,37,54,239,105,123,42,43,56,66,108,158,215,
347 52,0,100,222,210,43,193,117,4,226,246,90,64,79,54,50,146,63,138,205,75,
348 83,196,173,92,42,54,79,66,172,3,80,76,138,219,205,67,77,110,233,149,224,
349 58,2,227,205,163,177,89,5,148,155,25,162,87,255,5,244,227,29,122,138,205,
350 147,16,219,0,116,97,59,11,25,199,85,44,104,118,75,175,4,151,17,232,195,
351 106,134,153,191,22,126,160,128,235,197,58,70,240,188,216,188,20,69,76,182,
352 151,137,205,147,18,203,0,28,203,74,94,52,163,57,197,188,229,247,169,236,
353 82,31,129,164,131,8,148,19,253,221,129,229,194,59,32,231,114,58,239,115,
354 152,216,60,41,177,11,64,190,91,122,37,88,11,85,14,34,208,155,181,145,94,
355 5,72,255,198,35,69,17,183,219,75,196,230,73,138,77,0,92,108,233,149,224,
356 42,2,81,94,5,220,202,195,162,255,109,21,156,193,74,14,21,155,39,41,22,1,
357 112,185,165,87,130,139,8,68,117,21,240,109,62,96,136,121,73,108,94,130,
358 226,200,94,253,33,6,1,240,98,75,175,4,23,17,136,226,42,96,18,211,69,95,
359 180,125,140,51,89,203,193,98,243,164,69,54,0,6,203,88,51,207,179,45,189,
360 18,10,141,64,111,214,242,99,94,116,122,78,126,58,158,247,25,108,150,137,
361 205,171,165,132,41,182,76,108,158,31,34,25,128,250,45,189,229,204,240,116,
362 75,175,132,66,35,48,201,76,143,204,42,224,118,243,144,232,213,255,17,59,
363 148,117,28,36,54,207,15,145,11,192,145,172,231,69,51,74,108,75,111,62,82,
364 57,254,177,23,18,129,168,172,2,78,50,239,48,128,215,197,230,213,80,202,
365 29,92,44,54,207,47,145,10,192,32,150,241,103,115,21,223,224,67,191,79,37,
366 35,139,225,97,134,243,115,123,109,238,143,45,32,2,81,88,5,76,230,97,209,
367 121,211,237,48,62,162,171,232,76,63,68,34,0,173,72,55,123,151,222,32,216,
368 65,91,202,152,200,141,246,106,230,48,144,213,28,146,243,49,242,141,64,216,
369 87,1,125,205,10,78,227,77,177,121,53,148,50,149,11,197,230,249,41,244,1,
370 232,194,118,158,230,134,22,239,210,235,167,213,28,66,63,251,32,139,236,
371 201,64,221,83,128,123,236,79,243,58,86,190,17,8,243,42,224,86,43,123,245,
372 127,128,115,98,113,245,135,144,7,32,136,91,122,247,244,156,61,137,83,237,
373 195,124,192,215,26,125,125,62,253,243,90,5,64,126,17,8,235,42,160,159,121,
374 67,244,255,223,74,218,50,213,94,32,54,207,111,161,13,64,144,183,244,66,
375 221,85,190,156,81,140,228,54,190,160,125,198,127,159,239,42,0,242,139,64,
376 24,87,1,19,152,41,58,239,126,206,101,19,251,137,206,244,83,232,2,208,58,
377 4,91,122,183,176,15,103,219,59,153,102,207,107,246,211,98,11,89,5,64,238,
378 17,232,205,90,134,10,238,162,43,212,233,230,117,126,192,219,98,243,118,
379 208,142,187,237,72,177,121,65,16,170,0,28,204,38,254,16,240,45,189,255,
380 199,17,252,208,78,231,175,124,167,197,239,45,116,21,0,95,189,139,176,54,
381 251,8,76,34,60,171,128,114,102,136,206,187,199,142,100,51,157,69,103,250,
382 45,52,1,8,195,150,222,249,244,103,128,189,143,13,28,152,211,99,10,89,5,
383 212,203,54,2,71,179,38,20,171,128,51,204,43,124,151,127,138,205,219,78,
384 7,166,113,158,216,188,160,8,124,0,194,176,165,119,39,165,140,177,215,51,
385 218,222,68,13,173,115,122,172,139,85,64,189,108,35,16,244,85,128,193,138,
386 63,247,191,135,145,108,165,147,232,204,32,8,116,0,194,176,165,247,99,186,
387 50,216,78,163,130,193,121,31,99,62,253,89,227,232,13,39,149,181,144,104,
388 225,46,89,65,95,5,12,229,37,78,224,61,177,121,219,232,200,189,118,132,216,
389 188,32,9,108,0,164,239,210,155,143,101,28,195,41,118,58,127,227,168,130,
390 142,227,114,21,0,117,47,12,182,20,129,160,174,2,12,150,137,70,246,185,255,
391 84,123,1,219,232,40,58,51,40,2,25,128,65,44,227,47,230,74,241,187,244,102,
392 171,126,75,239,16,123,23,155,28,189,104,52,143,1,206,86,1,208,114,4,130,
393 186,10,56,155,191,112,12,171,196,230,109,97,31,238,231,92,177,121,65,19,
394 168,0,52,220,210,219,137,74,191,79,39,163,134,91,122,147,180,114,118,92,
395 215,171,0,104,57,2,65,91,5,20,145,102,188,121,84,116,230,255,216,11,249,
396 146,118,162,51,131,36,48,1,40,37,25,186,45,189,174,185,94,5,64,243,17,56,
397 154,53,12,9,208,83,172,17,60,79,31,86,139,205,219,76,103,30,228,108,177,
398 121,65,20,152,0,156,104,222,13,229,150,94,151,188,88,5,64,243,17,152,108,
399 100,239,175,215,148,86,62,92,253,239,160,140,29,49,190,250,67,128,2,208,
400 134,157,126,159,66,70,45,109,233,117,205,139,85,0,52,29,129,160,172,2,126,
401 202,115,28,201,122,177,121,159,176,63,211,237,48,177,121,65,21,152,0,4,
402 81,182,91,122,93,242,106,21,0,77,71,192,239,85,64,43,210,220,108,102,137,
403 206,188,131,50,170,104,35,58,51,136,52,0,77,200,101,75,175,107,94,173,2,
404 32,115,4,252,94,5,148,241,123,142,96,131,216,188,143,233,202,76,59,84,108,
405 94,144,105,0,50,200,103,75,175,75,41,138,152,230,225,155,82,50,69,192,175,
406 85,64,9,73,126,105,30,19,157,121,171,189,148,234,28,119,108,70,149,6,160,
407 129,66,182,244,186,54,159,254,172,167,187,103,199,223,51,2,126,173,2,46,
408 49,255,203,215,249,72,108,222,6,186,49,139,179,196,230,5,157,6,224,43,46,
409 182,244,186,148,160,152,187,236,249,158,206,216,51,2,19,204,35,162,191,
410 130,45,37,193,141,60,46,54,15,234,174,254,181,148,136,206,12,50,13,0,238,
411 182,244,186,230,245,42,0,26,71,224,88,254,37,250,169,59,163,120,134,175,
412 241,137,216,188,245,116,103,118,64,2,31,20,177,14,128,23,91,122,93,146,
413 88,5,64,227,8,76,68,102,21,208,134,90,198,153,10,207,231,52,84,110,71,233,
414 213,127,15,177,13,128,87,91,122,93,147,88,5,192,238,8,72,173,2,70,243,52,
415 135,176,201,243,57,245,86,209,131,57,12,20,155,23,22,177,12,128,215,91,
416 122,93,146,90,5,192,238,8,120,189,10,104,203,78,126,97,158,240,236,248,
417 153,76,178,163,2,29,122,191,196,46,0,139,236,201,156,98,103,120,186,165,
418 215,181,249,244,231,223,116,19,153,85,149,128,222,41,111,87,1,87,241,91,
419 14,98,179,103,199,223,211,251,28,198,124,250,139,205,11,147,216,4,160,126,
420 75,111,25,19,217,65,91,191,79,39,39,146,171,0,168,139,192,205,169,25,158,
421 172,2,218,83,45,126,245,47,183,163,114,254,56,182,184,136,197,159,138,31,
422 91,122,93,155,199,0,145,215,2,234,245,76,172,226,204,244,82,231,199,189,
423 198,60,197,1,108,117,126,220,166,188,203,215,89,200,169,98,243,194,38,242,
424 1,240,115,75,175,75,9,138,185,219,163,247,8,52,229,23,137,153,152,148,187,
425 91,175,119,160,138,159,51,215,217,241,178,49,129,209,164,163,255,215,60,
426 111,145,254,147,241,123,75,175,107,210,171,128,62,172,102,96,98,41,164,
427 146,78,142,119,45,115,69,111,236,250,54,223,228,25,123,138,216,188,48,138,
428 100,0,130,180,165,215,37,63,86,1,55,154,10,76,162,26,10,92,9,236,195,14,
429 198,154,121,142,206,42,59,19,237,21,161,125,202,39,37,114,1,8,218,150,94,
430 215,164,87,1,223,98,21,3,121,13,18,59,11,138,192,181,102,14,157,249,194,
431 225,153,53,239,45,142,98,49,125,197,230,133,85,164,2,16,212,45,189,46,249,
432 182,10,192,230,29,129,125,249,146,107,120,202,131,51,107,218,120,59,90,
433 175,254,89,136,68,0,130,190,165,215,181,121,12,16,219,23,0,13,86,1,144,
434 87,4,110,96,54,251,242,165,7,103,150,217,235,244,225,57,78,18,155,23,102,
435 161,15,64,88,182,244,186,84,183,10,144,219,23,0,13,86,1,144,83,4,246,103,
436 27,87,155,5,30,158,217,222,38,48,90,116,94,152,133,58,0,97,218,210,235,
437 218,92,63,87,1,144,117,4,110,96,54,29,169,242,240,204,26,91,198,49,188,
438 96,79,20,155,23,118,161,13,128,196,93,122,131,204,247,85,0,180,24,129,110,
439 108,225,42,243,91,129,51,219,237,22,174,20,157,23,118,161,11,64,138,34,
440 166,216,139,196,238,210,27,100,126,172,2,78,55,175,55,254,98,51,17,24,103,
441 42,104,71,141,192,153,213,89,106,79,224,69,123,188,216,188,40,8,85,0,234,
442 183,244,78,161,76,95,225,197,159,85,192,77,60,190,247,123,4,50,68,160,59,
443 159,115,5,191,19,60,51,152,100,46,23,157,23,5,161,9,64,84,182,244,186,22,
444 136,85,0,236,21,129,95,154,199,104,43,248,89,15,127,226,251,188,108,143,
445 19,155,23,21,161,8,64,212,182,244,186,148,160,216,179,207,17,104,74,198,
446 85,0,236,138,64,15,62,227,114,158,21,61,167,114,244,234,159,143,64,7,32,
447 170,91,122,93,155,195,233,193,88,5,0,36,118,50,46,53,147,214,212,138,157,
448 207,18,250,178,220,246,17,155,23,37,129,13,64,212,183,244,186,20,164,85,
449 64,15,62,227,156,228,18,106,155,249,84,98,215,38,115,153,220,176,136,9,
450 100,0,226,176,165,215,181,160,172,2,110,48,179,41,37,65,117,2,145,8,60,
451 107,79,225,13,219,219,251,65,17,21,152,0,108,176,221,99,183,165,215,165,
452 32,172,2,14,227,99,70,240,252,174,127,246,58,2,22,195,36,125,238,95,144,
453 192,4,96,21,135,48,132,95,199,106,75,175,107,115,56,157,13,194,171,128,
454 1,44,223,245,207,227,204,108,74,104,124,239,0,47,35,240,59,126,200,10,142,
455 240,230,224,49,17,152,0,88,12,47,219,111,251,125,26,161,230,199,59,5,111,
456 50,117,171,128,195,249,136,179,121,33,227,247,120,17,129,52,69,76,182,250,
457 220,191,80,129,9,128,114,67,250,181,128,99,248,23,3,88,206,141,230,113,
458 138,105,250,167,220,117,4,22,208,143,119,232,233,238,128,49,165,1,136,24,
459 63,94,11,184,195,60,192,112,90,190,129,104,117,2,118,58,184,187,88,138,
460 34,38,89,125,238,239,130,6,32,130,164,87,1,135,241,113,214,31,45,94,147,
461 44,60,2,115,57,61,182,111,2,115,77,3,16,65,9,138,153,198,72,191,79,163,
462 73,133,68,32,69,17,183,219,75,220,158,80,140,105,0,34,234,73,59,80,116,
463 21,144,171,124,35,48,155,193,172,228,80,247,39,20,83,26,128,136,10,250,
464 42,0,114,143,64,130,98,110,179,151,122,119,66,49,164,1,136,176,160,175,
465 2,32,183,8,60,198,153,172,229,96,111,79,40,102,52,0,17,22,134,85,0,100,
466 23,129,4,197,76,177,101,34,231,19,39,26,128,136,123,210,14,20,221,29,152,
467 175,150,34,240,8,67,89,199,65,114,39,20,19,26,128,136,75,80,204,52,123,
468 158,223,167,145,149,166,34,80,67,41,119,216,139,229,79,40,6,52,0,49,240,
469 4,131,66,177,10,128,204,17,152,110,135,241,33,7,248,115,66,17,167,1,136,
470 129,48,173,2,160,113,4,106,40,101,42,23,250,123,66,17,166,1,136,137,48,
471 173,2,96,119,4,126,99,207,225,35,186,250,125,58,145,165,1,136,137,176,173,
472 2,0,182,38,219,112,103,114,132,223,167,17,105,26,128,24,9,219,42,96,58,
473 195,216,156,108,15,73,185,251,11,198,141,6,32,70,194,180,10,168,164,45,
474 191,177,63,169,251,135,100,173,70,192,35,26,128,152,9,203,42,224,65,206,
475 230,115,246,221,253,5,141,128,39,52,0,49,147,160,152,123,9,246,243,234,
476 47,104,207,131,245,87,255,134,52,2,206,105,0,98,104,182,29,28,232,85,192,
477 131,252,132,255,208,49,243,191,212,8,56,165,1,136,161,32,175,2,182,211,
478 129,135,236,240,230,191,73,35,224,140,6,32,166,130,186,10,184,207,142,96,
479 59,29,90,254,70,141,128,19,26,128,152,10,226,42,96,43,157,152,206,176,236,
480 31,160,17,40,152,6,32,198,130,182,10,184,215,158,199,14,218,230,246,32,
481 141,64,65,52,0,49,22,164,85,192,38,58,243,8,67,243,123,176,70,32,111,26,
482 128,152,123,194,14,98,99,0,86,1,247,218,17,84,209,38,255,3,104,4,242,162,
483 1,136,185,90,74,184,215,250,187,10,248,148,46,204,98,72,225,7,210,8,228,
484 76,3,160,152,141,191,171,128,123,24,73,53,173,221,28,76,35,144,19,13,128,
485 242,117,21,240,41,251,83,97,7,187,61,168,70,32,107,26,0,5,248,183,10,152,
486 202,249,212,184,186,250,55,164,17,200,138,6,64,1,117,171,128,105,194,191,
487 17,216,72,55,158,176,131,188,27,160,17,104,145,6,64,237,34,253,27,129,169,
488 246,124,106,41,241,118,136,70,160,89,26,0,181,139,228,107,1,27,232,198,
489 124,250,139,204,34,89,11,137,157,50,179,66,70,3,160,26,145,122,45,96,138,
490 45,243,254,234,223,80,42,161,17,200,64,3,160,26,169,165,132,251,56,215,
491 211,25,107,56,152,5,244,243,116,70,70,26,129,189,104,0,212,94,42,236,96,
492 79,87,1,119,218,50,146,180,242,236,248,205,210,8,52,82,236,247,9,168,224,
493 169,165,132,65,118,26,93,216,214,236,247,181,50,150,142,84,230,124,252,
494 87,56,46,223,83,115,35,149,168,251,223,18,15,126,253,24,50,26,0,149,209,
495 70,14,100,35,7,54,255,77,86,230,92,60,161,17,0,244,41,128,138,51,125,58,
496 160,1,80,49,23,243,8,104,0,148,138,113,4,52,0,74,65,108,35,160,1,80,170,
497 94,12,35,160,1,80,170,161,152,69,64,3,160,212,158,98,20,1,13,128,82,153,
498 196,36,2,26,0,165,154,18,131,8,104,0,148,106,78,42,1,137,26,191,207,194,
499 51,26,0,165,90,146,74,70,54,2,26,0,165,178,17,209,8,104,0,148,202,86,4,
500 35,160,1,80,42,23,17,139,128,6,64,169,92,69,40,2,26,0,165,242,17,145,8,
501 104,0,148,202,87,4,34,160,1,80,170,16,33,143,128,6,64,169,66,133,56,2,26,
502 0,165,92,8,105,4,52,0,74,185,18,194,8,104,0,148,114,41,100,17,208,0,40,
503 229,90,136,34,160,1,80,202,11,169,36,212,86,251,125,22,45,210,0,40,229,
504 149,116,42,240,17,208,0,40,229,165,128,71,64,3,160,148,215,2,28,1,13,128,
505 82,18,2,26,1,13,128,82,82,2,24,129,188,62,29,184,93,137,251,110,116,40,
506 109,69,175,174,109,157,31,87,169,160,49,69,80,212,218,237,223,245,205,85,
507 73,62,221,145,200,249,113,121,5,224,184,238,237,243,121,88,179,190,119,
508 72,123,94,187,228,72,231,199,85,42,136,138,139,139,105,223,222,221,207,
509 209,61,203,63,227,218,231,55,230,252,56,125,10,160,148,15,146,201,36,149,
510 149,149,126,159,134,6,64,41,191,4,33,2,26,0,165,124,228,119,4,52,0,74,249,
511 172,62,2,214,90,241,217,26,0,165,2,32,153,76,82,85,85,37,30,1,13,128,82,
512 1,225,71,4,52,0,74,5,136,116,4,52,0,74,5,140,100,4,52,0,74,5,144,84,4,52,
513 0,74,5,148,68,4,52,0,74,5,152,215,17,208,0,40,21,112,94,70,64,3,160,84,
514 8,120,21,1,13,128,82,33,225,69,4,52,0,74,133,136,235,8,104,0,148,10,25,
515 151,239,29,208,0,40,21,66,169,84,202,73,4,52,0,74,133,148,139,8,104,0,148,
516 10,177,66,35,144,87,0,94,219,248,101,94,195,148,82,238,165,82,41,106,107,
517 170,32,143,8,24,110,90,154,170,187,79,105,246,218,151,22,121,114,103,96,
518 165,84,126,170,18,105,42,147,64,73,91,48,38,235,199,229,117,87,224,202,
519 218,52,149,181,233,124,30,170,148,242,82,162,58,167,8,232,101,92,169,40,
520 73,167,235,34,144,229,211,1,13,128,82,81,147,67,4,52,0,74,69,81,150,17,
521 208,0,40,21,85,89,68,64,3,160,84,148,181,16,1,13,128,82,81,215,76,4,52,
522 0,74,197,65,19,17,208,0,40,21,23,25,34,160,1,80,42,78,246,136,128,6,64,
523 169,184,105,16,1,13,128,82,113,244,85,4,254,31,121,241,55,153,214,40,101,
524 56,0,0,0,0,73,69,78,68,174,66,96,130};
525 
526 static size_t xml_res_size_3 = 987;
527 static unsigned char xml_res_file_3[] = {
528 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
529 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
530 72,89,115,0,0,5,98,0,0,5,98,1,172,97,92,156,0,0,0,25,116,69,88,116,83,111,
531 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
532 111,114,103,155,238,60,26,0,0,3,88,73,68,65,84,88,133,197,151,123,104,141,
533 97,24,192,127,239,217,185,76,10,209,140,105,229,210,92,74,174,115,89,91,
534 20,139,134,48,127,80,194,220,134,63,8,145,63,196,54,119,43,33,252,97,182,
535 154,40,162,200,106,214,148,132,153,68,211,102,180,37,119,25,67,238,235,
536 236,59,231,59,123,253,113,182,119,59,190,239,59,151,156,195,243,215,251,
537 60,207,251,188,207,239,125,222,219,247,9,242,238,74,226,28,252,47,177,227,
538 213,72,238,233,100,250,144,62,0,220,122,253,147,151,223,180,127,6,96,3,
539 24,213,219,70,81,86,18,165,243,6,50,105,64,247,152,36,74,166,153,25,226,
540 158,57,0,128,219,237,198,227,241,196,36,57,192,78,81,194,53,54,80,69,46,
541 233,212,25,1,58,32,218,116,111,212,147,15,162,137,229,148,3,144,33,106,
542 25,79,131,57,0,128,207,211,10,122,116,43,145,39,138,113,160,3,240,142,4,
543 138,88,96,13,0,248,1,162,4,145,194,91,150,82,161,244,253,114,37,26,206,
544 16,0,81,132,200,19,197,196,209,6,192,27,250,81,194,188,0,191,53,64,20,32,
545 134,243,138,197,92,83,250,94,185,10,15,129,119,78,112,128,63,32,250,243,
546 57,34,128,2,113,10,91,251,236,95,146,196,105,230,24,250,132,6,0,156,122,
547 11,39,244,125,52,137,44,62,136,153,28,17,135,67,198,140,228,57,11,185,174,
548 244,61,114,53,94,236,145,3,36,241,137,10,177,145,37,190,43,104,58,36,242,
549 133,77,156,39,85,52,4,141,219,69,17,2,9,192,51,146,57,195,108,211,126,65,
550 1,50,68,45,183,196,90,82,219,207,109,171,14,154,255,52,145,47,139,45,227,
551 198,240,148,108,113,179,19,70,230,226,179,72,101,9,176,94,92,160,140,45,
552 36,240,85,217,170,25,173,32,230,136,170,128,11,165,171,116,157,125,35,3,
553 57,199,76,75,88,3,128,11,141,82,177,139,189,156,84,199,199,131,131,77,114,
554 11,179,229,81,106,25,166,32,242,133,177,10,169,162,129,185,226,118,39,140,
555 204,165,45,72,161,13,158,29,162,148,108,110,42,189,137,4,178,56,166,118,
556 240,65,153,3,248,151,99,134,94,197,56,26,3,226,119,115,82,181,159,48,152,
557 139,100,90,38,55,5,72,226,147,106,87,49,150,41,242,20,53,114,184,178,85,
558 146,70,29,67,21,196,118,189,72,249,210,168,39,139,187,74,47,96,77,208,217,
559 155,2,116,200,113,22,49,95,30,226,51,189,12,190,66,185,76,181,51,125,119,
560 24,163,63,6,2,103,95,71,10,151,228,180,160,201,77,1,126,208,157,28,10,216,
561 41,215,89,238,220,10,210,121,68,138,210,183,249,74,72,215,31,144,41,238,
562 43,91,190,92,139,68,68,14,176,77,110,160,76,78,13,25,88,72,103,21,102,81,
563 205,81,223,1,90,219,143,104,13,35,40,35,244,24,166,0,94,194,251,62,172,
564 144,233,60,102,136,210,83,120,139,166,251,247,69,190,92,19,214,24,166,0,
565 225,138,68,80,72,142,193,94,173,143,224,170,62,49,246,0,0,229,50,131,39,
566 93,170,0,176,159,21,17,189,162,198,215,33,2,145,8,246,176,138,173,156,5,
567 224,5,3,184,33,39,248,157,29,0,118,167,69,116,20,0,0,42,101,26,149,164,
568 153,59,195,128,248,171,37,8,75,66,44,71,236,1,66,64,216,1,122,184,226,148,
569 97,100,223,110,124,215,124,49,225,176,57,156,216,28,46,0,30,190,111,225,
570 99,139,238,7,24,218,59,94,117,218,60,57,145,205,147,19,99,2,0,224,114,185,
571 136,143,143,39,251,226,51,174,52,126,251,251,77,24,169,104,90,224,127,167,
572 29,224,114,227,87,117,107,127,248,229,229,135,167,45,230,32,53,239,90,1,
573 225,7,168,111,118,83,223,236,142,121,82,131,216,157,252,6,173,114,47,95,
574 172,143,154,9,0,0,0,0,73,69,78,68,174,66,96,130};
575 
576 static size_t xml_res_size_4 = 1881;
577 static unsigned char xml_res_file_4[] = {
578 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,64,0,0,0,64,8,6,0,0,
579 0,170,105,113,222,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
580 72,89,115,0,0,10,233,0,0,10,233,1,253,117,206,211,0,0,0,25,116,69,88,116,
581 83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,
582 101,46,111,114,103,155,238,60,26,0,0,6,214,73,68,65,84,120,156,229,155,
583 121,108,84,69,28,199,63,211,61,186,96,57,228,80,17,84,130,136,8,65,140,
584 26,60,162,81,84,98,168,128,130,130,45,32,10,4,80,140,114,41,90,64,40,162,
585 65,81,20,8,162,128,66,41,8,114,40,209,152,200,81,4,131,9,40,136,26,84,136,
586 86,228,16,139,128,96,45,236,118,119,223,238,248,199,186,237,110,119,222,
587 219,247,246,173,108,91,190,255,237,252,126,111,102,222,103,102,126,115,
588 188,89,193,212,29,18,135,147,243,85,89,4,43,33,164,101,186,30,25,83,22,
589 192,249,12,161,186,239,7,43,153,114,123,59,114,59,54,139,115,216,118,176,
590 130,73,159,31,61,215,245,58,103,138,27,252,151,93,16,226,198,139,179,113,
591 185,92,85,105,199,206,4,207,121,165,236,202,73,136,16,89,72,68,82,223,172,
592 154,9,94,175,151,96,176,238,189,116,172,158,20,107,217,43,242,232,79,9,
593 2,105,232,155,0,0,234,54,4,15,1,158,165,152,206,28,96,141,40,224,123,49,
594 208,16,132,18,0,212,93,8,163,89,75,107,78,84,253,238,66,41,107,68,1,59,
595 196,48,186,242,75,130,191,46,0,136,64,8,105,117,7,194,5,248,152,40,138,
596 149,182,235,217,79,5,13,19,210,13,1,0,248,125,62,8,213,13,8,79,177,154,
597 139,57,165,180,21,209,139,3,180,78,72,79,10,0,128,160,191,214,67,200,193,
598 203,120,177,82,105,11,226,100,166,28,170,180,153,3,0,181,30,194,88,86,209,
599 146,211,74,219,98,30,224,55,46,85,218,204,3,128,90,11,161,9,103,24,167,
600 211,250,126,220,186,173,15,86,1,64,173,132,48,142,149,52,227,31,165,109,
601 33,253,248,157,139,116,159,181,14,0,106,21,132,166,84,48,70,124,160,180,
602 85,226,102,150,28,98,248,124,106,0,160,214,64,120,134,21,52,165,66,105,
603 123,75,14,224,40,45,13,159,79,29,0,100,28,66,115,202,121,90,167,245,207,
604 210,128,215,120,36,105,30,246,0,64,70,33,76,20,197,52,194,171,180,205,151,
605 3,248,147,102,74,91,172,236,3,128,140,64,104,193,223,140,102,157,210,118,
606 134,134,188,193,64,83,249,164,7,0,36,64,184,75,236,162,3,135,211,150,125,
607 77,21,136,34,114,116,90,127,174,204,227,184,137,214,135,26,231,1,182,21,
608 244,227,33,192,91,206,55,24,198,39,32,224,36,77,217,65,23,118,202,46,44,
609 163,87,210,160,100,70,173,56,201,19,58,173,95,78,14,179,25,100,58,175,180,
610 2,184,148,19,20,107,211,184,93,236,3,71,36,173,5,127,211,155,237,244,22,
611 219,233,196,1,6,203,25,182,203,41,160,136,6,248,149,182,57,50,159,211,52,
612 54,157,87,218,134,64,119,118,179,93,140,224,70,246,225,11,66,32,148,232,
613 147,199,38,58,114,208,86,57,109,56,206,8,177,94,105,59,77,99,222,52,57,
614 246,163,178,13,64,32,25,199,74,214,137,231,104,78,121,85,186,10,130,131,
615 48,47,136,247,108,149,55,137,165,120,8,40,109,179,25,68,57,57,150,242,179,
616 5,160,17,94,150,139,169,76,19,139,113,16,78,176,171,32,60,108,163,23,92,
617 65,25,195,197,199,74,219,73,154,50,79,230,89,206,51,101,0,87,113,132,205,
618 98,52,189,248,210,208,175,38,4,7,97,38,139,37,41,149,57,69,44,193,141,122,
619 186,125,157,193,202,3,143,100,74,9,192,253,226,11,182,138,81,116,228,144,
620 41,255,154,16,242,217,200,213,38,159,141,170,29,71,121,148,79,149,182,227,
621 52,99,190,28,96,41,191,168,44,1,112,16,166,144,69,20,49,157,28,124,134,
622 190,171,233,193,100,249,68,213,111,95,16,252,90,117,62,83,44,198,130,23,
623 196,187,184,80,127,188,121,85,14,225,44,13,44,229,23,149,105,0,205,41,231,
624 67,38,50,86,172,50,60,106,214,112,80,200,72,70,201,73,44,162,31,135,185,
625 164,202,86,169,85,67,200,103,163,233,88,208,158,35,12,230,51,165,237,24,
626 205,121,135,7,205,190,70,130,76,1,232,202,207,108,21,143,115,167,248,198,
627 208,175,140,22,228,202,121,204,145,249,64,228,40,106,46,241,129,41,10,193,
628 74,44,40,20,139,112,162,152,87,129,153,242,49,188,120,76,229,163,82,82,
629 0,109,56,206,70,241,52,151,115,204,208,111,7,215,114,167,92,200,215,116,
630 138,75,47,150,247,197,245,2,168,134,96,166,23,116,224,48,121,108,82,218,
631 202,104,193,98,250,38,123,5,67,37,5,112,29,63,227,209,89,117,69,85,68,47,
632 250,200,217,202,221,151,170,23,64,4,130,166,37,239,5,47,138,119,148,83,
633 44,192,12,134,227,35,219,240,249,100,178,181,14,56,75,3,134,201,169,140,
634 149,19,8,26,172,170,85,189,0,34,16,250,105,250,51,66,103,14,208,159,45,
635 74,219,97,46,97,137,236,147,90,197,99,148,50,128,82,218,112,183,92,192,
636 71,116,79,234,27,196,89,21,23,18,108,90,152,231,67,139,149,182,233,98,33,
637 89,58,173,255,146,28,142,31,183,249,10,235,40,37,0,27,228,205,220,45,223,
638 102,63,109,77,63,179,156,92,101,47,0,232,163,109,166,131,86,26,151,214,
639 133,82,250,178,77,233,127,136,86,44,227,62,211,101,27,201,18,0,137,96,142,
640 204,103,32,47,91,94,115,235,197,2,136,204,8,227,67,75,65,171,94,227,191,
641 196,219,186,173,95,40,71,18,192,165,180,89,149,105,0,167,104,204,67,242,
642 21,10,25,73,56,197,145,179,92,230,114,68,167,23,244,167,132,171,180,95,
643 65,11,112,3,251,232,45,182,43,253,74,185,140,21,244,76,169,124,149,146,
644 190,73,5,13,217,75,123,186,203,133,108,161,155,173,194,2,184,152,171,179,
645 97,113,16,102,130,88,1,90,128,169,161,5,186,139,173,233,114,4,90,244,176,
646 33,13,74,10,224,43,58,211,67,206,231,144,78,203,89,213,114,122,114,84,231,
647 67,69,127,74,200,99,35,119,104,59,171,86,140,177,218,79,91,86,113,111,90,
648 234,17,85,82,0,149,100,83,105,115,174,141,149,31,183,238,129,165,131,48,
649 11,196,172,72,185,49,203,230,168,166,203,17,132,210,120,140,9,233,60,20,
650 181,32,163,88,16,27,248,98,33,252,72,59,214,112,79,218,235,146,17,0,70,
651 177,160,166,162,16,166,201,81,41,7,95,35,101,4,0,64,49,250,189,160,166,
652 246,104,237,88,175,221,250,191,212,35,99,0,172,244,130,25,12,39,172,105,
653 113,235,132,116,41,99,0,192,120,70,136,234,91,121,53,27,228,45,145,31,90,
654 32,237,16,50,10,192,143,155,57,168,247,8,81,205,20,67,227,47,60,166,25,
655 66,70,1,0,20,203,92,221,94,176,75,118,98,147,188,41,209,144,70,8,25,191,
656 39,239,199,205,24,38,112,155,252,46,46,189,17,94,214,136,30,232,158,190,
657 69,1,56,237,237,8,51,14,0,160,68,118,163,68,181,204,54,190,229,154,22,8,
658 25,31,2,182,101,115,56,212,125,0,96,11,66,253,0,0,41,67,168,63,0,32,37,
659 8,245,11,0,88,134,80,255,0,128,37,8,113,211,224,21,77,18,247,253,215,180,
660 244,48,163,187,250,158,109,109,151,211,157,141,211,29,255,78,123,202,188,
661 172,250,161,250,70,121,28,128,86,57,137,203,130,43,47,244,240,84,183,212,
662 63,61,101,90,217,217,217,120,60,213,245,127,127,239,95,113,0,234,231,16,
663 136,145,223,239,199,231,211,255,146,93,239,1,0,4,2,1,93,8,181,98,41,124,
664 46,20,8,168,131,98,28,128,221,101,94,92,89,241,255,181,243,6,195,156,170,
665 84,127,154,174,123,58,203,79,127,84,198,165,8,10,182,38,219,114,212,63,
666 57,92,224,138,204,14,231,69,12,72,80,40,24,185,218,203,121,20,3,18,244,
667 223,189,230,127,1,145,119,128,141,62,61,149,199,0,0,0,0,73,69,78,68,174,
668 66,96,130};
669 
670 static size_t xml_res_size_5 = 621;
671 static unsigned char xml_res_file_5[] = {
672 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
673 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
674 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
675 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
676 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
677 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
678 45,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,
679 120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,104,97,114,116,
680 49,50,56,34,62,67,104,97,114,116,86,105,101,119,66,105,116,109,97,112,115,
681 46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,99,104,97,114,
682 116,49,50,56,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,
683 111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,
684 97,112,34,32,110,97,109,101,61,34,99,104,97,114,116,49,54,34,62,67,104,
685 97,114,116,86,105,101,119,66,105,116,109,97,112,115,46,99,112,112,36,100,
686 97,116,97,95,105,109,97,103,101,115,95,99,104,97,114,116,49,54,46,112,110,
687 103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,
688 99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,
689 101,61,34,99,104,97,114,116,50,53,54,34,62,67,104,97,114,116,86,105,101,
690 119,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,
691 97,103,101,115,95,99,104,97,114,116,50,53,54,46,112,110,103,60,47,111,98,
692 106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
693 61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,104,97,
694 114,116,51,50,34,62,67,104,97,114,116,86,105,101,119,66,105,116,109,97,
695 112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,99,
696 104,97,114,116,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,
697 32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,
698 109,97,112,34,32,110,97,109,101,61,34,99,104,97,114,116,54,52,34,62,67,
699 104,97,114,116,86,105,101,119,66,105,116,109,97,112,115,46,99,112,112,36,
700 100,97,116,97,95,105,109,97,103,101,115,95,99,104,97,114,116,54,52,46,112,
701 110,103,60,47,111,98,106,101,99,116,62,10,60,47,114,101,115,111,117,114,
702 99,101,62,10};
703 
704 void wxCE3EBInitBitmapResources()
705 {
706 
707  // Check for memory FS. If not present, load the handler:
708  {
709  wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
710  wxFileSystem fsys;
711  wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
712  wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
713  if (f) delete f;
714  else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
715  }
716 
717  XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart128.png"), xml_res_file_0, xml_res_size_0, wxT("image/png"));
718  XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart16.png"), xml_res_file_1, xml_res_size_1, wxT("image/png"));
719  XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart256.png"), xml_res_file_2, xml_res_size_2, wxT("image/png"));
720  XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart32.png"), xml_res_file_3, xml_res_size_3, wxT("image/png"));
721  XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$data_images_chart64.png"), xml_res_file_4, xml_res_size_4, wxT("image/png"));
722  XRC_ADD_FILE(wxT("XRC_resource/ChartViewBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ChartViewBitmaps.xrc"), xml_res_file_5, xml_res_size_5, wxT("text/xml"));
723  wxXmlResource::Get()->Load(wxT("memory:XRC_resource/ChartViewBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ChartViewBitmaps.xrc"));
724 }
-
- - - - diff --git a/docs/doxygen/html/_connection_line_8cpp_source.html b/docs/doxygen/html/_connection_line_8cpp_source.html deleted file mode 100644 index 01771a2..0000000 --- a/docs/doxygen/html/_connection_line_8cpp_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/ConnectionLine.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ConnectionLine.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ConnectionLine.h"
19 
20 ConnectionLine::ConnectionLine() : ControlElement(-1) {}
21 ConnectionLine::ConnectionLine(Node* firstNode, int id) : ControlElement(id)
22 {
23  wxPoint2DDouble pt = firstNode->GetPosition();
24  m_tmpSndPt = pt;
25  for(int i = 0; i < 6; i++) {
26  m_pointList.push_back(pt);
27  }
28  m_nodeList.push_back(firstNode);
29  firstNode->SetConnected();
30 }
31 
32 ConnectionLine::~ConnectionLine() {}
33 void ConnectionLine::Draw(wxPoint2DDouble translation, double scale) const
34 {
35  // Line selected (Layer 1).
36  if(m_selected) {
37  glLineWidth(1.5 + m_borderSize * 2.0);
38  glColor4dv(m_selectionColour.GetRGBA());
39  DrawLine(m_pointList);
40  }
41 
42  // Draw line (Layer 2)
43  glLineWidth(1.5);
44  glColor4d(0.0, 0.0, 0.0, 1.0);
45  DrawLine(m_pointList);
46 
47  if(m_type == ELEMENT_LINE) {
48  glColor4d(0.0, 0.0, 0.0, 1.0);
49  DrawCircle(m_pointList[5], 3, 10, GL_POLYGON);
50  }
51 }
52 
53 bool ConnectionLine::Contains(wxPoint2DDouble position) const
54 {
55  if(PointToLineDistance(position) < 5.0) {
56  return true;
57  }
58  return false;
59 }
60 
61 bool ConnectionLine::Intersects(wxRect2DDouble rect) const
62 {
63  for(auto it = m_pointList.begin(); it != m_pointList.end(); ++it) {
64  if(rect.Contains(*it)) return true;
65  }
66  return false;
67 }
68 
69 void ConnectionLine::UpdatePoints()
70 {
71  if(m_type == ELEMENT_ELEMENT) {
72  bool hasOneNode = true;
73  wxPoint2DDouble pt1 = m_nodeList[0]->GetPosition();
74  wxPoint2DDouble pt2;
75  if(m_nodeList.size() == 1)
76  pt2 = m_tmpSndPt;
77  else {
78  pt2 = m_nodeList[1]->GetPosition();
79  hasOneNode = false;
80  }
81  wxPoint2DDouble midPt = (pt1 + pt2) / 2.0 + wxPoint2DDouble(0.0, m_lineOffset);
82 
83  m_pointList[0] = pt1;
84  if(m_nodeList[0]->GetAngle() == 0.0)
85  m_pointList[1] = m_pointList[0] + wxPoint2DDouble(-10, 0);
86  else if(m_nodeList[0]->GetAngle() == 90.0)
87  m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, -10);
88  else if(m_nodeList[0]->GetAngle() == 180.0)
89  m_pointList[1] = m_pointList[0] + wxPoint2DDouble(10, 0);
90  else if(m_nodeList[0]->GetAngle() == 270.0)
91  m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, 10);
92 
93  m_pointList[2] = m_pointList[1] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[1].m_y);
94 
95  m_pointList[5] = pt2;
96  if(hasOneNode)
97  m_pointList[4] = pt2;
98  else {
99  if(m_nodeList[1]->GetAngle() == 0.0)
100  m_pointList[4] = m_pointList[5] + wxPoint2DDouble(-10, 0);
101  else if(m_nodeList[1]->GetAngle() == 90.0)
102  m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, -10);
103  else if(m_nodeList[1]->GetAngle() == 180.0)
104  m_pointList[4] = m_pointList[5] + wxPoint2DDouble(10, 0);
105  else if(m_nodeList[1]->GetAngle() == 270.0)
106  m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, 10);
107  }
108 
109  m_pointList[3] = m_pointList[4] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[4].m_y);
110  } else if(m_type == ELEMENT_LINE) {
111  wxPoint2DDouble pt1 = m_nodeList[0]->GetPosition();
112  wxPoint2DDouble pt2 = m_parentLine->GetMidPoint();
113  wxPoint2DDouble midPt = (pt1 + pt2) / 2.0 + wxPoint2DDouble(0.0, m_lineOffset);
114 
115  m_pointList[0] = pt1;
116  if(m_nodeList[0]->GetAngle() == 0.0)
117  m_pointList[1] = m_pointList[0] + wxPoint2DDouble(-10, 0);
118  else if(m_nodeList[0]->GetAngle() == 90.0)
119  m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, -10);
120  else if(m_nodeList[0]->GetAngle() == 180.0)
121  m_pointList[1] = m_pointList[0] + wxPoint2DDouble(10, 0);
122  else if(m_nodeList[0]->GetAngle() == 270.0)
123  m_pointList[1] = m_pointList[0] + wxPoint2DDouble(0, 10);
124 
125  m_pointList[2] = m_pointList[1] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[1].m_y);
126 
127  m_pointList[5] = pt2;
128  if(m_pointList[2].m_y > pt2.m_y) {
129  m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, 10);
130  } else {
131  m_pointList[4] = m_pointList[5] + wxPoint2DDouble(0, -10);
132  }
133 
134  m_pointList[3] = m_pointList[4] + wxPoint2DDouble(0.0, midPt.m_y - m_pointList[4].m_y);
135  }
136  for(auto it = m_childList.begin(), itEnd = m_childList.end(); it != itEnd; ++it) {
137  ConnectionLine* child = static_cast<ConnectionLine*>(*it);
138  child->UpdatePoints();
139  }
140 }
141 
142 bool ConnectionLine::AppendNode(Node* node, ControlElement* parent)
143 {
144  if(m_nodeList.size() != 1) return false;
145  if(m_nodeList[0] == node) return false;
146  if(m_nodeList[0]->GetNodeType() == node->GetNodeType()) return false;
147  auto nodeList = parent->GetNodeList();
148  for(auto it = nodeList.begin(), itEnd = nodeList.end(); it != itEnd; ++it) {
149  Node* parentNode = *it;
150  if(parentNode == m_nodeList[0]) return false;
151  }
152 
153  m_nodeList.push_back(node);
154  node->SetConnected();
155  return true;
156 }
157 
158 void ConnectionLine::Move(wxPoint2DDouble position)
159 {
160  m_lineOffset = m_moveStartOffset + position.m_y - m_moveStartPtY;
161  UpdatePoints();
162 }
163 
164 void ConnectionLine::StartMove(wxPoint2DDouble position)
165 {
166  m_moveStartPtY = position.m_y;
167  m_moveStartOffset = m_lineOffset;
168 }
169 
170 wxPoint2DDouble ConnectionLine::GetMidPoint() const { return ((m_pointList[2] + m_pointList[3]) / 2.0); }
171 bool ConnectionLine::SetParentLine(ConnectionLine* parent)
172 {
173  if(m_nodeList[0]->GetNodeType() != Node::NODE_IN) return false;
174  if(!parent) return false;
175 
176  m_type = ELEMENT_LINE;
177  m_parentLine = parent;
178  return true;
179 }
180 
181 std::vector<ConnectionLine*> ConnectionLine::GetLineChildList() const
182 {
183  std::vector<ConnectionLine*> childList;
184  for(auto it = m_childList.begin(), itEnd = m_childList.end(); it != itEnd; ++it) {
185  ConnectionLine* child = static_cast<ConnectionLine*>(*it);
186  childList.push_back(child);
187  }
188  return childList;
189 }
190 
192 {
193  for(auto it = m_parentList.begin(); it != m_parentList.end(); ++it) {
194  Element* element = *it;
195  if(element == parent) m_parentList.erase(it--);
196  }
197 }
198 
200 {
201  ConnectionLine* copy = new ConnectionLine();
202  *copy = *this;
203  return copy;
204 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
Element * GetCopy()
Get a the element copy.
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
- -
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
-
Connection between two control elements or other connection line and an element.
-
virtual void RemoveParent(Element *parent)
Remove a parent.
- -
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
-
-
- - - - diff --git a/docs/doxygen/html/_connection_line_8h.html b/docs/doxygen/html/_connection_line_8h.html index a8e17fc..01bdb88 100644 --- a/docs/doxygen/html/_connection_line_8h.html +++ b/docs/doxygen/html/_connection_line_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_connection_line_8h.html','');});
ConnectionLine.h File Reference
-
#include "ControlElement.h"
-
-

Go to the source code of this file.

- +
#include "ControlElement.h"
+
diff --git a/docs/doxygen/html/_connection_line_8h_source.html b/docs/doxygen/html/_connection_line_8h_source.html deleted file mode 100644 index 0c1688b..0000000 --- a/docs/doxygen/html/_connection_line_8h_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/ConnectionLine.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ConnectionLine
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ConnectionLine.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CONNECTIONLINE_H
19 #define CONNECTIONLINE_H
20 
21 #include "ControlElement.h"
22 
31 {
32  public:
33  enum ConnectionLineType { ELEMENT_ELEMENT = 0, ELEMENT_LINE };
35  ConnectionLine(Node* firstNode, int id);
36  ~ConnectionLine();
37 
38  virtual void Draw(wxPoint2DDouble translation, double scale) const;
39  virtual bool Contains(wxPoint2DDouble position) const;
40  virtual bool Intersects(wxRect2DDouble rect) const;
41  virtual void RemoveParent(Element* parent);
42  virtual void StartMove(wxPoint2DDouble position);
43  virtual void Move(wxPoint2DDouble position);
44  virtual bool AppendNode(Node* node, ControlElement* parent);
45  virtual void UpdatePoints();
46  virtual void SetTemporarySecondPoint(wxPoint2DDouble point) { m_tmpSndPt = point; }
47  virtual wxPoint2DDouble GetMidPoint() const;
48  virtual double GetOffset() const { return m_lineOffset; }
49  virtual void SetOffset(double offset) { m_lineOffset = offset; }
50  virtual ConnectionLineType GetType() const { return m_type; }
51  virtual void SetType(ConnectionLineType newType) { m_type = newType; }
52  virtual ConnectionLine* GetParentLine() const { return m_parentLine; }
53  virtual bool SetParentLine(ConnectionLine* parent);
54 
55  virtual std::vector<ConnectionLine*> GetLineChildList() const;
56 
57  virtual double GetValue() const { return m_value; }
58  virtual void SetValue(double value) { m_value = value; }
59  Element* GetCopy();
60 
61  protected:
62  double m_lineOffset = 0.0;
63  double m_moveStartPtY = 0.0;
64  double m_moveStartOffset = 0.0;
65  wxPoint2DDouble m_tmpSndPt;
66 
67  ConnectionLineType m_type = ELEMENT_ELEMENT;
68  ConnectionLine* m_parentLine = NULL;
69 
70  double m_value;
71 };
72 
73 #endif // CONNECTIONLINE_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
Element * GetCopy()
Get a the element copy.
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
-
Connection between two control elements or other connection line and an element.
-
Base class of a control element. Provide general methods to other control classes.
-
virtual void RemoveParent(Element *parent)
Remove a parent.
- -
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
-
-
- - - - diff --git a/docs/doxygen/html/_constant_8cpp_source.html b/docs/doxygen/html/_constant_8cpp_source.html deleted file mode 100644 index c3dda31..0000000 --- a/docs/doxygen/html/_constant_8cpp_source.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - -Project/Constant.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Constant.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Constant.h"
19 #include "ConstantForm.h"
20 
21 Constant::Constant(int id) : ControlElement(id)
22 {
23  SetValue(m_value);
24  m_angle = 180.0;
25  Node* nodeOut = new Node(m_position + wxPoint2DDouble(m_width / 2, 0), Node::NODE_OUT, m_borderSize);
26  nodeOut->SetAngle(180.0);
27  nodeOut->StartMove(m_position);
28  m_nodeList.push_back(nodeOut);
29 }
30 
31 Constant::~Constant()
32 {
33  if(m_glText) delete m_glText;
34 }
35 void Constant::Draw(wxPoint2DDouble translation, double scale) const
36 {
37  glLineWidth(1.0);
38  if(m_selected) {
39  glColor4dv(m_selectionColour.GetRGBA());
40  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
41  DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
42  }
43  glColor4d(1.0, 1.0, 1.0, 1.0);
44  DrawRectangle(m_position, m_width, m_height);
45  glColor4d(0.0, 0.0, 0.0, 1.0);
46  DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
47 
48  // Plot number.
49  m_glText->Draw(m_position);
50 
51  glColor4d(0.0, 0.0, 0.0, 1.0);
52  DrawNodes();
53 }
54 
55 bool Constant::ShowForm(wxWindow* parent, Element* element)
56 {
57  ConstantForm* form = new ConstantForm(parent, this);
58  if(form->ShowModal() == wxID_OK) {
59  form->Destroy();
60  return true;
61  }
62  form->Destroy();
63  return false;
64 }
65 
66 void Constant::Rotate(bool clockwise)
67 {
68  if(clockwise)
69  m_angle += 90.0;
70  else
71  m_angle -= 90.0;
72  if(m_angle >= 360.0)
73  m_angle = 0.0;
74  else if(m_angle < 0)
75  m_angle = 270.0;
76 
77  UpdatePoints();
78 
79  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
80  Node* node = *it;
81  node->Rotate(clockwise);
82  }
83 }
84 
85 void Constant::UpdatePoints()
86 {
87  if(m_nodeList.size() != 0) {
88  if(m_angle == 0.0) {
89  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
90  } else if(m_angle == 90.0) {
91  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
92  } else if(m_angle == 180.0) {
93  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
94  } else if(m_angle == 270.0) {
95  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
96  }
97  }
98 }
99 
100 void Constant::SetValue(double value)
101 {
102  m_value = value;
103  wxString text = StringFromDouble(m_value);
104 
105  if(m_glText)
106  m_glText->SetText(text);
107  else
108  m_glText = new OpenGLText(text);
109 
110  m_width = m_glText->GetWidth() + 6 + 2 * m_borderSize;
111  m_height = m_glText->GetHeight() + 6 + 2 * m_borderSize;
112 
113  UpdatePoints();
114 }
115 
117 {
118  Constant* copy = new Constant(m_elementID);
119  *copy = *this;
120  copy->m_glText = m_glText->GetCopy();
121  return copy;
122 }
123 
125 {
126  SetValue(m_value);
127  if(!m_glText->IsTextureOK()) return false;
128  return true;
129 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
Definition: Constant.cpp:124
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Constant.cpp:116
-
virtual void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode=GL_QUADS) const
Draw rectangle.
Definition: Element.cpp:69
- -
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
Form to edit the constant control data.
Definition: ConstantForm.h:31
- -
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Constant.cpp:55
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Constant.cpp:66
-
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- -
A control element that provides a constant value.
Definition: Constant.h:35
-
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Constant.cpp:35
-
-
- - - - diff --git a/docs/doxygen/html/_constant_8h.html b/docs/doxygen/html/_constant_8h.html index 0cf5a19..cc0a96c 100644 --- a/docs/doxygen/html/_constant_8h.html +++ b/docs/doxygen/html/_constant_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_constant_8h.html','');});
Constant.h File Reference
-
#include "ControlElement.h"
+
#include "ControlElement.h"
#include <wx/dcscreen.h>
-#include "OpenGLText.h"
-
-

Go to the source code of this file.

- +#include "OpenGLText.h"
+
diff --git a/docs/doxygen/html/_constant_8h_source.html b/docs/doxygen/html/_constant_8h_source.html deleted file mode 100644 index 9e8bace..0000000 --- a/docs/doxygen/html/_constant_8h_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -Project/Constant.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Constant
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Constant.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CONSTANT_H
19 #define CONSTANT_H
20 
21 #include "ControlElement.h"
22 
23 #include <wx/dcscreen.h>
24 #include "OpenGLText.h"
25 
26 class ConstantForm;
27 
35 class Constant : public ControlElement
36 {
37  public:
38  Constant(int id);
39  ~Constant();
40 
41  virtual void Draw(wxPoint2DDouble translation, double scale) const;
42  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
43  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
44  virtual bool ShowForm(wxWindow* parent, Element* element);
45  virtual void Rotate(bool clockwise = true);
46  virtual bool UpdateText();
47  virtual void SetValue(double value);
48  virtual double GetValue() const { return m_value; }
49  virtual void UpdatePoints();
50 
51  virtual Element* GetCopy();
52 
53  protected:
54  double m_value = 1.0;
55 
56  OpenGLText* m_glText = NULL;
57 };
58 
59 #endif // CONSTANT_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Constant.h:42
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Constant.h:43
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
Definition: Constant.cpp:124
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Constant.cpp:116
- -
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
Form to edit the constant control data.
Definition: ConstantForm.h:31
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Constant.cpp:55
-
Base class of a control element. Provide general methods to other control classes.
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Constant.cpp:66
- -
A control element that provides a constant value.
Definition: Constant.h:35
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Constant.cpp:35
-
-
- - - - diff --git a/docs/doxygen/html/_constant_form_8cpp_source.html b/docs/doxygen/html/_constant_form_8cpp_source.html deleted file mode 100644 index 226ad45..0000000 --- a/docs/doxygen/html/_constant_form_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/ConstantForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ConstantForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ConstantForm.h"
19 #include "Constant.h"
20 
21 ConstantForm::ConstantForm(wxWindow* parent, Constant* constant) : ConstantFormBase(parent)
22 {
23  SetSize(GetBestSize());
24 
25  m_parent = parent;
26  m_constant = constant;
27 
28  m_textCtrlValue->SetValue(m_constant->StringFromDouble(m_constant->GetValue()));
29 }
30 
31 ConstantForm::~ConstantForm() {}
32 void ConstantForm::OnOKButtonClick(wxCommandEvent& event)
33 {
34  if(ValidateData()) EndModal(wxID_OK);
35 }
36 
37 bool ConstantForm::ValidateData()
38 {
39  double value;
40  if(!m_constant->DoubleFromString(this, m_textCtrlValue->GetValue(), value,
41  _("Value entered incorrectly in the field \"Constant value\".")))
42  return false;
43 
44  m_constant->SetValue(value);
45  return true;
46 }
- - -
A control element that provides a constant value.
Definition: Constant.h:35
-
-
- - - - diff --git a/docs/doxygen/html/_constant_form_8h.html b/docs/doxygen/html/_constant_form_8h.html index dfc7ed2..f8f3d40 100644 --- a/docs/doxygen/html/_constant_form_8h.html +++ b/docs/doxygen/html/_constant_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_constant_form_8h.html','');});
ConstantForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_constant_form_8h_source.html b/docs/doxygen/html/_constant_form_8h_source.html deleted file mode 100644 index 3211f0a..0000000 --- a/docs/doxygen/html/_constant_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/ConstantForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ConstantForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ConstantForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CONSTANTFORM_H
19 #define CONSTANTFORM_H
20 #include "ElementForm.h"
21 
22 class Constant;
23 
32 {
33  public:
34  ConstantForm(wxWindow* parent, Constant* constant);
35  virtual ~ConstantForm();
36  virtual bool ValidateData();
37 
38  protected:
39  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
40  virtual void OnOKButtonClick(wxCommandEvent& event);
41 
42  wxWindow* m_parent = NULL;
43  Constant* m_constant = NULL;
44 };
45 #endif // CONSTANTFORM_H
-
Form to edit the constant control data.
Definition: ConstantForm.h:31
-
A control element that provides a constant value.
Definition: Constant.h:35
-
-
- - - - diff --git a/docs/doxygen/html/_control_editor_8cpp_source.html b/docs/doxygen/html/_control_editor_8cpp_source.html deleted file mode 100644 index f35458e..0000000 --- a/docs/doxygen/html/_control_editor_8cpp_source.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - -Project/ControlEditor.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlEditor.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ControlEditor.h"
19 
20 #ifdef USING_WX_3_0_X
21 #include "DegreesAndRadians.h"
22 #endif
23 #include "FileHanding.h"
24 #include "Camera.h"
25 #include "ControlElement.h"
26 #include "TransferFunction.h"
27 #include "ConnectionLine.h"
28 #include "Sum.h"
29 #include "Multiplier.h"
30 #include "Limiter.h"
31 #include "RateLimiter.h"
32 #include "Exponential.h"
33 #include "Constant.h"
34 #include "Gain.h"
35 #include "MathOperation.h"
36 #include "Divider.h"
37 
38 #include "ControlElementSolver.h"
40 
41 #include "ChartView.h"
42 #include "ElementPlotData.h"
43 
44 ControlElementButton::ControlElementButton(wxWindow* parent, wxString label, wxImage image, wxWindowID id)
45  : wxWindow(parent, id)
46 {
47  SetBackgroundColour(*wxWHITE);
48  m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
49  m_label = label;
50  m_image = image;
51  m_imageSize = wxSize(image.GetWidth(), image.GetHeight());
52 
53  // Calculate label size.
54  wxScreenDC dc;
55  dc.SetFont(m_font);
56  wxSize textSize = dc.GetTextExtent(label);
57 
58  int buttonWidth = 0;
59  if(textSize.GetWidth() > m_imageSize.GetWidth()) {
60  buttonWidth = textSize.GetWidth();
61  m_imagePosition = wxPoint((buttonWidth - m_imageSize.GetWidth()) / 2 + m_borderSize, m_borderSize);
62  m_labelPosition = wxPoint(m_borderSize, m_imageSize.GetHeight() + m_borderSize);
63  } else {
64  buttonWidth = m_imageSize.GetWidth();
65  m_imagePosition = wxPoint(m_borderSize, m_borderSize);
66  m_labelPosition =
67  wxPoint((buttonWidth - textSize.GetWidth()) / 2 + m_borderSize, m_imageSize.GetHeight() + m_borderSize);
68  }
69  m_buttonSize =
70  wxSize(buttonWidth + 2 * m_borderSize, textSize.GetHeight() + m_imageSize.GetHeight() + 2 * m_borderSize);
71  SetMinSize(m_buttonSize + wxSize(m_borderSize, m_borderSize));
72 
73  // Events.
74  Bind(wxEVT_PAINT, &ControlElementButton::OnPaint, this);
75  Bind(wxEVT_ENTER_WINDOW, &ControlElementButton::OnMouseEnter, this);
76  Bind(wxEVT_LEAVE_WINDOW, &ControlElementButton::OnMouseLeave, this);
77  Bind(wxEVT_LEFT_DOWN, &ControlElementButton::OnLeftClickDown, this);
78  Bind(wxEVT_LEFT_UP, &ControlElementButton::OnLeftClickUp, this);
79 }
80 
81 ControlElementButton::~ControlElementButton() {}
82 void ControlElementButton::OnPaint(wxPaintEvent& event)
83 {
84  wxPaintDC dc(this);
85  wxGraphicsContext* gc = wxGraphicsContext::Create(dc);
86  if(gc) {
87  if(m_mouseAbove) {
88  if(m_selected) {
89  gc->SetPen(wxPen(wxColour(0, 125, 255, 255), m_borderSize - 1));
90  gc->SetBrush(wxBrush(wxColour(0, 125, 255, 100)));
91  } else {
92  gc->SetPen(*wxTRANSPARENT_PEN);
93  gc->SetBrush(wxBrush(wxColour(0, 125, 255, 70)));
94  }
95  gc->DrawRectangle(m_borderSize / 2, m_borderSize / 2, m_buttonSize.GetWidth(), m_buttonSize.GetHeight());
96  }
97  gc->DrawBitmap(gc->CreateBitmapFromImage(m_image), m_imagePosition.x, m_imagePosition.y, m_imageSize.GetWidth(),
98  m_imageSize.GetHeight());
99  gc->SetFont(m_font, *wxBLACK);
100  gc->DrawText(m_label, m_labelPosition.x, m_labelPosition.y);
101  delete gc;
102  }
103 }
104 
105 void ControlElementButton::OnMouseEnter(wxMouseEvent& event)
106 {
107  m_mouseAbove = true;
108  Refresh();
109  event.Skip();
110 }
111 
112 void ControlElementButton::OnMouseLeave(wxMouseEvent& event)
113 {
114  m_mouseAbove = false;
115  Refresh();
116  event.Skip();
117 }
118 
119 void ControlElementButton::OnLeftClickDown(wxMouseEvent& event)
120 {
121  m_selected = true;
122  Refresh();
123  event.Skip();
124 }
125 
126 void ControlElementButton::OnLeftClickUp(wxMouseEvent& event)
127 {
128  m_selected = false;
129  Refresh();
130  event.Skip();
131 }
132 
133 ControlEditor::ControlEditor(wxWindow* parent, int ioflags) : ControlEditorBase(parent)
134 {
135  BuildControlElementPanel();
136  m_glContext = new wxGLContext(m_glCanvas);
137  m_glContext->SetCurrent(*m_glCanvas);
138  m_camera = new Camera();
139  m_selectionRect = wxRect2DDouble(0, 0, 0, 0);
140  // m_camera->SetScale(1.2);
141  m_ioFlags = ioflags;
142 }
143 ControlEditor::~ControlEditor()
144 {
145  // m_tfButton->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(ControlEditor::LeftClickDown), m_tfButton, this);
146 }
147 
148 void ControlEditor::BuildControlElementPanel()
149 {
150  m_panelControlElements->SetDoubleBuffered(true);
151  wxWrapSizer* wrapSizer = new wxWrapSizer();
152  m_panelControlElements->SetSizer(wrapSizer);
153 
154  wxFileName exeFileName(wxStandardPaths::Get().GetExecutablePath());
155  wxString exePath = exeFileName.GetPath();
156 
158  m_panelControlElements, _("In/Out"),
159  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\io.png", wxPATH_WIN).GetPath()), ID_IO);
160  wrapSizer->Add(ioButton, 0, wxALL, 5);
161  ioButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
162 
164  m_panelControlElements, _("Transfer fcn"),
165  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\transferFunc.png", wxPATH_WIN).GetPath()),
166  ID_TF);
167  wrapSizer->Add(tfButton, 0, wxALL, 5);
168  tfButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
169 
171  m_panelControlElements, _("Sum"),
172  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\sum.png", wxPATH_WIN).GetPath()), ID_SUM);
173  wrapSizer->Add(sumButton, 0, wxALL, 5);
174  sumButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
175 
176  ControlElementButton* constButton = new ControlElementButton(
177  m_panelControlElements, _("Constant"),
178  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\value.png", wxPATH_WIN).GetPath()),
179  ID_CONST);
180  wrapSizer->Add(constButton, 0, wxALL, 5);
181  constButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
182 
183  ControlElementButton* gainButton = new ControlElementButton(
184  m_panelControlElements, _("Gain"),
185  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\gain.png", wxPATH_WIN).GetPath()), ID_GAIN);
186  wrapSizer->Add(gainButton, 0, wxALL, 5);
187  gainButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
188 
190  m_panelControlElements, _("Limiter"),
191  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\limiter.png", wxPATH_WIN).GetPath()),
192  ID_LIMITER);
193  wrapSizer->Add(limButton, 0, wxALL, 5);
194  limButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
195 
196  ControlElementButton* rateLimButton = new ControlElementButton(
197  m_panelControlElements, _("Rate limiter"),
198  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\rateLimiter.png", wxPATH_WIN).GetPath()),
199  ID_RATELIM);
200  wrapSizer->Add(rateLimButton, 0, wxALL, 5);
201  rateLimButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
202 
203  ControlElementButton* multButton = new ControlElementButton(
204  m_panelControlElements, _("Multiplier"),
205  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\mult.png", wxPATH_WIN).GetPath()), ID_MULT);
206  wrapSizer->Add(multButton, 0, wxALL, 5);
207  multButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
208 
210  m_panelControlElements, _("Divider"),
211  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\div.png", wxPATH_WIN).GetPath()),
212  ID_MATH_DIV);
213  wrapSizer->Add(divButton, 0, wxALL, 5);
214  divButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
215 
217  m_panelControlElements, _("Exponential"),
218  wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\control\\sat.png", wxPATH_WIN).GetPath()), ID_EXP);
219  wrapSizer->Add(satButton, 0, wxALL, 5);
220  satButton->Bind(wxEVT_LEFT_DOWN, &ControlEditor::LeftClickDown, this);
221 }
222 
223 void ControlEditor::LeftClickDown(wxMouseEvent& event)
224 {
225  AddElement(static_cast<ControlElementButtonID>(event.GetId()));
226  event.Skip();
227 }
228 
229 void ControlEditor::SetViewport()
230 {
231  glClearColor(1.0, 1.0, 1.0, 1.0); // White background.
232  glClear(GL_COLOR_BUFFER_BIT);
233  glDisable(GL_DEPTH_TEST);
234  glDisable(GL_TEXTURE_2D);
235  glEnable(GL_COLOR_MATERIAL);
236  glEnable(GL_BLEND);
237  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
238  glEnable(GL_LINE_SMOOTH);
239 
240  double width = m_glCanvas->GetSize().x - 1;
241  double height = m_glCanvas->GetSize().y - 1;
242 
243  // Viewport fit the screen.
244  glViewport(0, 0, width, height);
245 
246  glMatrixMode(GL_PROJECTION);
247  glLoadIdentity();
248  gluOrtho2D(0.0, width, height, 0.0);
249 
250  glMatrixMode(GL_MODELVIEW);
251  glLoadIdentity();
252 }
253 
254 void ControlEditor::AddElement(ControlElementButtonID id)
255 {
256  switch(id) {
257  case ID_IO: {
258  m_mode = MODE_INSERT;
259  IOControl* io = new IOControl(m_ioFlags, GetNextID());
260  m_elementList.push_back(io);
261  } break;
262  case ID_TF: {
263  m_mode = MODE_INSERT;
264  TransferFunction* tf = new TransferFunction(GetNextID());
265  m_elementList.push_back(tf);
266  } break;
267  case ID_SUM: {
268  m_mode = MODE_INSERT;
269  Sum* sum = new Sum(GetNextID());
270  m_elementList.push_back(sum);
271  } break;
272  case ID_CONST: {
273  m_mode = MODE_INSERT;
274  Constant* constant = new Constant(GetNextID());
275  m_elementList.push_back(constant);
276  } break;
277  case ID_LIMITER: {
278  m_mode = MODE_INSERT;
279  Limiter* limiter = new Limiter(GetNextID());
280  m_elementList.push_back(limiter);
281  } break;
282  case ID_GAIN: {
283  m_mode = MODE_INSERT;
284  Gain* gain = new Gain(GetNextID());
285  m_elementList.push_back(gain);
286  } break;
287  case ID_MULT: {
288  m_mode = MODE_INSERT;
289  Multiplier* mult = new Multiplier(GetNextID());
290  m_elementList.push_back(mult);
291  } break;
292  case ID_EXP: {
293  m_mode = MODE_INSERT;
294  Exponential* exp = new Exponential(GetNextID());
295  m_elementList.push_back(exp);
296  } break;
297  case ID_RATELIM: {
298  m_mode = MODE_INSERT;
299  RateLimiter* rateLim = new RateLimiter(GetNextID());
300  m_elementList.push_back(rateLim);
301  } break;
302  case ID_MATH_DIV: {
303  m_mode = MODE_INSERT;
304  Divider* divider = new Divider(GetNextID());
305  m_elementList.push_back(divider);
306  }
307  }
308 }
309 
310 void ControlEditor::OnPaint(wxPaintEvent& event)
311 {
312  wxPaintDC dc(m_glCanvas);
313  m_glContext->SetCurrent(*m_glCanvas);
314  SetViewport();
315 
316  // Set GLCanvas scale and translation.
317  glScaled(m_camera->GetScale(), m_camera->GetScale(), 0.0); // Scale
318  glTranslated(m_camera->GetTranslation().m_x, m_camera->GetTranslation().m_y, 0.0); // Translation
319 
320  for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
321  ConnectionLine* line = *it;
322  line->Draw(m_camera->GetTranslation(), m_camera->GetScale());
323  }
324 
325  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
326  Element* element = *it;
327  element->Draw(m_camera->GetTranslation(), m_camera->GetScale());
328  }
329 
330  // Selection rectangle
331  glLineWidth(1.0);
332  glColor4d(0.0, 0.5, 1.0, 1.0);
333  glBegin(GL_LINE_LOOP);
334  glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y);
335  glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y + m_selectionRect.m_height);
336  glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y + m_selectionRect.m_height);
337  glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y);
338  glEnd();
339  glColor4d(0.0, 0.5, 1.0, 0.3);
340  glBegin(GL_QUADS);
341  glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y);
342  glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y + m_selectionRect.m_height);
343  glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y + m_selectionRect.m_height);
344  glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y);
345  glEnd();
346 
347  glFlush(); // Sends all pending information directly to the GPU.
348  m_glCanvas->SwapBuffers();
349  event.Skip();
350 }
351 
352 void ControlEditor::OnDoubleClick(wxMouseEvent& event)
353 {
354  wxPoint2DDouble clickPoint = event.GetPosition();
355  bool redraw = false;
356 
357  if(m_mode == MODE_EDIT) {
358  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
359  Element* element = *it;
360  if(element->Contains(m_camera->ScreenToWorld(clickPoint))) {
361  element->ShowForm(this, element);
362  CheckConnections();
363  auto childList = element->GetChildList();
364  for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; ++itC) {
365  ConnectionLine* line = static_cast<ConnectionLine*>(*itC);
366  line->UpdatePoints();
367  }
368  redraw = true;
369  }
370  }
371  }
372 
373  if(redraw) Redraw();
374 }
375 
376 void ControlEditor::OnLeftClickDown(wxMouseEvent& event)
377 {
378  wxPoint2DDouble clickPoint = event.GetPosition();
379  bool foundElement = false;
380 
381  if(m_mode == MODE_INSERT) {
382  m_mode = MODE_EDIT;
383  } else {
384  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
385  ControlElement* element = *it;
386  bool foundNode = false;
387  auto nodeList = element->GetNodeList();
388  for(auto itN = nodeList.begin(), itNEnd = nodeList.end(); itN != itNEnd; ++itN) {
389  Node* node = *itN;
390  if(node->Contains(m_camera->ScreenToWorld(clickPoint))) {
391  m_mode = MODE_INSERT_LINE;
392  ConnectionLine* line = new ConnectionLine(node, GetNextID());
393  m_connectionList.push_back(line);
394  element->AddChild(line);
395  line->AddParent(element);
396  foundElement = true;
397  foundNode = true;
398  }
399  }
400 
401  if(!foundNode) {
402  // Set movement initial position (not necessarily will be moved).
403  element->StartMove(m_camera->ScreenToWorld(clickPoint));
404 
405  // Click in an element.
406  if(element->Contains(m_camera->ScreenToWorld(clickPoint))) {
407  if(!foundElement) {
408  element->SetSelected();
409  foundElement = true;
410  }
411  m_mode = MODE_MOVE_ELEMENT;
412  }
413  }
414  }
415  if(m_mode != MODE_INSERT_LINE) {
416  for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
417  ConnectionLine* line = *it;
418  line->StartMove(m_camera->ScreenToWorld(clickPoint));
419  if(line->Contains(m_camera->ScreenToWorld(clickPoint))) {
420  line->SetSelected();
421  foundElement = true;
422  m_mode = MODE_MOVE_LINE;
423  }
424  }
425  }
426  }
427 
428  if(!foundElement) {
429  m_mode = MODE_SELECTION_RECT;
430  m_startSelRect = m_camera->ScreenToWorld(clickPoint);
431  }
432 
433  Redraw();
434  event.Skip();
435 }
436 
437 void ControlEditor::OnLeftClickUp(wxMouseEvent& event)
438 {
439  bool foundNode = false;
440  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; it++) {
441  ControlElement* element = *it;
442  if(m_mode == MODE_INSERT_LINE) {
443  auto nodeList = element->GetNodeList();
444  for(auto itN = nodeList.begin(), itNEnd = nodeList.end(); itN != itNEnd; ++itN) {
445  Node* node = *itN;
446  if(node->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
447  ConnectionLine* line = *(m_connectionList.end() - 1);
448  if(line->AppendNode(node, element)) {
449  line->AddParent(element);
450  element->AddChild(line);
451  line->UpdatePoints();
452  m_mode = MODE_EDIT;
453  foundNode = true;
454  }
455  }
456  }
457  } else if(m_mode == MODE_SELECTION_RECT) {
458  if(element->Intersects(m_selectionRect)) {
459  element->SetSelected();
460  } else if(!event.ControlDown()) {
461  element->SetSelected(false);
462  }
463  } else if(!event.ControlDown()) {
464  if(!element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
465  element->SetSelected(false);
466  }
467  }
468  }
469  for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
470  ConnectionLine* cLine = *it;
471  if(m_mode == MODE_INSERT_LINE && !foundNode && it != (itEnd - 1)) {
472  if(cLine->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
473  ConnectionLine* iLine = *(m_connectionList.end() - 1);
474  if(iLine->SetParentLine(cLine)) {
475  cLine->AddChild(iLine);
476  iLine->UpdatePoints();
477  m_mode = MODE_EDIT;
478  foundNode = true;
479  }
480  }
481  } else if(m_mode == MODE_SELECTION_RECT) {
482  if(cLine->Intersects(m_selectionRect)) {
483  cLine->SetSelected();
484  } else if(!event.ControlDown()) {
485  cLine->SetSelected(false);
486  }
487  } else if(!event.ControlDown()) {
488  if(!cLine->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
489  cLine->SetSelected(false);
490  }
491  }
492  }
493 
494  m_selectionRect = wxRect2DDouble(0, 0, 0, 0);
495 
496  if(m_mode == MODE_INSERT_LINE && !foundNode) {
497  ConnectionLine* cLine = *(m_connectionList.end() - 1);
498  // Free nodes
499  auto nodeList = cLine->GetNodeList();
500  for(auto itN = nodeList.begin(), itEndN = nodeList.end(); itN != itEndN; ++itN) {
501  Node* node = *itN;
502  node->SetConnected(false);
503  }
504  // Remove the associated child from parents.
505  auto parentList = cLine->GetParentList();
506  for(auto it = parentList.begin(), itEnd = parentList.end(); it != itEnd; ++it) {
507  Element* element = *it;
508  element->RemoveChild(cLine);
509  }
510  m_connectionList.pop_back();
511  if(cLine) delete cLine;
512  m_mode = MODE_EDIT;
513  } else if(m_mode != MODE_INSERT) {
514  m_mode = MODE_EDIT;
515  }
516 
517  Redraw();
518  event.Skip();
519 }
520 
521 void ControlEditor::OnMiddleDown(wxMouseEvent& event)
522 {
523  // Set to drag mode.
524  switch(m_mode) {
525  case MODE_INSERT: {
526  m_mode = MODE_DRAG_INSERT;
527  } break;
528  case MODE_PASTE: {
529  m_mode = MODE_DRAG_PASTE;
530  } break;
531  default: {
532  m_mode = MODE_DRAG;
533  } break;
534  }
535  m_camera->StartTranslation(m_camera->ScreenToWorld(event.GetPosition()));
536 }
537 
538 void ControlEditor::OnMiddleUp(wxMouseEvent& event)
539 {
540  switch(m_mode) {
541  case MODE_DRAG_INSERT: {
542  m_mode = MODE_INSERT;
543  } break;
544  case MODE_DRAG_PASTE: {
545  m_mode = MODE_PASTE;
546  } break;
547  case MODE_INSERT:
548  case MODE_PASTE: {
549  // Does nothing.
550  } break;
551  default: {
552  m_mode = MODE_EDIT;
553  } break;
554  }
555 }
556 
557 void ControlEditor::OnMouseMotion(wxMouseEvent& event)
558 {
559  wxPoint2DDouble clickPoint = event.GetPosition();
560  bool redraw = false;
561 
562  switch(m_mode) {
563  case MODE_INSERT: {
564  Element* newElement = *(m_elementList.end() - 1); // Get the last element in the list.
565  newElement->Move(m_camera->ScreenToWorld(clickPoint));
566  redraw = true;
567  } break;
568  case MODE_INSERT_LINE: {
569  ConnectionLine* line = *(m_connectionList.end() - 1);
570  line->SetTemporarySecondPoint(m_camera->ScreenToWorld(clickPoint));
571  line->UpdatePoints();
572  redraw = true;
573  } break;
574  case MODE_DRAG:
575  case MODE_DRAG_INSERT:
576  case MODE_DRAG_PASTE: {
577  m_camera->SetTranslation(clickPoint);
578  redraw = true;
579  } break;
580  case MODE_MOVE_ELEMENT: {
581  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; it++) {
582  Element* element = *it;
583  if(element->IsSelected()) {
584  element->Move(m_camera->ScreenToWorld(clickPoint));
585  auto childList = element->GetChildList();
586  for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; itC++) {
587  ConnectionLine* line = static_cast<ConnectionLine*>(*itC);
588  line->UpdatePoints();
589  }
590  redraw = true;
591  }
592  }
593  } break;
594  case MODE_MOVE_LINE: {
595  for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; it++) {
596  ConnectionLine* line = *it;
597  if(line->IsSelected()) {
598  line->Move(m_camera->ScreenToWorld(clickPoint));
599  redraw = true;
600  }
601  }
602  } break;
603  case MODE_SELECTION_RECT: {
604  wxPoint2DDouble currentPos = m_camera->ScreenToWorld(clickPoint);
605  double x, y, w, h;
606  if(currentPos.m_x < m_startSelRect.m_x) {
607  x = currentPos.m_x;
608  w = m_startSelRect.m_x - currentPos.m_x;
609  } else {
610  x = m_startSelRect.m_x;
611  w = currentPos.m_x - m_startSelRect.m_x;
612  }
613  if(currentPos.m_y < m_startSelRect.m_y) {
614  y = currentPos.m_y;
615  h = m_startSelRect.m_y - currentPos.m_y;
616  } else {
617  y = m_startSelRect.m_y;
618  h = currentPos.m_y - m_startSelRect.m_y;
619  }
620 
621  m_selectionRect = wxRect2DDouble(x, y, w, h);
622  redraw = true;
623  } break;
624  default:
625  break;
626  }
627 
628  if(redraw) Redraw();
629  event.Skip();
630 }
631 
632 void ControlEditor::OnScroll(wxMouseEvent& event)
633 {
634  if(event.GetWheelRotation() > 0)
635  m_camera->SetScale(event.GetPosition(), +0.05);
636  else
637  m_camera->SetScale(event.GetPosition(), -0.05);
638 
639  Redraw();
640 }
641 
642 void ControlEditor::OnIdle(wxIdleEvent& event)
643 {
644  if(m_justOpened) {
645  this->Raise();
646 
647  // Update all text elements
648  m_justOpened = false;
649  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
650  ControlElement* element = *it;
651  if(!element->UpdateText()) m_justOpened = true;
652  }
653  Redraw();
654  }
655 }
656 void ControlEditor::OnKeyDown(wxKeyEvent& event)
657 {
658  char key = event.GetUnicodeKey();
659  if(key != WXK_NONE) {
660  switch(key) {
661  case WXK_DELETE: // Delete selected elements.
662  {
663  DeleteSelectedElements();
664  } break;
665  case 'R': // Rotate the selected elements.
666  {
667  RotateSelectedElements(event.GetModifiers() != wxMOD_SHIFT);
668  } break;
669  case 'L': {
670  // tests
671  } break;
672  }
673  }
674 }
675 
676 void ControlEditor::RotateSelectedElements(bool clockwise)
677 {
678  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
679  Element* element = *it;
680  if(element->IsSelected()) {
681  element->Rotate(clockwise);
682  auto childList = element->GetChildList();
683  for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; itC++) {
684  ConnectionLine* line = static_cast<ConnectionLine*>(*itC);
685  line->UpdatePoints();
686  }
687  }
688  }
689  Redraw();
690 }
691 
692 void ControlEditor::DeleteSelectedElements()
693 {
694  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
695  Element* element = *it;
696  if(element->IsSelected()) {
697  // Remove child/parent.
698  auto childList = element->GetChildList();
699  for(auto itC = childList.begin(), itEnd = childList.end(); itC != itEnd; ++itC) {
700  // The child is always a connection line.
701  ConnectionLine* child = static_cast<ConnectionLine*>(*itC);
702  // Delete the connection line.
703  for(auto itCo = m_connectionList.begin(); itCo != m_connectionList.end(); ++itCo) {
704  ConnectionLine* line = *itCo;
705  if(line == child) {
706  itCo = DeleteLineFromList(itCo);
707  break;
708  }
709  }
710  }
711  m_elementList.erase(it--);
712  if(element) delete element;
713  }
714  }
715 
716  for(auto it = m_connectionList.begin(); it != m_connectionList.end(); ++it) {
717  ConnectionLine* line = *it;
718  if(line->IsSelected()) {
719  it = DeleteLineFromList(it);
720  }
721  }
722  Redraw();
723 }
724 
725 std::vector<ConnectionLine*>::iterator ControlEditor::DeleteLineFromList(std::vector<ConnectionLine*>::iterator& it)
726 {
727  ConnectionLine* cLine = *it;
728  auto childList = cLine->GetLineChildList();
729  for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; ++itC) {
730  ConnectionLine* child = *itC;
731  for(auto itL = m_connectionList.begin(); itL != m_connectionList.end(); ++itL) {
732  ConnectionLine* childOnList = *itL;
733  if(childOnList == child) {
734  itL = DeleteLineFromList(itL);
735  }
736  }
737  }
738  // Remove
739  auto parentList = cLine->GetParentList();
740  for(auto itP = parentList.begin(), itEnd = parentList.end(); itP != itEnd; ++itP) {
741  Element* parent = *itP;
742  if(parent) parent->RemoveChild(cLine);
743  }
744  if(cLine->GetParentLine()) cLine->GetParentLine()->RemoveChild(cLine);
745  // Free nodes
746  auto nodeList = cLine->GetNodeList();
747  for(auto itN = nodeList.begin(), itEndN = nodeList.end(); itN != itEndN; ++itN) {
748  Node* node = *itN;
749  node->SetConnected(false);
750  }
751  m_connectionList.erase(it--);
752  if(cLine) delete cLine;
753  return it;
754 }
755 
756 void ControlEditor::CheckConnections()
757 {
758  for(auto it = m_connectionList.begin(); it != m_connectionList.end(); ++it) {
759  ConnectionLine* cLine = *it;
760  if(cLine->GetType() == ConnectionLine::ELEMENT_ELEMENT) {
761  if(cLine->GetParentList().size() < 2) {
762  it = DeleteLineFromList(it);
763  }
764  }
765  }
766 }
767 
768 void ControlEditor::OnExportClick(wxCommandEvent& event)
769 {
770  FileHanding fileHandling(this);
771 
772  wxFileDialog saveFileDialog(this, _("Save CTL file"), "", "", "CTL files (*.ctl)|*.ctl",
773  wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
774  if(saveFileDialog.ShowModal() == wxID_CANCEL) return;
775 
776  fileHandling.SaveControl(saveFileDialog.GetPath());
777  wxFileName fileName(saveFileDialog.GetPath());
778  event.Skip();
779 }
780 
781 void ControlEditor::OnImportClick(wxCommandEvent& event)
782 {
783  wxFileDialog openFileDialog(this, _("Open CTL file"), "", "", "CTL files (*.ctl)|*.ctl",
784  wxFD_OPEN | wxFD_FILE_MUST_EXIST);
785  if(openFileDialog.ShowModal() == wxID_CANCEL) return;
786 
787  wxFileName fileName(openFileDialog.GetPath());
788 
789  FileHanding fileHandling(this);
790  if(!fileHandling.OpenControl(fileName, m_elementList, m_connectionList)) {
791  wxMessageDialog msgDialog(this, _("It was not possible to open the selected file."), _("Error"),
792  wxOK | wxCENTRE | wxICON_ERROR);
793  msgDialog.ShowModal();
794  }
795  Redraw();
796  event.Skip();
797 }
798 
799 void ControlEditor::OnTestClick(wxCommandEvent& event)
800 {
801  ControlSystemTest csTest(this, &m_inputType, &m_startTime, &m_slope, &m_timeStep, &m_simTime);
802  if(csTest.ShowModal() == wxID_OK) {
803  double printStep = 1e-3;
804  double pdbStep = 1e-1;
805 
806  wxProgressDialog pbd(_("Test"), _("Initializing..."), 100, this,
807  wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT | wxPD_SMOOTH);
808  ControlElementSolver solver(this, m_timeStep, 1e-5);
809  if(solver.IsOK()) {
810  bool simStopped = false;
811  double currentTime = 0.0;
812  double printTime = 0.0;
813  double pdbTime = 0.0;
814  std::vector<double> time;
815  std::vector<double> solution;
816  std::vector<double> inputV;
817  while(currentTime <= m_simTime) {
818  double input = 0.0;
819  if(currentTime >= m_startTime) {
820  switch(m_inputType) {
821  case 0: {
822  input = m_slope;
823  } break;
824  case 1: {
825  input = m_slope * (currentTime - m_startTime);
826  } break;
827  case 2: {
828  input = m_slope * std::pow(currentTime - m_startTime, 2);
829  } break;
830  default: {
831  input = 0.0;
832  break;
833  }
834  }
835  }
836 
837  // solver.SolveNextStep(input);
838  solver.SetInitialTerminalVoltage(input);
839  solver.SetActivePower(input);
840  solver.SetInitialMecPower(input);
841  solver.SetInitialVelocity(input);
842  solver.SetReactivePower(input);
843  solver.SetTerminalVoltage(input);
844  solver.SetVelocity(input);
845  solver.SolveNextStep();
846 
847  if(printTime >= printStep) {
848  time.push_back(currentTime);
849  solution.push_back(solver.GetLastSolution());
850  inputV.push_back(input);
851  printTime = 0.0;
852  }
853 
854  if(pdbTime > pdbStep) {
855  if(!pbd.Update((currentTime / m_simTime) * 100, wxString::Format("Time = %.2fs", currentTime))) {
856  pbd.Update(100);
857  simStopped = true;
858  currentTime = m_simTime;
859  }
860  pdbTime = 0.0;
861  }
862 
863  printTime += m_timeStep;
864  currentTime += m_timeStep;
865  pdbTime += m_timeStep;
866  }
867  if(!simStopped) {
868  std::vector<ElementPlotData> epdList;
869  ElementPlotData curveData(_("I/O"), ElementPlotData::CT_TEST);
870  curveData.AddData(inputV, _("Input"));
871  curveData.AddData(solution, _("Output"));
872 
873  curveData.SetPlot(0);
874  curveData.SetColour(0, *wxRED);
875  curveData.SetPlot(1);
876  curveData.SetColour(1, *wxBLUE);
877 
878  epdList.push_back(curveData);
879 
880  ChartView* cView = new ChartView(this, epdList, time);
881  cView->Show();
882  cView->UpdatePlot();
883  }
884  } else {
885  wxMessageDialog msgDialog(this, _("It was not possible to solve the control system"), _("Error"),
886  wxOK | wxCENTRE | wxICON_ERROR);
887  msgDialog.ShowModal();
888  }
889  }
890 }
891 
892 void ControlEditor::OnClose(wxCloseEvent& event)
893 {
894  if(m_ctrlContainer) {
895  m_ctrlContainer->FillContainer(this);
896  }
897  event.Skip();
898 }
899 
900 int ControlEditor::GetNextID()
901 {
902  int id = 0;
903  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
904  ControlElement* element = *it;
905  if(element->GetID() > id) id = element->GetID();
906  }
907  for(auto it = m_connectionList.begin(), itEnd = m_connectionList.end(); it != itEnd; ++it) {
908  ConnectionLine* line = *it;
909  if(line->GetID() > id) id = line->GetID();
910  }
911  id++;
912  return id;
913 }
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Element.cpp:123
-
Multiplies two inputs.
Definition: Multiplier.h:32
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
void SetSelected(bool selected=true)
Set element selection.
Definition: Element.h:146
-
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
-
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
-
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
-
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
-
virtual std::vector< Element * > GetChildList() const
Get the Child list.
Definition: Element.h:511
-
Node of a control element. This class manages the user interaction with the connection and control el...
- -
Save and opens the projects created on disk.
Definition: FileHanding.h:43
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
-
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
- -
virtual void RemoveChild(Element *child)
Remove a child from the list.
Definition: Element.cpp:354
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
-
virtual bool Intersects(wxRect2DDouble rect) const =0
Check if the element&#39;s rect intersects other rect.
-
Class responsible for the correct visualization of the elements on screen.
Definition: Camera.h:30
- -
This class is responsible to handle the user interaction with control elements.
Definition: ControlEditor.h:76
-
Provides the communication with the power element.
Definition: IOControl.h:35
- - -
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Element.h:240
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Element.h:302
- -
Control element that divides two inputs.
Definition: Divider.h:32
- -
Generates an output following an exponential function.
Definition: Exponential.h:32
- - -
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Element.h:307
-
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
- -
This class is responsible to manage the charts generated in the transient electromechanical studies...
Definition: ChartView.h:40
-
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Element.h:534
- -
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
-
Connection between two control elements or other connection line and an element.
- -
Calculates the time response by a frequency domain transfer function.
- -
bool IsSelected() const
Checks if the element is selected.
Definition: Element.h:202
- -
Base class of a control element. Provide general methods to other control classes.
- - -
virtual int GetID() const
Get the element ID.
Definition: Element.h:272
-
virtual bool Contains(wxPoint2DDouble position) const =0
Checks if the element contains a position.
- - - -
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
-
A control element that provides a constant value.
Definition: Constant.h:35
- -
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
-
Form to edit properties to test the control system created.
-
-
- - - - diff --git a/docs/doxygen/html/_control_editor_8h.html b/docs/doxygen/html/_control_editor_8h.html index 4332121..6c96c62 100644 --- a/docs/doxygen/html/_control_editor_8h.html +++ b/docs/doxygen/html/_control_editor_8h.html @@ -91,7 +91,7 @@ $(document).ready(function(){initNavTree('_control_editor_8h.html','');});
ControlEditor.h File Reference
-
#include "ControlEditorBase.h"
+
#include "base/ControlEditorBase.h"
#include <wx/wrapsizer.h>
#include <wx/dcclient.h>
#include <wx/dcscreen.h>
@@ -99,11 +99,9 @@ $(document).ready(function(){initNavTree('_control_editor_8h.html','');}); #include <GL/gl.h>
#include <GL/glu.h>
#include <wx/progdlg.h>
-#include "IOControl.h"
-#include "ControlSystemTest.h"
-
-

Go to the source code of this file.

- +#include "IOControl.h"
+#include "ControlSystemTest.h"
+
diff --git a/docs/doxygen/html/_control_editor_8h_source.html b/docs/doxygen/html/_control_editor_8h_source.html deleted file mode 100644 index d984ce9..0000000 --- a/docs/doxygen/html/_control_editor_8h_source.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - -Project/ControlEditor.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ControlElementButton
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlEditor.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CONTROLEDITOR_H
19 #define CONTROLEDITOR_H
20 
21 #include "ControlEditorBase.h"
22 #include <wx/wrapsizer.h>
23 #include <wx/dcclient.h>
24 #include <wx/dcscreen.h>
25 #include <wx/graphics.h>
26 #include <GL/gl.h>
27 #include <GL/glu.h>
28 
29 #include <wx/progdlg.h>
30 
31 #include "IOControl.h"
32 #include "ControlSystemTest.h"
33 
34 class FileHanding;
35 class Camera;
36 class Element;
37 class ControlElement;
38 class TransferFunction;
39 class ConnectionLine;
40 class Sum;
41 class Multiplier;
42 class Limiter;
43 class RateLimiter;
44 class Exponential;
45 class Constant;
46 class Gain;
47 class MathOperation;
48 class Divider;
49 
52 
53 class ChartView;
54 class ElementDataObject;
55 
56 enum ControlElementButtonID {
57  ID_IO = 0,
58  ID_TF,
59  ID_SUM,
60  ID_CONST,
61  ID_LIMITER,
62  ID_GAIN,
63  ID_MULT,
64  ID_EXP,
65  ID_RATELIM,
66  ID_MATH_DIV
67 };
68 
76 class ControlElementButton : public wxWindow
77 {
78  public:
79  ControlElementButton(wxWindow* parent, wxString label, wxImage image, wxWindowID id = wxID_ANY);
81 
82  protected:
83  virtual void OnPaint(wxPaintEvent& event);
84  virtual void OnMouseEnter(wxMouseEvent& event);
85  virtual void OnMouseLeave(wxMouseEvent& event);
86  virtual void OnLeftClickDown(wxMouseEvent& event);
87  virtual void OnLeftClickUp(wxMouseEvent& event);
88 
89  wxString m_label;
90  wxFont m_font;
91  wxPoint m_labelPosition;
92 
93  wxImage m_image;
94  wxSize m_imageSize;
95  wxPoint m_imagePosition;
96 
97  int m_borderSize = 2;
98  bool m_mouseAbove = false;
99  bool m_selected = false;
100 
101  wxSize m_buttonSize;
102 };
103 
105 {
106  public:
107  enum ControlEditorMode {
108  MODE_EDIT = 0,
109  MODE_MOVE_ELEMENT,
110  MODE_MOVE_LINE,
111  MODE_DRAG,
112  MODE_DRAG_INSERT,
113  MODE_INSERT,
114  MODE_INSERT_LINE,
115  MODE_SELECTION_RECT,
116  MODE_PASTE,
117  MODE_DRAG_PASTE
118  };
119 
120  ControlEditor(wxWindow* parent,
121  int ioflags = IOControl::IN_TERMINAL_VOLTAGE | IOControl::IN_VELOCITY | IOControl::OUT_FIELD_VOLTAGE |
122  IOControl::OUT_MEC_POWER);
123  virtual ~ControlEditor();
124 
125  virtual void AddElement(ControlElementButtonID id);
126  virtual void Redraw() { m_glCanvas->Refresh(); }
127  virtual void SetJustOpened(bool justOpened) { m_justOpened = justOpened; }
128  virtual void RotateSelectedElements(bool clockwise);
129  virtual void DeleteSelectedElements();
130  virtual void CheckConnections();
131  virtual std::vector<ConnectionLine*> GetConnectionLineList() const { return m_connectionList; }
132  virtual std::vector<ControlElement*> GetControlElementList() const { return m_elementList; }
133  virtual void SetElementsList(std::vector<ControlElement*> elementList) { m_elementList = elementList; }
134  virtual void SetConnectionsList(std::vector<ConnectionLine*> connectionList) { m_connectionList = connectionList; }
135  virtual void SetControlContainer(ControlElementContainer* ctrlContainer) { m_ctrlContainer = ctrlContainer; }
136  protected:
137  virtual void OnClose(wxCloseEvent& event);
138  virtual void OnTestClick(wxCommandEvent& event);
139  virtual void OnButtonOKClick(wxCommandEvent& event) { Close(); }
140  virtual void OnImportClick(wxCommandEvent& event);
141  virtual void OnExportClick(wxCommandEvent& event);
142  virtual void OnKeyDown(wxKeyEvent& event);
143  virtual void OnIdle(wxIdleEvent& event);
144  virtual void OnScroll(wxMouseEvent& event);
145  virtual void OnDoubleClick(wxMouseEvent& event);
146  virtual void OnLeftClickDown(wxMouseEvent& event);
147  virtual void OnLeftClickUp(wxMouseEvent& event);
148  virtual void OnMiddleDown(wxMouseEvent& event);
149  virtual void OnMiddleUp(wxMouseEvent& event);
150  virtual void OnMouseMotion(wxMouseEvent& event);
151  virtual void OnPaint(wxPaintEvent& event);
152  virtual void LeftClickDown(wxMouseEvent& event);
153 
154  void BuildControlElementPanel();
155  void SetViewport();
156  int GetNextID();
157 
158  std::vector<ConnectionLine*>::iterator DeleteLineFromList(std::vector<ConnectionLine*>::iterator& it);
159 
160  wxGLContext* m_glContext = NULL;
161  Camera* m_camera = NULL;
162 
163  ControlEditorMode m_mode = MODE_EDIT;
164 
165  wxRect2DDouble m_selectionRect;
166  wxPoint2DDouble m_startSelRect;
167 
168  std::vector<ControlElement*> m_elementList;
169  std::vector<ConnectionLine*> m_connectionList;
170 
171  ControlElementContainer* m_ctrlContainer = NULL;
172 
173  bool m_justOpened = false;
174  int m_ioFlags;
175 
176  int m_inputType = 0;
177  double m_startTime = 1.0;
178  double m_slope = 1.0;
179  double m_timeStep = 1e-4;
180  double m_simTime = 10.0;
181 };
182 #endif // CONTROLEDITOR_H
Multiplies two inputs.
Definition: Multiplier.h:32
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
-
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
-
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
- -
Save and opens the projects created on disk.
Definition: FileHanding.h:43
-
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
-
Class responsible for the correct visualization of the elements on screen.
Definition: Camera.h:30
-
This class is responsible to handle the user interaction with control elements.
Definition: ControlEditor.h:76
- -
Control element that divides two inputs.
Definition: Divider.h:32
-
Generates an output following an exponential function.
Definition: Exponential.h:32
-
Abstract class that define the general behavior of math operation control block.
Definition: MathOperation.h:32
-
Class to store the elements in the clipboard.
-
This class is responsible to manage the charts generated in the transient electromechanical studies...
Definition: ChartView.h:40
-
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
-
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
-
Connection between two control elements or other connection line and an element.
-
Calculates the time response by a frequency domain transfer function.
- - - -
A control element that provides a constant value.
Definition: Constant.h:35
-
-
- - - - diff --git a/docs/doxygen/html/_control_editor_base_8cpp_source.html b/docs/doxygen/html/_control_editor_base_8cpp_source.html deleted file mode 100644 index c08213c..0000000 --- a/docs/doxygen/html/_control_editor_base_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/ControlEditorBase.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlEditorBase.cpp
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: ControlEditor.wxcp
4 // Do not modify this file by hand!
6 
7 #include "ControlEditorBase.h"
8 
9 
10 // Declare the bitmap loading function
11 extern void wxC870InitBitmapResources();
12 
13 static bool bBitmapLoaded = false;
14 
15 
16 ControlEditorBase::ControlEditorBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
17  : wxFrame(parent, id, title, pos, size, style)
18 {
19  if ( !bBitmapLoaded ) {
20  // We need to initialise the default bitmap handler
21  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
22  wxC870InitBitmapResources();
23  bBitmapLoaded = true;
24  }
25  // Set icon(s) to the application/dialog
26  wxIconBundle app_icons;
27  {
28  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor16"));
29  wxIcon icn;
30  icn.CopyFromBitmap(iconBmp);
31  app_icons.AddIcon( icn );
32  }
33  {
34  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor32"));
35  wxIcon icn;
36  icn.CopyFromBitmap(iconBmp);
37  app_icons.AddIcon( icn );
38  }
39  {
40  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor64"));
41  wxIcon icn;
42  icn.CopyFromBitmap(iconBmp);
43  app_icons.AddIcon( icn );
44  }
45  {
46  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor128"));
47  wxIcon icn;
48  icn.CopyFromBitmap(iconBmp);
49  app_icons.AddIcon( icn );
50  }
51  {
52  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("ctrlEditor256"));
53  wxIcon icn;
54  icn.CopyFromBitmap(iconBmp);
55  app_icons.AddIcon( icn );
56  }
57  SetIcons( app_icons );
58 
59 
60  m_toolbarMain = this->CreateToolBar(wxTB_TEXT|wxTB_FLAT, wxID_ANY);
61  m_toolbarMain->SetToolBitmapSize(wxSize(32,32));
62 
63  m_toolbarMain->AddTool(wxID_ANY, _("New"), wxXmlResource::Get()->LoadBitmap(wxT("new32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
64 
65  m_toolbarMain->AddTool(ID_RIBBON_IMPORT, _("Import"), wxXmlResource::Get()->LoadBitmap(wxT("imp32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
66 
67  m_toolbarMain->AddTool(ID_RIBBON_EXPORT, _("Export"), wxXmlResource::Get()->LoadBitmap(wxT("exp32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
68 
69  m_toolbarMain->AddSeparator();
70 
71  m_toolbarMain->AddTool(wxID_ANY, _("Copy"), wxXmlResource::Get()->LoadBitmap(wxT("copy32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
72 
73  m_toolbarMain->AddTool(wxID_ANY, _("Paste"), wxXmlResource::Get()->LoadBitmap(wxT("paste32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
74 
75  m_toolbarMain->AddTool(wxID_ANY, _("Undo"), wxXmlResource::Get()->LoadBitmap(wxT("undo32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
76 
77  m_toolbarMain->AddTool(wxID_ANY, _("Redo"), wxXmlResource::Get()->LoadBitmap(wxT("redo32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
78 
79  m_toolbarMain->AddSeparator();
80 
81  m_toolbarMain->AddTool(wxID_ANY, _("Drag"), wxXmlResource::Get()->LoadBitmap(wxT("drag32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
82 
83  m_toolbarMain->AddTool(wxID_ANY, _("Move"), wxXmlResource::Get()->LoadBitmap(wxT("move32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
84 
85  m_toolbarMain->AddTool(wxID_ANY, _("Delete"), wxXmlResource::Get()->LoadBitmap(wxT("delete32")), wxNullBitmap, wxITEM_NORMAL, wxT(""), wxT(""), NULL);
86  m_toolbarMain->Realize();
87 
88  m_auimgr = new wxAuiManager;
89  m_auimgr->SetManagedWindow( this );
90  m_auimgr->SetFlags( wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_TRANSPARENT_HINT|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING);
91  m_auimgr->GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
92 
93  m_panelControlElements = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL);
94  m_panelControlElements->SetBackgroundColour(wxColour(wxT("rgb(255,255,255)")));
95 
96  m_auimgr->AddPane(m_panelControlElements, wxAuiPaneInfo().Name(wxT("m_controlElementsPanel")).Caption(_("Control elements")).Direction(wxAUI_DOCK_LEFT).Layer(0).Row(0).Position(0).BestSize(200,200).MinSize(10,10).MaxSize(200,200).CaptionVisible(true).MaximizeButton(false).CloseButton(false).MinimizeButton(true).PinButton(true));
97 
98  m_panelWorkspace = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL);
99 
100  m_auimgr->AddPane(m_panelWorkspace, wxAuiPaneInfo().Direction(wxAUI_DOCK_CENTER).Layer(0).Row(0).Position(0).BestSize(100,100).MinSize(100,100).MaxSize(100,100).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
101 
102  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
103  m_panelWorkspace->SetSizer(boxSizerLvl2_1);
104 
105  int *m_glCanvasAttr = new int[ 5 ];
106  m_glCanvasAttr[0] = WX_GL_SAMPLE_BUFFERS;
107  m_glCanvasAttr[1] = 1;
108  m_glCanvasAttr[2] = WX_GL_SAMPLES;
109  m_glCanvasAttr[3] = 4;
110  m_glCanvasAttr[4] = 0;
111  m_glCanvas = new wxGLCanvas(m_panelWorkspace, wxID_ANY, m_glCanvasAttr, wxDefaultPosition, wxDLG_UNIT(m_panelWorkspace, wxSize(-1,-1)), 0);
112  wxDELETEA( m_glCanvasAttr );
113 
114  boxSizerLvl2_1->Add(m_glCanvas, 1, wxEXPAND, WXC_FROM_DIP(5));
115 
116  m_panelButtons = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxTAB_TRAVERSAL);
117 
118  m_auimgr->AddPane(m_panelButtons, wxAuiPaneInfo().Direction(wxAUI_DOCK_BOTTOM).Layer(0).Row(0).Position(0).BestSize(100,-1).MinSize(100,-1).MaxSize(100,-1).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
119  m_auimgr->Update();
120 
121  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
122  m_panelButtons->SetSizer(boxSizerBottomButtons);
123 
124  m_buttonTest = new wxButton(m_panelButtons, wxID_ANY, _("Test system..."), wxDefaultPosition, wxDLG_UNIT(m_panelButtons, wxSize(-1,-1)), 0);
125 
126  boxSizerBottomButtons->Add(m_buttonTest, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
127 
128  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
129 
130  m_buttonOK = new wxButton(m_panelButtons, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(m_panelButtons, wxSize(-1,-1)), 0);
131 
132  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
133 
134  SetName(wxT("ControlEditorBase"));
135  SetSize(800,600);
136  if (GetSizer()) {
137  GetSizer()->Fit(this);
138  }
139  if(GetParent()) {
140  CentreOnParent(wxBOTH);
141  } else {
142  CentreOnScreen(wxBOTH);
143  }
144 #if wxVERSION_NUMBER >= 2900
145  if(!wxPersistenceManager::Get().Find(this)) {
146  wxPersistenceManager::Get().RegisterAndRestore(this);
147  } else {
148  wxPersistenceManager::Get().Restore(this);
149  }
150 #endif
151  // Connect events
152  this->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this);
153  this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(ControlEditorBase::OnClose), NULL, this);
154  this->Connect(ID_RIBBON_IMPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnImportClick), NULL, this);
155  this->Connect(ID_RIBBON_EXPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnExportClick), NULL, this);
156  m_glCanvas->Connect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this);
157  m_glCanvas->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(ControlEditorBase::OnLeftClickDown), NULL, this);
158  m_glCanvas->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(ControlEditorBase::OnLeftClickUp), NULL, this);
159  m_glCanvas->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(ControlEditorBase::OnDoubleClick), NULL, this);
160  m_glCanvas->Connect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(ControlEditorBase::OnMiddleDown), NULL, this);
161  m_glCanvas->Connect(wxEVT_MIDDLE_UP, wxMouseEventHandler(ControlEditorBase::OnMiddleUp), NULL, this);
162  m_glCanvas->Connect(wxEVT_MOTION, wxMouseEventHandler(ControlEditorBase::OnMouseMotion), NULL, this);
163  m_glCanvas->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(ControlEditorBase::OnScroll), NULL, this);
164  m_glCanvas->Connect(wxEVT_IDLE, wxIdleEventHandler(ControlEditorBase::OnIdle), NULL, this);
165  m_glCanvas->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this);
166  m_buttonTest->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlEditorBase::OnTestClick), NULL, this);
167  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlEditorBase::OnButtonOKClick), NULL, this);
168 
169 }
170 
171 ControlEditorBase::~ControlEditorBase()
172 {
173  this->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this);
174  this->Disconnect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(ControlEditorBase::OnClose), NULL, this);
175  this->Disconnect(ID_RIBBON_IMPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnImportClick), NULL, this);
176  this->Disconnect(ID_RIBBON_EXPORT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(ControlEditorBase::OnExportClick), NULL, this);
177  m_glCanvas->Disconnect(wxEVT_PAINT, wxPaintEventHandler(ControlEditorBase::OnPaint), NULL, this);
178  m_glCanvas->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(ControlEditorBase::OnLeftClickDown), NULL, this);
179  m_glCanvas->Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(ControlEditorBase::OnLeftClickUp), NULL, this);
180  m_glCanvas->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(ControlEditorBase::OnDoubleClick), NULL, this);
181  m_glCanvas->Disconnect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(ControlEditorBase::OnMiddleDown), NULL, this);
182  m_glCanvas->Disconnect(wxEVT_MIDDLE_UP, wxMouseEventHandler(ControlEditorBase::OnMiddleUp), NULL, this);
183  m_glCanvas->Disconnect(wxEVT_MOTION, wxMouseEventHandler(ControlEditorBase::OnMouseMotion), NULL, this);
184  m_glCanvas->Disconnect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(ControlEditorBase::OnScroll), NULL, this);
185  m_glCanvas->Disconnect(wxEVT_IDLE, wxIdleEventHandler(ControlEditorBase::OnIdle), NULL, this);
186  m_glCanvas->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(ControlEditorBase::OnKeyDown), NULL, this);
187  m_buttonTest->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlEditorBase::OnTestClick), NULL, this);
188  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlEditorBase::OnButtonOKClick), NULL, this);
189 
190  m_auimgr->UnInit();
191  delete m_auimgr;
192 
193 }
194 
195 ControlSystemTestBase::ControlSystemTestBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
196  : wxDialog(parent, id, title, pos, size, style)
197 {
198  if ( !bBitmapLoaded ) {
199  // We need to initialise the default bitmap handler
200  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
201  wxC870InitBitmapResources();
202  bBitmapLoaded = true;
203  }
204 
205  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
206  this->SetSizer(boxSizerLvl1_1);
207 
208  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
209  m_notebook->SetName(wxT("m_notebook"));
210 
211  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
212 
213  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
214  m_notebook->AddPage(m_panelGeneral, _("General"), false);
215 
216  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
217  m_panelGeneral->SetSizer(boxSizerLvl2_1);
218 
219  m_staticTextInput = new wxStaticText(m_panelGeneral, wxID_ANY, _("Input type:"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
220 
221  boxSizerLvl2_1->Add(m_staticTextInput, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
222 
223  wxArrayString m_choiceInputArr;
224  m_choiceInputArr.Add(wxT("Step"));
225  m_choiceInputArr.Add(wxT("Ramp"));
226  m_choiceInputArr.Add(wxT("Quadratic"));
227  m_choiceInput = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceInputArr, 0);
228  m_choiceInput->SetSelection(0);
229 
230  boxSizerLvl2_1->Add(m_choiceInput, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
231 
232  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
233 
234  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
235 
236  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
237 
238  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
239 
240  m_staticTextStartTime = new wxStaticText(m_panelGeneral, wxID_ANY, _("Start time"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
241 
242  boxSizerLvl4_1->Add(m_staticTextStartTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
243 
244  wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
245 
246  boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
247 
248  m_textCtrlStartTime = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("1,0"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
249  #if wxVERSION_NUMBER >= 3000
250  m_textCtrlStartTime->SetHint(wxT(""));
251  #endif
252 
253  boxSizerLvl5_1->Add(m_textCtrlStartTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
254 
255  m_staticTextSec_1 = new wxStaticText(m_panelGeneral, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
256 
257  boxSizerLvl5_1->Add(m_staticTextSec_1, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_BOTTOM, WXC_FROM_DIP(5));
258 
259  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
260 
261  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
262 
263  m_staticTextSlope = new wxStaticText(m_panelGeneral, wxID_ANY, _("Slope"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
264 
265  boxSizerLvl4_2->Add(m_staticTextSlope, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
266 
267  m_textCtrlSlope = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("1,0"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
268  #if wxVERSION_NUMBER >= 3000
269  m_textCtrlSlope->SetHint(wxT(""));
270  #endif
271 
272  boxSizerLvl4_2->Add(m_textCtrlSlope, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
273 
274  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
275 
276  gridSizerLvl3_1->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
277 
278  m_staticTextStep = new wxStaticText(m_panelGeneral, wxID_ANY, _("Time step"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
279 
280  boxSizerLvl4_3->Add(m_staticTextStep, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
281 
282  m_textCtrlTimeStep = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("0,0001"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
283  #if wxVERSION_NUMBER >= 3000
284  m_textCtrlTimeStep->SetHint(wxT(""));
285  #endif
286 
287  boxSizerLvl4_3->Add(m_textCtrlTimeStep, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
288 
289  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
290 
291  gridSizerLvl3_1->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5));
292 
293  m_staticTextSimTime = new wxStaticText(m_panelGeneral, wxID_ANY, _("Simulation time"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
294 
295  boxSizerLvl4_4->Add(m_staticTextSimTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
296 
297  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
298 
299  boxSizerLvl4_4->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
300 
301  m_textCtrlSimTime = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("10,0"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
302  #if wxVERSION_NUMBER >= 3000
303  m_textCtrlSimTime->SetHint(wxT(""));
304  #endif
305 
306  boxSizerLvl5_2->Add(m_textCtrlSimTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
307 
308  m_staticTextSec_2 = new wxStaticText(m_panelGeneral, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
309 
310  boxSizerLvl5_2->Add(m_staticTextSec_2, 0, wxRIGHT|wxTOP|wxBOTTOM|wxALIGN_BOTTOM, WXC_FROM_DIP(5));
311 
312  wxBoxSizer* boxSizerBotomButtons = new wxBoxSizer(wxHORIZONTAL);
313 
314  boxSizerLvl1_1->Add(boxSizerBotomButtons, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
315 
316  m_buttonRun = new wxButton(this, wxID_ANY, _("Run"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
317 
318  boxSizerBotomButtons->Add(m_buttonRun, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
319 
320  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
321 
322  boxSizerBotomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
323 
324 
325  #if wxVERSION_NUMBER >= 2900
326  if(!wxPersistenceManager::Get().Find(m_notebook)){
327  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
328  } else {
329  wxPersistenceManager::Get().Restore(m_notebook);
330  }
331  #endif
332 
333  SetName(wxT("ControlSystemTestBase"));
334  SetSize(-1,-1);
335  if (GetSizer()) {
336  GetSizer()->Fit(this);
337  }
338  if(GetParent()) {
339  CentreOnParent(wxBOTH);
340  } else {
341  CentreOnScreen(wxBOTH);
342  }
343 #if wxVERSION_NUMBER >= 2900
344  if(!wxPersistenceManager::Get().Find(this)) {
345  wxPersistenceManager::Get().RegisterAndRestore(this);
346  } else {
347  wxPersistenceManager::Get().Restore(this);
348  }
349 #endif
350  // Connect events
351  m_buttonRun->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlSystemTestBase::OnRunButtonClick), NULL, this);
352  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlSystemTestBase::OnCancelButtonClick), NULL, this);
353 
354 }
355 
356 ControlSystemTestBase::~ControlSystemTestBase()
357 {
358  m_buttonRun->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlSystemTestBase::OnRunButtonClick), NULL, this);
359  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ControlSystemTestBase::OnCancelButtonClick), NULL, this);
360 
361 }
-
- - - - diff --git a/docs/doxygen/html/_control_editor_base_8h_source.html b/docs/doxygen/html/_control_editor_base_8h_source.html deleted file mode 100644 index 83db883..0000000 --- a/docs/doxygen/html/_control_editor_base_8h_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - -Project/ControlEditorBase.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlEditorBase.h
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: ControlEditor.wxcp
4 // Do not modify this file by hand!
6 
7 #ifndef _PSP_PROJECT_CONTROLEDITOR_BASE_CLASSES_H
8 #define _PSP_PROJECT_CONTROLEDITOR_BASE_CLASSES_H
9 
10 #include <wx/settings.h>
11 #include <wx/xrc/xmlres.h>
12 #include <wx/xrc/xh_bmp.h>
13 #include <wx/frame.h>
14 #include <wx/iconbndl.h>
15 #include <wx/artprov.h>
16 #include <wx/sizer.h>
17 #include <wx/toolbar.h>
18 #include <wx/aui/framemanager.h>
19 #include <wx/aui/dockart.h>
20 #include <wx/panel.h>
21 #include <wx/glcanvas.h>
22 #include <wx/button.h>
23 #include <wx/dialog.h>
24 #include <wx/notebook.h>
25 #include <wx/imaglist.h>
26 #include <wx/stattext.h>
27 #include <wx/choice.h>
28 #include <wx/arrstr.h>
29 #include <wx/textctrl.h>
30 #if wxVERSION_NUMBER >= 2900
31 #include <wx/persist.h>
32 #include <wx/persist/toplevel.h>
33 #include <wx/persist/bookctrl.h>
34 #include <wx/persist/treebook.h>
35 #endif
36 
37 #ifdef WXC_FROM_DIP
38 #undef WXC_FROM_DIP
39 #endif
40 #if wxVERSION_NUMBER >= 3100
41 #define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
42 #else
43 #define WXC_FROM_DIP(x) x
44 #endif
45 
46 
47 class ControlEditorBase : public wxFrame
48 {
49 public:
50  enum {
51  ID_RIBBON_EXPORT = 10001,
52  ID_RIBBON_IMPORT = 10002,
53  };
54 protected:
55  wxToolBar* m_toolbarMain;
56  wxAuiManager* m_auimgr;
57  wxPanel* m_panelControlElements;
58  wxPanel* m_panelWorkspace;
59  wxGLCanvas* m_glCanvas;
60  wxPanel* m_panelButtons;
61  wxButton* m_buttonTest;
62  wxButton* m_buttonOK;
63 
64 protected:
65  virtual void OnKeyDown(wxKeyEvent& event) { event.Skip(); }
66  virtual void OnClose(wxCloseEvent& event) { event.Skip(); }
67  virtual void OnImportClick(wxCommandEvent& event) { event.Skip(); }
68  virtual void OnExportClick(wxCommandEvent& event) { event.Skip(); }
69  virtual void OnPaint(wxPaintEvent& event) { event.Skip(); }
70  virtual void OnLeftClickDown(wxMouseEvent& event) { event.Skip(); }
71  virtual void OnLeftClickUp(wxMouseEvent& event) { event.Skip(); }
72  virtual void OnDoubleClick(wxMouseEvent& event) { event.Skip(); }
73  virtual void OnMiddleDown(wxMouseEvent& event) { event.Skip(); }
74  virtual void OnMiddleUp(wxMouseEvent& event) { event.Skip(); }
75  virtual void OnMouseMotion(wxMouseEvent& event) { event.Skip(); }
76  virtual void OnScroll(wxMouseEvent& event) { event.Skip(); }
77  virtual void OnIdle(wxIdleEvent& event) { event.Skip(); }
78  virtual void OnTestClick(wxCommandEvent& event) { event.Skip(); }
79  virtual void OnButtonOKClick(wxCommandEvent& event) { event.Skip(); }
80 
81 public:
82  wxToolBar* GetToolbarMain() { return m_toolbarMain; }
83  wxPanel* GetPanelControlElements() { return m_panelControlElements; }
84  wxGLCanvas* GetGlCanvas() { return m_glCanvas; }
85  wxPanel* GetPanelWorkspace() { return m_panelWorkspace; }
86  wxButton* GetButtonTest() { return m_buttonTest; }
87  wxButton* GetButtonOK() { return m_buttonOK; }
88  wxPanel* GetPanelButtons() { return m_panelButtons; }
89  wxAuiManager* GetAuimgr() { return m_auimgr; }
90  ControlEditorBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Control editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(800,600), long style = wxDEFAULT_FRAME_STYLE);
91  virtual ~ControlEditorBase();
92 };
93 
94 
95 class ControlSystemTestBase : public wxDialog
96 {
97 protected:
98  wxNotebook* m_notebook;
99  wxPanel* m_panelGeneral;
100  wxStaticText* m_staticTextInput;
101  wxChoice* m_choiceInput;
102  wxStaticText* m_staticTextStartTime;
103  wxTextCtrl* m_textCtrlStartTime;
104  wxStaticText* m_staticTextSec_1;
105  wxStaticText* m_staticTextSlope;
106  wxTextCtrl* m_textCtrlSlope;
107  wxStaticText* m_staticTextStep;
108  wxTextCtrl* m_textCtrlTimeStep;
109  wxStaticText* m_staticTextSimTime;
110  wxTextCtrl* m_textCtrlSimTime;
111  wxStaticText* m_staticTextSec_2;
112  wxButton* m_buttonRun;
113  wxButton* m_buttonCancel;
114 
115 protected:
116  virtual void OnRunButtonClick(wxCommandEvent& event) { event.Skip(); }
117  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
118 
119 public:
120  wxStaticText* GetStaticTextInput() { return m_staticTextInput; }
121  wxChoice* GetChoiceInput() { return m_choiceInput; }
122  wxStaticText* GetStaticTextStartTime() { return m_staticTextStartTime; }
123  wxTextCtrl* GetTextCtrlStartTime() { return m_textCtrlStartTime; }
124  wxStaticText* GetStaticTextSec_1() { return m_staticTextSec_1; }
125  wxStaticText* GetStaticTextSlope() { return m_staticTextSlope; }
126  wxTextCtrl* GetTextCtrlSlope() { return m_textCtrlSlope; }
127  wxStaticText* GetStaticTextStep() { return m_staticTextStep; }
128  wxTextCtrl* GetTextCtrlTimeStep() { return m_textCtrlTimeStep; }
129  wxStaticText* GetStaticTextSimTime() { return m_staticTextSimTime; }
130  wxTextCtrl* GetTextCtrlSimTime() { return m_textCtrlSimTime; }
131  wxStaticText* GetStaticTextSec_2() { return m_staticTextSec_2; }
132  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
133  wxNotebook* GetNotebook() { return m_notebook; }
134  wxButton* GetButtonRun() { return m_buttonRun; }
135  wxButton* GetButtonCancel() { return m_buttonCancel; }
136  ControlSystemTestBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Control system test"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
137  virtual ~ControlSystemTestBase();
138 };
139 
140 #endif
- -
-
- - - - diff --git a/docs/doxygen/html/_control_editor_bitmaps_8cpp_source.html b/docs/doxygen/html/_control_editor_bitmaps_8cpp_source.html deleted file mode 100644 index 0b443a1..0000000 --- a/docs/doxygen/html/_control_editor_bitmaps_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/ControlEditorBitmaps.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlEditorBitmaps.cpp
-
-
-
1 //
2 // This file was automatically generated by wxrc, do not edit by hand.
3 //
4 
5 #include <wx/wxprec.h>
6 
7 #ifdef __BORLANDC__
8  #pragma hdrstop
9 #endif
10 
11 #include <wx/filesys.h>
12 #include <wx/fs_mem.h>
13 #include <wx/xrc/xmlres.h>
14 #include <wx/xrc/xh_all.h>
15 
16 #if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
17  #define XRC_ADD_FILE(name, data, size, mime) \
18  wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
19 #else
20  #define XRC_ADD_FILE(name, data, size, mime) \
21  wxMemoryFSHandler::AddFile(name, data, size)
22 #endif
23 
24 static size_t xml_res_size_0 = 745;
25 static unsigned char xml_res_file_0[] = {
26 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
27 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
28 72,89,115,0,0,5,74,0,0,5,74,1,26,195,117,109,0,0,0,25,116,69,88,116,83,
29 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
30 46,111,114,103,155,238,60,26,0,0,2,102,73,68,65,84,88,133,197,150,75,72,
31 84,97,20,199,127,103,102,156,33,74,90,132,74,11,117,81,11,55,209,46,40,
32 92,70,16,173,130,137,220,4,81,164,102,20,61,209,76,131,102,132,80,202,116,
33 72,68,72,138,194,136,202,6,162,218,84,20,49,6,69,155,22,46,196,213,140,
34 211,131,194,77,77,249,184,119,230,107,49,134,58,119,30,247,53,117,224,194,
35 229,255,125,247,156,31,255,115,248,238,39,74,41,114,67,66,31,166,128,245,
36 134,5,19,177,153,25,105,33,58,122,246,226,237,78,51,251,125,5,244,26,187,
37 0,62,210,28,151,123,231,7,122,210,158,147,93,99,29,165,246,123,236,20,41,
38 21,1,52,218,212,131,246,193,80,211,149,255,2,0,224,71,163,77,198,207,68,
39 66,251,251,77,1,200,133,215,143,165,243,85,66,186,99,113,144,74,171,5,79,
40 51,102,208,42,208,105,147,241,83,67,225,125,131,37,1,80,108,4,169,37,173,
41 215,161,207,91,118,230,170,12,112,142,59,6,221,71,154,22,162,39,134,67,
42 193,235,197,1,86,134,174,129,190,96,149,129,62,137,112,128,103,121,33,154,
43 37,122,108,36,28,28,54,7,224,0,162,83,110,18,99,171,65,247,146,225,8,209,
44 214,27,225,189,35,230,0,28,64,52,242,145,23,108,99,134,26,146,84,243,137,
45 42,62,83,197,87,54,176,155,137,230,222,240,193,107,127,247,22,58,7,86,67,
46 0,248,2,150,32,118,242,158,30,14,211,173,90,243,45,111,111,95,122,49,55,
47 108,54,157,232,98,148,203,50,84,116,143,249,105,183,9,209,193,45,250,36,
48 82,112,189,116,11,114,33,32,111,59,166,168,71,80,75,15,8,217,127,140,160,
49 8,242,146,36,213,68,104,114,8,80,4,162,65,61,180,156,10,236,30,197,186,
50 6,250,162,173,79,221,1,128,44,128,11,16,206,126,70,46,64,24,102,96,77,133,
51 135,254,93,181,150,146,60,79,204,241,104,250,183,59,0,62,143,208,88,183,
52 206,82,146,169,217,249,172,19,62,191,115,128,159,11,105,182,12,79,90,78,
53 180,156,209,26,132,187,23,18,27,51,225,254,141,200,34,132,161,5,107,253,
54 30,238,7,55,57,98,120,19,79,209,251,110,214,84,59,202,118,39,52,235,132,
55 193,129,95,139,25,246,220,157,118,15,2,138,58,81,62,7,86,66,20,113,162,
56 252,0,37,32,12,45,168,12,120,121,123,168,193,81,189,137,153,20,173,79,226,
57 171,197,180,150,65,72,226,245,43,132,47,5,1,244,140,34,150,72,57,2,152,
58 252,62,103,20,85,38,165,46,237,168,207,149,13,0,115,90,134,163,79,227,185,
59 114,217,226,223,204,64,145,88,118,64,152,69,201,183,178,85,18,249,145,79,
60 254,3,152,12,212,147,138,121,230,178,0,0,0,0,73,69,78,68,174,66,96,130};
61 
62 static size_t xml_res_size_1 = 2807;
63 static unsigned char xml_res_file_1[] = {
64 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,128,0,0,0,128,8,6,0,
65 0,0,195,62,97,203,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
66 72,89,115,0,0,17,24,0,0,17,24,1,91,182,80,54,0,0,0,25,116,69,88,116,83,
67 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
68 46,111,114,103,155,238,60,26,0,0,10,116,73,68,65,84,120,156,237,157,95,
69 76,20,219,29,199,191,203,46,186,182,122,21,146,251,71,175,212,127,81,180,
70 86,139,127,22,227,195,173,32,75,8,4,255,36,64,241,133,91,77,205,250,36,
71 229,193,122,235,67,233,109,140,9,189,185,241,134,135,210,94,131,9,166,149,
72 4,171,209,162,137,197,69,121,88,16,21,173,232,2,137,90,96,193,191,88,47,
73 18,244,226,229,239,233,195,58,148,101,103,103,102,103,103,230,204,46,191,
74 79,114,18,216,61,115,230,55,231,247,217,157,217,51,103,102,0,130,32,8,130,
75 32,8,130,32,8,130,32,8,130,32,8,130,32,136,240,89,196,59,0,66,25,86,157,
76 218,237,3,240,19,0,119,1,188,209,105,29,132,137,25,3,192,0,12,3,248,22,
77 192,167,124,195,33,140,70,16,64,40,67,0,190,1,240,9,207,160,8,227,152,46,
78 128,80,126,128,255,27,97,33,191,208,8,35,8,37,128,80,190,7,240,53,128,143,
79 120,5,72,232,203,164,0,9,9,9,108,246,236,217,161,68,120,11,224,43,0,31,
80 242,10,148,208,135,73,1,178,179,179,89,111,111,47,43,46,46,102,118,187,
81 93,74,132,114,208,49,66,204,16,32,128,64,24,34,124,204,43,112,66,27,68,
82 5,16,232,233,233,97,197,197,197,114,187,6,18,33,138,145,20,32,12,17,222,
83 0,40,3,144,200,107,67,8,117,40,18,64,192,231,243,49,151,203,197,108,54,
84 155,156,8,9,188,54,136,8,143,176,4,32,17,98,15,85,2,8,116,119,119,203,137,
85 48,8,18,193,212,68,36,128,10,17,22,240,218,80,66,28,77,4,16,232,234,234,
86 34,17,162,12,77,5,16,232,236,236,100,46,151,139,89,173,214,80,34,124,7,
87 224,75,0,243,57,109,55,241,30,93,4,16,232,232,232,96,69,69,69,82,34,188,
88 2,137,192,21,93,5,80,33,194,7,156,250,97,198,98,136,0,2,237,237,237,114,
89 34,252,23,36,130,161,24,42,128,64,91,91,27,137,96,18,184,8,48,93,132,184,
90 184,56,41,17,190,0,240,35,94,29,20,235,112,21,64,192,235,245,178,130,130,
91 2,102,177,88,66,137,240,18,36,130,46,152,66,0,129,251,247,239,43,21,97,
92 14,175,14,139,53,76,37,128,128,2,17,250,64,34,104,130,41,5,16,184,119,239,
93 30,137,160,51,166,22,64,32,12,17,236,188,58,50,90,137,10,1,4,90,91,91,229,
94 68,232,5,240,27,144,8,138,137,42,1,4,154,155,155,89,110,110,110,40,9,72,
95 132,48,136,74,1,4,20,136,208,3,191,8,179,57,245,175,233,137,106,1,4,174,
96 95,191,78,34,168,36,98,1,70,71,71,89,127,127,127,64,25,26,26,210,36,177,
97 211,219,237,239,239,103,131,131,131,33,235,55,53,53,201,137,224,3,137,16,
98 64,196,2,120,60,158,160,142,62,124,248,176,218,156,79,114,228,200,145,160,
99 118,103,205,154,197,46,93,186,36,187,108,99,99,163,18,17,92,0,108,198,118,
100 183,249,48,165,0,229,229,229,65,109,90,173,86,86,83,83,19,118,108,25,25,
101 25,82,34,116,99,134,139,96,58,1,78,157,58,21,244,51,207,98,177,176,202,
102 202,74,213,109,122,60,30,182,125,251,118,18,65,4,83,9,112,254,252,249,160,
103 249,132,22,139,133,85,84,84,168,106,79,44,86,25,17,186,48,195,68,48,141,
104 0,245,245,245,162,87,30,149,149,149,169,138,75,46,230,244,244,116,37,34,
105 232,117,107,30,211,96,10,1,110,220,184,193,230,206,157,27,212,78,105,105,
106 169,170,152,148,226,241,120,88,90,90,154,148,8,29,0,62,71,12,139,192,93,
107 0,175,215,203,18,19,19,131,218,56,120,240,160,170,120,212,224,241,120,216,
108 182,109,219,102,164,8,92,5,232,236,236,100,11,23,46,12,90,126,239,222,189,
109 108,98,98,66,85,60,145,224,118,187,89,106,106,170,148,8,237,224,36,66,156,
110 209,43,212,155,151,47,95,34,59,59,27,207,159,63,15,120,61,63,63,31,149,
111 149,149,176,88,44,134,199,228,116,58,113,243,230,77,184,221,110,164,166,
112 166,138,85,249,41,128,83,0,238,193,96,17,98,74,128,129,129,1,100,101,101,
113 225,225,195,135,1,175,239,220,185,19,213,213,213,176,90,249,126,211,78,
114 21,193,225,112,136,85,89,139,64,17,116,207,79,204,8,48,52,52,132,220,220,
115 92,180,182,182,6,188,158,145,145,129,154,154,26,196,199,199,115,138,44,
116 24,167,211,137,91,183,110,193,237,118,99,243,230,205,98,85,166,138,80,0,
117 64,183,175,173,169,2,204,210,107,37,122,51,50,50,130,188,188,60,52,53,53,
118 5,188,190,117,235,86,92,184,112,1,118,187,57,207,222,58,157,78,180,180,
119 180,72,137,240,51,0,103,0,220,135,206,34,0,192,127,16,249,52,40,43,128,
120 76,0,19,120,127,128,179,116,233,82,86,87,87,199,70,71,71,195,58,112,82,
121 122,16,56,54,54,198,10,10,10,130,234,166,164,164,176,254,254,126,173,142,
122 227,12,193,237,118,179,77,155,54,73,29,44,202,137,176,17,192,31,1,252,29,
123 192,63,1,252,5,192,30,0,115,149,36,111,240,253,74,212,78,131,218,6,160,
124 45,84,240,107,214,172,97,87,175,94,85,220,25,74,4,152,152,152,96,251,247,
125 239,15,170,151,156,156,204,94,188,120,161,117,126,12,97,98,98,130,213,214,
126 214,178,141,27,55,74,137,48,125,215,176,2,64,157,68,253,151,240,15,64,41,
127 18,64,40,225,204,126,217,11,96,84,34,0,6,128,217,108,54,118,226,196,9,69,
128 29,161,68,128,67,135,14,5,213,89,177,98,5,123,250,244,169,30,185,49,20,
129 65,132,13,27,54,200,137,112,4,254,107,32,37,251,254,125,249,43,36,118,35,
130 211,5,80,42,194,47,0,140,40,12,128,89,173,86,86,95,95,47,219,1,114,2,28,
131 61,122,52,232,253,197,139,23,179,174,174,46,61,243,98,56,10,69,8,167,124,
132 17,174,0,66,17,155,253,18,7,255,45,225,195,10,34,57,57,89,246,152,64,74,
133 128,138,138,138,160,247,18,19,19,217,131,7,15,140,200,9,23,198,199,199,
134 89,109,109,45,75,73,73,137,84,128,119,0,146,212,8,32,38,66,134,218,64,46,
135 95,190,44,185,193,161,4,168,174,174,22,189,230,47,46,46,142,157,59,119,
136 206,160,116,240,99,124,124,156,157,57,115,134,173,90,181,42,18,9,254,16,
137 137,0,66,241,1,248,151,218,32,74,74,74,36,55,84,76,0,135,195,193,226,227,
138 227,67,182,57,103,206,28,214,220,220,108,80,42,248,114,246,236,217,72,4,
139 184,46,36,61,146,129,160,37,0,178,212,46,220,211,211,19,246,50,45,45,45,
140 24,29,29,157,252,127,250,200,222,187,119,239,176,99,199,14,60,122,244,72,
141 109,88,81,195,227,199,143,35,89,124,137,240,7,183,145,192,72,199,228,75,
142 74,74,112,250,244,105,196,197,5,110,194,171,87,175,144,149,149,133,190,
143 190,190,136,218,55,59,17,246,31,19,254,136,68,128,30,248,127,123,170,98,
144 201,146,37,242,149,66,176,111,223,62,28,63,126,28,133,133,133,40,43,43,
145 11,122,191,187,187,27,185,185,185,120,251,246,173,234,117,152,157,164,36,
146 209,227,56,165,136,126,253,170,57,8,76,87,184,76,80,169,171,171,147,220,
147 199,137,29,3,0,96,121,121,121,108,108,108,44,160,110,73,73,137,104,221,
148 156,156,156,176,71,32,205,142,70,7,129,191,87,35,64,168,159,129,255,14,
149 55,128,213,171,87,171,250,25,152,158,158,206,70,70,70,68,59,37,63,63,95,
150 116,93,7,14,28,208,43,23,134,162,225,207,192,33,132,249,51,80,110,32,232,
151 51,132,49,16,100,179,217,216,181,107,215,100,55,56,220,9,33,195,195,195,
152 33,167,106,31,59,118,76,203,92,24,138,48,16,164,65,226,133,242,219,16,121,
153 140,104,40,248,115,37,18,216,108,54,118,242,228,73,69,27,174,102,70,208,
154 192,192,0,91,191,126,125,208,114,22,139,133,85,85,85,105,145,15,195,80,
155 56,2,216,10,224,119,240,223,243,72,73,242,43,160,96,40,248,5,212,157,12,
156 250,12,254,179,85,162,43,95,187,118,45,107,104,104,80,220,1,106,167,132,
157 61,121,242,132,37,37,37,5,45,27,31,31,47,123,220,97,6,84,158,12,90,6,224,
158 178,68,253,62,0,191,150,75,160,22,167,131,227,224,31,29,156,60,29,188,108,
159 217,50,118,229,202,149,160,3,55,57,34,153,19,232,245,122,217,130,5,11,130,
160 150,159,55,111,30,187,123,247,174,154,188,232,142,194,196,203,157,14,78,
161 129,127,148,239,111,0,46,0,248,51,128,95,2,248,177,146,228,105,57,33,132,
162 251,172,224,134,134,6,209,235,1,22,45,90,196,124,62,159,170,152,244,66,
163 131,121,0,170,153,58,14,48,162,117,227,60,73,75,75,67,85,85,85,208,64,209,
164 179,103,207,144,147,147,131,215,175,95,115,138,236,255,212,215,215,195,
165 225,112,32,51,51,19,119,238,220,17,171,210,6,255,39,248,231,0,254,1,191,
166 12,154,18,51,115,2,197,216,179,103,143,232,64,81,71,71,7,118,239,222,141,
167 225,225,97,14,81,249,19,159,154,154,138,204,204,76,220,190,125,91,172,74,
168 59,128,95,65,199,196,235,13,247,93,192,84,66,13,20,21,22,22,178,241,241,
169 113,85,109,170,193,237,118,51,135,195,33,245,85,223,134,24,185,80,196,84,
170 2,72,13,20,105,113,207,1,57,204,124,97,136,94,152,74,0,198,252,3,69,161,
171 174,224,45,47,47,87,221,174,20,110,183,155,109,217,178,101,70,37,94,192,
172 116,2,48,22,122,160,72,235,201,36,209,116,113,168,105,175,87,183,219,237,
173 88,190,124,121,192,107,137,137,145,61,63,114,254,252,249,184,120,241,34,
174 118,237,218,133,193,193,193,128,247,74,75,75,177,110,221,58,172,92,185,
175 82,117,251,141,141,141,40,45,45,69,67,67,67,168,42,93,0,254,4,224,36,128,
176 113,213,43,138,2,98,226,46,97,74,9,227,190,0,166,253,192,105,205,140,16,
177 128,238,12,18,154,152,22,128,110,18,37,79,76,10,208,216,216,200,156,78,
178 167,84,226,125,152,225,137,23,136,41,1,20,222,40,146,18,63,133,152,16,128,
179 110,21,171,158,168,22,128,18,31,57,81,41,0,221,46,94,59,162,74,0,225,129,
180 17,160,196,107,70,84,8,160,224,73,33,143,65,137,87,133,169,5,160,135,70,
181 233,143,41,5,160,199,198,25,135,169,4,160,7,71,26,143,41,4,8,227,209,177,
182 148,120,141,225,42,128,215,235,149,123,120,52,61,51,88,103,184,62,62,94,
183 230,169,225,95,2,152,199,169,95,102,12,134,10,208,222,222,206,138,138,138,
184 152,213,106,149,75,252,7,156,250,99,198,97,136,0,10,18,255,10,148,120,46,
185 232,42,64,71,71,135,210,196,207,231,180,253,51,30,93,4,232,236,236,100,
186 46,151,75,42,241,223,129,18,111,10,52,21,160,171,171,139,185,92,174,160,
187 7,63,77,41,131,0,202,0,44,224,181,193,68,32,154,8,64,137,143,94,34,18,160,
188 187,187,155,18,31,229,168,18,32,140,196,39,240,218,48,66,25,97,9,224,243,
189 249,228,18,255,6,148,248,168,66,145,0,62,159,143,21,23,23,139,222,200,1,
190 129,137,143,236,146,32,194,112,36,5,232,233,233,81,146,248,114,0,31,243,
191 218,0,34,50,68,5,232,237,237,149,75,252,91,80,226,99,130,0,1,132,196,219,
192 237,118,185,196,127,194,43,96,66,91,38,5,72,72,72,144,251,196,127,5,224,
193 67,94,129,18,250,48,41,64,136,242,61,128,175,1,124,196,43,64,66,95,66,9,
194 240,3,128,111,1,44,228,23,26,97,4,211,5,24,2,240,13,104,31,63,99,16,4,24,
195 134,255,19,191,136,111,56,132,209,12,193,159,248,79,121,7,66,240,129,62,
196 241,4,65,16,4,65,16,4,65,16,4,65,16,4,65,16,4,65,16,38,224,127,0,16,175,
197 20,218,109,78,242,0,0,0,0,73,69,78,68,174,66,96,130};
198 
199 static size_t xml_res_size_2 = 499;
200 static unsigned char xml_res_file_2[] = {
201 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
202 0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
203 72,89,115,0,0,2,35,0,0,2,35,1,65,239,211,26,0,0,0,25,116,69,88,116,83,111,
204 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
205 111,114,103,155,238,60,26,0,0,1,112,73,68,65,84,56,141,165,145,59,107,194,
206 96,20,134,95,77,200,80,219,46,78,46,118,42,226,104,28,34,116,53,155,14,
207 130,155,16,39,41,217,234,146,12,237,218,201,198,161,63,160,253,27,173,184,
208 8,109,71,131,83,64,161,117,136,16,147,144,161,160,161,169,228,116,169,165,
209 23,181,94,30,56,240,13,231,125,248,206,57,192,142,48,223,222,73,0,33,128,
210 96,43,1,207,243,167,133,66,225,134,227,184,164,105,154,79,155,138,192,243,
211 188,98,89,22,57,142,67,138,162,244,179,217,236,53,128,195,141,5,115,108,
212 219,38,85,85,251,153,76,102,165,232,107,132,68,34,113,82,169,84,68,223,
213 247,161,235,58,210,233,52,38,147,73,92,150,101,33,22,139,149,167,211,233,
214 177,101,89,143,0,222,86,10,60,207,67,167,211,129,109,219,112,93,23,162,
215 40,34,159,207,199,75,165,146,192,48,76,121,54,155,29,141,70,163,7,0,239,
216 243,236,45,128,51,142,227,76,73,146,200,48,12,42,22,139,84,175,215,105,
217 17,166,105,146,44,203,207,44,203,122,0,46,163,0,8,128,31,134,97,52,18,137,
218 0,0,82,169,20,124,223,71,175,215,91,181,54,250,172,159,75,52,12,131,154,
219 205,38,5,65,64,213,106,149,134,195,33,17,17,141,199,99,82,85,181,47,8,194,
220 21,128,189,127,175,176,238,53,216,101,255,115,28,7,154,166,13,90,173,214,
221 157,174,235,23,0,94,23,245,253,17,184,174,139,70,163,49,104,183,219,247,
222 221,110,247,124,89,112,225,8,181,90,237,37,151,203,105,0,246,215,10,253,
223 34,9,224,96,155,224,78,124,0,2,99,224,75,202,65,61,93,0,0,0,0,73,69,78,
224 68,174,66,96,130};
225 
226 static size_t xml_res_size_3 = 6687;
227 static unsigned char xml_res_file_3[] = {
228 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,0,0,0,1,0,8,6,0,0,0,
229 92,114,168,102,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,
230 89,115,0,0,34,36,0,0,34,36,1,228,91,10,25,0,0,0,25,116,69,88,116,83,111,
231 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
232 111,114,103,155,238,60,26,0,0,25,156,73,68,65,84,120,156,237,221,121,112,
233 21,101,186,6,240,39,39,202,166,178,95,217,101,199,40,32,42,107,197,148,
234 160,38,133,48,128,12,78,24,161,6,102,80,47,92,239,173,73,244,90,35,163,
235 130,65,64,72,24,52,9,16,106,142,227,202,0,215,202,120,101,36,200,148,38,
236 44,86,18,194,38,91,88,36,200,34,92,23,178,176,132,132,228,4,146,239,254,
237 113,104,132,67,146,211,203,215,219,57,207,175,170,255,73,117,190,126,187,
238 207,121,159,116,206,233,254,26,32,34,34,34,34,34,34,34,34,34,34,34,34,34,
239 34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,
240 34,34,34,34,34,34,34,34,34,34,34,162,176,246,123,0,183,219,93,4,17,217,
241 195,7,224,20,128,153,0,110,179,183,20,34,178,154,15,128,184,182,156,2,131,
242 128,40,172,220,24,0,202,114,18,12,2,162,176,80,95,0,48,8,136,194,68,99,
243 1,160,44,39,192,32,32,10,73,106,2,64,89,142,0,152,10,192,99,75,165,68,36,
244 157,150,0,80,150,195,0,166,3,136,180,161,94,34,146,72,79,0,48,8,136,66,
245 132,145,0,80,150,131,0,226,193,127,13,136,92,71,70,0,220,24,4,60,35,32,
246 114,17,153,1,16,24,4,60,35,32,114,184,6,3,32,54,54,86,116,233,210,197,72,
247 16,236,3,48,17,64,132,133,251,67,68,26,52,24,0,233,233,233,194,231,243,
248 9,175,215,107,52,8,14,192,255,25,1,131,128,200,97,26,13,0,133,18,4,157,
249 59,119,102,16,16,133,16,85,1,32,57,8,246,131,65,64,228,8,154,2,64,81,93,
250 93,45,188,94,175,232,212,169,19,131,128,200,197,116,5,128,162,178,178,82,
251 164,165,165,25,13,130,125,96,16,16,217,194,80,0,40,42,42,42,68,90,90,154,
252 232,216,177,163,145,32,40,0,48,222,202,157,39,10,119,82,2,128,65,64,228,
253 78,82,3,32,48,8,58,116,232,96,36,8,182,129,65,64,100,42,83,2,64,113,233,
254 210,37,25,65,144,15,6,1,145,41,76,13,128,27,131,32,57,57,89,180,109,219,
255 214,72,16,228,129,65,64,36,149,37,1,16,24,4,109,218,180,49,26,4,79,88,121,
256 144,136,66,149,165,1,192,32,32,114,22,91,2,64,81,94,94,46,43,8,30,183,242,
257 160,17,133,10,91,3,32,48,8,90,183,110,109,52,8,30,179,242,224,17,185,157,
258 35,2,192,132,32,24,101,225,49,36,114,45,71,5,128,162,172,172,76,36,37,37,
259 137,86,173,90,25,13,130,145,86,30,76,34,183,113,100,0,40,74,75,75,101,4,
260 65,54,128,225,86,30,84,34,183,112,116,0,40,148,32,104,217,178,165,209,32,
261 24,102,229,193,37,114,58,87,4,128,162,164,164,68,86,16,12,181,242,32,19,
262 57,149,171,2,64,193,32,32,146,195,149,1,160,40,41,41,17,179,103,207,22,
263 45,90,180,48,26,4,67,172,60,232,68,78,225,234,0,80,20,23,23,203,10,130,
264 193,86,30,124,34,187,133,68,0,40,148,32,104,222,188,185,222,16,168,3,144,
265 5,224,97,43,95,4,34,187,132,84,0,40,206,158,61,203,32,32,82,33,36,3,64,
266 33,49,8,30,178,242,69,33,178,74,72,7,128,66,9,130,102,205,154,233,13,130,
267 90,248,131,224,65,43,95,28,34,179,133,69,0,40,78,159,62,45,18,18,18,100,
268 4,193,32,43,95,36,114,23,62,20,211,161,186,117,235,134,244,244,116,20,21,
269 21,33,33,33,1,205,154,53,211,58,132,7,192,56,0,123,0,100,2,136,146,93,35,
270 185,31,3,192,225,148,32,56,122,244,40,18,18,18,208,180,105,83,173,67,120,
271 224,127,150,193,33,248,131,224,94,217,53,146,123,49,0,92,226,158,123,238,
272 185,233,140,192,64,16,28,6,131,128,174,97,0,184,140,18,4,18,206,8,148,32,
273 232,39,187,70,114,15,6,128,75,117,239,222,253,122,16,204,156,57,19,183,
274 221,118,155,214,33,148,32,56,2,127,16,244,149,93,35,57,31,3,192,229,186,
275 119,239,14,175,215,139,99,199,142,25,13,130,111,193,32,8,59,12,128,16,209,
276 163,71,15,89,65,112,8,192,42,0,125,100,215,72,206,195,0,8,49,74,16,20,21,
277 21,233,13,130,219,1,76,131,255,51,2,6,65,136,99,0,132,168,158,61,123,222,
278 20,4,145,145,145,90,135,8,12,130,222,178,107,36,251,49,0,66,156,196,32,
279 56,2,127,16,244,146,93,35,217,135,1,16,38,122,245,234,5,175,215,139,194,
280 194,66,76,155,54,141,65,64,0,24,0,97,231,190,251,238,195,170,85,171,112,
281 224,192,1,189,65,208,4,191,4,129,23,64,87,217,53,146,117,24,0,97,234,254,
282 251,239,151,17,4,51,1,28,135,63,8,186,200,174,145,204,199,0,8,115,74,16,
283 236,223,191,31,211,166,77,131,199,163,249,45,161,4,193,9,48,8,92,135,1,
284 64,0,128,254,253,251,203,14,130,206,178,107,36,249,24,0,116,147,1,3,6,92,
285 15,130,248,248,120,68,68,68,104,29,34,48,8,58,201,174,145,228,97,0,80,189,
286 6,12,24,128,204,204,76,35,65,208,20,254,32,248,14,64,58,24,4,142,196,0,
287 160,70,13,28,56,16,153,153,153,216,183,111,159,222,32,104,1,32,1,192,49,
288 248,131,160,163,236,26,73,63,6,0,169,242,192,3,15,24,13,130,59,224,15,2,
289 229,140,128,65,224,0,12,0,210,68,9,130,189,123,247,202,10,130,14,178,107,
290 36,245,24,0,164,203,160,65,131,144,153,153,137,130,130,2,140,27,55,78,207,
291 16,74,16,28,7,131,192,54,12,0,50,100,248,240,225,200,202,202,146,17,4,223,
292 1,72,6,208,86,102,125,212,56,205,247,138,18,80,93,93,141,170,170,170,160,
293 235,181,110,221,90,207,41,178,116,66,8,92,184,112,65,245,250,205,154,53,
294 67,243,230,205,53,109,99,196,136,17,215,131,96,209,162,69,216,176,97,131,
295 214,50,239,4,48,27,192,127,1,200,0,176,4,192,57,173,131,80,232,114,204,
296 115,1,22,47,94,172,106,110,254,226,226,98,75,235,106,200,75,47,189,164,
297 250,121,2,221,186,117,19,39,79,158,52,188,205,252,252,124,49,110,220,56,
298 189,207,52,16,0,46,193,127,70,208,198,172,55,20,241,95,128,144,151,148,
299 148,132,212,212,84,85,235,222,125,247,221,200,206,206,70,143,30,61,12,111,
300 55,58,58,26,89,89,89,200,207,207,215,251,175,129,114,70,240,61,24,4,166,
301 97,0,132,176,140,140,12,204,159,63,95,213,186,237,219,183,199,230,205,155,
302 113,239,189,114,103,11,87,130,32,47,47,15,177,177,177,122,134,184,11,55,
303 7,65,107,153,245,133,59,6,64,136,90,189,122,53,18,18,18,84,173,219,178,
304 101,75,252,235,95,255,66,255,254,253,77,171,231,145,71,30,65,118,118,54,
305 114,115,115,241,196,19,79,232,25,66,9,130,211,96,16,72,195,0,8,65,235,215,
306 175,199,140,25,51,80,87,87,23,116,221,22,45,90,32,43,43,11,67,134,12,177,
307 160,50,32,38,38,6,57,57,57,200,205,205,197,227,143,63,174,103,8,37,8,142,
308 3,152,7,160,149,196,242,194,14,3,32,196,108,217,178,5,191,253,237,111,113,
309 245,234,213,160,235,54,105,210,4,159,126,250,41,30,125,244,81,11,42,187,
310 89,76,76,12,54,109,218,132,220,220,92,60,246,216,99,122,134,104,11,32,9,
311 12,2,67,24,0,33,100,215,174,93,120,234,169,167,80,93,93,29,116,221,200,
312 200,72,172,94,189,26,99,198,140,177,160,178,134,197,196,196,96,243,230,
313 205,200,205,205,197,168,81,163,244,12,209,14,12,2,221,24,0,33,162,168,168,
314 8,227,198,141,195,165,75,151,130,174,235,241,120,176,106,213,42,196,199,
315 199,91,80,153,58,49,49,49,216,178,101,11,114,115,115,49,114,228,72,61,67,
316 4,6,65,75,137,229,133,44,6,64,8,56,115,230,12,226,226,226,80,92,92,28,116,
317 221,136,136,8,172,92,185,18,83,167,78,181,160,50,237,98,98,98,176,117,235,
318 86,100,103,103,99,248,240,225,122,134,96,16,104,192,0,112,185,146,146,18,
319 196,197,197,225,244,233,211,170,214,79,73,73,193,172,89,179,76,174,202,
320 184,216,216,88,108,223,190,29,217,217,217,24,54,108,152,158,33,218,227,
321 151,32,152,13,255,109,201,20,128,1,224,98,23,47,94,196,232,209,163,113,
322 244,232,81,85,235,207,159,63,31,127,250,211,159,76,174,74,174,216,216,88,
323 236,216,177,3,217,217,217,24,58,116,168,158,33,218,195,255,181,225,41,48,
324 8,110,193,0,112,169,170,170,42,140,31,63,30,123,247,238,85,181,126,98,98,
325 34,230,206,157,107,114,85,230,137,141,141,197,206,157,59,141,4,193,191,
326 225,230,32,208,118,179,67,136,98,0,184,208,149,43,87,240,155,223,252,6,
327 185,185,185,170,214,127,246,217,103,85,95,14,236,116,55,6,129,206,107,23,
328 24,4,55,96,0,184,76,93,93,29,166,79,159,142,141,27,55,170,90,255,119,191,
329 251,29,254,246,183,191,57,226,174,68,153,98,99,99,177,107,215,46,100,103,
330 103,99,240,224,193,122,134,184,27,12,2,6,128,155,8,33,240,194,11,47,224,
331 147,79,62,81,181,254,196,137,19,241,225,135,31,234,153,226,219,53,148,32,
332 88,191,126,61,30,126,248,97,61,67,4,6,65,51,137,229,57,94,232,190,51,66,
333 208,171,175,190,138,119,223,125,87,213,186,113,113,113,248,228,147,79,244,
334 60,30,220,117,34,34,34,48,126,252,120,236,222,189,91,70,16,20,1,72,68,152,
335 4,1,3,192,37,210,211,211,145,146,146,162,106,221,232,232,104,172,91,183,
336 14,77,155,54,53,185,42,103,9,12,130,135,30,122,72,207,48,221,0,164,33,76,
337 130,128,1,224,2,31,127,252,49,94,122,233,37,85,235,62,248,224,131,248,226,
338 139,47,112,199,29,119,152,92,149,115,41,65,240,205,55,223,96,253,250,245,
339 120,240,193,7,245,12,163,4,193,81,248,131,32,36,211,148,1,224,112,235,214,
340 173,195,243,207,63,15,33,68,208,117,7,14,28,136,156,156,28,180,110,205,
341 59,101,129,91,131,96,208,160,65,122,134,185,7,55,159,17,132,84,16,48,0,
342 28,44,39,39,7,83,166,76,81,117,103,95,159,62,125,240,229,151,95,162,93,
343 187,118,22,84,230,46,30,143,7,227,199,143,199,158,61,123,144,153,153,137,
344 168,168,40,61,195,40,65,16,82,103,4,12,0,135,218,177,99,7,126,253,235,95,
345 195,231,243,5,93,183,91,183,110,200,206,206,70,167,78,124,250,86,99,60,
346 30,15,226,227,227,113,232,208,33,100,102,102,234,157,253,168,59,126,9,130,
347 153,112,249,196,186,12,0,7,42,44,44,196,216,177,99,81,81,81,17,116,93,153,
348 243,248,133,11,37,8,14,31,62,108,52,8,188,240,63,242,204,181,65,192,0,112,
349 152,227,199,143,99,244,232,209,56,119,46,248,140,216,102,205,227,23,46,
350 2,131,160,95,191,126,122,134,233,1,23,7,65,125,1,192,39,180,216,228,199,
351 31,127,68,92,92,28,126,250,233,167,160,235,90,49,143,95,184,80,130,224,
352 200,145,35,50,130,160,8,46,10,130,250,2,96,7,128,85,0,122,91,92,139,110,
353 106,254,79,118,186,178,178,50,196,197,197,225,228,201,147,65,215,181,122,
354 30,191,112,17,24,4,125,251,246,213,51,76,79,200,15,130,190,0,198,95,27,
355 239,5,0,255,14,96,236,181,109,73,247,3,252,15,102,168,129,63,8,122,153,
356 177,17,149,238,0,48,11,192,215,104,228,33,18,30,143,71,68,71,71,139,229,
357 203,151,139,139,23,47,26,126,168,69,48,178,31,12,82,89,89,41,162,163,163,
358 85,141,217,164,73,19,177,113,227,70,147,247,144,132,16,162,166,166,70,124,
359 252,241,199,162,79,159,62,70,30,112,114,28,254,198,141,212,248,222,143,
360 6,240,62,128,159,131,140,127,6,192,10,0,186,174,122,170,143,18,0,202,226,
361 131,245,65,224,1,48,29,192,143,208,120,192,219,181,107,39,146,147,147,69,
362 85,85,149,105,111,12,153,1,224,243,249,196,232,209,163,85,141,23,25,25,
363 41,50,51,51,77,219,47,170,159,164,32,56,124,237,61,29,44,8,238,7,144,169,
364 115,27,89,240,159,45,24,18,24,0,55,6,129,23,64,87,163,27,8,162,55,128,253,
365 13,212,160,122,233,215,175,159,56,116,232,144,41,111,8,89,1,112,245,234,
366 85,17,31,31,175,106,44,143,199,35,214,172,89,99,202,254,144,58,74,16,244,
367 238,221,219,200,123,243,16,234,15,2,15,128,197,0,106,13,190,247,107,0,188,
368 162,173,229,110,214,80,0,4,6,65,23,35,27,105,64,12,128,179,65,182,175,122,
369 185,235,174,187,196,63,255,249,79,233,111,4,25,1,80,87,87,39,158,123,238,
370 57,85,227,68,68,68,136,191,254,245,175,210,247,131,244,81,130,160,87,175,
371 94,178,130,224,78,0,235,100,189,239,175,45,255,3,157,183,56,7,11,0,179,
372 130,96,36,26,121,0,168,222,37,50,50,82,100,101,101,73,125,3,200,8,128,151,
373 95,126,89,245,62,44,89,178,68,106,253,36,135,207,231,147,21,4,69,178,223,
374 247,215,150,13,208,254,217,131,234,0,8,12,130,206,90,55,116,131,30,0,138,
375 53,110,87,245,114,215,93,119,137,194,194,66,105,47,188,209,0,120,243,205,
376 55,85,215,62,127,254,124,105,117,147,57,124,62,159,240,122,189,162,107,
377 215,174,166,188,127,13,46,234,110,33,189,129,214,0,80,150,106,232,11,130,
378 72,0,123,37,239,244,45,75,191,126,253,68,117,117,181,148,23,220,72,0,100,
379 100,100,168,174,57,49,49,81,74,189,100,13,37,8,186,116,233,98,119,211,7,
380 46,79,105,105,72,189,1,16,24,4,106,47,76,127,206,170,3,145,154,154,42,229,
381 133,214,27,0,107,214,172,17,30,143,71,213,239,62,251,236,179,162,174,174,
382 78,74,189,100,45,7,6,193,81,0,183,171,236,71,195,1,160,44,149,0,210,209,
383 120,16,52,135,255,105,175,150,28,136,54,109,218,136,178,178,50,195,47,176,
384 158,0,200,202,202,18,183,223,126,187,170,223,123,242,201,39,69,109,109,
385 173,225,58,201,94,74,16,116,238,220,217,238,0,16,0,254,179,190,6,52,243,
386 94,128,22,0,18,224,191,70,58,29,64,199,122,214,153,2,255,196,11,150,56,
387 127,254,60,254,254,247,191,91,181,185,235,182,109,219,134,103,158,121,6,
388 87,174,92,81,181,254,215,95,127,141,29,59,118,152,92,21,153,173,73,147,
389 38,152,57,115,38,78,156,56,1,175,215,139,206,157,141,124,76,102,216,127,
390 3,80,53,51,172,172,51,128,192,165,2,183,6,193,87,38,109,171,193,101,248,
391 240,225,134,147,93,203,25,192,190,125,251,68,235,214,173,53,215,217,190,
392 125,123,81,84,84,36,225,239,16,57,69,117,117,181,240,122,189,162,77,155,
393 54,118,157,5,220,242,136,37,43,239,6,188,3,254,51,130,239,224,15,130,110,
394 240,127,239,111,169,221,187,119,227,194,133,11,150,108,235,216,177,99,24,
395 61,122,180,174,237,149,150,150,98,204,152,49,170,158,247,71,238,208,180,
396 105,83,204,156,57,19,83,166,76,177,171,132,184,192,31,216,113,59,176,18,
397 4,223,194,134,185,216,107,107,107,113,224,192,1,75,182,245,212,83,79,225,
398 236,217,179,186,127,255,248,241,227,152,56,113,34,170,170,170,36,86,69,
399 118,43,44,44,180,107,211,183,220,47,96,231,124,0,182,61,163,237,248,241,
400 227,150,108,167,180,180,212,240,24,5,5,5,152,60,121,50,106,107,107,37,84,
401 68,78,112,226,196,9,187,54,125,203,29,190,97,57,33,136,85,255,2,52,230,
402 206,59,239,84,189,238,134,13,27,240,226,139,47,154,88,13,89,169,188,188,
403 220,174,77,183,10,252,65,88,6,128,221,18,19,19,81,80,80,160,105,246,222,
404 21,43,86,224,47,127,249,139,137,85,81,56,10,203,0,176,115,218,236,63,252,
405 225,15,72,77,77,197,128,1,3,52,63,188,99,246,236,217,182,124,141,73,114,
406 181,108,217,210,174,77,95,12,252,129,157,1,112,217,174,13,247,238,109,207,
407 100,71,147,38,77,194,123,239,189,119,253,65,157,163,70,141,194,71,31,125,
408 164,250,217,125,66,8,60,255,252,243,200,201,201,49,179,76,50,89,175,94,
409 182,205,177,115,203,135,95,118,4,64,37,128,101,0,162,0,88,254,241,118,100,
410 100,36,30,120,224,1,171,55,139,184,184,56,172,93,187,22,145,145,55,223,
411 156,245,204,51,207,96,209,162,69,170,199,169,169,169,193,211,79,63,109,
412 217,55,25,36,223,192,129,3,237,218,244,30,53,43,153,125,33,208,141,147,
413 142,126,105,210,182,26,92,70,140,24,97,248,130,14,181,23,2,41,75,116,116,
414 180,168,168,168,104,116,204,196,196,68,77,99,118,233,210,69,156,62,125,
415 218,240,190,144,117,42,43,43,69,90,90,154,104,219,182,173,93,23,2,13,189,
416 165,219,235,33,59,0,234,187,2,80,49,195,234,131,144,158,158,110,248,133,
417 212,18,0,131,6,13,18,231,207,159,15,58,102,109,109,173,120,250,233,167,
418 53,237,203,128,1,3,84,141,77,246,82,174,0,236,212,169,147,93,141,47,224,
419 191,0,207,210,75,129,27,107,124,69,51,0,223,91,117,16,218,183,111,47,46,
420 92,184,96,248,5,85,27,0,125,251,246,21,63,255,252,179,234,113,171,170,170,
421 68,76,76,140,166,125,26,53,106,148,180,219,156,73,46,135,221,12,244,31,
422 141,244,225,77,140,6,128,154,187,0,111,100,217,89,128,140,191,254,66,168,
423 15,128,35,71,142,104,30,187,172,172,76,68,69,69,105,218,175,233,211,167,
424 243,214,97,7,113,88,227,11,88,116,59,176,214,121,0,20,145,240,127,56,97,
425 234,65,184,247,222,123,133,207,231,147,242,2,203,158,22,60,208,153,51,103,
426 52,207,46,51,103,206,28,41,251,70,250,57,112,30,0,101,25,175,165,33,237,
427 152,18,172,59,36,78,6,26,184,56,109,74,48,53,14,28,56,160,249,46,194,21,
428 43,86,72,219,71,82,207,225,83,130,37,107,109,70,173,147,130,202,186,201,
429 121,36,76,154,20,116,195,134,13,82,95,112,43,2,64,8,33,54,111,222,44,154,
430 54,109,170,105,95,215,173,91,39,105,47,41,24,73,141,111,246,164,160,154,
431 191,234,231,180,224,65,88,21,0,66,8,177,118,237,90,17,17,17,161,122,159,
432 155,55,111,46,10,10,10,36,236,37,53,196,164,105,193,63,147,245,190,191,
433 182,172,133,228,105,193,173,122,48,72,79,72,152,36,52,42,42,74,215,135,
434 112,106,88,25,0,90,182,167,44,156,76,196,28,22,60,24,100,33,128,171,6,223,
435 251,62,0,47,107,105,184,64,245,61,26,204,138,198,191,145,7,64,60,128,83,
436 208,120,0,148,71,131,153,249,213,152,213,1,32,132,16,9,9,9,154,142,67,239,
437 222,189,197,217,179,103,165,109,63,156,73,106,124,181,143,6,139,130,190,
438 71,131,213,93,251,189,62,65,187,43,8,39,61,28,180,5,128,231,1,108,66,35,
439 59,31,25,25,41,30,125,244,81,145,145,145,33,202,203,203,77,127,67,216,17,
440 0,122,46,20,26,54,108,88,208,43,16,169,97,54,63,28,116,4,252,127,120,131,
441 253,75,126,10,254,175,221,7,105,28,191,65,167,224,204,199,131,55,248,1,
442 161,213,79,206,177,35,0,132,16,226,242,229,203,154,47,20,26,55,110,156,
443 184,122,245,170,212,58,66,93,109,109,173,200,204,204,20,125,251,246,53,
444 210,248,39,160,175,241,235,211,27,192,175,224,255,99,248,2,252,83,233,63,
445 9,255,183,103,210,117,8,190,138,45,26,12,0,89,23,248,168,101,87,0,8,33,
446 68,105,105,169,230,11,133,102,205,154,37,189,142,80,36,185,241,111,51,169,
447 15,164,170,239,43,2,253,147,216,145,233,218,181,107,135,236,236,108,116,
448 237,170,254,35,25,175,215,139,165,75,151,154,88,149,187,213,213,213,225,
449 31,255,248,7,238,187,239,62,76,158,60,25,199,142,29,211,51,204,41,0,179,
450 0,244,3,240,46,252,31,230,57,94,88,78,8,226,118,93,187,118,197,198,141,
451 27,53,77,108,242,202,43,175,112,50,145,0,74,227,223,127,255,253,152,60,
452 121,50,138,138,138,244,12,115,10,254,198,239,11,23,53,190,130,1,224,82,
453 3,7,14,196,103,159,125,166,122,70,33,113,109,50,145,77,155,54,153,92,153,
454 243,5,54,254,209,163,71,245,12,243,61,92,220,248,10,6,128,139,61,246,216,
455 99,248,240,195,15,175,207,48,20,76,77,77,13,38,77,154,20,182,147,137,40,
456 141,223,191,127,127,163,141,255,34,128,123,225,226,198,87,48,0,92,110,202,
457 148,41,88,184,112,161,234,245,203,203,203,49,118,236,88,156,57,115,198,
458 196,170,156,165,174,174,14,89,89,89,120,248,225,135,49,121,242,100,124,
459 251,237,183,122,134,57,141,95,26,63,29,254,15,165,93,143,1,16,2,94,123,
460 237,53,252,241,143,127,84,189,254,15,63,252,128,177,99,199,58,98,122,116,
461 51,41,141,63,120,240,96,76,152,48,1,251,247,239,215,51,140,210,248,253,
462 16,66,141,175,96,0,132,136,180,180,52,76,154,52,73,245,250,7,15,30,196,
463 164,73,147,80,83,83,99,98,85,246,16,66,32,43,43,11,67,134,12,193,132,9,
464 19,176,111,223,62,61,195,156,65,8,254,197,15,196,0,8,17,30,143,7,171,87,
465 175,198,35,143,60,162,250,119,182,108,217,130,25,51,102,64,8,97,98,101,
466 214,9,108,252,189,123,247,234,25,70,105,124,229,47,126,181,204,26,157,134,
467 1,16,66,154,55,111,142,207,63,255,28,81,81,81,170,127,103,237,218,181,72,
468 74,74,50,177,42,243,5,54,254,158,61,170,38,191,13,84,12,224,207,8,147,198,
469 87,48,0,66,76,187,118,237,176,113,227,70,116,236,216,216,84,140,55,91,176,
470 96,1,50,50,50,76,172,202,60,57,57,57,24,58,116,168,140,198,239,1,32,5,97,
471 210,248,10,6,64,8,234,217,179,39,190,250,234,43,180,106,117,203,163,224,
472 26,148,152,152,136,207,63,255,220,196,170,228,82,26,63,46,46,14,223,124,
473 243,141,158,33,2,27,63,44,31,193,204,0,8,81,202,133,66,77,154,52,81,181,
474 126,109,109,45,166,78,157,138,237,219,183,155,92,153,49,57,57,57,24,54,
475 108,24,226,226,226,176,123,247,110,61,67,148,128,141,127,29,3,32,132,61,
476 254,248,227,154,46,20,186,124,249,50,38,76,152,160,247,90,120,83,221,216,
477 248,187,118,237,210,51,4,27,191,30,12,128,16,55,117,234,84,44,88,176,64,
478 245,250,37,37,37,24,51,102,12,138,139,139,77,172,74,189,156,156,28,12,31,
479 62,220,72,227,151,226,230,198,183,237,153,148,78,228,138,91,22,157,166,
480 71,143,30,136,141,141,13,186,158,218,211,111,179,189,254,250,235,184,124,
481 249,50,118,238,220,169,250,119,86,174,92,137,121,243,230,153,87,84,16,57,
482 57,57,152,51,103,14,118,236,216,161,119,136,82,0,25,0,222,1,80,46,173,48,
483 178,141,99,230,3,32,243,228,230,230,138,145,35,71,26,185,31,191,4,192,60,
484 0,182,61,131,219,77,120,6,64,142,144,151,151,135,185,115,231,98,235,214,
485 173,122,135,40,3,176,2,252,139,175,9,3,128,108,149,151,151,135,55,222,120,
486 3,91,182,108,209,59,132,210,248,169,0,46,74,43,44,76,48,0,200,22,121,121,
487 121,72,74,74,194,230,205,155,245,14,113,14,192,114,176,241,13,97,0,144,
488 165,242,242,242,48,111,222,60,35,19,147,92,2,176,18,254,71,94,133,246,237,
489 140,22,96,0,144,37,242,243,243,145,148,148,196,198,119,24,6,0,153,42,63,
490 63,31,201,201,201,216,176,97,131,222,33,216,248,38,98,0,144,41,182,109,
491 219,134,197,139,23,27,105,252,10,248,191,199,79,1,112,94,90,97,116,19,6,
492 0,73,85,80,80,128,69,139,22,177,241,93,130,1,64,82,108,223,190,29,111,189,
493 245,150,140,198,95,2,255,39,252,100,1,6,0,25,34,169,241,63,0,176,8,124,
494 40,141,229,24,0,164,203,254,253,251,241,214,91,111,225,211,79,63,213,59,
495 165,88,37,128,247,193,198,183,21,3,128,52,57,112,224,0,22,46,92,40,163,
496 241,23,3,248,89,106,113,164,25,3,128,84,97,227,135,38,6,0,53,170,176,176,
497 16,11,22,44,48,210,248,151,1,188,7,255,247,248,63,73,45,142,12,99,0,80,
498 189,36,52,190,15,192,199,240,223,154,203,198,119,40,6,0,221,228,224,193,
499 131,152,63,127,190,145,198,175,1,240,17,128,55,1,252,40,179,54,146,143,
500 1,64,0,128,67,135,14,33,37,37,5,107,214,172,65,93,93,157,158,33,216,248,
501 46,196,0,8,115,74,227,175,93,187,22,181,181,181,122,134,80,26,127,62,128,
502 31,100,214,70,230,99,0,132,169,195,135,15,35,57,57,153,141,31,230,24,0,
503 97,230,200,145,35,88,188,120,177,140,198,95,0,224,255,100,214,70,214,99,
504 0,132,9,9,141,127,5,192,39,240,127,170,127,66,102,109,100,31,6,64,136,59,
505 113,226,4,82,82,82,240,254,251,239,27,109,252,55,1,28,151,90,28,217,142,
506 1,16,162,78,158,60,137,228,228,100,124,240,193,7,184,122,245,170,158,33,
507 216,248,97,128,1,16,98,78,157,58,133,197,139,23,203,104,252,249,0,190,147,
508 90,28,57,14,3,32,68,72,108,252,5,0,156,247,112,64,50,5,3,192,229,190,255,
509 254,123,44,90,180,200,72,227,215,1,248,95,0,175,131,141,31,118,24,0,46,
510 37,177,241,231,0,40,146,90,28,185,6,3,192,101,78,159,62,141,183,223,126,
511 27,94,175,23,62,159,79,207,16,108,124,186,142,1,224,18,18,27,127,46,128,
512 163,82,139,35,215,98,0,56,220,153,51,103,176,116,233,82,188,251,238,187,
513 168,174,174,214,51,132,210,248,111,0,248,86,106,113,228,122,12,0,135,98,
514 227,147,21,24,0,14,115,246,236,89,164,166,166,34,61,61,221,72,227,111,132,
515 255,84,127,159,212,226,40,228,48,0,28,162,184,184,24,239,188,243,14,150,
516 45,91,134,170,170,42,61,67,8,0,95,192,255,23,127,175,212,226,40,100,49,
517 0,108,198,198,39,59,49,0,108,82,82,82,130,183,223,126,91,70,227,39,1,216,
518 35,181,56,10,27,12,0,139,73,108,252,121,0,190,145,89,27,133,31,6,128,69,
519 74,75,75,177,116,233,82,44,95,190,28,151,47,95,214,59,76,14,128,63,131,
520 141,79,146,48,0,76,86,90,90,138,21,43,86,32,53,53,21,229,229,229,122,135,
521 201,1,240,42,128,221,242,42,35,98,0,152,70,98,227,191,6,96,151,188,202,
522 136,126,193,0,144,172,172,172,12,203,151,47,151,209,248,175,3,216,41,175,
523 50,162,91,49,0,36,81,26,63,45,45,13,23,47,94,212,59,12,27,159,44,197,0,
524 48,232,220,185,115,88,182,108,153,209,198,207,135,191,241,191,150,87,25,
525 81,112,12,0,157,46,93,186,132,149,43,87,34,57,57,25,23,46,92,208,59,76,
526 62,252,183,229,110,149,86,24,145,6,12,0,141,36,54,254,92,0,91,228,85,70,
527 164,29,3,64,37,137,141,255,6,128,205,242,42,35,210,143,1,16,132,210,248,
528 41,41,41,56,127,254,188,222,97,216,248,228,72,12,128,6,84,84,84,32,35,35,
529 67,70,227,39,1,216,36,175,50,34,121,24,0,1,148,198,95,178,100,9,206,157,
530 59,167,119,152,124,0,41,0,178,228,85,70,20,222,124,240,223,8,115,203,146,
531 158,158,46,140,186,116,233,146,72,75,75,19,29,58,116,168,119,27,42,151,
532 124,0,227,173,60,40,68,225,194,148,0,168,168,168,144,209,248,219,192,198,
533 39,50,149,212,0,80,26,191,99,199,142,70,26,191,0,108,124,34,75,72,9,0,54,
534 62,145,59,25,10,128,202,202,74,145,150,150,38,58,117,234,100,164,241,247,
535 1,136,7,16,97,225,126,19,17,116,6,64,117,117,181,240,122,189,108,124,34,
536 151,211,20,0,74,227,119,238,220,217,72,227,239,7,27,159,200,17,84,5,128,
537 207,231,147,209,248,7,192,198,39,114,148,70,3,64,105,252,46,93,186,176,
538 241,137,66,80,131,1,16,27,27,107,180,241,247,1,152,8,54,62,145,99,53,24,
539 0,6,150,131,0,166,3,240,88,184,31,68,164,131,204,0,80,26,63,210,210,61,
540 32,34,221,100,4,192,65,248,255,199,231,95,124,34,151,49,18,0,135,192,191,
541 248,68,174,166,39,0,14,131,141,79,20,18,180,4,192,17,0,83,193,83,125,162,
542 144,161,38,0,78,0,152,9,78,116,66,20,114,26,11,0,54,62,81,136,171,47,0,
543 78,130,141,79,20,22,110,12,0,54,62,81,152,241,1,56,5,54,62,81,88,250,61,
544 128,219,237,46,130,136,136,136,136,136,136,136,136,136,136,136,136,136,
545 136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
546 136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
547 136,168,81,255,15,142,86,241,164,142,198,204,179,0,0,0,0,73,69,78,68,174,
548 66,96,130};
549 
550 static size_t xml_res_size_4 = 648;
551 static unsigned char xml_res_file_4[] = {
552 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
553 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
554 72,89,115,0,0,4,70,0,0,4,70,1,102,1,155,153,0,0,0,25,116,69,88,116,83,111,
555 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
556 111,114,103,155,238,60,26,0,0,2,5,73,68,65,84,88,133,237,150,177,142,218,
557 64,16,134,127,54,186,158,93,48,10,54,6,10,75,137,168,66,146,10,30,1,137,
558 87,72,19,81,34,145,250,210,187,77,27,145,68,148,80,33,132,146,14,148,84,
559 17,21,148,136,230,66,129,128,42,231,59,161,24,100,38,69,236,147,113,72,
560 240,157,206,118,115,191,100,217,179,197,206,231,153,217,217,1,30,20,177,
561 30,29,91,100,140,157,19,209,6,192,34,100,158,63,74,165,82,19,73,146,126,
562 37,147,201,111,0,94,68,2,48,30,143,169,215,235,237,53,77,251,201,57,255,
563 14,224,101,168,0,147,201,132,136,136,44,203,114,64,46,67,3,113,3,56,178,
564 44,139,58,157,206,94,85,213,43,27,36,184,212,28,3,240,130,100,179,217,43,
565 33,196,87,0,207,67,5,56,22,17,27,164,24,42,128,23,36,147,201,24,241,120,
566 124,120,47,32,94,128,110,183,75,170,170,30,56,30,12,6,196,57,167,225,112,
567 120,0,162,40,138,3,242,44,48,128,209,104,68,137,68,130,250,253,254,63,35,
568 162,40,138,33,132,248,2,224,233,189,2,76,167,83,74,167,211,212,110,183,
569 255,155,154,237,118,75,173,86,107,47,203,242,73,144,55,0,222,1,120,108,
570 219,53,198,152,89,42,149,104,185,92,30,0,204,231,115,202,229,114,212,108,
571 54,125,213,135,23,132,115,254,25,192,71,0,63,0,124,2,112,6,0,111,1,16,128,
572 107,0,239,1,236,108,155,234,245,250,13,128,16,130,52,77,35,89,150,105,189,
573 94,251,6,112,100,154,38,53,26,141,189,179,183,253,188,98,158,104,144,219,
574 136,197,98,55,223,134,97,64,215,117,20,10,5,84,171,85,108,54,155,91,167,
575 214,187,191,99,123,83,240,154,49,102,150,203,101,90,173,86,127,213,128,
576 97,24,84,44,22,169,82,169,208,110,183,187,75,10,62,0,184,176,223,103,71,
577 49,79,157,130,197,98,65,249,124,158,106,181,154,47,199,118,17,62,241,29,
578 39,63,125,96,54,155,145,36,73,164,235,250,193,122,32,199,208,143,2,109,
579 68,126,28,187,90,241,221,29,223,6,32,144,59,192,15,64,100,215,177,219,113,
580 224,179,226,137,145,44,248,33,213,51,148,134,55,11,186,1,34,29,203,25,99,
581 231,8,243,143,31,20,165,126,3,125,215,199,83,193,217,127,124,0,0,0,0,73,
582 69,78,68,174,66,96,130};
583 
584 static size_t xml_res_size_5 = 1454;
585 static unsigned char xml_res_file_5[] = {
586 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,64,0,0,0,64,8,6,0,0,
587 0,170,105,113,222,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
588 72,89,115,0,0,8,140,0,0,8,140,1,41,221,10,159,0,0,0,25,116,69,88,116,83,
589 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
590 46,111,114,103,155,238,60,26,0,0,5,43,73,68,65,84,120,156,237,154,77,104,
591 20,103,28,135,159,73,19,41,145,157,236,186,249,218,164,162,182,77,66,91,
592 68,196,83,201,81,144,245,18,188,39,20,84,168,23,41,72,41,123,210,212,20,
593 116,147,75,226,65,33,68,176,198,210,150,22,193,131,8,18,16,130,57,164,4,
594 41,109,67,181,65,211,152,216,170,201,230,131,236,110,52,93,51,255,30,214,
595 137,235,100,118,179,155,204,71,140,243,192,156,246,221,153,255,239,153,
596 143,247,131,23,60,60,60,60,60,222,94,222,41,160,237,126,160,20,152,178,
597 169,22,87,40,42,160,109,35,240,59,240,35,240,177,61,229,108,108,78,1,242,
598 242,88,2,190,7,62,114,181,34,135,57,5,200,161,67,135,164,182,182,86,35,
599 45,226,5,240,29,208,224,106,101,14,113,10,144,43,87,174,200,226,226,162,
600 116,119,119,75,77,77,141,46,98,9,248,137,77,46,98,89,128,206,219,38,98,
601 133,0,163,136,80,40,100,20,81,239,106,197,22,147,85,128,206,243,231,207,
602 179,137,168,115,181,114,139,88,85,128,81,68,117,117,181,6,136,162,40,41,
603 160,151,55,92,68,222,2,116,146,201,164,116,117,117,153,137,248,208,221,
604 40,107,163,96,1,58,137,68,66,186,186,186,164,170,170,202,40,226,3,119,35,
605 21,198,154,5,108,22,17,235,22,96,20,81,89,89,105,20,241,190,187,17,115,
606 99,153,0,157,120,60,110,20,241,31,208,13,188,231,110,84,115,44,23,144,41,
607 34,26,141,74,32,16,48,138,168,117,55,242,235,216,38,192,40,194,239,247,
608 111,72,17,171,10,56,114,228,136,0,210,216,216,152,51,232,196,196,132,236,
609 220,185,83,0,217,189,123,183,196,98,177,215,126,159,159,159,207,38,162,
610 198,234,80,133,172,7,88,66,44,22,227,192,129,3,140,141,141,81,87,87,199,
611 205,155,55,9,6,131,175,181,241,249,124,68,34,17,198,199,199,149,104,52,
612 138,170,170,197,192,231,138,162,140,97,177,8,71,5,204,207,207,19,14,135,
613 185,123,247,46,219,183,111,167,175,175,143,80,40,148,181,189,46,98,98,98,
614 194,40,226,111,210,34,178,255,57,79,28,19,240,236,217,51,154,154,154,184,
615 115,231,14,149,149,149,244,245,245,177,99,199,142,188,254,107,242,68,148,
616 144,22,241,0,56,199,58,68,56,34,96,105,105,137,150,150,22,250,251,251,41,
617 47,47,231,214,173,91,52,52,20,62,99,86,85,149,72,36,194,232,232,168,210,
618 218,218,138,207,231,123,23,248,66,81,148,251,164,69,84,175,181,70,37,143,
619 54,107,250,8,106,154,38,135,15,31,22,64,84,85,149,161,161,161,60,251,132,
620 213,137,197,98,210,218,218,42,170,170,234,31,203,228,90,69,252,10,124,70,
621 246,85,226,70,96,4,144,61,123,246,200,237,219,183,243,22,112,226,196,9,
622 1,164,180,180,84,250,251,251,45,11,111,38,194,231,243,25,69,84,1,197,192,
623 87,192,47,164,23,117,207,1,1,99,192,69,210,243,247,97,19,17,45,164,215,
624 254,244,5,81,41,42,42,146,203,151,47,175,42,224,228,201,147,2,200,150,45,
625 91,228,198,141,27,182,132,207,100,106,106,202,40,34,1,140,103,214,254,242,
626 24,7,42,204,4,232,135,46,34,8,204,153,156,64,84,85,93,209,127,103,10,232,
627 236,236,92,110,123,236,216,49,219,195,27,69,68,34,17,41,41,41,209,204,106,
628 127,121,124,155,75,128,126,140,229,56,129,92,187,118,205,84,128,207,231,
629 19,69,81,68,81,148,229,39,230,234,213,171,142,74,16,17,9,135,195,89,107,
630 7,38,193,166,94,32,30,143,19,10,133,24,28,28,164,190,190,30,77,211,104,
631 110,110,102,96,96,192,142,203,89,130,241,9,248,131,87,175,192,44,38,6,203,
632 202,202,100,122,122,218,244,9,240,251,253,50,60,60,44,34,34,35,35,35,82,
633 81,81,33,128,4,131,65,185,119,239,158,237,119,62,207,87,224,146,153,0,253,
634 221,207,124,50,154,49,249,8,246,246,246,174,184,112,182,185,192,208,208,
635 144,108,221,186,85,0,217,181,107,151,60,126,252,216,182,224,38,31,193,135,
636 38,225,31,98,248,8,174,214,13,126,10,252,5,200,222,189,123,101,96,96,192,
637 180,128,92,147,161,235,215,175,75,113,113,177,0,178,111,223,62,137,199,
638 227,118,6,55,118,131,95,2,131,192,111,64,39,224,55,6,180,109,32,148,73,
639 79,79,207,242,93,56,120,240,160,164,82,169,117,5,207,209,255,175,121,68,
640 104,171,0,145,87,99,3,64,142,30,61,186,174,224,86,140,0,29,23,160,105,218,
641 114,59,64,218,218,218,242,14,62,61,61,109,12,190,192,58,39,67,150,10,56,
642 126,252,184,4,2,1,9,135,195,57,131,164,82,41,105,106,106,146,64,32,32,219,
643 182,109,91,117,140,160,47,144,148,149,149,233,193,23,177,104,58,108,169,
644 0,171,201,17,220,178,5,145,98,171,78,100,37,241,120,156,11,23,46,16,141,
645 70,101,110,110,78,81,20,229,5,112,73,68,78,3,255,90,121,173,13,37,32,145,
646 72,112,254,252,121,179,224,109,192,63,118,92,115,67,8,208,131,183,183,183,
647 203,236,236,172,35,193,117,92,21,160,7,239,232,232,96,102,102,134,140,224,
648 223,0,143,156,168,193,21,1,201,100,146,139,23,47,114,230,204,25,153,156,
649 156,212,239,248,15,34,242,53,48,234,100,45,142,10,48,9,190,68,58,248,105,
650 224,129,147,181,232,56,34,64,15,126,246,236,89,121,250,244,233,134,8,174,
651 99,171,128,133,133,5,122,122,122,136,70,163,242,228,201,147,204,224,109,
652 192,125,59,175,109,7,86,108,145,121,35,119,134,232,120,155,164,200,34,224,
653 173,221,38,151,99,163,228,166,10,174,227,109,149,5,111,179,244,166,219,
654 46,95,232,56,64,3,126,6,218,128,63,173,47,103,99,179,31,248,196,237,34,
655 60,60,60,60,60,60,172,227,127,242,172,196,144,240,2,93,107,0,0,0,0,73,69,
656 78,68,174,66,96,130};
657 
658 static size_t xml_res_size_6 = 845;
659 static unsigned char xml_res_file_6[] = {
660 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
661 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
662 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
663 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
664 46,111,114,103,155,238,60,26,0,0,2,202,73,68,65,84,88,133,189,151,191,75,
665 91,81,20,199,63,231,249,226,139,162,160,208,66,210,116,180,160,67,113,176,
666 226,32,130,21,156,28,116,20,58,118,118,232,42,214,36,214,150,118,18,236,
667 127,80,42,56,198,210,77,16,161,237,32,209,193,14,254,192,14,29,140,9,88,
668 80,26,137,121,106,60,29,18,127,52,47,198,151,248,226,217,238,185,247,221,
669 239,135,115,223,61,231,92,81,85,220,152,124,252,101,113,112,56,0,12,3,29,
670 32,65,208,96,97,54,9,154,4,54,129,5,90,91,150,116,172,205,118,181,239,109,
671 0,242,110,45,200,169,78,34,188,0,154,93,209,66,26,101,14,159,76,233,120,
672 87,178,42,0,137,46,251,145,166,9,224,21,208,232,82,184,216,50,192,12,122,
673 52,173,225,254,172,107,0,137,198,3,136,196,128,158,42,133,139,109,5,213,
674 17,13,119,167,138,39,12,135,248,235,239,157,136,196,61,20,7,232,65,36,46,
675 111,214,158,58,244,174,71,64,38,190,5,209,92,156,186,250,16,102,189,135,
676 250,151,182,139,106,247,245,72,92,70,64,162,203,126,206,115,95,80,66,156,
677 157,192,217,73,45,0,30,35,18,147,232,178,223,1,128,77,4,120,118,57,174,
678 29,68,79,225,231,6,10,71,32,19,75,33,212,216,65,105,112,44,55,235,169,193,
679 113,100,48,165,77,199,187,146,249,8,156,27,145,146,226,80,171,72,52,114,
680 170,147,0,194,236,142,69,106,247,15,74,83,217,79,188,143,68,154,214,150,
681 135,6,169,196,224,173,226,80,139,72,52,115,112,56,96,130,142,252,231,181,
682 234,104,127,96,221,248,149,152,38,134,239,230,249,114,182,177,159,229,175,
683 157,187,238,26,54,65,218,225,42,23,116,6,26,248,58,250,164,236,70,150,101,
684 225,247,251,203,174,41,101,207,63,109,179,252,59,125,221,213,97,160,4,42,
685 221,200,182,109,178,217,146,169,189,66,147,160,129,104,197,0,222,65,104,
686 208,81,11,238,27,194,64,197,81,161,238,15,66,146,6,194,157,0,238,6,161,
687 73,19,116,11,232,189,112,173,167,142,25,252,188,93,21,136,152,245,101,175,
688 232,198,190,3,114,211,4,137,129,190,188,240,164,237,28,241,68,166,42,0,
689 200,84,154,49,23,12,2,161,69,132,163,42,21,157,230,62,99,166,105,109,89,
690 50,116,172,205,70,153,247,12,192,45,132,50,167,99,109,118,254,26,90,190,
691 48,194,241,61,66,100,240,201,20,20,26,18,13,247,238,161,204,122,10,80,30,
692 98,230,162,93,191,74,68,22,17,96,245,30,32,86,208,163,233,139,65,233,166,
693 84,9,121,14,146,191,29,55,55,165,0,58,221,151,4,134,16,18,158,3,228,78,
694 18,156,231,134,138,223,6,142,90,160,111,251,215,145,186,110,188,61,142,
695 85,164,174,91,35,61,63,139,39,74,22,35,157,238,75,98,209,7,124,184,211,
696 237,16,142,17,227,61,22,125,133,232,58,151,220,250,56,141,254,120,132,125,
697 26,69,24,117,213,186,229,133,143,80,230,177,124,97,13,247,238,149,93,90,
698 209,243,60,149,24,204,183,112,210,142,18,184,236,37,84,82,249,162,166,91,
699 32,49,2,161,69,183,207,243,127,112,231,61,10,138,240,143,199,0,0,0,0,73,
700 69,78,68,174,66,96,130};
701 
702 static size_t xml_res_size_7 = 1244;
703 static unsigned char xml_res_file_7[] = {
704 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
705 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
706 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
707 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
708 46,111,114,103,155,238,60,26,0,0,4,89,73,68,65,84,88,133,181,151,93,76,
709 91,101,24,199,127,207,161,165,5,193,208,32,210,2,83,230,72,216,98,252,64,
710 36,16,23,162,33,89,118,49,3,75,140,31,17,221,197,174,208,132,41,94,44,186,
711 32,208,73,102,188,218,148,59,19,99,162,33,89,116,78,70,162,162,219,8,6,
712 48,153,29,55,114,49,150,0,19,55,40,91,130,108,192,74,79,219,211,215,139,
713 150,66,219,211,210,18,247,191,122,63,158,243,60,191,243,158,247,60,239,
714 243,138,82,138,76,36,125,211,54,150,239,54,1,45,192,62,16,23,40,87,116,
715 214,11,202,11,92,3,46,224,40,26,86,237,85,122,70,126,183,3,144,83,19,46,
716 130,170,11,161,21,40,204,136,22,86,81,244,99,149,147,234,68,173,119,71,
717 0,226,30,177,35,5,157,64,7,144,159,97,224,68,249,128,211,168,181,94,213,
718 253,146,63,99,0,113,123,156,136,12,0,245,27,99,182,28,33,207,170,69,188,
719 6,195,4,140,204,62,93,84,87,80,234,176,234,174,91,76,156,208,146,130,127,
720 60,246,12,34,158,173,193,1,58,26,74,89,62,94,195,242,241,26,142,62,251,
721 72,54,193,1,234,17,241,200,39,19,79,165,5,144,206,81,23,225,208,79,132,
722 2,21,217,70,200,64,21,40,245,179,184,61,78,83,0,113,143,216,9,27,131,40,
723 202,9,5,32,20,120,0,12,84,32,50,32,238,17,123,18,0,58,61,192,243,177,254,
724 131,131,168,143,110,238,77,0,113,143,151,33,28,75,50,77,3,209,92,93,68,
725 91,109,9,109,181,37,20,230,230,100,11,209,33,167,38,92,0,22,0,244,160,27,
726 200,51,53,77,1,240,65,67,41,47,62,30,73,11,67,51,43,172,6,140,108,0,242,
727 9,170,46,224,29,139,244,77,219,16,222,32,221,95,21,10,16,10,164,78,108,
728 57,2,103,14,238,2,224,246,253,16,159,142,165,205,61,17,9,173,210,55,253,
729 190,133,197,249,3,40,10,182,179,55,130,1,252,126,63,118,187,61,105,206,
730 162,9,239,213,151,2,112,125,201,79,255,228,18,77,149,15,3,48,121,199,199,
731 132,215,103,230,178,144,229,187,77,22,80,135,183,199,141,72,215,51,74,239,
732 60,231,202,231,235,150,74,0,62,27,95,76,5,0,208,98,1,217,75,218,245,143,
733 168,198,153,31,131,232,122,161,24,71,225,102,118,30,62,82,29,107,63,225,
734 176,241,229,203,149,177,126,67,197,67,233,220,238,211,80,56,205,102,74,
735 11,172,113,125,239,90,48,214,206,215,140,184,205,89,86,184,105,107,213,
736 132,146,124,75,172,111,203,73,74,182,91,36,46,13,81,113,0,182,28,225,68,
737 163,139,201,182,39,105,125,186,56,54,126,115,37,254,111,208,117,29,191,
738 223,244,124,201,66,202,101,73,28,58,247,90,21,141,143,69,246,228,153,131,
739 187,152,187,167,51,54,183,134,32,73,143,111,236,9,179,141,153,169,52,148,
740 196,157,80,125,127,222,142,181,173,154,240,237,225,221,236,113,216,145,
741 228,248,49,136,157,175,132,120,53,132,56,128,223,102,86,232,159,92,138,
742 245,29,118,11,223,189,186,155,226,188,212,217,110,231,16,202,171,129,154,
743 74,28,254,232,242,60,11,171,155,223,124,143,195,206,187,117,143,166,117,
744 181,67,136,107,26,200,64,226,232,138,110,208,254,203,63,113,99,86,45,197,
745 55,216,6,194,179,112,63,221,35,23,52,156,229,23,17,214,18,103,46,223,88,
746 229,155,191,150,204,30,202,10,194,23,12,167,50,93,197,81,52,172,169,246,
747 42,29,197,89,51,139,15,47,221,226,143,155,73,108,89,67,152,74,209,175,218,
748 171,244,72,150,176,89,187,17,214,19,109,124,193,48,175,124,63,195,239,115,
749 171,255,55,132,15,171,156,132,104,61,160,186,247,47,160,248,194,204,114,
750 61,24,230,245,115,179,92,154,93,201,26,98,197,231,103,232,250,29,179,169,
751 211,27,229,250,102,158,180,209,3,92,53,179,246,135,194,188,121,126,150,
752 161,233,123,25,7,215,13,197,91,231,103,25,153,254,55,177,166,184,130,90,
753 235,221,232,196,149,229,210,57,234,66,25,30,20,229,102,78,173,154,240,85,
754 115,37,205,213,69,105,131,7,12,197,219,63,206,242,235,204,150,85,179,228,
755 130,37,247,22,74,213,109,45,207,227,78,10,213,219,232,5,14,33,204,155,57,
756 14,134,21,71,7,255,230,135,169,229,180,193,143,12,220,136,15,14,96,4,230,
757 9,27,135,18,239,6,230,23,147,206,81,23,97,99,144,173,69,234,22,105,2,133,
758 54,243,204,24,52,148,217,175,119,21,45,167,57,250,130,241,177,210,94,205,
759 116,122,16,142,161,82,212,139,219,73,88,7,237,115,114,195,238,172,174,102,
760 241,32,227,101,232,65,119,180,110,220,182,116,139,6,94,67,113,22,155,181,
761 91,117,239,95,72,107,154,213,245,124,113,254,64,164,132,147,189,40,156,
762 177,90,66,201,98,228,80,83,83,32,3,56,203,47,102,122,61,255,15,18,39,215,
763 228,219,192,187,72,0,0,0,0,73,69,78,68,174,66,96,130};
764 
765 static size_t xml_res_size_8 = 724;
766 static unsigned char xml_res_file_8[] = {
767 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,31,0,0,0,31,8,6,0,0,
768 0,31,174,22,57,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,
769 89,115,0,0,4,157,0,0,4,157,1,124,52,107,161,0,0,0,25,116,69,88,116,83,111,
770 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
771 111,114,103,155,238,60,26,0,0,2,81,73,68,65,84,72,137,189,151,61,104,19,
772 97,28,135,159,55,38,33,53,105,74,62,68,107,18,23,65,90,104,172,86,16,210,
773 162,131,20,69,164,186,170,69,45,10,130,5,113,112,42,136,100,8,214,118,112,
774 9,40,14,213,197,89,23,71,59,22,151,150,104,4,77,106,83,138,226,34,129,214,
775 80,228,114,185,228,28,108,74,130,249,120,239,114,241,7,55,220,189,31,207,
776 243,231,184,247,207,9,0,226,203,35,8,253,29,29,230,1,47,190,253,210,237,
777 167,147,241,100,65,102,190,29,128,114,201,129,221,238,235,20,30,35,237,
778 235,19,219,57,247,236,157,35,143,103,158,109,182,155,111,3,160,162,8,74,
779 197,78,217,0,140,137,143,193,9,117,105,237,118,60,30,148,131,3,148,75,160,
780 169,150,8,140,138,180,255,134,237,245,234,221,71,51,251,228,224,240,23,
781 110,149,0,105,223,21,237,109,182,149,128,237,159,39,22,10,196,248,228,155,
782 210,222,124,141,207,79,31,144,131,27,16,136,120,157,109,231,140,144,233,
783 155,80,22,179,141,4,26,195,37,4,246,187,29,188,191,53,64,191,199,33,33,
784 144,245,94,84,22,179,241,185,155,7,229,224,109,4,230,198,195,132,122,157,
785 36,206,132,218,194,1,142,147,245,94,42,46,101,18,137,235,187,11,90,195,
786 155,8,156,232,223,203,181,163,1,0,166,134,131,156,12,185,1,88,19,17,86,
787 24,100,133,65,114,132,89,39,84,119,121,217,238,141,150,55,62,92,152,125,
788 234,131,234,33,35,35,0,96,119,34,128,228,249,67,216,196,142,189,128,39,
789 103,35,156,122,153,225,158,126,95,102,183,32,197,202,97,96,185,125,229,
790 181,2,154,202,100,52,64,44,236,169,27,26,139,120,184,60,228,151,222,170,
791 26,121,56,208,35,52,30,142,6,26,142,205,143,135,113,59,12,109,103,12,126,
792 117,200,207,111,69,33,247,179,190,111,124,47,168,168,101,157,201,104,99,
793 177,102,145,123,231,59,89,72,229,89,72,229,25,8,246,144,154,30,198,229,
794 114,1,112,238,213,42,95,242,138,33,48,24,172,188,54,197,98,17,69,49,14,
795 172,141,161,202,27,9,8,33,76,175,55,93,121,53,138,162,160,155,236,5,29,
796 195,1,244,146,185,102,100,9,28,48,213,13,173,131,155,16,176,22,110,80,192,
797 122,184,1,129,238,192,37,5,186,7,151,16,232,46,188,141,64,247,225,45,4,
798 254,15,188,137,128,169,179,125,125,83,225,216,243,207,187,247,63,10,146,
799 223,118,21,190,199,110,30,174,150,117,54,182,76,254,94,105,42,84,202,182,
800 26,184,67,131,210,150,185,221,76,68,71,3,248,3,55,71,228,58,37,20,139,19,
801 0,0,0,0,73,69,78,68,174,66,96,130};
802 
803 static size_t xml_res_size_9 = 760;
804 static unsigned char xml_res_file_9[] = {
805 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
806 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
807 72,89,115,0,0,4,193,0,0,4,193,1,17,118,177,117,0,0,0,25,116,69,88,116,83,
808 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
809 46,111,114,103,155,238,60,26,0,0,2,117,73,68,65,84,88,133,197,214,79,72,
810 20,81,28,192,241,239,155,93,214,178,40,91,18,81,195,130,214,139,183,16,
811 194,91,167,194,72,187,104,183,82,59,88,10,5,18,29,236,80,237,46,81,65,183,
812 2,65,48,180,162,32,219,254,128,10,81,68,80,212,33,84,232,207,169,164,75,
813 127,212,245,79,165,228,238,204,238,204,235,16,171,107,234,250,230,79,245,
814 187,189,223,204,111,230,195,239,189,55,111,4,0,225,161,16,194,122,133,203,
815 40,20,223,56,99,117,221,62,30,238,109,85,173,241,3,224,179,124,88,108,114,
816 11,208,164,164,85,139,181,136,72,253,218,99,103,99,77,74,53,0,232,115,26,
817 41,221,237,251,1,240,97,209,34,238,53,118,68,234,174,171,3,0,204,20,94,
818 34,142,138,251,135,58,162,245,55,212,1,25,68,218,240,4,161,97,209,34,239,
819 30,236,142,212,246,170,3,224,55,192,35,132,16,146,70,250,15,244,68,107,
820 238,168,3,20,17,229,193,53,84,22,231,83,89,156,79,40,152,151,19,209,32,
821 7,234,123,34,53,49,117,128,2,226,202,222,50,6,155,43,24,108,174,224,114,
822 117,89,78,172,16,146,6,49,80,119,53,186,191,79,29,160,128,176,19,2,201,
823 97,250,106,186,163,181,253,234,128,191,128,104,162,111,223,173,232,158,
824 71,153,156,95,169,50,3,240,7,114,222,54,73,1,219,229,131,101,95,92,192,
825 108,118,106,119,225,133,19,161,137,83,213,35,106,0,69,132,137,198,71,74,
826 21,159,103,10,80,153,130,63,17,30,77,71,38,212,59,144,141,240,48,236,117,
827 32,11,97,232,201,255,8,0,82,134,65,50,233,30,97,127,10,178,66,215,221,31,
828 94,142,59,144,141,72,25,206,33,174,1,0,134,174,59,94,156,158,0,0,199,91,
829 212,59,128,67,132,173,69,88,178,33,192,145,29,155,1,8,5,23,190,136,229,
830 193,60,194,187,74,0,232,28,158,100,52,97,172,250,217,206,132,173,14,124,
831 157,49,216,89,186,142,182,170,34,182,110,92,248,7,216,86,144,71,91,85,17,
832 85,91,214,51,54,107,216,234,132,237,41,104,127,242,25,83,202,37,121,83,
833 74,78,62,254,196,252,21,69,132,109,192,155,241,4,55,223,78,47,201,95,123,
834 61,197,187,120,98,113,82,1,225,104,17,158,123,54,202,140,110,206,143,127,
835 36,77,206,63,31,93,254,230,85,16,142,0,241,159,41,46,189,28,159,31,95,124,
836 49,198,228,92,122,229,130,28,8,199,219,176,115,40,206,135,233,36,239,167,
837 146,116,13,79,172,94,176,2,194,241,89,96,152,146,211,79,191,96,73,72,89,
838 75,23,229,138,8,88,180,69,93,29,70,15,71,102,236,23,101,16,1,159,123,128,
839 227,72,27,32,165,182,0,48,53,19,172,239,255,22,33,76,128,95,176,208,9,84,
840 8,125,2,62,0,0,0,0,73,69,78,68,174,66,96,130};
841 
842 static size_t xml_res_size_10 = 1387;
843 static unsigned char xml_res_file_10[] = {
844 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
845 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
846 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
847 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
848 46,111,114,103,155,238,60,26,0,0,4,232,73,68,65,84,88,133,157,151,93,108,
849 84,69,20,128,191,217,237,222,187,109,183,116,55,180,208,165,11,180,6,161,
850 109,68,137,72,90,5,82,160,18,76,32,252,36,62,16,49,38,168,49,106,2,145,
851 24,35,82,161,187,88,8,241,15,8,250,64,162,79,136,33,18,21,80,49,4,45,148,
852 96,160,20,98,168,134,22,65,133,208,150,109,5,183,101,75,187,255,227,67,
853 183,187,221,191,123,47,158,100,30,102,206,153,51,223,189,103,230,156,25,
854 33,165,196,136,136,125,215,85,124,3,75,128,85,64,53,8,39,72,103,92,123,
855 27,228,109,160,19,56,138,195,222,34,55,204,8,26,242,171,7,32,118,94,114,
856 18,150,219,16,172,3,138,12,209,130,31,201,65,44,98,187,220,50,247,246,255,
857 2,16,158,211,86,132,237,93,96,19,80,144,205,198,97,53,227,11,68,181,252,
858 15,3,187,145,67,205,178,105,81,192,48,128,240,180,151,33,196,17,160,86,
859 203,251,129,53,149,28,187,58,192,225,43,62,45,51,128,54,164,92,45,155,230,
860 121,211,21,166,140,197,183,158,125,12,33,218,245,22,175,115,21,178,110,
861 246,68,62,88,58,21,107,94,134,155,116,169,69,136,118,241,222,165,217,154,
862 0,194,221,90,70,44,242,61,145,144,75,203,155,0,246,44,155,134,0,166,23,
863 43,188,245,212,100,61,0,0,23,82,30,23,158,246,178,172,0,194,115,69,33,36,
864 191,69,226,34,18,130,72,40,167,167,231,31,157,72,109,121,97,162,191,121,
865 190,19,215,4,197,24,132,16,71,132,231,180,53,3,128,96,127,35,80,151,232,
866 231,128,40,180,152,216,213,144,250,131,10,44,38,118,53,148,27,1,0,168,141,
867 111,238,36,128,104,60,225,68,240,102,134,105,22,136,45,11,157,76,41,178,
868 100,152,62,55,123,34,117,174,194,140,241,28,178,73,236,188,228,76,0,32,
869 21,15,146,236,179,199,65,56,172,102,26,42,39,208,121,39,245,68,141,68,98,
870 116,244,13,179,126,78,137,81,128,2,194,114,27,128,96,255,69,11,55,253,119,
871 145,58,73,38,79,25,109,64,133,93,229,239,141,201,13,125,185,111,152,57,
872 251,175,24,93,124,76,252,56,236,165,38,110,12,45,209,91,220,44,68,206,61,
873 161,57,71,91,138,240,13,44,49,33,99,43,115,89,168,102,193,27,117,147,249,
874 120,89,124,211,61,0,196,249,151,170,88,49,179,88,207,108,149,9,147,168,
875 206,166,89,57,203,78,219,203,213,184,235,167,80,164,154,147,138,72,8,25,
876 214,175,51,85,37,249,124,183,246,97,78,172,155,73,77,105,126,46,179,106,
877 193,59,167,186,128,89,99,35,53,165,249,188,255,180,139,5,211,108,9,171,
878 152,132,112,44,153,178,5,80,84,96,197,106,29,61,206,18,8,69,83,83,186,98,
879 22,140,5,33,18,147,124,218,222,143,187,181,151,129,148,218,33,174,9,182,
880 156,242,35,177,57,242,243,104,92,88,198,250,57,37,70,226,7,128,170,170,
881 9,8,35,114,103,56,66,99,75,15,159,253,250,15,241,239,25,74,73,197,6,175,
882 6,9,9,6,131,4,2,89,139,92,86,145,241,54,94,50,66,80,93,154,207,174,134,
883 114,234,167,39,15,70,182,16,40,230,228,95,82,84,21,147,69,77,113,60,62,
884 4,225,152,228,147,11,253,120,90,123,25,12,102,134,160,5,201,226,116,218,
885 229,51,139,105,94,92,78,165,93,229,155,46,31,47,30,189,145,208,77,43,86,
886 233,120,181,38,209,255,189,127,132,5,7,254,74,228,9,0,255,230,199,177,41,
887 38,126,188,62,200,166,19,183,184,122,55,235,159,58,147,71,76,118,34,68,
888 6,192,15,127,12,114,242,207,123,188,246,196,36,42,29,6,10,205,216,241,140,
889 67,116,222,25,193,221,218,203,241,107,131,90,179,58,243,16,166,99,32,95,
890 207,166,13,69,37,123,219,250,12,111,202,241,16,79,126,222,69,84,127,83,
891 29,53,81,97,107,65,224,215,178,50,224,40,21,34,18,50,50,199,143,195,222,
892 98,146,175,204,13,35,229,33,35,190,237,86,51,63,189,48,139,175,158,125,
893 136,80,84,38,90,133,93,225,236,250,42,246,60,51,53,5,66,83,36,7,229,134,
894 25,193,209,99,168,152,182,33,184,175,7,48,16,136,114,246,166,159,170,18,
895 43,138,89,36,154,77,49,243,200,164,124,190,252,237,223,164,177,54,196,48,
896 22,177,29,226,229,88,186,235,189,72,62,210,3,0,248,240,92,31,253,195,225,
897 140,241,175,187,124,92,232,73,251,134,220,16,187,199,174,235,201,68,164,
898 78,218,1,156,215,3,24,10,69,105,62,147,122,213,15,68,98,52,157,238,205,
899 62,33,19,162,13,57,212,60,214,73,0,200,166,154,16,138,88,131,160,91,15,
900 226,139,142,187,92,246,142,36,250,123,47,244,211,61,168,17,243,36,68,247,
901 232,245,60,249,70,72,77,197,238,122,47,176,2,65,143,22,64,76,194,219,63,
902 223,2,160,251,94,136,221,231,250,244,152,33,26,234,33,22,93,158,254,54,
903 200,184,208,203,29,139,46,35,204,243,128,139,90,254,206,119,223,231,112,
904 167,143,173,167,122,9,68,98,122,203,95,68,152,231,73,119,109,71,186,66,
905 251,105,22,196,141,96,35,146,172,5,221,110,53,167,149,215,116,39,140,128,
906 105,47,74,204,243,64,79,179,84,144,95,166,16,12,123,16,172,69,98,211,52,
907 78,46,60,132,228,16,170,165,73,54,205,207,177,59,13,2,36,12,247,93,87,241,
908 246,44,5,185,26,68,21,146,50,132,28,125,229,72,225,69,224,5,217,5,226,8,
909 101,229,39,141,62,207,255,3,52,228,253,72,11,53,84,78,0,0,0,0,73,69,78,
910 68,174,66,96,130};
911 
912 static size_t xml_res_size_11 = 834;
913 static unsigned char xml_res_file_11[] = {
914 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
915 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
916 72,89,115,0,0,4,193,0,0,4,193,1,17,118,177,117,0,0,0,25,116,69,88,116,83,
917 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
918 46,111,114,103,155,238,60,26,0,0,2,191,73,68,65,84,88,133,189,214,95,72,
919 20,65,28,192,241,239,236,237,221,94,137,217,147,82,113,15,161,16,249,24,
920 17,190,154,80,20,24,25,151,4,253,67,210,58,43,130,222,18,41,202,243,37,
921 162,151,144,34,178,68,138,186,176,212,254,19,189,20,5,62,4,41,81,4,82,25,
922 21,97,89,87,88,230,221,185,183,211,195,157,94,247,135,107,246,254,244,131,
923 101,102,118,118,126,243,97,119,102,88,33,165,68,28,123,86,133,176,158,144,
924 103,148,243,93,180,139,243,253,7,14,7,90,85,199,232,177,66,234,64,69,190,
925 0,13,139,125,244,249,186,58,164,190,255,200,213,22,181,49,0,145,223,26,
926 102,36,223,249,1,112,96,209,42,174,53,159,246,55,94,80,7,0,152,17,10,137,
927 240,113,189,233,172,223,219,171,14,40,48,66,195,162,133,129,29,231,58,54,
928 93,82,7,20,1,209,44,6,183,118,251,27,174,168,3,10,140,16,72,118,113,99,
929 75,143,127,67,159,58,160,8,136,38,110,121,123,253,245,3,234,128,2,35,0,
930 118,114,123,227,197,206,245,55,213,1,69,64,108,151,247,234,47,251,215,221,
931 153,109,11,41,37,162,253,113,53,50,250,50,235,72,221,21,187,178,132,3,11,
932 15,159,209,176,208,176,16,16,47,37,26,50,94,198,218,159,156,229,203,38,
933 218,234,70,117,101,250,236,91,200,130,136,162,241,142,69,106,249,34,66,
934 3,149,79,144,138,40,224,231,176,15,40,2,194,62,160,192,136,180,53,224,212,
935 4,1,111,165,210,96,167,203,133,203,112,207,181,79,14,141,243,224,237,100,
936 126,0,135,38,168,91,90,170,156,192,237,54,48,12,3,128,192,139,160,173,201,
937 51,2,66,166,197,194,227,195,54,179,252,123,139,42,3,114,138,148,45,186,
938 71,244,179,92,142,1,240,26,15,93,52,22,25,144,130,104,224,33,107,197,16,
939 0,143,88,65,151,180,1,16,128,167,204,200,217,33,156,130,121,97,1,102,34,
940 95,182,72,3,24,186,198,115,95,117,206,0,0,247,96,9,188,143,213,157,142,
941 4,70,9,96,90,146,158,145,175,121,1,214,4,67,84,154,96,232,16,149,217,159,
942 205,8,56,120,255,131,242,100,135,68,47,123,73,254,215,152,79,136,80,188,
943 94,163,143,240,67,212,38,245,183,177,143,51,114,115,102,128,221,112,203,
944 48,11,196,84,198,190,144,9,110,162,148,233,191,146,238,27,114,102,174,158,
945 219,81,108,35,66,38,132,237,172,1,93,19,116,214,46,86,158,192,19,172,99,
946 56,152,124,114,86,77,220,165,116,250,35,0,227,162,130,192,204,106,116,233,
947 64,215,29,0,60,37,177,200,51,2,124,43,203,149,1,224,141,95,127,69,223,27,
948 24,139,3,156,75,56,26,222,29,223,9,233,39,102,26,32,108,90,172,234,126,
949 101,3,144,30,167,126,78,81,19,175,79,207,68,19,29,25,126,106,210,0,18,24,
950 253,22,74,189,109,43,166,132,53,87,183,82,183,225,44,194,97,100,6,252,151,
951 48,35,16,141,106,9,128,196,4,190,20,42,127,187,108,213,79,136,109,2,96,
952 82,150,72,50,157,133,177,57,249,3,235,9,253,190,72,67,151,122,0,0,0,0,73,
953 69,78,68,174,66,96,130};
954 
955 static size_t xml_res_size_12 = 680;
956 static unsigned char xml_res_file_12[] = {
957 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
958 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
959 72,89,115,0,0,4,68,0,0,4,68,1,25,255,88,16,0,0,0,25,116,69,88,116,83,111,
960 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
961 111,114,103,155,238,60,26,0,0,2,37,73,68,65,84,88,133,189,151,63,104,19,
962 81,28,199,63,239,229,146,92,18,144,154,193,34,56,116,8,56,185,8,82,71,23,
963 55,65,11,130,21,92,116,23,255,141,34,37,155,163,131,142,130,147,224,160,
964 131,155,197,65,233,98,21,135,130,165,14,69,227,159,34,73,53,38,173,73,147,
965 188,196,231,164,189,36,191,94,238,206,75,190,112,144,247,126,47,191,247,
966 201,189,207,5,78,89,107,25,21,85,124,225,160,114,183,65,221,24,185,24,214,
967 81,246,140,189,117,108,53,192,90,84,31,64,81,77,13,46,184,203,124,246,186,
968 186,242,196,224,204,6,105,8,160,176,141,195,124,62,191,102,207,46,9,229,
969 38,11,182,243,119,160,61,155,187,104,126,14,94,167,244,203,141,48,155,3,
970 88,84,238,28,139,79,165,126,104,46,121,215,106,239,192,244,194,108,19,79,
971 28,239,160,105,32,11,36,19,187,115,105,12,179,188,11,221,248,144,170,132,
972 7,144,32,14,242,157,87,234,98,104,128,160,209,210,100,211,76,238,56,68,
973 128,73,66,236,62,134,69,229,214,59,236,120,139,239,153,225,180,115,15,18,
974 67,39,21,57,219,228,182,154,251,167,15,216,203,133,54,8,14,120,99,112,40,
975 155,44,224,198,9,177,143,234,87,5,5,192,231,8,250,73,90,208,235,198,5,208,
976 151,96,0,99,132,8,14,48,38,136,112,0,99,128,8,15,240,15,194,196,2,16,72,
977 237,66,222,101,102,42,53,52,175,83,46,218,73,138,223,89,219,220,225,83,
978 189,35,214,66,3,92,56,146,231,234,241,105,177,150,201,100,72,165,134,225,
979 174,61,251,194,157,229,114,60,0,15,86,126,240,188,180,181,103,61,145,116,
980 81,3,119,98,189,218,14,210,58,24,64,169,214,166,84,243,107,248,11,146,105,
981 72,200,199,225,151,104,18,74,49,237,72,98,254,151,132,82,246,18,243,219,
982 182,97,165,220,140,6,224,39,161,20,73,204,71,171,85,230,31,127,136,6,48,
983 74,66,41,131,98,86,26,242,159,87,76,18,74,9,38,102,124,18,74,9,32,102,236,
984 18,74,209,41,151,154,81,188,222,104,68,3,8,43,161,148,55,155,93,78,62,252,
985 24,13,32,138,132,131,169,183,126,67,175,55,228,196,24,37,244,137,22,63,
986 78,40,166,255,135,120,239,64,23,203,125,111,177,162,243,121,44,115,227,
987 228,81,126,175,231,234,230,210,81,108,239,109,236,187,166,201,216,133,19,
988 45,128,63,147,180,205,25,132,236,135,65,0,0,0,0,73,69,78,68,174,66,96,130};
989 
990 static size_t xml_res_size_13 = 708;
991 static unsigned char xml_res_file_13[] = {
992 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
993 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
994 72,89,115,0,0,5,163,0,0,5,163,1,164,52,119,130,0,0,0,25,116,69,88,116,83,
995 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
996 46,111,114,103,155,238,60,26,0,0,2,65,73,68,65,84,88,133,197,151,189,107,
997 19,113,24,199,63,207,229,146,212,40,173,118,16,117,112,208,69,16,28,10,
998 138,56,104,193,197,127,160,8,110,110,29,44,74,209,74,91,46,103,154,74,65,
999 240,101,17,58,184,72,55,157,116,18,234,34,138,155,131,130,173,98,21,193,
1000 183,56,136,73,91,95,146,92,238,113,136,74,122,36,185,203,93,94,158,237,
1001 126,207,243,251,62,159,251,253,158,223,155,168,42,161,45,43,7,113,249,142,
1002 173,43,97,37,140,240,217,1,225,16,6,75,204,200,13,50,50,216,125,0,48,129,
1003 56,194,89,12,86,200,202,56,25,73,116,15,64,137,213,124,109,3,174,98,176,
1004 204,140,140,116,7,160,58,2,94,219,131,112,135,172,60,229,178,28,246,19,
1005 16,111,17,22,44,57,153,48,152,218,100,18,164,58,183,3,59,155,248,21,88,
1006 32,198,4,83,250,213,23,96,117,90,78,40,220,3,18,73,19,250,234,253,95,56,
1007 43,0,105,246,113,147,17,173,212,5,88,75,203,17,215,101,17,37,245,207,217,
1008 102,8,16,94,160,156,193,210,199,27,0,242,147,114,64,12,30,1,91,189,125,
1009 218,14,81,5,89,160,194,4,182,230,36,63,205,94,148,39,192,142,70,241,29,
1010 129,128,85,148,81,67,148,219,205,146,3,20,29,248,237,180,53,121,25,152,
1011 39,197,125,83,133,254,32,245,94,252,11,208,134,145,120,136,203,24,182,190,
1012 130,250,235,184,83,16,31,81,198,73,235,221,218,198,150,165,66,64,148,80,
1013 174,147,34,203,121,253,225,117,6,149,121,143,203,241,255,16,37,232,51,112,
1014 137,49,138,114,177,73,191,7,8,231,176,244,117,163,128,160,0,229,129,57,
1015 125,231,109,116,50,242,205,172,191,153,63,71,185,64,90,23,253,132,35,157,
1016 5,191,202,184,158,213,241,9,56,141,203,80,144,228,16,162,6,106,77,133,74,
1017 209,1,129,181,164,201,21,92,174,97,235,207,86,52,162,45,42,165,4,220,114,
1018 4,43,105,105,46,140,68,36,128,254,56,243,216,234,70,209,136,118,31,136,
1019 152,60,58,64,27,44,232,20,36,11,147,50,228,23,52,176,139,151,140,105,177,
1020 19,0,187,49,120,230,23,180,158,99,255,22,88,106,5,160,231,83,208,123,0,
1021 169,222,215,122,7,224,192,41,224,109,207,0,6,103,245,67,60,193,81,224,77,
1022 79,0,0,82,182,126,142,11,199,68,104,120,108,118,20,0,32,53,171,95,98,38,
1023 195,34,44,119,19,96,195,62,176,249,146,230,214,51,50,92,41,51,39,66,75,
1024 143,76,0,195,36,223,106,159,63,132,231,183,174,19,196,144,63,0,0,0,0,73,
1025 69,78,68,174,66,96,130};
1026 
1027 static size_t xml_res_size_14 = 759;
1028 static unsigned char xml_res_file_14[] = {
1029 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1030 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1031 72,89,115,0,0,5,163,0,0,5,163,1,164,52,119,130,0,0,0,25,116,69,88,116,83,
1032 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1033 46,111,114,103,155,238,60,26,0,0,2,116,73,68,65,84,88,133,197,151,75,104,
1034 19,97,16,128,191,217,236,174,122,16,169,151,82,188,249,194,39,136,86,105,
1035 21,27,3,90,60,120,21,196,199,177,55,241,110,250,72,19,26,209,90,69,177,
1036 136,96,15,30,60,8,245,224,81,16,193,90,65,69,91,8,72,75,209,131,32,52,69,
1037 4,123,176,180,110,154,29,15,33,193,184,221,60,54,15,7,254,203,254,243,248,
1038 152,153,127,254,127,69,85,9,42,18,159,222,142,145,109,209,254,195,31,130,
1039 250,48,130,5,126,187,89,18,83,119,16,119,6,149,35,65,131,3,152,213,5,158,
1040 177,49,150,47,35,86,31,104,75,238,171,86,229,35,48,128,36,166,206,34,122,
1041 29,101,107,241,134,17,106,40,128,196,167,59,16,247,54,208,185,182,70,109,
1042 25,16,191,38,148,107,239,91,201,132,134,17,46,1,82,194,71,26,228,123,69,
1043 209,84,135,52,214,254,180,36,128,140,143,135,72,181,94,193,48,99,152,246,
1044 166,138,28,87,46,14,112,70,7,218,95,172,9,32,253,111,194,184,171,163,40,
1045 251,0,48,237,220,170,175,44,161,198,73,141,29,124,87,0,144,190,201,54,212,
1046 29,65,245,188,71,189,49,16,63,81,186,52,214,254,73,136,190,186,8,122,31,
1047 101,163,175,122,99,32,210,24,238,49,3,139,103,40,15,129,140,175,234,170,
1048 147,91,245,149,54,92,227,81,161,7,164,119,114,15,100,71,81,34,190,38,117,
1049 207,132,164,188,167,160,119,226,28,232,8,202,150,198,67,72,202,115,23,104,
1050 50,252,4,75,118,33,220,34,119,108,138,165,206,229,240,29,68,0,50,240,122,
1051 55,89,247,46,202,41,207,102,33,19,114,3,205,60,240,26,155,47,225,159,177,
1052 237,85,74,149,28,163,154,232,154,5,186,165,119,226,52,48,140,234,254,194,
1053 102,62,11,150,245,67,7,58,190,122,92,39,62,250,55,245,95,82,209,117,172,
1054 201,240,115,236,240,1,68,123,16,153,47,130,112,86,130,63,40,42,5,0,208,
1055 24,174,38,35,99,56,191,119,98,24,113,132,95,0,184,154,109,10,64,1,228,102,
1056 247,146,14,117,13,98,201,14,96,12,113,107,234,200,192,87,169,14,134,23,
1057 128,30,137,7,123,85,229,165,38,99,200,149,230,191,2,212,42,85,151,64,238,
1058 125,89,199,252,183,189,101,21,237,13,235,9,149,119,95,125,15,44,164,183,
1059 33,50,85,86,47,179,2,90,126,108,55,182,4,21,140,237,198,247,64,25,136,230,
1060 52,161,47,132,46,54,239,20,120,32,228,51,161,204,133,154,222,244,129,32,
1061 0,76,123,14,147,136,70,59,211,205,159,3,217,204,28,206,114,68,163,135,210,
1062 208,236,65,36,50,139,197,9,29,58,158,206,127,170,190,4,182,177,136,147,
1063 125,92,181,157,226,96,91,87,53,118,180,232,47,234,15,114,76,236,98,147,
1064 84,227,24,0,0,0,0,73,69,78,68,174,66,96,130};
1065 
1066 static size_t xml_res_size_15 = 1741;
1067 static unsigned char xml_res_file_15[] = {
1068 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
1069 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
1070 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
1071 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
1072 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
1073 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
1074 45,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,
1075 120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,111,112,121,51,
1076 50,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,
1077 97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,
1078 114,105,98,98,111,110,95,99,111,112,121,51,50,46,112,110,103,60,47,111,
1079 98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,
1080 115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,116,
1081 114,108,69,100,105,116,111,114,49,50,56,34,62,67,111,110,116,114,111,108,
1082 69,100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,
1083 116,97,95,105,109,97,103,101,115,95,99,116,114,108,69,100,105,116,111,114,
1084 49,50,56,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,
1085 98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,
1086 112,34,32,110,97,109,101,61,34,99,116,114,108,69,100,105,116,111,114,49,
1087 54,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,
1088 97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,
1089 99,116,114,108,69,100,105,116,111,114,49,54,46,112,110,103,60,47,111,98,
1090 106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
1091 61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,116,114,
1092 108,69,100,105,116,111,114,50,53,54,34,62,67,111,110,116,114,111,108,69,
1093 100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,
1094 97,95,105,109,97,103,101,115,95,99,116,114,108,69,100,105,116,111,114,50,
1095 53,54,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,
1096 106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,
1097 34,32,110,97,109,101,61,34,99,116,114,108,69,100,105,116,111,114,51,50,
1098 34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,
1099 97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,
1100 99,116,114,108,69,100,105,116,111,114,51,50,46,112,110,103,60,47,111,98,
1101 106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
1102 61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,116,114,
1103 108,69,100,105,116,111,114,54,52,34,62,67,111,110,116,114,111,108,69,100,
1104 105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,
1105 95,105,109,97,103,101,115,95,99,116,114,108,69,100,105,116,111,114,54,52,
1106 46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,
1107 99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,
1108 97,109,101,61,34,100,101,108,101,116,101,51,50,34,62,67,111,110,116,114,
1109 111,108,69,100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,
1110 36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
1111 100,101,108,101,116,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,
1112 62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,
1113 66,105,116,109,97,112,34,32,110,97,109,101,61,34,100,114,97,103,51,50,34,
1114 62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,97,
1115 112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,
1116 105,98,98,111,110,95,100,114,97,103,51,50,46,112,110,103,60,47,111,98,106,
1117 101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,
1118 34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,101,120,112,
1119 51,50,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,
1120 109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,
1121 95,114,105,98,98,111,110,95,101,120,112,51,50,46,112,110,103,60,47,111,
1122 98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,
1123 115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,105,
1124 109,112,51,50,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,
1125 105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,
1126 101,115,95,114,105,98,98,111,110,95,105,109,112,51,50,46,112,110,103,60,
1127 47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,
1128 97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,
1129 34,109,111,118,101,51,50,34,62,67,111,110,116,114,111,108,69,100,105,116,
1130 111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,
1131 109,97,103,101,115,95,114,105,98,98,111,110,95,109,111,118,101,51,50,46,
1132 112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,
1133 116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,
1134 97,109,101,61,34,110,101,119,51,50,34,62,67,111,110,116,114,111,108,69,
1135 100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,
1136 97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,110,101,119,51,
1137 50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,
1138 101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,
1139 32,110,97,109,101,61,34,112,97,115,116,101,51,50,34,62,67,111,110,116,114,
1140 111,108,69,100,105,116,111,114,66,105,116,109,97,112,115,46,99,112,112,
1141 36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
1142 112,97,115,116,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,
1143 10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,
1144 105,116,109,97,112,34,32,110,97,109,101,61,34,114,101,100,111,51,50,34,
1145 62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,105,116,109,97,
1146 112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,
1147 105,98,98,111,110,95,114,101,100,111,51,50,46,112,110,103,60,47,111,98,
1148 106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
1149 61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,117,110,
1150 100,111,51,50,34,62,67,111,110,116,114,111,108,69,100,105,116,111,114,66,
1151 105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,
1152 101,115,95,114,105,98,98,111,110,95,117,110,100,111,51,50,46,112,110,103,
1153 60,47,111,98,106,101,99,116,62,10,60,47,114,101,115,111,117,114,99,101,
1154 62,10};
1155 
1156 void wxC870InitBitmapResources()
1157 {
1158 
1159  // Check for memory FS. If not present, load the handler:
1160  {
1161  wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
1162  wxFileSystem fsys;
1163  wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
1164  wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
1165  if (f) delete f;
1166  else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
1167  }
1168 
1169  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_copy32.png"), xml_res_file_0, xml_res_size_0, wxT("image/png"));
1170  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor128.png"), xml_res_file_1, xml_res_size_1, wxT("image/png"));
1171  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor16.png"), xml_res_file_2, xml_res_size_2, wxT("image/png"));
1172  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor256.png"), xml_res_file_3, xml_res_size_3, wxT("image/png"));
1173  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor32.png"), xml_res_file_4, xml_res_size_4, wxT("image/png"));
1174  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ctrlEditor64.png"), xml_res_file_5, xml_res_size_5, wxT("image/png"));
1175  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_delete32.png"), xml_res_file_6, xml_res_size_6, wxT("image/png"));
1176  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_drag32.png"), xml_res_file_7, xml_res_size_7, wxT("image/png"));
1177  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_exp32.png"), xml_res_file_8, xml_res_size_8, wxT("image/png"));
1178  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_imp32.png"), xml_res_file_9, xml_res_size_9, wxT("image/png"));
1179  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_move32.png"), xml_res_file_10, xml_res_size_10, wxT("image/png"));
1180  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_new32.png"), xml_res_file_11, xml_res_size_11, wxT("image/png"));
1181  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_paste32.png"), xml_res_file_12, xml_res_size_12, wxT("image/png"));
1182  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_redo32.png"), xml_res_file_13, xml_res_size_13, wxT("image/png"));
1183  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$data_images_ribbon_undo32.png"), xml_res_file_14, xml_res_size_14, wxT("image/png"));
1184  XRC_ADD_FILE(wxT("XRC_resource/ControlEditorBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ControlEditorBitmaps.xrc"), xml_res_file_15, xml_res_size_15, wxT("text/xml"));
1185  wxXmlResource::Get()->Load(wxT("memory:XRC_resource/ControlEditorBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ControlEditorBitmaps.xrc"));
1186 }
-
- - - - diff --git a/docs/doxygen/html/_control_element_8cpp_source.html b/docs/doxygen/html/_control_element_8cpp_source.html deleted file mode 100644 index 66bd3f0..0000000 --- a/docs/doxygen/html/_control_element_8cpp_source.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - -Project/ControlElement.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlElement.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ControlElement.h"
19 #ifdef USING_WX_3_0_X
20 #include "DegreesAndRadians.h"
21 #endif
22 
23 Node::Node(wxPoint2DDouble position, NodeType nodeType, double borderSize)
24 {
25  double totalRadius = m_radius + borderSize;
26  m_rect = wxRect2DDouble(position.m_x - totalRadius, position.m_y - totalRadius, totalRadius * 2, totalRadius * 2);
27  m_nodeType = nodeType;
28 
29  m_triPts.push_back(GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, m_radius));
30  m_triPts.push_back(GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, -m_radius));
31  m_triPts.push_back(GetPosition() + wxPoint2DDouble(-m_radius + 1, 0));
32 }
33 
34 Node::~Node() {}
35 void Node::SetPosition(wxPoint2DDouble position)
36 {
37  m_rect = wxRect2DDouble(position.m_x - m_rect.m_width / 2, position.m_y - m_rect.m_height / 2, m_rect.m_width,
38  m_rect.m_height);
39  m_triPts[0] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, m_radius);
40  m_triPts[1] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, -m_radius);
41  m_triPts[2] = GetPosition() + wxPoint2DDouble(-m_radius + 1, 0);
42 
43  // Rotate according to the angle (node rect center as reference)
44  if(m_angle != 0.0) RotateTriPt(m_angle);
45 }
46 
47 void Node::StartMove(wxPoint2DDouble position)
48 {
49  m_moveStartPt = position;
50  m_movePos = m_rect.GetPosition() - wxPoint2DDouble(-m_rect.m_width / 2, -m_rect.m_height / 2);
51 }
52 
53 void Node::Move(wxPoint2DDouble position) { SetPosition(m_movePos + position - m_moveStartPt); }
54 wxPoint2DDouble Node::GetPosition() const
55 {
56  return m_rect.GetPosition() + wxPoint2DDouble(m_rect.GetSize().GetWidth() / 2, m_rect.GetSize().GetHeight() / 2);
57 }
58 
59 void Node::RotateTriPt(double angle)
60 {
61  double radAngle = wxDegToRad(angle);
62  wxPoint2DDouble rectCenter =
63  m_rect.GetPosition() + wxPoint2DDouble(m_rect.GetSize().GetWidth() / 2.0, m_rect.GetSize().GetHeight() / 2.0);
64  m_triPts[0] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[0].m_x - rectCenter.m_x) -
65  std::sin(radAngle) * (m_triPts[0].m_y - rectCenter.m_y) + rectCenter.m_x,
66  std::sin(radAngle) * (m_triPts[0].m_x - rectCenter.m_x) +
67  std::cos(radAngle) * (m_triPts[0].m_y - rectCenter.m_y) + rectCenter.m_y);
68  m_triPts[1] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[1].m_x - rectCenter.m_x) -
69  std::sin(radAngle) * (m_triPts[1].m_y - rectCenter.m_y) + rectCenter.m_x,
70  std::sin(radAngle) * (m_triPts[1].m_x - rectCenter.m_x) +
71  std::cos(radAngle) * (m_triPts[1].m_y - rectCenter.m_y) + rectCenter.m_y);
72  m_triPts[2] = wxPoint2DDouble(std::cos(radAngle) * (m_triPts[2].m_x - rectCenter.m_x) -
73  std::sin(radAngle) * (m_triPts[2].m_y - rectCenter.m_y) + rectCenter.m_x,
74  std::sin(radAngle) * (m_triPts[2].m_x - rectCenter.m_x) +
75  std::cos(radAngle) * (m_triPts[2].m_y - rectCenter.m_y) + rectCenter.m_y);
76 }
77 
78 void Node::Rotate(bool clockwise)
79 {
80  if(clockwise)
81  m_angle += 90.0;
82  else
83  m_angle -= 90.0;
84  if(m_angle >= 360.0)
85  m_angle = 0.0;
86  else if(m_angle < 0)
87  m_angle = 270.0;
88 
89  // Update input triangle points.
90  m_triPts[0] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, m_radius);
91  m_triPts[1] = GetPosition() + wxPoint2DDouble(-m_radius - m_rect.GetSize().GetWidth() / 2, -m_radius);
92  m_triPts[2] = GetPosition() + wxPoint2DDouble(-m_radius + 1, 0);
93 
94  // Rotate according to the angle (node rect center as reference)
95  if(m_angle != 0.0) RotateTriPt(m_angle);
96 }
97 
98 bool Node::Contains(wxPoint2DDouble position) const
99 {
100  if(m_connected) return false;
101  return m_rect.Contains(position);
102 }
103 
104 ControlElement::ControlElement(int id) : Element() { m_elementID = id; }
105 ControlElement::~ControlElement() {}
106 void ControlElement::DrawNodes() const
107 {
108  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
109  Node* node = *it;
110  DrawCircle(node->GetPosition(), node->GetRadius(), 10, GL_POLYGON);
111  if(node->GetNodeType() == Node::NODE_IN) {
112  DrawTriangle(node->GetInTrianglePts());
113  }
114  }
115 }
116 
117 void ControlElement::StartMove(wxPoint2DDouble position)
118 {
119  m_moveStartPt = position;
120  m_movePos = m_position;
121  for(int i = 0; i < (int)m_nodeList.size(); ++i) {
122  m_nodeList[i]->StartMove(position);
123  }
124 }
125 
126 void ControlElement::Move(wxPoint2DDouble position)
127 {
128  SetPosition(m_movePos + position - m_moveStartPt);
129  for(int i = 0; i < (int)m_nodeList.size(); ++i) {
130  m_nodeList[i]->Move(position);
131  }
132 }
133 
134 bool ControlElement::Solve(double input, double timeStep)
135 {
136  m_output = input;
137  return true;
138 }
139 
140 void ControlElement::ReplaceNode(Node* oldNode, Node* newNode)
141 {
142  for(unsigned int i = 0; i < m_nodeList.size(); i++) {
143  if(m_nodeList[i] == oldNode) m_nodeList[i] = newNode;
144  }
145 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
-
Base class of a control element. Provide general methods to other control classes.
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
-
-
- - - - diff --git a/docs/doxygen/html/_control_element_8h.html b/docs/doxygen/html/_control_element_8h.html index b059beb..42402cb 100644 --- a/docs/doxygen/html/_control_element_8h.html +++ b/docs/doxygen/html/_control_element_8h.html @@ -93,10 +93,8 @@ $(document).ready(function(){initNavTree('_control_element_8h.html','');});

Base class of a control element. Provide general methods to other control classes. More...

-
#include "Element.h"
-
-

Go to the source code of this file.

- +
#include "Element.h"
+
@@ -107,8 +105,6 @@ Classes

Classes

class  Node

Detailed Description

Base class of a control element. Provide general methods to other control classes.

- -

Definition in file ControlElement.h.

diff --git a/docs/doxygen/html/_control_element_8h_source.html b/docs/doxygen/html/_control_element_8h_source.html deleted file mode 100644 index 038d345..0000000 --- a/docs/doxygen/html/_control_element_8h_source.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - -Project/ControlElement.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlElement.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CONTROLELEMENT_H
19 #define CONTROLELEMENT_H
20 
21 #include "Element.h"
22 
30 class Node
31 {
32  public:
33  enum NodeType { NODE_IN = 0, NODE_OUT };
34 
35  Node(wxPoint2DDouble position = wxPoint2DDouble(0, 0), NodeType nodeType = NODE_IN, double borderSize = 0.0);
36  ~Node();
37 
38  wxRect2DDouble GetRect() const { return m_rect; }
39  void SetRect(wxRect2DDouble rect) { m_rect = rect; }
40  wxPoint2DDouble GetPosition() const;
41  void SetPosition(wxPoint2DDouble position);
42 
43  NodeType GetNodeType() const { return m_nodeType; }
44  void SetNodeType(NodeType nodeType) { m_nodeType = nodeType; }
45  double GetRadius() const { return m_radius; }
46  std::vector<wxPoint2DDouble> GetInTrianglePts() const { return m_triPts; }
47  double GetAngle() const { return m_angle; }
48  void SetAngle(double angle) { m_angle = angle; }
49  void Rotate(bool clockwise = true);
50 
51  void RotateTriPt(double angle);
52 
53  void StartMove(wxPoint2DDouble position);
54  void Move(wxPoint2DDouble position);
55  bool Contains(wxPoint2DDouble position) const;
56 
57  bool IsConnected() const { return m_connected; }
58  void SetConnected(bool connected = true) { m_connected = connected; }
59  int GetID() const { return m_id; }
60  void SetID(int id) { m_id = id; }
61  protected:
62  int m_id = -1;
63 
64  wxRect2DDouble m_rect;
65  NodeType m_nodeType;
66 
67  bool m_connected = false;
68 
69  wxPoint2DDouble m_moveStartPt;
70  wxPoint2DDouble m_movePos;
71 
72  double m_radius = 3.0;
73  std::vector<wxPoint2DDouble> m_triPts;
74  double m_angle = 0.0;
75 };
76 
84 class ControlElement : public Element
85 {
86  public:
87  ControlElement(int id);
88  ~ControlElement();
89 
90  virtual void StartMove(wxPoint2DDouble position);
91  virtual void Move(wxPoint2DDouble position);
92 
93  void SetNodeList(std::vector<Node*> nodeList) { m_nodeList = nodeList; }
94  std::vector<Node*> GetNodeList() const { return m_nodeList; }
95  virtual void DrawNodes() const;
96  virtual void ReplaceNode(Node* oldNode, Node* newNode);
97 
102  virtual bool UpdateText() { return true; }
103  virtual bool IsSolved() const { return m_solved; }
104  virtual void SetSolved(bool solved = true) { m_solved = solved; }
105  virtual bool Solve(double input, double timeStep);
106  virtual double GetOutput() const { return m_output; }
107  virtual void SetOutput(double output) { m_output = output; }
108  protected:
109  std::vector<Node*> m_nodeList;
110  bool m_solved = false;
111  double m_output = 0.0;
112 };
113 
114 #endif // CONTROLELEMENT_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
- - -
-
- - - - diff --git a/docs/doxygen/html/_control_element_container_8cpp_source.html b/docs/doxygen/html/_control_element_container_8cpp_source.html deleted file mode 100644 index c2be813..0000000 --- a/docs/doxygen/html/_control_element_container_8cpp_source.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - -Project/ControlElementContainer.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlElementContainer.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
19 #include "ControlEditor.h"
20 #include "ControlElement.h"
21 
22 ControlElementContainer::ControlElementContainer() { ClearContainer(); }
23 ControlElementContainer::~ControlElementContainer() {}
24 void ControlElementContainer::FillContainer(ControlEditor* editor)
25 {
26  ClearContainer();
27  m_ctrlElementsList = editor->GetControlElementList();
28  m_cLineList = editor->GetConnectionLineList();
29  auto cElementList = editor->GetControlElementList();
30  for(auto it = cElementList.begin(), itEnd = cElementList.end(); it != itEnd; ++it) {
31  if(Constant* constant = dynamic_cast<Constant*>(*it)) {
32  m_constantList.push_back(constant);
33  } else if(Exponential* exponential = dynamic_cast<Exponential*>(*it)) {
34  m_exponentialList.push_back(exponential);
35  } else if(Gain* gain = dynamic_cast<Gain*>(*it)) {
36  m_gainList.push_back(gain);
37  } else if(IOControl* ioControl = dynamic_cast<IOControl*>(*it)) {
38  m_ioControlList.push_back(ioControl);
39  } else if(Limiter* limiter = dynamic_cast<Limiter*>(*it)) {
40  m_limiterList.push_back(limiter);
41  } else if(Multiplier* multiplier = dynamic_cast<Multiplier*>(*it)) {
42  m_multiplierList.push_back(multiplier);
43  } else if(RateLimiter* rateLimiter = dynamic_cast<RateLimiter*>(*it)) {
44  m_rateLimiterList.push_back(rateLimiter);
45  } else if(Sum* sum = dynamic_cast<Sum*>(*it)) {
46  m_sumList.push_back(sum);
47  } else if(TransferFunction* tf = dynamic_cast<TransferFunction*>(*it)) {
48  m_tfList.push_back(tf);
49  } else if(Divider* divider = dynamic_cast<Divider*>(*it)) {
50  m_dividerList.push_back(divider);
51  }
52  }
53 }
54 
55 void ControlElementContainer::ClearContainer()
56 {
57  m_cLineList.clear();
58  m_constantList.clear();
59  m_exponentialList.clear();
60  m_gainList.clear();
61  m_ioControlList.clear();
62  m_limiterList.clear();
63  m_multiplierList.clear();
64  m_rateLimiterList.clear();
65  m_sumList.clear();
66  m_tfList.clear();
67  m_dividerList.clear();
68 }
69 
70 void ControlElementContainer::FillContainer(std::vector<ControlElement*> controlElementList,
71  std::vector<ConnectionLine*> connectionLineList)
72 {
73  ClearContainer();
74  m_ctrlElementsList = controlElementList;
75  m_cLineList = connectionLineList;
76 
77  for(auto it = controlElementList.begin(), itEnd = controlElementList.end(); it != itEnd; ++it) {
78  if(Constant* constant = dynamic_cast<Constant*>(*it)) {
79  m_constantList.push_back(constant);
80  } else if(Exponential* exponential = dynamic_cast<Exponential*>(*it)) {
81  m_exponentialList.push_back(exponential);
82  } else if(Gain* gain = dynamic_cast<Gain*>(*it)) {
83  m_gainList.push_back(gain);
84  } else if(IOControl* ioControl = dynamic_cast<IOControl*>(*it)) {
85  m_ioControlList.push_back(ioControl);
86  } else if(Limiter* limiter = dynamic_cast<Limiter*>(*it)) {
87  m_limiterList.push_back(limiter);
88  } else if(Multiplier* multiplier = dynamic_cast<Multiplier*>(*it)) {
89  m_multiplierList.push_back(multiplier);
90  } else if(RateLimiter* rateLimiter = dynamic_cast<RateLimiter*>(*it)) {
91  m_rateLimiterList.push_back(rateLimiter);
92  } else if(Sum* sum = dynamic_cast<Sum*>(*it)) {
93  m_sumList.push_back(sum);
94  } else if(TransferFunction* tf = dynamic_cast<TransferFunction*>(*it)) {
95  m_tfList.push_back(tf);
96  } else if(Divider* divider = dynamic_cast<Divider*>(*it)) {
97  m_dividerList.push_back(divider);
98  }
99  }
100 }
101 
102 void ControlElementContainer::GetContainerCopy(std::vector<ControlElement*>& controlElementList,
103  std::vector<ConnectionLine*>& connectionLineList)
104 {
105  controlElementList.clear();
106  connectionLineList.clear();
107 
108  // Copy connection lines
109  for(auto it = m_cLineList.begin(), itEnd = m_cLineList.end(); it != itEnd; ++it) {
110  ConnectionLine* copy = static_cast<ConnectionLine*>((*it)->GetCopy());
111  connectionLineList.push_back(copy);
112  }
113 
114  // Copy elements (exept connection line).
115  int nodeID = 0;
116  for(auto it = m_ctrlElementsList.begin(), itEnd = m_ctrlElementsList.end(); it != itEnd; ++it) {
117  ControlElement* oldElement = *it;
118  ControlElement* copy = static_cast<ControlElement*>(oldElement->GetCopy());
119  controlElementList.push_back(copy);
120  // Copy nodes.
121  std::vector<Node*> nodeList = copy->GetNodeList();
122  std::vector<Node*> nodeListCopy;
123  for(auto itN = nodeList.begin(), itEndN = nodeList.end(); itN != itEndN; ++itN) {
124  Node* node = *itN;
125  node->SetID(nodeID);
126  Node* copyNode = new Node();
127  *copyNode = *node;
128  nodeListCopy.push_back(copyNode);
129  nodeID++;
130  }
131  copy->SetNodeList(nodeListCopy);
132 
133  // Replace children to copies.
134  auto childList = copy->GetChildList();
135  for(auto itC = childList.begin(), itEndC = childList.end(); itC != itEndC; ++itC) {
136  ConnectionLine* child = static_cast<ConnectionLine*>(*itC);
137  // Replace child's parent to copy.
138  for(auto itCL = connectionLineList.begin(), itEndCL = connectionLineList.end(); itCL != itEndCL; ++itCL) {
139  ConnectionLine* copyLine = *itCL;
140  if(copyLine->GetID() == child->GetID()) {
141  // Replace node.
142  nodeList = child->GetNodeList();
143  for(auto itN = nodeList.begin(), itEndN = nodeList.end(); itN != itEndN; ++itN) {
144  Node* node = *itN;
145  for(auto itCN = nodeListCopy.begin(), itEndCN = nodeListCopy.end(); itCN != itEndCN; ++itCN) {
146  Node* nodeCopy = *itCN;
147  if(node->GetID() == nodeCopy->GetID()) {
148  copyLine->ReplaceNode(node, nodeCopy);
149  break;
150  }
151  }
152  }
153  copyLine->ReplaceParent(oldElement, copy);
154  copy->ReplaceChild(child, copyLine);
155  }
156  }
157  }
158  }
159 }
Multiplies two inputs.
Definition: Multiplier.h:32
-
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
-
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
-
virtual std::vector< Element * > GetChildList() const
Get the Child list.
Definition: Element.h:511
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
-
Provides the communication with the power element.
Definition: IOControl.h:35
- -
virtual void ReplaceChild(Element *oldChild, Element *newChild)
Replace a child from the list.
Definition: Element.cpp:362
-
Control element that divides two inputs.
Definition: Divider.h:32
-
Generates an output following an exponential function.
Definition: Exponential.h:32
-
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
-
Connection between two control elements or other connection line and an element.
- -
Calculates the time response by a frequency domain transfer function.
- -
Base class of a control element. Provide general methods to other control classes.
-
virtual int GetID() const
Get the element ID.
Definition: Element.h:272
-
virtual void ReplaceParent(Element *oldParent, Element *newParent)
Replace a parent.
Definition: Element.cpp:346
- -
A control element that provides a constant value.
Definition: Constant.h:35
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Element.h:262
-
-
- - - - diff --git a/docs/doxygen/html/_control_element_container_8h.html b/docs/doxygen/html/_control_element_container_8h.html index 585eee8..47e6cfd 100644 --- a/docs/doxygen/html/_control_element_container_8h.html +++ b/docs/doxygen/html/_control_element_container_8h.html @@ -91,20 +91,18 @@ $(document).ready(function(){initNavTree('_control_element_container_8h.html',''
#include <vector>
-#include "ConnectionLine.h"
-#include "Constant.h"
-#include "Exponential.h"
-#include "Gain.h"
-#include "IOControl.h"
-#include "Limiter.h"
-#include "Multiplier.h"
-#include "RateLimiter.h"
-#include "Sum.h"
-#include "TransferFunction.h"
-#include "Divider.h"
-
-

Go to the source code of this file.

- +#include "ConnectionLine.h"
+#include "Constant.h"
+#include "Exponential.h"
+#include "Gain.h"
+#include "IOControl.h"
+#include "Limiter.h"
+#include "Multiplier.h"
+#include "RateLimiter.h"
+#include "Sum.h"
+#include "TransferFunction.h"
+#include "Divider.h"
+
diff --git a/docs/doxygen/html/_control_element_container_8h_source.html b/docs/doxygen/html/_control_element_container_8h_source.html deleted file mode 100644 index 80e77c4..0000000 --- a/docs/doxygen/html/_control_element_container_8h_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -Project/ControlElementContainer.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ControlElementContainer
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlElementContainer.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CONTROLELEMENTCONTAINER_H
19 #define CONTROLELEMENTCONTAINER_H
20 
21 #include <vector>
22 
23 class ControlEditor;
24 class ControlElement;
25 
26 #include "ConnectionLine.h"
27 #include "Constant.h"
28 #include "Exponential.h"
29 #include "Gain.h"
30 #include "IOControl.h"
31 #include "Limiter.h"
32 #include "Multiplier.h"
33 #include "RateLimiter.h"
34 #include "Sum.h"
35 #include "TransferFunction.h"
36 #include "Divider.h"
37 
47 {
48  public:
51 
52  virtual void FillContainer(ControlEditor* editor);
53  virtual void FillContainer(std::vector<ControlElement*> controlElementList,
54  std::vector<ConnectionLine*> connectionLineList);
55  virtual void GetContainerCopy(std::vector<ControlElement*>& controlElementList,
56  std::vector<ConnectionLine*>& connectionLineList);
57  virtual void ClearContainer();
58 
59  std::vector<ControlElement*> GetControlElementsList() const { return m_ctrlElementsList; }
60  std::vector<ConnectionLine*> GetConnectionLineList() const { return m_cLineList; }
61  std::vector<Constant*> GetConstantList() const { return m_constantList; }
62  std::vector<Exponential*> GetExponentialList() const { return m_exponentialList; }
63  std::vector<Gain*> GetGainList() const { return m_gainList; }
64  std::vector<IOControl*> GetIOControlList() const { return m_ioControlList; }
65  std::vector<Limiter*> GetLimiterList() const { return m_limiterList; }
66  std::vector<Multiplier*> GetMultiplierList() const { return m_multiplierList; }
67  std::vector<RateLimiter*> GetRateLimiterList() const { return m_rateLimiterList; }
68  std::vector<Sum*> GetSumList() const { return m_sumList; }
69  std::vector<TransferFunction*> GetTFList() const { return m_tfList; }
70  std::vector<Divider*> GetDividerList() const { return m_dividerList; }
71  protected:
72  std::vector<ControlElement*> m_ctrlElementsList;
73  std::vector<Constant*> m_constantList;
74  std::vector<ConnectionLine*> m_cLineList;
75  std::vector<Exponential*> m_exponentialList;
76  std::vector<Gain*> m_gainList;
77  std::vector<IOControl*> m_ioControlList;
78  std::vector<Limiter*> m_limiterList;
79  std::vector<Multiplier*> m_multiplierList;
80  std::vector<RateLimiter*> m_rateLimiterList;
81  std::vector<Sum*> m_sumList;
82  std::vector<TransferFunction*> m_tfList;
83  std::vector<Divider*> m_dividerList;
84 };
85 
86 #endif // CONTROLELEMENTCONTAINER_H
- - - - -
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
- - - - - - - - -
-
- - - - diff --git a/docs/doxygen/html/_control_element_solver_8cpp_source.html b/docs/doxygen/html/_control_element_solver_8cpp_source.html deleted file mode 100644 index 5611b4e..0000000 --- a/docs/doxygen/html/_control_element_solver_8cpp_source.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - -Project/ControlElementSolver.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlElementSolver.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ControlElementSolver.h"
19 
21 #include "ControlEditor.h"
22 #include "ConnectionLine.h"
23 #include "Constant.h"
24 #include "Exponential.h"
25 #include "Gain.h"
26 #include "IOControl.h"
27 #include "Limiter.h"
28 #include "Multiplier.h"
29 #include "RateLimiter.h"
30 #include "Sum.h"
31 #include "TransferFunction.h"
32 
33 ControlElementSolver::ControlElementSolver(ControlEditor* controlEditor, double timeStep, double integrationError)
34 {
35  m_ctrlContainer = new ControlElementContainer();
36  m_ctrlContainer->FillContainer(controlEditor);
37  Initialize(controlEditor, timeStep, integrationError);
38 }
39 
40 ControlElementSolver::ControlElementSolver(ControlElementContainer* ctrlContainer,
41  double timeStep,
42  double integrationError,
43  wxWindow* parent)
44 {
45  m_ctrlContainer = ctrlContainer;
46  Initialize(parent, timeStep, integrationError);
47 }
48 
49 void ControlElementSolver::Initialize(wxWindow* parent, double timeStep, double integrationError)
50 {
51  // Check if the sistem have one input and one output
52  bool fail = false;
53  auto ioList = m_ctrlContainer->GetIOControlList();
54  if(ioList.size() < 2) {
55  fail = true;
56  m_failMessage = _("The control system must have at least one input and one output.");
57  }
58  bool haveInput, haveOutput;
59  haveInput = haveOutput = false;
60  for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) {
61  IOControl* io = *it;
62  if(io->GetType() == Node::NODE_OUT && !haveInput) {
63  m_inputControl = io;
64  haveInput = true;
65  } else if(io->GetType() == Node::NODE_IN) {
66  m_outputControl = io;
67  haveOutput = true;
68  }
69  }
70  if(!fail && !haveInput) {
71  fail = true;
72  m_failMessage = _("There is no input in the control system.");
73  }
74  if(!fail && !haveOutput) {
75  fail = true;
76  m_failMessage = _("There is no output in the control system.");
77  }
78  if(!fail) {
79  if(m_inputControl->GetChildList().size() == 0) {
80  fail = true;
81  m_failMessage = _("Input not connected.");
82  }
83  }
84 
85  m_timeStep = timeStep;
86  m_integrationError = integrationError;
87  if(!fail) {
88  if(!InitializeValues(true)) {
89  fail = true;
90  m_failMessage = _("It was not possible to initialize the control system.");
91  }
92  }
93 
94  if(fail) {
95  wxMessageDialog msgDialog(parent, m_failMessage, _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
96  msgDialog.ShowModal();
97  } else {
98  m_isOK = true;
99  }
100 }
101 
102 bool ControlElementSolver::InitializeValues(bool startAllZero)
103 {
104  // Reset Elements values
105  auto elementList = m_ctrlContainer->GetControlElementsList();
106  for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
107  ControlElement* element = *it;
108  element->SetSolved(false);
109  element->SetOutput(0.0);
110  }
111  auto tfList = m_ctrlContainer->GetTFList();
112  for(auto it = tfList.begin(), itEnd = tfList.end(); it != itEnd; ++it) {
113  TransferFunction* tf = *it;
114  tf->CalculateSpaceState(100, m_integrationError);
115  }
116  auto connectionLineList = m_ctrlContainer->GetConnectionLineList();
117  for(auto it = connectionLineList.begin(), itEnd = connectionLineList.end(); it != itEnd; ++it) {
118  ConnectionLine* cLine = *it;
119  cLine->SetSolved(false);
120  cLine->SetValue(0.0);
121  }
122 
123  if(!startAllZero) {
124  double origTimeStep = m_timeStep;
125  double minStep = m_timeStep / 10;
126  double maxStep = m_timeStep * 10;
127  // Calculate the steady-state results according to the input.
128  double minError = 1e-7 * m_timeStep;
129  int maxIteration = 100 / m_timeStep;
130 
131  double prevSol = 0.0;
132  double currentSol = 1.0;
133  double error = 1.0;
134  double prevError = 1.0;
135  int numIt = 0;
136  while(error > minError) {
137  prevSol = currentSol;
138  prevError = error;
139  SolveNextStep();
140  currentSol = GetLastSolution();
141  numIt++;
142  error = std::abs(prevSol - currentSol);
143  if(std::abs(error - prevError) < 1e-1) {
144  if(m_timeStep < maxStep) {
145  m_timeStep *= 1.5;
146  }
147  } else if(std::abs(error - prevError) > 10) {
148  if(m_timeStep > minStep) {
149  m_timeStep /= 1.5;
150  }
151  }
152  if(numIt >= maxIteration) {
153  m_failMessage = _("It was not possible to initialize the control system.");
154  return false;
155  }
156  }
157  m_timeStep = origTimeStep;
158  m_solutions.clear();
159  }
160 
161  return true;
162 }
163 
164 void ControlElementSolver::SolveNextStep()
165 {
166  // Set all elements as not solved
167  auto elementList = m_ctrlContainer->GetControlElementsList();
168  for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
169  ControlElement* element = *it;
170  element->SetSolved(false);
171  }
172  auto connectionLineList = m_ctrlContainer->GetConnectionLineList();
173  for(auto it = connectionLineList.begin(), itEnd = connectionLineList.end(); it != itEnd; ++it) {
174  ConnectionLine* cLine = *it;
175  cLine->SetSolved(false);
176  }
177 
178  // Get first node connection
179  ConnectionLine* firstConn = static_cast<ConnectionLine*>(m_inputControl->GetChildList()[0]);
180  /*m_inputControl->SetSolved();
181  firstConn->SetValue(1);
182  firstConn->SetSolved();
183  FillAllConnectedChildren(firstConn);*/
184 
185  // Set value to the connected lines in constants
186  auto constantList = m_ctrlContainer->GetConstantList();
187  for(auto it = constantList.begin(), itEnd = constantList.end(); it != itEnd; ++it) {
188  Constant* constant = *it;
189  if(constant->GetChildList().size() == 1) {
190  constant->SetSolved();
191  ConnectionLine* child = static_cast<ConnectionLine*>(constant->GetChildList()[0]);
192  child->SetValue(constant->GetValue());
193  child->SetSolved();
194  FillAllConnectedChildren(child);
195  }
196  }
197 
198  // Set value to the connected lines in inputs
199  auto ioList = m_ctrlContainer->GetIOControlList();
200  for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) {
201  IOControl* io = *it;
202  if(io->GetChildList().size() == 1) {
203  io->SetSolved();
204  ConnectionLine* child = static_cast<ConnectionLine*>(io->GetChildList()[0]);
205  if(m_inputControl == io) firstConn = child;
206  bool inputType = true;
207  switch(io->GetValue()) {
208  io->SetSolved();
209  case IOControl::IN_TERMINAL_VOLTAGE: {
210  child->SetValue(m_terminalVoltage);
211  } break;
212  case IOControl::IN_VELOCITY: {
213  child->SetValue(m_velocity);
214  } break;
215  case IOControl::IN_ACTIVE_POWER: {
216  child->SetValue(m_activePower);
217  } break;
218  case IOControl::IN_REACTIVE_POWER: {
219  child->SetValue(m_reactivePower);
220  } break;
221  case IOControl::IN_INITIAL_TERMINAL_VOLTAGE: {
222  child->SetValue(m_initTerminalVoltage);
223  } break;
224  case IOControl::IN_INITIAL_MEC_POWER: {
225  child->SetValue(m_initMecPower);
226  } break;
227  case IOControl::IN_INITIAL_VELOCITY: {
228  child->SetValue(m_initVelocity);
229  } break;
230  case IOControl::IN_DELTA_VELOCITY: {
231  child->SetValue(m_deltaVelocity);
232  } break;
233  case IOControl::IN_DELTA_ACTIVE_POWER: {
234  child->SetValue(m_deltaPe);
235  } break;
236  default: {
237  inputType = false;
238  } break;
239  }
240  if(inputType) {
241  child->SetSolved();
242  FillAllConnectedChildren(child);
243  }
244  }
245  }
246 
247  ConnectionLine* currentLine = firstConn;
248  while(currentLine) {
249  currentLine = SolveNextElement(currentLine);
250  }
251 
252  bool haveUnsolvedElement = true;
253  while(haveUnsolvedElement) {
254  haveUnsolvedElement = false;
255  // Get the solved line connected with unsolved element (elements not connected in the main branch).
256  for(auto it = connectionLineList.begin(), itEnd = connectionLineList.end(); it != itEnd; ++it) {
257  ConnectionLine* cLine = *it;
258  if(cLine->IsSolved()) {
259  auto parentList = cLine->GetParentList();
260  for(auto itP = parentList.begin(), itPEnd = parentList.end(); itP != itPEnd; ++itP) {
261  ControlElement* parent = static_cast<ControlElement*>(*itP);
262  if(!parent->IsSolved()) {
263  haveUnsolvedElement = true;
264  // Solve secondary branch.
265  currentLine = cLine;
266  while(currentLine) {
267  currentLine = SolveNextElement(currentLine);
268  }
269  break;
270  }
271  }
272  }
273  if(haveUnsolvedElement) break;
274  }
275  }
276 
277  // Set the control system output.
278  /*if(m_outputControl->GetChildList().size() == 1) {
279  ConnectionLine* cLine = static_cast<ConnectionLine*>(m_outputControl->GetChildList()[0]);
280  m_solutions.push_back(cLine->GetValue());
281  } else
282  m_solutions.push_back(0.0);*/
283  for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) {
284  IOControl* io = *it;
285  if(io->GetChildList().size() == 1) {
286  io->SetSolved();
287  ConnectionLine* child = static_cast<ConnectionLine*>(io->GetChildList()[0]);
288  switch(io->GetValue()) {
289  io->SetSolved();
290  case IOControl::OUT_MEC_POWER: {
291  m_mecPower = child->GetValue();
292  m_solutions.push_back(m_mecPower);
293  } break;
294  case IOControl::OUT_FIELD_VOLTAGE: {
295  m_fieldVoltage = child->GetValue();
296  m_solutions.push_back(m_fieldVoltage);
297  } break;
298  default:
299  break;
300  }
301  }
302  }
303 }
304 
305 void ControlElementSolver::FillAllConnectedChildren(ConnectionLine* parent)
306 {
307  auto childList = parent->GetLineChildList();
308  for(auto it = childList.begin(), itEnd = childList.end(); it != itEnd; ++it) {
309  ConnectionLine* child = *it;
310  child->SetValue(parent->GetValue());
311  child->SetSolved();
312  FillAllConnectedChildren(child);
313  }
314 }
315 
316 ConnectionLine* ControlElementSolver::SolveNextElement(ConnectionLine* currentLine)
317 {
318  auto parentList = currentLine->GetParentList();
319  for(auto it = parentList.begin(), itEnd = parentList.end(); it != itEnd; ++it) {
320  ControlElement* element = static_cast<ControlElement*>(*it);
321  // Solve the unsolved parent.
322  if(!element->IsSolved()) {
323  if(!element->Solve(currentLine->GetValue(), m_timeStep)) return NULL;
324  element->SetSolved();
325 
326  // Get the output node (must have one or will result NULL).
327  Node* outNode = NULL;
328  auto nodeList = element->GetNodeList();
329  for(auto itN = nodeList.begin(), itNEnd = nodeList.end(); itN != itNEnd; ++itN) {
330  Node* node = *itN;
331  if(node->GetNodeType() == Node::NODE_OUT) outNode = node;
332  }
333  if(!outNode) return NULL;
334 
335  // Set connection line value associated with the output node.
336  auto childList = element->GetChildList();
337  for(auto itC = childList.begin(), itCEnd = childList.end(); itC != itCEnd; ++itC) {
338  ConnectionLine* cLine = static_cast<ConnectionLine*>(*itC);
339  if(!cLine->IsSolved()) { // Only check unsolved lines
340  // Check if the connection line have the output node on the list
341  auto lineNodeList = cLine->GetNodeList();
342  for(auto itCN = nodeList.begin(), itCNEnd = nodeList.end(); itCN != itCNEnd; ++itCN) {
343  Node* childNode = *itCN;
344  if(childNode == outNode) {
345  // Check if the line connect two elements, otherwise return NULL
346  if(cLine->GetType() != ConnectionLine::ELEMENT_ELEMENT) return NULL;
347 
348  // Set the connection line value and return it.
349  cLine->SetValue(element->GetOutput());
350  cLine->SetSolved();
351  FillAllConnectedChildren(cLine);
352  return cLine;
353  }
354  }
355  }
356  }
357  }
358  }
359  return NULL;
360 }
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
-
virtual std::vector< Element * > GetChildList() const
Get the Child list.
Definition: Element.h:511
-
Node of a control element. This class manages the user interaction with the connection and control el...
- -
virtual void CalculateSpaceState(int maxIteration=100, double error=1e-3)
Convert the transfer function to space state on controllable canonical form (CCF).
-
Provides the communication with the power element.
Definition: IOControl.h:35
- - - - - -
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
-
Connection between two control elements or other connection line and an element.
- -
Calculates the time response by a frequency domain transfer function.
- - - - - - - - -
A control element that provides a constant value.
Definition: Constant.h:35
- -
-
- - - - diff --git a/docs/doxygen/html/_control_element_solver_8h.html b/docs/doxygen/html/_control_element_solver_8h.html index 6b14201..903cd3c 100644 --- a/docs/doxygen/html/_control_element_solver_8h.html +++ b/docs/doxygen/html/_control_element_solver_8h.html @@ -92,9 +92,7 @@ $(document).ready(function(){initNavTree('_control_element_solver_8h.html','');}
#include <wx/window.h>
#include <vector>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_control_element_solver_8h_source.html b/docs/doxygen/html/_control_element_solver_8h_source.html deleted file mode 100644 index 6f6ebbb..0000000 --- a/docs/doxygen/html/_control_element_solver_8h_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -Project/ControlElementSolver.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ControlElementSolver
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlElementSolver.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CONTROLELEMENTSOLVER_H
19 #define CONTROLELEMENTSOLVER_H
20 
21 #include <wx/window.h>
22 #include <vector>
23 
25 class ControlEditor;
26 class ConnectionLine;
27 class Constant;
28 class Exponential;
29 class Gain;
30 class IOControl;
31 class Limiter;
32 class Multiplier;
33 class RateLimiter;
34 class Sum;
35 class TransferFunction;
36 
46 {
47  public:
49  ControlElementSolver(ControlEditor* controlEditor, double timeStep = 1e-3, double integrationError = 1e-3);
51  double timeStep = 1e-3,
52  double integrationError = 1e-3,
53  wxWindow* parent = NULL);
54  virtual ~ControlElementSolver() {}
55  virtual bool InitializeValues(bool startAllZero);
56  virtual void SolveNextStep();
57  virtual std::vector<double> GetSolutions() { return m_solutions; }
58  virtual double GetLastSolution() { return m_solutions[m_solutions.size() - 1]; }
59  virtual bool IsOK() const { return m_isOK; }
60  virtual wxString GetErrorMessage() { return m_failMessage; }
61  void SetTerminalVoltage(double value) { m_terminalVoltage = value; }
62  void SetVelocity(double value) { m_velocity = value; }
63  void SetActivePower(double value) { m_activePower = value; }
64  void SetReactivePower(double value) { m_reactivePower = value; }
65  void SetInitialTerminalVoltage(double value) { m_initTerminalVoltage = value; }
66  void SetInitialMecPower(double value) { m_initMecPower = value; }
67  void SetInitialVelocity(double value) { m_initVelocity = value; }
68  void SetDeltaVelocity(double value) { m_deltaVelocity = value; }
69  void SetDeltaActivePower(double value) { m_deltaPe = value; }
70  double GetFieldVoltage() { return m_fieldVoltage; }
71  double GetMechanicalPower() { return m_mecPower; }
72  double GetVelocity() { return m_velocity; }
73  double GetActivePower() { return m_activePower; }
74  protected:
75  void Initialize(wxWindow* parent, double timeStep, double integrationError);
76  void FillAllConnectedChildren(ConnectionLine* parent);
77  ConnectionLine* SolveNextElement(ConnectionLine* currentLine);
78 
79  ControlElementContainer* m_ctrlContainer = NULL;
80  double m_timeStep;
81  double m_integrationError;
82  std::vector<double> m_solutions;
83  bool m_isOK = false;
84  wxString m_failMessage = _("Unknown error.");
85 
87  IOControl* m_outputControl = NULL;
88  // Inputs
89  double m_terminalVoltage = 0.0;
90  double m_velocity = 0.0;
91  double m_activePower = 0.0;
92  double m_reactivePower = 0.0;
93  double m_initTerminalVoltage = 0.0;
94  double m_initMecPower = 0.0;
95  double m_initVelocity = 0.0;
96  double m_deltaVelocity = 0.0;
97  double m_deltaPe = 0.0;
98  // Outputs
99  double m_fieldVoltage = 0.0;
100  double m_mecPower = 0.0;
101 };
102 
103 #endif // CONTROLELEMENTSOLVER_H
Multiplies two inputs.
Definition: Multiplier.h:32
-
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
-
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
-
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
-
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
-
Provides the communication with the power element.
Definition: IOControl.h:35
- -
Generates an output following an exponential function.
Definition: Exponential.h:32
-
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
-
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
-
Connection between two control elements or other connection line and an element.
-
Calculates the time response by a frequency domain transfer function.
- -
A control element that provides a constant value.
Definition: Constant.h:35
-
-
- - - - diff --git a/docs/doxygen/html/_control_system_test_8cpp_source.html b/docs/doxygen/html/_control_system_test_8cpp_source.html deleted file mode 100644 index cbf3dd7..0000000 --- a/docs/doxygen/html/_control_system_test_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/ControlSystemTest.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlSystemTest.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ControlSystemTest.h"
19 #include "ControlEditor.h"
20 
21 ControlSystemTest::ControlSystemTest(ControlEditor* parent,
22  int* inputType,
23  double* startTime,
24  double* slope,
25  double* timeStep,
26  double* simTime)
27  : ControlSystemTestBase(parent)
28 {
29  SetSize(GetBestSize());
30 
31  m_inputType = inputType;
32  m_startTime = startTime;
33  m_slope = slope;
34  m_timeStep = timeStep;
35  m_simTime = simTime;
36 
37  m_choiceInput->SetSelection(*m_inputType);
38  m_textCtrlStartTime->SetValue(wxString::FromDouble(*m_startTime));
39  m_textCtrlSlope->SetValue(wxString::FromDouble(*m_slope));
40  m_textCtrlTimeStep->SetValue(wxString::FromDouble(*m_timeStep));
41  m_textCtrlSimTime->SetValue(wxString::FromDouble(*m_simTime));
42 }
43 
44 ControlSystemTest::~ControlSystemTest() {}
45 void ControlSystemTest::OnRunButtonClick(wxCommandEvent& event)
46 {
47  int inputType;
48  double startTime, slope, timeStep, simTime;
49 
50  inputType = m_choiceInput->GetSelection();
51 
52  if(!m_textCtrlStartTime->GetValue().ToDouble(&startTime)) {
53  wxMessageDialog msgDialog(this, _("Value entered incorrectly in the field \"Start time\"."), _("Error"),
54  wxOK | wxCENTRE | wxICON_ERROR);
55  msgDialog.ShowModal();
56  return;
57  }
58 
59  if(!m_textCtrlSlope->GetValue().ToDouble(&slope)) {
60  wxMessageDialog msgDialog(this, _("Value entered incorrectly in the field \"Slope\"."), _("Error"),
61  wxOK | wxCENTRE | wxICON_ERROR);
62  msgDialog.ShowModal();
63  return;
64  }
65 
66  if(!m_textCtrlTimeStep->GetValue().ToDouble(&timeStep)) {
67  wxMessageDialog msgDialog(this, _("Value entered incorrectly in the field \"Time step\"."), _("Error"),
68  wxOK | wxCENTRE | wxICON_ERROR);
69  msgDialog.ShowModal();
70  return;
71  }
72 
73  if(!m_textCtrlSimTime->GetValue().ToDouble(&simTime)) {
74  wxMessageDialog msgDialog(this, _("Value entered incorrectly in the field \"Simulation time\"."), _("Error"),
75  wxOK | wxCENTRE | wxICON_ERROR);
76  msgDialog.ShowModal();
77  return;
78  }
79 
80  *m_inputType = inputType;
81  *m_startTime = startTime;
82  *m_slope = slope;
83  *m_timeStep = timeStep;
84  *m_simTime = simTime;
85 
86  EndModal(wxID_OK);
87 }
- - - -
-
- - - - diff --git a/docs/doxygen/html/_control_system_test_8h.html b/docs/doxygen/html/_control_system_test_8h.html index b414db8..3bad40e 100644 --- a/docs/doxygen/html/_control_system_test_8h.html +++ b/docs/doxygen/html/_control_system_test_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_control_system_test_8h.html','');});
ControlSystemTest.h File Reference
-
#include "ControlEditorBase.h"
-
-

Go to the source code of this file.

- +
#include "base/ControlEditorBase.h"
+
diff --git a/docs/doxygen/html/_control_system_test_8h_source.html b/docs/doxygen/html/_control_system_test_8h_source.html deleted file mode 100644 index 574aed2..0000000 --- a/docs/doxygen/html/_control_system_test_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/ControlSystemTest.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ControlSystemTest
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ControlSystemTest.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef CONTROLSYSTEMTEST_H
19 #define CONTROLSYSTEMTEST_H
20 
21 #include "ControlEditorBase.h"
22 
23 class ControlEditor;
24 
33 {
34  public:
36  int* inputType,
37  double* startTime,
38  double* slope,
39  double* timeStep,
40  double* simTime);
41  virtual ~ControlSystemTest();
42 
43  protected:
44  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
45  virtual void OnRunButtonClick(wxCommandEvent& event);
46  int* m_inputType = NULL;
47  double* m_startTime = NULL;
48  double* m_slope = NULL;
49  double* m_timeStep = NULL;
50  double* m_simTime = NULL;
51 };
52 #endif // CONTROLSYSTEMTEST_H
- -
Form to edit properties to test the control system created.
-
-
- - - - diff --git a/docs/doxygen/html/_data_report_8cpp_source.html b/docs/doxygen/html/_data_report_8cpp_source.html deleted file mode 100644 index 56d6917..0000000 --- a/docs/doxygen/html/_data_report_8cpp_source.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - -Project/DataReport.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
DataReport.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "DataReport.h"
19 #include "Workspace.h"
20 #include "ElectricCalculation.h"
21 
22 DataReport::DataReport(wxWindow* parent, Workspace* workspace) : DataReportBase(parent)
23 {
24  m_workspace = workspace;
25 
26  m_headerColour = wxColour(150, 150, 150);
27  m_offlineColour = wxColour(100, 100, 100);
28  m_oddRowColour = wxColour(220, 220, 220);
29  m_evenRowColour = wxColour(255, 255, 255);
30 
31  CreateGrids();
32  SetHeaders();
33  FillValues();
34 
35  SetRowsColours(m_gridPowerFlow);
36  SetRowsColours(m_gridPFBuses);
37  SetRowsColours(m_gridPFBranches);
38  SetRowsColours(m_gridFault, 2);
39  SetRowsColours(m_gridFaultBuses, 2);
40  SetRowsColours(m_gridFaultBranches, 2);
41  SetRowsColours(m_gridFaultGenerators, 2);
42 
43  Layout();
44 }
45 
46 DataReport::~DataReport() {}
47 void DataReport::CreateGrids()
48 {
49  wxFont headerFont = m_gridPowerFlow->GetLabelFont();
50  headerFont.SetWeight(wxFONTWEIGHT_BOLD);
51 
52  ElectricCalculation eCalc;
53  eCalc.GetElementsFromList(m_workspace->GetElementList());
54  auto lineList = eCalc.GetLineList();
55  auto transformerList = eCalc.GetTransformerList();
56  auto busList = eCalc.GetBusList();
57  auto generatorList = eCalc.GetSyncGeneratorList();
58 
59  // Power Flow
60  // Header
61  m_gridPowerFlow->AppendCols(7);
62  m_gridPowerFlow->AppendRows();
63  m_gridPowerFlow->HideColLabels();
64  m_gridPowerFlow->HideRowLabels();
65  for(int i = 0; i < 7; ++i) {
66  m_gridPowerFlow->SetCellBackgroundColour(0, i, m_headerColour);
67  m_gridPowerFlow->SetCellFont(0, i, headerFont);
68  }
69  m_gridPowerFlow->SetDefaultCellAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
70  // Values
71  m_gridPowerFlow->AppendRows((lineList.size() + transformerList.size()) * 2);
72  m_gridPowerFlow->AutoSize();
73 
74  // Power Flow buses
75  // Header
76  m_gridPFBuses->AppendCols(6);
77  m_gridPFBuses->AppendRows();
78  m_gridPFBuses->HideColLabels();
79  m_gridPFBuses->HideRowLabels();
80  for(int i = 0; i < 6; ++i) {
81  m_gridPFBuses->SetCellBackgroundColour(0, i, m_headerColour);
82  m_gridPFBuses->SetCellFont(0, i, headerFont);
83  }
84  m_gridPFBuses->SetDefaultCellAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
85  // Values
86  m_gridPFBuses->AppendRows(busList.size());
87  m_gridPFBuses->AutoSize();
88 
89  // Power flow branches
90  // Header
91  m_gridPFBranches->AppendCols(10);
92  m_gridPFBranches->AppendRows(1);
93  m_gridPFBranches->HideColLabels();
94  m_gridPFBranches->HideRowLabels();
95  for(int i = 0; i < 10; ++i) {
96  m_gridPFBranches->SetCellBackgroundColour(0, i, m_headerColour);
97  m_gridPFBranches->SetCellFont(0, i, headerFont);
98  }
99  m_gridPFBranches->SetDefaultCellAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
100  // Values
101  m_gridPFBranches->AppendRows(lineList.size() + transformerList.size());
102  m_gridPFBranches->AutoSize();
103 
104  // Fault
105  // Header
106  m_gridFault->AppendCols(7);
107  m_gridFault->AppendRows(2);
108  m_gridFault->HideColLabels();
109  m_gridFault->HideRowLabels();
110  for(int i = 0; i < 2; ++i) {
111  for(int j = 0; j < 7; ++j) {
112  m_gridFault->SetCellBackgroundColour(i, j, m_headerColour);
113  m_gridFault->SetCellFont(i, j, headerFont);
114  }
115  }
116  m_gridFault->SetDefaultCellAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
117  m_gridFault->SetCellSize(0, 0, 2, 1);
118  m_gridFault->SetCellSize(0, 1, 1, 2);
119  m_gridFault->SetCellSize(0, 3, 1, 2);
120  m_gridFault->SetCellSize(0, 5, 1, 2);
121  // Values
122  for(auto it = busList.begin(), itEnd = busList.end(); it != itEnd; ++it) {
123  Bus* bus = *it;
124  if(bus->GetElectricalData().hasFault) m_gridFault->AppendRows();
125  }
126  m_gridFault->AutoSize();
127 
128  // Fault buses
129  // Header
130  m_gridFaultBuses->AppendCols(7);
131  m_gridFaultBuses->AppendRows(2);
132  m_gridFaultBuses->HideColLabels();
133  m_gridFaultBuses->HideRowLabels();
134  for(int i = 0; i < 2; ++i) {
135  for(int j = 0; j < 7; ++j) {
136  m_gridFaultBuses->SetCellBackgroundColour(i, j, m_headerColour);
137  m_gridFaultBuses->SetCellFont(i, j, headerFont);
138  }
139  }
140  m_gridFaultBuses->SetDefaultCellAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
141  m_gridFaultBuses->SetCellSize(0, 0, 2, 1);
142  m_gridFaultBuses->SetCellSize(0, 1, 1, 2);
143  m_gridFaultBuses->SetCellSize(0, 3, 1, 2);
144  m_gridFaultBuses->SetCellSize(0, 5, 1, 2);
145  // Values
146  m_gridFaultBuses->AppendRows(busList.size());
147  m_gridFaultBuses->AutoSize();
148 
149  // Fault branches
150  // Header
151  m_gridFaultBranches->AppendCols(11);
152  m_gridFaultBranches->AppendRows(2);
153  m_gridFaultBranches->HideColLabels();
154  m_gridFaultBranches->HideRowLabels();
155  for(int i = 0; i < 2; ++i) {
156  for(int j = 0; j < 11; ++j) {
157  m_gridFaultBranches->SetCellBackgroundColour(i, j, m_headerColour);
158  m_gridFaultBranches->SetCellFont(i, j, headerFont);
159  }
160  }
161  m_gridFaultBranches->SetDefaultCellAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
162  m_gridFaultBranches->SetCellSize(0, 0, 2, 1);
163  m_gridFaultBranches->SetCellSize(0, 1, 2, 1);
164  m_gridFaultBranches->SetCellSize(0, 2, 2, 1);
165  m_gridFaultBranches->SetCellSize(0, 3, 2, 1);
166  m_gridFaultBranches->SetCellSize(0, 10, 2, 1);
167  m_gridFaultBranches->SetCellSize(0, 4, 1, 2);
168  m_gridFaultBranches->SetCellSize(0, 6, 1, 2);
169  m_gridFaultBranches->SetCellSize(0, 8, 1, 2);
170  // Values
171  m_gridFaultBranches->AppendRows((lineList.size() + transformerList.size()) * 2);
172  m_gridFaultBranches->AutoSize();
173 
174  // Fault generators
175  // Header
176  m_gridFaultGenerators->AppendCols(7);
177  m_gridFaultGenerators->AppendRows(2);
178  m_gridFaultGenerators->HideColLabels();
179  m_gridFaultGenerators->HideRowLabels();
180  for(int i = 0; i < 2; ++i) {
181  for(int j = 0; j < 7; ++j) {
182  m_gridFaultGenerators->SetCellBackgroundColour(i, j, m_headerColour);
183  m_gridFaultGenerators->SetCellFont(i, j, headerFont);
184  }
185  }
186  m_gridFaultGenerators->SetDefaultCellAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
187  m_gridFaultGenerators->SetCellSize(0, 0, 2, 1);
188  m_gridFaultGenerators->SetCellSize(0, 1, 1, 2);
189  m_gridFaultGenerators->SetCellSize(0, 3, 1, 2);
190  m_gridFaultGenerators->SetCellSize(0, 5, 1, 2);
191  // Values
192  m_gridFaultGenerators->AppendRows(generatorList.size());
193  m_gridFaultGenerators->AutoSize();
194 }
195 
196 void DataReport::SetHeaders()
197 {
198  // Headers choices fill
199  wxString omega = static_cast<wxString>(L'\u03A9');
200 
201  m_voltageChoices.Add(_("Voltage (p.u.)"));
202  m_voltageChoices.Add(_("Voltage (V)"));
203  m_voltageChoices.Add(_("Voltage (kV)"));
204 
205  m_activePowerChoices.Add(_("Active Power (p.u.)"));
206  m_activePowerChoices.Add(_("Active Power (W)"));
207  m_activePowerChoices.Add(_("Active Power (kW)"));
208  m_activePowerChoices.Add(_("Active Power (MW)"));
209 
210  m_reactivePowerChoices.Add(_("Reactive Power (p.u.)"));
211  m_reactivePowerChoices.Add(_("Reactive Power (VAr)"));
212  m_reactivePowerChoices.Add(_("Reactive Power (kVAr)"));
213  m_reactivePowerChoices.Add(_("Reactive Power (MVAr)"));
214 
215  m_resistanceChoices.Add(_("R (p.u.)"));
216  m_resistanceChoices.Add(_("R (") + omega + wxT(")"));
217 
218  m_indReactanceChoices.Add(_("XL (p.u.)"));
219  m_indReactanceChoices.Add(_("XL (") + omega + wxT(")"));
220 
221  m_capSusceptanceChoices.Add(_("B (p.u.)"));
222  m_capSusceptanceChoices.Add(_("B (S)"));
223 
224  m_currentChoices.Add(_("Current (p.u.)"));
225  m_currentChoices.Add(_("Current (A)"));
226  m_currentChoices.Add(_("Current (kA)"));
227 
228  // Power flow
229  m_gridPowerFlow->SetCellValue(0, 0, _("Type"));
230  m_gridPowerFlow->SetCellValue(0, 1, _("Name"));
231  m_gridPowerFlow->SetCellValue(0, 2, _("From"));
232  m_gridPowerFlow->SetCellValue(0, 3, _("To"));
233  m_gridPowerFlow->SetCellEditor(0, 4, new wxGridCellChoiceEditor(m_activePowerChoices));
234  m_gridPowerFlow->SetCellValue(0, 4, m_activePowerChoices[3]);
235  m_gridPowerFlow->SetCellEditor(0, 5, new wxGridCellChoiceEditor(m_reactivePowerChoices));
236  m_gridPowerFlow->SetCellValue(0, 5, m_reactivePowerChoices[3]);
237  m_gridPowerFlow->SetCellValue(0, 6, _("Online"));
238 
239  // Power flow buses
240  m_gridPFBuses->SetCellValue(0, 0, _("Name"));
241  m_gridPFBuses->SetCellValue(0, 1, _("Type"));
242  m_gridPFBuses->SetCellEditor(0, 2, new wxGridCellChoiceEditor(m_voltageChoices));
243  m_gridPFBuses->SetCellValue(0, 2, m_voltageChoices[0]);
244  m_gridPFBuses->SetCellValue(0, 3, _("Angle"));
245  m_gridPFBuses->SetCellEditor(0, 4, new wxGridCellChoiceEditor(m_activePowerChoices));
246  m_gridPFBuses->SetCellValue(0, 4, m_activePowerChoices[3]);
247  m_gridPFBuses->SetCellEditor(0, 5, new wxGridCellChoiceEditor(m_reactivePowerChoices));
248  m_gridPFBuses->SetCellValue(0, 5, m_reactivePowerChoices[3]);
249 
250  // Power flow branches
251  m_gridPFBranches->SetCellValue(0, 0, _("Type"));
252  m_gridPFBranches->SetCellValue(0, 1, _("Name"));
253  m_gridPFBranches->SetCellValue(0, 2, _("From"));
254  m_gridPFBranches->SetCellValue(0, 3, _("To"));
255  m_gridPFBranches->SetCellEditor(0, 4, new wxGridCellChoiceEditor(m_resistanceChoices));
256  m_gridPFBranches->SetCellValue(0, 4, m_resistanceChoices[0]);
257  m_gridPFBranches->SetCellEditor(0, 5, new wxGridCellChoiceEditor(m_indReactanceChoices));
258  m_gridPFBranches->SetCellValue(0, 5, m_indReactanceChoices[0]);
259  m_gridPFBranches->SetCellEditor(0, 6, new wxGridCellChoiceEditor(m_capSusceptanceChoices));
260  m_gridPFBranches->SetCellValue(0, 6, m_capSusceptanceChoices[0]);
261  m_gridPFBranches->SetCellValue(0, 7, _("TAP"));
262  m_gridPFBranches->SetCellValue(0, 8, _("Phase Shift"));
263  m_gridPFBranches->SetCellValue(0, 9, _("Online"));
264 
265  // Fault
266  m_gridFault->SetCellValue(0, 0, _("Fault bus name"));
267  m_gridFault->SetCellValue(0, 1, _("Phase A"));
268  m_gridFault->SetCellValue(0, 3, _("Phase B"));
269  m_gridFault->SetCellValue(0, 5, _("Phase C"));
270  m_gridFault->SetCellEditor(1, 1, new wxGridCellChoiceEditor(m_currentChoices));
271  m_gridFault->SetCellValue(1, 1, m_currentChoices[1]);
272  m_gridFault->SetCellValue(1, 2, _("Angle"));
273  m_gridFault->SetCellEditor(1, 3, new wxGridCellChoiceEditor(m_currentChoices));
274  m_gridFault->SetCellValue(1, 3, m_currentChoices[1]);
275  m_gridFault->SetCellValue(1, 4, _("Angle"));
276  m_gridFault->SetCellEditor(1, 5, new wxGridCellChoiceEditor(m_currentChoices));
277  m_gridFault->SetCellValue(1, 5, m_currentChoices[1]);
278  m_gridFault->SetCellValue(1, 6, _("Angle"));
279 
280  // Fault buses
281  m_gridFaultBuses->SetCellValue(0, 0, _("Name"));
282  m_gridFaultBuses->SetCellValue(0, 1, _("Phase A"));
283  m_gridFaultBuses->SetCellValue(0, 3, _("Phase B"));
284  m_gridFaultBuses->SetCellValue(0, 5, _("Phase C"));
285  m_gridFaultBuses->SetCellEditor(1, 1, new wxGridCellChoiceEditor(m_voltageChoices));
286  m_gridFaultBuses->SetCellValue(1, 1, m_voltageChoices[0]);
287  m_gridFaultBuses->SetCellValue(1, 2, _("Angle"));
288  m_gridFaultBuses->SetCellEditor(1, 3, new wxGridCellChoiceEditor(m_voltageChoices));
289  m_gridFaultBuses->SetCellValue(1, 3, m_voltageChoices[0]);
290  m_gridFaultBuses->SetCellValue(1, 4, _("Angle"));
291  m_gridFaultBuses->SetCellEditor(1, 5, new wxGridCellChoiceEditor(m_voltageChoices));
292  m_gridFaultBuses->SetCellValue(1, 5, m_voltageChoices[0]);
293  m_gridFaultBuses->SetCellValue(1, 6, _("Angle"));
294 
295  // Fault branches
296  m_gridFaultBranches->SetCellValue(0, 0, _("Type"));
297  m_gridFaultBranches->SetCellValue(0, 1, _("Name"));
298  m_gridFaultBranches->SetCellValue(0, 2, _("From"));
299  m_gridFaultBranches->SetCellValue(0, 3, _("To"));
300  m_gridFaultBranches->SetCellValue(0, 4, _("Phase A"));
301  m_gridFaultBranches->SetCellValue(0, 6, _("Phase B"));
302  m_gridFaultBranches->SetCellValue(0, 8, _("Phase C"));
303  m_gridFaultBranches->SetCellValue(0, 10, _("Online"));
304  m_gridFaultBranches->SetCellEditor(1, 4, new wxGridCellChoiceEditor(m_currentChoices));
305  m_gridFaultBranches->SetCellValue(1, 4, m_currentChoices[1]);
306  m_gridFaultBranches->SetCellValue(1, 5, _("Angle"));
307  m_gridFaultBranches->SetCellEditor(1, 6, new wxGridCellChoiceEditor(m_currentChoices));
308  m_gridFaultBranches->SetCellValue(1, 6, m_currentChoices[1]);
309  m_gridFaultBranches->SetCellValue(1, 7, _("Angle"));
310  m_gridFaultBranches->SetCellEditor(1, 8, new wxGridCellChoiceEditor(m_currentChoices));
311  m_gridFaultBranches->SetCellValue(1, 8, m_currentChoices[1]);
312  m_gridFaultBranches->SetCellValue(1, 9, _("Angle"));
313 
314  // Fault generators
315  m_gridFaultGenerators->SetCellValue(0, 0, _("Name"));
316  m_gridFaultGenerators->SetCellValue(0, 1, _("Phase A"));
317  m_gridFaultGenerators->SetCellValue(0, 3, _("Phase B"));
318  m_gridFaultGenerators->SetCellValue(0, 5, _("Phase C"));
319  m_gridFaultGenerators->SetCellEditor(1, 1, new wxGridCellChoiceEditor(m_currentChoices));
320  m_gridFaultGenerators->SetCellValue(1, 1, m_currentChoices[1]);
321  m_gridFaultGenerators->SetCellValue(1, 2, _("Angle"));
322  m_gridFaultGenerators->SetCellEditor(1, 3, new wxGridCellChoiceEditor(m_currentChoices));
323  m_gridFaultGenerators->SetCellValue(1, 3, m_currentChoices[1]);
324  m_gridFaultGenerators->SetCellValue(1, 4, _("Angle"));
325  m_gridFaultGenerators->SetCellEditor(1, 5, new wxGridCellChoiceEditor(m_currentChoices));
326  m_gridFaultGenerators->SetCellValue(1, 5, m_currentChoices[1]);
327  m_gridFaultGenerators->SetCellValue(1, 6, _("Angle"));
328 }
329 
330 void DataReport::FillValues(GridSelection gridToFill)
331 {
332  m_changingValues = true;
333  ElectricCalculation eCalc;
334  eCalc.GetElementsFromList(m_workspace->GetElementList());
335 
336  double basePower = m_workspace->GetProperties()->GetSimulationPropertiesData().basePower;
337  switch(m_workspace->GetProperties()->GetSimulationPropertiesData().basePowerUnit) {
338  case UNIT_kVA: {
339  basePower *= 1e3;
340  } break;
341  case UNIT_MVA: {
342  basePower *= 1e6;
343  } break;
344  default:
345  break;
346  }
347 
348  int rowNumber = 1;
349  auto lineList = eCalc.GetLineList();
350  auto transformerList = eCalc.GetTransformerList();
351  auto busList = eCalc.GetBusList();
352  auto generatorList = eCalc.GetSyncGeneratorList();
353 
354  // Power Flow
355  if(gridToFill == GRID_ALL || gridToFill == GRID_PF) {
356  double kActivePower = 1.0;
357  if(m_gridPowerFlow->GetCellValue(0, 4) == m_activePowerChoices[1])
358  kActivePower = basePower;
359  else if(m_gridPowerFlow->GetCellValue(0, 4) == m_activePowerChoices[2])
360  kActivePower = basePower / 1e3;
361  else if(m_gridPowerFlow->GetCellValue(0, 4) == m_activePowerChoices[3])
362  kActivePower = basePower / 1e6;
363 
364  double kReactivePower = 1.0;
365  if(m_gridPowerFlow->GetCellValue(0, 5) == m_reactivePowerChoices[1])
366  kReactivePower = basePower;
367  else if(m_gridPowerFlow->GetCellValue(0, 5) == m_reactivePowerChoices[2])
368  kReactivePower = basePower / 1e3;
369  else if(m_gridPowerFlow->GetCellValue(0, 5) == m_reactivePowerChoices[3])
370  kReactivePower = basePower / 1e6;
371 
372  for(auto it = lineList.begin(), itEnd = lineList.end(); it != itEnd; ++it) {
373  Line* line = *it;
374 
375  wxString busName1 = "-";
376  if(line->GetParentList()[0])
377  busName1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().name;
378  wxString busName2 = "-";
379  if(line->GetParentList()[1])
380  busName2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().name;
381 
382  wxString isOnline = _("Yes");
383  wxColour textColour = m_gridPowerFlow->GetDefaultCellTextColour();
384  if(!line->IsOnline()) {
385  isOnline = _("No");
386  textColour = m_offlineColour;
387  }
388  for(int i = 0; i < 2; ++i) {
389  for(int j = 0; j < 7; ++j) {
390  m_gridPowerFlow->SetCellTextColour(rowNumber + i, j, textColour);
391  }
392  }
393 
394  m_gridPowerFlow->SetCellValue(rowNumber, 9, isOnline);
395  auto data = line->GetPUElectricalData(basePower);
396 
397  m_gridPowerFlow->SetCellValue(rowNumber, 0, _("Line"));
398  m_gridPowerFlow->SetCellValue(rowNumber, 1, data.name);
399  m_gridPowerFlow->SetCellValue(rowNumber, 2, busName1);
400  m_gridPowerFlow->SetCellValue(rowNumber, 3, busName2);
401  m_gridPowerFlow->SetCellValue(rowNumber, 4,
402  line->StringFromDouble(std::real(data.powerFlow[0]) * kActivePower));
403  m_gridPowerFlow->SetCellValue(rowNumber, 5,
404  line->StringFromDouble(std::imag(data.powerFlow[0]) * kReactivePower));
405  m_gridPowerFlow->SetCellValue(rowNumber, 6, isOnline);
406  rowNumber++;
407 
408  m_gridPowerFlow->SetCellValue(rowNumber, 0, _("Line"));
409  m_gridPowerFlow->SetCellValue(rowNumber, 1, data.name);
410  m_gridPowerFlow->SetCellValue(rowNumber, 2, busName2);
411  m_gridPowerFlow->SetCellValue(rowNumber, 3, busName1);
412  m_gridPowerFlow->SetCellValue(rowNumber, 4,
413  line->StringFromDouble(std::real(data.powerFlow[1]) * kActivePower));
414  m_gridPowerFlow->SetCellValue(rowNumber, 5,
415  line->StringFromDouble(std::imag(data.powerFlow[1]) * kReactivePower));
416  m_gridPowerFlow->SetCellValue(rowNumber, 6, isOnline);
417  rowNumber++;
418  }
419 
420  for(auto it = transformerList.begin(), itEnd = transformerList.end(); it != itEnd; ++it) {
421  Transformer* transformer = *it;
422  auto data = transformer->GetPUElectricalData(basePower);
423 
424  wxString busName1 = "-";
425  if(transformer->GetParentList()[0])
426  busName1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().name;
427  wxString busName2 = "-";
428  if(transformer->GetParentList()[1])
429  busName2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().name;
430 
431  wxString isOnline = _("Yes");
432  wxColour textColour = m_gridPowerFlow->GetDefaultCellTextColour();
433  if(!transformer->IsOnline()) {
434  isOnline = _("No");
435  textColour = m_offlineColour;
436  }
437  for(int i = 0; i < 2; ++i) {
438  for(int j = 0; j < 7; ++j) {
439  m_gridPowerFlow->SetCellTextColour(rowNumber + i, j, textColour);
440  }
441  }
442 
443  m_gridPowerFlow->SetCellValue(rowNumber, 0, _("Transformer"));
444  m_gridPowerFlow->SetCellValue(rowNumber, 1, data.name);
445  m_gridPowerFlow->SetCellValue(rowNumber, 2, busName1);
446  m_gridPowerFlow->SetCellValue(rowNumber, 3, busName2);
447  m_gridPowerFlow->SetCellValue(rowNumber, 4,
448  transformer->StringFromDouble(std::real(data.powerFlow[0]) * kActivePower));
449  m_gridPowerFlow->SetCellValue(rowNumber, 5,
450  transformer->StringFromDouble(std::imag(data.powerFlow[0]) * kReactivePower));
451  m_gridPowerFlow->SetCellValue(rowNumber, 6, isOnline);
452  rowNumber++;
453 
454  m_gridPowerFlow->SetCellValue(rowNumber, 0, _("Transformer"));
455  m_gridPowerFlow->SetCellValue(rowNumber, 1, data.name);
456  m_gridPowerFlow->SetCellValue(rowNumber, 2, busName2);
457  m_gridPowerFlow->SetCellValue(rowNumber, 3, busName1);
458  m_gridPowerFlow->SetCellValue(rowNumber, 4,
459  transformer->StringFromDouble(std::real(data.powerFlow[1]) * kActivePower));
460  m_gridPowerFlow->SetCellValue(rowNumber, 5,
461  transformer->StringFromDouble(std::imag(data.powerFlow[1]) * kReactivePower));
462  m_gridPowerFlow->SetCellValue(rowNumber, 6, isOnline);
463  rowNumber++;
464  }
465  m_gridPowerFlow->AutoSize();
466  }
467 
468  // Power Flow buses
469  if(gridToFill == GRID_ALL || gridToFill == GRID_PFBUSES) {
470  double kActivePower = 1.0;
471  if(m_gridPFBuses->GetCellValue(0, 4) == m_activePowerChoices[1])
472  kActivePower = basePower;
473  else if(m_gridPFBuses->GetCellValue(0, 4) == m_activePowerChoices[2])
474  kActivePower = basePower / 1e3;
475  else if(m_gridPFBuses->GetCellValue(0, 4) == m_activePowerChoices[3])
476  kActivePower = basePower / 1e6;
477 
478  double kReactivePower = 1.0;
479  if(m_gridPFBuses->GetCellValue(0, 5) == m_reactivePowerChoices[1])
480  kReactivePower = basePower;
481  else if(m_gridPFBuses->GetCellValue(0, 5) == m_reactivePowerChoices[2])
482  kReactivePower = basePower / 1e3;
483  else if(m_gridPFBuses->GetCellValue(0, 5) == m_reactivePowerChoices[3])
484  kReactivePower = basePower / 1e6;
485 
486  rowNumber = 1;
487  for(auto it = busList.begin(), itEnd = busList.end(); it != itEnd; ++it) {
488  Bus* bus = *it;
489  auto data = bus->GetElectricalData();
490 
491  double vb = std::abs(data.nominalVoltage);
492  if(data.nominalVoltageUnit == UNIT_kV) vb *= 1e3;
493  double kVoltage = 1.0;
494  if(m_gridPFBuses->GetCellValue(0, 2) == m_voltageChoices[1])
495  kVoltage = vb;
496  else if(m_gridPFBuses->GetCellValue(0, 2) == m_voltageChoices[2])
497  kVoltage = vb / 1e3;
498 
499  m_gridPFBuses->SetCellValue(rowNumber, 0, data.name);
500  wxString busTypeString = "";
501  switch(data.busType) {
502  case BUS_SLACK: {
503  busTypeString = _("Slack");
504  } break;
505  case BUS_PV: {
506  busTypeString = _("PV");
507  } break;
508  case BUS_PQ: {
509  busTypeString = _("PQ");
510  } break;
511  }
512  m_gridPFBuses->SetCellValue(rowNumber, 1, busTypeString);
513  m_gridPFBuses->SetCellValue(rowNumber, 2, bus->StringFromDouble(std::abs(data.voltage) * kVoltage));
514  m_gridPFBuses->SetCellValue(rowNumber, 3, bus->StringFromDouble(wxRadToDeg(std::arg(data.voltage))));
515  m_gridPFBuses->SetCellValue(rowNumber, 4, bus->StringFromDouble(std::real(data.power) * kActivePower));
516  m_gridPFBuses->SetCellValue(rowNumber, 5, bus->StringFromDouble(std::imag(data.power) * kReactivePower));
517  rowNumber++;
518  }
519  m_gridPFBuses->AutoSize();
520  }
521 
522  // Power flow branches
523  if(gridToFill == GRID_ALL || gridToFill == GRID_PFBRANCHES) {
524  rowNumber = 1;
525  for(auto it = lineList.begin(), itEnd = lineList.end(); it != itEnd; ++it) {
526  Line* line = *it;
527  auto data = line->GetPUElectricalData(basePower);
528 
529  double vb = data.nominalVoltage;
530  if(data.nominalVoltageUnit == UNIT_kV) vb *= 1e3;
531  double zb = (vb * vb) / basePower;
532 
533  wxString busName1 = "-";
534  if(line->GetParentList()[0])
535  busName1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().name;
536  wxString busName2 = "-";
537  if(line->GetParentList()[1])
538  busName2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().name;
539  wxString isOnline = _("Yes");
540  wxColour textColour = m_gridPFBranches->GetDefaultCellTextColour();
541  if(!line->IsOnline()) {
542  isOnline = _("No");
543  textColour = m_offlineColour;
544  }
545  for(int j = 0; j < 10; ++j) {
546  m_gridPFBranches->SetCellTextColour(rowNumber, j, textColour);
547  }
548 
549  m_gridPFBranches->SetCellValue(rowNumber, 0, _("Line"));
550  m_gridPFBranches->SetCellValue(rowNumber, 1, data.name);
551 
552  m_gridPFBranches->SetCellValue(rowNumber, 2, busName1);
553  m_gridPFBranches->SetCellValue(rowNumber, 3, busName2);
554 
555  double k = 1.0;
556  if(m_gridPFBranches->GetCellValue(0, 4) == m_resistanceChoices[1]) k = zb;
557  m_gridPFBranches->SetCellValue(rowNumber, 4, line->StringFromDouble(data.resistance * k));
558  k = 1.0;
559  if(m_gridPFBranches->GetCellValue(0, 5) == m_indReactanceChoices[1]) k = zb;
560  m_gridPFBranches->SetCellValue(rowNumber, 5, line->StringFromDouble(data.indReactance * k));
561  k = 1.0;
562  if(m_gridPFBranches->GetCellValue(0, 6) == m_capSusceptanceChoices[1]) k = zb;
563  m_gridPFBranches->SetCellValue(rowNumber, 6, line->StringFromDouble(data.capSusceptance / k));
564  m_gridPFBranches->SetCellValue(rowNumber, 7, "-");
565  m_gridPFBranches->SetCellValue(rowNumber, 8, "-");
566  m_gridPFBranches->SetCellValue(rowNumber, 9, isOnline);
567  rowNumber++;
568  }
569  for(auto it = transformerList.begin(), itEnd = transformerList.end(); it != itEnd; ++it) {
570  Transformer* transformer = *it;
571  auto data = transformer->GetPUElectricalData(basePower);
572 
573  double vb = 0.0;
574  if(data.baseVoltage == 0) {
575  vb = data.primaryNominalVoltage;
576  if(data.primaryNominalVoltageUnit == UNIT_kV) vb *= 1e3;
577  } else {
578  vb = data.secondaryNominalVoltage;
579  if(data.secondaryNominalVoltageUnit == UNIT_kV) vb *= 1e3;
580  }
581  double zb = (vb * vb) / basePower;
582 
583  wxString busName1 = "-";
584  if(transformer->GetParentList()[0])
585  busName1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().name;
586  wxString busName2 = "-";
587  if(transformer->GetParentList()[1])
588  busName2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().name;
589 
590  wxString isOnline = _("Yes");
591  wxColour textColour = m_gridPFBranches->GetDefaultCellTextColour();
592  if(!transformer->IsOnline()) {
593  isOnline = _("No");
594  textColour = m_offlineColour;
595  }
596  for(int j = 0; j < 10; ++j) {
597  m_gridPFBranches->SetCellTextColour(rowNumber, j, textColour);
598  }
599 
600  m_gridPFBranches->SetCellValue(rowNumber, 0, _("Transformer"));
601  m_gridPFBranches->SetCellValue(rowNumber, 1, data.name);
602  m_gridPFBranches->SetCellValue(rowNumber, 2, busName1);
603  m_gridPFBranches->SetCellValue(rowNumber, 3, busName2);
604 
605  double k = 1.0;
606  if(m_gridPFBranches->GetCellValue(0, 4) == m_resistanceChoices[1]) k = zb;
607  m_gridPFBranches->SetCellValue(rowNumber, 4, transformer->StringFromDouble(data.resistance * k));
608  k = 1.0;
609  if(m_gridPFBranches->GetCellValue(0, 5) == m_indReactanceChoices[1]) k = zb;
610  m_gridPFBranches->SetCellValue(rowNumber, 5, transformer->StringFromDouble(data.indReactance * k));
611  m_gridPFBranches->SetCellValue(rowNumber, 6, "-");
612  m_gridPFBranches->SetCellValue(rowNumber, 7, transformer->StringFromDouble(data.turnsRatio));
613  m_gridPFBranches->SetCellValue(rowNumber, 8, transformer->StringFromDouble(data.phaseShift));
614  m_gridPFBranches->SetCellValue(rowNumber, 9, isOnline);
615  rowNumber++;
616  }
617  m_gridPFBranches->AutoSize();
618  }
619 
620  // Fault
621  if(gridToFill == GRID_ALL || gridToFill == GRID_FAULT) {
622  rowNumber = 2;
623  for(auto it = busList.begin(), itEnd = busList.end(); it != itEnd; ++it) {
624  Bus* bus = *it;
625  auto data = bus->GetElectricalData();
626  if(data.hasFault) {
627  double vb = bus->GetValueFromUnit(data.nominalVoltage, data.nominalVoltageUnit);
628  double ib = basePower / (std::sqrt(3.0) * vb);
629 
630  m_gridFault->SetCellValue(rowNumber, 0, data.name);
631 
632  double kCurrent = 1.0;
633  if(m_gridFault->GetCellValue(1, 1) == m_currentChoices[1]) {
634  kCurrent = ib;
635  } else if(m_gridFault->GetCellValue(1, 1) == m_currentChoices[2]) {
636  kCurrent = ib / 1e3;
637  }
638  m_gridFault->SetCellValue(rowNumber, 1,
639  bus->StringFromDouble(std::abs(data.faultCurrent[0]) * kCurrent));
640 
641  m_gridFault->SetCellValue(rowNumber, 2,
642  bus->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[0]))));
643 
644  kCurrent = 1.0;
645  if(m_gridFault->GetCellValue(1, 3) == m_currentChoices[1]) {
646  kCurrent = ib;
647  } else if(m_gridFault->GetCellValue(1, 3) == m_currentChoices[2]) {
648  kCurrent = ib / 1e3;
649  }
650  m_gridFault->SetCellValue(rowNumber, 3,
651  bus->StringFromDouble(std::abs(data.faultCurrent[1]) * kCurrent));
652 
653  m_gridFault->SetCellValue(rowNumber, 4,
654  bus->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[1]))));
655 
656  kCurrent = 1.0;
657  if(m_gridFault->GetCellValue(1, 5) == m_currentChoices[1]) {
658  kCurrent = ib;
659  } else if(m_gridFault->GetCellValue(1, 5) == m_currentChoices[2]) {
660  kCurrent = ib / 1e3;
661  }
662  m_gridFault->SetCellValue(rowNumber, 5,
663  bus->StringFromDouble(std::abs(data.faultCurrent[2]) * kCurrent));
664 
665  m_gridFault->SetCellValue(rowNumber, 6,
666  bus->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[2]))));
667 
668  rowNumber++;
669  }
670  }
671  m_gridFault->AutoSize();
672  }
673 
674  // Fault buses
675  if(gridToFill == GRID_ALL || gridToFill == GRID_FAULTBUSES) {
676  rowNumber = 2;
677  for(auto it = busList.begin(), itEnd = busList.end(); it != itEnd; ++it) {
678  Bus* bus = *it;
679  auto data = bus->GetElectricalData();
680  double vb = bus->GetValueFromUnit(data.nominalVoltage, data.nominalVoltageUnit);
681 
682  m_gridFaultBuses->SetCellValue(rowNumber, 0, data.name);
683  double kVoltage = 1.0;
684  if(m_gridFaultBuses->GetCellValue(1, 1) == m_voltageChoices[1]) {
685  kVoltage = vb;
686  } else if(m_gridFaultBuses->GetCellValue(1, 1) == m_voltageChoices[2]) {
687  kVoltage = vb / 1e3;
688  }
689  m_gridFaultBuses->SetCellValue(rowNumber, 1,
690  bus->StringFromDouble(std::abs(data.faultVoltage[0]) * kVoltage));
691  m_gridFaultBuses->SetCellValue(rowNumber, 2,
692  bus->StringFromDouble(wxRadToDeg(std::arg(data.faultVoltage[0]))));
693 
694  kVoltage = 1.0;
695  if(m_gridFaultBuses->GetCellValue(1, 3) == m_voltageChoices[1]) {
696  kVoltage = vb;
697  } else if(m_gridFaultBuses->GetCellValue(1, 3) == m_voltageChoices[2]) {
698  kVoltage = vb / 1e3;
699  }
700  m_gridFaultBuses->SetCellValue(rowNumber, 3,
701  bus->StringFromDouble(std::abs(data.faultVoltage[1]) * kVoltage));
702  m_gridFaultBuses->SetCellValue(rowNumber, 4,
703  bus->StringFromDouble(wxRadToDeg(std::arg(data.faultVoltage[1]))));
704 
705  kVoltage = 1.0;
706  if(m_gridFaultBuses->GetCellValue(1, 5) == m_voltageChoices[1]) {
707  kVoltage = vb;
708  } else if(m_gridFaultBuses->GetCellValue(1, 5) == m_voltageChoices[2]) {
709  kVoltage = vb / 1e3;
710  }
711  m_gridFaultBuses->SetCellValue(rowNumber, 5,
712  bus->StringFromDouble(std::abs(data.faultVoltage[2]) * kVoltage));
713  m_gridFaultBuses->SetCellValue(rowNumber, 6,
714  bus->StringFromDouble(wxRadToDeg(std::arg(data.faultVoltage[2]))));
715 
716  rowNumber++;
717  }
718  m_gridFaultBuses->AutoSize();
719  }
720 
721  // Fault branches
722  if(gridToFill == GRID_ALL || gridToFill == GRID_FAULTBRANCHES) {
723  rowNumber = 2;
724  for(auto it = lineList.begin(), itEnd = lineList.end(); it != itEnd; ++it) {
725  Line* line = *it;
726  auto data = line->GetPUElectricalData(basePower);
727 
728  double vb = line->GetValueFromUnit(data.nominalVoltage, data.nominalVoltageUnit);
729  double ib = basePower / (std::sqrt(3.0) * vb);
730 
731  wxString busName1 = "-";
732  if(line->GetParentList()[0])
733  busName1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().name;
734  wxString busName2 = "-";
735  if(line->GetParentList()[1])
736  busName2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().name;
737 
738  wxString isOnline = _("Yes");
739  wxColour textColour = m_gridFaultBranches->GetDefaultCellTextColour();
740  if(!line->IsOnline()) {
741  isOnline = _("No");
742  textColour = m_offlineColour;
743  }
744  for(int i = 0; i < 2; ++i) {
745  for(int j = 0; j < 11; ++j) {
746  m_gridFaultBranches->SetCellTextColour(rowNumber + i, j, textColour);
747  }
748  }
749 
750  m_gridFaultBranches->SetCellValue(rowNumber, 0, _("Line"));
751  m_gridFaultBranches->SetCellValue(rowNumber, 1, data.name);
752  m_gridFaultBranches->SetCellValue(rowNumber, 2, busName1);
753  m_gridFaultBranches->SetCellValue(rowNumber, 3, busName2);
754 
755  double kCurrent = 1.0;
756  if(m_gridFaultBranches->GetCellValue(1, 4) == m_currentChoices[1]) {
757  kCurrent = ib;
758  } else if(m_gridFaultBranches->GetCellValue(1, 4) == m_currentChoices[2]) {
759  kCurrent = ib / 1e3;
760  }
761  m_gridFaultBranches->SetCellValue(rowNumber, 4,
762  line->StringFromDouble(std::abs(data.faultCurrent[0][0]) * kCurrent));
763  m_gridFaultBranches->SetCellValue(rowNumber, 5,
764  line->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[0][0]))));
765  kCurrent = 1.0;
766  if(m_gridFaultBranches->GetCellValue(1, 6) == m_currentChoices[1]) {
767  kCurrent = ib;
768  } else if(m_gridFaultBranches->GetCellValue(1, 6) == m_currentChoices[2]) {
769  kCurrent = ib / 1e3;
770  }
771  m_gridFaultBranches->SetCellValue(rowNumber, 6,
772  line->StringFromDouble(std::abs(data.faultCurrent[0][1]) * kCurrent));
773  m_gridFaultBranches->SetCellValue(rowNumber, 7,
774  line->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[0][1]))));
775  kCurrent = 1.0;
776  if(m_gridFaultBranches->GetCellValue(1, 8) == m_currentChoices[1]) {
777  kCurrent = ib;
778  } else if(m_gridFaultBranches->GetCellValue(1, 8) == m_currentChoices[2]) {
779  kCurrent = ib / 1e3;
780  }
781  m_gridFaultBranches->SetCellValue(rowNumber, 8,
782  line->StringFromDouble(std::abs(data.faultCurrent[0][2]) * kCurrent));
783  m_gridFaultBranches->SetCellValue(rowNumber, 9,
784  line->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[0][2]))));
785  m_gridFaultBranches->SetCellValue(rowNumber, 10, isOnline);
786  rowNumber++;
787 
788  m_gridFaultBranches->SetCellValue(rowNumber, 0, _("Line"));
789  m_gridFaultBranches->SetCellValue(rowNumber, 1, data.name);
790  m_gridFaultBranches->SetCellValue(rowNumber, 2, busName2);
791  m_gridFaultBranches->SetCellValue(rowNumber, 3, busName1);
792  kCurrent = 1.0;
793  if(m_gridFaultBranches->GetCellValue(1, 4) == m_currentChoices[1]) {
794  kCurrent = ib;
795  } else if(m_gridFaultBranches->GetCellValue(1, 4) == m_currentChoices[2]) {
796  kCurrent = ib / 1e3;
797  }
798  m_gridFaultBranches->SetCellValue(rowNumber, 4,
799  line->StringFromDouble(std::abs(data.faultCurrent[1][0]) * kCurrent));
800  m_gridFaultBranches->SetCellValue(rowNumber, 5,
801  line->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[1][0]))));
802  kCurrent = 1.0;
803  if(m_gridFaultBranches->GetCellValue(1, 6) == m_currentChoices[1]) {
804  kCurrent = ib;
805  } else if(m_gridFaultBranches->GetCellValue(1, 6) == m_currentChoices[2]) {
806  kCurrent = ib / 1e3;
807  }
808  m_gridFaultBranches->SetCellValue(rowNumber, 6,
809  line->StringFromDouble(std::abs(data.faultCurrent[1][1]) * kCurrent));
810  m_gridFaultBranches->SetCellValue(rowNumber, 7,
811  line->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[1][1]))));
812  kCurrent = 1.0;
813  if(m_gridFaultBranches->GetCellValue(1, 8) == m_currentChoices[1]) {
814  kCurrent = ib;
815  } else if(m_gridFaultBranches->GetCellValue(1, 8) == m_currentChoices[2]) {
816  kCurrent = ib / 1e3;
817  }
818  m_gridFaultBranches->SetCellValue(rowNumber, 8,
819  line->StringFromDouble(std::abs(data.faultCurrent[1][2]) * kCurrent));
820  m_gridFaultBranches->SetCellValue(rowNumber, 9,
821  line->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[1][2]))));
822  m_gridFaultBranches->SetCellValue(rowNumber, 10, isOnline);
823  rowNumber++;
824  }
825 
826  for(auto it = transformerList.begin(), itEnd = transformerList.end(); it != itEnd; ++it) {
827  Transformer* transformer = *it;
828  auto data = transformer->GetPUElectricalData(basePower);
829 
830  double vb = transformer->GetValueFromUnit(data.primaryNominalVoltage, data.primaryNominalVoltageUnit);
831  double ibp = basePower / (std::sqrt(3.0) * vb);
832  vb = transformer->GetValueFromUnit(data.secondaryNominalVoltage, data.secondaryNominalVoltageUnit);
833  double ibs = basePower / (std::sqrt(3.0) * vb);
834 
835  wxString busName1 = "-";
836  if(transformer->GetParentList()[0])
837  busName1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().name;
838  wxString busName2 = "-";
839  if(transformer->GetParentList()[1])
840  busName2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().name;
841 
842  wxString isOnline = _("Yes");
843  wxColour textColour = m_gridFaultBranches->GetDefaultCellTextColour();
844  if(!transformer->IsOnline()) {
845  isOnline = _("No");
846  textColour = m_offlineColour;
847  }
848  for(int i = 0; i < 2; ++i) {
849  for(int j = 0; j < 11; ++j) {
850  m_gridFaultBranches->SetCellTextColour(rowNumber + i, j, textColour);
851  }
852  }
853 
854  m_gridFaultBranches->SetCellValue(rowNumber, 0, _("Transformer"));
855  m_gridFaultBranches->SetCellValue(rowNumber, 1, data.name);
856  m_gridFaultBranches->SetCellValue(rowNumber, 2, busName1);
857  m_gridFaultBranches->SetCellValue(rowNumber, 3, busName2);
858 
859  double kCurrent = 1.0;
860  if(m_gridFaultBranches->GetCellValue(1, 4) == m_currentChoices[1]) {
861  kCurrent = ibp;
862  } else if(m_gridFaultBranches->GetCellValue(1, 4) == m_currentChoices[2]) {
863  kCurrent = ibp / 1e3;
864  }
865  m_gridFaultBranches->SetCellValue(
866  rowNumber, 4, transformer->StringFromDouble(std::abs(data.faultCurrent[0][0]) * kCurrent));
867  m_gridFaultBranches->SetCellValue(
868  rowNumber, 5, transformer->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[0][0]))));
869  kCurrent = 1.0;
870  if(m_gridFaultBranches->GetCellValue(1, 6) == m_currentChoices[1]) {
871  kCurrent = ibp;
872  } else if(m_gridFaultBranches->GetCellValue(1, 6) == m_currentChoices[2]) {
873  kCurrent = ibp / 1e3;
874  }
875  m_gridFaultBranches->SetCellValue(
876  rowNumber, 6, transformer->StringFromDouble(std::abs(data.faultCurrent[0][1]) * kCurrent));
877  m_gridFaultBranches->SetCellValue(
878  rowNumber, 7, transformer->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[0][1]))));
879  kCurrent = 1.0;
880  if(m_gridFaultBranches->GetCellValue(1, 8) == m_currentChoices[1]) {
881  kCurrent = ibp;
882  } else if(m_gridFaultBranches->GetCellValue(1, 8) == m_currentChoices[2]) {
883  kCurrent = ibp / 1e3;
884  }
885  m_gridFaultBranches->SetCellValue(
886  rowNumber, 8, transformer->StringFromDouble(std::abs(data.faultCurrent[0][2]) * kCurrent));
887  m_gridFaultBranches->SetCellValue(
888  rowNumber, 9, transformer->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[0][2]))));
889  m_gridFaultBranches->SetCellValue(rowNumber, 10, isOnline);
890  rowNumber++;
891 
892  m_gridFaultBranches->SetCellValue(rowNumber, 0, _("Transformer"));
893  m_gridFaultBranches->SetCellValue(rowNumber, 1, data.name);
894  m_gridFaultBranches->SetCellValue(rowNumber, 2, busName2);
895  m_gridFaultBranches->SetCellValue(rowNumber, 3, busName1);
896  kCurrent = 1.0;
897  if(m_gridFaultBranches->GetCellValue(1, 4) == m_currentChoices[1]) {
898  kCurrent = ibs;
899  } else if(m_gridFaultBranches->GetCellValue(1, 4) == m_currentChoices[2]) {
900  kCurrent = ibs / 1e3;
901  }
902  m_gridFaultBranches->SetCellValue(
903  rowNumber, 4, transformer->StringFromDouble(std::abs(data.faultCurrent[1][0]) * kCurrent));
904  m_gridFaultBranches->SetCellValue(
905  rowNumber, 5, transformer->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[1][0]))));
906  kCurrent = 1.0;
907  if(m_gridFaultBranches->GetCellValue(1, 6) == m_currentChoices[1]) {
908  kCurrent = ibs;
909  } else if(m_gridFaultBranches->GetCellValue(1, 6) == m_currentChoices[2]) {
910  kCurrent = ibs / 1e3;
911  }
912  m_gridFaultBranches->SetCellValue(
913  rowNumber, 6, transformer->StringFromDouble(std::abs(data.faultCurrent[1][1]) * kCurrent));
914  m_gridFaultBranches->SetCellValue(
915  rowNumber, 7, transformer->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[1][1]))));
916  kCurrent = 1.0;
917  if(m_gridFaultBranches->GetCellValue(1, 8) == m_currentChoices[1]) {
918  kCurrent = ibs;
919  } else if(m_gridFaultBranches->GetCellValue(1, 8) == m_currentChoices[2]) {
920  kCurrent = ibs / 1e3;
921  }
922  m_gridFaultBranches->SetCellValue(
923  rowNumber, 8, transformer->StringFromDouble(std::abs(data.faultCurrent[1][2]) * kCurrent));
924  m_gridFaultBranches->SetCellValue(
925  rowNumber, 9, transformer->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[1][2]))));
926  m_gridFaultBranches->SetCellValue(rowNumber, 10, isOnline);
927  rowNumber++;
928  }
929 
930  m_gridFaultBranches->AutoSize();
931  }
932 
933  // Fault generators
934  if(gridToFill == GRID_ALL || gridToFill == GRID_FAULTGENERATORS) {
935  rowNumber = 2;
936  for(auto it = generatorList.begin(), itEnd = generatorList.end(); it != itEnd; ++it) {
937  SyncGenerator* generator = *it;
938  auto data = generator->GetPUElectricalData(basePower);
939  double vb = generator->GetValueFromUnit(data.nominalVoltage, data.nominalVoltageUnit);
940  double ib = basePower / (std::sqrt(3.0) * vb);
941 
942  m_gridFaultGenerators->SetCellValue(rowNumber, 0, data.name);
943 
944  double kCurrent = 1.0;
945  if(m_gridFaultGenerators->GetCellValue(1, 1) == m_currentChoices[1])
946  kCurrent = ib;
947  else if(m_gridFaultGenerators->GetCellValue(1, 1) == m_currentChoices[2])
948  kCurrent = ib / 1e3;
949  m_gridFaultGenerators->SetCellValue(rowNumber, 1,
950  generator->StringFromDouble(std::abs(data.faultCurrent[0]) * kCurrent));
951  m_gridFaultGenerators->SetCellValue(
952  rowNumber, 2, generator->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[0]))));
953 
954  kCurrent = 1.0;
955  if(m_gridFaultGenerators->GetCellValue(1, 3) == m_currentChoices[1])
956  kCurrent = ib;
957  else if(m_gridFaultGenerators->GetCellValue(1, 3) == m_currentChoices[2])
958  kCurrent = ib / 1e3;
959  m_gridFaultGenerators->SetCellValue(rowNumber, 3,
960  generator->StringFromDouble(std::abs(data.faultCurrent[1]) * kCurrent));
961  m_gridFaultGenerators->SetCellValue(
962  rowNumber, 4, generator->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[1]))));
963 
964  kCurrent = 1.0;
965  if(m_gridFaultGenerators->GetCellValue(1, 5) == m_currentChoices[1])
966  kCurrent = ib;
967  else if(m_gridFaultGenerators->GetCellValue(1, 5) == m_currentChoices[2])
968  kCurrent = ib / 1e3;
969  m_gridFaultGenerators->SetCellValue(rowNumber, 5,
970  generator->StringFromDouble(std::abs(data.faultCurrent[2]) * kCurrent));
971  m_gridFaultGenerators->SetCellValue(
972  rowNumber, 6, generator->StringFromDouble(wxRadToDeg(std::arg(data.faultCurrent[2]))));
973 
974  rowNumber++;
975  }
976  m_gridFaultGenerators->AutoSize();
977  }
978  m_changingValues = false;
979 }
980 
981 void DataReport::SetRowsColours(wxGrid* grid, int rowStart)
982 {
983  for(int i = rowStart; i < grid->GetNumberRows(); ++i) {
984  wxGridCellAttr* attr = grid->GetOrCreateCellAttr(i, 0);
985  if((i - rowStart) % 2 == 0)
986  attr->SetBackgroundColour(m_evenRowColour);
987  else
988  attr->SetBackgroundColour(m_oddRowColour);
989  grid->SetRowAttr(i, attr);
990  }
991 }
992 
993 void DataReport::OnPFBusGridChanged(wxGridEvent& event)
994 {
995  if(!m_changingValues) FillValues(GRID_PFBUSES);
996 }
997 void DataReport::OnFaulrGridChanged(wxGridEvent& event)
998 {
999  if(!m_changingValues) FillValues(GRID_FAULT);
1000 }
1001 void DataReport::OnFaultBranchesGridChanged(wxGridEvent& event)
1002 {
1003  if(!m_changingValues) FillValues(GRID_FAULTBRANCHES);
1004 }
1005 void DataReport::OnFaultBusesGridChanged(wxGridEvent& event)
1006 {
1007  if(!m_changingValues) FillValues(GRID_FAULTBUSES);
1008 }
1009 void DataReport::OnFaultGeneratorsGridChanged(wxGridEvent& event)
1010 {
1011  if(!m_changingValues) FillValues(GRID_FAULTGENERATORS);
1012 }
1013 void DataReport::OnPFBranchesGridChanged(wxGridEvent& event)
1014 {
1015  if(!m_changingValues) FillValues(GRID_PFBRANCHES);
1016 }
1017 void DataReport::OnPowerFlowGridChanged(wxGridEvent& event)
1018 {
1019  if(!m_changingValues) FillValues(GRID_PF);
1020 }
const std::vector< Transformer * > GetTransformerList() const
Get the transformers of the system (use GetElementsFromList first).
- -
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
- - -
Synchronous generator power element.
- -
const std::vector< Bus * > GetBusList() const
Get the buses of the system (use GetElementsFromList first).
-
const std::vector< SyncGenerator * > GetSyncGeneratorList() const
Get the synchronous generators of the system (use GetElementsFromList first).
-
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
- -
Power line element.
Definition: Line.h:59
- -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
-
virtual void GetElementsFromList(std::vector< Element *> elementList)
Separate the power elements from a generic list.
-
Base class of electric calculations, with general methods.
-
This class manages the graphical and power elements. It is responsible for handling the user&#39;s intera...
Definition: Workspace.h:81
- -
const std::vector< Line * > GetLineList() const
Get the lines of the system (use GetElementsFromList first).
-
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_data_report_8h.html b/docs/doxygen/html/_data_report_8h.html index 9ffd33b..5519110 100644 --- a/docs/doxygen/html/_data_report_8h.html +++ b/docs/doxygen/html/_data_report_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_data_report_8h.html','');});
DataReport.h File Reference
-
#include "DataReportBase.h"
-
-

Go to the source code of this file.

- +
#include "base/DataReportBase.h"
+
diff --git a/docs/doxygen/html/_data_report_8h_source.html b/docs/doxygen/html/_data_report_8h_source.html deleted file mode 100644 index d3f000e..0000000 --- a/docs/doxygen/html/_data_report_8h_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/DataReport.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  DataReport
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
DataReport.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef DATAREPORT_H
19 #define DATAREPORT_H
20 
21 #include "DataReportBase.h"
22 
23 class Workspace;
25 
33 class DataReport : public DataReportBase
34 {
35  public:
36  enum GridSelection {
37  GRID_ALL = 0,
38  GRID_PF,
39  GRID_PFBUSES,
40  GRID_PFBRANCHES,
41  GRID_FAULT,
42  GRID_FAULTBUSES,
43  GRID_FAULTBRANCHES,
44  GRID_FAULTGENERATORS,
45  };
46 
47  DataReport(wxWindow* parent, Workspace* workspace);
48  virtual ~DataReport();
49 
50  virtual void SetHeaders();
51  virtual void CreateGrids();
52  virtual void FillValues(GridSelection gridToFill = GRID_ALL);
53  virtual void SetRowsColours(wxGrid* grid, int rowStart = 1);
54 
55  protected:
56  virtual void OnFaulrGridChanged(wxGridEvent& event);
57  virtual void OnFaultBranchesGridChanged(wxGridEvent& event);
58  virtual void OnFaultBusesGridChanged(wxGridEvent& event);
59  virtual void OnFaultGeneratorsGridChanged(wxGridEvent& event);
60  virtual void OnPFBranchesGridChanged(wxGridEvent& event);
61  virtual void OnPowerFlowGridChanged(wxGridEvent& event);
62  virtual void OnPFBusGridChanged(wxGridEvent& event);
63  Workspace* m_workspace = NULL;
64  bool m_changingValues = false;
65 
66  // Headers choices
67  wxArrayString m_voltageChoices;
68  wxArrayString m_activePowerChoices;
69  wxArrayString m_reactivePowerChoices;
70  wxArrayString m_resistanceChoices;
71  wxArrayString m_indReactanceChoices;
72  wxArrayString m_capSusceptanceChoices;
73  wxArrayString m_currentChoices;
74 
75  // Colors
76  wxColour m_headerColour;
77  wxColour m_offlineColour;
78  wxColour m_oddRowColour;
79  wxColour m_evenRowColour;
80 };
81 #endif // DATAREPORT_H
-
Form that shows the results of power flow and fault calculations.
Definition: DataReport.h:33
-
Base class of electric calculations, with general methods.
-
This class manages the graphical and power elements. It is responsible for handling the user&#39;s intera...
Definition: Workspace.h:81
-
-
- - - - diff --git a/docs/doxygen/html/_data_report_base_8cpp_source.html b/docs/doxygen/html/_data_report_base_8cpp_source.html deleted file mode 100644 index c7cecb9..0000000 --- a/docs/doxygen/html/_data_report_base_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/DataReportBase.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
DataReportBase.cpp
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: DataReport.wxcp
4 // Do not modify this file by hand!
6 
7 #include "DataReportBase.h"
8 
9 
10 // Declare the bitmap loading function
11 extern void wxC6A63InitBitmapResources();
12 
13 static bool bBitmapLoaded = false;
14 
15 
16 DataReportBase::DataReportBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
17  : wxFrame(parent, id, title, pos, size, style)
18 {
19  if ( !bBitmapLoaded ) {
20  // We need to initialise the default bitmap handler
21  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
22  wxC6A63InitBitmapResources();
23  bBitmapLoaded = true;
24  }
25  // Set icon(s) to the application/dialog
26  wxIconBundle app_icons;
27  {
28  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart16"));
29  wxIcon icn;
30  icn.CopyFromBitmap(iconBmp);
31  app_icons.AddIcon( icn );
32  }
33  {
34  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart32"));
35  wxIcon icn;
36  icn.CopyFromBitmap(iconBmp);
37  app_icons.AddIcon( icn );
38  }
39  {
40  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart64"));
41  wxIcon icn;
42  icn.CopyFromBitmap(iconBmp);
43  app_icons.AddIcon( icn );
44  }
45  {
46  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart128"));
47  wxIcon icn;
48  icn.CopyFromBitmap(iconBmp);
49  app_icons.AddIcon( icn );
50  }
51  {
52  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("chart256"));
53  wxIcon icn;
54  icn.CopyFromBitmap(iconBmp);
55  app_icons.AddIcon( icn );
56  }
57  SetIcons( app_icons );
58 
59 
60  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
61  this->SetSizer(boxSizerLvl1_1);
62 
63  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxHORIZONTAL);
64 
65  boxSizerLvl1_1->Add(boxSizerLvl2_1, 1, wxEXPAND, WXC_FROM_DIP(5));
66 
67  m_notebookDataReport = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
68  m_notebookDataReport->SetName(wxT("m_notebookDataReport"));
69 
70  boxSizerLvl2_1->Add(m_notebookDataReport, 1, wxEXPAND, WXC_FROM_DIP(5));
71 
72  m_panelPowerFlowData = new wxPanel(m_notebookDataReport, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookDataReport, wxSize(-1,-1)), wxTAB_TRAVERSAL);
73  m_notebookDataReport->AddPage(m_panelPowerFlowData, _("Power flow data"), false);
74 
75  wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL);
76  m_panelPowerFlowData->SetSizer(boxSizerLvl3_1);
77 
78  m_notebookPowerFlow = new wxNotebook(m_panelPowerFlowData, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelPowerFlowData, wxSize(-1,-1)), wxBK_LEFT|wxBK_DEFAULT);
79  m_notebookPowerFlow->SetName(wxT("m_notebookPowerFlow"));
80 
81  boxSizerLvl3_1->Add(m_notebookPowerFlow, 1, wxEXPAND, WXC_FROM_DIP(5));
82 
83  m_panelPowerFlow = new wxPanel(m_notebookPowerFlow, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookPowerFlow, wxSize(-1,-1)), wxTAB_TRAVERSAL);
84  m_notebookPowerFlow->AddPage(m_panelPowerFlow, _("Power flow"), false);
85 
86  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
87  m_panelPowerFlow->SetSizer(boxSizerLvl4_1);
88 
89  m_gridPowerFlow = new wxGrid(m_panelPowerFlow, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelPowerFlow, wxSize(-1,-1)), wxWANTS_CHARS);
90  m_gridPowerFlow->CreateGrid(0, 0);
91  m_gridPowerFlow->SetRowLabelAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
92  m_gridPowerFlow->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
93  #if wxVERSION_NUMBER >= 2904
94  m_gridPowerFlow->UseNativeColHeader(true);
95  #endif
96  m_gridPowerFlow->EnableEditing(true);
97 
98  boxSizerLvl4_1->Add(m_gridPowerFlow, 1, wxEXPAND, WXC_FROM_DIP(5));
99 
100  m_panelPFBuses = new wxPanel(m_notebookPowerFlow, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookPowerFlow, wxSize(-1,-1)), wxTAB_TRAVERSAL);
101  m_notebookPowerFlow->AddPage(m_panelPFBuses, _("Buses"), false);
102 
103  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
104  m_panelPFBuses->SetSizer(boxSizerLvl4_2);
105 
106  m_gridPFBuses = new wxGrid(m_panelPFBuses, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelPFBuses, wxSize(-1,-1)), wxWANTS_CHARS);
107  m_gridPFBuses->CreateGrid(0, 0);
108  m_gridPFBuses->SetRowLabelAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
109  m_gridPFBuses->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
110  #if wxVERSION_NUMBER >= 2904
111  m_gridPFBuses->UseNativeColHeader(true);
112  #endif
113  m_gridPFBuses->EnableEditing(true);
114 
115  boxSizerLvl4_2->Add(m_gridPFBuses, 1, wxEXPAND, WXC_FROM_DIP(5));
116 
117  m_panelPFBranches = new wxPanel(m_notebookPowerFlow, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookPowerFlow, wxSize(-1,-1)), wxTAB_TRAVERSAL);
118  m_notebookPowerFlow->AddPage(m_panelPFBranches, _("Branches"), false);
119 
120  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
121  m_panelPFBranches->SetSizer(boxSizerLvl4_3);
122 
123  m_gridPFBranches = new wxGrid(m_panelPFBranches, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelPFBranches, wxSize(-1,-1)), wxWANTS_CHARS);
124  m_gridPFBranches->CreateGrid(0, 0);
125  m_gridPFBranches->SetRowLabelAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
126  m_gridPFBranches->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
127  #if wxVERSION_NUMBER >= 2904
128  m_gridPFBranches->UseNativeColHeader(true);
129  #endif
130  m_gridPFBranches->EnableEditing(true);
131 
132  boxSizerLvl4_3->Add(m_gridPFBranches, 1, wxEXPAND, WXC_FROM_DIP(5));
133 
134  m_panelFaultData = new wxPanel(m_notebookDataReport, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookDataReport, wxSize(-1,-1)), wxTAB_TRAVERSAL);
135  m_notebookDataReport->AddPage(m_panelFaultData, _("Fault data"), false);
136 
137  wxBoxSizer* boxSizerLvl3_2 = new wxBoxSizer(wxVERTICAL);
138  m_panelFaultData->SetSizer(boxSizerLvl3_2);
139 
140  m_notebookFault = new wxNotebook(m_panelFaultData, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFaultData, wxSize(-1,-1)), wxBK_LEFT|wxBK_DEFAULT);
141  m_notebookFault->SetName(wxT("m_notebookFault"));
142 
143  boxSizerLvl3_2->Add(m_notebookFault, 1, wxEXPAND, WXC_FROM_DIP(5));
144 
145  m_panelFault = new wxPanel(m_notebookFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookFault, wxSize(-1,-1)), wxTAB_TRAVERSAL);
146  m_notebookFault->AddPage(m_panelFault, _("Fault"), false);
147 
148  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
149  m_panelFault->SetSizer(boxSizerLvl4_4);
150 
151  m_gridFault = new wxGrid(m_panelFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), wxWANTS_CHARS);
152  m_gridFault->CreateGrid(0, 0);
153  m_gridFault->SetRowLabelAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
154  m_gridFault->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
155  #if wxVERSION_NUMBER >= 2904
156  m_gridFault->UseNativeColHeader(true);
157  #endif
158  m_gridFault->EnableEditing(true);
159 
160  boxSizerLvl4_4->Add(m_gridFault, 1, wxEXPAND, WXC_FROM_DIP(5));
161 
162  m_panelFaultBuses = new wxPanel(m_notebookFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookFault, wxSize(-1,-1)), wxTAB_TRAVERSAL);
163  m_notebookFault->AddPage(m_panelFaultBuses, _("Buses"), false);
164 
165  wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxVERTICAL);
166  m_panelFaultBuses->SetSizer(boxSizerLvl4_5);
167 
168  m_gridFaultBuses = new wxGrid(m_panelFaultBuses, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFaultBuses, wxSize(-1,-1)), wxWANTS_CHARS);
169  m_gridFaultBuses->CreateGrid(0, 0);
170  m_gridFaultBuses->SetRowLabelAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
171  m_gridFaultBuses->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
172  #if wxVERSION_NUMBER >= 2904
173  m_gridFaultBuses->UseNativeColHeader(true);
174  #endif
175  m_gridFaultBuses->EnableEditing(true);
176 
177  boxSizerLvl4_5->Add(m_gridFaultBuses, 1, wxEXPAND, WXC_FROM_DIP(5));
178 
179  m_panelFaultBranches = new wxPanel(m_notebookFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookFault, wxSize(-1,-1)), wxTAB_TRAVERSAL);
180  m_notebookFault->AddPage(m_panelFaultBranches, _("Branches"), false);
181 
182  wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxVERTICAL);
183  m_panelFaultBranches->SetSizer(boxSizerLvl4_6);
184 
185  m_gridFaultBranches = new wxGrid(m_panelFaultBranches, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFaultBranches, wxSize(-1,-1)), wxWANTS_CHARS);
186  m_gridFaultBranches->CreateGrid(0, 0);
187  m_gridFaultBranches->SetRowLabelAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
188  m_gridFaultBranches->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
189  #if wxVERSION_NUMBER >= 2904
190  m_gridFaultBranches->UseNativeColHeader(true);
191  #endif
192  m_gridFaultBranches->EnableEditing(true);
193 
194  boxSizerLvl4_6->Add(m_gridFaultBranches, 1, wxEXPAND, WXC_FROM_DIP(5));
195 
196  m_panelFaultGenerators = new wxPanel(m_notebookFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebookFault, wxSize(-1,-1)), wxTAB_TRAVERSAL);
197  m_notebookFault->AddPage(m_panelFaultGenerators, _("Generators"), false);
198 
199  wxBoxSizer* boxSizerLvl4_118 = new wxBoxSizer(wxVERTICAL);
200  m_panelFaultGenerators->SetSizer(boxSizerLvl4_118);
201 
202  m_gridFaultGenerators = new wxGrid(m_panelFaultGenerators, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFaultGenerators, wxSize(-1,-1)), wxWANTS_CHARS);
203  m_gridFaultGenerators->CreateGrid(0, 0);
204  m_gridFaultGenerators->SetRowLabelAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
205  m_gridFaultGenerators->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
206  #if wxVERSION_NUMBER >= 2904
207  m_gridFaultGenerators->UseNativeColHeader(true);
208  #endif
209  m_gridFaultGenerators->EnableEditing(true);
210 
211  boxSizerLvl4_118->Add(m_gridFaultGenerators, 1, wxEXPAND, WXC_FROM_DIP(5));
212 
213 
214  #if wxVERSION_NUMBER >= 2900
215  if(!wxPersistenceManager::Get().Find(m_notebookDataReport)){
216  wxPersistenceManager::Get().RegisterAndRestore(m_notebookDataReport);
217  } else {
218  wxPersistenceManager::Get().Restore(m_notebookDataReport);
219  }
220  #endif
221 
222  #if wxVERSION_NUMBER >= 2900
223  if(!wxPersistenceManager::Get().Find(m_notebookPowerFlow)){
224  wxPersistenceManager::Get().RegisterAndRestore(m_notebookPowerFlow);
225  } else {
226  wxPersistenceManager::Get().Restore(m_notebookPowerFlow);
227  }
228  #endif
229 
230  #if wxVERSION_NUMBER >= 2900
231  if(!wxPersistenceManager::Get().Find(m_notebookFault)){
232  wxPersistenceManager::Get().RegisterAndRestore(m_notebookFault);
233  } else {
234  wxPersistenceManager::Get().Restore(m_notebookFault);
235  }
236  #endif
237 
238  SetName(wxT("DataReportBase"));
239  SetMinClientSize(wxSize(500,300));
240  SetSize(-1,-1);
241  if (GetSizer()) {
242  GetSizer()->Fit(this);
243  }
244  if(GetParent()) {
245  CentreOnParent(wxBOTH);
246  } else {
247  CentreOnScreen(wxBOTH);
248  }
249 #if wxVERSION_NUMBER >= 2900
250  if(!wxPersistenceManager::Get().Find(this)) {
251  wxPersistenceManager::Get().RegisterAndRestore(this);
252  } else {
253  wxPersistenceManager::Get().Restore(this);
254  }
255 #endif
256  // Connect events
257  m_gridPowerFlow->Connect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnPowerFlowGridChanged), NULL, this);
258  m_gridPFBuses->Connect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnPFBusGridChanged), NULL, this);
259  m_gridPFBranches->Connect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnPFBranchesGridChanged), NULL, this);
260  m_gridFault->Connect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnFaulrGridChanged), NULL, this);
261  m_gridFaultBuses->Connect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnFaultBusesGridChanged), NULL, this);
262  m_gridFaultBranches->Connect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnFaultBranchesGridChanged), NULL, this);
263  m_gridFaultGenerators->Connect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnFaultGeneratorsGridChanged), NULL, this);
264 
265 }
266 
267 DataReportBase::~DataReportBase()
268 {
269  m_gridPowerFlow->Disconnect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnPowerFlowGridChanged), NULL, this);
270  m_gridPFBuses->Disconnect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnPFBusGridChanged), NULL, this);
271  m_gridPFBranches->Disconnect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnPFBranchesGridChanged), NULL, this);
272  m_gridFault->Disconnect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnFaulrGridChanged), NULL, this);
273  m_gridFaultBuses->Disconnect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnFaultBusesGridChanged), NULL, this);
274  m_gridFaultBranches->Disconnect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnFaultBranchesGridChanged), NULL, this);
275  m_gridFaultGenerators->Disconnect(wxEVT_GRID_CELL_CHANGED, wxGridEventHandler(DataReportBase::OnFaultGeneratorsGridChanged), NULL, this);
276 
277 }
-
- - - - diff --git a/docs/doxygen/html/_data_report_base_8h_source.html b/docs/doxygen/html/_data_report_base_8h_source.html deleted file mode 100644 index 89ee097..0000000 --- a/docs/doxygen/html/_data_report_base_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/DataReportBase.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
DataReportBase.h
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: DataReport.wxcp
4 // Do not modify this file by hand!
6 
7 #ifndef _PSP_PROJECT_DATAREPORT_BASE_CLASSES_H
8 #define _PSP_PROJECT_DATAREPORT_BASE_CLASSES_H
9 
10 #include <wx/settings.h>
11 #include <wx/xrc/xmlres.h>
12 #include <wx/xrc/xh_bmp.h>
13 #include <wx/frame.h>
14 #include <wx/iconbndl.h>
15 #include <wx/artprov.h>
16 #include <wx/sizer.h>
17 #include <wx/notebook.h>
18 #include <wx/panel.h>
19 #include <wx/imaglist.h>
20 #include <wx/grid.h>
21 #if wxVERSION_NUMBER >= 2900
22 #include <wx/persist.h>
23 #include <wx/persist/toplevel.h>
24 #include <wx/persist/bookctrl.h>
25 #include <wx/persist/treebook.h>
26 #endif
27 
28 #ifdef WXC_FROM_DIP
29 #undef WXC_FROM_DIP
30 #endif
31 #if wxVERSION_NUMBER >= 3100
32 #define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
33 #else
34 #define WXC_FROM_DIP(x) x
35 #endif
36 
37 
38 class DataReportBase : public wxFrame
39 {
40 protected:
41  wxNotebook* m_notebookDataReport;
42  wxPanel* m_panelPowerFlowData;
43  wxNotebook* m_notebookPowerFlow;
44  wxPanel* m_panelPowerFlow;
45  wxGrid* m_gridPowerFlow;
46  wxPanel* m_panelPFBuses;
47  wxGrid* m_gridPFBuses;
48  wxPanel* m_panelPFBranches;
49  wxGrid* m_gridPFBranches;
50  wxPanel* m_panelFaultData;
51  wxNotebook* m_notebookFault;
52  wxPanel* m_panelFault;
53  wxGrid* m_gridFault;
54  wxPanel* m_panelFaultBuses;
55  wxGrid* m_gridFaultBuses;
56  wxPanel* m_panelFaultBranches;
57  wxGrid* m_gridFaultBranches;
58  wxPanel* m_panelFaultGenerators;
59  wxGrid* m_gridFaultGenerators;
60 
61 protected:
62  virtual void OnPowerFlowGridChanged(wxGridEvent& event) { event.Skip(); }
63  virtual void OnPFBusGridChanged(wxGridEvent& event) { event.Skip(); }
64  virtual void OnPFBranchesGridChanged(wxGridEvent& event) { event.Skip(); }
65  virtual void OnFaulrGridChanged(wxGridEvent& event) { event.Skip(); }
66  virtual void OnFaultBusesGridChanged(wxGridEvent& event) { event.Skip(); }
67  virtual void OnFaultBranchesGridChanged(wxGridEvent& event) { event.Skip(); }
68  virtual void OnFaultGeneratorsGridChanged(wxGridEvent& event) { event.Skip(); }
69 
70 public:
71  wxGrid* GetGridPowerFlow() { return m_gridPowerFlow; }
72  wxPanel* GetPanelPowerFlow() { return m_panelPowerFlow; }
73  wxGrid* GetGridPFBuses() { return m_gridPFBuses; }
74  wxPanel* GetPanelPFBuses() { return m_panelPFBuses; }
75  wxGrid* GetGridPFBranches() { return m_gridPFBranches; }
76  wxPanel* GetPanelPFBranches() { return m_panelPFBranches; }
77  wxNotebook* GetNotebookPowerFlow() { return m_notebookPowerFlow; }
78  wxPanel* GetPanelPowerFlowData() { return m_panelPowerFlowData; }
79  wxGrid* GetGridFault() { return m_gridFault; }
80  wxPanel* GetPanelFault() { return m_panelFault; }
81  wxGrid* GetGridFaultBuses() { return m_gridFaultBuses; }
82  wxPanel* GetPanelFaultBuses() { return m_panelFaultBuses; }
83  wxGrid* GetGridFaultBranches() { return m_gridFaultBranches; }
84  wxPanel* GetPanelFaultBranches() { return m_panelFaultBranches; }
85  wxGrid* GetGridFaultGenerators() { return m_gridFaultGenerators; }
86  wxPanel* GetPanelFaultGenerators() { return m_panelFaultGenerators; }
87  wxNotebook* GetNotebookFault() { return m_notebookFault; }
88  wxPanel* GetPanelFaultData() { return m_panelFaultData; }
89  wxNotebook* GetNotebookDataReport() { return m_notebookDataReport; }
90  DataReportBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Data report"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_FRAME_STYLE);
91  virtual ~DataReportBase();
92 };
93 
94 #endif
-
-
- - - - diff --git a/docs/doxygen/html/_data_report_bitmaps_8cpp_source.html b/docs/doxygen/html/_data_report_bitmaps_8cpp_source.html deleted file mode 100644 index 4951e8f..0000000 --- a/docs/doxygen/html/_data_report_bitmaps_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/DataReportBitmaps.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
DataReportBitmaps.cpp
-
-
-
1 //
2 // This file was automatically generated by wxrc, do not edit by hand.
3 //
4 
5 #include <wx/wxprec.h>
6 
7 #ifdef __BORLANDC__
8  #pragma hdrstop
9 #endif
10 
11 #include <wx/filesys.h>
12 #include <wx/fs_mem.h>
13 #include <wx/xrc/xmlres.h>
14 #include <wx/xrc/xh_all.h>
15 
16 #if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
17  #define XRC_ADD_FILE(name, data, size, mime) \
18  wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
19 #else
20  #define XRC_ADD_FILE(name, data, size, mime) \
21  wxMemoryFSHandler::AddFile(name, data, size)
22 #endif
23 
24 static size_t xml_res_size_0 = 3278;
25 static unsigned char xml_res_file_0[] = {
26 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,128,0,0,0,128,8,6,0,
27 0,0,195,62,97,203,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
28 72,89,115,0,0,21,211,0,0,21,211,1,251,209,60,11,0,0,0,25,116,69,88,116,
29 83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,
30 101,46,111,114,103,155,238,60,26,0,0,12,75,73,68,65,84,120,156,237,157,
31 121,116,21,213,25,192,127,55,9,33,33,160,64,136,85,64,212,82,168,162,162,
32 30,212,163,7,212,138,130,27,214,106,177,5,165,81,17,194,86,15,160,213,138,
33 138,68,20,42,10,138,11,178,184,69,80,118,227,82,177,238,90,197,189,173,
34 82,80,4,142,82,203,81,34,88,1,129,188,240,150,220,254,17,34,9,121,239,101,
35 238,125,119,150,100,238,239,63,242,230,155,249,14,243,155,111,230,125,247,
36 206,187,130,73,31,74,178,178,176,132,147,44,98,17,168,174,246,59,15,139,
37 79,100,33,37,86,130,240,82,83,251,173,4,161,101,223,205,223,74,16,74,234,
38 63,253,89,9,66,71,78,131,191,236,149,160,251,193,237,24,126,226,65,142,
39 118,178,112,245,15,124,82,81,105,58,55,139,7,52,20,0,64,74,58,231,199,25,
40 127,114,17,217,217,217,141,238,100,85,69,196,10,208,68,73,221,0,144,146,
41 221,187,119,147,72,36,60,76,199,226,53,105,59,64,210,74,16,40,218,178,147,
42 92,98,70,247,217,104,11,208,74,16,28,238,22,247,179,65,92,194,88,177,152,
43 150,68,141,236,211,81,15,216,74,224,63,135,179,153,98,86,208,133,10,102,
44 50,131,117,98,32,37,60,67,14,153,157,19,199,131,0,86,2,127,41,21,243,234,
45 149,255,195,216,204,92,49,149,245,226,18,74,120,134,108,244,190,186,43,
46 141,2,213,74,16,143,199,181,14,102,209,163,27,155,184,156,191,37,253,236,
47 8,190,101,174,152,202,106,49,136,98,86,40,139,160,60,12,40,165,164,178,
48 178,210,74,224,33,147,196,188,70,75,253,81,108,228,9,81,202,191,247,138,
49 144,229,80,4,173,113,96,43,129,119,28,197,70,6,241,138,227,237,123,236,
50 21,225,53,49,198,209,246,218,19,1,172,4,222,80,42,230,105,221,223,223,164,
51 151,163,237,50,154,9,82,43,129,180,15,134,174,112,52,95,49,144,55,148,227,
52 254,199,129,220,39,7,59,218,54,227,169,64,82,74,226,123,34,80,109,37,48,
53 205,100,230,56,190,151,215,101,6,67,248,145,2,71,219,26,154,11,38,33,86,
54 101,37,48,200,9,172,227,98,241,150,114,220,247,180,229,65,249,59,199,219,
55 155,155,12,40,173,4,38,185,77,204,69,32,149,227,166,201,43,216,73,43,199,
56 219,155,157,13,106,37,48,66,47,214,50,128,149,202,113,21,20,242,16,3,149,
57 98,204,79,7,182,18,100,204,237,98,142,246,213,95,73,158,82,140,59,243,193,
58 173,4,218,156,202,106,206,227,61,229,184,205,116,96,46,151,40,199,185,247,
59 66,128,149,64,139,201,204,209,138,155,194,80,34,180,84,142,115,247,141,
60 16,43,129,18,189,89,197,217,226,35,229,184,77,252,140,71,228,69,90,199,
61 116,255,149,32,43,129,99,238,96,182,86,220,20,134,178,135,92,173,88,111,
62 222,9,179,18,52,74,95,241,49,191,18,255,84,142,251,154,67,120,92,94,168,
63 125,92,239,94,10,148,18,162,182,99,152,138,73,242,97,173,184,201,114,24,
64 81,90,104,31,215,251,183,66,173,4,13,56,135,247,57,93,124,162,28,247,37,
65 157,153,207,5,25,29,219,159,215,130,173,4,245,40,69,255,234,143,211,248,
66 180,253,116,248,247,94,120,52,2,9,59,148,124,1,43,57,69,172,86,142,219,
67 192,161,44,228,220,140,143,239,239,15,3,196,170,66,47,193,36,161,119,245,
68 79,146,35,50,190,250,193,111,1,32,212,18,252,70,188,197,73,124,174,28,247,
69 57,71,176,132,126,70,114,240,95,0,8,165,4,2,201,36,205,123,127,169,44,161,
70 218,208,169,11,134,0,16,58,9,126,43,222,224,120,214,43,199,173,161,43,79,
71 211,215,88,30,193,17,0,66,35,65,22,213,76,228,81,173,216,137,140,52,118,
72 245,215,228,18,52,66,32,193,239,121,149,158,108,80,142,251,23,71,242,156,
73 60,195,104,46,193,19,0,154,181,4,217,84,51,81,232,93,253,147,40,65,34,140,
74 230,147,252,247,1,130,64,172,10,200,131,236,250,41,150,240,12,125,196,167,
75 188,207,177,188,39,143,99,13,93,73,4,212,227,100,92,198,75,28,197,70,229,
76 184,143,228,209,188,192,105,198,243,9,174,0,80,79,130,150,68,121,80,220,
77 205,48,158,5,224,15,188,8,2,118,147,207,167,116,103,165,60,158,119,57,142,
78 247,57,150,239,105,235,111,222,41,200,166,154,155,197,99,90,177,183,50,
79 194,112,54,53,4,91,0,128,88,21,93,216,78,121,206,77,244,98,109,131,143,
80 11,136,208,155,85,244,22,171,0,144,8,214,114,56,15,113,41,179,228,165,94,
81 103,155,150,98,86,240,75,190,86,142,123,79,246,228,101,78,117,33,163,160,
82 62,3,212,161,143,248,148,215,227,67,233,153,104,120,242,147,33,144,244,
83 96,35,211,120,128,131,248,193,229,236,156,211,130,56,183,104,222,251,111,
84 101,164,225,108,246,17,88,1,4,146,113,98,17,207,113,29,69,108,163,50,6,
85 49,133,241,163,2,34,252,137,39,221,75,80,145,171,248,43,63,231,27,229,184,
86 149,242,120,94,231,36,23,50,170,33,144,2,180,161,146,5,226,86,74,169,255,
87 94,156,170,4,163,197,242,64,84,129,150,68,181,239,253,55,139,209,134,179,
88 169,79,224,4,232,198,38,94,21,163,83,206,139,87,145,160,128,8,215,137,167,
89 12,102,167,199,48,241,28,93,168,80,142,123,77,158,204,219,242,4,23,50,218,
90 71,160,4,56,159,119,121,93,140,226,200,70,30,148,84,36,24,195,50,95,171,
91 64,30,81,110,164,76,43,118,50,195,204,38,147,132,64,8,144,77,53,165,204,
92 227,41,49,145,3,216,237,40,198,169,4,126,87,129,17,162,156,206,108,81,142,
93 123,73,158,202,59,184,123,245,67,0,4,40,100,7,79,115,3,227,196,34,229,183,
94 97,156,74,224,87,21,200,35,202,245,204,215,138,45,165,196,112,54,201,241,
95 85,128,19,89,203,59,98,184,214,108,216,90,156,72,224,215,55,130,49,98,41,
96 157,216,170,28,247,130,236,195,135,28,227,66,70,13,241,77,128,65,188,204,
97 11,98,60,29,53,254,131,246,199,137,4,94,127,35,40,32,194,13,44,80,142,147,
98 8,38,51,220,133,140,146,227,185,0,45,137,114,191,152,206,28,113,39,121,
99 236,49,182,223,198,36,240,250,89,224,26,150,104,9,247,44,103,240,49,61,
100 92,200,40,57,158,10,208,137,45,188,200,88,138,89,225,202,254,43,99,16,77,
101 35,129,87,207,2,173,169,228,90,177,80,57,78,34,184,77,122,115,239,175,197,
102 51,1,206,228,31,188,45,74,232,37,190,48,178,191,84,195,162,145,52,18,120,
103 85,5,198,177,136,34,182,41,199,45,231,44,86,209,205,133,140,82,227,186,
104 0,181,45,221,229,226,207,20,178,195,200,62,215,208,149,115,121,128,72,138,
105 119,225,211,73,224,118,21,56,144,93,140,215,184,250,171,201,226,118,121,
106 181,11,25,165,199,85,1,90,19,161,140,219,26,180,116,51,97,25,103,211,79,
107 206,226,67,121,116,218,119,226,82,73,80,64,132,107,81,63,65,78,25,207,66,
108 218,243,163,114,220,98,250,179,154,95,184,144,81,122,92,19,160,27,155,120,
109 77,140,226,34,241,119,35,251,139,147,77,41,37,12,151,55,255,244,30,252,
110 125,12,74,89,5,32,181,4,127,20,75,93,169,2,109,217,201,88,177,88,57,46,
111 225,211,213,15,46,9,224,180,165,235,148,173,180,227,98,121,55,51,247,251,
112 237,187,239,104,79,25,3,210,198,38,147,192,173,42,112,189,88,64,91,118,
113 42,199,61,201,249,124,193,225,198,243,113,130,81,1,116,90,186,141,241,129,
114 60,150,211,228,195,41,219,162,51,229,224,180,85,0,146,75,96,186,10,20,178,
115 131,107,88,162,28,151,32,139,169,242,42,99,121,168,98,76,128,76,90,186,
116 169,40,99,0,191,102,6,21,20,166,220,198,73,21,128,134,18,20,16,97,188,88,
117 100,34,77,0,110,16,243,105,131,250,186,73,101,92,200,122,186,24,203,67,
118 21,35,2,116,97,51,111,137,145,25,181,116,235,82,69,46,163,229,141,140,147,
119 215,57,122,247,221,73,21,128,134,18,232,54,107,246,167,136,109,140,102,
120 185,114,92,140,28,166,200,161,25,31,63,19,140,8,112,189,152,207,161,26,
121 227,221,201,248,138,78,156,37,31,98,33,231,56,142,113,90,5,160,190,4,166,
122 170,192,4,202,104,173,113,245,63,202,69,108,164,99,198,199,207,4,35,2,228,
123 102,184,108,73,45,175,200,83,232,43,103,243,25,93,149,99,157,86,1,168,47,
124 65,166,85,224,16,190,103,132,40,87,142,139,210,130,105,242,10,237,227,154,
125 194,247,225,96,168,233,234,205,148,131,25,196,20,182,211,70,107,31,42,85,
126 0,246,73,144,105,21,152,64,25,173,168,82,142,155,199,197,252,135,67,180,
127 143,107,10,223,5,216,73,43,134,48,153,82,50,127,227,117,166,28,76,149,194,
128 111,229,213,74,160,91,5,58,178,149,97,226,89,229,184,42,114,185,83,94,169,
129 28,231,6,190,10,176,134,174,156,46,31,102,133,236,99,100,127,223,209,158,
130 50,233,188,10,64,141,4,45,18,122,85,96,162,120,148,124,141,17,205,217,114,
131 32,223,80,164,28,231,6,190,9,176,132,126,244,147,179,140,63,4,205,68,173,
132 10,64,141,4,37,137,165,116,96,187,227,152,195,216,204,80,158,87,77,143,
133 74,242,184,139,98,229,56,183,240,92,128,218,150,238,8,121,147,214,79,155,
134 54,70,5,133,202,85,0,32,59,86,201,216,132,243,9,28,183,136,199,180,86,241,
135 156,37,47,77,219,215,240,26,79,5,72,213,210,53,205,189,92,166,92,5,0,174,
136 142,47,165,40,209,248,12,165,218,69,28,85,217,77,62,211,25,162,28,231,38,
137 158,9,208,88,75,215,36,58,207,2,0,173,168,98,84,236,73,72,164,191,178,247,
138 95,196,209,41,247,49,136,45,180,87,142,115,19,79,4,112,210,210,53,141,110,
139 21,24,41,202,233,16,251,14,226,201,215,230,77,183,136,99,58,118,209,202,
140 245,202,167,131,171,2,168,182,116,77,162,218,23,168,165,21,85,140,102,89,
141 141,0,73,36,112,178,136,99,50,238,225,50,182,210,78,57,206,109,92,19,64,
142 167,165,107,26,213,190,64,45,35,69,121,205,55,130,253,36,232,206,127,149,
143 22,113,172,101,7,173,3,121,245,131,75,2,100,210,210,53,73,5,133,218,85,
144 96,148,216,59,184,83,71,130,219,197,108,173,153,77,51,184,156,109,28,160,
145 28,231,5,70,5,48,209,210,53,141,118,21,160,124,95,95,32,30,165,71,124,157,
146 235,139,56,250,129,49,1,76,182,116,77,162,91,5,10,136,236,171,2,192,132,
147 248,92,98,113,245,171,127,186,116,190,136,163,31,24,57,83,203,101,95,78,
148 147,143,24,107,233,154,102,166,28,68,149,198,138,26,35,40,167,61,63,210,
149 147,13,12,16,43,169,138,195,30,133,31,47,219,74,59,30,196,249,34,142,126,
150 96,68,128,87,57,37,16,35,91,169,168,160,3,79,104,244,5,90,19,97,140,88,
151 202,77,226,241,159,102,57,169,72,112,151,44,102,151,194,34,142,126,16,156,
152 90,237,50,247,50,88,171,10,140,97,57,231,240,65,189,191,57,145,64,103,17,
153 71,63,8,141,0,186,85,32,143,61,73,231,56,54,38,129,206,34,142,126,16,26,
154 1,64,191,59,152,138,84,18,232,46,226,232,7,161,18,160,130,66,158,144,153,
155 173,177,179,63,201,36,208,93,196,209,15,66,37,0,152,175,2,80,95,130,76,
156 22,113,244,131,208,9,224,70,21,128,125,18,100,178,136,163,31,132,78,0,112,
157 167,10,0,108,136,31,204,227,177,204,23,114,242,146,80,10,80,65,33,243,57,
158 223,248,126,167,201,98,162,241,234,148,67,201,65,36,148,2,0,220,35,47,55,
159 90,5,54,210,145,197,244,175,249,71,138,161,228,32,18,90,1,76,87,129,105,
160 178,184,254,50,110,77,68,130,208,10,0,230,170,192,151,116,98,57,103,55,
161 252,160,9,72,16,106,1,76,85,129,191,200,171,82,47,226,24,112,9,66,45,0,
162 100,94,5,190,224,48,202,57,51,253,70,1,150,32,244,2,84,80,200,2,121,158,
163 118,252,157,242,74,103,243,31,2,42,65,232,5,128,154,190,128,78,243,230,
164 51,186,242,60,167,59,15,8,160,4,86,0,224,91,138,152,47,213,159,5,166,226,
165 240,234,175,75,192,36,176,2,236,101,6,67,148,158,5,86,209,157,23,101,111,
166 189,131,5,72,130,224,175,26,230,17,21,20,114,164,92,70,91,118,57,218,126,
167 7,173,51,91,196,177,86,128,28,127,199,13,172,0,117,216,78,27,111,103,51,
168 7,64,2,123,11,240,27,159,111,7,86,128,32,224,163,4,86,128,160,224,147,4,
169 86,128,32,17,143,66,204,220,34,26,78,176,2,4,141,68,204,83,9,172,0,65,196,
170 67,9,172,0,65,197,35,9,172,0,65,198,3,9,172,0,65,199,101,9,172,0,77,1,23,
171 37,176,2,52,21,92,146,192,10,208,148,112,65,2,43,64,83,195,176,4,41,71,
172 3,115,178,156,15,117,182,201,205,166,168,192,14,44,122,135,132,236,4,162,
173 133,179,249,11,219,171,18,68,19,201,151,241,73,121,214,142,57,40,223,113,
174 58,211,251,119,102,122,255,206,142,183,183,152,33,55,55,151,252,252,198,
175 207,211,185,79,173,231,229,47,147,175,101,104,111,1,77,152,104,52,74,36,
176 18,201,104,31,86,128,38,78,166,18,88,1,154,1,209,104,148,202,74,245,69,
177 171,192,10,208,108,136,197,98,90,18,88,1,154,17,58,18,88,1,154,25,170,18,
178 88,1,154,33,42,18,88,1,154,41,78,37,176,2,52,99,156,72,144,178,19,248,252,
179 186,29,180,207,115,214,222,149,134,86,11,183,184,195,87,91,146,119,1,1,
180 4,19,222,180,103,47,12,100,231,64,139,134,63,93,107,111,1,97,33,17,135,
181 88,195,53,142,173,0,97,34,137,4,86,128,176,177,159,4,86,128,48,82,71,2,
182 59,139,35,172,36,226,64,21,255,7,181,153,56,45,184,129,88,206,0,0,0,0,73,
183 69,78,68,174,66,96,130};
184 
185 static size_t xml_res_size_1 = 560;
186 static unsigned char xml_res_file_1[] = {
187 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
188 0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
189 72,89,115,0,0,2,186,0,0,2,186,1,219,5,165,194,0,0,0,25,116,69,88,116,83,
190 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
191 46,111,114,103,155,238,60,26,0,0,1,173,73,68,65,84,56,141,149,147,63,72,
192 28,65,28,133,191,209,185,91,148,104,226,33,130,160,32,92,115,136,141,145,
193 112,130,85,42,17,141,40,241,76,229,191,78,33,54,169,44,130,70,16,212,11,
194 8,130,162,156,26,8,4,133,96,170,84,73,8,136,49,218,120,133,34,8,162,22,
195 34,68,137,133,38,81,55,187,115,55,22,114,171,203,90,172,175,154,249,189,
196 121,31,143,97,70,24,111,86,117,121,241,67,182,79,76,76,149,230,190,202,
197 42,123,32,88,235,8,19,46,48,124,135,6,196,12,79,89,191,6,0,152,166,137,
198 86,150,175,112,5,123,244,51,75,139,248,126,3,0,72,219,22,248,128,12,137,
199 41,108,36,195,186,203,13,0,174,1,202,34,136,125,103,184,138,109,26,89,38,
200 161,155,57,164,232,14,0,80,157,74,178,147,122,198,174,104,38,143,11,151,
201 55,40,18,152,4,25,166,211,153,185,0,221,124,226,51,175,200,86,151,148,168,
202 67,94,138,143,142,23,101,139,122,86,152,162,133,95,20,122,1,175,197,28,
203 35,98,130,36,17,158,232,247,252,180,35,244,170,15,78,139,65,145,224,156,
204 28,226,186,221,213,202,1,52,240,131,25,221,68,163,30,227,136,66,70,69,39,
205 185,234,140,158,212,2,53,108,80,203,26,147,196,56,38,228,2,200,204,162,
206 143,94,166,41,119,140,175,58,74,146,8,221,106,158,58,86,249,43,115,121,
207 171,219,60,23,235,52,88,210,85,30,51,78,7,33,254,80,169,54,25,179,99,156,
208 240,200,115,70,122,38,183,244,133,106,190,17,165,148,35,198,213,115,192,
209 2,25,244,15,0,136,233,145,155,77,230,161,221,130,200,236,44,1,64,73,94,
210 128,255,62,63,147,144,32,2,6,7,103,22,178,52,63,0,192,98,107,216,87,56,
211 35,195,48,120,252,110,23,185,114,240,143,23,139,251,252,190,176,81,105,
212 125,47,200,254,105,154,43,206,33,140,175,150,245,39,228,0,0,0,0,73,69,78,
213 68,174,66,96,130};
214 
215 static size_t xml_res_size_2 = 6410;
216 static unsigned char xml_res_file_2[] = {
217 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,0,0,0,1,0,8,6,0,0,0,
218 92,114,168,102,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,
219 89,115,0,0,43,165,0,0,43,165,1,137,102,26,50,0,0,0,25,116,69,88,116,83,
220 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
221 46,111,114,103,155,238,60,26,0,0,24,135,73,68,65,84,120,156,237,221,105,
222 120,85,213,185,192,241,255,10,73,152,81,68,20,84,174,181,22,171,32,85,107,
223 181,173,15,125,180,74,65,64,133,130,85,164,14,113,66,172,94,161,106,69,
224 171,64,64,173,120,169,138,67,85,16,209,160,12,82,172,114,11,181,181,150,
225 58,161,60,90,43,215,214,129,50,22,28,65,40,40,25,200,25,214,253,16,3,9,
226 156,36,103,88,251,221,211,251,251,210,199,152,179,223,45,37,255,189,206,
227 201,58,251,24,38,189,153,2,138,80,74,197,78,17,181,213,126,159,131,82,202,
228 39,69,164,147,104,4,148,138,167,186,165,127,58,165,17,80,42,134,118,63,
229 247,215,8,40,21,59,141,95,252,211,8,40,21,43,123,191,250,175,17,80,42,54,
230 50,255,250,79,35,160,84,44,52,253,251,255,250,8,88,43,120,58,74,41,73,205,
231 111,0,74,167,32,81,163,17,80,42,162,90,222,1,168,17,80,42,178,178,219,2,
232 172,17,80,42,146,138,179,254,206,250,8,148,180,161,67,235,86,180,47,105,
233 229,244,68,118,166,210,108,171,73,57,61,166,82,170,121,217,7,0,118,69,96,
234 226,143,122,114,253,73,221,156,158,200,31,87,111,103,224,220,85,78,143,
235 169,148,106,94,238,239,2,76,167,72,212,84,99,245,233,128,82,161,151,215,
236 219,128,211,169,36,85,85,85,26,1,165,66,46,239,251,0,36,147,26,1,165,194,
237 174,160,27,129,104,4,148,10,183,130,239,4,164,17,80,42,188,156,220,10,76,
238 35,160,212,222,78,53,111,114,32,91,253,62,141,102,57,187,23,96,50,153,164,
239 178,178,82,35,160,20,208,158,106,230,113,11,107,205,16,238,53,119,209,141,
240 45,126,159,82,70,78,111,6,154,74,165,52,2,74,1,99,152,207,1,108,165,29,
241 53,92,195,124,86,155,31,115,175,185,43,112,43,2,231,119,3,214,8,168,184,
242 235,68,37,215,153,39,27,125,173,61,213,187,66,48,133,7,232,204,23,62,157,
243 93,99,158,220,14,92,35,160,226,108,44,243,216,175,137,31,240,14,84,49,206,
244 84,240,111,115,38,83,120,128,125,249,82,248,236,26,243,236,243,0,52,2,42,
245 142,246,97,7,99,205,188,22,191,175,227,87,33,88,99,134,82,206,12,246,97,
246 135,192,217,237,205,211,15,4,209,8,168,184,185,142,57,57,45,239,247,227,
247 11,38,154,71,118,133,160,19,149,30,158,221,222,60,255,68,32,141,128,138,
248 139,46,108,103,76,22,87,255,166,30,91,31,130,113,166,130,182,236,116,124,
249 118,153,137,124,36,152,70,64,197,193,245,230,201,130,175,224,251,179,141,
250 41,60,192,122,115,22,227,76,5,109,168,117,116,118,153,137,125,38,160,70,
251 64,69,217,254,108,227,42,22,56,59,222,1,108,101,10,15,240,47,51,140,49,
252 102,190,103,33,16,253,80,80,141,128,138,170,113,166,130,142,84,57,63,110,
253 15,62,99,26,119,177,210,12,103,140,153,79,107,199,33,16,255,84,96,141,128,
254 138,154,110,108,225,103,44,244,116,198,127,241,41,211,184,139,119,205,185,
255 92,200,18,12,110,126,126,124,249,88,112,141,128,138,146,27,121,156,118,
256 212,136,204,58,156,15,185,208,44,193,98,156,28,207,151,0,128,70,64,69,67,
257 119,62,103,148,121,70,116,230,100,46,119,118,44,223,2,0,26,1,21,126,55,
258 51,75,236,87,118,0,127,226,251,188,108,143,115,118,60,95,3,0,26,1,21,94,
259 61,248,140,203,204,34,209,153,229,14,175,254,16,128,0,64,93,4,106,170,171,
260 244,115,7,84,168,220,98,30,117,254,170,124,115,22,219,190,44,183,125,156,
261 30,51,16,1,0,72,167,82,144,208,207,34,84,225,112,40,159,80,198,98,209,153,
262 46,159,251,215,11,76,0,0,72,167,53,2,42,20,38,152,153,148,146,16,155,247,
263 172,61,133,55,233,229,252,184,193,10,0,104,4,84,224,29,206,135,92,200,18,
264 177,121,22,195,36,15,174,254,16,196,0,128,70,64,5,218,4,51,147,98,228,62,
265 198,110,33,167,177,130,35,60,57,118,48,3,0,26,1,21,72,61,217,200,72,254,
266 40,54,47,77,17,183,217,75,60,59,126,112,3,0,117,17,168,213,8,168,224,152,
267 100,166,139,94,253,159,226,71,188,67,79,207,142,31,236,0,0,88,141,128,10,
268 134,94,172,227,92,254,44,54,47,69,17,183,218,75,61,157,17,252,0,128,70,
269 64,5,66,185,153,65,17,105,177,121,115,24,200,251,28,230,233,140,112,4,0,
270 52,2,202,87,71,179,134,225,44,21,155,151,162,136,95,217,139,61,159,19,158,
271 0,128,70,64,249,230,86,30,22,189,250,87,112,6,43,57,212,243,57,225,10,0,
272 104,4,148,184,111,243,1,67,204,75,98,243,18,20,115,187,135,175,252,55,20,
273 190,0,64,131,8,200,21,89,197,215,36,166,59,187,1,71,54,102,217,179,88,203,
274 193,34,179,194,25,0,248,42,2,53,26,1,229,169,239,152,247,25,108,150,137,
275 205,171,165,132,41,148,137,205,11,111,0,64,35,160,60,119,27,15,137,94,253,
276 31,177,67,89,79,119,177,121,225,14,0,104,4,148,103,78,50,239,48,128,215,
277 197,230,213,80,42,122,245,135,40,4,0,52,2,202,19,147,121,88,116,222,195,
278 12,231,67,14,16,157,25,141,0,128,70,64,57,213,215,172,224,52,222,20,155,
279 87,67,41,83,237,5,98,243,234,69,39,0,160,17,80,206,220,198,67,162,243,30,
280 224,28,62,166,171,232,76,136,90,0,64,35,160,10,214,207,188,193,201,252,
281 93,108,94,37,109,125,185,250,67,20,3,0,26,1,85,144,9,204,20,157,119,63,
282 231,178,137,253,68,103,214,139,102,0,64,35,160,242,114,186,121,157,31,240,
283 182,216,188,29,180,227,110,59,82,108,222,158,162,27,0,208,8,168,156,149,
284 51,67,116,222,61,118,36,155,233,44,58,179,161,104,7,0,52,2,42,107,103,242,
285 10,223,229,159,98,243,182,211,129,105,156,39,54,47,147,232,7,0,52,2,170,
286 69,6,203,120,35,251,220,255,110,251,83,182,210,73,116,230,158,226,17,0,
287 208,8,168,102,13,229,37,78,224,61,177,121,219,232,200,125,156,43,54,175,
288 41,241,9,0,104,4,84,70,6,203,68,35,251,220,127,170,189,128,109,116,20,157,
289 153,73,188,2,0,26,1,181,151,159,240,23,142,97,149,216,188,45,236,195,253,
290 1,184,250,67,28,3,0,26,1,181,75,17,105,110,49,143,138,206,188,147,139,248,
291 146,118,162,51,155,18,207,0,128,70,64,1,48,130,231,233,195,106,177,121,
292 155,233,204,67,118,184,216,188,150,196,55,0,160,17,136,185,86,164,25,47,
293 124,245,191,131,50,118,4,228,234,15,113,15,0,104,4,98,236,124,254,192,145,
294 172,23,155,247,9,251,51,221,14,19,155,151,13,13,0,104,4,98,168,21,105,126,
295 105,30,19,157,249,43,123,49,85,180,17,157,217,18,13,64,61,141,64,172,148,
296 241,123,142,96,131,216,188,143,233,202,163,12,17,155,151,45,13,64,67,26,
297 129,88,40,33,41,126,245,191,213,94,74,53,173,69,103,102,67,3,176,39,141,
298 64,228,93,202,34,190,206,71,98,243,54,208,141,89,156,37,54,47,23,26,128,
299 76,244,115,7,34,171,148,4,227,76,133,232,204,201,246,50,106,41,17,157,153,
300 45,13,64,83,172,213,8,68,208,40,158,225,107,124,34,54,111,61,221,121,130,
301 65,98,243,114,165,1,104,142,70,32,82,218,80,43,126,245,47,183,163,2,123,
302 245,7,13,64,203,52,2,145,113,165,89,200,33,108,18,155,183,138,30,204,97,
303 160,216,188,124,104,0,178,81,31,129,180,70,32,172,218,178,147,235,121,82,
304 116,102,185,29,69,146,86,162,51,115,165,1,200,150,181,144,208,8,132,213,
305 213,102,1,7,177,89,108,222,123,28,198,124,250,139,205,203,151,6,32,23,26,
306 129,80,106,79,181,248,213,127,146,29,69,58,4,63,94,193,63,195,160,201,35,
307 2,39,154,119,185,136,197,162,59,207,212,110,215,152,167,56,128,173,98,243,
308 254,193,55,88,200,169,98,243,10,81,236,247,9,132,82,125,4,74,218,66,81,
309 243,13,29,197,51,220,207,84,74,77,2,128,47,104,207,27,182,55,203,56,134,
310 183,56,138,87,56,54,16,119,134,137,170,14,84,241,115,230,138,206,44,39,
311 28,87,127,208,0,228,175,133,8,180,161,150,251,205,84,46,227,217,70,95,239,
312 68,37,253,204,27,244,227,13,0,82,20,177,146,67,121,149,99,89,102,235,162,
313 240,30,135,97,49,34,255,25,81,119,45,115,233,202,127,196,230,189,205,55,
314 121,198,158,34,54,175,80,26,128,66,52,17,129,30,124,198,66,198,113,34,239,
315 182,120,136,86,164,233,197,58,122,177,142,81,230,25,0,62,165,11,127,179,
316 71,241,22,71,241,170,169,11,67,16,247,145,7,221,62,236,96,172,153,39,58,
317 115,162,189,34,84,241,214,0,20,106,143,8,244,55,203,153,203,45,116,97,123,
318 222,135,236,198,22,206,48,175,114,6,175,2,80,107,74,248,187,61,146,229,
319 230,104,94,179,223,226,105,78,13,205,18,211,79,215,49,135,206,124,33,54,
320 239,77,122,177,152,190,98,243,92,208,191,69,46,88,139,73,84,113,131,125,
321 156,63,48,166,160,31,254,76,74,73,240,61,243,15,198,50,143,5,230,38,206,
322 102,169,211,227,71,81,23,182,51,70,175,254,45,210,0,56,208,129,106,42,152,
323 200,205,137,223,136,252,138,112,162,153,65,17,250,171,200,230,92,199,147,
324 116,162,82,108,222,235,244,225,57,78,18,155,231,138,6,160,64,61,217,200,
325 11,230,74,206,226,101,172,133,202,4,164,60,254,217,236,197,58,93,5,52,99,
326 127,182,113,181,89,32,58,115,2,163,69,231,185,162,1,40,192,32,150,177,212,
327 140,230,72,254,189,235,107,82,17,208,85,64,211,198,153,10,58,82,37,54,111,
328 25,199,240,130,61,81,108,158,75,26,128,60,20,147,162,156,25,204,49,227,
329 51,254,69,147,136,128,174,2,50,235,198,22,126,198,66,209,153,183,112,165,
330 232,60,151,52,0,57,234,202,127,120,150,235,25,107,230,97,176,77,126,159,
331 68,4,38,152,71,116,21,176,135,113,166,130,118,212,136,205,91,106,79,224,
332 69,123,188,216,60,215,52,0,57,56,150,149,44,53,63,163,175,89,145,213,247,
333 123,29,129,222,172,213,85,64,3,221,249,156,43,248,157,232,204,73,230,114,
334 209,121,174,105,0,178,84,198,98,158,55,255,77,15,62,205,233,113,94,71,64,
335 95,11,216,237,102,102,209,150,157,98,243,254,196,247,121,217,30,39,54,207,
336 11,26,128,22,180,161,150,251,204,175,153,102,238,162,148,68,94,199,240,
337 50,2,189,88,199,112,93,5,208,131,207,184,204,44,18,157,89,78,184,175,254,
338 160,1,104,214,193,108,98,9,99,184,144,37,5,31,203,203,8,76,212,215,2,184,
339 153,89,180,166,86,108,222,18,250,178,220,246,17,155,231,21,13,64,19,250,
340 154,21,188,104,70,115,188,249,192,217,49,189,138,64,111,214,198,122,21,
341 112,40,159,112,177,249,189,232,204,73,54,252,87,127,208,0,236,197,96,185,
342 142,57,44,226,58,79,222,69,230,85,4,38,152,153,177,93,5,140,55,143,230,
343 253,244,44,31,139,56,153,55,233,37,54,207,75,26,128,6,58,80,77,133,41,103,
344 188,153,73,43,15,127,152,188,136,192,209,172,137,229,42,224,112,62,228,
345 34,22,139,205,179,24,202,237,40,177,121,94,211,0,124,165,225,150,94,9,94,
346 68,32,142,175,5,76,48,51,41,38,37,54,239,105,123,42,43,56,66,108,158,215,
347 52,0,100,222,210,43,193,117,4,226,246,90,64,79,54,50,146,63,138,205,75,
348 83,196,173,92,42,54,79,66,172,3,80,76,138,219,205,67,77,110,233,149,224,
349 58,2,227,205,163,177,89,5,148,155,25,162,87,255,5,244,227,29,122,138,205,
350 147,16,219,0,116,97,59,11,25,199,85,44,104,118,75,175,4,151,17,232,195,
351 106,134,153,191,22,126,160,128,235,197,58,70,240,188,216,188,20,69,76,182,
352 151,137,205,147,18,203,0,28,203,74,94,52,163,57,197,188,229,247,169,236,
353 82,31,129,164,131,8,148,19,253,221,129,229,194,59,32,231,114,58,239,115,
354 152,216,60,41,177,11,64,190,91,122,37,88,11,85,14,34,208,155,181,145,94,
355 5,72,255,198,35,69,17,183,219,75,196,230,73,138,77,0,92,108,233,149,224,
356 42,2,81,94,5,220,202,195,162,255,109,21,156,193,74,14,21,155,39,41,22,1,
357 112,185,165,87,130,139,8,68,117,21,240,109,62,96,136,121,73,108,94,130,
358 226,200,94,253,33,6,1,240,98,75,175,4,23,17,136,226,42,96,18,211,69,95,
359 180,125,140,51,89,203,193,98,243,164,69,54,0,6,203,88,51,207,179,45,189,
360 18,10,141,64,111,214,242,99,94,116,122,78,126,58,158,247,25,108,150,137,
361 205,171,165,132,41,182,76,108,158,31,34,25,128,250,45,189,229,204,240,116,
362 75,175,132,66,35,48,201,76,143,204,42,224,118,243,144,232,213,255,17,59,
363 148,117,28,36,54,207,15,145,11,192,145,172,231,69,51,74,108,75,111,62,82,
364 57,254,177,23,18,129,168,172,2,78,50,239,48,128,215,197,230,213,80,202,
365 29,92,44,54,207,47,145,10,192,32,150,241,103,115,21,223,224,67,191,79,37,
366 35,139,225,97,134,243,115,123,109,238,143,45,32,2,81,88,5,76,230,97,209,
367 121,211,237,48,62,162,171,232,76,63,68,34,0,173,72,55,123,151,222,32,216,
368 65,91,202,152,200,141,246,106,230,48,144,213,28,146,243,49,242,141,64,216,
369 87,1,125,205,10,78,227,77,177,121,53,148,50,149,11,197,230,249,41,244,1,
370 232,194,118,158,230,134,22,239,210,235,167,213,28,66,63,251,32,139,236,
371 201,64,221,83,128,123,236,79,243,58,86,190,17,8,243,42,224,86,43,123,245,
372 127,128,115,98,113,245,135,144,7,32,136,91,122,247,244,156,61,137,83,237,
373 195,124,192,215,26,125,125,62,253,243,90,5,64,126,17,8,235,42,160,159,121,
374 67,244,255,223,74,218,50,213,94,32,54,207,111,161,13,64,144,183,244,66,
375 221,85,190,156,81,140,228,54,190,160,125,198,127,159,239,42,0,242,139,64,
376 24,87,1,19,152,41,58,239,126,206,101,19,251,137,206,244,83,232,2,208,58,
377 4,91,122,183,176,15,103,219,59,153,102,207,107,246,211,98,11,89,5,64,238,
378 17,232,205,90,134,10,238,162,43,212,233,230,117,126,192,219,98,243,118,
379 208,142,187,237,72,177,121,65,16,170,0,28,204,38,254,16,240,45,189,255,
380 199,17,252,208,78,231,175,124,167,197,239,45,116,21,0,95,189,139,176,54,
381 251,8,76,34,60,171,128,114,102,136,206,187,199,142,100,51,157,69,103,250,
382 45,52,1,8,195,150,222,249,244,103,128,189,143,13,28,152,211,99,10,89,5,
383 212,203,54,2,71,179,38,20,171,128,51,204,43,124,151,127,138,205,219,78,
384 7,166,113,158,216,188,160,8,124,0,194,176,165,119,39,165,140,177,215,51,
385 218,222,68,13,173,115,122,172,139,85,64,189,108,35,16,244,85,128,193,138,
386 63,247,191,135,145,108,165,147,232,204,32,8,116,0,194,176,165,247,99,186,
387 50,216,78,163,130,193,121,31,99,62,253,89,227,232,13,39,149,181,144,104,
388 225,46,89,65,95,5,12,229,37,78,224,61,177,121,219,232,200,189,118,132,216,
389 188,32,9,108,0,164,239,210,155,143,101,28,195,41,118,58,127,227,168,130,
390 142,227,114,21,0,117,47,12,182,20,129,160,174,2,12,150,137,70,246,185,255,
391 84,123,1,219,232,40,58,51,40,2,25,128,65,44,227,47,230,74,241,187,244,102,
392 171,126,75,239,16,123,23,155,28,189,104,52,143,1,206,86,1,208,114,4,130,
393 186,10,56,155,191,112,12,171,196,230,109,97,31,238,231,92,177,121,65,19,
394 168,0,52,220,210,219,137,74,191,79,39,163,134,91,122,147,180,114,118,92,
395 215,171,0,104,57,2,65,91,5,20,145,102,188,121,84,116,230,255,216,11,249,
396 146,118,162,51,131,36,48,1,40,37,25,186,45,189,174,185,94,5,64,243,17,56,
397 154,53,12,9,208,83,172,17,60,79,31,86,139,205,219,76,103,30,228,108,177,
398 121,65,20,152,0,156,104,222,13,229,150,94,151,188,88,5,64,243,17,152,108,
399 100,239,175,215,148,86,62,92,253,239,160,140,29,49,190,250,67,128,2,208,
400 134,157,126,159,66,70,45,109,233,117,205,139,85,0,52,29,129,160,172,2,126,
401 202,115,28,201,122,177,121,159,176,63,211,237,48,177,121,65,21,152,0,4,
402 81,182,91,122,93,242,106,21,0,77,71,192,239,85,64,43,210,220,108,102,137,
403 206,188,131,50,170,104,35,58,51,136,52,0,77,200,101,75,175,107,94,173,2,
404 32,115,4,252,94,5,148,241,123,142,96,131,216,188,143,233,202,76,59,84,108,
405 94,144,105,0,50,200,103,75,175,75,41,138,152,230,225,155,82,50,69,192,175,
406 85,64,9,73,126,105,30,19,157,121,171,189,148,234,28,119,108,70,149,6,160,
407 129,66,182,244,186,54,159,254,172,167,187,103,199,223,51,2,126,173,2,46,
408 49,255,203,215,249,72,108,222,6,186,49,139,179,196,230,5,157,6,224,43,46,
409 182,244,186,148,160,152,187,236,249,158,206,216,51,2,19,204,35,162,191,
410 130,45,37,193,141,60,46,54,15,234,174,254,181,148,136,206,12,50,13,0,238,
411 182,244,186,230,245,42,0,26,71,224,88,254,37,250,169,59,163,120,134,175,
412 241,137,216,188,245,116,103,118,64,2,31,20,177,14,128,23,91,122,93,146,
413 88,5,64,227,8,76,68,102,21,208,134,90,198,153,10,207,231,52,84,110,71,233,
414 213,127,15,177,13,128,87,91,122,93,147,88,5,192,238,8,72,173,2,70,243,52,
415 135,176,201,243,57,245,86,209,131,57,12,20,155,23,22,177,12,128,215,91,
416 122,93,146,90,5,192,238,8,120,189,10,104,203,78,126,97,158,240,236,248,
417 153,76,178,163,2,29,122,191,196,46,0,139,236,201,156,98,103,120,186,165,
418 215,181,249,244,231,223,116,19,153,85,149,128,222,41,111,87,1,87,241,91,
419 14,98,179,103,199,223,211,251,28,198,124,250,139,205,11,147,216,4,160,126,
420 75,111,25,19,217,65,91,191,79,39,39,146,171,0,168,139,192,205,169,25,158,
421 172,2,218,83,45,126,245,47,183,163,114,254,56,182,184,136,197,159,138,31,
422 91,122,93,155,199,0,145,215,2,234,245,76,172,226,204,244,82,231,199,189,
423 198,60,197,1,108,117,126,220,166,188,203,215,89,200,169,98,243,194,38,242,
424 1,240,115,75,175,75,9,138,185,219,163,247,8,52,229,23,137,153,152,148,187,
425 91,175,119,160,138,159,51,215,217,241,178,49,129,209,164,163,255,215,60,
426 111,145,254,147,241,123,75,175,107,210,171,128,62,172,102,96,98,41,164,
427 146,78,142,119,45,115,69,111,236,250,54,223,228,25,123,138,216,188,48,138,
428 100,0,130,180,165,215,37,63,86,1,55,154,10,76,162,26,10,92,9,236,195,14,
429 198,154,121,142,206,42,59,19,237,21,161,125,202,39,37,114,1,8,218,150,94,
430 215,164,87,1,223,98,21,3,121,13,18,59,11,138,192,181,102,14,157,249,194,
431 225,153,53,239,45,142,98,49,125,197,230,133,85,164,2,16,212,45,189,46,249,
432 182,10,192,230,29,129,125,249,146,107,120,202,131,51,107,218,120,59,90,
433 175,254,89,136,68,0,130,190,165,215,181,121,12,16,219,23,0,13,86,1,144,
434 87,4,110,96,54,251,242,165,7,103,150,217,235,244,225,57,78,18,155,23,102,
435 161,15,64,88,182,244,186,84,183,10,144,219,23,0,13,86,1,144,83,4,246,103,
436 27,87,155,5,30,158,217,222,38,48,90,116,94,152,133,58,0,97,218,210,235,
437 218,92,63,87,1,144,117,4,110,96,54,29,169,242,240,204,26,91,198,49,188,
438 96,79,20,155,23,118,161,13,128,196,93,122,131,204,247,85,0,180,24,129,110,
439 108,225,42,243,91,129,51,219,237,22,174,20,157,23,118,161,11,64,138,34,
440 166,216,139,196,238,210,27,100,126,172,2,78,55,175,55,254,98,51,17,24,103,
441 42,104,71,141,192,153,213,89,106,79,224,69,123,188,216,188,40,8,85,0,234,
442 183,244,78,161,76,95,225,197,159,85,192,77,60,190,247,123,4,50,68,160,59,
443 159,115,5,191,19,60,51,152,100,46,23,157,23,5,161,9,64,84,182,244,186,22,
444 136,85,0,236,21,129,95,154,199,104,43,248,89,15,127,226,251,188,108,143,
445 19,155,23,21,161,8,64,212,182,244,186,148,160,216,179,207,17,104,74,198,
446 85,0,236,138,64,15,62,227,114,158,21,61,167,114,244,234,159,143,64,7,32,
447 170,91,122,93,155,195,233,193,88,5,0,36,118,50,46,53,147,214,212,138,157,
448 207,18,250,178,220,246,17,155,23,37,129,13,64,212,183,244,186,20,164,85,
449 64,15,62,227,156,228,18,106,155,249,84,98,215,38,115,153,220,176,136,9,
450 100,0,226,176,165,215,181,160,172,2,110,48,179,41,37,65,117,2,145,8,60,
451 107,79,225,13,219,219,251,65,17,21,152,0,108,176,221,99,183,165,215,165,
452 32,172,2,14,227,99,70,240,252,174,127,246,58,2,22,195,36,125,238,95,144,
453 192,4,96,21,135,48,132,95,199,106,75,175,107,115,56,157,13,194,171,128,
454 1,44,223,245,207,227,204,108,74,104,124,239,0,47,35,240,59,126,200,10,142,
455 240,230,224,49,17,152,0,88,12,47,219,111,251,125,26,161,230,199,59,5,111,
456 50,117,171,128,195,249,136,179,121,33,227,247,120,17,129,52,69,76,182,250,
457 220,191,80,129,9,128,114,67,250,181,128,99,248,23,3,88,206,141,230,113,
458 138,105,250,167,220,117,4,22,208,143,119,232,233,238,128,49,165,1,136,24,
459 63,94,11,184,195,60,192,112,90,190,129,104,117,2,118,58,184,187,88,138,
460 34,38,89,125,238,239,130,6,32,130,164,87,1,135,241,113,214,31,45,94,147,
461 44,60,2,115,57,61,182,111,2,115,77,3,16,65,9,138,153,198,72,191,79,163,
462 73,133,68,32,69,17,183,219,75,220,158,80,140,105,0,34,234,73,59,80,116,
463 21,144,171,124,35,48,155,193,172,228,80,247,39,20,83,26,128,136,10,250,
464 42,0,114,143,64,130,98,110,179,151,122,119,66,49,164,1,136,176,160,175,
465 2,32,183,8,60,198,153,172,229,96,111,79,40,102,52,0,17,22,134,85,0,100,
466 23,129,4,197,76,177,101,34,231,19,39,26,128,136,123,210,14,20,221,29,152,
467 175,150,34,240,8,67,89,199,65,114,39,20,19,26,128,136,75,80,204,52,123,
468 158,223,167,145,149,166,34,80,67,41,119,216,139,229,79,40,6,52,0,49,240,
469 4,131,66,177,10,128,204,17,152,110,135,241,33,7,248,115,66,17,167,1,136,
470 129,48,173,2,160,113,4,106,40,101,42,23,250,123,66,17,166,1,136,137,48,
471 173,2,96,119,4,126,99,207,225,35,186,250,125,58,145,165,1,136,137,176,173,
472 2,0,182,38,219,112,103,114,132,223,167,17,105,26,128,24,9,219,42,96,58,
473 195,216,156,108,15,73,185,251,11,198,141,6,32,70,194,180,10,168,164,45,
474 191,177,63,169,251,135,100,173,70,192,35,26,128,152,9,203,42,224,65,206,
475 230,115,246,221,253,5,141,128,39,52,0,49,147,160,152,123,9,246,243,234,
476 47,104,207,131,245,87,255,134,52,2,206,105,0,98,104,182,29,28,232,85,192,
477 131,252,132,255,208,49,243,191,212,8,56,165,1,136,161,32,175,2,182,211,
478 129,135,236,240,230,191,73,35,224,140,6,32,166,130,186,10,184,207,142,96,
479 59,29,90,254,70,141,128,19,26,128,152,10,226,42,96,43,157,152,206,176,236,
480 31,160,17,40,152,6,32,198,130,182,10,184,215,158,199,14,218,230,246,32,
481 141,64,65,52,0,49,22,164,85,192,38,58,243,8,67,243,123,176,70,32,111,26,
482 128,152,123,194,14,98,99,0,86,1,247,218,17,84,209,38,255,3,104,4,242,162,
483 1,136,185,90,74,184,215,250,187,10,248,148,46,204,98,72,225,7,210,8,228,
484 76,3,160,152,141,191,171,128,123,24,73,53,173,221,28,76,35,144,19,13,128,
485 242,117,21,240,41,251,83,97,7,187,61,168,70,32,107,26,0,5,248,183,10,152,
486 202,249,212,184,186,250,55,164,17,200,138,6,64,1,117,171,128,105,194,191,
487 17,216,72,55,158,176,131,188,27,160,17,104,145,6,64,237,34,253,27,129,169,
488 246,124,106,41,241,118,136,70,160,89,26,0,181,139,228,107,1,27,232,198,
489 124,250,139,204,34,89,11,137,157,50,179,66,70,3,160,26,145,122,45,96,138,
490 45,243,254,234,223,80,42,161,17,200,64,3,160,26,169,165,132,251,56,215,
491 211,25,107,56,152,5,244,243,116,70,70,26,129,189,104,0,212,94,42,236,96,
492 79,87,1,119,218,50,146,180,242,236,248,205,210,8,52,82,236,247,9,168,224,
493 169,165,132,65,118,26,93,216,214,236,247,181,50,150,142,84,230,124,252,
494 87,56,46,223,83,115,35,149,168,251,223,18,15,126,253,24,50,26,0,149,209,
495 70,14,100,35,7,54,255,77,86,230,92,60,161,17,0,244,41,128,138,51,125,58,
496 160,1,80,49,23,243,8,104,0,148,138,113,4,52,0,74,65,108,35,160,1,80,170,
497 94,12,35,160,1,80,170,161,152,69,64,3,160,212,158,98,20,1,13,128,82,153,
498 196,36,2,26,0,165,154,18,131,8,104,0,148,106,78,42,1,137,26,191,207,194,
499 51,26,0,165,90,146,74,70,54,2,26,0,165,178,17,209,8,104,0,148,202,86,4,
500 35,160,1,80,42,23,17,139,128,6,64,169,92,69,40,2,26,0,165,242,17,145,8,
501 104,0,148,202,87,4,34,160,1,80,170,16,33,143,128,6,64,169,66,133,56,2,26,
502 0,165,92,8,105,4,52,0,74,185,18,194,8,104,0,148,114,41,100,17,208,0,40,
503 229,90,136,34,160,1,80,202,11,169,36,212,86,251,125,22,45,210,0,40,229,
504 149,116,42,240,17,208,0,40,229,165,128,71,64,3,160,148,215,2,28,1,13,128,
505 82,18,2,26,1,13,128,82,82,2,24,129,188,62,29,184,93,137,251,110,116,40,
506 109,69,175,174,109,157,31,87,169,160,49,69,80,212,218,237,223,245,205,85,
507 73,62,221,145,200,249,113,121,5,224,184,238,237,243,121,88,179,190,119,
508 72,123,94,187,228,72,231,199,85,42,136,138,139,139,105,223,222,221,207,
509 209,61,203,63,227,218,231,55,230,252,56,125,10,160,148,15,146,201,36,149,
510 149,149,126,159,134,6,64,41,191,4,33,2,26,0,165,124,228,119,4,52,0,74,249,
511 172,62,2,214,90,241,217,26,0,165,2,32,153,76,82,85,85,37,30,1,13,128,82,
512 1,225,71,4,52,0,74,5,136,116,4,52,0,74,5,140,100,4,52,0,74,5,144,84,4,52,
513 0,74,5,148,68,4,52,0,74,5,152,215,17,208,0,40,21,112,94,70,64,3,160,84,
514 8,120,21,1,13,128,82,33,225,69,4,52,0,74,133,136,235,8,104,0,148,10,25,
515 151,239,29,208,0,40,21,66,169,84,202,73,4,52,0,74,133,148,139,8,104,0,148,
516 10,177,66,35,144,87,0,94,219,248,101,94,195,148,82,238,165,82,41,106,107,
517 170,32,143,8,24,110,90,154,170,187,79,105,246,218,151,22,121,114,103,96,
518 165,84,126,170,18,105,42,147,64,73,91,48,38,235,199,229,117,87,224,202,
519 218,52,149,181,233,124,30,170,148,242,82,162,58,167,8,232,101,92,169,40,
520 73,167,235,34,144,229,211,1,13,128,82,81,147,67,4,52,0,74,69,81,150,17,
521 208,0,40,21,85,89,68,64,3,160,84,148,181,16,1,13,128,82,81,215,76,4,52,
522 0,74,197,65,19,17,208,0,40,21,23,25,34,160,1,80,42,78,246,136,128,6,64,
523 169,184,105,16,1,13,128,82,113,244,85,4,254,31,121,241,55,153,214,40,101,
524 56,0,0,0,0,73,69,78,68,174,66,96,130};
525 
526 static size_t xml_res_size_3 = 987;
527 static unsigned char xml_res_file_3[] = {
528 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
529 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
530 72,89,115,0,0,5,98,0,0,5,98,1,172,97,92,156,0,0,0,25,116,69,88,116,83,111,
531 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
532 111,114,103,155,238,60,26,0,0,3,88,73,68,65,84,88,133,197,151,123,104,141,
533 97,24,192,127,239,217,185,76,10,209,140,105,229,210,92,74,174,115,89,91,
534 20,139,134,48,127,80,194,220,134,63,8,145,63,196,54,119,43,33,252,97,182,
535 154,40,162,200,106,214,148,132,153,68,211,102,180,37,119,25,67,238,235,
536 236,59,231,59,123,253,113,182,119,59,190,239,59,151,156,195,243,215,251,
537 60,207,251,188,207,239,125,222,219,247,9,242,238,74,226,28,252,47,177,227,
538 213,72,238,233,100,250,144,62,0,220,122,253,147,151,223,180,127,6,96,3,
539 24,213,219,70,81,86,18,165,243,6,50,105,64,247,152,36,74,166,153,25,226,
540 158,57,0,128,219,237,198,227,241,196,36,57,192,78,81,194,53,54,80,69,46,
541 233,212,25,1,58,32,218,116,111,212,147,15,162,137,229,148,3,144,33,106,
542 25,79,131,57,0,128,207,211,10,122,116,43,145,39,138,113,160,3,240,142,4,
543 138,88,96,13,0,248,1,162,4,145,194,91,150,82,161,244,253,114,37,26,206,
544 16,0,81,132,200,19,197,196,209,6,192,27,250,81,194,188,0,191,53,64,20,32,
545 134,243,138,197,92,83,250,94,185,10,15,129,119,78,112,128,63,32,250,243,
546 57,34,128,2,113,10,91,251,236,95,146,196,105,230,24,250,132,6,0,156,122,
547 11,39,244,125,52,137,44,62,136,153,28,17,135,67,198,140,228,57,11,185,174,
548 244,61,114,53,94,236,145,3,36,241,137,10,177,145,37,190,43,104,58,36,242,
549 133,77,156,39,85,52,4,141,219,69,17,2,9,192,51,146,57,195,108,211,126,65,
550 1,50,68,45,183,196,90,82,219,207,109,171,14,154,255,52,145,47,139,45,227,
551 198,240,148,108,113,179,19,70,230,226,179,72,101,9,176,94,92,160,140,45,
552 36,240,85,217,170,25,173,32,230,136,170,128,11,165,171,116,157,125,35,3,
553 57,199,76,75,88,3,128,11,141,82,177,139,189,156,84,199,199,131,131,77,114,
554 11,179,229,81,106,25,166,32,242,133,177,10,169,162,129,185,226,118,39,140,
555 204,165,45,72,161,13,158,29,162,148,108,110,42,189,137,4,178,56,166,118,
556 240,65,153,3,248,151,99,134,94,197,56,26,3,226,119,115,82,181,159,48,152,
557 139,100,90,38,55,5,72,226,147,106,87,49,150,41,242,20,53,114,184,178,85,
558 146,70,29,67,21,196,118,189,72,249,210,168,39,139,187,74,47,96,77,208,217,
559 155,2,116,200,113,22,49,95,30,226,51,189,12,190,66,185,76,181,51,125,119,
560 24,163,63,6,2,103,95,71,10,151,228,180,160,201,77,1,126,208,157,28,10,216,
561 41,215,89,238,220,10,210,121,68,138,210,183,249,74,72,215,31,144,41,238,
562 43,91,190,92,139,68,68,14,176,77,110,160,76,78,13,25,88,72,103,21,102,81,
563 205,81,223,1,90,219,143,104,13,35,40,35,244,24,166,0,94,194,251,62,172,
564 144,233,60,102,136,210,83,120,139,166,251,247,69,190,92,19,214,24,166,0,
565 225,138,68,80,72,142,193,94,173,143,224,170,62,49,246,0,0,229,50,131,39,
566 93,170,0,176,159,21,17,189,162,198,215,33,2,145,8,246,176,138,173,156,5,
567 224,5,3,184,33,39,248,157,29,0,118,167,69,116,20,0,0,42,101,26,149,164,
568 153,59,195,128,248,171,37,8,75,66,44,71,236,1,66,64,216,1,122,184,226,148,
569 97,100,223,110,124,215,124,49,225,176,57,156,216,28,46,0,30,190,111,225,
570 99,139,238,7,24,218,59,94,117,218,60,57,145,205,147,19,99,2,0,224,114,185,
571 136,143,143,39,251,226,51,174,52,126,251,251,77,24,169,104,90,224,127,167,
572 29,224,114,227,87,117,107,127,248,229,229,135,167,45,230,32,53,239,90,1,
573 225,7,168,111,118,83,223,236,142,121,82,131,216,157,252,6,173,114,47,95,
574 172,143,154,9,0,0,0,0,73,69,78,68,174,66,96,130};
575 
576 static size_t xml_res_size_4 = 1881;
577 static unsigned char xml_res_file_4[] = {
578 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,64,0,0,0,64,8,6,0,0,
579 0,170,105,113,222,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
580 72,89,115,0,0,10,233,0,0,10,233,1,253,117,206,211,0,0,0,25,116,69,88,116,
581 83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,
582 101,46,111,114,103,155,238,60,26,0,0,6,214,73,68,65,84,120,156,229,155,
583 121,108,84,69,28,199,63,211,61,186,96,57,228,80,17,84,130,136,8,65,140,
584 26,60,162,81,84,98,168,128,130,130,45,32,10,4,80,140,114,41,90,64,40,162,
585 65,81,20,8,162,128,66,41,8,114,40,209,152,200,81,4,131,9,40,136,26,84,136,
586 86,228,16,139,128,96,45,236,118,119,223,238,248,199,186,237,110,119,222,
587 219,247,246,173,108,91,190,255,237,252,126,111,102,222,103,102,126,115,
588 188,89,193,212,29,18,135,147,243,85,89,4,43,33,164,101,186,30,25,83,22,
589 192,249,12,161,186,239,7,43,153,114,123,59,114,59,54,139,115,216,118,176,
590 130,73,159,31,61,215,245,58,103,138,27,252,151,93,16,226,198,139,179,113,
591 185,92,85,105,199,206,4,207,121,165,236,202,73,136,16,89,72,68,82,223,172,
592 154,9,94,175,151,96,176,238,189,116,172,158,20,107,217,43,242,232,79,9,
593 2,105,232,155,0,0,234,54,4,15,1,158,165,152,206,28,96,141,40,224,123,49,
594 208,16,132,18,0,212,93,8,163,89,75,107,78,84,253,238,66,41,107,68,1,59,
595 196,48,186,242,75,130,191,46,0,136,64,8,105,117,7,194,5,248,152,40,138,
596 149,182,235,217,79,5,13,19,210,13,1,0,248,125,62,8,213,13,8,79,177,154,
597 139,57,165,180,21,209,139,3,180,78,72,79,10,0,128,160,191,214,67,200,193,
598 203,120,177,82,105,11,226,100,166,28,170,180,153,3,0,181,30,194,88,86,209,
599 146,211,74,219,98,30,224,55,46,85,218,204,3,128,90,11,161,9,103,24,167,
600 211,250,126,220,186,173,15,86,1,64,173,132,48,142,149,52,227,31,165,109,
601 33,253,248,157,139,116,159,181,14,0,106,21,132,166,84,48,70,124,160,180,
602 85,226,102,150,28,98,248,124,106,0,160,214,64,120,134,21,52,165,66,105,
603 123,75,14,224,40,45,13,159,79,29,0,100,28,66,115,202,121,90,167,245,207,
604 210,128,215,120,36,105,30,246,0,64,70,33,76,20,197,52,194,171,180,205,151,
605 3,248,147,102,74,91,172,236,3,128,140,64,104,193,223,140,102,157,210,118,
606 134,134,188,193,64,83,249,164,7,0,36,64,184,75,236,162,3,135,211,150,125,
607 77,21,136,34,114,116,90,127,174,204,227,184,137,214,135,26,231,1,182,21,
608 244,227,33,192,91,206,55,24,198,39,32,224,36,77,217,65,23,118,202,46,44,
609 163,87,210,160,100,70,173,56,201,19,58,173,95,78,14,179,25,100,58,175,180,
610 2,184,148,19,20,107,211,184,93,236,3,71,36,173,5,127,211,155,237,244,22,
611 219,233,196,1,6,203,25,182,203,41,160,136,6,248,149,182,57,50,159,211,52,
612 54,157,87,218,134,64,119,118,179,93,140,224,70,246,225,11,66,32,148,232,
613 147,199,38,58,114,208,86,57,109,56,206,8,177,94,105,59,77,99,222,52,57,
614 246,163,178,13,64,32,25,199,74,214,137,231,104,78,121,85,186,10,130,131,
615 48,47,136,247,108,149,55,137,165,120,8,40,109,179,25,68,57,57,150,242,179,
616 5,160,17,94,150,139,169,76,19,139,113,16,78,176,171,32,60,108,163,23,92,
617 65,25,195,197,199,74,219,73,154,50,79,230,89,206,51,101,0,87,113,132,205,
618 98,52,189,248,210,208,175,38,4,7,97,38,139,37,41,149,57,69,44,193,141,122,
619 186,125,157,193,202,3,143,100,74,9,192,253,226,11,182,138,81,116,228,144,
620 41,255,154,16,242,217,200,213,38,159,141,170,29,71,121,148,79,149,182,227,
621 52,99,190,28,96,41,191,168,44,1,112,16,166,144,69,20,49,157,28,124,134,
622 190,171,233,193,100,249,68,213,111,95,16,252,90,117,62,83,44,198,130,23,
623 196,187,184,80,127,188,121,85,14,225,44,13,44,229,23,149,105,0,205,41,231,
624 67,38,50,86,172,50,60,106,214,112,80,200,72,70,201,73,44,162,31,135,185,
625 164,202,86,169,85,67,200,103,163,233,88,208,158,35,12,230,51,165,237,24,
626 205,121,135,7,205,190,70,130,76,1,232,202,207,108,21,143,115,167,248,198,
627 208,175,140,22,228,202,121,204,145,249,64,228,40,106,46,241,129,41,10,193,
628 74,44,40,20,139,112,162,152,87,129,153,242,49,188,120,76,229,163,82,82,
629 0,109,56,206,70,241,52,151,115,204,208,111,7,215,114,167,92,200,215,116,
630 138,75,47,150,247,197,245,2,168,134,96,166,23,116,224,48,121,108,82,218,
631 202,104,193,98,250,38,123,5,67,37,5,112,29,63,227,209,89,117,69,85,68,47,
632 250,200,217,202,221,151,170,23,64,4,130,166,37,239,5,47,138,119,148,83,
633 44,192,12,134,227,35,219,240,249,100,178,181,14,56,75,3,134,201,169,140,
634 149,19,8,26,172,170,85,189,0,34,16,250,105,250,51,66,103,14,208,159,45,
635 74,219,97,46,97,137,236,147,90,197,99,148,50,128,82,218,112,183,92,192,
636 71,116,79,234,27,196,89,21,23,18,108,90,152,231,67,139,149,182,233,98,33,
637 89,58,173,255,146,28,142,31,183,249,10,235,40,37,0,27,228,205,220,45,223,
638 102,63,109,77,63,179,156,92,101,47,0,232,163,109,166,131,86,26,151,214,
639 133,82,250,178,77,233,127,136,86,44,227,62,211,101,27,201,18,0,137,96,142,
640 204,103,32,47,91,94,115,235,197,2,136,204,8,227,67,75,65,171,94,227,191,
641 196,219,186,173,95,40,71,18,192,165,180,89,149,105,0,167,104,204,67,242,
642 21,10,25,73,56,197,145,179,92,230,114,68,167,23,244,167,132,171,180,95,
643 65,11,112,3,251,232,45,182,43,253,74,185,140,21,244,76,169,124,149,146,
644 190,73,5,13,217,75,123,186,203,133,108,161,155,173,194,2,184,152,171,179,
645 97,113,16,102,130,88,1,90,128,169,161,5,186,139,173,233,114,4,90,244,176,
646 33,13,74,10,224,43,58,211,67,206,231,144,78,203,89,213,114,122,114,84,231,
647 67,69,127,74,200,99,35,119,104,59,171,86,140,177,218,79,91,86,113,111,90,
648 234,17,85,82,0,149,100,83,105,115,174,141,149,31,183,238,129,165,131,48,
649 11,196,172,72,185,49,203,230,168,166,203,17,132,210,120,140,9,233,60,20,
650 181,32,163,88,16,27,248,98,33,252,72,59,214,112,79,218,235,146,17,0,70,
651 177,160,166,162,16,166,201,81,41,7,95,35,101,4,0,64,49,250,189,160,166,
652 246,104,237,88,175,221,250,191,212,35,99,0,172,244,130,25,12,39,172,105,
653 113,235,132,116,41,99,0,192,120,70,136,234,91,121,53,27,228,45,145,31,90,
654 32,237,16,50,10,192,143,155,57,168,247,8,81,205,20,67,227,47,60,166,25,
655 66,70,1,0,20,203,92,221,94,176,75,118,98,147,188,41,209,144,70,8,25,191,
656 39,239,199,205,24,38,112,155,252,46,46,189,17,94,214,136,30,232,158,190,
657 69,1,56,237,237,8,51,14,0,160,68,118,163,68,181,204,54,190,229,154,22,8,
658 25,31,2,182,101,115,56,212,125,0,96,11,66,253,0,0,41,67,168,63,0,32,37,
659 8,245,11,0,88,134,80,255,0,128,37,8,113,211,224,21,77,18,247,253,215,180,
660 244,48,163,187,250,158,109,109,151,211,157,141,211,29,255,78,123,202,188,
661 172,250,161,250,70,121,28,128,86,57,137,203,130,43,47,244,240,84,183,212,
662 63,61,101,90,217,217,217,120,60,213,245,127,127,239,95,113,0,234,231,16,
663 136,145,223,239,199,231,211,255,146,93,239,1,0,4,2,1,93,8,181,98,41,124,
664 46,20,8,168,131,98,28,128,221,101,94,92,89,241,255,181,243,6,195,156,170,
665 84,127,154,174,123,58,203,79,127,84,198,165,8,10,182,38,219,114,212,63,
666 57,92,224,138,204,14,231,69,12,72,80,40,24,185,218,203,121,20,3,18,244,
667 223,189,230,127,1,145,119,128,141,62,61,149,199,0,0,0,0,73,69,78,68,174,
668 66,96,130};
669 
670 static size_t xml_res_size_5 = 626;
671 static unsigned char xml_res_file_5[] = {
672 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
673 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
674 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
675 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
676 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
677 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
678 45,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,
679 120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,104,97,114,116,
680 49,50,56,34,62,68,97,116,97,82,101,112,111,114,116,66,105,116,109,97,112,
681 115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,99,104,
682 97,114,116,49,50,56,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,
683 32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,
684 109,97,112,34,32,110,97,109,101,61,34,99,104,97,114,116,49,54,34,62,68,
685 97,116,97,82,101,112,111,114,116,66,105,116,109,97,112,115,46,99,112,112,
686 36,100,97,116,97,95,105,109,97,103,101,115,95,99,104,97,114,116,49,54,46,
687 112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,
688 116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,
689 97,109,101,61,34,99,104,97,114,116,50,53,54,34,62,68,97,116,97,82,101,112,
690 111,114,116,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,
691 105,109,97,103,101,115,95,99,104,97,114,116,50,53,54,46,112,110,103,60,
692 47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,
693 97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,
694 34,99,104,97,114,116,51,50,34,62,68,97,116,97,82,101,112,111,114,116,66,
695 105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,
696 101,115,95,99,104,97,114,116,51,50,46,112,110,103,60,47,111,98,106,101,
697 99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,
698 119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,99,104,97,114,
699 116,54,52,34,62,68,97,116,97,82,101,112,111,114,116,66,105,116,109,97,112,
700 115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,99,104,
701 97,114,116,54,52,46,112,110,103,60,47,111,98,106,101,99,116,62,10,60,47,
702 114,101,115,111,117,114,99,101,62,10};
703 
704 void wxC6A63InitBitmapResources()
705 {
706 
707  // Check for memory FS. If not present, load the handler:
708  {
709  wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
710  wxFileSystem fsys;
711  wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
712  wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
713  if (f) delete f;
714  else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
715  }
716 
717  XRC_ADD_FILE(wxT("XRC_resource/DataReportBitmaps.cpp$data_images_chart128.png"), xml_res_file_0, xml_res_size_0, wxT("image/png"));
718  XRC_ADD_FILE(wxT("XRC_resource/DataReportBitmaps.cpp$data_images_chart16.png"), xml_res_file_1, xml_res_size_1, wxT("image/png"));
719  XRC_ADD_FILE(wxT("XRC_resource/DataReportBitmaps.cpp$data_images_chart256.png"), xml_res_file_2, xml_res_size_2, wxT("image/png"));
720  XRC_ADD_FILE(wxT("XRC_resource/DataReportBitmaps.cpp$data_images_chart32.png"), xml_res_file_3, xml_res_size_3, wxT("image/png"));
721  XRC_ADD_FILE(wxT("XRC_resource/DataReportBitmaps.cpp$data_images_chart64.png"), xml_res_file_4, xml_res_size_4, wxT("image/png"));
722  XRC_ADD_FILE(wxT("XRC_resource/DataReportBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_DataReportBitmaps.xrc"), xml_res_file_5, xml_res_size_5, wxT("text/xml"));
723  wxXmlResource::Get()->Load(wxT("memory:XRC_resource/DataReportBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_DataReportBitmaps.xrc"));
724 }
-
- - - - diff --git a/docs/doxygen/html/_degrees_and_radians_8h_source.html b/docs/doxygen/html/_degrees_and_radians_8h_source.html deleted file mode 100644 index e12c65b..0000000 --- a/docs/doxygen/html/_degrees_and_radians_8h_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/DegreesAndRadians.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
DegreesAndRadians.h
-
-
-
1 #ifndef DEGREESANDRADIANS_H
2 #define DEGREESANDRADIANS_H
3 
4 #include<wx/math.h>
5 
6 // Convert between degrees and radians.
7 inline double wxDegToRad(double deg) { return (deg * M_PI) / 180.0; }
8 inline double wxRadToDeg(double rad) { return (rad * 180.0) / M_PI; }
9 
10 #endif // DEGREESANDRADIANS_H
-
- - - - diff --git a/docs/doxygen/html/_divider_8cpp_source.html b/docs/doxygen/html/_divider_8cpp_source.html deleted file mode 100644 index 167d5e1..0000000 --- a/docs/doxygen/html/_divider_8cpp_source.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - -Project/Divider.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Divider.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Divider.h"
19 #include "ConnectionLine.h"
20 
21 Divider::Divider(int id) : MathOperation(id) {}
22 Divider::~Divider() {}
23 void Divider::DrawSymbol() const
24 {
25  // Plot divider.
26  glLineWidth(2.0);
27  std::vector<wxPoint2DDouble> mSymbol;
28  mSymbol.push_back(m_position + wxPoint2DDouble(-5, 0));
29  mSymbol.push_back(m_position + wxPoint2DDouble(5, 0));
30  glColor4d(0.0, 0.3, 1.0, 1.0);
31  DrawLine(mSymbol, GL_LINES);
32  DrawCircle(m_position + wxPoint2DDouble(0, -3), 2, 10, GL_POLYGON);
33  DrawCircle(m_position + wxPoint2DDouble(0, 3), 2, 10, GL_POLYGON);
34 }
35 
36 bool Divider::Solve(double input, double timeStep)
37 {
38  std::vector<double> inputVector;
39  for(auto itN = m_nodeList.begin(), itNEnd = m_nodeList.end(); itN != itNEnd; ++itN) {
40  Node* node = *itN;
41  if(node->GetNodeType() != Node::NODE_OUT) {
42  if(!node->IsConnected()) {
43  inputVector.push_back(0.0);
44  } else {
45  for(auto itC = m_childList.begin(), itCEnd = m_childList.end(); itC != itCEnd; ++itC) {
46  ConnectionLine* cLine = static_cast<ConnectionLine*>(*itC);
47  auto nodeList = cLine->GetNodeList();
48  for(auto itCN = nodeList.begin(), itCNEnd = nodeList.end(); itCN != itCNEnd; ++itCN) {
49  Node* childNode = *itCN;
50  if(childNode == node) {
51  inputVector.push_back(cLine->GetValue());
52  break;
53  }
54  }
55  }
56  }
57  }
58  }
59  if(inputVector.size() != 2) return false;
60 
61  // If the denominator is zero, set the output a big number (1e15).
62  if(std::abs(inputVector[1]) < 1e-15) {
63  m_output = 1e15;
64  } else {
65  m_output = inputVector[0] / inputVector[1];
66  }
67 
68  return true;
69 }
70 
72 {
73  Divider* copy = new Divider(m_elementID);
74  *copy = *this;
75  return copy;
76 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
Node of a control element. This class manages the user interaction with the connection and control el...
- -
Control element that divides two inputs.
Definition: Divider.h:32
-
Abstract class that define the general behavior of math operation control block.
Definition: MathOperation.h:32
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Divider.cpp:71
-
Connection between two control elements or other connection line and an element.
-
-
- - - - diff --git a/docs/doxygen/html/_divider_8h.html b/docs/doxygen/html/_divider_8h.html index e6d9190..ff3b679 100644 --- a/docs/doxygen/html/_divider_8h.html +++ b/docs/doxygen/html/_divider_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_divider_8h.html','');});
Divider.h File Reference
-
#include "MathOperation.h"
-
-

Go to the source code of this file.

- +
#include "MathOperation.h"
+
diff --git a/docs/doxygen/html/_divider_8h_source.html b/docs/doxygen/html/_divider_8h_source.html deleted file mode 100644 index 9f3d3da..0000000 --- a/docs/doxygen/html/_divider_8h_source.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - -Project/Divider.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Divider
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Divider.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef DIVIDER_H
19 #define DIVIDER_H
20 
21 #include "MathOperation.h"
22 
23 class ConnectionLine;
24 
32 class Divider : public MathOperation
33 {
34  public:
35  Divider(int id);
36  ~Divider();
37 
38  virtual void DrawSymbol() const;
39  virtual bool Solve(double input, double timeStep);
40  virtual Element* GetCopy();
41 };
42 
43 #endif // DIVIDER_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
Control element that divides two inputs.
Definition: Divider.h:32
-
Abstract class that define the general behavior of math operation control block.
Definition: MathOperation.h:32
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Divider.cpp:71
-
Connection between two control elements or other connection line and an element.
-
-
- - - - diff --git a/docs/doxygen/html/_electric_calculation_8cpp_source.html b/docs/doxygen/html/_electric_calculation_8cpp_source.html deleted file mode 100644 index 4092e29..0000000 --- a/docs/doxygen/html/_electric_calculation_8cpp_source.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - -Project/ElectricCalculation.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElectricCalculation.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ElectricCalculation.h"
19 #ifdef USING_WX_3_0_X
20 #include "DegreesAndRadians.h"
21 #endif
22 
25 void ElectricCalculation::GetElementsFromList(std::vector<Element*> elementList)
26 {
27  m_powerElementList.clear();
28  m_busList.clear();
29  m_capacitorList.clear();
30  m_indMotorList.clear();
31  m_inductorList.clear();
32  m_lineList.clear();
33  m_loadList.clear();
34  m_syncGeneratorList.clear();
35  m_syncMotorList.clear();
36  m_transformerList.clear();
37  // TODO: Bad design?
38  for(auto it = elementList.begin(); it != elementList.end(); it++) {
39  Element* element = *it;
40  m_powerElementList.push_back(static_cast<PowerElement*>(element));
41 
42  if(Bus* bus = dynamic_cast<Bus*>(element))
43  m_busList.push_back(bus);
44  else if(Capacitor* capacitor = dynamic_cast<Capacitor*>(element))
45  m_capacitorList.push_back(capacitor);
46  else if(IndMotor* indMotor = dynamic_cast<IndMotor*>(element))
47  m_indMotorList.push_back(indMotor);
48  else if(Inductor* inductor = dynamic_cast<Inductor*>(element))
49  m_inductorList.push_back(inductor);
50  else if(Line* line = dynamic_cast<Line*>(element))
51  m_lineList.push_back(line);
52  else if(Load* load = dynamic_cast<Load*>(element))
53  m_loadList.push_back(load);
54  else if(SyncGenerator* syncGenerator = dynamic_cast<SyncGenerator*>(element))
55  m_syncGeneratorList.push_back(syncGenerator);
56  else if(SyncMotor* syncMotor = dynamic_cast<SyncMotor*>(element))
57  m_syncMotorList.push_back(syncMotor);
58  else if(Transformer* transformer = dynamic_cast<Transformer*>(element))
59  m_transformerList.push_back(transformer);
60  }
61 
62  // Set buses numbers
63  int busNumber = 0;
64  for(auto itb = m_busList.begin(); itb != m_busList.end(); itb++) {
65  Bus* bus = *itb;
66  BusElectricalData data = bus->GetElectricalData();
67  data.number = busNumber;
68  bus->SetElectricalData(data);
69  busNumber++;
70  }
71 }
72 
73 bool ElectricCalculation::GetYBus(std::vector<std::vector<std::complex<double> > >& yBus,
74  double systemPowerBase,
75  YBusSequence sequence,
76  bool includeSyncMachines,
77  bool allLoadsAsImpedances)
78 {
79  if(m_busList.size() == 0) return false;
80 
81  // Clear and fill with zeros the Ybus
82  yBus.clear();
83  for(int i = 0; i < (int)m_busList.size(); i++) {
84  std::vector<std::complex<double> > line;
85  for(int j = 0; j < (int)m_busList.size(); j++) {
86  line.push_back(std::complex<double>(0.0, 0.0));
87  }
88  yBus.push_back(line);
89  }
90 
91  // Set buses numbers
92  int busNumber = 0;
93  for(auto itb = m_busList.begin(); itb != m_busList.end(); itb++) {
94  Bus* bus = *itb;
95  BusElectricalData data = bus->GetElectricalData();
96  data.number = busNumber;
97  bus->SetElectricalData(data);
98  busNumber++;
99  }
100 
101  // Load
102  for(auto it = m_loadList.begin(), itEnd = m_loadList.end(); it != itEnd; ++it) {
103  Load* load = *it;
104  if(load->IsOnline()) {
105  int n = static_cast<Bus*>(load->GetParentList()[0])->GetElectricalData().number;
106  LoadElectricalData data = load->GetPUElectricalData(systemPowerBase);
107  if(data.loadType == CONST_IMPEDANCE || allLoadsAsImpedances) {
108  std::complex<double> yLoad = std::complex<double>(data.activePower, -data.reactivePower);
109  if(allLoadsAsImpedances) {
110  std::complex<double> v = static_cast<Bus*>(load->GetParentList()[0])->GetElectricalData().voltage;
111  yLoad /= (std::abs(v) * std::abs(v));
112  }
113  yBus[n][n] += yLoad;
114  }
115  }
116  }
117 
118  // Capacitor
119  for(auto it = m_capacitorList.begin(), itEnd = m_capacitorList.end(); it != itEnd; ++it) {
120  Capacitor* capacitor = *it;
121  if(capacitor->IsOnline()) {
122  int n = static_cast<Bus*>(capacitor->GetParentList()[0])->GetElectricalData().number;
123  CapacitorElectricalData data = capacitor->GetPUElectricalData(systemPowerBase);
124  yBus[n][n] += std::complex<double>(0.0, data.reactivePower);
125  }
126  }
127 
128  // Inductor
129  for(auto it = m_inductorList.begin(), itEnd = m_inductorList.end(); it != itEnd; ++it) {
130  Inductor* inductor = *it;
131  if(inductor->IsOnline()) {
132  int n = static_cast<Bus*>(inductor->GetParentList()[0])->GetElectricalData().number;
133  InductorElectricalData data = inductor->GetPUElectricalData(systemPowerBase);
134  yBus[n][n] += std::complex<double>(0.0, -data.reactivePower);
135  }
136  }
137 
138  // Power line
139  for(auto it = m_lineList.begin(), itEnd = m_lineList.end(); it != itEnd; ++it) {
140  Line* line = *it;
141  if(line->IsOnline()) {
142  LineElectricalData data = line->GetPUElectricalData(systemPowerBase);
143 
144  int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number;
145  int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number;
146 
147  switch(sequence) {
148  case POSITIVE_SEQ:
149  case NEGATIVE_SEQ: {
150  yBus[n1][n2] -= 1.0 / std::complex<double>(data.resistance, data.indReactance);
151  yBus[n2][n1] -= 1.0 / std::complex<double>(data.resistance, data.indReactance);
152 
153  yBus[n1][n1] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
154  yBus[n2][n2] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
155 
156  yBus[n1][n1] += std::complex<double>(0.0, data.capSusceptance / 2.0);
157  yBus[n2][n2] += std::complex<double>(0.0, data.capSusceptance / 2.0);
158  } break;
159  case ZERO_SEQ: {
160  yBus[n1][n2] -= 1.0 / std::complex<double>(data.zeroResistance, data.zeroIndReactance);
161  yBus[n2][n1] -= 1.0 / std::complex<double>(data.zeroResistance, data.zeroIndReactance);
162 
163  yBus[n1][n1] += 1.0 / std::complex<double>(data.zeroResistance, data.zeroIndReactance);
164  yBus[n2][n2] += 1.0 / std::complex<double>(data.zeroResistance, data.zeroIndReactance);
165 
166  yBus[n1][n1] += std::complex<double>(0.0, data.zeroCapSusceptance / 2.0);
167  yBus[n2][n2] += std::complex<double>(0.0, data.zeroCapSusceptance / 2.0);
168  }
169  }
170  }
171  }
172 
173  // Transformer
174  for(auto it = m_transformerList.begin(), itEnd = m_transformerList.end(); it != itEnd; ++it) {
175  Transformer* transformer = *it;
176 
177  if(transformer->IsOnline()) {
178  TransformerElectricalData data = transformer->GetPUElectricalData(systemPowerBase);
179 
180  int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number;
181  int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number;
182 
183  // If the transformer have nominal turns ratio (1.0) and no phase shifting, it will be modelled as series
184  // impedance.
185  if(data.turnsRatio == 1.0 && data.phaseShift == 0.0 && sequence != ZERO_SEQ) {
186  yBus[n1][n2] += -1.0 / std::complex<double>(data.resistance, data.indReactance);
187  yBus[n2][n1] += -1.0 / std::complex<double>(data.resistance, data.indReactance);
188 
189  yBus[n1][n1] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
190  yBus[n2][n2] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
191  }
192  // If the transformer have no-nominal turn ratio and/or phase shifting, it will be modelled in a different
193  // way (see references).
194  //[Ref. 1: Elementos de analise de sistemas de potencia - Stevenson - pg. 232]
195  //[Ref. 2: http://www.ee.washington.edu/research/real/Library/Reports/Tap_Adjustments_in_AC_Load_Flows.pdf]
196  //[Ref. 3: http://www.columbia.edu/~dano/courses/power/notes/power/andersson1.pdf]
197  else if(sequence != ZERO_SEQ) {
198  // Complex turns ratio
199  double radPhaseShift = wxDegToRad(data.phaseShift);
200  std::complex<double> a = std::complex<double>(data.turnsRatio * std::cos(radPhaseShift),
201  -data.turnsRatio * std::sin(radPhaseShift));
202 
203  // Transformer admitance
204  std::complex<double> y = 1.0 / std::complex<double>(data.resistance, data.indReactance);
205 
206  if(sequence == POSITIVE_SEQ) {
207  yBus[n1][n1] += y / std::pow(std::abs(a), 2.0);
208  yBus[n1][n2] += -(y / std::conj(a));
209  yBus[n2][n1] += -(y / a);
210  yBus[n2][n2] += y;
211  } else if(sequence == NEGATIVE_SEQ) {
212  yBus[n1][n1] += y / std::pow(std::abs(a), 2.0);
213  yBus[n1][n2] += -(y / a);
214  yBus[n2][n1] += -(y / std::conj(a));
215  yBus[n2][n2] += y;
216  }
217  } else if(sequence == ZERO_SEQ) {
218  switch(data.connection) {
219  case GWYE_GWYE: {
220  std::complex<double> y =
221  1.0 /
222  std::complex<double>(
223  data.zeroResistance + 3.0 * (data.primaryGrndResistance + data.secondaryGrndResistance),
224  data.zeroIndReactance +
225  3.0 * (data.primaryGrndReactance + data.secondaryGrndReactance));
226  std::complex<double> a = std::complex<double>(data.turnsRatio, 0.0);
227 
228  yBus[n1][n1] += y / (a * a);
229  yBus[n1][n2] += -(y / a);
230  yBus[n2][n1] += -(y / a);
231  yBus[n2][n2] += y;
232  } break;
233  case DELTA_GWYE: {
234  std::complex<double> y =
235  1.0 / std::complex<double>(data.zeroResistance + 3.0 * (data.secondaryGrndResistance),
236  data.zeroIndReactance + 3.0 * (data.secondaryGrndReactance));
237  yBus[n2][n2] += y;
238  break;
239  }
240  case GWYE_DELTA: {
241  std::complex<double> y =
242  1.0 / std::complex<double>(data.zeroResistance + 3.0 * (data.primaryGrndResistance),
243  data.zeroIndReactance + 3.0 * (data.primaryGrndReactance));
244  yBus[n1][n1] += y;
245  break;
246  }
247  default:
248  break;
249  }
250  }
251  }
252  }
253 
254  if(includeSyncMachines) {
255  // Synchronous generator
256  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
257  SyncGenerator* syncGenerator = *it;
258  if(syncGenerator->IsOnline()) {
259  int n = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().number;
260  SyncGeneratorElectricalData data = syncGenerator->GetPUElectricalData(systemPowerBase);
261  switch(sequence) {
262  case POSITIVE_SEQ: {
263  yBus[n][n] += 1.0 / std::complex<double>(data.positiveResistance, data.positiveReactance);
264  } break;
265  case NEGATIVE_SEQ: {
266  yBus[n][n] += 1.0 / std::complex<double>(data.negativeResistance, data.negativeReactance);
267  } break;
268  case ZERO_SEQ: {
269  if(data.groundNeutral) {
270  yBus[n][n] += 1.0 / std::complex<double>(data.zeroResistance + 3.0 * data.groundResistance,
271  data.zeroReactance + 3.0 * data.groundReactance);
272  }
273  } break;
274  }
275  }
276  }
277  // Synchronous motor
278  for(auto it = m_syncMotorList.begin(), itEnd = m_syncMotorList.end(); it != itEnd; ++it) {
279  SyncMotor* syncMotor = *it;
280  if(syncMotor->IsOnline()) {
281  int n = static_cast<Bus*>(syncMotor->GetParentList()[0])->GetElectricalData().number;
282  SyncMotorElectricalData data = syncMotor->GetPUElectricalData(systemPowerBase);
283  switch(sequence) {
284  case POSITIVE_SEQ: {
285  yBus[n][n] += 1.0 / std::complex<double>(data.positiveResistance, data.positiveReactance);
286  } break;
287  case NEGATIVE_SEQ: {
288  yBus[n][n] += 1.0 / std::complex<double>(data.negativeResistance, data.negativeReactance);
289  } break;
290  case ZERO_SEQ: {
291  if(data.groundNeutral) {
292  yBus[n][n] += 1.0 / std::complex<double>(data.zeroResistance + 3.0 * data.groundResistance,
293  data.zeroReactance + 3.0 * data.groundReactance);
294  }
295  } break;
296  }
297  }
298  }
299  }
300 
301  return true;
302 }
303 
304 void ElectricCalculation::UpdateElementsPowerFlow(std::vector<std::complex<double> > voltage,
305  std::vector<std::complex<double> > power,
306  std::vector<BusType> busType,
307  std::vector<ReactiveLimits> reactiveLimit,
308  double systemPowerBase)
309 {
310  double zeroLimit = 1e-4;
311  for(unsigned int i = 0; i < reactiveLimit.size(); ++i) {
312  if(reactiveLimit[i].maxLimit > -zeroLimit && reactiveLimit[i].maxLimit < zeroLimit)
313  reactiveLimit[i].maxLimit = zeroLimit;
314  if(reactiveLimit[i].minLimit > -zeroLimit && reactiveLimit[i].minLimit < zeroLimit)
315  reactiveLimit[i].minLimit = zeroLimit;
316  }
317  for(unsigned int i = 0; i < power.size(); ++i) {
318  if(std::real(power[i]) > -zeroLimit && std::real(power[i]) < zeroLimit)
319  power[i] = std::complex<double>(0.0, std::imag(power[i]));
320  if(std::imag(power[i]) > -zeroLimit && std::imag(power[i]) < zeroLimit)
321  power[i] = std::complex<double>(std::real(power[i]), 0.0);
322  }
323  // Buses
324  for(int i = 0; i < (int)m_busList.size(); i++) {
325  Bus* bus = m_busList[i];
326  BusElectricalData data = bus->GetElectricalData();
327  data.voltage = voltage[i];
328  data.power = power[i];
329  data.busType = busType[i];
330  bus->SetElectricalData(data);
331  }
332 
333  // Power line
334  for(int i = 0; i < (int)m_lineList.size(); i++) {
335  Line* line = m_lineList[i];
336  if(line->IsOnline()) {
337  int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number;
338  int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number;
339 
340  LineElectricalData data = line->GetElectricalData();
341  std::complex<double> v1 = voltage[n1];
342  std::complex<double> v2 = voltage[n2];
343 
344  data.current[0] = (v1 - v2) / std::complex<double>(data.resistance, data.indReactance) +
345  v1 * std::complex<double>(0.0, data.capSusceptance / 2.0);
346  data.current[1] = (v2 - v1) / std::complex<double>(data.resistance, data.indReactance) +
347  v2 * std::complex<double>(0.0, data.capSusceptance / 2.0);
348 
349  data.powerFlow[0] = v1 * std::conj(data.current[0]);
350  data.powerFlow[1] = v2 * std::conj(data.current[1]);
351 
352  if(data.powerFlow[0].real() > data.powerFlow[1].real())
354  else
356 
357  line->SetElectricalData(data);
358  }
359  }
360 
361  // Transformer
362  for(int i = 0; i < (int)m_transformerList.size(); i++) {
363  Transformer* transformer = m_transformerList[i];
364  if(transformer->IsOnline()) {
365  TransformerElectricalData data = transformer->GetElectricalData();
366  int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number;
367  int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number;
368  std::complex<double> v1 = voltage[n1]; // Primary voltage
369  std::complex<double> v2 = voltage[n2]; // Secondary voltage
370 
371  // Transformer admitance
372  std::complex<double> y = 1.0 / std::complex<double>(data.resistance, data.indReactance);
373 
374  if(data.turnsRatio == 1.0 && data.phaseShift == 0.0) {
375  data.current[0] = (v1 - v2) * y;
376  data.current[1] = (v2 - v1) * y;
377  } else {
378  double radPS = wxDegToRad(data.phaseShift);
379  std::complex<double> a =
380  std::complex<double>(data.turnsRatio * std::cos(radPS), -data.turnsRatio * std::sin(radPS));
381 
382  data.current[0] = v1 * (y / std::pow(std::abs(a), 2)) - v2 * (y / std::conj(a));
383  data.current[1] = -v1 * (y / a) + v2 * y;
384  }
385 
386  data.powerFlow[0] = v1 * std::conj(data.current[0]);
387  data.powerFlow[1] = v2 * std::conj(data.current[1]);
388 
389  if(data.powerFlow[0].real() > data.powerFlow[1].real())
391  else
393 
394  transformer->SetElectricaData(data);
395  }
396  }
397 
398  // Synchronous machines
399  for(int i = 0; i < (int)m_busList.size(); i++) {
400  Bus* bus = m_busList[i];
401  BusElectricalData data = bus->GetElectricalData();
402 
403  // Get the synchronous machines connected and calculate the load power on the bus.
404  std::vector<SyncGenerator*> syncGeneratorsOnBus;
405  std::vector<SyncMotor*> syncMotorsOnBus;
406  std::complex<double> loadPower(0.0, 0.0);
407 
408  for(auto itsg = m_syncGeneratorList.begin(); itsg != m_syncGeneratorList.end(); itsg++) {
409  SyncGenerator* syncGenerator = *itsg;
410  if(bus == syncGenerator->GetParentList()[0] && syncGenerator->IsOnline())
411  syncGeneratorsOnBus.push_back(syncGenerator);
412  }
413  for(auto itsm = m_syncMotorList.begin(); itsm != m_syncMotorList.end(); itsm++) {
414  SyncMotor* syncMotor = *itsm;
415  if(bus == syncMotor->GetParentList()[0] && syncMotor->IsOnline()) {
416  syncMotorsOnBus.push_back(syncMotor);
417  SyncMotorElectricalData childData = syncMotor->GetPUElectricalData(systemPowerBase);
418  loadPower += std::complex<double>(childData.activePower, 0.0);
419  }
420  }
421  for(auto itlo = m_loadList.begin(); itlo != m_loadList.end(); itlo++) {
422  Load* load = *itlo;
423  if(bus == load->GetParentList()[0] && load->IsOnline()) {
424  LoadElectricalData childData = load->GetPUElectricalData(systemPowerBase);
425  if(childData.loadType == CONST_POWER)
426  loadPower += std::complex<double>(childData.activePower, childData.reactivePower);
427 
428  if(childData.activePower >= 0.0)
430  else
432  }
433  }
434  for(auto itim = m_indMotorList.begin(); itim != m_indMotorList.end(); itim++) {
435  IndMotor* indMotor = *itim;
436  if(bus == indMotor->GetParentList()[0] && indMotor->IsOnline()) {
437  IndMotorElectricalData childData = indMotor->GetPUElectricalData(systemPowerBase);
438  loadPower += std::complex<double>(childData.activePower, childData.reactivePower);
439 
440  if(childData.activePower >= 0.0)
442  else
443  indMotor->SetPowerFlowDirection(PF_TO_BUS);
444  }
445  }
446 
447  // Set the sync generator power
448  for(auto itsg = syncGeneratorsOnBus.begin(); itsg != syncGeneratorsOnBus.end(); itsg++) {
449  SyncGenerator* generator = *itsg;
450  if(generator->IsOnline()) {
451  SyncGeneratorElectricalData childData = generator->GetElectricalData();
452 
453  if(busType[i] == BUS_SLACK) {
454  double activePower =
455  (power[i].real() + loadPower.real()) * systemPowerBase / (double)(syncGeneratorsOnBus.size());
456 
457  switch(childData.activePowerUnit) {
458  case UNIT_PU: {
459  activePower /= systemPowerBase;
460  } break;
461  case UNIT_kW: {
462  activePower /= 1e3;
463  } break;
464  case UNIT_MW: {
465  activePower /= 1e6;
466  } break;
467  default:
468  break;
469  }
470 
471  childData.activePower = activePower;
472  }
473  if(busType[i] == BUS_PV || busType[i] == BUS_SLACK) {
474  // double reactivePower = (power[i].imag() + loadPower.imag()) * systemPowerBase /
475  // (double)(syncGeneratorsOnBus.size() + syncMotorsOnBus.size());
476  SyncGeneratorElectricalData childData_PU = generator->GetPUElectricalData(systemPowerBase);
477 
478  double reactivePower = (power[i].imag() + loadPower.imag()) * systemPowerBase;
479 
480  if(reactiveLimit[i].limitReached == RL_MAX_REACHED)
481  reactivePower *= (childData_PU.maxReactive / reactiveLimit[i].maxLimit);
482 
483  else if(reactiveLimit[i].limitReached == RL_MIN_REACHED)
484  reactivePower *= (childData_PU.minReactive / reactiveLimit[i].minLimit);
485 
486  else
487  reactivePower /= (double)(syncGeneratorsOnBus.size() + syncMotorsOnBus.size());
488 
489  switch(childData.reactivePowerUnit) {
490  case UNIT_PU: {
491  reactivePower /= systemPowerBase;
492  } break;
493  case UNIT_kVAr: {
494  reactivePower /= 1e3;
495  } break;
496  case UNIT_MVAr: {
497  reactivePower /= 1e6;
498  } break;
499  default:
500  break;
501  }
502  childData.reactivePower = reactivePower;
503  }
504 
505  if(childData.activePower >= 0.0)
506  generator->SetPowerFlowDirection(PF_TO_BUS);
507  else
509 
510  generator->SetElectricalData(childData);
511  }
512  }
513 
514  // Set the sync motor reactive power
515  double exceededReactive = 0.0;
516  int numMachines = syncGeneratorsOnBus.size() + syncMotorsOnBus.size();
517  for(auto itsm = syncMotorsOnBus.begin(); itsm != syncMotorsOnBus.end(); itsm++) {
518  SyncMotor* syncMotor = *itsm;
519  SyncMotorElectricalData childData = syncMotor->GetElectricalData();
520 
521  bool reachedMachineLimit = false;
522 
523  if(busType[i] == BUS_PV || busType[i] == BUS_SLACK) {
524  // double reactivePower = (power[i].imag() + loadPower.imag()) * systemPowerBase /
525  // (double)(syncGeneratorsOnBus.size() + syncMotorsOnBus.size());
526 
527  SyncMotorElectricalData childData_PU = syncMotor->GetPUElectricalData(systemPowerBase);
528 
529  double reactivePower = power[i].imag() + loadPower.imag();
530 
531  // Bus reachd maximum reactive limit.
532  if(reactiveLimit[i].limitReached == RL_MAX_REACHED)
533  reactivePower *= (childData_PU.maxReactive / reactiveLimit[i].maxLimit);
534  // Bus reached minimum reactive limit.
535  else if(reactiveLimit[i].limitReached == RL_MIN_REACHED)
536  reactivePower *= (childData_PU.minReactive / reactiveLimit[i].minLimit);
537  // Bus didn't reach any limits
538  else {
539  reactivePower /= (double)(numMachines);
540  if(childData_PU.haveMaxReactive && (reactivePower > childData_PU.maxReactive)) {
541  exceededReactive += reactivePower - childData_PU.maxReactive;
542  reactivePower = childData_PU.maxReactive;
543  reachedMachineLimit = true;
544  } else if(childData_PU.haveMinReactive && (reactivePower < childData_PU.minReactive)) {
545  exceededReactive += reactivePower - childData_PU.minReactive;
546  reactivePower = childData_PU.minReactive;
547  reachedMachineLimit = true;
548  } else if((!childData_PU.haveMaxReactive && reactiveLimit[i].limitReached == RL_MAX_REACHED) ||
549  (!childData_PU.haveMinReactive && reactiveLimit[i].limitReached == RL_MIN_REACHED) ||
550  (!childData_PU.haveMaxReactive && !childData_PU.haveMaxReactive)) {
551  reactivePower += exceededReactive;
552  exceededReactive = 0.0;
553  }
554  }
555 
556  reactivePower *= systemPowerBase;
557 
558  switch(childData.reactivePowerUnit) {
559  case UNIT_PU: {
560  reactivePower /= systemPowerBase;
561  } break;
562  case UNIT_kVAr: {
563  reactivePower /= 1e3;
564  } break;
565  case UNIT_MVAr: {
566  reactivePower /= 1e6;
567  } break;
568  default:
569  break;
570  }
571  childData.reactivePower = reactivePower;
572  }
573 
574  if(childData.activePower > 0.0)
576  else
577  syncMotor->SetPowerFlowDirection(PF_TO_BUS);
578 
579  syncMotor->SetElectricalData(childData);
580 
581  if(reachedMachineLimit) {
582  syncMotorsOnBus.erase(itsm);
583  itsm = syncMotorsOnBus.begin();
584  }
585  }
586  }
587 }
588 
589 bool ElectricCalculation::InvertMatrix(std::vector<std::vector<std::complex<double> > > matrix,
590  std::vector<std::vector<std::complex<double> > >& inverse)
591 {
592  int order = static_cast<int>(matrix.size());
593 
594  inverse.clear();
595  // Fill the inverse matrix with identity.
596  for(int i = 0; i < order; ++i) {
597  std::vector<std::complex<double> > line;
598  for(int j = 0; j < order; ++j) {
599  line.push_back(i == j ? std::complex<double>(1.0, 0.0) : std::complex<double>(0.0, 0.0));
600  }
601  inverse.push_back(line);
602  }
603 
604  // Check if a main diagonal value of the matrix is zero, if one is zero, try a linear combination to remove it.
605  for(int i = 0; i < order; ++i) {
606  for(int j = 0; j < order; ++j) {
607  if(i == j && matrix[i][j] == std::complex<double>(0.0, 0.0)) {
608  int row = 0;
609  while(row < order) {
610  if(matrix[row][j] != std::complex<double>(0.0, 0.0)) {
611  for(int k = 0; k < order; ++k) {
612  matrix[i][k] += matrix[row][k];
613  inverse[i][k] += inverse[row][k];
614  }
615  break;
616  }
617  row++;
618  }
619  // If all line values are zero, the matrix is singular and the solution is impossible.
620  if(row == order) return false;
621  }
622  }
623  }
624 
625  // Linear combinations are made in both matrices, the goal is the input matrix become the identity. The final result
626  // have two matrices: the identity and the inverse of the input.
627  for(int i = 0; i < order; ++i) {
628  for(int j = 0; j < order; ++j) {
629  if(i != j) {
630  if(matrix[i][i] == std::complex<double>(0.0, 0.0)) return false;
631 
632  std::complex<double> factor = matrix[j][i] / matrix[i][i];
633  for(int k = 0; k < order; ++k) {
634  matrix[j][k] -= factor * matrix[i][k];
635  inverse[j][k] -= factor * inverse[i][k];
636  }
637  }
638  }
639  }
640  // Main diagonal calculation.
641  for(int i = 0; i < order; ++i) {
642  for(int j = 0; j < order; ++j) {
643  if(i == j) {
644  if(matrix[i][j] == std::complex<double>(0.0, 0.0)) return false;
645 
646  std::complex<double> factor = (matrix[i][j] - std::complex<double>(1.0, 0.0)) / matrix[i][j];
647  for(int k = 0; k < order; ++k) {
648  matrix[j][k] -= factor * matrix[i][k];
649  inverse[j][k] -= factor * inverse[i][k];
650  }
651  }
652  }
653  }
654 
655  return true;
656 }
657 
658 void ElectricCalculation::ABCtoDQ0(std::complex<double> complexValue, double angle, double& dValue, double& qValue)
659 {
660  dValue = -std::real(complexValue) * std::sin(angle) + std::imag(complexValue) * std::cos(angle);
661  qValue = std::real(complexValue) * std::cos(angle) + std::imag(complexValue) * std::sin(angle);
662 }
663 
664 void ElectricCalculation::DQ0toABC(double dValue, double qValue, double angle, std::complex<double>& complexValue)
665 {
666  double real = qValue * std::cos(angle) - dValue * std::sin(angle);
667  double imag = qValue * std::sin(angle) + dValue * std::cos(angle);
668  complexValue = std::complex<double>(real, imag);
669 }
670 
671 std::vector<std::complex<double> > ElectricCalculation::GaussianElimination(
672  std::vector<std::vector<std::complex<double> > > matrix,
673  std::vector<std::complex<double> > array)
674 {
675  //[Ref] http://pt.wikipedia.org/wiki/Elimina%C3%A7%C3%A3o_de_Gauss
676 
677  std::vector<std::complex<double> > solution;
678 
679  std::vector<std::vector<std::complex<double> > > triangMatrix;
680  triangMatrix.resize(matrix.size());
681  for(unsigned int i = 0; i < matrix.size(); i++) {
682  triangMatrix[i].resize(matrix.size());
683  }
684 
685  for(unsigned int i = 0; i < matrix.size(); i++) {
686  solution.push_back(array[i]);
687  }
688 
689  for(unsigned int i = 0; i < matrix.size(); i++) {
690  for(unsigned int j = 0; j < matrix.size(); j++) {
691  triangMatrix[i][j] = matrix[i][j];
692  }
693  }
694 
695  for(unsigned int k = 0; k < matrix.size(); k++) {
696  unsigned int k1 = k + 1;
697  for(unsigned int i = k; i < matrix.size(); i++) {
698  if(triangMatrix[i][k] != std::complex<double>(0.0, 0.0)) {
699  for(unsigned int j = k1; j < matrix.size(); j++) {
700  triangMatrix[i][j] = triangMatrix[i][j] / triangMatrix[i][k];
701  }
702  solution[i] = solution[i] / triangMatrix[i][k];
703  }
704  }
705  for(unsigned int i = k1; i < matrix.size(); i++) {
706  if(triangMatrix[i][k] != std::complex<double>(0.0, 0.0)) {
707  for(unsigned int j = k1; j < matrix.size(); j++) {
708  triangMatrix[i][j] -= triangMatrix[k][j];
709  }
710  solution[i] -= solution[k];
711  }
712  }
713  }
714  for(unsigned int i = matrix.size() - 2; i >= 0; i--) {
715  for(unsigned int j = matrix.size() - 1; j >= i + 1; j--) {
716  solution[i] -= triangMatrix[i][j] * solution[j];
717  }
718  }
719 
720  return solution;
721 }
722 
723 Machines::SyncMachineModel ElectricCalculation::GetMachineModel(SyncGenerator* generator)
724 {
725  auto data = generator->GetElectricalData();
726  if(data.transTd0 != 0.0) {
727  if(data.transTq0 != 0.0) {
728  if(data.subTd0 != 0.0 || data.subTq0 != 0.0) {
729  return Machines::SM_MODEL_5;
730  }
731  return Machines::SM_MODEL_3;
732  } else {
733  if(data.subTd0 != 0.0 || data.subTq0 != 0.0) {
734  return Machines::SM_MODEL_4;
735  }
736  return Machines::SM_MODEL_2;
737  }
738  }
739 
740  return Machines::SM_MODEL_1;
741 }
742 
743 std::vector<std::complex<double> > ElectricCalculation::ComplexMatrixTimesVector(
744  std::vector<std::vector<std::complex<double> > > matrix,
745  std::vector<std::complex<double> > vector)
746 {
747  std::vector<std::complex<double> > solution;
748  for(unsigned int i = 0; i < matrix.size(); i++) {
749  solution.push_back(std::complex<double>(0.0, 0.0));
750 
751  for(unsigned int j = 0; j < matrix.size(); j++) {
752  solution[i] += matrix[i][j] * vector[j];
753  }
754  }
755 
756  return solution;
757 }
758 
759 void ElectricCalculation::GetLUDecomposition(std::vector<std::vector<std::complex<double> > > matrix,
760  std::vector<std::vector<std::complex<double> > >& matrixL,
761  std::vector<std::vector<std::complex<double> > >& matrixU)
762 {
763  // Doolittle method
764  // [Ref] http://www3.nd.edu/~zxu2/acms40390F11/Alg-LU-Crout.pdf
765  // [Ref] http://www.engr.colostate.edu/~thompson/hPage/CourseMat/Tutorials/CompMethods/doolittle.pdf
766 
767  int size = static_cast<int>(matrix.size()); // Decomposed matrix size.
768 
769  // Set upper and lower matrices sizes.
770  matrixL.resize(size);
771  matrixU.resize(size);
772  for(int i = 0; i < size; i++) {
773  matrixL[i].resize(size);
774  matrixU[i].resize(size);
775  }
776 
777  // First row of upper matrix and first column of lower matrix.
778  for(int i = 0; i < size; i++) {
779  matrixU[0][i] = matrix[0][i];
780  matrixL[i][0] = matrix[i][0] / matrixU[0][0];
781  }
782 
783  // Lower matrix main diagonal.
784  for(int i = 1; i < size; i++) {
785  matrixL[i][i] = std::complex<double>(1.0, 0.0);
786  }
787 
788  for(int i = 1; i < size - 1; i++) {
789  // Upper matrix main diagonal.
790  matrixU[i][i] = matrix[i][i];
791  for(int k = 0; k < i; k++) {
792  matrixU[i][i] -= matrixL[i][k] * matrixU[k][i];
793  }
794 
795  // Others elements of upper matrix
796  for(int j = i + 1; j < size; j++) {
797  matrixU[i][j] = matrix[i][j];
798  for(int k = 0; k < i; k++) {
799  matrixU[i][j] -= matrixL[i][k] * matrixU[k][j];
800  }
801  }
802 
803  // Lower matrix elements
804  for(int j = i + 1; j < size; j++) {
805  matrixL[j][i] = matrix[j][i];
806  for(int k = 0; k < i; k++) {
807  matrixL[j][i] -= matrixL[j][k] * matrixU[k][i];
808  }
809  matrixL[j][i] = matrixL[j][i] / matrixU[i][i];
810  }
811  }
812 
813  // Last element of upper matrix.
814  matrixU[size - 1][size - 1] = matrix[size - 1][size - 1];
815  for(int k = 0; k < size - 1; k++) {
816  matrixU[size - 1][size - 1] -= matrixL[size - 1][k] * matrixU[k][size - 1];
817  }
818 }
819 
820 std::vector<std::complex<double> > ElectricCalculation::LUEvaluate(std::vector<std::vector<std::complex<double> > > u,
821  std::vector<std::vector<std::complex<double> > > l,
822  std::vector<std::complex<double> > b)
823 {
824  int size = static_cast<int>(b.size());
825  std::vector<std::complex<double> > x;
826  std::vector<std::complex<double> > y;
827  x.resize(size);
828  y.resize(size);
829 
830  // Forward
831  for(int i = 0; i < size; i++) {
832  y[i] = b[i];
833  for(int j = 0; j < i; j++) {
834  y[i] -= l[i][j] * y[j];
835  }
836  y[i] /= l[i][i];
837  }
838  // Backward
839  for(int i = size - 1; i >= 0; i--) {
840  x[i] = y[i];
841  for(int j = i + 1; j < size; j++) {
842  x[i] -= u[i][j] * x[j];
843  }
844  x[i] /= u[i][i];
845  }
846  return x;
847 }
- -
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
-
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
Definition: PowerElement.h:187
- - - -
Synchronous generator power element.
- - - - -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
~ElectricCalculation()
Destructor.
-
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
Definition: Machines.cpp:267
-
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
-
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
- -
virtual bool InvertMatrix(std::vector< std::vector< std::complex< double > > > matrix, std::vector< std::vector< std::complex< double > > > &inverse)
Invert a matrix.
-
Power line element.
Definition: Line.h:59
-
Loas shunt power element.
Definition: Load.h:73
- - - -
virtual bool GetYBus(std::vector< std::vector< std::complex< double > > > &yBus, double systemPowerBase, YBusSequence sequence=POSITIVE_SEQ, bool includeSyncMachines=false, bool allLoadsAsImpedances=false)
Get the admittance matrix from the list of elements (use GetElementsFromList first).
-
virtual void UpdateElementsPowerFlow(std::vector< std::complex< double > > voltage, std::vector< std::complex< double > > power, std::vector< BusType > busType, std::vector< ReactiveLimits > reactiveLimit, double systemPowerBase)
Update the elements after the power flow calculation.
- -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
- -
ElectricCalculation()
Constructor.
-
Induction motor power element.
Definition: IndMotor.h:40
-
Shunt capactior power element.
Definition: Capacitor.h:38
- -
Inductor shunt power element.
Definition: Inductor.h:38
-
virtual void GetElementsFromList(std::vector< Element *> elementList)
Separate the power elements from a generic list.
- -
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
Definition: Line.cpp:449
-
Two-winding transformer power element.
Definition: Transformer.h:78
- - -
-
- - - - diff --git a/docs/doxygen/html/_electric_calculation_8h.html b/docs/doxygen/html/_electric_calculation_8h.html index dd36dcb..336cae9 100644 --- a/docs/doxygen/html/_electric_calculation_8h.html +++ b/docs/doxygen/html/_electric_calculation_8h.html @@ -93,21 +93,19 @@ $(document).ready(function(){initNavTree('_electric_calculation_8h.html','');});
#include <vector>
#include <complex>
-#include "Element.h"
-#include "PowerElement.h"
-#include "Bus.h"
-#include "Capacitor.h"
-#include "IndMotor.h"
-#include "Inductor.h"
-#include "Line.h"
-#include "Load.h"
-#include "SyncGenerator.h"
-#include "SyncMotor.h"
-#include "Transformer.h"
-#include "PropertiesData.h"
-
-

Go to the source code of this file.

- +#include "Element.h"
+#include "PowerElement.h"
+#include "Bus.h"
+#include "Capacitor.h"
+#include "IndMotor.h"
+#include "Inductor.h"
+#include "Line.h"
+#include "Load.h"
+#include "SyncGenerator.h"
+#include "SyncMotor.h"
+#include "Transformer.h"
+#include "PropertiesData.h"
+
diff --git a/docs/doxygen/html/_electric_calculation_8h_source.html b/docs/doxygen/html/_electric_calculation_8h_source.html deleted file mode 100644 index b1c7bf6..0000000 --- a/docs/doxygen/html/_electric_calculation_8h_source.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - -Project/ElectricCalculation.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  ReactiveLimits
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElectricCalculation.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ELECTRICCALCULATION_H
19 #define ELECTRICCALCULATION_H
20 
21 #include <vector>
22 #include <complex>
23 
24 #include "Element.h"
25 #include "PowerElement.h"
26 #include "Bus.h"
27 #include "Capacitor.h"
28 #include "IndMotor.h"
29 #include "Inductor.h"
30 #include "Line.h"
31 #include "Load.h"
32 #include "SyncGenerator.h"
33 #include "SyncMotor.h"
34 #include "Transformer.h"
35 
36 #include "PropertiesData.h"
37 
38 enum BusType { BUS_SLACK = 0, BUS_PV, BUS_PQ };
39 
40 enum ReactiveLimitsType {
41  RL_UNLIMITED = 0, // The bus can generate any ammount of reactive power.
42  RL_LIMITED, // The bus reactive power generation is limited.
43  RL_UNLIMITED_SOURCE, // The bus have at least one source of infinite reative power.
44  RL_MAX_REACHED, // Max limit reached
45  RL_MIN_REACHED, // Min limit reached
46  RL_NONE_REACHED // No limits reached
47 };
48 
49 enum YBusSequence { POSITIVE_SEQ = 0, NEGATIVE_SEQ, ZERO_SEQ };
50 
52  double maxLimit = 0.0;
53  double minLimit = 0.0;
54  ReactiveLimitsType maxLimitType = RL_UNLIMITED;
55  ReactiveLimitsType minLimitType = RL_UNLIMITED;
56  ReactiveLimitsType limitReached = RL_NONE_REACHED;
57 };
58 
67 {
68  public:
73 
78 
83  virtual void GetElementsFromList(std::vector<Element*> elementList);
84 
93  virtual bool GetYBus(std::vector<std::vector<std::complex<double> > >& yBus,
94  double systemPowerBase,
95  YBusSequence sequence = POSITIVE_SEQ,
96  bool includeSyncMachines = false,
97  bool allLoadsAsImpedances = false);
98 
105  virtual bool InvertMatrix(std::vector<std::vector<std::complex<double> > > matrix,
106  std::vector<std::vector<std::complex<double> > >& inverse);
107 
116  virtual void UpdateElementsPowerFlow(std::vector<std::complex<double> > voltage,
117  std::vector<std::complex<double> > power,
118  std::vector<BusType> busType,
119  std::vector<ReactiveLimits> reactiveLimit,
120  double systemPowerBase);
121 
122  void ABCtoDQ0(std::complex<double> complexValue, double angle, double& dValue, double& qValue);
123  void DQ0toABC(double dValue, double qValue, double angle, std::complex<double>& complexValue);
124 
125  std::vector<std::complex<double> > GaussianElimination(std::vector<std::vector<std::complex<double> > > matrix,
126  std::vector<std::complex<double> > array);
127 
128  Machines::SyncMachineModel GetMachineModel(SyncGenerator* generator);
129 
130  std::vector<std::complex<double> > ComplexMatrixTimesVector(std::vector<std::vector<std::complex<double> > > matrix,
131  std::vector<std::complex<double> > vector);
132 
133  void GetLUDecomposition(std::vector<std::vector<std::complex<double> > > matrix,
134  std::vector<std::vector<std::complex<double> > >& matrixL,
135  std::vector<std::vector<std::complex<double> > >& matrixU);
136 
137  std::vector<std::complex<double> > LUEvaluate(std::vector<std::vector<std::complex<double> > > u,
138  std::vector<std::vector<std::complex<double> > > l,
139  std::vector<std::complex<double> > b);
140 
145  const std::vector<Bus*> GetBusList() const { return m_busList; }
150  const std::vector<Capacitor*> GetCapacitorList() const { return m_capacitorList; }
155  const std::vector<IndMotor*> GetIndMotorList() const { return m_indMotorList; }
160  const std::vector<Inductor*> GetInductorList() const { return m_inductorList; }
165  const std::vector<Line*> GetLineList() const { return m_lineList; }
170  const std::vector<Load*> GetLoadList() const { return m_loadList; }
175  const std::vector<SyncGenerator*> GetSyncGeneratorList() const { return m_syncGeneratorList; }
180  const std::vector<SyncMotor*> GetSyncMotorList() const { return m_syncMotorList; }
185  const std::vector<Transformer*> GetTransformerList() const { return m_transformerList; }
186  protected:
187  std::vector<PowerElement*> m_powerElementList;
188  std::vector<Bus*> m_busList;
189  std::vector<Capacitor*> m_capacitorList;
190  std::vector<IndMotor*> m_indMotorList;
191  std::vector<Inductor*> m_inductorList;
192  std::vector<Line*> m_lineList;
193  std::vector<Load*> m_loadList;
194  std::vector<SyncGenerator*> m_syncGeneratorList;
195  std::vector<SyncMotor*> m_syncMotorList;
196  std::vector<Transformer*> m_transformerList;
197 };
198 
199 #endif // ELECTRICCALCULATION_H
const std::vector< Transformer * > GetTransformerList() const
Get the transformers of the system (use GetElementsFromList first).
- - -
const std::vector< IndMotor * > GetIndMotorList() const
Get the induction motors of the system (use GetElementsFromList first).
- - -
Synchronous generator power element.
-
const std::vector< Bus * > GetBusList() const
Get the buses of the system (use GetElementsFromList first).
-
const std::vector< SyncGenerator * > GetSyncGeneratorList() const
Get the synchronous generators of the system (use GetElementsFromList first).
- -
const std::vector< Inductor * > GetInductorList() const
Get the inductors of the system (use GetElementsFromList first).
- - - - -
const std::vector< Capacitor * > GetCapacitorList() const
Get the capacitors of the system (use GetElementsFromList first).
- -
const std::vector< Load * > GetLoadList() const
Get the loads of the system (use GetElementsFromList first).
- - -
const std::vector< SyncMotor * > GetSyncMotorList() const
Get the synchronous motors of the system (use GetElementsFromList first).
-
Base class of electric calculations, with general methods.
- -
const std::vector< Line * > GetLineList() const
Get the lines of the system (use GetElementsFromList first).
-
-
- - - - diff --git a/docs/doxygen/html/_electromechanical_8cpp_source.html b/docs/doxygen/html/_electromechanical_8cpp_source.html deleted file mode 100644 index 65abff8..0000000 --- a/docs/doxygen/html/_electromechanical_8cpp_source.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - -Project/Electromechanical.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Electromechanical.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Electromechanical.h"
19 #include "ControlElementSolver.h"
20 
21 Electromechanical::Electromechanical(wxWindow* parent, std::vector<Element*> elementList, SimulationData data)
22 {
23  m_parent = parent;
24  GetElementsFromList(elementList);
25  SetEventTimeList();
26 
27  Bus dummyBus;
28  m_powerSystemBase = dummyBus.GetValueFromUnit(data.basePower, data.basePowerUnit);
29  m_systemFreq = data.stabilityFrequency;
30  m_simTime = data.stabilitySimulationTime;
31  m_timeStep = data.timeStep;
32  m_tolerance = data.stabilityTolerance;
33  m_maxIterations = data.stabilityMaxIterations;
34 
35  m_ctrlTimeStepMultiplier = 1.0 / static_cast<double>(data.controlTimeStepRatio);
36 
37  m_plotTime = data.plotTime;
38  m_useCOI = data.useCOI;
39  // If the user use all load as ZIP, updates the portions of each model, otherwise use constant impedance only.
40  for(auto it = m_loadList.begin(), itEnd = m_loadList.end(); it != itEnd; ++it) {
41  Load* load = *it;
42  auto loadData = load->GetElectricalData();
43  if(!loadData.useCompLoad) { // If no individual load composition defined.
44  if(data.useCompLoads) { // Use general composition, if defined.
45  loadData.constImpedanceActive = data.constImpedanceActive;
46  loadData.constCurrentActive = data.constCurrentActive;
47  loadData.constPowerActive = data.constPowerActive;
48  loadData.constImpedanceReactive = data.constImpedanceReactive;
49  loadData.constCurrentReactive = data.constCurrentReactive;
50  loadData.constPowerReactive = data.constPowerReactive;
51  } else { // Otherwise, use constant impedance.
52  loadData.constImpedanceActive = 100.0;
53  loadData.constCurrentActive = 0.0;
54  loadData.constPowerActive = 0.0;
55  loadData.constImpedanceReactive = 100.0;
56  loadData.constCurrentReactive = 0.0;
57  loadData.constPowerReactive = 0.0;
58  }
59  }
60 
61  loadData.constCurrentUV = data.underVoltageConstCurrent / 100.0;
62  loadData.constPowerUV = data.underVoltageConstPower / 100.0;
63  load->SetElectricalData(loadData);
64  }
65 }
66 
67 Electromechanical::~Electromechanical() {}
68 bool Electromechanical::RunStabilityCalculation()
69 {
70  wxProgressDialog pbd(_("Running simulation"), _("Initializing..."), 100, m_parent,
71  wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_CAN_ABORT | wxPD_SMOOTH);
72 
73  SetSyncMachinesModel();
74 
75  // Calculate the admittance matrix with the synchronous machines.
76  if(!GetYBus(m_yBus, m_powerSystemBase, POSITIVE_SEQ, false, true)) {
77  m_errorMsg = _("It was not possible to build the admittance matrix.");
78  return false;
79  }
80  InsertSyncMachinesOnYBus();
81  GetLUDecomposition(m_yBus, m_yBusL, m_yBusU);
82 
83  // Get buses voltages.
84  m_vBus.clear();
85  m_vBus.resize(m_busList.size());
86  for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) {
87  Bus* bus = *it;
88  auto data = bus->GetElectricalData();
89  m_vBus[data.number] = data.voltage;
90  }
91 
92  // Calculate injected currents
93  m_iBus = ComplexMatrixTimesVector(m_yBus, m_vBus);
94  for(unsigned int i = 0; i < m_iBus.size(); ++i) {
95  if(std::abs(m_iBus[i]) < 1e-5) m_iBus[i] = std::complex<double>(0.0, 0.0);
96  }
97 
98  if(!InitializeDynamicElements()) return false;
99 
100  double pbdTime = m_plotTime;
101  double currentTime = 0.0;
102  double currentPlotTime = 0.0;
103  double currentPbdTime = 0.0;
104  while(currentTime < m_simTime) {
105  if(HasEvent(currentTime)) {
106  SetEvent(currentTime);
107  GetLUDecomposition(m_yBus, m_yBusL, m_yBusU);
108  }
109 
110  if(currentPlotTime >= m_plotTime || currentTime == 0.0) {
111  m_timeVector.push_back(currentTime);
112  SaveData();
113  currentPlotTime = 0.0;
114  }
115 
116  if(currentPbdTime > pbdTime) {
117  if(!pbd.Update((currentTime / m_simTime) * 100, wxString::Format("Time = %.2fs", currentTime))) {
118  m_errorMsg = wxString::Format(_("Simulation cancelled at %.2fs."), currentTime);
119  pbd.Update(100);
120  return false;
121  }
122  currentPbdTime = 0.0;
123  }
124 
125  if(!SolveSynchronousMachines()) return false;
126 
127  currentTime += m_timeStep;
128  currentPlotTime += m_timeStep;
129  currentPbdTime += m_timeStep;
130  }
131  return true;
132 }
133 
134 void Electromechanical::SetEventTimeList()
135 {
136  // Fault
137  for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) {
138  Bus* bus = *it;
139  auto data = bus->GetElectricalData();
140  if(data.stabHasFault) {
141  m_eventTimeList.push_back(data.stabFaultTime);
142  m_eventOccurrenceList.push_back(false);
143  m_eventTimeList.push_back(data.stabFaultTime + data.stabFaultLength);
144  m_eventOccurrenceList.push_back(false);
145  }
146  }
147  // Switching
148  for(auto it = m_powerElementList.begin(), itEnd = m_powerElementList.end(); it != itEnd; ++it) {
149  PowerElement* element = *it;
150  SwitchingData swData = element->GetSwitchingData();
151  for(unsigned int i = 0; i < swData.swTime.size(); ++i) {
152  m_eventTimeList.push_back(swData.swTime[i]);
153  m_eventOccurrenceList.push_back(false);
154  }
155  }
156 }
157 
158 bool Electromechanical::HasEvent(double currentTime)
159 {
160  for(unsigned int i = 0; i < m_eventTimeList.size(); ++i) {
161  if(!m_eventOccurrenceList[i]) {
162  if(EventTrigger(m_eventTimeList[i], currentTime)) {
163  m_eventOccurrenceList[i] = true;
164  return true;
165  }
166  }
167  }
168  return false;
169 }
170 
171 void Electromechanical::SetEvent(double currentTime)
172 {
173  // Fault
174  for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) {
175  Bus* bus = *it;
176  auto data = bus->GetElectricalData();
177  if(data.stabHasFault) {
178  int n = data.number;
179 
180  // Insert fault
181  if(EventTrigger(data.stabFaultTime, currentTime)) {
182  double r, x;
183  r = data.stabFaultResistance;
184  x = data.stabFaultReactance;
185  if(x < 1e-5) x = 1e-5;
186  m_yBus[n][n] += std::complex<double>(1.0, 0.0) / std::complex<double>(r, x);
187  }
188 
189  // Remove fault
190  else if(EventTrigger(data.stabFaultTime + data.stabFaultLength, currentTime)) {
191  double r, x;
192  r = data.stabFaultResistance;
193  x = data.stabFaultReactance;
194  if(x < 1e-5) x = 1e-5;
195  m_yBus[n][n] -= std::complex<double>(1.0, 0.0) / std::complex<double>(r, x);
196  }
197  }
198  }
199 
200  // SyncGenerator switching
201  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
202  SyncGenerator* generator = *it;
203  auto swData = generator->GetSwitchingData();
204  for(unsigned int i = 0; i < swData.swType.size(); ++i) {
205  if(EventTrigger(swData.swTime[i], currentTime)) {
206  // Remove machine (only connected machines)
207  if(swData.swType[i] == SW_REMOVE && generator->IsOnline()) {
208  generator->SetOnline(false);
209  int n = static_cast<Bus*>(generator->GetParentList()[0])->GetElectricalData().number;
210  m_yBus[n][n] -= GetSyncMachineAdmittance(generator);
211  }
212 
213  // Insert machine (only disconnected machines)
214  if(swData.swType[i] == SW_INSERT && !generator->IsOnline() && generator->GetParentList().size() == 1) {
215  if(generator->SetOnline(true)) {
216  int n = static_cast<Bus*>(generator->GetParentList()[0])->GetElectricalData().number;
217  m_yBus[n][n] += GetSyncMachineAdmittance(generator);
218  }
219  }
220  }
221  }
222  }
223 
224  // Load switching
225  for(auto it = m_loadList.begin(), itEnd = m_loadList.end(); it != itEnd; ++it) {
226  Load* load = *it;
227  auto swData = load->GetSwitchingData();
228  for(unsigned int i = 0; i < swData.swType.size(); ++i) {
229  if(EventTrigger(swData.swTime[i], currentTime)) {
230  // Remove load (only connected loads)
231  if(swData.swType[i] == SW_REMOVE && load->IsOnline()) {
232  load->SetOnline(false);
233  auto data = load->GetPUElectricalData(m_powerSystemBase);
234  Bus* parentBus = static_cast<Bus*>(load->GetParentList()[0]);
235  int n = parentBus->GetElectricalData().number;
236  std::complex<double> v = parentBus->GetElectricalData().voltage;
237  m_yBus[n][n] -= std::complex<double>(data.activePower, -data.reactivePower) / (v * v);
238  }
239 
240  // Insert load (only disconnected load)
241  if(swData.swType[i] == SW_INSERT && !load->IsOnline() && load->GetParentList().size() == 1) {
242  if(load->SetOnline(true)) {
243  auto data = load->GetPUElectricalData(m_powerSystemBase);
244  Bus* parentBus = static_cast<Bus*>(load->GetParentList()[0]);
245  int n = parentBus->GetElectricalData().number;
246  std::complex<double> v = parentBus->GetElectricalData().voltage;
247  m_yBus[n][n] += std::complex<double>(data.activePower, -data.reactivePower) / (v * v);
248  }
249  }
250  }
251  }
252  }
253 
254  // Line switching
255  for(auto it = m_lineList.begin(), itEnd = m_lineList.end(); it != itEnd; ++it) {
256  Line* line = *it;
257  auto swData = line->GetSwitchingData();
258  for(unsigned int i = 0; i < swData.swType.size(); ++i) {
259  if(EventTrigger(swData.swTime[i], currentTime)) {
260  // Remove line (only connected lines)
261  if(swData.swType[i] == SW_REMOVE && line->IsOnline()) {
262  line->SetOnline(false);
263  auto data = line->GetElectricalData();
264 
265  int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number;
266  int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number;
267 
268  m_yBus[n1][n2] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
269  m_yBus[n2][n1] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
270 
271  m_yBus[n1][n1] -= 1.0 / std::complex<double>(data.resistance, data.indReactance);
272  m_yBus[n2][n2] -= 1.0 / std::complex<double>(data.resistance, data.indReactance);
273 
274  m_yBus[n1][n1] -= std::complex<double>(0.0, data.capSusceptance / 2.0);
275  m_yBus[n2][n2] -= std::complex<double>(0.0, data.capSusceptance / 2.0);
276  }
277 
278  // Insert line (only disconnected lines)
279  if(swData.swType[i] == SW_INSERT && !line->IsOnline() && line->GetParentList().size() == 2) {
280  if(line->SetOnline(true)) {
281  auto data = line->GetElectricalData();
282 
283  int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number;
284  int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number;
285 
286  m_yBus[n1][n2] -= 1.0 / std::complex<double>(data.resistance, data.indReactance);
287  m_yBus[n2][n1] -= 1.0 / std::complex<double>(data.resistance, data.indReactance);
288 
289  m_yBus[n1][n1] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
290  m_yBus[n2][n2] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
291 
292  m_yBus[n1][n1] += std::complex<double>(0.0, data.capSusceptance / 2.0);
293  m_yBus[n2][n2] += std::complex<double>(0.0, data.capSusceptance / 2.0);
294  }
295  }
296  }
297  }
298  }
299 
300  // Transformer switching
301  for(auto it = m_transformerList.begin(), itEnd = m_transformerList.end(); it != itEnd; ++it) {
302  Transformer* transformer = *it;
303  auto swData = transformer->GetSwitchingData();
304  for(unsigned int i = 0; i < swData.swType.size(); ++i) {
305  if(EventTrigger(swData.swTime[i], currentTime)) {
306  // Remove transformer (only connected transformers)
307  if(swData.swType[i] == SW_REMOVE && transformer->IsOnline()) {
308  transformer->SetOnline(false);
309  auto data = transformer->GetElectricalData();
310 
311  int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number;
312  int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number;
313 
314  if(data.turnsRatio == 1.0 && data.phaseShift == 0.0) {
315  m_yBus[n1][n2] -= -1.0 / std::complex<double>(data.resistance, data.indReactance);
316  m_yBus[n2][n1] -= -1.0 / std::complex<double>(data.resistance, data.indReactance);
317 
318  m_yBus[n1][n1] -= 1.0 / std::complex<double>(data.resistance, data.indReactance);
319  m_yBus[n2][n2] -= 1.0 / std::complex<double>(data.resistance, data.indReactance);
320  } else {
321  // Complex turns ratio
322  double radPhaseShift = wxDegToRad(data.phaseShift);
323  std::complex<double> a = std::complex<double>(data.turnsRatio * std::cos(radPhaseShift),
324  -data.turnsRatio * std::sin(radPhaseShift));
325 
326  // Transformer admitance
327  std::complex<double> y = 1.0 / std::complex<double>(data.resistance, data.indReactance);
328  m_yBus[n1][n1] -= y / std::pow(std::abs(a), 2.0);
329  m_yBus[n1][n2] -= -(y / std::conj(a));
330  m_yBus[n2][n1] -= -(y / a);
331  m_yBus[n2][n2] -= y;
332  }
333  }
334 
335  // Insert transformer (only disconnected transformers)
336  if(swData.swType[i] == SW_INSERT && !transformer->IsOnline() &&
337  transformer->GetParentList().size() == 2) {
338  if(transformer->SetOnline(true)) {
339  auto data = transformer->GetElectricalData();
340 
341  int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number;
342  int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number;
343 
344  if(data.turnsRatio == 1.0 && data.phaseShift == 0.0) {
345  m_yBus[n1][n2] += -1.0 / std::complex<double>(data.resistance, data.indReactance);
346  m_yBus[n2][n1] += -1.0 / std::complex<double>(data.resistance, data.indReactance);
347 
348  m_yBus[n1][n1] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
349  m_yBus[n2][n2] += 1.0 / std::complex<double>(data.resistance, data.indReactance);
350  } else {
351  // Complex turns ratio
352  double radPhaseShift = wxDegToRad(data.phaseShift);
353  std::complex<double> a = std::complex<double>(data.turnsRatio * std::cos(radPhaseShift),
354  -data.turnsRatio * std::sin(radPhaseShift));
355 
356  // Transformer admitance
357  std::complex<double> y = 1.0 / std::complex<double>(data.resistance, data.indReactance);
358  m_yBus[n1][n1] += y / std::pow(std::abs(a), 2.0);
359  m_yBus[n1][n2] += -(y / std::conj(a));
360  m_yBus[n2][n1] += -(y / a);
361  m_yBus[n2][n2] += y;
362  }
363  }
364  }
365  }
366  }
367  }
368 
369  // Capacitor switching
370  for(auto it = m_capacitorList.begin(), itEnd = m_capacitorList.end(); it != itEnd; ++it) {
371  Capacitor* capacitor = *it;
372  auto swData = capacitor->GetSwitchingData();
373  for(unsigned int i = 0; i < swData.swType.size(); ++i) {
374  if(EventTrigger(swData.swTime[i], currentTime)) {
375  // Remove capacitor (only connected capacitors)
376  if(swData.swType[i] == SW_REMOVE && capacitor->IsOnline()) {
377  capacitor->SetOnline(false);
378  auto data = capacitor->GetPUElectricalData(m_powerSystemBase);
379  int n = static_cast<Bus*>(capacitor->GetParentList()[0])->GetElectricalData().number;
380  m_yBus[n][n] -= std::complex<double>(0.0, data.reactivePower);
381  }
382 
383  // Insert capacitor (only disconnected capacitors)
384  if(swData.swType[i] == SW_INSERT && !capacitor->IsOnline() && capacitor->GetParentList().size() == 1) {
385  if(capacitor->SetOnline(true)) {
386  auto data = capacitor->GetPUElectricalData(m_powerSystemBase);
387  int n = static_cast<Bus*>(capacitor->GetParentList()[0])->GetElectricalData().number;
388  m_yBus[n][n] += std::complex<double>(0.0, data.reactivePower);
389  }
390  }
391  }
392  }
393  }
394 
395  // Inductor switching
396  for(auto it = m_inductorList.begin(), itEnd = m_inductorList.end(); it != itEnd; ++it) {
397  Inductor* inductor = *it;
398  auto swData = inductor->GetSwitchingData();
399  for(unsigned int i = 0; i < swData.swType.size(); ++i) {
400  if(EventTrigger(swData.swTime[i], currentTime)) {
401  // Remove inductor (only connected inductors)
402  if(swData.swType[i] == SW_REMOVE && inductor->IsOnline()) {
403  inductor->SetOnline(false);
404  auto data = inductor->GetPUElectricalData(m_powerSystemBase);
405  int n = static_cast<Bus*>(inductor->GetParentList()[0])->GetElectricalData().number;
406  m_yBus[n][n] -= std::complex<double>(0.0, -data.reactivePower);
407  }
408 
409  // Insert inductor (only disconnected inductors)
410  if(swData.swType[i] == SW_INSERT && !inductor->IsOnline() && inductor->GetParentList().size() == 1) {
411  if(inductor->SetOnline(true)) {
412  auto data = inductor->GetPUElectricalData(m_powerSystemBase);
413  int n = static_cast<Bus*>(inductor->GetParentList()[0])->GetElectricalData().number;
414  m_yBus[n][n] += std::complex<double>(0.0, -data.reactivePower);
415  }
416  }
417  }
418  }
419  }
420 }
421 
422 void Electromechanical::InsertSyncMachinesOnYBus()
423 {
424  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
425  SyncGenerator* generator = *it;
426  if(generator->IsOnline()) {
427  auto data = generator->GetElectricalData();
428  int n = static_cast<Bus*>(generator->GetParentList()[0])->GetElectricalData().number;
429  m_yBus[n][n] += GetSyncMachineAdmittance(generator);
430  }
431  }
432 }
433 
434 bool Electromechanical::EventTrigger(double eventTime, double currentTime)
435 {
436  return (((eventTime - m_timeStep) < currentTime) && (eventTime >= currentTime));
437 }
438 
439 std::complex<double> Electromechanical::GetSyncMachineAdmittance(SyncGenerator* generator)
440 {
441  auto data = generator->GetElectricalData();
442  double k = 1.0; // Power base change factor.
443  if(data.useMachineBase) {
444  double oldBase = generator->GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
445  k = m_powerSystemBase / oldBase;
446  }
447 
448  double ra = data.armResistance * k;
449  auto smModelData = GetSyncMachineModelData(generator);
450  double xd = smModelData.xd;
451  double xq = smModelData.xq;
452  double xdq = 0.5 * (xd + xq);
453  return (std::complex<double>(ra, -xdq) / std::complex<double>(ra * ra + xd * xq, 0.0));
454 }
455 
456 bool Electromechanical::InitializeDynamicElements()
457 {
458  // Buses
459  for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) {
460  Bus* bus = *it;
461  auto data = bus->GetElectricalData();
462  data.stabVoltageVector.clear();
463  bus->SetElectricalData(data);
464  }
465  // Loads
466  for(auto it = m_loadList.begin(), itEnd = m_loadList.end(); it != itEnd; ++it) {
467  Load* load = *it;
468  auto dataPU = load->GetPUElectricalData(m_powerSystemBase);
469  auto data = load->GetElectricalData();
470 
471  double activePower = dataPU.activePower;
472  double reactivePower = dataPU.reactivePower;
473 
474  if(load) data.voltage = static_cast<Bus*>(load->GetParentList()[0])->GetElectricalData().voltage;
475  data.v0 = std::abs(data.voltage);
476  data.y0 = std::complex<double>(activePower, -reactivePower) / (data.v0 * data.v0);
477 
478  if(data.loadType == CONST_IMPEDANCE) {
479  std::complex<double> s0 = std::complex<double>(activePower, -reactivePower) * (data.v0 * data.v0);
480  activePower = s0.real();
481  reactivePower = -s0.imag();
482  }
483 
484  data.pz0 = (data.constImpedanceActive / 100.0) * activePower;
485  data.pi0 = (data.constCurrentActive / 100.0) * activePower;
486  data.pp0 = (data.constPowerActive / 100.0) * activePower;
487 
488  data.qz0 = (data.constImpedanceReactive / 100.0) * reactivePower;
489  data.qi0 = (data.constCurrentReactive / 100.0) * reactivePower;
490  data.qp0 = (data.constPowerReactive / 100.0) * reactivePower;
491 
492  data.voltageVector.clear();
493  data.electricalPowerVector.clear();
494 
495  if(load->IsOnline())
496  data.electricalPower = std::complex<double>(activePower, reactivePower);
497  else {
498  data.electricalPower = std::complex<double>(0.0, 0.0);
499  data.voltage = std::complex<double>(0.0, 0.0);
500  }
501 
502  load->SetElectricalData(data);
503  }
504  // Synchronous generators
505  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
506  SyncGenerator* syncGenerator = *it;
507  auto dataPU = syncGenerator->GetPUElectricalData(m_powerSystemBase);
508  auto data = syncGenerator->GetElectricalData();
509  if(syncGenerator->IsOnline()) {
510  double k = 1.0; // Power base change factor.
511  if(data.useMachineBase) {
512  double oldBase = syncGenerator->GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
513  k = m_powerSystemBase / oldBase;
514  }
515  data.terminalVoltage = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().voltage;
516 
517  std::complex<double> conjS(dataPU.activePower, -dataPU.reactivePower);
518  std::complex<double> vt = data.terminalVoltage;
519  std::complex<double> ia = conjS / std::conj(vt);
520 
521  double xd = data.syncXd * k;
522  double xq = data.syncXq * k;
523  double ra = data.armResistance * k;
524 
525  if(data.model == Machines::SM_MODEL_1) {
526  xq = data.transXd * k;
527  xd = xq;
528  } else if(data.syncXq == 0.0)
529  xq = data.syncXd * k;
530 
531  double sd = 1.0;
532  double sq = 1.0;
533  double satF = 1.0;
534  double xp = data.potierReactance * k;
535  bool hasSaturation = false;
536  if(data.satFactor != 0.0) { // Have saturation.
537  satF = (data.satFactor - 1.2) / std::pow(1.2, 7);
538  if(xp == 0.0) xp = 0.8 * (data.transXd * k);
539  hasSaturation = true;
540  }
541 
542  // Initialize state variables
543  std::complex<double> eq0 = vt + std::complex<double>(ra, xq) * ia;
544  double delta = std::arg(eq0);
545 
546  double id0, iq0, vd0, vq0;
547  ABCtoDQ0(ia, delta, id0, iq0);
548  ABCtoDQ0(vt, delta, vd0, vq0);
549 
550  // Initialize saturation
551  double xqs = xq;
552  double xds = xd;
553  if(hasSaturation) {
554  double oldDelta = 0;
555  bool exit = false;
556  int numIt = 0;
557  while(!exit) {
558  oldDelta = delta;
559  ABCtoDQ0(ia, delta, id0, iq0);
560  ABCtoDQ0(vt, delta, vd0, vq0);
561 
562  // Direct-axis Potier voltage.
563  double epd = vd0 + ra * id0 + xp * iq0;
564 
565  sq = 1.0 + satF * (xq / xd) * std::pow(epd, 6);
566  xqs = (xq - xp) / sq + xp;
567  eq0 = data.terminalVoltage + std::complex<double>(ra, xqs) * ia;
568  delta = std::arg(eq0);
569  if(std::abs(delta - oldDelta) < m_saturationTolerance) {
570  exit = true;
571  } else if(numIt >= m_maxIterations) {
572  m_errorMsg = _("Error on initializate the saturation values of \"") + data.name + _("\".");
573  return false;
574  }
575  numIt++;
576  }
577  // Quadrature-axis Potier voltage.
578  double epq = vq0 + ra * iq0 - xp * id0;
579  sd = 1.0 + satF * std::pow(epq, 6);
580  xds = (xd - xp) / sd + xp;
581  }
582 
583  double ef0 = vq0 + ra * iq0 - xds * id0;
584 
585  data.initialFieldVoltage = ef0 * sd;
586  data.fieldVoltage = data.initialFieldVoltage;
587  data.pm = std::real((data.terminalVoltage * std::conj(ia)) + (std::abs(ia) * std::abs(ia) * ra));
588  data.speed = 2.0 * M_PI * m_systemFreq;
589  data.delta = delta;
590  data.pe = data.pm;
591  data.electricalPower = std::complex<double>(dataPU.activePower, dataPU.reactivePower);
592  data.sd = sd;
593  data.sq = sq;
594  data.id = id0;
595  data.iq = iq0;
596 
597  // Variables to extrapolate.
598  data.oldIq = iq0;
599  data.oldId = id0;
600  data.oldPe = data.pe;
601  data.oldSd = sd;
602  data.oldSq = sq;
603 
604  switch(data.model) {
605  case Machines::SM_MODEL_1: {
606  data.tranEq = std::abs(eq0);
607 
608  data.tranEd = 0.0;
609  data.subEq = 0.0;
610  data.subEd = 0.0;
611  } break;
612  case Machines::SM_MODEL_2: {
613  double tranXd = data.transXd * k;
614 
615  data.tranEq = ef0 + (xd - tranXd) * (id0 / sd);
616  data.tranEd = 0.0;
617  data.subEd = 0.0;
618  data.subEq = 0.0;
619  } break;
620  case Machines::SM_MODEL_3: {
621  double tranXd = data.transXd * k;
622  double tranXq = data.transXq * k;
623  if(tranXq == 0.0) tranXq = tranXd;
624 
625  data.tranEq = ef0 + (xd - tranXd) * (id0 / sd);
626  data.tranEd = -(xq - tranXq) * (iq0 / sq);
627 
628  data.subEd = 0.0;
629  data.subEq = 0.0;
630  } break;
631  case Machines::SM_MODEL_4: {
632  double tranXd = data.transXd * k;
633  double subXd = data.subXd * k;
634  double subXq = data.subXq * k;
635  if(subXd == 0.0) subXd = subXq;
636  if(subXq == 0.0) subXq = subXd;
637 
638  data.tranEq = ef0 + (xd - tranXd) * (id0 / sd);
639  data.tranEd = 0.0;
640  data.subEq = data.tranEq + (tranXd - subXd) * (id0 / sd);
641  data.subEd = -(xq - subXq) * (iq0 / sq);
642  } break;
643  case Machines::SM_MODEL_5: {
644  double tranXd = data.transXd * k;
645  double tranXq = data.transXq * k;
646  double subXd = data.subXd * k;
647  double subXq = data.subXq * k;
648  if(subXd == 0.0) subXd = subXq;
649  if(subXq == 0.0) subXq = subXd;
650 
651  data.tranEq = ef0 + (xd - tranXd) * (id0 / sd);
652  data.tranEd = -(xq - tranXq) * (iq0 / sq);
653  data.subEq = data.tranEq + (tranXd - subXd) * (id0 / sd);
654  data.subEd = data.tranEd - (tranXq - subXq) * (iq0 / sq);
655  } break;
656  default:
657  break;
658  }
659 
660  // Initialize controllers
661  if(data.useAVR) {
662  if(data.avrSolver) delete data.avrSolver;
663  data.avrSolver =
664  new ControlElementSolver(data.avr, m_timeStep * m_ctrlTimeStepMultiplier, m_tolerance, m_parent);
665  data.avrSolver->SetTerminalVoltage(std::abs(data.terminalVoltage));
666  data.avrSolver->SetInitialTerminalVoltage(std::abs(data.terminalVoltage));
667  data.avrSolver->SetActivePower(dataPU.activePower);
668  data.avrSolver->SetReactivePower(dataPU.reactivePower);
669  data.avrSolver->SetVelocity(data.speed);
670  data.avrSolver->SetInitialVelocity(data.speed);
671  data.avrSolver->InitializeValues(false);
672  if(!data.avrSolver->IsOK()) {
673  m_errorMsg = _("Error on initializate the AVR of \"") + data.name + wxT("\".\n") +
674  data.avrSolver->GetErrorMessage();
675  syncGenerator->SetElectricalData(data);
676  return false;
677  }
678  }
679  if(data.useSpeedGovernor) {
680  if(data.speedGovSolver) delete data.speedGovSolver;
681  data.speedGovSolver = new ControlElementSolver(data.speedGov, m_timeStep * m_ctrlTimeStepMultiplier,
682  m_tolerance, m_parent);
683  data.speedGovSolver->SetActivePower(dataPU.activePower);
684  data.speedGovSolver->SetReactivePower(dataPU.reactivePower);
685  data.speedGovSolver->SetVelocity(data.speed);
686  data.speedGovSolver->SetInitialVelocity(data.speed);
687  data.speedGovSolver->SetInitialMecPower(data.pm);
688  data.speedGovSolver->InitializeValues(false);
689  if(!data.speedGovSolver->IsOK()) {
690  m_errorMsg = _("Error on initializate the speed governor of \"") + data.name + wxT("\".\n") +
691  data.speedGovSolver->GetErrorMessage();
692  syncGenerator->SetElectricalData(data);
693  return false;
694  }
695  }
696  } else {
697  // Initialize open circuit machine.
698  }
699  // Reset plot data
700  data.terminalVoltageVector.clear();
701  data.electricalPowerVector.clear();
702  data.mechanicalPowerVector.clear();
703  data.freqVector.clear();
704  data.fieldVoltageVector.clear();
705  data.deltaVector.clear();
706 
707  syncGenerator->SetElectricalData(data);
708  }
709  CalculateReferenceSpeed();
710  return true;
711 }
712 
713 bool Electromechanical::CalculateInjectedCurrents()
714 {
715  // Reset injected currents vector
716  for(unsigned int i = 0; i < m_iBus.size(); ++i) m_iBus[i] = std::complex<double>(0.0, 0.0);
717 
718  // Synchronous machines
719  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
720  SyncGenerator* syncGenerator = *it;
721  auto data = syncGenerator->GetElectricalData();
722  if(syncGenerator->IsOnline()) {
723  double k = 1.0; // Power base change factor.
724  if(data.useMachineBase) {
725  double oldBase = syncGenerator->GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
726  k = m_powerSystemBase / oldBase;
727  }
728 
729  double ra = data.armResistance * k;
730  double xp = data.potierReactance * k;
731  if(xp == 0.0) xp = 0.8 * data.transXd * k;
732 
733  int n = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().number;
734  std::complex<double> e = std::complex<double>(0.0, 0.0);
735  std::complex<double> v = m_vBus[n];
736  std::complex<double> iInj = m_iBus[n];
737 
738  auto smModelData = GetSyncMachineModelData(syncGenerator);
739  DQ0toABC(smModelData.ed, smModelData.eq, data.delta, e);
740  double xd = smModelData.xd;
741  double xq = smModelData.xq;
742 
743  double sd = data.sd;
744  double sq = data.sq;
745  double id, iq;
746 
747  // Calculate the saturation effect
748  if(data.satFactor != 0.0) {
749  if(!CalculateSyncMachineSaturation(syncGenerator, id, iq, sd, sq, false, k)) return false;
750  }
751 
752  double xdq, xds, xqs, xdqs;
753  xdq = 0.5 * (xd + xq);
754  xds = (xd - xp) / sd + xp;
755  xqs = (xq - xp) / sq + xp;
756  xdqs = 0.5 * (xds + xqs);
757 
758  std::complex<double> y0 = std::complex<double>(ra, -xdq) / std::complex<double>(ra * ra + xd * xq, 0.0);
759  std::complex<double> iUnadjusted = y0 * v;
760 
761  // [Ref] Arrillaga, J.; Arnold, C. P.. "Computer Modelling of Electrical Power Systems". Pg. 225-226
762  // [Ref] Dommell, H. W.; Sato, N.. "Fast transient stability solutions". IEEE Transactions on Power
763  // Apparatus and Systems, PAS-91 (4), 1643-1650
764  std::complex<double> iSaliency = std::complex<double>(0.0, -((0.5 * (xqs - xds)) / (ra * ra + xds * xqs))) *
765  (std::conj(e) - std::conj(v));
766  iSaliency = iSaliency * std::cos(2.0 * data.delta) +
767  iSaliency * std::complex<double>(0.0, std::sin(2.0 * data.delta));
768 
769  // [Ref] Arrillaga, J.; Arnold, C. P.; Computer Modelling of Electrical Power Systems. Pg. 258-259
770  std::complex<double> y0s = std::complex<double>(ra, -xdqs) / std::complex<double>(ra * ra + xds * xqs, 0.0);
771  std::complex<double> iSaturation = y0s * (e - v);
772 
773  iInj = iUnadjusted + iSaliency + iSaturation;
774 
775  m_iBus[n] += iInj;
776 
777  // Remove the current flowing through y0 (i.e. iUnadjusted in this case, y0 is inserted in admittance
778  // matrix) to calculate the electrical power.
779  std::complex<double> iMachine = iInj - iUnadjusted;
780  data.electricalPower = v * std::conj(iMachine);
781 
782  ABCtoDQ0(iMachine, data.delta, id, iq);
783 
784  data.id = id;
785  data.iq = iq;
786  data.sd = sd;
787  data.sq = sq;
788  } else {
789  data.electricalPower = std::complex<double>(0.0, 0.0);
790  }
791 
792  syncGenerator->SetElectricalData(data);
793  }
794 
795  // Loads
796  for(auto it = m_loadList.begin(), itEnd = m_loadList.end(); it != itEnd; ++it) {
797  Load* load = *it;
798  auto data = load->GetElectricalData();
799 
800  if(load->IsOnline()) {
801  int n = static_cast<Bus*>(load->GetParentList()[0])->GetElectricalData().number;
802  data.voltage = m_vBus[n];
803  double vAbs = std::abs(data.voltage);
804 
805  double pz, pi, pp, qz, qi, qp;
806  pz = data.pz0 * std::pow(vAbs / data.v0, 2);
807  pi = data.pi0 * (vAbs / data.v0);
808  pp = data.pp0;
809  qz = data.qz0 * std::pow(vAbs / data.v0, 2);
810  qi = data.qi0 * (vAbs / data.v0);
811  qp = data.qp0;
812 
813  // If voltage value is low, set the ZIP load to constant impedance.
814  if(vAbs < data.constCurrentUV) {
815  pi = data.pi0 * (data.constCurrentUV / data.v0) * std::pow(vAbs / data.constCurrentUV, 2);
816  qi = data.qi0 * (data.constCurrentUV / data.v0) * std::pow(vAbs / data.constCurrentUV, 2);
817  }
818  if(vAbs < data.constPowerUV) {
819  pp *= std::pow(vAbs / data.constPowerUV, 2);
820  qp *= std::pow(vAbs / data.constPowerUV, 2);
821  }
822 
823  double activePower = pz + pi + pp;
824  double reactivePower = qz + qi + qp;
825 
826  std::complex<double> newY = std::complex<double>(activePower, -reactivePower) / (vAbs * vAbs);
827  m_iBus[n] += (data.y0 - newY) * data.voltage;
828 
829  data.electricalPower = std::complex<double>(activePower, reactivePower);
830  } else {
831  data.voltage = std::complex<double>(0.0, 0.0);
832  data.electricalPower = std::complex<double>(0.0, 0.0);
833  }
834 
835  load->SetElectricalData(data);
836  }
837  return true;
838 }
839 
840 void Electromechanical::CalculateIntegrationConstants(SyncGenerator* syncGenerator, double id, double iq, double k)
841 {
842  CalculateReferenceSpeed();
843  auto data = syncGenerator->GetElectricalData();
844 
845  double syncXd, syncXq, transXd, transXq, subXd, subXq;
846  syncXd = data.syncXd * k;
847  syncXq = data.syncXq * k;
848  transXd = data.transXd * k;
849  transXq = data.transXq * k;
850  subXd = data.subXd * k;
851  subXq = data.subXq * k;
852 
853  if(syncXq == 0.0) syncXq = syncXd;
854  if(transXq == 0.0) transXq = transXd;
855  if(subXd == 0.0) subXd = subXq;
856  if(subXq == 0.0) subXq = subXd;
857 
858  double transTd0, transTq0, subTd0, subTq0;
859  transTd0 = data.transTd0;
860  transTq0 = data.transTq0;
861  subTd0 = data.subTd0;
862  subTq0 = data.subTq0;
863 
864  if(subTd0 == 0.0) subTd0 = subTq0;
865  if(subTq0 == 0.0) subTq0 = subTd0;
866 
867  // Speed
868  data.icSpeed.m = m_timeStep / ((4.0f * data.inertia / m_refSpeed) / k + m_timeStep * data.damping * k);
869  data.icSpeed.c = (1.0f - 2.0f * data.icSpeed.m * data.damping * k) * data.speed +
870  data.icSpeed.m * (data.pm - data.pe + 2.0f * m_refSpeed * data.damping * k);
871 
872  // Delta
873  data.icDelta.m = 0.5f * m_timeStep;
874  data.icDelta.c = data.delta + data.icDelta.m * (data.speed - 2.0f * m_refSpeed);
875 
876  // Eq'
877  if(data.model == Machines::SM_MODEL_2 || data.model == Machines::SM_MODEL_3 || data.model == Machines::SM_MODEL_4 ||
878  data.model == Machines::SM_MODEL_5) {
879  data.icTranEq.m = m_timeStep / (2.0f * transTd0 + m_timeStep);
880  data.icTranEq.c = (1.0 - data.icTranEq.m * (1.0 + data.sd)) * data.tranEq +
881  data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id);
882  }
883 
884  // Ed'
885  if(data.model == Machines::SM_MODEL_3 || data.model == Machines::SM_MODEL_4 || data.model == Machines::SM_MODEL_5) {
886  data.icTranEd.m = m_timeStep / (2.0f * transTq0 + m_timeStep);
887  data.icTranEd.c =
888  (1.0 - data.icTranEd.m * (1.0 + data.sq)) * data.tranEd - data.icTranEd.m * (syncXq - transXq) * iq;
889  }
890 
891  // Eq''
892  if(data.model == Machines::SM_MODEL_4 || data.model == Machines::SM_MODEL_5) {
893  data.icSubEq.m = m_timeStep / (2.0f * subTd0 + m_timeStep);
894  data.icSubEq.c = (1.0 - data.icSubEq.m * (1.0 + data.sd)) * data.subEq +
895  data.icSubEq.m * (data.sd * data.tranEq + (transXd - subXd) * id);
896  }
897  // Ed''
898  if(data.model == Machines::SM_MODEL_4) {
899  data.icSubEd.m = m_timeStep / (2.0f * subTq0 + m_timeStep);
900  data.icSubEd.c =
901  (1.0f - data.icSubEd.m * (1.0 + data.sq)) * data.subEd - data.icSubEd.m * (syncXq - subXq) * iq;
902  }
903  if(data.model == Machines::SM_MODEL_5) {
904  data.icSubEd.m = m_timeStep / (2.0f * subTq0 + m_timeStep);
905  data.icSubEd.c = (1.0f - data.icSubEd.m * (1.0 + data.sq)) * data.subEd +
906  data.icSubEd.m * (data.sq * data.tranEd - (transXq - subXq) * iq);
907  }
908 
909  syncGenerator->SetElectricalData(data);
910 }
911 
912 bool Electromechanical::SolveSynchronousMachines()
913 {
914  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
915  SyncGenerator* syncGenerator = *it;
916  auto data = syncGenerator->GetElectricalData();
917 
918  if(syncGenerator->IsOnline()) {
919  double id, iq, pe, sd, sq;
920  pe = data.pe;
921  id = data.id;
922  iq = data.iq;
923  sd = data.sd;
924  sq = data.sq;
925 
926  double k = 1.0; // Power base change factor.
927  if(data.useMachineBase) {
928  double oldBase = syncGenerator->GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
929  k = m_powerSystemBase / oldBase;
930  }
931 
932  // Calculate integration constants.
933  CalculateIntegrationConstants(syncGenerator, id, iq, k);
934 
935  if(!CalculateSyncMachineNonIntVariables(syncGenerator, id, iq, sd, sq, pe, k)) return false;
936  // Extrapolate nonintegrable variables.
937  id = 2.0 * id - data.oldId;
938  iq = 2.0 * iq - data.oldIq;
939  pe = 2.0 * pe - data.oldPe;
940  sd = 2.0 * sd - data.oldSd;
941  sq = 2.0 * sq - data.oldSq;
942 
943  CalculateSyncMachineIntVariables(syncGenerator, id, iq, sd, sq, pe, k);
944  } else {
945  CalculateIntegrationConstants(syncGenerator, 0.0f, 0.0f);
946  }
947  }
948 
949  double error = 1.0;
950  int iterations = 0;
951  while(error > m_tolerance) {
952  error = 0.0;
953 
954  // Calculate the injected currents.
955  if(!CalculateInjectedCurrents()) return false;
956 
957  // Calculate the buses voltages.
958  m_vBus = LUEvaluate(m_yBusU, m_yBusL, m_iBus);
959 
960  // Solve machine equations.
961  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
962  SyncGenerator* syncGenerator = *it;
963 
964  auto data = syncGenerator->GetElectricalData();
965 
966  double id = data.id;
967  double iq = data.iq;
968  double pe = data.pe;
969  double sd = data.sd;
970  double sq = data.sq;
971 
972  // Power base change factor.
973  double k = 1.0;
974  if(data.useMachineBase) {
975  double oldBase = syncGenerator->GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
976  k = m_powerSystemBase / oldBase;
977  }
978 
979  // Calculate id, iq, dq, sd
980  if(!CalculateSyncMachineNonIntVariables(syncGenerator, id, iq, sd, sq, pe, k)) return false;
981 
982  double genError = CalculateSyncMachineIntVariables(syncGenerator, id, iq, sd, sq, pe, k);
983 
984  if(genError > error) error = genError;
985  }
986 
987  ++iterations;
988 
989  if(iterations > m_maxIterations) {
990  m_errorMsg = _("Impossible to solve the synchronous generators.\nCheck the system parameters and/or "
991  "decrease the time step.");
992  return false;
993  }
994  }
995 
996  // Solve controllers.
997  int ctrlRatio = static_cast<int>(1 / m_ctrlTimeStepMultiplier);
998  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
999  SyncGenerator* syncGenerator = *it;
1000  auto data = syncGenerator->GetElectricalData();
1001  if(data.useAVR && data.avrSolver) {
1002  data.avrSolver->SetTerminalVoltage(std::abs(data.terminalVoltage));
1003  data.avrSolver->SetDeltaActivePower(data.electricalPower.real() - data.avrSolver->GetActivePower());
1004  data.avrSolver->SetActivePower(data.electricalPower.real());
1005  data.avrSolver->SetReactivePower(data.electricalPower.imag());
1006  data.avrSolver->SetDeltaVelocity(data.speed - data.avrSolver->GetVelocity());
1007  data.avrSolver->SetVelocity(data.speed);
1008 
1009  for(int i = 0; i < ctrlRatio; ++i) data.avrSolver->SolveNextStep();
1010 
1011  data.fieldVoltage = data.initialFieldVoltage + data.avrSolver->GetFieldVoltage();
1012  }
1013 
1014  if(data.useSpeedGovernor && data.speedGovSolver) {
1015  data.speedGovSolver->SetVelocity(data.speed);
1016  data.speedGovSolver->SetActivePower(data.electricalPower.real());
1017  data.speedGovSolver->SetReactivePower(data.electricalPower.imag());
1018 
1019  for(int i = 0; i < ctrlRatio; ++i) data.speedGovSolver->SolveNextStep();
1020 
1021  data.pm = data.speedGovSolver->GetMechanicalPower();
1022  }
1023  syncGenerator->SetElectricalData(data);
1024  }
1025 
1026  return true;
1027 }
1028 
1029 void Electromechanical::SaveData()
1030 {
1031  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
1032  SyncGenerator* syncGenerator = *it;
1033  auto data = syncGenerator->GetElectricalData();
1034  if(data.plotSyncMachine) {
1035  data.terminalVoltageVector.push_back(data.terminalVoltage);
1036  data.electricalPowerVector.push_back(data.electricalPower);
1037  data.mechanicalPowerVector.push_back(data.pm);
1038  data.freqVector.push_back(data.speed / (2.0f * M_PI));
1039  data.fieldVoltageVector.push_back(data.fieldVoltage);
1040  data.deltaVector.push_back(wxRadToDeg(data.delta));
1041  syncGenerator->SetElectricalData(data);
1042  }
1043  }
1044  for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) {
1045  Bus* bus = *it;
1046  auto data = bus->GetElectricalData();
1047  if(data.plotBus) {
1048  data.stabVoltageVector.push_back(m_vBus[data.number]);
1049  bus->SetElectricalData(data);
1050  }
1051  }
1052  for(auto it = m_loadList.begin(), itEnd = m_loadList.end(); it != itEnd; ++it) {
1053  Load* load = *it;
1054  auto data = load->GetElectricalData();
1055  if(data.plotLoad) {
1056  data.voltageVector.push_back(data.voltage);
1057  data.electricalPowerVector.push_back(data.electricalPower);
1058  load->SetElectricalData(data);
1059  }
1060  }
1061 }
1062 
1063 void Electromechanical::SetSyncMachinesModel()
1064 {
1065  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
1066  SyncGenerator* syncGenerator = *it;
1067  auto data = syncGenerator->GetElectricalData();
1068  data.model = GetMachineModel(syncGenerator);
1069  syncGenerator->SetElectricalData(data);
1070  }
1071 }
1072 
1073 bool Electromechanical::CalculateSyncMachineNonIntVariables(SyncGenerator* syncGenerator,
1074  double& id,
1075  double& iq,
1076  double& sd,
1077  double& sq,
1078  double& pe,
1079  double k)
1080 {
1081  auto data = syncGenerator->GetElectricalData();
1082  int n = static_cast<Bus*>(syncGenerator->GetParentList()[0])->GetElectricalData().number;
1083 
1084  if(syncGenerator->IsOnline()) {
1085  data.terminalVoltage = m_vBus[n];
1086  }
1087 
1088  double vd, vq;
1089  ABCtoDQ0(data.terminalVoltage, data.delta, vd, vq);
1090 
1091  if(data.satFactor != 0.0) {
1092  if(!CalculateSyncMachineSaturation(syncGenerator, id, iq, sd, sq, true, k)) return false;
1093  data.sd = sd;
1094  data.sq = sq;
1095  data.oldSd = sd;
1096  data.oldSq = sq;
1097  }
1098 
1099  if(syncGenerator->IsOnline()) {
1100  pe = id * vd + iq * vq + (id * id + iq * iq) * data.armResistance * k;
1101  } else {
1102  pe = id = iq = 0.0f;
1103  }
1104  data.pe = pe;
1105  data.id = id;
1106  data.iq = iq;
1107  data.oldPe = pe;
1108  data.oldId = id;
1109  data.oldIq = iq;
1110  syncGenerator->SetElectricalData(data);
1111 
1112  return true;
1113 }
1114 
1115 double Electromechanical::CalculateSyncMachineIntVariables(SyncGenerator* syncGenerator,
1116  double id,
1117  double iq,
1118  double sd,
1119  double sq,
1120  double pe,
1121  double k)
1122 {
1123  double error = 0.0;
1124  auto data = syncGenerator->GetElectricalData();
1125 
1126  // Mechanical differential equations.
1127  double w = data.icSpeed.c + data.icSpeed.m * (data.pm - pe);
1128  error = std::max(error, std::abs(data.speed - w) / m_refSpeed);
1129 
1130  double delta = data.icDelta.c + data.icDelta.m * w;
1131  error = std::max(error, std::abs(data.delta - delta));
1132 
1133  data.speed = w;
1134  data.delta = delta;
1135 
1136  // Electrical differential equations
1137  switch(data.model) {
1138  case Machines::SM_MODEL_1: {
1139  // There is no differential equations.
1140  } break;
1141  case Machines::SM_MODEL_2: {
1142  double syncXd, transXd;
1143  syncXd = data.syncXd * k;
1144  transXd = data.transXd * k;
1145 
1146  double tranEq = (data.icTranEq.c + data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id)) /
1147  (1.0 + data.icTranEq.m * (sd - 1.0));
1148  error = std::max(error, std::abs(data.tranEq - tranEq));
1149 
1150  data.tranEq = tranEq;
1151  } break;
1152  case Machines::SM_MODEL_3: {
1153  double syncXd, syncXq, transXd, transXq;
1154  syncXd = data.syncXd * k;
1155  syncXq = data.syncXq * k;
1156  transXd = data.transXd * k;
1157  transXq = data.transXq * k;
1158  if(syncXq == 0.0) syncXq = syncXd;
1159  if(transXq == 0.0) transXq = transXd;
1160 
1161  double tranEq = (data.icTranEq.c + data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id)) /
1162  (1.0 + data.icTranEq.m * (sd - 1.0));
1163  error = std::max(error, std::abs(data.tranEq - tranEq));
1164 
1165  double tranEd =
1166  (data.icTranEd.c - data.icTranEd.m * (syncXq - transXq) * iq) / (1.0 + data.icTranEd.m * (sq - 1.0));
1167  error = std::max(error, std::abs(data.tranEd - tranEd));
1168 
1169  data.tranEq = tranEq;
1170  data.tranEd = tranEd;
1171 
1172  if(!syncGenerator->IsOnline()) {
1173  std::complex<double> e;
1174  DQ0toABC(data.tranEd, data.tranEq, data.delta, e);
1175  data.terminalVoltage = e;
1176  }
1177  } break;
1178  case Machines::SM_MODEL_4: {
1179  double syncXd, syncXq, transXd, subXd, subXq;
1180  syncXd = data.syncXd * k;
1181  syncXq = data.syncXq * k;
1182  transXd = data.transXd * k;
1183  subXd = data.subXd * k;
1184  subXq = data.subXq * k;
1185  if(syncXq == 0.0) syncXq = syncXd;
1186  if(subXd == 0.0) subXd = subXq;
1187  if(subXq == 0.0) subXq = subXd;
1188 
1189  double tranEq = (data.icTranEq.c + data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id)) /
1190  (1.0 + data.icTranEq.m * (sd - 1.0));
1191  error = std::max(error, std::abs(data.tranEq - tranEq));
1192 
1193  double subEq = (data.icSubEq.c + data.icSubEq.m * (sd * tranEq + (transXd - subXd) * id)) /
1194  (1.0 + data.icSubEq.m * (sd - 1.0));
1195  error = std::max(error, std::abs(data.subEq - subEq));
1196 
1197  double subEd =
1198  (data.icSubEd.c - data.icSubEd.m * ((syncXq - subXq) * iq)) / (1.0 + data.icSubEd.m * (sq - 1.0));
1199  error = std::max(error, std::abs(data.subEd - subEd));
1200 
1201  data.tranEq = tranEq;
1202  data.subEq = subEq;
1203  data.subEd = subEd;
1204  } break;
1205  case Machines::SM_MODEL_5: {
1206  double syncXd, syncXq, transXd, transXq, subXd, subXq;
1207  syncXd = data.syncXd * k;
1208  syncXq = data.syncXq * k;
1209  transXd = data.transXd * k;
1210  transXq = data.transXq * k;
1211  subXd = data.subXd * k;
1212  subXq = data.subXq * k;
1213  if(syncXq == 0.0) syncXq = syncXd;
1214  if(transXq == 0.0) transXq = transXd;
1215  if(subXd == 0.0) subXd = subXq;
1216  if(subXq == 0.0) subXq = subXd;
1217 
1218  double tranEq = (data.icTranEq.c + data.icTranEq.m * (data.fieldVoltage + (syncXd - transXd) * id)) /
1219  (1.0 + data.icTranEq.m * (sd - 1.0));
1220  error = std::max(error, std::abs(data.tranEq - tranEq));
1221 
1222  double tranEd =
1223  (data.icTranEd.c - data.icTranEd.m * (syncXq - transXq) * iq) / (1.0 + data.icTranEd.m * (sq - 1.0));
1224  error = std::max(error, std::abs(data.tranEd - tranEd));
1225 
1226  double subEq = (data.icSubEq.c + data.icSubEq.m * (sd * tranEq + (transXd - subXd) * id)) /
1227  (1.0 + data.icSubEq.m * (sd - 1.0));
1228  error = std::max(error, std::abs(data.subEq - subEq));
1229 
1230  double subEd = (data.icSubEd.c + data.icSubEd.m * (sq * tranEd - (transXq - subXq) * iq)) /
1231  (1.0 + data.icSubEd.m * (sq - 1.0));
1232  error = std::max(error, std::abs(data.subEd - subEd));
1233 
1234  data.tranEq = tranEq;
1235  data.tranEd = tranEd;
1236  data.subEq = subEq;
1237  data.subEd = subEd;
1238  } break;
1239  }
1240 
1241  syncGenerator->SetElectricalData(data);
1242  return error;
1243 }
1244 
1245 void Electromechanical::CalculateReferenceSpeed()
1246 {
1247  if(m_useCOI) {
1248  double sumHW = 0.0;
1249  double sumH = 0.0;
1250  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
1251  SyncGenerator* syncGenerator = *it;
1252  if(syncGenerator->IsOnline()) {
1253  auto data = syncGenerator->GetElectricalData();
1254  double k = 1.0; // Power base change factor.
1255  if(data.useMachineBase) {
1256  double oldBase = syncGenerator->GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
1257  k = m_powerSystemBase / oldBase;
1258  }
1259  sumH += data.inertia / k;
1260  sumHW += data.inertia * data.speed / k;
1261  }
1262  }
1263  m_refSpeed = sumHW / sumH;
1264  } else {
1265  m_refSpeed = 2.0 * M_PI * m_systemFreq;
1266  }
1267 }
1268 
1269 bool Electromechanical::CalculateSyncMachineSaturation(SyncGenerator* syncMachine,
1270  double& id,
1271  double& iq,
1272  double& sd,
1273  double& sq,
1274  bool updateCurrents,
1275  double k)
1276 {
1277  // [Ref] Arrillaga, J.; Arnold, C. P.. "Computer Modelling of Electrical Power Systems". Pg. 254-260
1278  auto data = syncMachine->GetElectricalData();
1279  auto smDataModel = GetSyncMachineModelData(syncMachine);
1280 
1281  int n = static_cast<Bus*>(syncMachine->GetParentList()[0])->GetElectricalData().number;
1282  if(syncMachine->IsOnline()) {
1283  data.terminalVoltage = m_vBus[n];
1284  }
1285  double idCalc = id;
1286  double iqCalc = iq;
1287  double sdCalc = sd;
1288  double sqCalc = sq;
1289 
1290  double vd, vq;
1291  ABCtoDQ0(data.terminalVoltage, data.delta, vd, vq);
1292  double deltaVd = smDataModel.ed - vd;
1293  double deltaVq = smDataModel.eq - vq;
1294 
1295  double ra = data.armResistance * k;
1296  double xd = smDataModel.xd;
1297  double xq = smDataModel.xq;
1298 
1299  double syncXd = data.syncXd * k;
1300  double syncXq = data.syncXq * k;
1301  if(data.model == Machines::SM_MODEL_1) {
1302  syncXq = data.transXd * k;
1303  syncXd = syncXq;
1304  } else if(data.syncXq == 0.0)
1305  syncXq = data.syncXd * k;
1306 
1307  double xp = data.potierReactance * k;
1308  if(xp == 0.0) xp = 0.8 * data.transXd * k;
1309  double satFacd = (data.satFactor - 1.2) / std::pow(1.2, 7);
1310  double satFacq = satFacd * (syncXq / syncXd);
1311 
1312  bool exit = false;
1313  int iterations = 0;
1314  while(!exit) {
1315  double oldSd = sdCalc;
1316  double oldSq = sqCalc;
1317 
1318  // Saturated reactances.
1319  double xds = (xd - xp) / sdCalc + xp;
1320  double xqs = (xq - xp) / sqCalc + xp;
1321  // dq currents.
1322  double den = 1.0 / (ra * ra + xds * xqs);
1323  iqCalc = den * (ra * deltaVq + xds * deltaVd);
1324  idCalc = den * (-xqs * deltaVq + ra * deltaVd);
1325  // Potier voltages
1326  double epq = vq + ra * iqCalc - xp * idCalc;
1327  double epd = vd + ra * idCalc + xp * iqCalc;
1328  // Saturation factors.
1329  // Gauss
1330  /*sdCalc = 1.0 + satFacd * std::pow(epq, 6);
1331  sqCalc = 1.0 + satFacq * std::pow(epd, 6);*/
1332 
1333  // Newton-raphson
1334  double f1 = 1.0 - sdCalc + satFacd * std::pow(epq, 6);
1335  double f2 = 1.0 - sqCalc + satFacq * std::pow(epd, 6);
1336  double dF1dSd =
1337  (6.0 * satFacd * std::pow(epq, 5) * xp * (xd - xp) * deltaVq) / ((sdCalc - 1.0) * xp + xd) - 1.0;
1338  double dF2dSq =
1339  (6.0 * satFacq * std::pow(epd, 5) * xp * (xq - xp) * deltaVd) / ((sqCalc - 1.0) * xp + xq) - 1.0;
1340 
1341  sdCalc = sdCalc - f1 / dF1dSd;
1342  sqCalc = sqCalc - f2 / dF2dSq;
1343 
1344  double error = std::abs(sdCalc - oldSd) + std::abs(sqCalc - oldSq);
1345  if(error < m_saturationTolerance) exit = true;
1346 
1347  iterations++;
1348  if((iterations >= m_maxIterations) & !exit) {
1349  m_errorMsg =
1350  _("It was not possible to solve the saturation of the synchronous machine \"") + data.name + wxT("\".");
1351  return false;
1352  }
1353  }
1354 
1355  sd = sdCalc;
1356  sq = sqCalc;
1357  if(updateCurrents) {
1358  id = idCalc;
1359  iq = iqCalc;
1360  }
1361  return true;
1362 }
1363 
1364 SyncMachineModelData Electromechanical::GetSyncMachineModelData(SyncGenerator* syncMachine)
1365 {
1366  SyncMachineModelData smModelData;
1367 
1368  auto data = syncMachine->GetElectricalData();
1369  double k = 1.0; // Power base change factor.
1370  if(data.useMachineBase) {
1371  double oldBase = syncMachine->GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
1372  k = m_powerSystemBase / oldBase;
1373  }
1374 
1375  switch(data.model) {
1376  case Machines::SM_MODEL_1: {
1377  smModelData.ed = data.tranEd;
1378  smModelData.eq = data.tranEq;
1379  smModelData.xq = data.transXd * k;
1380  smModelData.xd = smModelData.xq;
1381  } break;
1382  case Machines::SM_MODEL_2: {
1383  smModelData.ed = data.tranEd;
1384  smModelData.eq = data.tranEq;
1385  smModelData.xd = data.transXd * k;
1386  smModelData.xq = data.transXq * k;
1387  if(smModelData.xq == 0.0) {
1388  smModelData.xq = data.syncXq * k;
1389  if(smModelData.xq == 0.0) {
1390  smModelData.xq = data.syncXd * k;
1391  }
1392  }
1393  } break;
1394  case Machines::SM_MODEL_3: {
1395  smModelData.ed = data.tranEd;
1396  smModelData.eq = data.tranEq;
1397  smModelData.xd = data.transXd * k;
1398  smModelData.xq = data.transXq * k;
1399  if(smModelData.xq == 0.0) smModelData.xq = smModelData.xd;
1400  } break;
1401  case Machines::SM_MODEL_4:
1402  case Machines::SM_MODEL_5: {
1403  smModelData.ed = data.subEd;
1404  smModelData.eq = data.subEq;
1405  smModelData.xd = data.subXd * k;
1406  smModelData.xq = data.subXq * k;
1407  if(smModelData.xd == 0.0) smModelData.xd = smModelData.xq;
1408  if(smModelData.xq == 0.0) smModelData.xq = smModelData.xd;
1409  } break;
1410  }
1411  return smModelData;
1412 }
std::vector< double > swTime
Definition: PowerElement.h:95
-
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
-
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
- - -
bool SetOnline(bool online=true)
Set if the element is online or offline.
Definition: Element.cpp:235
- -
Synchronous generator power element.
-
std::vector< SwitchingType > swType
Definition: PowerElement.h:94
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
- -
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
-
Switching data of power elements.
Definition: PowerElement.h:93
- -
Synchronous machine data for different models.
-
Power line element.
Definition: Line.h:59
-
Loas shunt power element.
Definition: Load.h:73
-
virtual bool GetYBus(std::vector< std::vector< std::complex< double > > > &yBus, double systemPowerBase, YBusSequence sequence=POSITIVE_SEQ, bool includeSyncMachines=false, bool allLoadsAsImpedances=false)
Get the admittance matrix from the list of elements (use GetElementsFromList first).
-
virtual SwitchingData GetSwitchingData()
Returns the switching data of the element.
Definition: PowerElement.h:182
- -
Shunt capactior power element.
Definition: Capacitor.h:38
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
Inductor shunt power element.
Definition: Inductor.h:38
- -
virtual void GetElementsFromList(std::vector< Element *> elementList)
Separate the power elements from a generic list.
- -
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_electromechanical_8h.html b/docs/doxygen/html/_electromechanical_8h.html index bf54f4c..f9506c3 100644 --- a/docs/doxygen/html/_electromechanical_8h.html +++ b/docs/doxygen/html/_electromechanical_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_electromechanical_8h.html','');});
Electromechanical.h File Reference
-
#include "ElectricCalculation.h"
+
#include "ElectricCalculation.h"
#include <wx/progdlg.h>
#include <wx/log.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_electromechanical_8h_source.html b/docs/doxygen/html/_electromechanical_8h_source.html deleted file mode 100644 index 2d741d0..0000000 --- a/docs/doxygen/html/_electromechanical_8h_source.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - -Project/Electromechanical.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  SyncMachineModelData
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Electromechanical.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ELECTROMECHANICAL_H
19 #define ELECTROMECHANICAL_H
20 
21 #include "ElectricCalculation.h"
22 
23 #include <wx/progdlg.h>
24 #include <wx/log.h>
25 
27 
35  double xd;
37  double xq;
39  double ed;
41  double eq;
42 };
43 
52 {
53  public:
54  Electromechanical(wxWindow* parent, std::vector<Element*> elementList, SimulationData data);
56 
57  bool RunStabilityCalculation();
58  wxString GetErrorMessage() const { return m_errorMsg; }
59  std::vector<double> GetTimeVector() const { return m_timeVector; }
60 
61  protected:
62  void SetEventTimeList();
63  bool HasEvent(double currentTime);
64  void SetEvent(double currentTime);
65  inline bool EventTrigger(double eventTime, double currentTime);
66 
67  // double GetPowerValue(double value, ElectricalUnit unit);
68 
69  void InsertSyncMachinesOnYBus();
70  std::complex<double> GetSyncMachineAdmittance(SyncGenerator* generator);
71  bool InitializeDynamicElements();
72  bool CalculateInjectedCurrents();
73  void CalculateIntegrationConstants(SyncGenerator* syncGenerator, double id, double iq, double k = 1.0);
74  bool SolveSynchronousMachines();
75  void SetSyncMachinesModel();
76  SyncMachineModelData GetSyncMachineModelData(SyncGenerator* syncMachine);
77  double CalculateSyncMachineIntVariables(SyncGenerator* syncGenerator,
78  double id,
79  double iq,
80  double sd,
81  double sq,
82  double pe,
83  double k = 1.0);
84  bool CalculateSyncMachineNonIntVariables(SyncGenerator* syncGenerator,
85  double& id,
86  double& iq,
87  double& sd,
88  double& sq,
89  double& pe,
90  double k = 1.0);
91  void CalculateReferenceSpeed();
92  bool CalculateSyncMachineSaturation(SyncGenerator* syncMachine,
93  double& id,
94  double& iq,
95  double& sd,
96  double& sq,
97  bool updateCurrents = true,
98  double k = 1.0);
99 
100  void SaveData();
101 
102  wxWindow* m_parent = NULL;
103  wxString m_errorMsg = _("Unknown error");
104 
105  double m_systemFreq = 60.0;
106  double m_refSpeed = 2.0 * M_PI * 60.0;
107  bool m_useCOI = false;
108 
109  std::vector<std::vector<std::complex<double> > > m_yBus;
110  std::vector<std::vector<std::complex<double> > > m_yBusU;
111  std::vector<std::vector<std::complex<double> > > m_yBusL;
112 
113  std::vector<std::complex<double> > m_vBus;
114  std::vector<std::complex<double> > m_iBus;
115 
116  double m_powerSystemBase = 100e6;
117  double m_simTime = 10.0;
118  double m_plotTime = 1e-2;
119  double m_timeStep = 1e-2;
120  double m_ctrlTimeStepMultiplier = 0.1;
121  double m_tolerance = 1e-8;
122  int m_maxIterations = 100;
123  double m_saturationTolerance = 1e-8;
124 
125  std::vector<double> m_eventTimeList;
126  std::vector<bool> m_eventOccurrenceList;
127 
128  std::vector<double> m_timeVector;
129 };
130 
131 #endif // ELECTROMECHANICAL_H
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
- - - -
Synchronous generator power element.
- - -
Synchronous machine data for different models.
-
Calculates the electromechanical transient based on disturbances (e.g. system fault).
- -
Base class of electric calculations, with general methods.
-
-
- - - - diff --git a/docs/doxygen/html/_element_8cpp_source.html b/docs/doxygen/html/_element_8cpp_source.html deleted file mode 100644 index f39b69d..0000000 --- a/docs/doxygen/html/_element_8cpp_source.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - -Project/Element.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Element.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Element.h"
19 #ifdef USING_WX_3_0_X
20 #include "DegreesAndRadians.h"
21 #endif
22 
23 Element::Element() { m_selectionColour.SetRGBA(0.0, 0.5, 1.0, 0.5); }
25 void Element::SetPosition(const wxPoint2DDouble position)
26 {
27  m_position = position;
28  m_rect =
29  wxRect2DDouble(m_position.m_x - m_width / 2.0 - m_borderSize, m_position.m_y - m_height / 2.0 - m_borderSize,
30  m_width + 2.0 * m_borderSize, m_height + 2.0 * m_borderSize);
31 }
32 
33 void Element::DrawCircle(wxPoint2DDouble position, double radius, int numSegments, GLenum mode) const
34 {
35  glBegin(mode);
36  for(int i = 0; i < numSegments; i++) {
37  double theta = 2.0 * 3.1415926 * double(i) / double(numSegments);
38  glVertex2f(radius * std::cos(theta) + position.m_x, radius * std::sin(theta) + position.m_y);
39  }
40  glEnd();
41 }
42 
43 void Element::DrawArc(wxPoint2DDouble position,
44  double radius,
45  double initAngle,
46  double finalAngle,
47  int numSegments,
48  GLenum mode) const
49 {
50  double initAngRad = wxDegToRad(initAngle);
51  double finalAngRad = wxDegToRad(finalAngle);
52  glBegin(mode);
53  for(int i = 0; i <= numSegments; i++) {
54  double theta = initAngRad + (finalAngRad - initAngRad) * double(i) / double(numSegments);
55  glVertex2f(radius * std::cos(theta) + position.m_x, radius * std::sin(theta) + position.m_y);
56  }
57  glEnd();
58 }
59 
60 void Element::DrawTriangle(std::vector<wxPoint2DDouble> points, GLenum mode) const
61 {
62  glBegin(mode);
63  for(int i = 0; i < 3; i++) {
64  glVertex2d(points[i].m_x, points[i].m_y);
65  }
66  glEnd();
67 }
68 
69 void Element::DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode) const
70 {
71  glBegin(mode); // TODO: GL_QUADS é obsoleto (OpenGL 3.0+), encontrar outra solução.
72  glVertex2d(position.m_x - width / 2.0, position.m_y - height / 2.0);
73  glVertex2d(position.m_x - width / 2.0, position.m_y + height / 2.0);
74  glVertex2d(position.m_x + width / 2.0, position.m_y + height / 2.0);
75  glVertex2d(position.m_x + width / 2.0, position.m_y - height / 2.0);
76  glEnd();
77 }
78 
79 void Element::DrawRectangle(wxPoint2DDouble* points, GLenum mode) const
80 {
81  glBegin(mode); // TODO: GL_QUADS é obsoleto (OpenGL 3.0+), encontrar outra solução.
82  glVertex2d(points[0].m_x, points[0].m_y);
83  glVertex2d(points[1].m_x, points[1].m_y);
84  glVertex2d(points[2].m_x, points[2].m_y);
85  glVertex2d(points[3].m_x, points[3].m_y);
86  glEnd();
87 }
88 
89 void Element::DrawLine(std::vector<wxPoint2DDouble> points, GLenum mode) const
90 {
91  glBegin(mode);
92  for(auto it = points.begin(); it != points.end(); ++it) {
93  glVertex2d((*it).m_x, (*it).m_y);
94  }
95  glEnd();
96 }
97 
98 void Element::DrawPickbox(wxPoint2DDouble position) const
99 {
100  glLineWidth(1.0);
101  glColor4d(1.0, 1.0, 1.0, 0.8);
102  DrawRectangle(position, 8.0, 8.0);
103  glColor4d(0.0, 0.0, 0.0, 1.0);
104  DrawRectangle(position, 8.0, 8.0, GL_LINE_LOOP);
105 }
106 
107 wxPoint2DDouble Element::RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees) const
108 {
109  double radAngle = angle;
110  if(degrees) radAngle = wxDegToRad(angle);
111  return wxPoint2DDouble(std::cos(radAngle) * (pointToRotate.m_x - m_position.m_x) -
112  std::sin(radAngle) * (pointToRotate.m_y - m_position.m_y) + m_position.m_x,
113  std::sin(radAngle) * (pointToRotate.m_x - m_position.m_x) +
114  std::cos(radAngle) * (pointToRotate.m_y - m_position.m_y) + m_position.m_y);
115 }
116 
117 void Element::StartMove(wxPoint2DDouble position)
118 {
119  this->m_moveStartPt = position;
120  this->m_movePos = m_position;
121 }
122 
123 void Element::Move(wxPoint2DDouble position) { SetPosition(m_movePos + position - m_moveStartPt); }
124 wxPoint2DDouble Element::WorldToScreen(wxPoint2DDouble translation, double scale, double offsetX, double offsetY) const
125 {
126  return wxPoint2DDouble(m_position.m_x + offsetX + translation.m_x, m_position.m_y + offsetY + translation.m_y) *
127  scale;
128 }
129 
130 wxPoint2DDouble Element::WorldToScreen(wxPoint2DDouble position,
131  wxPoint2DDouble translation,
132  double scale,
133  double offsetX,
134  double offsetY) const
135 {
136  return wxPoint2DDouble(position.m_x + offsetX + translation.m_x, position.m_y + offsetY + translation.m_y) * scale;
137 }
138 
139 void Element::DrawPoint(wxPoint2DDouble position, double size) const
140 {
141  glPointSize(size);
142  glBegin(GL_POINTS);
143  glVertex2d(position.m_x, position.m_y);
144  glEnd();
145 }
146 
147 bool Element::RotatedRectanglesIntersects(wxRect2DDouble rect1,
148  wxRect2DDouble rect2,
149  double angle1,
150  double angle2) const
151 {
152  wxPoint2DDouble rect1Corners[4] = {rect1.GetLeftTop(), rect1.GetLeftBottom(), rect1.GetRightBottom(),
153  rect1.GetRightTop()};
154  wxPoint2DDouble rect2Corners[4] = {rect2.GetLeftTop(), rect2.GetLeftBottom(), rect2.GetRightBottom(),
155  rect2.GetRightTop()};
156  wxPoint2DDouble rect1Center(rect1.m_x + rect1.m_width / 2.0, rect1.m_y + rect1.m_height / 2.0);
157  wxPoint2DDouble rect2Center(rect2.m_x + rect2.m_width / 2.0, rect2.m_y + rect2.m_height / 2.0);
158 
159  // Rotate the corners.
160  double radAngle1 = wxDegToRad(angle1);
161  double radAngle2 = wxDegToRad(angle2);
162 
163  for(int i = 0; i < 4; i++) {
164  rect1Corners[i] =
165  wxPoint2DDouble(std::cos(radAngle1) * (rect1Corners[i].m_x - rect1Center.m_x) -
166  std::sin(radAngle1) * (rect1Corners[i].m_y - rect1Center.m_y) + rect1Center.m_x,
167  std::sin(radAngle1) * (rect1Corners[i].m_x - rect1Center.m_x) +
168  std::cos(radAngle1) * (rect1Corners[i].m_y - rect1Center.m_y) + rect1Center.m_y);
169 
170  rect2Corners[i] =
171  wxPoint2DDouble(std::cos(radAngle2) * (rect2Corners[i].m_x - rect2Center.m_x) -
172  std::sin(radAngle2) * (rect2Corners[i].m_y - rect2Center.m_y) + rect2Center.m_x,
173  std::sin(radAngle2) * (rect2Corners[i].m_x - rect2Center.m_x) +
174  std::cos(radAngle2) * (rect2Corners[i].m_y - rect2Center.m_y) + rect2Center.m_y);
175  }
176 
177  //[Ref] http://www.gamedev.net/page/resources/_/technical/game-programming/2d-rotated-rectangle-collision-r2604
178 
179  // Find the rectangles axis to project
180  wxPoint2DDouble axis[4] = {rect1Corners[3] - rect1Corners[0], rect1Corners[3] - rect1Corners[2],
181  rect2Corners[3] - rect2Corners[0], rect2Corners[3] - rect2Corners[2]};
182 
183  // Calculate the projected points to each axis
184  wxPoint2DDouble rect1ProjPts[4][4]; // [axis][corner]
185  wxPoint2DDouble rect2ProjPts[4][4]; // [axis][corner]
186  for(int i = 0; i < 4; i++) {
187  double den = axis[i].m_x * axis[i].m_x + axis[i].m_y * axis[i].m_y;
188  for(int j = 0; j < 4; j++) {
189  double m_rectProj = (rect1Corners[j].m_x * axis[i].m_x + rect1Corners[j].m_y * axis[i].m_y) / den;
190  double rectProj = (rect2Corners[j].m_x * axis[i].m_x + rect2Corners[j].m_y * axis[i].m_y) / den;
191 
192  rect1ProjPts[i][j] = wxPoint2DDouble(m_rectProj * axis[i].m_x, m_rectProj * axis[i].m_y);
193  rect2ProjPts[i][j] = wxPoint2DDouble(rectProj * axis[i].m_x, rectProj * axis[i].m_y);
194  }
195  }
196 
197  // Calculate the scalar value to identify the max and min values on projections
198  double rect1Scalar[4][4]; //[axis][corner]
199  double rect2Scalar[4][4]; //[axis][corner]
200  for(int i = 0; i < 4; i++) {
201  for(int j = 0; j < 4; j++) {
202  rect1Scalar[i][j] = rect1ProjPts[i][j].m_x * axis[i].m_x + rect1ProjPts[i][j].m_y * axis[i].m_y;
203  rect2Scalar[i][j] = rect2ProjPts[i][j].m_x * axis[i].m_x + rect2ProjPts[i][j].m_y * axis[i].m_y;
204  }
205  }
206  // Identify the max and min scalar values
207  double rect1Min[4];
208  double rect1Max[4];
209  double rect2Min[4];
210  double rect2Max[4];
211 
212  for(int i = 0; i < 4; i++) {
213  rect1Max[i] = rect1Scalar[i][0];
214  rect2Max[i] = rect2Scalar[i][0];
215  rect1Min[i] = rect1Scalar[i][0];
216  rect2Min[i] = rect2Scalar[i][0];
217 
218  for(int j = 1; j < 4; j++) {
219  if(rect1Max[i] < rect1Scalar[i][j]) rect1Max[i] = rect1Scalar[i][j];
220  if(rect2Max[i] < rect2Scalar[i][j]) rect2Max[i] = rect2Scalar[i][j];
221 
222  if(rect1Min[i] > rect1Scalar[i][j]) rect1Min[i] = rect1Scalar[i][j];
223  if(rect2Min[i] > rect2Scalar[i][j]) rect2Min[i] = rect2Scalar[i][j];
224  }
225  }
226 
227  // Check if any segment don't overlap
228  for(int i = 0; i < 4; i++) {
229  if(!(rect2Min[i] <= rect1Max[i] && rect2Max[i] >= rect1Min[i])) return false;
230  }
231 
232  return true;
233 }
234 
235 bool Element::SetOnline(bool online)
236 {
237  // Check if any parent is null.
238  for(auto it = m_parentList.begin(); it != m_parentList.end(); it++) {
239  if(!(*it)) return false;
240  }
241  m_online = online;
242  return true;
243 }
244 
245 void Element::GeneralMenuItens(wxMenu& menu)
246 {
247  wxFileName exeFileName(wxStandardPaths::Get().GetExecutablePath());
248  wxString exePath = exeFileName.GetPath();
249 
250  wxMenuItem* clockItem = new wxMenuItem(&menu, ID_ROTATE_CLOCK, _("Rotate clockwise"));
251  clockItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\rotateClock16.png", wxPATH_WIN).GetPath()));
252  menu.Append(clockItem);
253 
254  wxMenuItem* counterClockItem = new wxMenuItem(&menu, ID_ROTATE_COUNTERCLOCK, _("Rotate counter-clockwise"));
255  counterClockItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\rotateCounterClock16.png", wxPATH_WIN).GetPath()));
256  menu.Append(counterClockItem);
257 
258  wxMenuItem* deleteItem = new wxMenuItem(&menu, ID_DELETE, _("Delete"));
259  deleteItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\delete16.png", wxPATH_WIN).GetPath()));
260  menu.Append(deleteItem);
261 }
262 
263 void Element::CalculateBoundaries(wxPoint2DDouble& leftUp, wxPoint2DDouble& rightBottom) const
264 {
265  // Check rect corners boundaries.
266 
267  // Get rectangle corners
268  wxPoint2DDouble rectCorner[4] = {m_rect.GetLeftTop(), m_rect.GetLeftBottom(), m_rect.GetRightBottom(),
269  m_rect.GetRightTop()};
270  // Rotate corners.
271  for(int i = 0; i < 4; ++i) {
272  rectCorner[i] = RotateAtPosition(rectCorner[i], m_angle);
273  }
274  leftUp = rectCorner[0];
275  rightBottom = rectCorner[0];
276  for(int i = 1; i < 4; ++i) {
277  if(rectCorner[i].m_x < leftUp.m_x) leftUp.m_x = rectCorner[i].m_x;
278  if(rectCorner[i].m_y < leftUp.m_y) leftUp.m_y = rectCorner[i].m_y;
279  if(rectCorner[i].m_x > rightBottom.m_x) rightBottom.m_x = rectCorner[i].m_x;
280  if(rectCorner[i].m_y > rightBottom.m_y) rightBottom.m_y = rectCorner[i].m_y;
281  }
282 
283  // Check points list boundaries.
284  for(int i = 0; i < (int)m_pointList.size(); i++) {
285  if(m_pointList[i].m_x < leftUp.m_x) leftUp.m_x = m_pointList[i].m_x;
286  if(m_pointList[i].m_y < leftUp.m_y) leftUp.m_y = m_pointList[i].m_y;
287  if(m_pointList[i].m_x > rightBottom.m_x) rightBottom.m_x = m_pointList[i].m_x;
288  if(m_pointList[i].m_y > rightBottom.m_y) rightBottom.m_y = m_pointList[i].m_y;
289  }
290 }
291 
292 bool Element::DoubleFromString(wxWindow* parent, wxString strValue, double& value, wxString errorMsg)
293 {
294  double dValue = 0.0;
295 
296  if(!strValue.ToDouble(&dValue)) {
297  wxMessageDialog msgDialog(parent, errorMsg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
298  msgDialog.ShowModal();
299  return false;
300  }
301 
302  value = dValue;
303  return true;
304 }
305 
306 bool Element::IntFromString(wxWindow* parent, wxString strValue, int& value, wxString errorMsg)
307 {
308  long int iValue = 0;
309 
310  if(!strValue.ToLong(&iValue)) {
311  wxMessageDialog msgDialog(parent, errorMsg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
312  msgDialog.ShowModal();
313  return false;
314  }
315 
316  value = iValue;
317  return true;
318 }
319 
320 wxString Element::StringFromDouble(double value, int minDecimal)
321 {
322  wxString str = wxString::FromCDouble(value, 13);
323  int cutNumber = 0;
324  int numDecimal = 0;
325  bool foundCut = false;
326  for(int i = (int)str.length() - 1; i >= 0; i--) {
327  if(str[i] != '0' && !foundCut) {
328  cutNumber = i;
329  foundCut = true;
330  }
331  if(str[i] == '.') {
332  numDecimal = i;
333  break;
334  }
335  }
336 
337  wxString formatedStr = "";
338  if(cutNumber - numDecimal > minDecimal)
339  formatedStr = wxString::FromDouble(value, cutNumber - numDecimal);
340  else
341  formatedStr = wxString::FromDouble(value, minDecimal);
342 
343  return formatedStr;
344 }
345 
346 void Element::ReplaceParent(Element* oldParent, Element* newParent)
347 {
348  for(int i = 0; i < (int)m_parentList.size(); i++) {
349  if(m_parentList[i] == oldParent) m_parentList[i] = newParent;
350  }
351 }
352 
353 void Element::AddChild(Element* child) { m_childList.push_back(child); }
355 {
356  for(auto it = m_childList.begin(); it != m_childList.end(); ++it) {
357  Element* element = *it;
358  if(element == child) m_childList.erase(it--);
359  }
360 }
361 
362 void Element::ReplaceChild(Element* oldChild, Element* newChild)
363 {
364  for(int i = 0; i < (int)m_childList.size(); i++) {
365  if(m_childList[i] == oldChild) m_childList[i] = newChild;
366  }
367 }
368 
369 void OpenGLColour::SetRGBA(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
370 {
371  rgba[0] = red;
372  rgba[1] = green;
373  rgba[2] = blue;
374  rgba[3] = alpha;
375 }
376 
377 OpenGLColour::OpenGLColour() { SetRGBA(1.0, 1.0, 1.0, 1.0); }
378 OpenGLColour::OpenGLColour(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
379 {
380  SetRGBA(red, green, blue, alpha);
381 }
382 
383 double Element::PointToLineDistance(wxPoint2DDouble point, int* segmentNumber) const
384 {
385  //[Ref] http://geomalgorithms.com/a02-_lines.html
386  double distance = 100.0; // Big initial distance.
387  wxPoint2DDouble p0 = point;
388 
389  for(int i = 1; i < (int)m_pointList.size() - 2; i++) {
390  double d = 0.0;
391 
392  wxPoint2DDouble p1 = m_pointList[i];
393  wxPoint2DDouble p2 = m_pointList[i + 1];
394 
395  wxPoint2DDouble v = p2 - p1;
396  wxPoint2DDouble w = p0 - p1;
397 
398  double c1 = w.m_x * v.m_x + w.m_y * v.m_y;
399  double c2 = v.m_x * v.m_x + v.m_y * v.m_y;
400 
401  if(c1 <= 0.0) {
402  d = std::sqrt(std::pow(p0.m_y - p1.m_y, 2) + std::pow(p0.m_x - p1.m_x, 2));
403  } else if(c2 <= c1) {
404  d = std::sqrt(std::pow(p0.m_y - p2.m_y, 2) + std::pow(p0.m_x - p2.m_x, 2));
405  } else {
406  d = std::abs((p2.m_y - p1.m_y) * p0.m_x - (p2.m_x - p1.m_x) * p0.m_y + p2.m_x * p1.m_y - p2.m_y * p1.m_x) /
407  std::sqrt(std::pow(p2.m_y - p1.m_y, 2) + std::pow(p2.m_x - p1.m_x, 2));
408  }
409  if(d < distance) {
410  distance = d;
411  if(segmentNumber) *segmentNumber = i;
412  }
413  }
414 
415  return distance;
416 }
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Element.cpp:123
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void DrawTriangle(std::vector< wxPoint2DDouble > points, GLenum mode=GL_TRIANGLES) const
Draw a triangle.
Definition: Element.cpp:60
-
virtual void DrawLine(std::vector< wxPoint2DDouble > points, GLenum mode=GL_LINE_STRIP) const
Draw line.
Definition: Element.cpp:89
-
virtual wxPoint2DDouble WorldToScreen(wxPoint2DDouble translation, double scale, double offsetX=0.0, double offsetY=0.0) const
Convert the element position to screen position.
Definition: Element.cpp:124
-
bool SetOnline(bool online=true)
Set if the element is online or offline.
Definition: Element.cpp:235
-
static bool DoubleFromString(wxWindow *parent, wxString strValue, double &value, wxString errorMsg)
Get a double value from a string. Show a error message if the conversion fail.
Definition: Element.cpp:292
- -
void SetRGBA(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
Set the colour in RGBA. The colour values must be between 0.0 and 1.0.
Definition: Element.cpp:369
-
virtual void RemoveChild(Element *child)
Remove a child from the list.
Definition: Element.cpp:354
-
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
-
virtual void CalculateBoundaries(wxPoint2DDouble &leftUp, wxPoint2DDouble &rightBottom) const
Calculate the element boundaries.
Definition: Element.cpp:263
-
virtual void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode=GL_QUADS) const
Draw rectangle.
Definition: Element.cpp:69
- -
virtual void GeneralMenuItens(wxMenu &menu)
Insert general itens to context menu.
Definition: Element.cpp:245
-
virtual void ReplaceChild(Element *oldChild, Element *newChild)
Replace a child from the list.
Definition: Element.cpp:362
-
static bool IntFromString(wxWindow *parent, wxString strValue, int &value, wxString errorMsg)
Convert a string to int. Show a error message if the conversion fail.
Definition: Element.cpp:306
-
OpenGLColour()
Default construnctor. Use SetRGBA(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)...
Definition: Element.cpp:377
-
void SetPosition(const wxPoint2DDouble position)
Set the element position and update the rectangle.
Definition: Element.cpp:25
- -
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
-
virtual void DrawPoint(wxPoint2DDouble position, double size) const
Draw a point.
Definition: Element.cpp:139
-
virtual void DrawPickbox(wxPoint2DDouble position) const
Draw pickbox.
Definition: Element.cpp:98
- -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
-
virtual void ReplaceParent(Element *oldParent, Element *newParent)
Replace a parent.
Definition: Element.cpp:346
-
virtual double PointToLineDistance(wxPoint2DDouble point, int *segmentNumber=NULL) const
Calculate the distance between a line (formed by point list) and a point.
Definition: Element.cpp:383
-
Element()
Constructor.
Definition: Element.cpp:23
-
virtual void DrawCircle(wxPoint2DDouble position, double radius, int numSegments, GLenum mode=GL_LINE_LOOP) const
Draw a circle.
Definition: Element.cpp:33
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Element.cpp:117
-
virtual ~Element()
Destructor.
Definition: Element.cpp:24
-
virtual bool RotatedRectanglesIntersects(wxRect2DDouble rect1, wxRect2DDouble rect2, double angle1, double angle2) const
Check if two roteted rectangles intersect.
Definition: Element.cpp:147
-
-
- - - - diff --git a/docs/doxygen/html/_element_8h.html b/docs/doxygen/html/_element_8h.html index 7fda9d3..2b49f42 100644 --- a/docs/doxygen/html/_element_8h.html +++ b/docs/doxygen/html/_element_8h.html @@ -99,9 +99,7 @@ $(document).ready(function(){initNavTree('_element_8h.html','');}); #include <wx/filename.h>
#include <GL/gl.h>
#include <complex>
- -

Go to the source code of this file.

- +
@@ -168,8 +166,6 @@ Enumerations

Classes

class  OpenGLColour
-

Definition at line 51 of file Element.h.

- @@ -202,8 +198,6 @@ Enumerations -

Definition at line 37 of file Element.h.

- diff --git a/docs/doxygen/html/_element_8h_source.html b/docs/doxygen/html/_element_8h_source.html deleted file mode 100644 index d71ef94..0000000 --- a/docs/doxygen/html/_element_8h_source.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - -Project/Element.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Element.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ELEMENT_H
19 #define ELEMENT_H
20 
21 #include <wx/msgdlg.h>
22 #include <wx/geometry.h>
23 #include <wx/cursor.h>
24 #include <wx/menu.h>
25 #include <wx/stdpaths.h>
26 #include <wx/filename.h>
27 #include <GL/gl.h>
28 
29 #include <complex>
30 
31 //#include <wx/log.h>
32 
37 enum PickboxID {
38  ID_PB_NONE = 0,
45 };
46 
58 };
59 
68 {
69  public:
73  OpenGLColour();
74 
82  OpenGLColour(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
83 
87  virtual ~OpenGLColour() {}
95  void SetRGBA(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
96 
101  const GLdouble* GetRGBA() const { return rgba; }
102  protected:
103  GLdouble rgba[4];
104 };
105 
113 class Element
114 {
115  public:
119  Element();
120 
124  virtual ~Element();
125 
130  void SetDragging(bool dragging = true) { m_dragging = dragging; }
135  void SetHeight(double height) { m_height = height; }
140  void SetPosition(const wxPoint2DDouble position);
141 
146  void SetSelected(bool selected = true) { m_selected = selected; }
151  void SetWidth(double width) { m_width = width; }
156  void SetAngle(double angle) { m_angle = angle; }
161  void ShowPickbox(bool showPickbox = true) { m_showPickbox = showPickbox; }
166  void SetBorderSize(double borderSize) { m_borderSize = borderSize; }
171  bool SetOnline(bool online = true);
172 
177  virtual void SetPointList(std::vector<wxPoint2DDouble> pointList) { m_pointList = pointList; }
182  wxRect2DDouble GetRect() const { return m_rect; }
187  wxPoint2DDouble GetPosition() const { return m_position; }
192  bool IsDragging() const { return m_dragging; }
197  double GetHeight() const { return m_height; }
202  bool IsSelected() const { return m_selected; }
207  double GetWidth() const { return m_width; }
212  double GetAngle() const { return m_angle; }
217  double GetRotationAngle() const { return m_rotationAngle; }
222  bool IsPickboxShown() const { return m_showPickbox; }
227  bool IsOnline() const { return m_online; }
232  virtual std::vector<wxPoint2DDouble> GetPointList() const { return m_pointList; }
240  virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return false; }
245  virtual void AddParent(Element* parent) { m_parentList.push_back(parent); }
250  virtual bool Contains(wxPoint2DDouble position) const = 0;
251 
256  virtual bool Intersects(wxRect2DDouble rect) const = 0;
257 
262  virtual Element* GetCopy() { return NULL; }
267  virtual void SetID(int id) { m_elementID = id; }
272  virtual int GetID() const { return m_elementID; }
277  virtual void AddChild(Element* child);
278 
283  virtual void RemoveChild(Element* child);
284 
290  virtual void ReplaceChild(Element* oldChild, Element* newChild);
291 
296  virtual wxString GetTipText() const { return wxEmptyString; }
302  virtual void Draw(wxPoint2DDouble translation, double scale) const {}
307  virtual void Rotate(bool clockwise = true) {}
313  virtual bool GetContextMenu(wxMenu& menu) { return false; }
318  virtual void AddPoint(wxPoint2DDouble point) {}
323  virtual void StartMove(wxPoint2DDouble position);
324 
330  virtual void Move(wxPoint2DDouble position);
331 
337  virtual void MoveNode(Element* parent, wxPoint2DDouble position) {}
343  virtual bool NodeContains(wxPoint2DDouble position) { return false; }
347  virtual void UpdateNodes() {}
354  virtual bool SetNodeParent(Element* parent) { return false; }
359  virtual void RemoveParent(Element* parent) {}
365  virtual void ReplaceParent(Element* oldParent, Element* newParent);
366 
372  virtual void RotateNode(Element* parent, bool clockwise = true) {}
379  virtual bool PickboxContains(wxPoint2DDouble position) { return false; }
384  virtual void MovePickbox(wxPoint2DDouble position) {}
389  virtual wxCursor GetBestPickboxCursor() const { return wxCURSOR_ARROW; }
393  virtual void ResetPickboxes() { m_activePickboxID = ID_PB_NONE; }
397  virtual void ResetNodes() { m_activeNodeID = 0; }
405  virtual wxPoint2DDouble WorldToScreen(wxPoint2DDouble translation,
406  double scale,
407  double offsetX = 0.0,
408  double offsetY = 0.0) const;
409 
418  virtual wxPoint2DDouble WorldToScreen(wxPoint2DDouble position,
419  wxPoint2DDouble translation,
420  double scale,
421  double offsetX = 0.0,
422  double offsetY = 0.0) const;
423 
431  virtual bool RotatedRectanglesIntersects(wxRect2DDouble rect1,
432  wxRect2DDouble rect2,
433  double angle1,
434  double angle2) const;
435 
443  virtual void DrawCircle(wxPoint2DDouble position, double radius, int numSegments, GLenum mode = GL_LINE_LOOP) const;
444  virtual void DrawArc(wxPoint2DDouble position,
445  double radius,
446  double initAngle,
447  double finalAngle,
448  int numSegments,
449  GLenum mode = GL_LINE_LOOP) const;
450 
458  virtual void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode = GL_QUADS) const;
459 
465  virtual void DrawRectangle(wxPoint2DDouble* points, GLenum mode = GL_QUADS) const;
466 
472  virtual void DrawTriangle(std::vector<wxPoint2DDouble> points, GLenum mode = GL_TRIANGLES) const;
473 
479  virtual void DrawPoint(wxPoint2DDouble position, double size) const;
480 
486  virtual void DrawLine(std::vector<wxPoint2DDouble> points, GLenum mode = GL_LINE_STRIP) const;
487 
492  virtual void DrawPickbox(wxPoint2DDouble position) const;
493 
500  virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees = true) const;
501 
506  virtual std::vector<Element*> GetParentList() const { return m_parentList; }
511  virtual std::vector<Element*> GetChildList() const { return m_childList; }
512  // virtual wxPoint2DDouble GetMoveStartPosition() const { return m_moveStartPt; }
513  // virtual wxPoint2DDouble GetMovePosition() const { return m_movePos; }
514 
520  virtual void CalculateBoundaries(wxPoint2DDouble& leftUp, wxPoint2DDouble& rightBottom) const;
521 
526  virtual void GeneralMenuItens(wxMenu& menu);
527 
534  virtual bool ShowForm(wxWindow* parent, Element* element) { return false; }
542  static bool DoubleFromString(wxWindow* parent, wxString strValue, double& value, wxString errorMsg);
543 
551  static bool IntFromString(wxWindow* parent, wxString strValue, int& value, wxString errorMsg);
552 
558  static wxString StringFromDouble(double value, int minDecimal = 1);
559 
566  virtual double PointToLineDistance(wxPoint2DDouble point, int* segmentNumber = NULL) const;
567 
568  protected:
569  int m_elementID = 0;
570  std::vector<Element*> m_parentList;
571  std::vector<Element*> m_childList;
572 
573  wxRect2DDouble m_rect;
574  wxPoint2DDouble m_position;
575  double m_width = 0.0;
576  double m_height = 0.0;
577  double m_angle = 0.0;
578  double m_borderSize = 2.0;
579  double m_rotationAngle = 45.0;
580  double m_switchSize = 10.0;
581 
582  std::vector<wxRect2DDouble> m_switchRect;
583 
584  bool m_selected = false;
585  bool m_dragging = false;
586  bool m_showPickbox = false;
587 
588  int m_activePickboxID = ID_PB_NONE;
589  int m_activeNodeID = 0;
590 
591  std::vector<wxPoint2DDouble> m_pointList;
592  std::vector<wxPoint2DDouble> m_movePts;
593 
594  wxPoint2DDouble m_moveStartPt;
595  wxPoint2DDouble m_movePos;
596 
597  bool m_online = true;
598 
599  OpenGLColour m_selectionColour;
600 };
601 
602 #endif // ELEMENT_H
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
void ShowPickbox(bool showPickbox=true)
Set if the pickbox is shown.
Definition: Element.h:161
-
virtual void AddPoint(wxPoint2DDouble point)
Add point to the list of points that connect the element to the bus.
Definition: Element.h:318
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
void SetSelected(bool selected=true)
Set element selection.
Definition: Element.h:146
-
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
-
void SetWidth(double width)
Set element width.
Definition: Element.h:151
-
virtual std::vector< Element * > GetChildList() const
Get the Child list.
Definition: Element.h:511
-
virtual void ResetPickboxes()
Remove the pickboxes.
Definition: Element.h:393
- -
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement...
Definition: Element.h:343
-
ContextMenuID
ID of contex menu itens.
Definition: Element.h:51
-
virtual bool PickboxContains(wxPoint2DDouble position)
Check if a pickbox contains a point. If contains the attributes related to pickbox movement will be c...
Definition: Element.h:379
-
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
Definition: Element.h:347
-
virtual void SetPointList(std::vector< wxPoint2DDouble > pointList)
Set the list of points that connect the element to the bus.
Definition: Element.h:177
- -
void SetRGBA(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
Set the colour in RGBA. The colour values must be between 0.0 and 1.0.
Definition: Element.cpp:369
-
virtual void MoveNode(Element *parent, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
Definition: Element.h:337
- -
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Element.h:240
- -
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Element.h:302
-
bool IsPickboxShown() const
Checks if the pickbox is shown.
Definition: Element.h:222
-
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
-
wxRect2DDouble GetRect() const
Get the element rectangle.
Definition: Element.h:182
-
OpenGLColour()
Default construnctor. Use SetRGBA(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)...
Definition: Element.cpp:377
-
void SetAngle(double angle)
Set element angle.
Definition: Element.h:156
-
double GetWidth() const
Get the element width.
Definition: Element.h:207
-
virtual wxString GetTipText() const
Get the tip text.
Definition: Element.h:296
-
virtual ~OpenGLColour()
Destructor.
Definition: Element.h:87
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Element.h:307
- - - -
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: Element.h:313
-
double GetHeight() const
Get the element height.
Definition: Element.h:197
-
virtual std::vector< wxPoint2DDouble > GetPointList() const
Get the list of points that connect the element to bus.
Definition: Element.h:232
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Element.h:534
-
virtual void AddParent(Element *parent)
Add a parent to the element.
Definition: Element.h:245
-
virtual void MovePickbox(wxPoint2DDouble position)
Move the pickbox.
Definition: Element.h:384
- - -
virtual wxCursor GetBestPickboxCursor() const
Get the best cursor to shown to the user when the mouse is above a pickbox.
Definition: Element.h:389
-
void SetBorderSize(double borderSize)
Set the size of the border (shown in selected elements).
Definition: Element.h:166
-
PickboxID
ID of the pickbox.
Definition: Element.h:37
-
bool IsSelected() const
Checks if the element is selected.
Definition: Element.h:202
-
Class to manage color of OpenGL.
Definition: Element.h:67
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Element.h:372
- - -
virtual void SetID(int id)
Set the element ID.
Definition: Element.h:267
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Element.h:354
-
virtual int GetID() const
Get the element ID.
Definition: Element.h:272
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Element.h:359
- -
bool IsDragging() const
Checks if the element is being dragged.
Definition: Element.h:192
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
virtual void ResetNodes()
Remove the active nodes.
Definition: Element.h:397
-
void SetDragging(bool dragging=true)
Set if the element are being dragged.
Definition: Element.h:130
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Element.h:262
-
double GetRotationAngle() const
Get the angle of rotation.
Definition: Element.h:217
-
void SetHeight(double height)
Set element height.
Definition: Element.h:135
- -
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
-
- - - - diff --git a/docs/doxygen/html/_element_data_object_8cpp_source.html b/docs/doxygen/html/_element_data_object_8cpp_source.html deleted file mode 100644 index 6551ee1..0000000 --- a/docs/doxygen/html/_element_data_object_8cpp_source.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - -Project/ElementDataObject.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElementDataObject.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ElementDataObject.h"
19 
20 ElementDataObject::ElementDataObject() : wxDataObjectSimple(wxDataFormat(wxT("PSPCopy")))
21 {
22  m_elementsLists = new ElementsLists();
23 }
24 
25 ElementDataObject::ElementDataObject(std::vector<Element*> elementList) : wxDataObjectSimple(wxDataFormat(wxT("PSPCopy")))
26 {
27  m_elementsLists = new ElementsLists();
28  if(elementList.size() > 0) {
29  // Separate buses (parents) from the rest of the elements (childs).
30  for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
31  Element* copy = (*it)->GetCopy();
32  if(copy) {
33  if(Bus* bus = dynamic_cast<Bus*>(copy))
34  m_elementsLists->parentList.push_back(bus);
35  else
36  m_elementsLists->elementList.push_back(copy);
37  }
38  }
39  }
40 }
41 
42 ElementDataObject::~ElementDataObject() {}
43 size_t ElementDataObject::GetDataSize() const
44 {
45  return sizeof(void*);
46  //return sizeof(*this);
47 }
48 
49 bool ElementDataObject::GetDataHere(void* buf) const
50 {
51  *(ElementsLists**)buf = m_elementsLists;
52  //buf = m_elementsLists;
53  return true;
54 }
55 
56 bool ElementDataObject::SetData(size_t len, const void* buf)
57 {
58  m_elementsLists = *(ElementsLists**)buf;
59  //m_elementsLists = const_cast<ElementsLists*>(static_cast<const ElementsLists*>(buf));
60  return true;
61 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
- -
virtual Element * GetCopy()
Get a the element copy.
Definition: Element.h:262
-
-
- - - - diff --git a/docs/doxygen/html/_element_data_object_8h.html b/docs/doxygen/html/_element_data_object_8h.html index 7c9b487..f686ac1 100644 --- a/docs/doxygen/html/_element_data_object_8h.html +++ b/docs/doxygen/html/_element_data_object_8h.html @@ -90,11 +90,9 @@ $(document).ready(function(){initNavTree('_element_data_object_8h.html','');});
ElementDataObject.h File Reference
-
#include "Workspace.h"
+
#include "Workspace.h"
#include <wx/dataobj.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_element_data_object_8h_source.html b/docs/doxygen/html/_element_data_object_8h_source.html deleted file mode 100644 index d709e22..0000000 --- a/docs/doxygen/html/_element_data_object_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/ElementDataObject.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  ElementsLists
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElementDataObject.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ELEMENTDATAOBJECT_H
19 #define ELEMENTDATAOBJECT_H
20 
21 #include "Workspace.h"
22 #include <wx/dataobj.h>
23 
24 struct ElementsLists {
25  std::vector<Element*> elementList;
26  std::vector<Bus*> parentList;
27 };
28 
36 class ElementDataObject : public wxDataObjectSimple
37 {
38  public:
40  ElementDataObject(std::vector<Element*> elementList);
42 
43  size_t GetDataSize() const override;
44  bool GetDataHere(void* buf) const override;
45  bool SetData(size_t len, const void* buf) override;
46 
47  ElementsLists* GetElementsLists() { return m_elementsLists; }
48  protected:
49  ElementsLists* m_elementsLists = NULL;
50 };
51 
52 #endif // ELEMENTDATAOBJECT_H
- -
Class to store the elements in the clipboard.
-
-
- - - - diff --git a/docs/doxygen/html/_element_form_8cpp_source.html b/docs/doxygen/html/_element_form_8cpp_source.html deleted file mode 100644 index f12ca04..0000000 --- a/docs/doxygen/html/_element_form_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/ElementForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElementForm.cpp
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: ElementForm.wxcp
4 // Do not modify this file by hand!
6 
7 #include "ElementForm.h"
8 
9 
10 // Declare the bitmap loading function
11 extern void wxC9EE9InitBitmapResources();
12 
13 static bool bBitmapLoaded = false;
14 
15 
16 BusFormBase::BusFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
17  : wxDialog(parent, id, title, pos, size, style)
18 {
19  if ( !bBitmapLoaded ) {
20  // We need to initialise the default bitmap handler
21  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
22  wxC9EE9InitBitmapResources();
23  bBitmapLoaded = true;
24  }
25 
26  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
27  this->SetSizer(boxSizerLvl1_1);
28 
29  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
30  m_notebook->SetName(wxT("m_notebook"));
31 
32  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
33 
34  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
35  m_notebook->AddPage(m_panelGeneral, _("General"), false);
36 
37  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
38  m_panelGeneral->SetSizer(boxSizerLvl2_1);
39 
40  m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
41 
42  boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
43 
44  m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
45  #if wxVERSION_NUMBER >= 3000
46  m_textCtrlName->SetHint(wxT(""));
47  #endif
48 
49  boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
50  m_textCtrlName->SetMinSize(wxSize(300,-1));
51 
52  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
53 
54  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
55 
56  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
57 
58  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
59 
60  m_staticTextNomVoltage = new wxStaticText(m_panelGeneral, wxID_ANY, _("Rated voltage"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
61 
62  boxSizerLvl4_1->Add(m_staticTextNomVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
63 
64  wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
65 
66  boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
67 
68  m_textCtrlNomVoltage = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
69  #if wxVERSION_NUMBER >= 3000
70  m_textCtrlNomVoltage->SetHint(wxT(""));
71  #endif
72 
73  boxSizerLvl5_1->Add(m_textCtrlNomVoltage, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
74 
75  wxArrayString m_choiceNomVoltageArr;
76  m_choiceNomVoltageArr.Add(wxT("V"));
77  m_choiceNomVoltageArr.Add(wxT("kV"));
78  m_choiceNomVoltage = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceNomVoltageArr, 0);
79  m_choiceNomVoltage->SetSelection(1);
80 
81  boxSizerLvl5_1->Add(m_choiceNomVoltage, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
82 
83  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
84 
85  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
86 
87  m_checkBoxCtrlVoltage = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Controlled voltage"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
88  m_checkBoxCtrlVoltage->SetValue(false);
89 
90  boxSizerLvl4_2->Add(m_checkBoxCtrlVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
91 
92  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
93 
94  boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
95 
96  m_textCtrlCtrlVoltage = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
97  #if wxVERSION_NUMBER >= 3000
98  m_textCtrlCtrlVoltage->SetHint(wxT(""));
99  #endif
100 
101  boxSizerLvl5_2->Add(m_textCtrlCtrlVoltage, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
102 
103  wxArrayString m_choiceCtrlVoltageArr;
104  m_choiceCtrlVoltageArr.Add(wxT("p.u."));
105  m_choiceCtrlVoltageArr.Add(wxT("kV"));
106  m_choiceCtrlVoltage = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceCtrlVoltageArr, 0);
107  m_choiceCtrlVoltage->SetSelection(0);
108 
109  boxSizerLvl5_2->Add(m_choiceCtrlVoltage, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
110 
111  m_checkBoxSlackBus = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Slack Bus"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
112  m_checkBoxSlackBus->SetValue(false);
113 
114  boxSizerLvl2_1->Add(m_checkBoxSlackBus, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
115 
116  m_panelFault = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
117  m_notebook->AddPage(m_panelFault, _("Fault"), false);
118 
119  wxBoxSizer* boxSizerLvl2_2 = new wxBoxSizer(wxVERTICAL);
120  m_panelFault->SetSizer(boxSizerLvl2_2);
121 
122  m_checkBoxFault = new wxCheckBox(m_panelFault, wxID_ANY, _("Insert fault in the bus"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
123  m_checkBoxFault->SetValue(false);
124 
125  boxSizerLvl2_2->Add(m_checkBoxFault, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
126 
127  wxGridSizer* gridSizerLvl3_2 = new wxGridSizer(0, 2, 0, 0);
128 
129  boxSizerLvl2_2->Add(gridSizerLvl3_2, 0, wxEXPAND, WXC_FROM_DIP(5));
130 
131  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
132 
133  gridSizerLvl3_2->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
134 
135  m_staticTextFaultType = new wxStaticText(m_panelFault, wxID_ANY, _("Fault type"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
136 
137  boxSizerLvl4_3->Add(m_staticTextFaultType, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
138 
139  wxArrayString m_choiceFaultTypeArr;
140  m_choiceFaultTypeArr.Add(wxT("Three-phase"));
141  m_choiceFaultTypeArr.Add(wxT("Line-to-line"));
142  m_choiceFaultTypeArr.Add(wxT("Double line-to-ground"));
143  m_choiceFaultTypeArr.Add(wxT("Line-to-ground"));
144  m_choiceFaultType = new wxChoice(m_panelFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), m_choiceFaultTypeArr, 0);
145  m_choiceFaultType->SetSelection(0);
146 
147  boxSizerLvl4_3->Add(m_choiceFaultType, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
148 
149  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
150 
151  gridSizerLvl3_2->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5));
152 
153  m_staticTextFaultPlace = new wxStaticText(m_panelFault, wxID_ANY, _("Fault place"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
154 
155  boxSizerLvl4_4->Add(m_staticTextFaultPlace, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
156 
157  wxArrayString m_choiceFaultPlaceArr;
158  m_choiceFaultPlaceArr.Add(wxT("Line A"));
159  m_choiceFaultPlaceArr.Add(wxT("Line B"));
160  m_choiceFaultPlaceArr.Add(wxT("Line C"));
161  m_choiceFaultPlace = new wxChoice(m_panelFault, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), m_choiceFaultPlaceArr, 0);
162  m_choiceFaultPlace->SetSelection(0);
163 
164  boxSizerLvl4_4->Add(m_choiceFaultPlace, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
165 
166  wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxVERTICAL);
167 
168  gridSizerLvl3_2->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5));
169 
170  m_staticTextFaultResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Fault resistance (R)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
171 
172  boxSizerLvl4_5->Add(m_staticTextFaultResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
173 
174  wxBoxSizer* boxSizerLvl5_3 = new wxBoxSizer(wxHORIZONTAL);
175 
176  boxSizerLvl4_5->Add(boxSizerLvl5_3, 0, wxEXPAND, WXC_FROM_DIP(5));
177 
178  m_textCtrlFaultResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
179  #if wxVERSION_NUMBER >= 3000
180  m_textCtrlFaultResistance->SetHint(wxT(""));
181  #endif
182 
183  boxSizerLvl5_3->Add(m_textCtrlFaultResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
184 
185  m_staticTextPU_1 = new wxStaticText(m_panelFault, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
186 
187  boxSizerLvl5_3->Add(m_staticTextPU_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
188 
189  wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxVERTICAL);
190 
191  gridSizerLvl3_2->Add(boxSizerLvl4_6, 0, wxEXPAND, WXC_FROM_DIP(5));
192 
193  m_staticTextReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Fault reactance (Xl)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
194 
195  boxSizerLvl4_6->Add(m_staticTextReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
196 
197  wxBoxSizer* boxSizerLvl5_4 = new wxBoxSizer(wxHORIZONTAL);
198 
199  boxSizerLvl4_6->Add(boxSizerLvl5_4, 0, wxEXPAND, WXC_FROM_DIP(5));
200 
201  m_textCtrlFaultReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
202  #if wxVERSION_NUMBER >= 3000
203  m_textCtrlFaultReactance->SetHint(wxT(""));
204  #endif
205 
206  boxSizerLvl5_4->Add(m_textCtrlFaultReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
207 
208  m_staticTextPU_2 = new wxStaticText(m_panelFault, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
209 
210  boxSizerLvl5_4->Add(m_staticTextPU_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
211 
212  m_panelStability = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
213  m_notebook->AddPage(m_panelStability, _("Stability"), false);
214 
215  wxBoxSizer* boxSizerLvl2_3 = new wxBoxSizer(wxVERTICAL);
216  m_panelStability->SetSizer(boxSizerLvl2_3);
217 
218  m_checkBoxPlotData = new wxCheckBox(m_panelStability, wxID_ANY, _("Plot bus data"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
219  m_checkBoxPlotData->SetValue(false);
220 
221  boxSizerLvl2_3->Add(m_checkBoxPlotData, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
222 
223  m_checkBoxStabFault = new wxCheckBox(m_panelStability, wxID_ANY, _("Insert fault in the bus"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
224  m_checkBoxStabFault->SetValue(false);
225 
226  boxSizerLvl2_3->Add(m_checkBoxStabFault, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
227 
228  wxGridSizer* gridSizerLvl3_3 = new wxGridSizer(0, 2, 0, 0);
229 
230  boxSizerLvl2_3->Add(gridSizerLvl3_3, 0, wxEXPAND, WXC_FROM_DIP(5));
231 
232  wxBoxSizer* boxSizerLvl4_7 = new wxBoxSizer(wxVERTICAL);
233 
234  gridSizerLvl3_3->Add(boxSizerLvl4_7, 0, wxEXPAND, WXC_FROM_DIP(5));
235 
236  m_staticTextStabFaultTime = new wxStaticText(m_panelStability, wxID_ANY, _("Time"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
237 
238  boxSizerLvl4_7->Add(m_staticTextStabFaultTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
239 
240  wxBoxSizer* boxSizerLvl5_5 = new wxBoxSizer(wxHORIZONTAL);
241 
242  boxSizerLvl4_7->Add(boxSizerLvl5_5, 0, wxEXPAND, WXC_FROM_DIP(5));
243 
244  m_textCtrlStabFaultTime = new wxTextCtrl(m_panelStability, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
245  #if wxVERSION_NUMBER >= 3000
246  m_textCtrlStabFaultTime->SetHint(wxT(""));
247  #endif
248 
249  boxSizerLvl5_5->Add(m_textCtrlStabFaultTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
250 
251  m_staticTextS_1 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
252 
253  boxSizerLvl5_5->Add(m_staticTextS_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
254 
255  wxBoxSizer* boxSizerLvl4_8 = new wxBoxSizer(wxVERTICAL);
256 
257  gridSizerLvl3_3->Add(boxSizerLvl4_8, 0, wxEXPAND, WXC_FROM_DIP(5));
258 
259  m_staticTextStabFaultLength = new wxStaticText(m_panelStability, wxID_ANY, _("Fault length"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
260 
261  boxSizerLvl4_8->Add(m_staticTextStabFaultLength, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
262 
263  wxBoxSizer* boxSizerLvl5_6 = new wxBoxSizer(wxHORIZONTAL);
264 
265  boxSizerLvl4_8->Add(boxSizerLvl5_6, 0, wxEXPAND, WXC_FROM_DIP(5));
266 
267  m_textCtrlStabFaultLength = new wxTextCtrl(m_panelStability, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
268  #if wxVERSION_NUMBER >= 3000
269  m_textCtrlStabFaultLength->SetHint(wxT(""));
270  #endif
271 
272  boxSizerLvl5_6->Add(m_textCtrlStabFaultLength, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
273 
274  m_staticTextS_2 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
275 
276  boxSizerLvl5_6->Add(m_staticTextS_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
277 
278  wxBoxSizer* boxSizerLvl4_9 = new wxBoxSizer(wxVERTICAL);
279 
280  gridSizerLvl3_3->Add(boxSizerLvl4_9, 0, wxEXPAND, WXC_FROM_DIP(5));
281 
282  m_staticTextStabFaultResistance = new wxStaticText(m_panelStability, wxID_ANY, _("Fault resistance (R)"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
283 
284  boxSizerLvl4_9->Add(m_staticTextStabFaultResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
285 
286  wxBoxSizer* boxSizerLvl5_7 = new wxBoxSizer(wxHORIZONTAL);
287 
288  boxSizerLvl4_9->Add(boxSizerLvl5_7, 0, wxEXPAND, WXC_FROM_DIP(5));
289 
290  m_textCtrlStabFaultResistance = new wxTextCtrl(m_panelStability, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
291  #if wxVERSION_NUMBER >= 3000
292  m_textCtrlStabFaultResistance->SetHint(wxT(""));
293  #endif
294 
295  boxSizerLvl5_7->Add(m_textCtrlStabFaultResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
296 
297  m_staticTextPU_3 = new wxStaticText(m_panelStability, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
298 
299  boxSizerLvl5_7->Add(m_staticTextPU_3, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
300 
301  wxBoxSizer* boxSizerLvl4_10 = new wxBoxSizer(wxVERTICAL);
302 
303  gridSizerLvl3_3->Add(boxSizerLvl4_10, 0, wxEXPAND, WXC_FROM_DIP(5));
304 
305  m_staticTextStabFaultReactance = new wxStaticText(m_panelStability, wxID_ANY, _("Fault reactance (Xl)"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
306 
307  boxSizerLvl4_10->Add(m_staticTextStabFaultReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
308 
309  wxBoxSizer* boxSizerLvl5_8 = new wxBoxSizer(wxHORIZONTAL);
310 
311  boxSizerLvl4_10->Add(boxSizerLvl5_8, 0, wxEXPAND, WXC_FROM_DIP(5));
312 
313  m_textCtrlStabFaultReactance = new wxTextCtrl(m_panelStability, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
314  #if wxVERSION_NUMBER >= 3000
315  m_textCtrlStabFaultReactance->SetHint(wxT(""));
316  #endif
317 
318  boxSizerLvl5_8->Add(m_textCtrlStabFaultReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
319 
320  m_staticTextPU_4 = new wxStaticText(m_panelStability, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
321 
322  boxSizerLvl5_8->Add(m_staticTextPU_4, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
323 
324  wxBoxSizer* boxSizerOkCancel = new wxBoxSizer(wxHORIZONTAL);
325 
326  boxSizerLvl1_1->Add(boxSizerOkCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
327 
328  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
329 
330  boxSizerOkCancel->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
331 
332  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
333 
334  boxSizerOkCancel->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
335 
336 
337  #if wxVERSION_NUMBER >= 2900
338  if(!wxPersistenceManager::Get().Find(m_notebook)){
339  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
340  } else {
341  wxPersistenceManager::Get().Restore(m_notebook);
342  }
343  #endif
344 
345  SetName(wxT("BusFormBase"));
346  SetSize(-1,-1);
347  if (GetSizer()) {
348  GetSizer()->Fit(this);
349  }
350  if(GetParent()) {
351  CentreOnParent(wxVERTICAL);
352  } else {
353  CentreOnScreen(wxVERTICAL);
354  }
355 #if wxVERSION_NUMBER >= 2900
356  if(!wxPersistenceManager::Get().Find(this)) {
357  wxPersistenceManager::Get().RegisterAndRestore(this);
358  } else {
359  wxPersistenceManager::Get().Restore(this);
360  }
361 #endif
362  // Connect events
363  m_choiceNomVoltage->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BusFormBase::OnNominalVoltageChoice), NULL, this);
364  m_checkBoxCtrlVoltage->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnControlledVoltageClick), NULL, this);
365  m_checkBoxFault->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnInsertFaultClick), NULL, this);
366  m_choiceFaultType->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BusFormBase::OnFaultTypeChoice), NULL, this);
367  m_checkBoxStabFault->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnInsertStabFaultClick), NULL, this);
368  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BusFormBase::OnButtonOKClick), NULL, this);
369  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BusFormBase::OnButtonCancelClick), NULL, this);
370 
371 }
372 
373 BusFormBase::~BusFormBase()
374 {
375  m_choiceNomVoltage->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BusFormBase::OnNominalVoltageChoice), NULL, this);
376  m_checkBoxCtrlVoltage->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnControlledVoltageClick), NULL, this);
377  m_checkBoxFault->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnInsertFaultClick), NULL, this);
378  m_choiceFaultType->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(BusFormBase::OnFaultTypeChoice), NULL, this);
379  m_checkBoxStabFault->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(BusFormBase::OnInsertStabFaultClick), NULL, this);
380  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BusFormBase::OnButtonOKClick), NULL, this);
381  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BusFormBase::OnButtonCancelClick), NULL, this);
382 
383 }
384 
385 SyncMachineFormBase::SyncMachineFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
386  : wxDialog(parent, id, title, pos, size, style)
387 {
388  if ( !bBitmapLoaded ) {
389  // We need to initialise the default bitmap handler
390  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
391  wxC9EE9InitBitmapResources();
392  bBitmapLoaded = true;
393  }
394 
395  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
396  this->SetSizer(boxSizerLvl1_1);
397 
398  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
399  m_notebook->SetName(wxT("m_notebook"));
400 
401  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
402 
403  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
404  m_notebook->AddPage(m_panelGeneral, _("General"), false);
405 
406  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
407  m_panelGeneral->SetSizer(boxSizerLvl2_1);
408 
409  m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
410 
411  boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
412 
413  m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
414  #if wxVERSION_NUMBER >= 3000
415  m_textCtrlName->SetHint(wxT(""));
416  #endif
417 
418  boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
419  m_textCtrlName->SetMinSize(wxSize(300,-1));
420 
421  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
422 
423  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
424 
425  wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxVERTICAL);
426 
427  gridSizerLvl3_1->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5));
428 
429  m_staticTextNominalPower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Rated power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
430 
431  boxSizerLvl4_5->Add(m_staticTextNominalPower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
432 
433  wxBoxSizer* boxSizerLvl5_5 = new wxBoxSizer(wxHORIZONTAL);
434 
435  boxSizerLvl4_5->Add(boxSizerLvl5_5, 0, wxEXPAND, WXC_FROM_DIP(5));
436 
437  m_textCtrlnominalPower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
438  #if wxVERSION_NUMBER >= 3000
439  m_textCtrlnominalPower->SetHint(wxT(""));
440  #endif
441 
442  boxSizerLvl5_5->Add(m_textCtrlnominalPower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
443 
444  wxArrayString m_choiceNominalPowerArr;
445  m_choiceNominalPowerArr.Add(wxT("VA"));
446  m_choiceNominalPowerArr.Add(wxT("kVA"));
447  m_choiceNominalPowerArr.Add(wxT("MVA"));
448  m_choiceNominalPower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceNominalPowerArr, 0);
449  m_choiceNominalPower->SetSelection(2);
450 
451  boxSizerLvl5_5->Add(m_choiceNominalPower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
452 
453  gridSizerLvl3_1->Add(0, 0, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
454 
455  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
456 
457  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
458 
459  m_staticTextActivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Active power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
460 
461  boxSizerLvl4_1->Add(m_staticTextActivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
462 
463  wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
464 
465  boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
466 
467  m_textCtrlActivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
468  #if wxVERSION_NUMBER >= 3000
469  m_textCtrlActivePower->SetHint(wxT(""));
470  #endif
471 
472  boxSizerLvl5_1->Add(m_textCtrlActivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
473 
474  wxArrayString m_choiceActivePowerArr;
475  m_choiceActivePowerArr.Add(wxT("p.u."));
476  m_choiceActivePowerArr.Add(wxT("W"));
477  m_choiceActivePowerArr.Add(wxT("kW"));
478  m_choiceActivePowerArr.Add(wxT("MW"));
479  m_choiceActivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceActivePowerArr, 0);
480  m_choiceActivePower->SetSelection(3);
481 
482  boxSizerLvl5_1->Add(m_choiceActivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
483 
484  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
485 
486  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
487 
488  m_staticTextReactivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Reactive power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
489 
490  boxSizerLvl4_2->Add(m_staticTextReactivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
491 
492  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
493 
494  boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
495 
496  m_textCtrlReactivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
497  #if wxVERSION_NUMBER >= 3000
498  m_textCtrlReactivePower->SetHint(wxT(""));
499  #endif
500 
501  boxSizerLvl5_2->Add(m_textCtrlReactivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
502 
503  wxArrayString m_choiceReactivePowerArr;
504  m_choiceReactivePowerArr.Add(wxT("p.u."));
505  m_choiceReactivePowerArr.Add(wxT("VAr"));
506  m_choiceReactivePowerArr.Add(wxT("kVAr"));
507  m_choiceReactivePowerArr.Add(wxT("MVAr"));
508  m_choiceReactivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceReactivePowerArr, 0);
509  m_choiceReactivePower->SetSelection(3);
510 
511  boxSizerLvl5_2->Add(m_choiceReactivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
512 
513  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
514 
515  gridSizerLvl3_1->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
516 
517  m_checkBoxMaxReactive = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Max reactive power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
518  m_checkBoxMaxReactive->SetValue(false);
519 
520  boxSizerLvl4_3->Add(m_checkBoxMaxReactive, 0, wxALL, WXC_FROM_DIP(5));
521 
522  wxBoxSizer* boxSizerLvl5_3 = new wxBoxSizer(wxHORIZONTAL);
523 
524  boxSizerLvl4_3->Add(boxSizerLvl5_3, 0, wxEXPAND, WXC_FROM_DIP(5));
525 
526  m_textCtrlMaxRectivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
527  #if wxVERSION_NUMBER >= 3000
528  m_textCtrlMaxRectivePower->SetHint(wxT(""));
529  #endif
530 
531  boxSizerLvl5_3->Add(m_textCtrlMaxRectivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
532 
533  wxArrayString m_choiceMaxRectivePowerArr;
534  m_choiceMaxRectivePowerArr.Add(wxT("p.u."));
535  m_choiceMaxRectivePowerArr.Add(wxT("VAr"));
536  m_choiceMaxRectivePowerArr.Add(wxT("kVAr"));
537  m_choiceMaxRectivePowerArr.Add(wxT("MVAr"));
538  m_choiceMaxRectivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceMaxRectivePowerArr, 0);
539  m_choiceMaxRectivePower->SetSelection(3);
540 
541  boxSizerLvl5_3->Add(m_choiceMaxRectivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
542 
543  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
544 
545  gridSizerLvl3_1->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5));
546 
547  m_checkBoxMinReactive = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Min reactive power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
548  m_checkBoxMinReactive->SetValue(false);
549 
550  boxSizerLvl4_4->Add(m_checkBoxMinReactive, 0, wxALL, WXC_FROM_DIP(5));
551 
552  wxBoxSizer* boxSizerLvl5_4 = new wxBoxSizer(wxHORIZONTAL);
553 
554  boxSizerLvl4_4->Add(boxSizerLvl5_4, 0, wxEXPAND, WXC_FROM_DIP(5));
555 
556  m_textCtrlMinRectivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
557  #if wxVERSION_NUMBER >= 3000
558  m_textCtrlMinRectivePower->SetHint(wxT(""));
559  #endif
560 
561  boxSizerLvl5_4->Add(m_textCtrlMinRectivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
562 
563  wxArrayString m_choiceMinRectivePowerArr;
564  m_choiceMinRectivePowerArr.Add(wxT("p.u."));
565  m_choiceMinRectivePowerArr.Add(wxT("VAr"));
566  m_choiceMinRectivePowerArr.Add(wxT("kVAr"));
567  m_choiceMinRectivePowerArr.Add(wxT("MVAr"));
568  m_choiceMinRectivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceMinRectivePowerArr, 0);
569  m_choiceMinRectivePower->SetSelection(3);
570 
571  boxSizerLvl5_4->Add(m_choiceMinRectivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
572 
573  m_checkBoxUseMachinePower = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Use machine rated power as base"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
574  m_checkBoxUseMachinePower->SetValue(false);
575 
576  boxSizerLvl2_1->Add(m_checkBoxUseMachinePower, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
577 
578  m_panelFault = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
579  m_notebook->AddPage(m_panelFault, _("Fault"), false);
580 
581  wxBoxSizer* boxSizerLvl2_2 = new wxBoxSizer(wxVERTICAL);
582  m_panelFault->SetSizer(boxSizerLvl2_2);
583 
584  wxStaticBoxSizer* staticBoxSizerLvl3_1 = new wxStaticBoxSizer( new wxStaticBox(m_panelFault, wxID_ANY, _("Sequence impedances (p.u.)")), wxVERTICAL);
585 
586  boxSizerLvl2_2->Add(staticBoxSizerLvl3_1, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
587 
588  wxGridSizer* gridSizerLvl4_2 = new wxGridSizer(0, 2, 0, 0);
589 
590  staticBoxSizerLvl3_1->Add(gridSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
591 
592  wxBoxSizer* boxSizerLvl5_6 = new wxBoxSizer(wxVERTICAL);
593 
594  gridSizerLvl4_2->Add(boxSizerLvl5_6, 0, wxEXPAND, WXC_FROM_DIP(5));
595 
596  m_staticTextPosResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Positive resistance (R1)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
597 
598  boxSizerLvl5_6->Add(m_staticTextPosResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
599 
600  m_textCtrlPosResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
601  #if wxVERSION_NUMBER >= 3000
602  m_textCtrlPosResistance->SetHint(wxT(""));
603  #endif
604 
605  boxSizerLvl5_6->Add(m_textCtrlPosResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
606 
607  wxBoxSizer* boxSizerLvl5_7 = new wxBoxSizer(wxVERTICAL);
608 
609  gridSizerLvl4_2->Add(boxSizerLvl5_7, 0, wxEXPAND, WXC_FROM_DIP(5));
610 
611  m_staticTextPosReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Positive reactance (X1)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
612 
613  boxSizerLvl5_7->Add(m_staticTextPosReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
614 
615  m_textCtrlPosReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
616  #if wxVERSION_NUMBER >= 3000
617  m_textCtrlPosReactance->SetHint(wxT(""));
618  #endif
619 
620  boxSizerLvl5_7->Add(m_textCtrlPosReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
621 
622  wxBoxSizer* boxSizerLvl5_8 = new wxBoxSizer(wxVERTICAL);
623 
624  gridSizerLvl4_2->Add(boxSizerLvl5_8, 0, wxEXPAND, WXC_FROM_DIP(5));
625 
626  m_staticTextNegResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Negative resistance (R2)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
627 
628  boxSizerLvl5_8->Add(m_staticTextNegResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
629 
630  m_textCtrlNegResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
631  #if wxVERSION_NUMBER >= 3000
632  m_textCtrlNegResistance->SetHint(wxT(""));
633  #endif
634 
635  boxSizerLvl5_8->Add(m_textCtrlNegResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
636 
637  wxBoxSizer* boxSizerLvl5_9 = new wxBoxSizer(wxVERTICAL);
638 
639  gridSizerLvl4_2->Add(boxSizerLvl5_9, 0, wxEXPAND, WXC_FROM_DIP(5));
640 
641  m_staticTextNegReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Negative reactance (X2)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
642 
643  boxSizerLvl5_9->Add(m_staticTextNegReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
644 
645  m_textCtrlNegReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
646  #if wxVERSION_NUMBER >= 3000
647  m_textCtrlNegReactance->SetHint(wxT(""));
648  #endif
649 
650  boxSizerLvl5_9->Add(m_textCtrlNegReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
651 
652  wxBoxSizer* boxSizerLvl5_10 = new wxBoxSizer(wxVERTICAL);
653 
654  gridSizerLvl4_2->Add(boxSizerLvl5_10, 0, wxEXPAND, WXC_FROM_DIP(5));
655 
656  m_staticTextZeroResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Zero resistance (R0)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
657 
658  boxSizerLvl5_10->Add(m_staticTextZeroResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
659 
660  m_textCtrlZeroResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
661  #if wxVERSION_NUMBER >= 3000
662  m_textCtrlZeroResistance->SetHint(wxT(""));
663  #endif
664 
665  boxSizerLvl5_10->Add(m_textCtrlZeroResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
666 
667  wxBoxSizer* boxSizerLvl5_11 = new wxBoxSizer(wxVERTICAL);
668 
669  gridSizerLvl4_2->Add(boxSizerLvl5_11, 0, wxEXPAND, WXC_FROM_DIP(5));
670 
671  m_staticTextZeroReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Zero reactance (X0)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
672 
673  boxSizerLvl5_11->Add(m_staticTextZeroReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
674 
675  m_textCtrlZeroReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
676  #if wxVERSION_NUMBER >= 3000
677  m_textCtrlZeroReactance->SetHint(wxT(""));
678  #endif
679 
680  boxSizerLvl5_11->Add(m_textCtrlZeroReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
681 
682  wxGridSizer* gridSizerLvl3_3 = new wxGridSizer(0, 2, 0, 0);
683 
684  boxSizerLvl2_2->Add(gridSizerLvl3_3, 0, wxEXPAND, WXC_FROM_DIP(5));
685 
686  wxBoxSizer* boxSizerLvl4_12 = new wxBoxSizer(wxVERTICAL);
687 
688  gridSizerLvl3_3->Add(boxSizerLvl4_12, 0, wxEXPAND, WXC_FROM_DIP(5));
689 
690  m_staticTextGrdResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Ground resistance (p.u.)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
691 
692  boxSizerLvl4_12->Add(m_staticTextGrdResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
693 
694  m_textCtrlGrdResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
695  #if wxVERSION_NUMBER >= 3000
696  m_textCtrlGrdResistance->SetHint(wxT(""));
697  #endif
698 
699  boxSizerLvl4_12->Add(m_textCtrlGrdResistance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
700 
701  wxBoxSizer* boxSizerLvl4_13 = new wxBoxSizer(wxVERTICAL);
702 
703  gridSizerLvl3_3->Add(boxSizerLvl4_13, 0, wxEXPAND, WXC_FROM_DIP(5));
704 
705  m_staticTextGrdReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Ground reactance (p.u.)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
706 
707  boxSizerLvl4_13->Add(m_staticTextGrdReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
708 
709  m_textCtrlGrdReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
710  #if wxVERSION_NUMBER >= 3000
711  m_textCtrlGrdReactance->SetHint(wxT(""));
712  #endif
713 
714  boxSizerLvl4_13->Add(m_textCtrlGrdReactance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
715 
716  m_checkBoxGroundNeutral = new wxCheckBox(m_panelFault, wxID_ANY, _("Grounded neutral"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
717  m_checkBoxGroundNeutral->SetValue(true);
718 
719  boxSizerLvl2_2->Add(m_checkBoxGroundNeutral, 0, wxALL, WXC_FROM_DIP(5));
720 
721  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
722 
723  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
724 
725  m_buttonStab = new wxButton(this, wxID_ANY, _("Stability"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
726 
727  boxSizerBottomButtons->Add(m_buttonStab, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
728 
729  boxSizerBottomButtons->Add(0, 0, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
730 
731  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
732 
733  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
734 
735  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
736 
737  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
738 
739 
740  #if wxVERSION_NUMBER >= 2900
741  if(!wxPersistenceManager::Get().Find(m_notebook)){
742  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
743  } else {
744  wxPersistenceManager::Get().Restore(m_notebook);
745  }
746  #endif
747 
748  SetName(wxT("SyncMachineFormBase"));
749  SetSize(-1,-1);
750  if (GetSizer()) {
751  GetSizer()->Fit(this);
752  }
753  if(GetParent()) {
754  CentreOnParent(wxBOTH);
755  } else {
756  CentreOnScreen(wxBOTH);
757  }
758 #if wxVERSION_NUMBER >= 2900
759  if(!wxPersistenceManager::Get().Find(this)) {
760  wxPersistenceManager::Get().RegisterAndRestore(this);
761  } else {
762  wxPersistenceManager::Get().Restore(this);
763  }
764 #endif
765  // Connect events
766  m_checkBoxMaxReactive->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCheckMaxReactive), NULL, this);
767  m_checkBoxMinReactive->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCheckMinReactive), NULL, this);
768  m_buttonStab->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnStabilityButtonClick), NULL, this);
769  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnOKButtonClick), NULL, this);
770  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCancelButtonClick), NULL, this);
771 
772 }
773 
774 SyncMachineFormBase::~SyncMachineFormBase()
775 {
776  m_checkBoxMaxReactive->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCheckMaxReactive), NULL, this);
777  m_checkBoxMinReactive->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCheckMinReactive), NULL, this);
778  m_buttonStab->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnStabilityButtonClick), NULL, this);
779  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnOKButtonClick), NULL, this);
780  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncMachineFormBase::OnCancelButtonClick), NULL, this);
781 
782 }
783 
784 GeneratorStabFormBase::GeneratorStabFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
785  : wxDialog(parent, id, title, pos, size, style)
786 {
787  if ( !bBitmapLoaded ) {
788  // We need to initialise the default bitmap handler
789  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
790  wxC9EE9InitBitmapResources();
791  bBitmapLoaded = true;
792  }
793 
794  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
795  this->SetSizer(boxSizerLvl1_1);
796 
797  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
798 
799  boxSizerLvl1_1->Add(boxSizerLvl2_1, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
800 
801  m_checkBoxPlotSyncMachine = new wxCheckBox(this, wxID_ANY, _("Plot synchronous machine data"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
802  m_checkBoxPlotSyncMachine->SetValue(false);
803 
804  boxSizerLvl2_1->Add(m_checkBoxPlotSyncMachine, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
805 
806  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
807 
808  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
809 
810  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
811 
812  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
813 
814  m_staticTextInertia = new wxStaticText(this, wxID_ANY, _("Inertia (H)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
815 
816  boxSizerLvl4_1->Add(m_staticTextInertia, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
817 
818  wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
819 
820  boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
821 
822  m_textCtrlInertia = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
823  #if wxVERSION_NUMBER >= 3000
824  m_textCtrlInertia->SetHint(wxT(""));
825  #endif
826 
827  boxSizerLvl5_1->Add(m_textCtrlInertia, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
828 
829  m_staticTextS_1 = new wxStaticText(this, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
830 
831  boxSizerLvl5_1->Add(m_staticTextS_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
832 
833  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
834 
835  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
836 
837  m_staticTextDamping = new wxStaticText(this, wxID_ANY, _("Damping factor"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
838 
839  boxSizerLvl4_2->Add(m_staticTextDamping, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
840 
841  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
842 
843  boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
844 
845  m_textCtrlDamping = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
846  #if wxVERSION_NUMBER >= 3000
847  m_textCtrlDamping->SetHint(wxT(""));
848  #endif
849 
850  boxSizerLvl5_2->Add(m_textCtrlDamping, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
851 
852  m_staticTextPU_1 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
853 
854  boxSizerLvl5_2->Add(m_staticTextPU_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
855 
856  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
857 
858  gridSizerLvl3_1->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
859 
860  m_checkBoxUseAVR = new wxCheckBox(this, wxID_ANY, _("Use AVR"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
861  m_checkBoxUseAVR->SetValue(false);
862 
863  boxSizerLvl4_3->Add(m_checkBoxUseAVR, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
864 
865  m_buttonEditAVR = new wxButton(this, wxID_ANY, _("Edit AVR"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
866 
867  boxSizerLvl4_3->Add(m_buttonEditAVR, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
868 
869  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
870 
871  gridSizerLvl3_1->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5));
872 
873  m_checkBoxUseSG = new wxCheckBox(this, wxID_ANY, _("Use speed governor"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
874  m_checkBoxUseSG->SetValue(false);
875 
876  boxSizerLvl4_4->Add(m_checkBoxUseSG, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
877 
878  m_buttonEditSG = new wxButton(this, wxID_ANY, _("Edit speed governor"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
879 
880  boxSizerLvl4_4->Add(m_buttonEditSG, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
881 
882  m_staticLine_1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxLI_HORIZONTAL);
883 
884  boxSizerLvl2_1->Add(m_staticLine_1, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
885 
886  wxGridSizer* gridSizerLvl3_2 = new wxGridSizer(0, 2, 0, 0);
887 
888  boxSizerLvl2_1->Add(gridSizerLvl3_2, 1, wxEXPAND, WXC_FROM_DIP(5));
889 
890  wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxVERTICAL);
891 
892  gridSizerLvl3_2->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5));
893 
894  m_staticTextRa = new wxStaticText(this, wxID_ANY, _("Armature resistance (Ra)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
895 
896  boxSizerLvl4_5->Add(m_staticTextRa, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
897 
898  wxBoxSizer* boxSizerLvl5_3 = new wxBoxSizer(wxHORIZONTAL);
899 
900  boxSizerLvl4_5->Add(boxSizerLvl5_3, 0, wxEXPAND, WXC_FROM_DIP(5));
901 
902  m_textCtrlRa = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
903  #if wxVERSION_NUMBER >= 3000
904  m_textCtrlRa->SetHint(wxT(""));
905  #endif
906 
907  boxSizerLvl5_3->Add(m_textCtrlRa, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
908 
909  m_staticTextPU_2 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
910 
911  boxSizerLvl5_3->Add(m_staticTextPU_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
912 
913  wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxVERTICAL);
914 
915  gridSizerLvl3_2->Add(boxSizerLvl4_6, 0, wxEXPAND, WXC_FROM_DIP(5));
916 
917  m_staticTextXp = new wxStaticText(this, wxID_ANY, _("Potier reactance (Xp)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
918 
919  boxSizerLvl4_6->Add(m_staticTextXp, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
920 
921  wxBoxSizer* boxSizerLvl5_14 = new wxBoxSizer(wxHORIZONTAL);
922 
923  boxSizerLvl4_6->Add(boxSizerLvl5_14, 0, wxEXPAND, WXC_FROM_DIP(5));
924 
925  m_textCtrlXp = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
926  #if wxVERSION_NUMBER >= 3000
927  m_textCtrlXp->SetHint(wxT(""));
928  #endif
929 
930  boxSizerLvl5_14->Add(m_textCtrlXp, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
931 
932  m_staticTextPU_9 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
933 
934  boxSizerLvl5_14->Add(m_staticTextPU_9, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
935 
936  wxBoxSizer* boxSizerLvl4_7 = new wxBoxSizer(wxVERTICAL);
937 
938  gridSizerLvl3_2->Add(boxSizerLvl4_7, 0, wxEXPAND, WXC_FROM_DIP(5));
939 
940  m_staticTextSat = new wxStaticText(this, wxID_ANY, _("Saturation factor"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
941 
942  boxSizerLvl4_7->Add(m_staticTextSat, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
943 
944  wxBoxSizer* boxSizerLvl5_15 = new wxBoxSizer(wxHORIZONTAL);
945 
946  boxSizerLvl4_7->Add(boxSizerLvl5_15, 0, wxEXPAND, WXC_FROM_DIP(5));
947 
948  m_textCtrlSat = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
949  #if wxVERSION_NUMBER >= 3000
950  m_textCtrlSat->SetHint(wxT(""));
951  #endif
952 
953  boxSizerLvl5_15->Add(m_textCtrlSat, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
954 
955  m_staticTextPU_10 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
956 
957  boxSizerLvl5_15->Add(m_staticTextPU_10, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
958 
959  wxStaticBoxSizer* staticBoxSizerSyncronous = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Syncronous")), wxVERTICAL);
960 
961  boxSizerLvl2_1->Add(staticBoxSizerSyncronous, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
962 
963  wxGridSizer* gridSizerLvl4_3 = new wxGridSizer(0, 2, 0, 0);
964 
965  staticBoxSizerSyncronous->Add(gridSizerLvl4_3, 1, wxEXPAND, WXC_FROM_DIP(5));
966 
967  wxBoxSizer* boxSizerLvl5_4 = new wxBoxSizer(wxVERTICAL);
968 
969  gridSizerLvl4_3->Add(boxSizerLvl5_4, 0, wxEXPAND, WXC_FROM_DIP(5));
970 
971  m_staticTextSyncXd = new wxStaticText(this, wxID_ANY, _("Direct-axis reactance (Xd)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
972 
973  boxSizerLvl5_4->Add(m_staticTextSyncXd, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
974 
975  wxBoxSizer* boxSizerLvl6_1 = new wxBoxSizer(wxHORIZONTAL);
976 
977  boxSizerLvl5_4->Add(boxSizerLvl6_1, 0, wxEXPAND, WXC_FROM_DIP(5));
978 
979  m_textCtrlSyncXd = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
980  #if wxVERSION_NUMBER >= 3000
981  m_textCtrlSyncXd->SetHint(wxT(""));
982  #endif
983 
984  boxSizerLvl6_1->Add(m_textCtrlSyncXd, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
985 
986  m_staticTextPU_3 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
987 
988  boxSizerLvl6_1->Add(m_staticTextPU_3, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
989 
990  wxBoxSizer* boxSizerLvl5_5 = new wxBoxSizer(wxVERTICAL);
991 
992  gridSizerLvl4_3->Add(boxSizerLvl5_5, 0, wxEXPAND, WXC_FROM_DIP(5));
993 
994  m_staticTextSyncXq = new wxStaticText(this, wxID_ANY, _("Quadrature-axis reactance (Xq)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
995 
996  boxSizerLvl5_5->Add(m_staticTextSyncXq, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
997 
998  wxBoxSizer* boxSizerLvl6_2 = new wxBoxSizer(wxHORIZONTAL);
999 
1000  boxSizerLvl5_5->Add(boxSizerLvl6_2, 0, wxEXPAND, WXC_FROM_DIP(5));
1001 
1002  m_textCtrlSyncXq = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1003  #if wxVERSION_NUMBER >= 3000
1004  m_textCtrlSyncXq->SetHint(wxT(""));
1005  #endif
1006 
1007  boxSizerLvl6_2->Add(m_textCtrlSyncXq, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1008 
1009  m_staticTextPU_4 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1010 
1011  boxSizerLvl6_2->Add(m_staticTextPU_4, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1012 
1013  wxStaticBoxSizer* staticBoxSizerTransient = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Transient")), wxVERTICAL);
1014 
1015  boxSizerLvl2_1->Add(staticBoxSizerTransient, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1016 
1017  wxGridSizer* gridSizerLvl4_4 = new wxGridSizer(0, 2, 0, 0);
1018 
1019  staticBoxSizerTransient->Add(gridSizerLvl4_4, 1, wxEXPAND, WXC_FROM_DIP(5));
1020 
1021  wxBoxSizer* boxSizerLvl5_6 = new wxBoxSizer(wxVERTICAL);
1022 
1023  gridSizerLvl4_4->Add(boxSizerLvl5_6, 0, wxEXPAND, WXC_FROM_DIP(5));
1024 
1025  m_staticTextTranXd = new wxStaticText(this, wxID_ANY, _("Direct-axis reactance (X'd)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1026 
1027  boxSizerLvl5_6->Add(m_staticTextTranXd, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1028 
1029  wxBoxSizer* boxSizerLvl6_3 = new wxBoxSizer(wxHORIZONTAL);
1030 
1031  boxSizerLvl5_6->Add(boxSizerLvl6_3, 0, wxEXPAND, WXC_FROM_DIP(5));
1032 
1033  m_textCtrlTranXd = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1034  #if wxVERSION_NUMBER >= 3000
1035  m_textCtrlTranXd->SetHint(wxT(""));
1036  #endif
1037 
1038  boxSizerLvl6_3->Add(m_textCtrlTranXd, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1039 
1040  m_staticTextPU_5 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1041 
1042  boxSizerLvl6_3->Add(m_staticTextPU_5, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1043 
1044  wxBoxSizer* boxSizerLvl5_7 = new wxBoxSizer(wxVERTICAL);
1045 
1046  gridSizerLvl4_4->Add(boxSizerLvl5_7, 0, wxEXPAND, WXC_FROM_DIP(5));
1047 
1048  m_staticTextTranXq = new wxStaticText(this, wxID_ANY, _("Quadrature-axis reactance (X'q)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1049 
1050  boxSizerLvl5_7->Add(m_staticTextTranXq, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1051 
1052  wxBoxSizer* boxSizerLvl6_4 = new wxBoxSizer(wxHORIZONTAL);
1053 
1054  boxSizerLvl5_7->Add(boxSizerLvl6_4, 0, wxEXPAND, WXC_FROM_DIP(5));
1055 
1056  m_textCtrlTranXq = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1057  #if wxVERSION_NUMBER >= 3000
1058  m_textCtrlTranXq->SetHint(wxT(""));
1059  #endif
1060 
1061  boxSizerLvl6_4->Add(m_textCtrlTranXq, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1062 
1063  m_staticTextPU_6 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1064 
1065  boxSizerLvl6_4->Add(m_staticTextPU_6, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1066 
1067  wxBoxSizer* boxSizerLvl5_8 = new wxBoxSizer(wxVERTICAL);
1068 
1069  gridSizerLvl4_4->Add(boxSizerLvl5_8, 0, wxEXPAND, WXC_FROM_DIP(5));
1070 
1071  m_staticTextTranTd0 = new wxStaticText(this, wxID_ANY, _("Direct-axis time constant (T'd0)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1072 
1073  boxSizerLvl5_8->Add(m_staticTextTranTd0, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1074 
1075  wxBoxSizer* boxSizerLvl6_5 = new wxBoxSizer(wxHORIZONTAL);
1076 
1077  boxSizerLvl5_8->Add(boxSizerLvl6_5, 0, wxEXPAND, WXC_FROM_DIP(5));
1078 
1079  m_textCtrlTranTd0 = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1080  #if wxVERSION_NUMBER >= 3000
1081  m_textCtrlTranTd0->SetHint(wxT(""));
1082  #endif
1083 
1084  boxSizerLvl6_5->Add(m_textCtrlTranTd0, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1085 
1086  m_staticTextS_2 = new wxStaticText(this, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1087 
1088  boxSizerLvl6_5->Add(m_staticTextS_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1089 
1090  wxBoxSizer* boxSizerLvl5_9 = new wxBoxSizer(wxVERTICAL);
1091 
1092  gridSizerLvl4_4->Add(boxSizerLvl5_9, 0, wxEXPAND, WXC_FROM_DIP(5));
1093 
1094  m_staticTextTranTq0 = new wxStaticText(this, wxID_ANY, _("Quadrature-axis time constant (T'q0)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1095 
1096  boxSizerLvl5_9->Add(m_staticTextTranTq0, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1097 
1098  wxBoxSizer* boxSizerLvl6_6 = new wxBoxSizer(wxHORIZONTAL);
1099 
1100  boxSizerLvl5_9->Add(boxSizerLvl6_6, 0, wxEXPAND, WXC_FROM_DIP(5));
1101 
1102  m_textCtrlTranTq0 = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1103  #if wxVERSION_NUMBER >= 3000
1104  m_textCtrlTranTq0->SetHint(wxT(""));
1105  #endif
1106 
1107  boxSizerLvl6_6->Add(m_textCtrlTranTq0, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1108 
1109  m_staticTextS_3 = new wxStaticText(this, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1110 
1111  boxSizerLvl6_6->Add(m_staticTextS_3, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1112 
1113  wxStaticBoxSizer* staticBoxSizerSubtransient = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Sub-transient")), wxVERTICAL);
1114 
1115  boxSizerLvl2_1->Add(staticBoxSizerSubtransient, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1116 
1117  wxGridSizer* gridSizerLvl4_5 = new wxGridSizer(0, 2, 0, 0);
1118 
1119  staticBoxSizerSubtransient->Add(gridSizerLvl4_5, 1, wxEXPAND, WXC_FROM_DIP(5));
1120 
1121  wxBoxSizer* boxSizerLvl5_10 = new wxBoxSizer(wxVERTICAL);
1122 
1123  gridSizerLvl4_5->Add(boxSizerLvl5_10, 0, wxEXPAND, WXC_FROM_DIP(5));
1124 
1125  m_staticTextSubXd = new wxStaticText(this, wxID_ANY, _("Direct-axis reactance (X''d)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1126 
1127  boxSizerLvl5_10->Add(m_staticTextSubXd, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1128 
1129  wxBoxSizer* boxSizerLvl6_7 = new wxBoxSizer(wxHORIZONTAL);
1130 
1131  boxSizerLvl5_10->Add(boxSizerLvl6_7, 0, wxEXPAND, WXC_FROM_DIP(5));
1132 
1133  m_textCtrlSubXd = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1134  #if wxVERSION_NUMBER >= 3000
1135  m_textCtrlSubXd->SetHint(wxT(""));
1136  #endif
1137 
1138  boxSizerLvl6_7->Add(m_textCtrlSubXd, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1139 
1140  m_staticTextPU_7 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1141 
1142  boxSizerLvl6_7->Add(m_staticTextPU_7, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1143 
1144  wxBoxSizer* boxSizerLvl5_11 = new wxBoxSizer(wxVERTICAL);
1145 
1146  gridSizerLvl4_5->Add(boxSizerLvl5_11, 0, wxEXPAND, WXC_FROM_DIP(5));
1147 
1148  m_staticTextSubXq = new wxStaticText(this, wxID_ANY, _("Quadrature-axis reactance (X''q)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1149 
1150  boxSizerLvl5_11->Add(m_staticTextSubXq, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1151 
1152  wxBoxSizer* boxSizerLvl6_8 = new wxBoxSizer(wxHORIZONTAL);
1153 
1154  boxSizerLvl5_11->Add(boxSizerLvl6_8, 0, wxEXPAND, WXC_FROM_DIP(5));
1155 
1156  m_textCtrlSubXq = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1157  #if wxVERSION_NUMBER >= 3000
1158  m_textCtrlSubXq->SetHint(wxT(""));
1159  #endif
1160 
1161  boxSizerLvl6_8->Add(m_textCtrlSubXq, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1162 
1163  m_staticTextPU_8 = new wxStaticText(this, wxID_ANY, _("p.u."), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1164 
1165  boxSizerLvl6_8->Add(m_staticTextPU_8, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1166 
1167  wxBoxSizer* boxSizerLvl5_12 = new wxBoxSizer(wxVERTICAL);
1168 
1169  gridSizerLvl4_5->Add(boxSizerLvl5_12, 0, wxEXPAND, WXC_FROM_DIP(5));
1170 
1171  m_staticTextSubTd0 = new wxStaticText(this, wxID_ANY, _("Direct-axis time constant (T''d0)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1172 
1173  boxSizerLvl5_12->Add(m_staticTextSubTd0, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1174 
1175  wxBoxSizer* boxSizerLvl6_9 = new wxBoxSizer(wxHORIZONTAL);
1176 
1177  boxSizerLvl5_12->Add(boxSizerLvl6_9, 0, wxEXPAND, WXC_FROM_DIP(5));
1178 
1179  m_textCtrlSubTd0 = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1180  #if wxVERSION_NUMBER >= 3000
1181  m_textCtrlSubTd0->SetHint(wxT(""));
1182  #endif
1183 
1184  boxSizerLvl6_9->Add(m_textCtrlSubTd0, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1185 
1186  m_staticTextS_4 = new wxStaticText(this, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1187 
1188  boxSizerLvl6_9->Add(m_staticTextS_4, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1189 
1190  wxBoxSizer* boxSizerLvl5_13 = new wxBoxSizer(wxVERTICAL);
1191 
1192  gridSizerLvl4_5->Add(boxSizerLvl5_13, 0, wxEXPAND, WXC_FROM_DIP(5));
1193 
1194  m_staticTextSubTq0 = new wxStaticText(this, wxID_ANY, _("Quadrature-axis time constant (T''q0)"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1195 
1196  boxSizerLvl5_13->Add(m_staticTextSubTq0, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1197 
1198  wxBoxSizer* boxSizerLvl6_10 = new wxBoxSizer(wxHORIZONTAL);
1199 
1200  boxSizerLvl5_13->Add(boxSizerLvl6_10, 0, wxEXPAND, WXC_FROM_DIP(5));
1201 
1202  m_textCtrlSubTq0 = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1203  #if wxVERSION_NUMBER >= 3000
1204  m_textCtrlSubTq0->SetHint(wxT(""));
1205  #endif
1206 
1207  boxSizerLvl6_10->Add(m_textCtrlSubTq0, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1208 
1209  m_staticTextS_5 = new wxStaticText(this, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1210 
1211  boxSizerLvl6_10->Add(m_staticTextS_5, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1212 
1213  wxBoxSizer* boxSizerVDivider = new wxBoxSizer(wxVERTICAL);
1214 
1215  boxSizerLvl2_1->Add(boxSizerVDivider, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1216 
1217  wxBoxSizer* boxSizerSection_2 = new wxBoxSizer(wxVERTICAL);
1218 
1219  boxSizerVDivider->Add(boxSizerSection_2, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1220 
1221  wxBoxSizer* boxSizerSection_1 = new wxBoxSizer(wxVERTICAL);
1222 
1223  boxSizerVDivider->Add(boxSizerSection_1, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1224 
1225  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
1226 
1227  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1228 
1229  m_buttonSwitching = new wxButton(this, wxID_ANY, _("Switching"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1230 
1231  boxSizerBottomButtons->Add(m_buttonSwitching, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
1232 
1233  boxSizerBottomButtons->Add(0, 0, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1234 
1235  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1236 
1237  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
1238 
1239  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1240 
1241  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
1242 
1243  SetName(wxT("GeneratorStabFormBase"));
1244  SetSize(-1,-1);
1245  if (GetSizer()) {
1246  GetSizer()->Fit(this);
1247  }
1248  if(GetParent()) {
1249  CentreOnParent(wxBOTH);
1250  } else {
1251  CentreOnScreen(wxBOTH);
1252  }
1253 #if wxVERSION_NUMBER >= 2900
1254  if(!wxPersistenceManager::Get().Find(this)) {
1255  wxPersistenceManager::Get().RegisterAndRestore(this);
1256  } else {
1257  wxPersistenceManager::Get().Restore(this);
1258  }
1259 #endif
1260  // Connect events
1261  m_checkBoxUseAVR->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::UseAVRClick), NULL, this);
1262  m_buttonEditAVR->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnEditAVRButtonClick), NULL, this);
1263  m_checkBoxUseSG->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::UseSGClick), NULL, this);
1264  m_buttonEditSG->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnSpeedGovernorButtonClick), NULL, this);
1265  m_buttonSwitching->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnSwitchingButtonClick), NULL, this);
1266  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnOKButtonClick), NULL, this);
1267  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnCancelButtonClick), NULL, this);
1268 
1269 }
1270 
1271 GeneratorStabFormBase::~GeneratorStabFormBase()
1272 {
1273  m_checkBoxUseAVR->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::UseAVRClick), NULL, this);
1274  m_buttonEditAVR->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnEditAVRButtonClick), NULL, this);
1275  m_checkBoxUseSG->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::UseSGClick), NULL, this);
1276  m_buttonEditSG->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnSpeedGovernorButtonClick), NULL, this);
1277  m_buttonSwitching->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnSwitchingButtonClick), NULL, this);
1278  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnOKButtonClick), NULL, this);
1279  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneratorStabFormBase::OnCancelButtonClick), NULL, this);
1280 
1281 }
1282 
1283 LineFormBase::LineFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
1284  : wxDialog(parent, id, title, pos, size, style)
1285 {
1286  if ( !bBitmapLoaded ) {
1287  // We need to initialise the default bitmap handler
1288  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
1289  wxC9EE9InitBitmapResources();
1290  bBitmapLoaded = true;
1291  }
1292 
1293  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
1294  this->SetSizer(boxSizerLvl1_1);
1295 
1296  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
1297  m_notebook->SetName(wxT("m_notebook"));
1298 
1299  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
1300 
1301  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
1302  m_notebook->AddPage(m_panelGeneral, _("General"), false);
1303 
1304  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
1305  m_panelGeneral->SetSizer(boxSizerLvl2_1);
1306 
1307  m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1308 
1309  boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1310 
1311  m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1312  #if wxVERSION_NUMBER >= 3000
1313  m_textCtrlName->SetHint(wxT(""));
1314  #endif
1315 
1316  boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1317  m_textCtrlName->SetMinSize(wxSize(300,-1));
1318 
1319  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
1320 
1321  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
1322 
1323  wxBoxSizer* boxSizerLvl4_9 = new wxBoxSizer(wxVERTICAL);
1324 
1325  gridSizerLvl3_1->Add(boxSizerLvl4_9, 0, wxEXPAND, WXC_FROM_DIP(5));
1326 
1327  m_staticTextNominalVoltage = new wxStaticText(m_panelGeneral, wxID_ANY, _("Rated voltage"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1328 
1329  boxSizerLvl4_9->Add(m_staticTextNominalVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1330 
1331  m_staticTextNominalVoltageValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("138 kV"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1332  wxFont m_staticTextNominalVoltageValueFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
1333  m_staticTextNominalVoltageValueFont.SetWeight(wxFONTWEIGHT_BOLD);
1334  m_staticTextNominalVoltageValue->SetFont(m_staticTextNominalVoltageValueFont);
1335 
1336  boxSizerLvl4_9->Add(m_staticTextNominalVoltageValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1337 
1338  wxBoxSizer* boxSizerLvl4_8 = new wxBoxSizer(wxVERTICAL);
1339 
1340  gridSizerLvl3_1->Add(boxSizerLvl4_8, 0, wxEXPAND, WXC_FROM_DIP(5));
1341 
1342  m_staticTextNominalPower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Rated power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1343 
1344  boxSizerLvl4_8->Add(m_staticTextNominalPower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1345 
1346  wxBoxSizer* boxSizerLvl5_5 = new wxBoxSizer(wxHORIZONTAL);
1347 
1348  boxSizerLvl4_8->Add(boxSizerLvl5_5, 0, wxEXPAND, WXC_FROM_DIP(5));
1349 
1350  m_textCtrlNominalPower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1351  #if wxVERSION_NUMBER >= 3000
1352  m_textCtrlNominalPower->SetHint(wxT(""));
1353  #endif
1354 
1355  boxSizerLvl5_5->Add(m_textCtrlNominalPower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1356 
1357  wxArrayString m_choiceNominalPowerArr;
1358  m_choiceNominalPowerArr.Add(wxT("VA"));
1359  m_choiceNominalPowerArr.Add(wxT("kVA"));
1360  m_choiceNominalPowerArr.Add(wxT("MVA"));
1361  m_choiceNominalPower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceNominalPowerArr, 0);
1362  m_choiceNominalPower->SetSelection(2);
1363 
1364  boxSizerLvl5_5->Add(m_choiceNominalPower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
1365 
1366  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
1367 
1368  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
1369 
1370  m_staticTextResistance = new wxStaticText(m_panelGeneral, wxID_ANY, _("Resistance (R)"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1371 
1372  boxSizerLvl4_1->Add(m_staticTextResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1373 
1374  wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
1375 
1376  boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
1377 
1378  m_textCtrlResistance = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1379  #if wxVERSION_NUMBER >= 3000
1380  m_textCtrlResistance->SetHint(wxT(""));
1381  #endif
1382 
1383  boxSizerLvl5_1->Add(m_textCtrlResistance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1384 
1385  wxArrayString m_choiceResistanceArr;
1386  m_choiceResistanceArr.Add(wxT("p.u."));
1387  m_choiceResistanceArr.Add(wxT("Ohm"));
1388  m_choiceResistanceArr.Add(wxT("Ohm/km"));
1389  m_choiceResistance = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceResistanceArr, 0);
1390  m_choiceResistance->SetSelection(0);
1391 
1392  boxSizerLvl5_1->Add(m_choiceResistance, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
1393 
1394  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
1395 
1396  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
1397 
1398  m_staticTextReactance = new wxStaticText(m_panelGeneral, wxID_ANY, _("Indutive reactance (XL)"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1399 
1400  boxSizerLvl4_2->Add(m_staticTextReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1401 
1402  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
1403 
1404  boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
1405 
1406  m_textCtrlReactance = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1407  #if wxVERSION_NUMBER >= 3000
1408  m_textCtrlReactance->SetHint(wxT(""));
1409  #endif
1410 
1411  boxSizerLvl5_2->Add(m_textCtrlReactance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1412 
1413  wxArrayString m_choiceReactanceArr;
1414  m_choiceReactanceArr.Add(wxT("p.u."));
1415  m_choiceReactanceArr.Add(wxT("Ohm"));
1416  m_choiceReactanceArr.Add(wxT("Ohm/km"));
1417  m_choiceReactance = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceReactanceArr, 0);
1418  m_choiceReactance->SetSelection(0);
1419 
1420  boxSizerLvl5_2->Add(m_choiceReactance, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
1421 
1422  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
1423 
1424  gridSizerLvl3_1->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
1425 
1426  m_staticTextSusceptance = new wxStaticText(m_panelGeneral, wxID_ANY, _("Capacitive susceptance (B)"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1427 
1428  boxSizerLvl4_3->Add(m_staticTextSusceptance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1429 
1430  wxBoxSizer* boxSizerLvl5_3 = new wxBoxSizer(wxHORIZONTAL);
1431 
1432  boxSizerLvl4_3->Add(boxSizerLvl5_3, 0, wxEXPAND, WXC_FROM_DIP(5));
1433 
1434  m_textCtrlSusceptance = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1435  #if wxVERSION_NUMBER >= 3000
1436  m_textCtrlSusceptance->SetHint(wxT(""));
1437  #endif
1438 
1439  boxSizerLvl5_3->Add(m_textCtrlSusceptance, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1440 
1441  wxArrayString m_choiceSusceptanceArr;
1442  m_choiceSusceptanceArr.Add(wxT("p.u."));
1443  m_choiceSusceptanceArr.Add(wxT("S"));
1444  m_choiceSusceptanceArr.Add(wxT("S/km"));
1445  m_choiceSusceptance = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceSusceptanceArr, 0);
1446  m_choiceSusceptance->SetSelection(0);
1447 
1448  boxSizerLvl5_3->Add(m_choiceSusceptance, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
1449 
1450  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
1451 
1452  gridSizerLvl3_1->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5));
1453 
1454  m_staticTextLineSize = new wxStaticText(m_panelGeneral, wxID_ANY, _("Line size"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1455 
1456  boxSizerLvl4_4->Add(m_staticTextLineSize, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1457 
1458  wxBoxSizer* boxSizerLvl5_4 = new wxBoxSizer(wxHORIZONTAL);
1459 
1460  boxSizerLvl4_4->Add(boxSizerLvl5_4, 0, wxEXPAND, WXC_FROM_DIP(5));
1461 
1462  m_textCtrlLineSize = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1463  #if wxVERSION_NUMBER >= 3000
1464  m_textCtrlLineSize->SetHint(wxT(""));
1465  #endif
1466 
1467  boxSizerLvl5_4->Add(m_textCtrlLineSize, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1468 
1469  m_staticTextKM = new wxStaticText(m_panelGeneral, wxID_ANY, _("km"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1470 
1471  boxSizerLvl5_4->Add(m_staticTextKM, 0, wxALL, WXC_FROM_DIP(5));
1472 
1473  m_checkUseLinePower = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Use line rated power as base"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1474  m_checkUseLinePower->SetValue(false);
1475 
1476  boxSizerLvl2_1->Add(m_checkUseLinePower, 0, wxALL, WXC_FROM_DIP(5));
1477 
1478  m_panelFault = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
1479  m_notebook->AddPage(m_panelFault, _("Fault"), false);
1480 
1481  wxBoxSizer* boxSizerLvl2_2 = new wxBoxSizer(wxVERTICAL);
1482  m_panelFault->SetSizer(boxSizerLvl2_2);
1483 
1484  wxStaticBoxSizer* staticBoxSizerZeroImpSeq = new wxStaticBoxSizer( new wxStaticBox(m_panelFault, wxID_ANY, _("Zero-sequence impedances (p.u.)")), wxVERTICAL);
1485 
1486  boxSizerLvl2_2->Add(staticBoxSizerZeroImpSeq, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1487 
1488  wxGridSizer* gridSizerLvl3_2 = new wxGridSizer(0, 2, 0, 0);
1489 
1490  staticBoxSizerZeroImpSeq->Add(gridSizerLvl3_2, 0, wxEXPAND, WXC_FROM_DIP(5));
1491 
1492  wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxVERTICAL);
1493 
1494  gridSizerLvl3_2->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5));
1495 
1496  m_staticTextZeroResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Resistance (R0)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1497 
1498  boxSizerLvl4_5->Add(m_staticTextZeroResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1499 
1500  m_textCtrlZeroResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1501  #if wxVERSION_NUMBER >= 3000
1502  m_textCtrlZeroResistance->SetHint(wxT(""));
1503  #endif
1504 
1505  boxSizerLvl4_5->Add(m_textCtrlZeroResistance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1506 
1507  wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxVERTICAL);
1508 
1509  gridSizerLvl3_2->Add(boxSizerLvl4_6, 0, wxEXPAND, WXC_FROM_DIP(5));
1510 
1511  m_staticTextZeroReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Indutive reactance (X0)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1512 
1513  boxSizerLvl4_6->Add(m_staticTextZeroReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1514 
1515  m_textCtrlZeroReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1516  #if wxVERSION_NUMBER >= 3000
1517  m_textCtrlZeroReactance->SetHint(wxT(""));
1518  #endif
1519 
1520  boxSizerLvl4_6->Add(m_textCtrlZeroReactance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1521 
1522  wxBoxSizer* boxSizerLvl4_7 = new wxBoxSizer(wxVERTICAL);
1523 
1524  gridSizerLvl3_2->Add(boxSizerLvl4_7, 0, wxEXPAND, WXC_FROM_DIP(5));
1525 
1526  m_staticTextZeroSusceptance = new wxStaticText(m_panelFault, wxID_ANY, _("Capacitive susceptance (B0)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1527 
1528  boxSizerLvl4_7->Add(m_staticTextZeroSusceptance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1529 
1530  m_textCtrlZeroSusceptance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1531  #if wxVERSION_NUMBER >= 3000
1532  m_textCtrlZeroSusceptance->SetHint(wxT(""));
1533  #endif
1534 
1535  boxSizerLvl4_7->Add(m_textCtrlZeroSusceptance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1536 
1537  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
1538 
1539  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1540 
1541  m_buttonStability = new wxButton(this, wxID_ANY, _("Stability"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1542 
1543  boxSizerBottomButtons->Add(m_buttonStability, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
1544 
1545  boxSizerBottomButtons->Add(0, 0, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1546 
1547  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1548 
1549  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
1550 
1551  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1552 
1553  boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
1554 
1555 
1556  #if wxVERSION_NUMBER >= 2900
1557  if(!wxPersistenceManager::Get().Find(m_notebook)){
1558  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
1559  } else {
1560  wxPersistenceManager::Get().Restore(m_notebook);
1561  }
1562  #endif
1563 
1564  SetName(wxT("LineFormBase"));
1565  SetSize(-1,-1);
1566  if (GetSizer()) {
1567  GetSizer()->Fit(this);
1568  }
1569  if(GetParent()) {
1570  CentreOnParent(wxBOTH);
1571  } else {
1572  CentreOnScreen(wxBOTH);
1573  }
1574 #if wxVERSION_NUMBER >= 2900
1575  if(!wxPersistenceManager::Get().Find(this)) {
1576  wxPersistenceManager::Get().RegisterAndRestore(this);
1577  } else {
1578  wxPersistenceManager::Get().Restore(this);
1579  }
1580 #endif
1581  // Connect events
1582  m_buttonStability->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LineFormBase::OnStabilityButtonClick), NULL, this);
1583  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LineFormBase::OnOKButtonClick), NULL, this);
1584  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LineFormBase::OnCancelButtonClick), NULL, this);
1585 
1586 }
1587 
1588 LineFormBase::~LineFormBase()
1589 {
1590  m_buttonStability->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LineFormBase::OnStabilityButtonClick), NULL, this);
1591  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LineFormBase::OnOKButtonClick), NULL, this);
1592  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LineFormBase::OnCancelButtonClick), NULL, this);
1593 
1594 }
1595 
1596 TransformerFormBase::TransformerFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
1597  : wxDialog(parent, id, title, pos, size, style)
1598 {
1599  if ( !bBitmapLoaded ) {
1600  // We need to initialise the default bitmap handler
1601  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
1602  wxC9EE9InitBitmapResources();
1603  bBitmapLoaded = true;
1604  }
1605 
1606  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
1607  this->SetSizer(boxSizerLvl1_1);
1608 
1609  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
1610  m_notebook->SetName(wxT("m_notebook"));
1611 
1612  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
1613 
1614  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
1615  m_notebook->AddPage(m_panelGeneral, _("General"), false);
1616 
1617  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
1618  m_panelGeneral->SetSizer(boxSizerLvl2_1);
1619 
1620  m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1621 
1622  boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1623 
1624  m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1625  #if wxVERSION_NUMBER >= 3000
1626  m_textCtrlName->SetHint(wxT(""));
1627  #endif
1628 
1629  boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1630  m_textCtrlName->SetMinSize(wxSize(300,-1));
1631 
1632  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
1633 
1634  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
1635 
1636  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
1637 
1638  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
1639 
1640  m_staticTextNominalVoltage = new wxStaticText(m_panelGeneral, wxID_ANY, _("Rated voltage"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1641 
1642  boxSizerLvl4_1->Add(m_staticTextNominalVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1643 
1644  m_staticTextNominalVoltageValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("138 kV / 138 kV"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1645  wxFont m_staticTextNominalVoltageValueFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
1646  m_staticTextNominalVoltageValueFont.SetWeight(wxFONTWEIGHT_BOLD);
1647  m_staticTextNominalVoltageValue->SetFont(m_staticTextNominalVoltageValueFont);
1648 
1649  boxSizerLvl4_1->Add(m_staticTextNominalVoltageValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1650 
1651  wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxVERTICAL);
1652 
1653  gridSizerLvl3_1->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5));
1654 
1655  m_staticTextBaseVoltage = new wxStaticText(m_panelGeneral, wxID_ANY, _("Base voltage"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1656 
1657  boxSizerLvl4_5->Add(m_staticTextBaseVoltage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1658 
1659  wxArrayString m_choiceBaseVoltageArr;
1660  m_choiceBaseVoltageArr.Add(wxT("138 kV"));
1661  m_choiceBaseVoltageArr.Add(wxT("138 kV"));
1662  m_choiceBaseVoltage = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceBaseVoltageArr, 0);
1663  m_choiceBaseVoltage->SetSelection(0);
1664 
1665  boxSizerLvl4_5->Add(m_choiceBaseVoltage, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
1666 
1667  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
1668 
1669  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
1670 
1671  m_staticTextNominalPower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Rated power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1672 
1673  boxSizerLvl4_2->Add(m_staticTextNominalPower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1674 
1675  wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
1676 
1677  boxSizerLvl4_2->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
1678 
1679  m_textCtrlNominalPower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1680  #if wxVERSION_NUMBER >= 3000
1681  m_textCtrlNominalPower->SetHint(wxT(""));
1682  #endif
1683 
1684  boxSizerLvl5_1->Add(m_textCtrlNominalPower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1685 
1686  wxArrayString m_choiceNominalPowerArr;
1687  m_choiceNominalPowerArr.Add(wxT("VA"));
1688  m_choiceNominalPowerArr.Add(wxT("kVA"));
1689  m_choiceNominalPowerArr.Add(wxT("MVA"));
1690  m_choiceNominalPower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceNominalPowerArr, 0);
1691  m_choiceNominalPower->SetSelection(2);
1692 
1693  boxSizerLvl5_1->Add(m_choiceNominalPower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
1694 
1695  gridSizerLvl3_1->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
1696 
1697  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
1698 
1699  gridSizerLvl3_1->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
1700 
1701  m_staticTextResistance = new wxStaticText(m_panelGeneral, wxID_ANY, _("Resistance (R)"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1702 
1703  boxSizerLvl4_3->Add(m_staticTextResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1704 
1705  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
1706 
1707  boxSizerLvl4_3->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
1708 
1709  m_textCtrlResistance = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1710  #if wxVERSION_NUMBER >= 3000
1711  m_textCtrlResistance->SetHint(wxT(""));
1712  #endif
1713 
1714  boxSizerLvl5_2->Add(m_textCtrlResistance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1715 
1716  wxArrayString m_choiceResistanceArr;
1717  m_choiceResistanceArr.Add(wxT("p.u."));
1718  m_choiceResistanceArr.Add(wxT("Ohm"));
1719  m_choiceResistance = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceResistanceArr, 0);
1720  m_choiceResistance->SetSelection(0);
1721 
1722  boxSizerLvl5_2->Add(m_choiceResistance, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
1723 
1724  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
1725 
1726  gridSizerLvl3_1->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5));
1727 
1728  m_staticTextReactance = new wxStaticText(m_panelGeneral, wxID_ANY, _("Indutive reactance (XL)"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1729 
1730  boxSizerLvl4_4->Add(m_staticTextReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1731 
1732  wxBoxSizer* boxSizerLvl5_3 = new wxBoxSizer(wxHORIZONTAL);
1733 
1734  boxSizerLvl4_4->Add(boxSizerLvl5_3, 0, wxEXPAND, WXC_FROM_DIP(5));
1735 
1736  m_textCtrlReactance = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1737  #if wxVERSION_NUMBER >= 3000
1738  m_textCtrlReactance->SetHint(wxT(""));
1739  #endif
1740 
1741  boxSizerLvl5_3->Add(m_textCtrlReactance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1742 
1743  wxArrayString m_choiceReactanceArr;
1744  m_choiceReactanceArr.Add(wxT("p.u."));
1745  m_choiceReactanceArr.Add(wxT("Ohm"));
1746  m_choiceReactance = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceReactanceArr, 0);
1747  m_choiceReactance->SetSelection(0);
1748 
1749  boxSizerLvl5_3->Add(m_choiceReactance, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
1750 
1751  m_staticLine_1 = new wxStaticLine(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), wxLI_HORIZONTAL);
1752 
1753  boxSizerLvl2_1->Add(m_staticLine_1, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1754 
1755  wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL);
1756 
1757  boxSizerLvl2_1->Add(boxSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
1758 
1759  m_staticTextConnection = new wxStaticText(m_panelGeneral, wxID_ANY, _("Connection"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1760 
1761  boxSizerLvl3_1->Add(m_staticTextConnection, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1762 
1763  wxArrayString m_choiceConnectionArr;
1764  m_choiceConnectionArr.Add(wxT("Grounded Wye - Grounded Wye"));
1765  m_choiceConnectionArr.Add(wxT("Wye - Grounded Wye"));
1766  m_choiceConnectionArr.Add(wxT("Grounded Wye - Wye"));
1767  m_choiceConnectionArr.Add(wxT("Wye - Wye"));
1768  m_choiceConnectionArr.Add(wxT("Delta - Grounded Wye"));
1769  m_choiceConnectionArr.Add(wxT("Delta - Wye"));
1770  m_choiceConnectionArr.Add(wxT("Grounded Wye - Delta"));
1771  m_choiceConnectionArr.Add(wxT("Wye - Delta"));
1772  m_choiceConnectionArr.Add(wxT("Delta - Delta"));
1773  m_choiceConnection = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceConnectionArr, 0);
1774  m_choiceConnection->SetSelection(0);
1775 
1776  boxSizerLvl3_1->Add(m_choiceConnection, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
1777 
1778  wxGridSizer* gridSizerLvl3_2 = new wxGridSizer(0, 2, 0, 0);
1779 
1780  boxSizerLvl2_1->Add(gridSizerLvl3_2, 0, wxEXPAND, WXC_FROM_DIP(5));
1781 
1782  wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxVERTICAL);
1783 
1784  gridSizerLvl3_2->Add(boxSizerLvl4_6, 0, wxEXPAND, WXC_FROM_DIP(5));
1785 
1786  m_staticTextTurnsRatio = new wxStaticText(m_panelGeneral, wxID_ANY, _("Turns ratio"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1787 
1788  boxSizerLvl4_6->Add(m_staticTextTurnsRatio, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1789 
1790  m_textCtrlTurnRatio = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1791  #if wxVERSION_NUMBER >= 3000
1792  m_textCtrlTurnRatio->SetHint(wxT(""));
1793  #endif
1794 
1795  boxSizerLvl4_6->Add(m_textCtrlTurnRatio, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1796 
1797  wxBoxSizer* boxSizerLvl4_7 = new wxBoxSizer(wxVERTICAL);
1798 
1799  gridSizerLvl3_2->Add(boxSizerLvl4_7, 0, wxEXPAND, WXC_FROM_DIP(5));
1800 
1801  m_staticTextPhaseShift = new wxStaticText(m_panelGeneral, wxID_ANY, _("Phase shift"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1802 
1803  boxSizerLvl4_7->Add(m_staticTextPhaseShift, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1804 
1805  wxBoxSizer* boxSizerLvl5_4 = new wxBoxSizer(wxHORIZONTAL);
1806 
1807  boxSizerLvl4_7->Add(boxSizerLvl5_4, 0, wxEXPAND, WXC_FROM_DIP(5));
1808 
1809  m_textCtrlPhaseShift = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1810  #if wxVERSION_NUMBER >= 3000
1811  m_textCtrlPhaseShift->SetHint(wxT(""));
1812  #endif
1813 
1814  boxSizerLvl5_4->Add(m_textCtrlPhaseShift, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1815 
1816  m_staticTextDeg = new wxStaticText(m_panelGeneral, wxID_ANY, _("degrees"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1817 
1818  boxSizerLvl5_4->Add(m_staticTextDeg, 0, wxALL, WXC_FROM_DIP(5));
1819 
1820  m_checkUseTransformerPower = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Use transformer rated power as base"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
1821  m_checkUseTransformerPower->SetValue(false);
1822 
1823  boxSizerLvl2_1->Add(m_checkUseTransformerPower, 0, wxALL, WXC_FROM_DIP(5));
1824 
1825  m_panelFault = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
1826  m_notebook->AddPage(m_panelFault, _("Fault"), false);
1827 
1828  wxBoxSizer* boxSizerLvl2_2 = new wxBoxSizer(wxVERTICAL);
1829  m_panelFault->SetSizer(boxSizerLvl2_2);
1830 
1831  wxStaticBoxSizer* staticBoxSizerZeroImpSeq = new wxStaticBoxSizer( new wxStaticBox(m_panelFault, wxID_ANY, _("Zero-sequence impedances (p.u.)")), wxVERTICAL);
1832 
1833  boxSizerLvl2_2->Add(staticBoxSizerZeroImpSeq, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1834 
1835  wxGridSizer* gridSizerLvl3_3 = new wxGridSizer(0, 2, 0, 0);
1836 
1837  staticBoxSizerZeroImpSeq->Add(gridSizerLvl3_3, 0, wxEXPAND, WXC_FROM_DIP(5));
1838 
1839  wxBoxSizer* boxSizerLvl4_8 = new wxBoxSizer(wxVERTICAL);
1840 
1841  gridSizerLvl3_3->Add(boxSizerLvl4_8, 0, wxEXPAND, WXC_FROM_DIP(5));
1842 
1843  m_staticTextZeroResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Resistance (R0)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1844 
1845  boxSizerLvl4_8->Add(m_staticTextZeroResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1846 
1847  m_textCtrlZeroResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1848  #if wxVERSION_NUMBER >= 3000
1849  m_textCtrlZeroResistance->SetHint(wxT(""));
1850  #endif
1851 
1852  boxSizerLvl4_8->Add(m_textCtrlZeroResistance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1853 
1854  wxBoxSizer* boxSizerLvl4_9 = new wxBoxSizer(wxVERTICAL);
1855 
1856  gridSizerLvl3_3->Add(boxSizerLvl4_9, 0, wxEXPAND, WXC_FROM_DIP(5));
1857 
1858  m_staticTextZeroReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Indutive reactance (X0)"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1859 
1860  boxSizerLvl4_9->Add(m_staticTextZeroReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1861 
1862  m_textCtrlZeroReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1863  #if wxVERSION_NUMBER >= 3000
1864  m_textCtrlZeroReactance->SetHint(wxT(""));
1865  #endif
1866 
1867  boxSizerLvl4_9->Add(m_textCtrlZeroReactance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1868 
1869  wxStaticBoxSizer* staticBoxSizerGroundImpedances = new wxStaticBoxSizer( new wxStaticBox(m_panelFault, wxID_ANY, _("Ground impedances (p.u.)")), wxVERTICAL);
1870 
1871  boxSizerLvl2_2->Add(staticBoxSizerGroundImpedances, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1872 
1873  wxGridSizer* gridSizerLvl3_4 = new wxGridSizer(0, 2, 0, 0);
1874 
1875  staticBoxSizerGroundImpedances->Add(gridSizerLvl3_4, 0, wxEXPAND, WXC_FROM_DIP(5));
1876 
1877  wxBoxSizer* boxSizerLvl4_10 = new wxBoxSizer(wxVERTICAL);
1878 
1879  gridSizerLvl3_4->Add(boxSizerLvl4_10, 0, wxEXPAND, WXC_FROM_DIP(5));
1880 
1881  m_staticTextPrimResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Primary resistance"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1882 
1883  boxSizerLvl4_10->Add(m_staticTextPrimResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1884 
1885  m_textCtrlPrimResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1886  #if wxVERSION_NUMBER >= 3000
1887  m_textCtrlPrimResistance->SetHint(wxT(""));
1888  #endif
1889 
1890  boxSizerLvl4_10->Add(m_textCtrlPrimResistance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1891 
1892  wxBoxSizer* boxSizerLvl4_11 = new wxBoxSizer(wxVERTICAL);
1893 
1894  gridSizerLvl3_4->Add(boxSizerLvl4_11, 0, wxEXPAND, WXC_FROM_DIP(5));
1895 
1896  m_staticTextPrimReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Primary reactance"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1897 
1898  boxSizerLvl4_11->Add(m_staticTextPrimReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1899 
1900  m_textCtrlPrimReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1901  #if wxVERSION_NUMBER >= 3000
1902  m_textCtrlPrimReactance->SetHint(wxT(""));
1903  #endif
1904 
1905  boxSizerLvl4_11->Add(m_textCtrlPrimReactance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1906 
1907  wxBoxSizer* boxSizerLvl4_12 = new wxBoxSizer(wxVERTICAL);
1908 
1909  gridSizerLvl3_4->Add(boxSizerLvl4_12, 0, wxEXPAND, WXC_FROM_DIP(5));
1910 
1911  m_staticTextSecResistance = new wxStaticText(m_panelFault, wxID_ANY, _("Secondary resistance"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1912 
1913  boxSizerLvl4_12->Add(m_staticTextSecResistance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1914 
1915  m_textCtrlSecResistance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1916  #if wxVERSION_NUMBER >= 3000
1917  m_textCtrlSecResistance->SetHint(wxT(""));
1918  #endif
1919 
1920  boxSizerLvl4_12->Add(m_textCtrlSecResistance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1921 
1922  wxBoxSizer* boxSizerLvl4_13 = new wxBoxSizer(wxVERTICAL);
1923 
1924  gridSizerLvl3_4->Add(boxSizerLvl4_13, 0, wxEXPAND, WXC_FROM_DIP(5));
1925 
1926  m_staticTextSecReactance = new wxStaticText(m_panelFault, wxID_ANY, _("Secondary reactance"), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1927 
1928  boxSizerLvl4_13->Add(m_staticTextSecReactance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1929 
1930  m_textCtrlSecReactance = new wxTextCtrl(m_panelFault, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelFault, wxSize(-1,-1)), 0);
1931  #if wxVERSION_NUMBER >= 3000
1932  m_textCtrlSecReactance->SetHint(wxT(""));
1933  #endif
1934 
1935  boxSizerLvl4_13->Add(m_textCtrlSecReactance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
1936 
1937  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
1938 
1939  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1940 
1941  m_buttonStability = new wxButton(this, wxID_ANY, _("Stability"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1942 
1943  boxSizerBottomButtons->Add(m_buttonStability, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
1944 
1945  boxSizerBottomButtons->Add(0, 0, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
1946 
1947  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1948 
1949  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
1950 
1951  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
1952 
1953  boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
1954 
1955 
1956  #if wxVERSION_NUMBER >= 2900
1957  if(!wxPersistenceManager::Get().Find(m_notebook)){
1958  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
1959  } else {
1960  wxPersistenceManager::Get().Restore(m_notebook);
1961  }
1962  #endif
1963 
1964  SetName(wxT("TransformerFormBase"));
1965  SetSize(-1,-1);
1966  if (GetSizer()) {
1967  GetSizer()->Fit(this);
1968  }
1969  if(GetParent()) {
1970  CentreOnParent(wxBOTH);
1971  } else {
1972  CentreOnScreen(wxBOTH);
1973  }
1974 #if wxVERSION_NUMBER >= 2900
1975  if(!wxPersistenceManager::Get().Find(this)) {
1976  wxPersistenceManager::Get().RegisterAndRestore(this);
1977  } else {
1978  wxPersistenceManager::Get().Restore(this);
1979  }
1980 #endif
1981  // Connect events
1982  m_buttonStability->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransformerFormBase::OnStabilityButtonClick), NULL, this);
1983  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransformerFormBase::OnOKButtonClick), NULL, this);
1984  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransformerFormBase::OnCancelButtonClick), NULL, this);
1985 
1986 }
1987 
1988 TransformerFormBase::~TransformerFormBase()
1989 {
1990  m_buttonStability->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransformerFormBase::OnStabilityButtonClick), NULL, this);
1991  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransformerFormBase::OnOKButtonClick), NULL, this);
1992  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransformerFormBase::OnCancelButtonClick), NULL, this);
1993 
1994 }
1995 
1996 LoadFormBase::LoadFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
1997  : wxDialog(parent, id, title, pos, size, style)
1998 {
1999  if ( !bBitmapLoaded ) {
2000  // We need to initialise the default bitmap handler
2001  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
2002  wxC9EE9InitBitmapResources();
2003  bBitmapLoaded = true;
2004  }
2005 
2006  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
2007  this->SetSizer(boxSizerLvl1_1);
2008 
2009  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
2010  m_notebook->SetName(wxT("m_notebook"));
2011 
2012  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
2013 
2014  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
2015  m_notebook->AddPage(m_panelGeneral, _("General"), false);
2016 
2017  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
2018  m_panelGeneral->SetSizer(boxSizerLvl2_1);
2019 
2020  m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2021 
2022  boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2023 
2024  m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2025  #if wxVERSION_NUMBER >= 3000
2026  m_textCtrlName->SetHint(wxT(""));
2027  #endif
2028 
2029  boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2030  m_textCtrlName->SetMinSize(wxSize(300,-1));
2031 
2032  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
2033 
2034  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2035 
2036  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
2037 
2038  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2039 
2040  m_staticTextActivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Active power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2041 
2042  boxSizerLvl4_1->Add(m_staticTextActivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2043 
2044  wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
2045 
2046  boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2047 
2048  m_textCtrlActivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2049  #if wxVERSION_NUMBER >= 3000
2050  m_textCtrlActivePower->SetHint(wxT(""));
2051  #endif
2052 
2053  boxSizerLvl5_1->Add(m_textCtrlActivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2054 
2055  wxArrayString m_choiceActivePowerArr;
2056  m_choiceActivePowerArr.Add(wxT("p.u."));
2057  m_choiceActivePowerArr.Add(wxT("W"));
2058  m_choiceActivePowerArr.Add(wxT("kW"));
2059  m_choiceActivePowerArr.Add(wxT("MW"));
2060  m_choiceActivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceActivePowerArr, 0);
2061  m_choiceActivePower->SetSelection(3);
2062 
2063  boxSizerLvl5_1->Add(m_choiceActivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
2064 
2065  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
2066 
2067  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
2068 
2069  m_staticTextReactivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Reactive power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2070 
2071  boxSizerLvl4_2->Add(m_staticTextReactivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2072 
2073  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
2074 
2075  boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
2076 
2077  m_textCtrlReactivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2078  #if wxVERSION_NUMBER >= 3000
2079  m_textCtrlReactivePower->SetHint(wxT(""));
2080  #endif
2081 
2082  boxSizerLvl5_2->Add(m_textCtrlReactivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2083 
2084  wxArrayString m_choiceReactivePowerArr;
2085  m_choiceReactivePowerArr.Add(wxT("p.u."));
2086  m_choiceReactivePowerArr.Add(wxT("VAr"));
2087  m_choiceReactivePowerArr.Add(wxT("kVAr"));
2088  m_choiceReactivePowerArr.Add(wxT("MVAr"));
2089  m_choiceReactivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceReactivePowerArr, 0);
2090  m_choiceReactivePower->SetSelection(3);
2091 
2092  boxSizerLvl5_2->Add(m_choiceReactivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
2093 
2094  m_staticTextType = new wxStaticText(m_panelGeneral, wxID_ANY, _("Load type (power flow)"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2095 
2096  boxSizerLvl2_1->Add(m_staticTextType, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2097 
2098  wxArrayString m_choiceTypeArr;
2099  m_choiceTypeArr.Add(wxT("Constant power"));
2100  m_choiceTypeArr.Add(wxT("Constant impedance"));
2101  m_choiceType = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceTypeArr, 0);
2102  m_choiceType->SetSelection(0);
2103 
2104  boxSizerLvl2_1->Add(m_choiceType, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
2105 
2106  m_panelStability = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
2107  m_notebook->AddPage(m_panelStability, _("Stability"), false);
2108 
2109  wxBoxSizer* boxSizerLvl2_2 = new wxBoxSizer(wxVERTICAL);
2110  m_panelStability->SetSizer(boxSizerLvl2_2);
2111 
2112  m_checkBoxPlotData = new wxCheckBox(m_panelStability, wxID_ANY, _("Plot load data"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2113  m_checkBoxPlotData->SetValue(false);
2114 
2115  boxSizerLvl2_2->Add(m_checkBoxPlotData, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2116 
2117  m_checkBoxUseCompLoad = new wxCheckBox(m_panelStability, wxID_ANY, _("Use ZIP load composition"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2118  m_checkBoxUseCompLoad->SetValue(false);
2119 
2120  boxSizerLvl2_2->Add(m_checkBoxUseCompLoad, 0, wxALL, WXC_FROM_DIP(5));
2121 
2122  wxGridSizer* gridSizerLvl3_2 = new wxGridSizer(0, 2, 0, 0);
2123 
2124  boxSizerLvl2_2->Add(gridSizerLvl3_2, 1, wxEXPAND, WXC_FROM_DIP(5));
2125 
2126  wxStaticBoxSizer* staticBoxSizerLvl4_3 = new wxStaticBoxSizer( new wxStaticBox(m_panelStability, wxID_ANY, _("Active power")), wxVERTICAL);
2127 
2128  gridSizerLvl3_2->Add(staticBoxSizerLvl4_3, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
2129 
2130  wxBoxSizer* boxSizerLvl5_3 = new wxBoxSizer(wxVERTICAL);
2131 
2132  staticBoxSizerLvl4_3->Add(boxSizerLvl5_3, 0, wxEXPAND, WXC_FROM_DIP(5));
2133 
2134  m_staticTextActivePowerImp = new wxStaticText(m_panelStability, wxID_ANY, _("Constant impedance"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2135 
2136  boxSizerLvl5_3->Add(m_staticTextActivePowerImp, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2137 
2138  wxBoxSizer* boxSizerLvl6_1 = new wxBoxSizer(wxHORIZONTAL);
2139 
2140  boxSizerLvl5_3->Add(boxSizerLvl6_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2141 
2142  m_textCtrlActivePowerImp = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("100"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2143  #if wxVERSION_NUMBER >= 3000
2144  m_textCtrlActivePowerImp->SetHint(wxT(""));
2145  #endif
2146 
2147  boxSizerLvl6_1->Add(m_textCtrlActivePowerImp, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2148 
2149  m_staticTextPerc_1 = new wxStaticText(m_panelStability, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2150 
2151  boxSizerLvl6_1->Add(m_staticTextPerc_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2152 
2153  wxBoxSizer* boxSizerLvl5_4 = new wxBoxSizer(wxVERTICAL);
2154 
2155  staticBoxSizerLvl4_3->Add(boxSizerLvl5_4, 0, wxEXPAND, WXC_FROM_DIP(5));
2156 
2157  m_staticTextActivePowerCur = new wxStaticText(m_panelStability, wxID_ANY, _("Constant current"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2158 
2159  boxSizerLvl5_4->Add(m_staticTextActivePowerCur, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2160 
2161  wxBoxSizer* boxSizerLvl6_2 = new wxBoxSizer(wxHORIZONTAL);
2162 
2163  boxSizerLvl5_4->Add(boxSizerLvl6_2, 0, wxEXPAND, WXC_FROM_DIP(5));
2164 
2165  m_textCtrlActivePowerCur = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2166  #if wxVERSION_NUMBER >= 3000
2167  m_textCtrlActivePowerCur->SetHint(wxT(""));
2168  #endif
2169 
2170  boxSizerLvl6_2->Add(m_textCtrlActivePowerCur, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2171 
2172  m_staticTextPerc_2 = new wxStaticText(m_panelStability, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2173 
2174  boxSizerLvl6_2->Add(m_staticTextPerc_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2175 
2176  wxBoxSizer* boxSizerLvl5_5 = new wxBoxSizer(wxVERTICAL);
2177 
2178  staticBoxSizerLvl4_3->Add(boxSizerLvl5_5, 0, wxEXPAND, WXC_FROM_DIP(5));
2179 
2180  m_staticTextActivePowerPow = new wxStaticText(m_panelStability, wxID_ANY, _("Constant power"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2181 
2182  boxSizerLvl5_5->Add(m_staticTextActivePowerPow, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2183 
2184  wxBoxSizer* boxSizerLvl6_3 = new wxBoxSizer(wxHORIZONTAL);
2185 
2186  boxSizerLvl5_5->Add(boxSizerLvl6_3, 0, wxEXPAND, WXC_FROM_DIP(5));
2187 
2188  m_textCtrlActivePowerPow = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2189  #if wxVERSION_NUMBER >= 3000
2190  m_textCtrlActivePowerPow->SetHint(wxT(""));
2191  #endif
2192 
2193  boxSizerLvl6_3->Add(m_textCtrlActivePowerPow, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2194 
2195  m_staticTextPerc_3 = new wxStaticText(m_panelStability, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2196 
2197  boxSizerLvl6_3->Add(m_staticTextPerc_3, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2198 
2199  wxStaticBoxSizer* staticBoxSizerLvl4_4 = new wxStaticBoxSizer( new wxStaticBox(m_panelStability, wxID_ANY, _("Reactive power")), wxVERTICAL);
2200 
2201  gridSizerLvl3_2->Add(staticBoxSizerLvl4_4, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
2202 
2203  wxBoxSizer* boxSizerLvl5_6 = new wxBoxSizer(wxVERTICAL);
2204 
2205  staticBoxSizerLvl4_4->Add(boxSizerLvl5_6, 0, wxEXPAND, WXC_FROM_DIP(5));
2206 
2207  m_staticTextReactivePowerImp = new wxStaticText(m_panelStability, wxID_ANY, _("Constant impedance"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2208 
2209  boxSizerLvl5_6->Add(m_staticTextReactivePowerImp, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2210 
2211  wxBoxSizer* boxSizerLvl6_4 = new wxBoxSizer(wxHORIZONTAL);
2212 
2213  boxSizerLvl5_6->Add(boxSizerLvl6_4, 0, wxEXPAND, WXC_FROM_DIP(5));
2214 
2215  m_textCtrlReactivePowerImp = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("100"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2216  #if wxVERSION_NUMBER >= 3000
2217  m_textCtrlReactivePowerImp->SetHint(wxT(""));
2218  #endif
2219 
2220  boxSizerLvl6_4->Add(m_textCtrlReactivePowerImp, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2221 
2222  m_staticTextPerc_4 = new wxStaticText(m_panelStability, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2223 
2224  boxSizerLvl6_4->Add(m_staticTextPerc_4, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2225 
2226  wxBoxSizer* boxSizerLvl5_7 = new wxBoxSizer(wxVERTICAL);
2227 
2228  staticBoxSizerLvl4_4->Add(boxSizerLvl5_7, 0, wxEXPAND, WXC_FROM_DIP(5));
2229 
2230  m_staticTextReactivePowerCur = new wxStaticText(m_panelStability, wxID_ANY, _("Constant current"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2231 
2232  boxSizerLvl5_7->Add(m_staticTextReactivePowerCur, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2233 
2234  wxBoxSizer* boxSizerLvl6_5 = new wxBoxSizer(wxHORIZONTAL);
2235 
2236  boxSizerLvl5_7->Add(boxSizerLvl6_5, 0, wxEXPAND, WXC_FROM_DIP(5));
2237 
2238  m_textCtrlReactivePowerCur = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2239  #if wxVERSION_NUMBER >= 3000
2240  m_textCtrlReactivePowerCur->SetHint(wxT(""));
2241  #endif
2242 
2243  boxSizerLvl6_5->Add(m_textCtrlReactivePowerCur, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2244 
2245  m_staticTextPerc_5 = new wxStaticText(m_panelStability, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2246 
2247  boxSizerLvl6_5->Add(m_staticTextPerc_5, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2248 
2249  wxBoxSizer* boxSizerLvl5_8 = new wxBoxSizer(wxVERTICAL);
2250 
2251  staticBoxSizerLvl4_4->Add(boxSizerLvl5_8, 0, wxEXPAND, WXC_FROM_DIP(5));
2252 
2253  m_staticTextReactivePowerPow = new wxStaticText(m_panelStability, wxID_ANY, _("Constant power"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2254 
2255  boxSizerLvl5_8->Add(m_staticTextReactivePowerPow, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2256 
2257  wxBoxSizer* boxSizerLvl6_6 = new wxBoxSizer(wxHORIZONTAL);
2258 
2259  boxSizerLvl5_8->Add(boxSizerLvl6_6, 0, wxEXPAND, WXC_FROM_DIP(5));
2260 
2261  m_textCtrlReactivePowerPow = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2262  #if wxVERSION_NUMBER >= 3000
2263  m_textCtrlReactivePowerPow->SetHint(wxT(""));
2264  #endif
2265 
2266  boxSizerLvl6_6->Add(m_textCtrlReactivePowerPow, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2267 
2268  m_staticTextPerc_6 = new wxStaticText(m_panelStability, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
2269 
2270  boxSizerLvl6_6->Add(m_staticTextPerc_6, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2271 
2272  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
2273 
2274  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
2275 
2276  m_buttonStabButton = new wxButton(this, wxID_ANY, _("Switching"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2277 
2278  boxSizerBottomButtons->Add(m_buttonStabButton, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
2279 
2280  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
2281 
2282  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2283 
2284  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2285 
2286  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2287 
2288  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2289 
2290 
2291  #if wxVERSION_NUMBER >= 2900
2292  if(!wxPersistenceManager::Get().Find(m_notebook)){
2293  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
2294  } else {
2295  wxPersistenceManager::Get().Restore(m_notebook);
2296  }
2297  #endif
2298 
2299  SetName(wxT("LoadFormBase"));
2300  SetSize(-1,-1);
2301  if (GetSizer()) {
2302  GetSizer()->Fit(this);
2303  }
2304  if(GetParent()) {
2305  CentreOnParent(wxBOTH);
2306  } else {
2307  CentreOnScreen(wxBOTH);
2308  }
2309 #if wxVERSION_NUMBER >= 2900
2310  if(!wxPersistenceManager::Get().Find(this)) {
2311  wxPersistenceManager::Get().RegisterAndRestore(this);
2312  } else {
2313  wxPersistenceManager::Get().Restore(this);
2314  }
2315 #endif
2316  // Connect events
2317  m_checkBoxUseCompLoad->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(LoadFormBase::OnCheckBoxCompLoadClick), NULL, this);
2318  m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnStabilityButtonClick), NULL, this);
2319  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnOnButtonClick), NULL, this);
2320  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnCancelButtonClick), NULL, this);
2321 
2322 }
2323 
2324 LoadFormBase::~LoadFormBase()
2325 {
2326  m_checkBoxUseCompLoad->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(LoadFormBase::OnCheckBoxCompLoadClick), NULL, this);
2327  m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnStabilityButtonClick), NULL, this);
2328  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnOnButtonClick), NULL, this);
2329  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LoadFormBase::OnCancelButtonClick), NULL, this);
2330 
2331 }
2332 
2333 ReactiveShuntElementFormBase::ReactiveShuntElementFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
2334  : wxDialog(parent, id, title, pos, size, style)
2335 {
2336  if ( !bBitmapLoaded ) {
2337  // We need to initialise the default bitmap handler
2338  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
2339  wxC9EE9InitBitmapResources();
2340  bBitmapLoaded = true;
2341  }
2342 
2343  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
2344  this->SetSizer(boxSizerLvl1_1);
2345 
2346  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
2347  m_notebook->SetName(wxT("m_notebook"));
2348 
2349  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
2350 
2351  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
2352  m_notebook->AddPage(m_panelGeneral, _("General"), false);
2353 
2354  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
2355  m_panelGeneral->SetSizer(boxSizerLvl2_1);
2356 
2357  m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2358 
2359  boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2360 
2361  m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2362  #if wxVERSION_NUMBER >= 3000
2363  m_textCtrlName->SetHint(wxT(""));
2364  #endif
2365 
2366  boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2367  m_textCtrlName->SetMinSize(wxSize(300,-1));
2368 
2369  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
2370 
2371  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2372 
2373  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
2374 
2375  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
2376 
2377  m_staticTextReactivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Reactive power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2378 
2379  boxSizerLvl4_2->Add(m_staticTextReactivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2380 
2381  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
2382 
2383  boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
2384 
2385  m_textCtrlReactivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2386  #if wxVERSION_NUMBER >= 3000
2387  m_textCtrlReactivePower->SetHint(wxT(""));
2388  #endif
2389 
2390  boxSizerLvl5_2->Add(m_textCtrlReactivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2391 
2392  wxArrayString m_choiceReactivePowerArr;
2393  m_choiceReactivePowerArr.Add(wxT("p.u."));
2394  m_choiceReactivePowerArr.Add(wxT("VAr"));
2395  m_choiceReactivePowerArr.Add(wxT("kVAr"));
2396  m_choiceReactivePowerArr.Add(wxT("MVAr"));
2397  m_choiceReactivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceReactivePowerArr, 0);
2398  m_choiceReactivePower->SetSelection(3);
2399 
2400  boxSizerLvl5_2->Add(m_choiceReactivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
2401 
2402  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
2403 
2404  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
2405 
2406  m_buttonStabButton = new wxButton(this, wxID_ANY, _("Stability"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2407 
2408  boxSizerBottomButtons->Add(m_buttonStabButton, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
2409 
2410  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
2411 
2412  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2413 
2414  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2415 
2416  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2417 
2418  boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2419 
2420 
2421  #if wxVERSION_NUMBER >= 2900
2422  if(!wxPersistenceManager::Get().Find(m_notebook)){
2423  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
2424  } else {
2425  wxPersistenceManager::Get().Restore(m_notebook);
2426  }
2427  #endif
2428 
2429  SetName(wxT("ReactiveShuntElementFormBase"));
2430  SetSize(-1,-1);
2431  if (GetSizer()) {
2432  GetSizer()->Fit(this);
2433  }
2434  if(GetParent()) {
2435  CentreOnParent(wxBOTH);
2436  } else {
2437  CentreOnScreen(wxBOTH);
2438  }
2439 #if wxVERSION_NUMBER >= 2900
2440  if(!wxPersistenceManager::Get().Find(this)) {
2441  wxPersistenceManager::Get().RegisterAndRestore(this);
2442  } else {
2443  wxPersistenceManager::Get().Restore(this);
2444  }
2445 #endif
2446  // Connect events
2447  m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnStabilityButtonClick), NULL, this);
2448  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnOKButtonClick), NULL, this);
2449  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnCancelButtonClick), NULL, this);
2450 
2451 }
2452 
2453 ReactiveShuntElementFormBase::~ReactiveShuntElementFormBase()
2454 {
2455  m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnStabilityButtonClick), NULL, this);
2456  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnOKButtonClick), NULL, this);
2457  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ReactiveShuntElementFormBase::OnCancelButtonClick), NULL, this);
2458 
2459 }
2460 
2461 SwitchingFormBase::SwitchingFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
2462  : wxDialog(parent, id, title, pos, size, style)
2463 {
2464  if ( !bBitmapLoaded ) {
2465  // We need to initialise the default bitmap handler
2466  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
2467  wxC9EE9InitBitmapResources();
2468  bBitmapLoaded = true;
2469  }
2470 
2471  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
2472  this->SetSizer(boxSizerLvl1_1);
2473 
2474  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxHORIZONTAL);
2475 
2476  boxSizerLvl1_1->Add(boxSizerLvl2_1, 0, wxALL, WXC_FROM_DIP(5));
2477 
2478  wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL);
2479 
2480  boxSizerLvl2_1->Add(boxSizerLvl3_1, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
2481 
2482  wxArrayString m_pgMgrSwitchingsPropArr;
2483  wxUnusedVar(m_pgMgrSwitchingsPropArr);
2484  wxArrayInt m_pgMgrSwitchingsPropIntArr;
2485  wxUnusedVar(m_pgMgrSwitchingsPropIntArr);
2486  m_pgMgrSwitchingsProp = new wxPropertyGridManager(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxPG_STATIC_LAYOUT|wxPG_SPLITTER_AUTO_CENTER|wxPG_BOLD_MODIFIED);
2487 
2488  boxSizerLvl3_1->Add(m_pgMgrSwitchingsProp, 1, wxALL, WXC_FROM_DIP(5));
2489 
2490  m_pgPropTitle = m_pgMgrSwitchingsProp->Append( new wxPropertyCategory( _("Switching properties") ) );
2491  m_pgPropTitle->SetHelpString(wxT(""));
2492 
2493  m_pgMgrSwitchingsPropArr.Clear();
2494  m_pgMgrSwitchingsPropIntArr.Clear();
2495  m_pgMgrSwitchingsPropArr.Add(_("Insert"));
2496  m_pgMgrSwitchingsPropArr.Add(_("Remove"));
2497  m_pgPropType = m_pgMgrSwitchingsProp->Append( new wxEnumProperty( _("Type"), wxPG_LABEL, m_pgMgrSwitchingsPropArr, m_pgMgrSwitchingsPropIntArr, 0) );
2498  m_pgPropType->SetHelpString(wxT(""));
2499 
2500  m_pgPropTime = m_pgMgrSwitchingsProp->Append( new wxFloatProperty( _("Time (s)"), wxPG_LABEL, 0) );
2501  m_pgPropTime->SetHelpString(wxT(""));
2502  m_pgMgrSwitchingsProp->SetMinSize(wxSize(150,-1));
2503 
2504  wxBoxSizer* boxSizerLvl3_3 = new wxBoxSizer(wxVERTICAL);
2505 
2506  boxSizerLvl2_1->Add(boxSizerLvl3_3, 0, wxALL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2507 
2508  m_buttonInsert = new wxButton(this, wxID_ANY, _("Add"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2509 
2510  boxSizerLvl3_3->Add(m_buttonInsert, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2511 
2512  m_buttonRemove = new wxButton(this, wxID_ANY, _("Remove"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2513 
2514  boxSizerLvl3_3->Add(m_buttonRemove, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2515 
2516  m_buttonUp = new wxButton(this, wxID_ANY, _("Up"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2517 
2518  boxSizerLvl3_3->Add(m_buttonUp, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2519 
2520  m_buttonDown = new wxButton(this, wxID_ANY, _("Down"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2521 
2522  boxSizerLvl3_3->Add(m_buttonDown, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2523 
2524  wxBoxSizer* boxSizerLvl3_2 = new wxBoxSizer(wxVERTICAL);
2525 
2526  boxSizerLvl2_1->Add(boxSizerLvl3_2, 0, wxALL, WXC_FROM_DIP(5));
2527 
2528  m_staticTextSwList = new wxStaticText(this, wxID_ANY, _("Switching list"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2529 
2530  boxSizerLvl3_2->Add(m_staticTextSwList, 0, wxLEFT|wxRIGHT|wxTOP, WXC_FROM_DIP(5));
2531 
2532  m_listCtrlSwitchings = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxLC_REPORT);
2533 
2534  boxSizerLvl3_2->Add(m_listCtrlSwitchings, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
2535 
2536  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
2537 
2538  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2539 
2540  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2541 
2542  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2543 
2544  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2545 
2546  boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2547 
2548  SetName(wxT("SwitchingFormBase"));
2549  SetSize(-1,-1);
2550  if (GetSizer()) {
2551  GetSizer()->Fit(this);
2552  }
2553  if(GetParent()) {
2554  CentreOnParent(wxBOTH);
2555  } else {
2556  CentreOnScreen(wxBOTH);
2557  }
2558 #if wxVERSION_NUMBER >= 2900
2559  if(!wxPersistenceManager::Get().Find(this)) {
2560  wxPersistenceManager::Get().RegisterAndRestore(this);
2561  } else {
2562  wxPersistenceManager::Get().Restore(this);
2563  }
2564 #endif
2565  // Connect events
2566  m_pgMgrSwitchingsProp->Connect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(SwitchingFormBase::OnChangeProperties), NULL, this);
2567  m_buttonInsert->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnInsertButtonClick), NULL, this);
2568  m_buttonRemove->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnRemoveButtonClick), NULL, this);
2569  m_buttonUp->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnUpButtonClick), NULL, this);
2570  m_buttonDown->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnDownButtonClick), NULL, this);
2571  m_listCtrlSwitchings->Connect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(SwitchingFormBase::OnSelectItem), NULL, this);
2572  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnOKButtonClick), NULL, this);
2573  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnCancelButtonClick), NULL, this);
2574 
2575 }
2576 
2577 SwitchingFormBase::~SwitchingFormBase()
2578 {
2579  m_pgMgrSwitchingsProp->Disconnect(wxEVT_PG_CHANGED, wxPropertyGridEventHandler(SwitchingFormBase::OnChangeProperties), NULL, this);
2580  m_buttonInsert->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnInsertButtonClick), NULL, this);
2581  m_buttonRemove->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnRemoveButtonClick), NULL, this);
2582  m_buttonUp->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnUpButtonClick), NULL, this);
2583  m_buttonDown->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnDownButtonClick), NULL, this);
2584  m_listCtrlSwitchings->Disconnect(wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler(SwitchingFormBase::OnSelectItem), NULL, this);
2585  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnOKButtonClick), NULL, this);
2586  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SwitchingFormBase::OnCancelButtonClick), NULL, this);
2587 
2588 }
2589 
2590 IndMotorFormBase::IndMotorFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
2591  : wxDialog(parent, id, title, pos, size, style)
2592 {
2593  if ( !bBitmapLoaded ) {
2594  // We need to initialise the default bitmap handler
2595  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
2596  wxC9EE9InitBitmapResources();
2597  bBitmapLoaded = true;
2598  }
2599 
2600  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
2601  this->SetSizer(boxSizerLvl1_1);
2602 
2603  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
2604  m_notebook->SetName(wxT("m_notebook"));
2605 
2606  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
2607 
2608  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
2609  m_notebook->AddPage(m_panelGeneral, _("General"), false);
2610 
2611  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
2612  m_panelGeneral->SetSizer(boxSizerLvl2_1);
2613 
2614  m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2615 
2616  boxSizerLvl2_1->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2617 
2618  m_textCtrlName = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2619  #if wxVERSION_NUMBER >= 3000
2620  m_textCtrlName->SetHint(wxT(""));
2621  #endif
2622 
2623  boxSizerLvl2_1->Add(m_textCtrlName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2624  m_textCtrlName->SetMinSize(wxSize(300,-1));
2625 
2626  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 2, 0, 0);
2627 
2628  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2629 
2630  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
2631 
2632  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2633 
2634  m_staticTextActivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Active power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2635 
2636  boxSizerLvl4_1->Add(m_staticTextActivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2637 
2638  wxBoxSizer* boxSizerLvl5_1 = new wxBoxSizer(wxHORIZONTAL);
2639 
2640  boxSizerLvl4_1->Add(boxSizerLvl5_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2641 
2642  m_textCtrlActivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2643  #if wxVERSION_NUMBER >= 3000
2644  m_textCtrlActivePower->SetHint(wxT(""));
2645  #endif
2646 
2647  boxSizerLvl5_1->Add(m_textCtrlActivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2648 
2649  wxArrayString m_choiceActivePowerArr;
2650  m_choiceActivePowerArr.Add(wxT("p.u."));
2651  m_choiceActivePowerArr.Add(wxT("W"));
2652  m_choiceActivePowerArr.Add(wxT("kW"));
2653  m_choiceActivePowerArr.Add(wxT("MW"));
2654  m_choiceActivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceActivePowerArr, 0);
2655  m_choiceActivePower->SetSelection(3);
2656 
2657  boxSizerLvl5_1->Add(m_choiceActivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
2658 
2659  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
2660 
2661  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
2662 
2663  m_staticTextReactivePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Reactive power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2664 
2665  boxSizerLvl4_2->Add(m_staticTextReactivePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2666 
2667  wxBoxSizer* boxSizerLvl5_2 = new wxBoxSizer(wxHORIZONTAL);
2668 
2669  boxSizerLvl4_2->Add(boxSizerLvl5_2, 0, wxEXPAND, WXC_FROM_DIP(5));
2670 
2671  m_textCtrlReactivePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2672  #if wxVERSION_NUMBER >= 3000
2673  m_textCtrlReactivePower->SetHint(wxT(""));
2674  #endif
2675 
2676  boxSizerLvl5_2->Add(m_textCtrlReactivePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2677 
2678  wxArrayString m_choiceReactivePowerArr;
2679  m_choiceReactivePowerArr.Add(wxT("p.u."));
2680  m_choiceReactivePowerArr.Add(wxT("VAr"));
2681  m_choiceReactivePowerArr.Add(wxT("kVAr"));
2682  m_choiceReactivePowerArr.Add(wxT("MVAr"));
2683  m_choiceReactivePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceReactivePowerArr, 0);
2684  m_choiceReactivePower->SetSelection(3);
2685 
2686  boxSizerLvl5_2->Add(m_choiceReactivePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
2687 
2688  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
2689 
2690  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
2691 
2692  m_buttonStabButton = new wxButton(this, wxID_ANY, _("Stability"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2693 
2694  boxSizerBottomButtons->Add(m_buttonStabButton, 0, wxALL|wxALIGN_LEFT, WXC_FROM_DIP(5));
2695 
2696  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
2697 
2698  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2699 
2700  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2701 
2702  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2703 
2704  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2705 
2706 
2707  #if wxVERSION_NUMBER >= 2900
2708  if(!wxPersistenceManager::Get().Find(m_notebook)){
2709  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
2710  } else {
2711  wxPersistenceManager::Get().Restore(m_notebook);
2712  }
2713  #endif
2714 
2715  SetName(wxT("IndMotorFormBase"));
2716  SetSize(-1,-1);
2717  if (GetSizer()) {
2718  GetSizer()->Fit(this);
2719  }
2720  if(GetParent()) {
2721  CentreOnParent(wxBOTH);
2722  } else {
2723  CentreOnScreen(wxBOTH);
2724  }
2725 #if wxVERSION_NUMBER >= 2900
2726  if(!wxPersistenceManager::Get().Find(this)) {
2727  wxPersistenceManager::Get().RegisterAndRestore(this);
2728  } else {
2729  wxPersistenceManager::Get().Restore(this);
2730  }
2731 #endif
2732  // Connect events
2733  m_buttonStabButton->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnStabilityButtonClick), NULL, this);
2734  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnOKButtonClick), NULL, this);
2735  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnCancelButtonClick), NULL, this);
2736 
2737 }
2738 
2739 IndMotorFormBase::~IndMotorFormBase()
2740 {
2741  m_buttonStabButton->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnStabilityButtonClick), NULL, this);
2742  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnOKButtonClick), NULL, this);
2743  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IndMotorFormBase::OnCancelButtonClick), NULL, this);
2744 
2745 }
2746 
2747 TextFormBase::TextFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
2748  : wxDialog(parent, id, title, pos, size, style)
2749 {
2750  if ( !bBitmapLoaded ) {
2751  // We need to initialise the default bitmap handler
2752  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
2753  wxC9EE9InitBitmapResources();
2754  bBitmapLoaded = true;
2755  }
2756 
2757  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
2758  this->SetSizer(boxSizerLvl1_1);
2759 
2760  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
2761  m_notebook->SetName(wxT("m_notebook"));
2762 
2763  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
2764 
2765  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
2766  m_notebook->AddPage(m_panelGeneral, _("General"), false);
2767 
2768  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
2769  m_panelGeneral->SetSizer(boxSizerLvl2_1);
2770 
2771  wxGridSizer* gridSizerLvl3_1 = new wxGridSizer(0, 3, 0, 0);
2772 
2773  boxSizerLvl2_1->Add(gridSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2774 
2775  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxVERTICAL);
2776 
2777  gridSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
2778 
2779  m_staticTextElement = new wxStaticText(m_panelGeneral, wxID_ANY, _("Element"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2780 
2781  boxSizerLvl4_1->Add(m_staticTextElement, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2782 
2783  wxArrayString m_choiceElementArr;
2784  m_choiceElementArr.Add(wxT("Bus"));
2785  m_choiceElementArr.Add(wxT("Generator"));
2786  m_choiceElementArr.Add(wxT("Line"));
2787  m_choiceElementArr.Add(wxT("Transformer"));
2788  m_choiceElementArr.Add(wxT("Load"));
2789  m_choiceElementArr.Add(wxT("Capacitor"));
2790  m_choiceElementArr.Add(wxT("Inductor"));
2791  m_choiceElementArr.Add(wxT("Synchronous compensator"));
2792  m_choiceElementArr.Add(wxT("Induction motor"));
2793  m_choiceElement = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceElementArr, 0);
2794 
2795  boxSizerLvl4_1->Add(m_choiceElement, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
2796 
2797  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
2798 
2799  gridSizerLvl3_1->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
2800 
2801  m_staticTextName = new wxStaticText(m_panelGeneral, wxID_ANY, _("Element name"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2802 
2803  boxSizerLvl4_2->Add(m_staticTextName, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2804 
2805  wxArrayString m_choiceNameArr;
2806  m_choiceName = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceNameArr, 0);
2807 
2808  boxSizerLvl4_2->Add(m_choiceName, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
2809 
2810  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
2811 
2812  gridSizerLvl3_1->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
2813 
2814  m_staticTextType = new wxStaticText(m_panelGeneral, wxID_ANY, _("Text type"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2815 
2816  boxSizerLvl4_3->Add(m_staticTextType, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2817 
2818  wxArrayString m_choiceTextTypeArr;
2819  m_choiceTextType = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceTextTypeArr, 0);
2820 
2821  boxSizerLvl4_3->Add(m_choiceTextType, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
2822 
2823  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
2824 
2825  gridSizerLvl3_1->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5));
2826 
2827  m_staticTextFromBus = new wxStaticText(m_panelGeneral, wxID_ANY, _("From bus"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2828 
2829  boxSizerLvl4_4->Add(m_staticTextFromBus, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2830 
2831  wxArrayString m_choiceTextFromBusArr;
2832  m_choiceTextFromBus = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceTextFromBusArr, 0);
2833 
2834  boxSizerLvl4_4->Add(m_choiceTextFromBus, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
2835 
2836  wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxVERTICAL);
2837 
2838  gridSizerLvl3_1->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5));
2839 
2840  m_staticTextToBus = new wxStaticText(m_panelGeneral, wxID_ANY, _("To bus"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2841 
2842  boxSizerLvl4_5->Add(m_staticTextToBus, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2843 
2844  wxArrayString m_choiceTextToBusArr;
2845  m_choiceTextToBus = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceTextToBusArr, 0);
2846 
2847  boxSizerLvl4_5->Add(m_choiceTextToBus, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
2848 
2849  wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxVERTICAL);
2850 
2851  gridSizerLvl3_1->Add(boxSizerLvl4_6, 0, wxEXPAND, WXC_FROM_DIP(5));
2852 
2853  m_staticTextUnit = new wxStaticText(m_panelGeneral, wxID_ANY, _("Unit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2854 
2855  boxSizerLvl4_6->Add(m_staticTextUnit, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2856 
2857  wxArrayString m_choiceTextUnitArr;
2858  m_choiceTextUnit = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceTextUnitArr, 0);
2859 
2860  boxSizerLvl4_6->Add(m_choiceTextUnit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
2861 
2862  wxBoxSizer* boxSizerLvl3_2 = new wxBoxSizer(wxHORIZONTAL);
2863 
2864  boxSizerLvl2_1->Add(boxSizerLvl3_2, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
2865 
2866  m_staticTextDecimal = new wxStaticText(m_panelGeneral, wxID_ANY, _("Decimal places:"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2867 
2868  boxSizerLvl3_2->Add(m_staticTextDecimal, 0, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2869 
2870  m_textCtrlDecimal = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("2"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), wxTE_PROCESS_ENTER);
2871  #if wxVERSION_NUMBER >= 3000
2872  m_textCtrlDecimal->SetHint(wxT(""));
2873  #endif
2874 
2875  boxSizerLvl3_2->Add(m_textCtrlDecimal, 0, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2876 
2877  boxSizerLvl3_2->Add(0, 0, 0, wxALL, WXC_FROM_DIP(5));
2878 
2879  m_staticTextPreview = new wxStaticText(m_panelGeneral, wxID_ANY, _("Preview:"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2880 
2881  boxSizerLvl3_2->Add(m_staticTextPreview, 0, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2882 
2883  m_textCtrlPreview = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), wxTE_CENTRE);
2884  #if wxVERSION_NUMBER >= 3000
2885  m_textCtrlPreview->SetHint(wxT(""));
2886  #endif
2887 
2888  boxSizerLvl3_2->Add(m_textCtrlPreview, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2889 
2890  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
2891 
2892  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
2893 
2894  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
2895 
2896  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2897 
2898  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2899 
2900  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
2901 
2902  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
2903 
2904 
2905  #if wxVERSION_NUMBER >= 2900
2906  if(!wxPersistenceManager::Get().Find(m_notebook)){
2907  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
2908  } else {
2909  wxPersistenceManager::Get().Restore(m_notebook);
2910  }
2911  #endif
2912 
2913  SetName(wxT("TextFormBase"));
2914  SetSize(-1,-1);
2915  if (GetSizer()) {
2916  GetSizer()->Fit(this);
2917  }
2918  if(GetParent()) {
2919  CentreOnParent(wxBOTH);
2920  } else {
2921  CentreOnScreen(wxBOTH);
2922  }
2923 #if wxVERSION_NUMBER >= 2900
2924  if(!wxPersistenceManager::Get().Find(this)) {
2925  wxPersistenceManager::Get().RegisterAndRestore(this);
2926  } else {
2927  wxPersistenceManager::Get().Restore(this);
2928  }
2929 #endif
2930  // Connect events
2931  m_choiceElement->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnElementChoiceSelected), NULL, this);
2932  m_choiceName->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnNameChoiceSelected), NULL, this);
2933  m_choiceTextType->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnTypeChoiceSelected), NULL, this);
2934  m_choiceTextFromBus->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnFromBusChoiceSelected), NULL, this);
2935  m_choiceTextToBus->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnToBusChoiceSelected), NULL, this);
2936  m_choiceTextUnit->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnUnitChoiceSelected), NULL, this);
2937  m_textCtrlDecimal->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(TextFormBase::OnTextEnter), NULL, this);
2938  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TextFormBase::OnOKButtonClick), NULL, this);
2939  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TextFormBase::OnCancelButtonClick), NULL, this);
2940 
2941 }
2942 
2943 TextFormBase::~TextFormBase()
2944 {
2945  m_choiceElement->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnElementChoiceSelected), NULL, this);
2946  m_choiceName->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnNameChoiceSelected), NULL, this);
2947  m_choiceTextType->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnTypeChoiceSelected), NULL, this);
2948  m_choiceTextFromBus->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnFromBusChoiceSelected), NULL, this);
2949  m_choiceTextToBus->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnToBusChoiceSelected), NULL, this);
2950  m_choiceTextUnit->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(TextFormBase::OnUnitChoiceSelected), NULL, this);
2951  m_textCtrlDecimal->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(TextFormBase::OnTextEnter), NULL, this);
2952  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TextFormBase::OnOKButtonClick), NULL, this);
2953  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TextFormBase::OnCancelButtonClick), NULL, this);
2954 
2955 }
2956 
2957 TransferFunctionFormBase::TransferFunctionFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
2958  : wxDialog(parent, id, title, pos, size, style)
2959 {
2960  if ( !bBitmapLoaded ) {
2961  // We need to initialise the default bitmap handler
2962  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
2963  wxC9EE9InitBitmapResources();
2964  bBitmapLoaded = true;
2965  }
2966 
2967  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
2968  this->SetSizer(boxSizerLvl1_1);
2969 
2970  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
2971  m_notebook->SetName(wxT("m_notebook"));
2972 
2973  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
2974 
2975  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
2976  m_notebook->AddPage(m_panelGeneral, _("General"), false);
2977 
2978  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
2979  m_panelGeneral->SetSizer(boxSizerLvl2_1);
2980 
2981  m_staticTextNumerator = new wxStaticText(m_panelGeneral, wxID_ANY, _("Numerator parameters"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2982 
2983  boxSizerLvl2_1->Add(m_staticTextNumerator, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2984 
2985  m_textCtrlNumerator = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2986  #if wxVERSION_NUMBER >= 3000
2987  m_textCtrlNumerator->SetHint(wxT(""));
2988  #endif
2989 
2990  boxSizerLvl2_1->Add(m_textCtrlNumerator, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2991  m_textCtrlNumerator->SetMinSize(wxSize(300,-1));
2992 
2993  m_staticTextDenominator = new wxStaticText(m_panelGeneral, wxID_ANY, _("Denominator parameters"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2994 
2995  boxSizerLvl2_1->Add(m_staticTextDenominator, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
2996 
2997  m_textCtrlDenominator = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
2998  #if wxVERSION_NUMBER >= 3000
2999  m_textCtrlDenominator->SetHint(wxT(""));
3000  #endif
3001 
3002  boxSizerLvl2_1->Add(m_textCtrlDenominator, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3003  m_textCtrlDenominator->SetMinSize(wxSize(300,-1));
3004 
3005  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
3006 
3007  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
3008 
3009  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
3010 
3011  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3012 
3013  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3014 
3015  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3016 
3017  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3018 
3019 
3020  #if wxVERSION_NUMBER >= 2900
3021  if(!wxPersistenceManager::Get().Find(m_notebook)){
3022  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
3023  } else {
3024  wxPersistenceManager::Get().Restore(m_notebook);
3025  }
3026  #endif
3027 
3028  SetName(wxT("TransferFunctionFormBase"));
3029  SetSize(-1,-1);
3030  if (GetSizer()) {
3031  GetSizer()->Fit(this);
3032  }
3033  if(GetParent()) {
3034  CentreOnParent(wxBOTH);
3035  } else {
3036  CentreOnScreen(wxBOTH);
3037  }
3038 #if wxVERSION_NUMBER >= 2900
3039  if(!wxPersistenceManager::Get().Find(this)) {
3040  wxPersistenceManager::Get().RegisterAndRestore(this);
3041  } else {
3042  wxPersistenceManager::Get().Restore(this);
3043  }
3044 #endif
3045  // Connect events
3046  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransferFunctionFormBase::OnOKClick), NULL, this);
3047  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransferFunctionFormBase::OnCancelClick), NULL, this);
3048 
3049 }
3050 
3051 TransferFunctionFormBase::~TransferFunctionFormBase()
3052 {
3053  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransferFunctionFormBase::OnOKClick), NULL, this);
3054  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(TransferFunctionFormBase::OnCancelClick), NULL, this);
3055 
3056 }
3057 
3058 SumFormBase::SumFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
3059  : wxDialog(parent, id, title, pos, size, style)
3060 {
3061  if ( !bBitmapLoaded ) {
3062  // We need to initialise the default bitmap handler
3063  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
3064  wxC9EE9InitBitmapResources();
3065  bBitmapLoaded = true;
3066  }
3067 
3068  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
3069  this->SetSizer(boxSizerLvl1_1);
3070 
3071  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
3072  m_notebook->SetName(wxT("m_notebook"));
3073 
3074  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
3075 
3076  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
3077  m_notebook->AddPage(m_panelGeneral, _("General"), false);
3078 
3079  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
3080  m_panelGeneral->SetSizer(boxSizerLvl2_1);
3081 
3082  m_staticTextSigns = new wxStaticText(m_panelGeneral, wxID_ANY, _("Signs"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3083 
3084  boxSizerLvl2_1->Add(m_staticTextSigns, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3085 
3086  m_textCtrlSigns = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3087  #if wxVERSION_NUMBER >= 3000
3088  m_textCtrlSigns->SetHint(wxT(""));
3089  #endif
3090 
3091  boxSizerLvl2_1->Add(m_textCtrlSigns, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3092  m_textCtrlSigns->SetMinSize(wxSize(300,-1));
3093 
3094  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
3095 
3096  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
3097 
3098  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
3099 
3100  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3101 
3102  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3103 
3104  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3105 
3106  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3107 
3108 
3109  #if wxVERSION_NUMBER >= 2900
3110  if(!wxPersistenceManager::Get().Find(m_notebook)){
3111  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
3112  } else {
3113  wxPersistenceManager::Get().Restore(m_notebook);
3114  }
3115  #endif
3116 
3117  SetName(wxT("SumFormBase"));
3118  SetSize(-1,-1);
3119  if (GetSizer()) {
3120  GetSizer()->Fit(this);
3121  }
3122  if(GetParent()) {
3123  CentreOnParent(wxBOTH);
3124  } else {
3125  CentreOnScreen(wxBOTH);
3126  }
3127 #if wxVERSION_NUMBER >= 2900
3128  if(!wxPersistenceManager::Get().Find(this)) {
3129  wxPersistenceManager::Get().RegisterAndRestore(this);
3130  } else {
3131  wxPersistenceManager::Get().Restore(this);
3132  }
3133 #endif
3134  // Connect events
3135  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SumFormBase::OnOKClick), NULL, this);
3136  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SumFormBase::OnCancelClick), NULL, this);
3137 
3138 }
3139 
3140 SumFormBase::~SumFormBase()
3141 {
3142  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SumFormBase::OnOKClick), NULL, this);
3143  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SumFormBase::OnCancelClick), NULL, this);
3144 
3145 }
3146 
3147 LimiterFormBase::LimiterFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
3148  : wxDialog(parent, id, title, pos, size, style)
3149 {
3150  if ( !bBitmapLoaded ) {
3151  // We need to initialise the default bitmap handler
3152  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
3153  wxC9EE9InitBitmapResources();
3154  bBitmapLoaded = true;
3155  }
3156 
3157  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
3158  this->SetSizer(boxSizerLvl1_1);
3159 
3160  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
3161  m_notebook->SetName(wxT("m_notebook"));
3162 
3163  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
3164 
3165  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
3166  m_notebook->AddPage(m_panelGeneral, _("General"), false);
3167 
3168  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
3169  m_panelGeneral->SetSizer(boxSizerLvl2_1);
3170 
3171  m_staticTextUpLimiter = new wxStaticText(m_panelGeneral, wxID_ANY, _("Upper limit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3172 
3173  boxSizerLvl2_1->Add(m_staticTextUpLimiter, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3174 
3175  m_textCtrlUpLimit = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3176  #if wxVERSION_NUMBER >= 3000
3177  m_textCtrlUpLimit->SetHint(wxT(""));
3178  #endif
3179 
3180  boxSizerLvl2_1->Add(m_textCtrlUpLimit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3181  m_textCtrlUpLimit->SetMinSize(wxSize(100,-1));
3182 
3183  m_staticTextLowLimit = new wxStaticText(m_panelGeneral, wxID_ANY, _("Lower limit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3184 
3185  boxSizerLvl2_1->Add(m_staticTextLowLimit, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3186 
3187  m_textCtrlLowLimit = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3188  #if wxVERSION_NUMBER >= 3000
3189  m_textCtrlLowLimit->SetHint(wxT(""));
3190  #endif
3191 
3192  boxSizerLvl2_1->Add(m_textCtrlLowLimit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3193  m_textCtrlLowLimit->SetMinSize(wxSize(100,-1));
3194 
3195  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
3196 
3197  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
3198 
3199  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
3200 
3201  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3202 
3203  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3204 
3205  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3206 
3207  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3208 
3209 
3210  #if wxVERSION_NUMBER >= 2900
3211  if(!wxPersistenceManager::Get().Find(m_notebook)){
3212  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
3213  } else {
3214  wxPersistenceManager::Get().Restore(m_notebook);
3215  }
3216  #endif
3217 
3218  SetName(wxT("LimiterFormBase"));
3219  SetSize(-1,-1);
3220  if (GetSizer()) {
3221  GetSizer()->Fit(this);
3222  }
3223  if(GetParent()) {
3224  CentreOnParent(wxBOTH);
3225  } else {
3226  CentreOnScreen(wxBOTH);
3227  }
3228 #if wxVERSION_NUMBER >= 2900
3229  if(!wxPersistenceManager::Get().Find(this)) {
3230  wxPersistenceManager::Get().RegisterAndRestore(this);
3231  } else {
3232  wxPersistenceManager::Get().Restore(this);
3233  }
3234 #endif
3235  // Connect events
3236  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LimiterFormBase::OnOKButtonClick), NULL, this);
3237  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LimiterFormBase::OnCancelButtonClick), NULL, this);
3238 
3239 }
3240 
3241 LimiterFormBase::~LimiterFormBase()
3242 {
3243  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LimiterFormBase::OnOKButtonClick), NULL, this);
3244  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(LimiterFormBase::OnCancelButtonClick), NULL, this);
3245 
3246 }
3247 
3248 RateLimiterFormBase::RateLimiterFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
3249  : wxDialog(parent, id, title, pos, size, style)
3250 {
3251  if ( !bBitmapLoaded ) {
3252  // We need to initialise the default bitmap handler
3253  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
3254  wxC9EE9InitBitmapResources();
3255  bBitmapLoaded = true;
3256  }
3257 
3258  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
3259  this->SetSizer(boxSizerLvl1_1);
3260 
3261  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
3262  m_notebook->SetName(wxT("m_notebook"));
3263 
3264  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
3265 
3266  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
3267  m_notebook->AddPage(m_panelGeneral, _("General"), false);
3268 
3269  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
3270  m_panelGeneral->SetSizer(boxSizerLvl2_1);
3271 
3272  m_staticTextUpLimiter = new wxStaticText(m_panelGeneral, wxID_ANY, _("Upper limit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3273 
3274  boxSizerLvl2_1->Add(m_staticTextUpLimiter, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3275 
3276  m_textCtrlUpLimit = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3277  #if wxVERSION_NUMBER >= 3000
3278  m_textCtrlUpLimit->SetHint(wxT(""));
3279  #endif
3280 
3281  boxSizerLvl2_1->Add(m_textCtrlUpLimit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3282  m_textCtrlUpLimit->SetMinSize(wxSize(100,-1));
3283 
3284  m_staticTextLowLimit = new wxStaticText(m_panelGeneral, wxID_ANY, _("Lower limit"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3285 
3286  boxSizerLvl2_1->Add(m_staticTextLowLimit, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3287 
3288  m_textCtrlLowLimit = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3289  #if wxVERSION_NUMBER >= 3000
3290  m_textCtrlLowLimit->SetHint(wxT(""));
3291  #endif
3292 
3293  boxSizerLvl2_1->Add(m_textCtrlLowLimit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3294  m_textCtrlLowLimit->SetMinSize(wxSize(100,-1));
3295 
3296  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
3297 
3298  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
3299 
3300  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
3301 
3302  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3303 
3304  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3305 
3306  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3307 
3308  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3309 
3310 
3311  #if wxVERSION_NUMBER >= 2900
3312  if(!wxPersistenceManager::Get().Find(m_notebook)){
3313  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
3314  } else {
3315  wxPersistenceManager::Get().Restore(m_notebook);
3316  }
3317  #endif
3318 
3319  SetName(wxT("RateLimiterFormBase"));
3320  SetSize(-1,-1);
3321  if (GetSizer()) {
3322  GetSizer()->Fit(this);
3323  }
3324  if(GetParent()) {
3325  CentreOnParent(wxBOTH);
3326  } else {
3327  CentreOnScreen(wxBOTH);
3328  }
3329 #if wxVERSION_NUMBER >= 2900
3330  if(!wxPersistenceManager::Get().Find(this)) {
3331  wxPersistenceManager::Get().RegisterAndRestore(this);
3332  } else {
3333  wxPersistenceManager::Get().Restore(this);
3334  }
3335 #endif
3336  // Connect events
3337  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RateLimiterFormBase::OnOKButtonClick), NULL, this);
3338  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RateLimiterFormBase::OnCancelButtonClick), NULL, this);
3339 
3340 }
3341 
3342 RateLimiterFormBase::~RateLimiterFormBase()
3343 {
3344  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RateLimiterFormBase::OnOKButtonClick), NULL, this);
3345  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(RateLimiterFormBase::OnCancelButtonClick), NULL, this);
3346 
3347 }
3348 
3349 ExponentialFormBase::ExponentialFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
3350  : wxDialog(parent, id, title, pos, size, style)
3351 {
3352  if ( !bBitmapLoaded ) {
3353  // We need to initialise the default bitmap handler
3354  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
3355  wxC9EE9InitBitmapResources();
3356  bBitmapLoaded = true;
3357  }
3358 
3359  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
3360  this->SetSizer(boxSizerLvl1_1);
3361 
3362  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
3363  m_notebook->SetName(wxT("m_notebook"));
3364 
3365  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
3366 
3367  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
3368  m_notebook->AddPage(m_panelGeneral, _("General"), false);
3369 
3370  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
3371  m_panelGeneral->SetSizer(boxSizerLvl2_1);
3372 
3373  m_staticTextExp = new wxStaticText(m_panelGeneral, wxID_ANY, _("y = A.eB.x"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), wxALIGN_CENTRE);
3374 
3375  boxSizerLvl2_1->Add(m_staticTextExp, 1, wxLEFT|wxRIGHT|wxTOP|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3376 
3377  m_staticTextAValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("A value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3378 
3379  boxSizerLvl2_1->Add(m_staticTextAValue, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3380 
3381  m_textCtrlAValue = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3382  #if wxVERSION_NUMBER >= 3000
3383  m_textCtrlAValue->SetHint(wxT(""));
3384  #endif
3385 
3386  boxSizerLvl2_1->Add(m_textCtrlAValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3387  m_textCtrlAValue->SetMinSize(wxSize(100,-1));
3388 
3389  m_staticTextBValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("B value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3390 
3391  boxSizerLvl2_1->Add(m_staticTextBValue, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3392 
3393  m_textCtrlBValue = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3394  #if wxVERSION_NUMBER >= 3000
3395  m_textCtrlBValue->SetHint(wxT(""));
3396  #endif
3397 
3398  boxSizerLvl2_1->Add(m_textCtrlBValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3399  m_textCtrlBValue->SetMinSize(wxSize(100,-1));
3400 
3401  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
3402 
3403  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
3404 
3405  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
3406 
3407  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3408 
3409  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3410 
3411  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3412 
3413  boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3414 
3415 
3416  #if wxVERSION_NUMBER >= 2900
3417  if(!wxPersistenceManager::Get().Find(m_notebook)){
3418  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
3419  } else {
3420  wxPersistenceManager::Get().Restore(m_notebook);
3421  }
3422  #endif
3423 
3424  SetName(wxT("ExponentialFormBase"));
3425  SetSize(-1,-1);
3426  if (GetSizer()) {
3427  GetSizer()->Fit(this);
3428  }
3429  if(GetParent()) {
3430  CentreOnParent(wxBOTH);
3431  } else {
3432  CentreOnScreen(wxBOTH);
3433  }
3434 #if wxVERSION_NUMBER >= 2900
3435  if(!wxPersistenceManager::Get().Find(this)) {
3436  wxPersistenceManager::Get().RegisterAndRestore(this);
3437  } else {
3438  wxPersistenceManager::Get().Restore(this);
3439  }
3440 #endif
3441  // Connect events
3442  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExponentialFormBase::OnOKButtonClick), NULL, this);
3443  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExponentialFormBase::OnCancelButtonClick), NULL, this);
3444 
3445 }
3446 
3447 ExponentialFormBase::~ExponentialFormBase()
3448 {
3449  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExponentialFormBase::OnOKButtonClick), NULL, this);
3450  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ExponentialFormBase::OnCancelButtonClick), NULL, this);
3451 
3452 }
3453 
3454 ConstantFormBase::ConstantFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
3455  : wxDialog(parent, id, title, pos, size, style)
3456 {
3457  if ( !bBitmapLoaded ) {
3458  // We need to initialise the default bitmap handler
3459  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
3460  wxC9EE9InitBitmapResources();
3461  bBitmapLoaded = true;
3462  }
3463 
3464  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
3465  this->SetSizer(boxSizerLvl1_1);
3466 
3467  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
3468  m_notebook->SetName(wxT("m_notebook"));
3469 
3470  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
3471 
3472  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
3473  m_notebook->AddPage(m_panelGeneral, _("General"), false);
3474 
3475  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
3476  m_panelGeneral->SetSizer(boxSizerLvl2_1);
3477 
3478  m_staticTextValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("Constant value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3479 
3480  boxSizerLvl2_1->Add(m_staticTextValue, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3481 
3482  m_textCtrlValue = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3483  #if wxVERSION_NUMBER >= 3000
3484  m_textCtrlValue->SetHint(wxT(""));
3485  #endif
3486 
3487  boxSizerLvl2_1->Add(m_textCtrlValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3488  m_textCtrlValue->SetMinSize(wxSize(100,-1));
3489 
3490  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
3491 
3492  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
3493 
3494  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
3495 
3496  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3497 
3498  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3499 
3500  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3501 
3502  boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3503 
3504 
3505  #if wxVERSION_NUMBER >= 2900
3506  if(!wxPersistenceManager::Get().Find(m_notebook)){
3507  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
3508  } else {
3509  wxPersistenceManager::Get().Restore(m_notebook);
3510  }
3511  #endif
3512 
3513  SetName(wxT("ConstantFormBase"));
3514  SetSize(-1,-1);
3515  if (GetSizer()) {
3516  GetSizer()->Fit(this);
3517  }
3518  if(GetParent()) {
3519  CentreOnParent(wxBOTH);
3520  } else {
3521  CentreOnScreen(wxBOTH);
3522  }
3523 #if wxVERSION_NUMBER >= 2900
3524  if(!wxPersistenceManager::Get().Find(this)) {
3525  wxPersistenceManager::Get().RegisterAndRestore(this);
3526  } else {
3527  wxPersistenceManager::Get().Restore(this);
3528  }
3529 #endif
3530  // Connect events
3531  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConstantFormBase::OnOKButtonClick), NULL, this);
3532  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConstantFormBase::OnCancelButtonClick), NULL, this);
3533 
3534 }
3535 
3536 ConstantFormBase::~ConstantFormBase()
3537 {
3538  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConstantFormBase::OnOKButtonClick), NULL, this);
3539  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(ConstantFormBase::OnCancelButtonClick), NULL, this);
3540 
3541 }
3542 
3543 GainFormBase::GainFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
3544  : wxDialog(parent, id, title, pos, size, style)
3545 {
3546  if ( !bBitmapLoaded ) {
3547  // We need to initialise the default bitmap handler
3548  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
3549  wxC9EE9InitBitmapResources();
3550  bBitmapLoaded = true;
3551  }
3552 
3553  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
3554  this->SetSizer(boxSizerLvl1_1);
3555 
3556  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
3557  m_notebook->SetName(wxT("m_notebook"));
3558 
3559  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
3560 
3561  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
3562  m_notebook->AddPage(m_panelGeneral, _("General"), false);
3563 
3564  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
3565  m_panelGeneral->SetSizer(boxSizerLvl2_1);
3566 
3567  m_staticTextValue = new wxStaticText(m_panelGeneral, wxID_ANY, _("Gain value"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3568 
3569  boxSizerLvl2_1->Add(m_staticTextValue, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3570 
3571  m_textCtrlValue = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3572  #if wxVERSION_NUMBER >= 3000
3573  m_textCtrlValue->SetHint(wxT(""));
3574  #endif
3575 
3576  boxSizerLvl2_1->Add(m_textCtrlValue, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
3577  m_textCtrlValue->SetMinSize(wxSize(100,-1));
3578 
3579  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
3580 
3581  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
3582 
3583  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
3584 
3585  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3586 
3587  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3588 
3589  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3590 
3591  boxSizerBottomButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3592 
3593 
3594  #if wxVERSION_NUMBER >= 2900
3595  if(!wxPersistenceManager::Get().Find(m_notebook)){
3596  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
3597  } else {
3598  wxPersistenceManager::Get().Restore(m_notebook);
3599  }
3600  #endif
3601 
3602  SetName(wxT("GainFormBase"));
3603  SetSize(-1,-1);
3604  if (GetSizer()) {
3605  GetSizer()->Fit(this);
3606  }
3607  if(GetParent()) {
3608  CentreOnParent(wxBOTH);
3609  } else {
3610  CentreOnScreen(wxBOTH);
3611  }
3612 #if wxVERSION_NUMBER >= 2900
3613  if(!wxPersistenceManager::Get().Find(this)) {
3614  wxPersistenceManager::Get().RegisterAndRestore(this);
3615  } else {
3616  wxPersistenceManager::Get().Restore(this);
3617  }
3618 #endif
3619  // Connect events
3620  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GainFormBase::OnOKButtonClick), NULL, this);
3621  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GainFormBase::OnCancelButtonClick), NULL, this);
3622 
3623 }
3624 
3625 GainFormBase::~GainFormBase()
3626 {
3627  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GainFormBase::OnOKButtonClick), NULL, this);
3628  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GainFormBase::OnCancelButtonClick), NULL, this);
3629 
3630 }
3631 
3632 IOControlFormBase::IOControlFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
3633  : wxDialog(parent, id, title, pos, size, style)
3634 {
3635  if ( !bBitmapLoaded ) {
3636  // We need to initialise the default bitmap handler
3637  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
3638  wxC9EE9InitBitmapResources();
3639  bBitmapLoaded = true;
3640  }
3641 
3642  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
3643  this->SetSizer(boxSizerLvl1_1);
3644 
3645  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
3646  m_notebook->SetName(wxT("m_notebook"));
3647 
3648  boxSizerLvl1_1->Add(m_notebook, 1, wxEXPAND, WXC_FROM_DIP(5));
3649 
3650  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
3651  m_notebook->AddPage(m_panelGeneral, _("General"), false);
3652 
3653  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
3654  m_panelGeneral->SetSizer(boxSizerLvl2_1);
3655 
3656  m_checkBoxInput = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Input"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3657  m_checkBoxInput->SetValue(false);
3658 
3659  boxSizerLvl2_1->Add(m_checkBoxInput, 0, wxLEFT|wxRIGHT|wxTOP, WXC_FROM_DIP(5));
3660 
3661  wxArrayString m_choiceInputArr;
3662  m_choiceInput = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceInputArr, 0);
3663 
3664  boxSizerLvl2_1->Add(m_choiceInput, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
3665 
3666  m_checkBoxOutput = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Output"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
3667  m_checkBoxOutput->SetValue(false);
3668 
3669  boxSizerLvl2_1->Add(m_checkBoxOutput, 0, wxLEFT|wxRIGHT|wxTOP, WXC_FROM_DIP(5));
3670 
3671  wxArrayString m_choiceOutputArr;
3672  m_choiceOutput = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceOutputArr, 0);
3673 
3674  boxSizerLvl2_1->Add(m_choiceOutput, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
3675 
3676  wxBoxSizer* boxSizerBottomButtons = new wxBoxSizer(wxHORIZONTAL);
3677 
3678  boxSizerLvl1_1->Add(boxSizerBottomButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
3679 
3680  boxSizerBottomButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
3681 
3682  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3683 
3684  boxSizerBottomButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3685 
3686  m_ButtonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
3687 
3688  boxSizerBottomButtons->Add(m_ButtonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
3689 
3690 
3691  #if wxVERSION_NUMBER >= 2900
3692  if(!wxPersistenceManager::Get().Find(m_notebook)){
3693  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
3694  } else {
3695  wxPersistenceManager::Get().Restore(m_notebook);
3696  }
3697  #endif
3698 
3699  SetName(wxT("IOControlFormBase"));
3700  SetSize(-1,-1);
3701  if (GetSizer()) {
3702  GetSizer()->Fit(this);
3703  }
3704  if(GetParent()) {
3705  CentreOnParent(wxBOTH);
3706  } else {
3707  CentreOnScreen(wxBOTH);
3708  }
3709 #if wxVERSION_NUMBER >= 2900
3710  if(!wxPersistenceManager::Get().Find(this)) {
3711  wxPersistenceManager::Get().RegisterAndRestore(this);
3712  } else {
3713  wxPersistenceManager::Get().Restore(this);
3714  }
3715 #endif
3716  // Connect events
3717  m_checkBoxInput->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(IOControlFormBase::OnInputChecked), NULL, this);
3718  m_checkBoxOutput->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(IOControlFormBase::OnOutputChecked), NULL, this);
3719  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IOControlFormBase::OnOKButtonClick), NULL, this);
3720  m_ButtonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IOControlFormBase::OnCancelButtonClick), NULL, this);
3721 
3722 }
3723 
3724 IOControlFormBase::~IOControlFormBase()
3725 {
3726  m_checkBoxInput->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(IOControlFormBase::OnInputChecked), NULL, this);
3727  m_checkBoxOutput->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(IOControlFormBase::OnOutputChecked), NULL, this);
3728  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IOControlFormBase::OnOKButtonClick), NULL, this);
3729  m_ButtonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(IOControlFormBase::OnCancelButtonClick), NULL, this);
3730 
3731 }
-
- - - - diff --git a/docs/doxygen/html/_element_form_8h_source.html b/docs/doxygen/html/_element_form_8h_source.html deleted file mode 100644 index 2122477..0000000 --- a/docs/doxygen/html/_element_form_8h_source.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - -Project/ElementForm.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElementForm.h
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: ElementForm.wxcp
4 // Do not modify this file by hand!
6 
7 #ifndef _PSP_PROJECT_ELEMENTFORM_BASE_CLASSES_H
8 #define _PSP_PROJECT_ELEMENTFORM_BASE_CLASSES_H
9 
10 #include <wx/settings.h>
11 #include <wx/xrc/xmlres.h>
12 #include <wx/xrc/xh_bmp.h>
13 #include <wx/dialog.h>
14 #include <wx/iconbndl.h>
15 #include <wx/artprov.h>
16 #include <wx/sizer.h>
17 #include <wx/notebook.h>
18 #include <wx/panel.h>
19 #include <wx/imaglist.h>
20 #include <wx/stattext.h>
21 #include <wx/textctrl.h>
22 #include <wx/choice.h>
23 #include <wx/arrstr.h>
24 #include <wx/checkbox.h>
25 #include <wx/button.h>
26 #include <wx/statbox.h>
27 #include <wx/statline.h>
28 #include <wx/propgrid/manager.h>
29 #include <wx/propgrid/property.h>
30 #include <wx/propgrid/advprops.h>
31 #include <wx/listctrl.h>
32 #if wxVERSION_NUMBER >= 2900
33 #include <wx/persist.h>
34 #include <wx/persist/toplevel.h>
35 #include <wx/persist/bookctrl.h>
36 #include <wx/persist/treebook.h>
37 #endif
38 
39 #ifdef WXC_FROM_DIP
40 #undef WXC_FROM_DIP
41 #endif
42 #if wxVERSION_NUMBER >= 3100
43 #define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
44 #else
45 #define WXC_FROM_DIP(x) x
46 #endif
47 
48 
49 class BusFormBase : public wxDialog
50 {
51 protected:
52  wxNotebook* m_notebook;
53  wxPanel* m_panelGeneral;
54  wxStaticText* m_staticTextName;
55  wxTextCtrl* m_textCtrlName;
56  wxStaticText* m_staticTextNomVoltage;
57  wxTextCtrl* m_textCtrlNomVoltage;
58  wxChoice* m_choiceNomVoltage;
59  wxCheckBox* m_checkBoxCtrlVoltage;
60  wxTextCtrl* m_textCtrlCtrlVoltage;
61  wxChoice* m_choiceCtrlVoltage;
62  wxCheckBox* m_checkBoxSlackBus;
63  wxPanel* m_panelFault;
64  wxCheckBox* m_checkBoxFault;
65  wxStaticText* m_staticTextFaultType;
66  wxChoice* m_choiceFaultType;
67  wxStaticText* m_staticTextFaultPlace;
68  wxChoice* m_choiceFaultPlace;
69  wxStaticText* m_staticTextFaultResistance;
70  wxTextCtrl* m_textCtrlFaultResistance;
71  wxStaticText* m_staticTextPU_1;
72  wxStaticText* m_staticTextReactance;
73  wxTextCtrl* m_textCtrlFaultReactance;
74  wxStaticText* m_staticTextPU_2;
75  wxPanel* m_panelStability;
76  wxCheckBox* m_checkBoxPlotData;
77  wxCheckBox* m_checkBoxStabFault;
78  wxStaticText* m_staticTextStabFaultTime;
79  wxTextCtrl* m_textCtrlStabFaultTime;
80  wxStaticText* m_staticTextS_1;
81  wxStaticText* m_staticTextStabFaultLength;
82  wxTextCtrl* m_textCtrlStabFaultLength;
83  wxStaticText* m_staticTextS_2;
84  wxStaticText* m_staticTextStabFaultResistance;
85  wxTextCtrl* m_textCtrlStabFaultResistance;
86  wxStaticText* m_staticTextPU_3;
87  wxStaticText* m_staticTextStabFaultReactance;
88  wxTextCtrl* m_textCtrlStabFaultReactance;
89  wxStaticText* m_staticTextPU_4;
90  wxButton* m_buttonOK;
91  wxButton* m_ButtonCancel;
92 
93 protected:
94  virtual void OnNominalVoltageChoice(wxCommandEvent& event) { event.Skip(); }
95  virtual void OnControlledVoltageClick(wxCommandEvent& event) { event.Skip(); }
96  virtual void OnInsertFaultClick(wxCommandEvent& event) { event.Skip(); }
97  virtual void OnFaultTypeChoice(wxCommandEvent& event) { event.Skip(); }
98  virtual void OnInsertStabFaultClick(wxCommandEvent& event) { event.Skip(); }
99  virtual void OnButtonOKClick(wxCommandEvent& event) { event.Skip(); }
100  virtual void OnButtonCancelClick(wxCommandEvent& event) { event.Skip(); }
101 
102 public:
103  wxStaticText* GetStaticTextName() { return m_staticTextName; }
104  wxTextCtrl* GetTextCtrlName() { return m_textCtrlName; }
105  wxStaticText* GetStaticTextNomVoltage() { return m_staticTextNomVoltage; }
106  wxTextCtrl* GetTextCtrlNomVoltage() { return m_textCtrlNomVoltage; }
107  wxChoice* GetChoiceNomVoltage() { return m_choiceNomVoltage; }
108  wxCheckBox* GetCheckBoxCtrlVoltage() { return m_checkBoxCtrlVoltage; }
109  wxTextCtrl* GetTextCtrlCtrlVoltage() { return m_textCtrlCtrlVoltage; }
110  wxChoice* GetChoiceCtrlVoltage() { return m_choiceCtrlVoltage; }
111  wxCheckBox* GetCheckBoxSlackBus() { return m_checkBoxSlackBus; }
112  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
113  wxCheckBox* GetCheckBoxFault() { return m_checkBoxFault; }
114  wxStaticText* GetStaticTextFaultType() { return m_staticTextFaultType; }
115  wxChoice* GetChoiceFaultType() { return m_choiceFaultType; }
116  wxStaticText* GetStaticTextFaultPlace() { return m_staticTextFaultPlace; }
117  wxChoice* GetChoiceFaultPlace() { return m_choiceFaultPlace; }
118  wxStaticText* GetStaticTextFaultResistance() { return m_staticTextFaultResistance; }
119  wxTextCtrl* GetTextCtrlFaultResistance() { return m_textCtrlFaultResistance; }
120  wxStaticText* GetStaticTextPU_1() { return m_staticTextPU_1; }
121  wxStaticText* GetStaticTextReactance() { return m_staticTextReactance; }
122  wxTextCtrl* GetTextCtrlFaultReactance() { return m_textCtrlFaultReactance; }
123  wxStaticText* GetStaticTextPU_2() { return m_staticTextPU_2; }
124  wxPanel* GetPanelFault() { return m_panelFault; }
125  wxCheckBox* GetCheckBoxPlotData() { return m_checkBoxPlotData; }
126  wxCheckBox* GetCheckBoxStabFault() { return m_checkBoxStabFault; }
127  wxStaticText* GetStaticTextStabFaultTime() { return m_staticTextStabFaultTime; }
128  wxTextCtrl* GetTextCtrlStabFaultTime() { return m_textCtrlStabFaultTime; }
129  wxStaticText* GetStaticTextS_1() { return m_staticTextS_1; }
130  wxStaticText* GetStaticTextStabFaultLength() { return m_staticTextStabFaultLength; }
131  wxTextCtrl* GetTextCtrlStabFaultLength() { return m_textCtrlStabFaultLength; }
132  wxStaticText* GetStaticTextS_2() { return m_staticTextS_2; }
133  wxStaticText* GetStaticTextStabFaultResistance() { return m_staticTextStabFaultResistance; }
134  wxTextCtrl* GetTextCtrlStabFaultResistance() { return m_textCtrlStabFaultResistance; }
135  wxStaticText* GetStaticTextPU_3() { return m_staticTextPU_3; }
136  wxStaticText* GetStaticTextStabFaultReactance() { return m_staticTextStabFaultReactance; }
137  wxTextCtrl* GetTextCtrlStabFaultReactance() { return m_textCtrlStabFaultReactance; }
138  wxStaticText* GetStaticTextPU_4() { return m_staticTextPU_4; }
139  wxPanel* GetPanelStability() { return m_panelStability; }
140  wxNotebook* GetNotebook() { return m_notebook; }
141  wxButton* GetButtonOK() { return m_buttonOK; }
142  wxButton* GetButtonCancel() { return m_ButtonCancel; }
143  BusFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Bus"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
144  virtual ~BusFormBase();
145 };
146 
147 
148 class SyncMachineFormBase : public wxDialog
149 {
150 protected:
151  wxNotebook* m_notebook;
152  wxPanel* m_panelGeneral;
153  wxStaticText* m_staticTextName;
154  wxTextCtrl* m_textCtrlName;
155  wxStaticText* m_staticTextNominalPower;
156  wxTextCtrl* m_textCtrlnominalPower;
157  wxChoice* m_choiceNominalPower;
158  wxStaticText* m_staticTextActivePower;
159  wxTextCtrl* m_textCtrlActivePower;
160  wxChoice* m_choiceActivePower;
161  wxStaticText* m_staticTextReactivePower;
162  wxTextCtrl* m_textCtrlReactivePower;
163  wxChoice* m_choiceReactivePower;
164  wxCheckBox* m_checkBoxMaxReactive;
165  wxTextCtrl* m_textCtrlMaxRectivePower;
166  wxChoice* m_choiceMaxRectivePower;
167  wxCheckBox* m_checkBoxMinReactive;
168  wxTextCtrl* m_textCtrlMinRectivePower;
169  wxChoice* m_choiceMinRectivePower;
170  wxCheckBox* m_checkBoxUseMachinePower;
171  wxPanel* m_panelFault;
172  wxStaticText* m_staticTextPosResistance;
173  wxTextCtrl* m_textCtrlPosResistance;
174  wxStaticText* m_staticTextPosReactance;
175  wxTextCtrl* m_textCtrlPosReactance;
176  wxStaticText* m_staticTextNegResistance;
177  wxTextCtrl* m_textCtrlNegResistance;
178  wxStaticText* m_staticTextNegReactance;
179  wxTextCtrl* m_textCtrlNegReactance;
180  wxStaticText* m_staticTextZeroResistance;
181  wxTextCtrl* m_textCtrlZeroResistance;
182  wxStaticText* m_staticTextZeroReactance;
183  wxTextCtrl* m_textCtrlZeroReactance;
184  wxStaticText* m_staticTextGrdResistance;
185  wxTextCtrl* m_textCtrlGrdResistance;
186  wxStaticText* m_staticTextGrdReactance;
187  wxTextCtrl* m_textCtrlGrdReactance;
188  wxCheckBox* m_checkBoxGroundNeutral;
189  wxButton* m_buttonStab;
190  wxButton* m_buttonOK;
191  wxButton* m_ButtonCancel;
192 
193 protected:
194  virtual void OnCheckMaxReactive(wxCommandEvent& event) { event.Skip(); }
195  virtual void OnCheckMinReactive(wxCommandEvent& event) { event.Skip(); }
196  virtual void OnStabilityButtonClick(wxCommandEvent& event) { event.Skip(); }
197  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
198  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
199 
200 public:
201  wxStaticText* GetStaticTextName() { return m_staticTextName; }
202  wxTextCtrl* GetTextCtrlName() { return m_textCtrlName; }
203  wxStaticText* GetStaticTextNominalPower() { return m_staticTextNominalPower; }
204  wxTextCtrl* GetTextCtrlnominalPower() { return m_textCtrlnominalPower; }
205  wxChoice* GetChoiceNominalPower() { return m_choiceNominalPower; }
206  wxStaticText* GetStaticTextActivePower() { return m_staticTextActivePower; }
207  wxTextCtrl* GetTextCtrlActivePower() { return m_textCtrlActivePower; }
208  wxChoice* GetChoiceActivePower() { return m_choiceActivePower; }
209  wxStaticText* GetStaticTextReactivePower() { return m_staticTextReactivePower; }
210  wxTextCtrl* GetTextCtrlReactivePower() { return m_textCtrlReactivePower; }
211  wxChoice* GetChoiceReactivePower() { return m_choiceReactivePower; }
212  wxCheckBox* GetCheckBoxMaxReactive() { return m_checkBoxMaxReactive; }
213  wxTextCtrl* GetTextCtrlMaxRectivePower() { return m_textCtrlMaxRectivePower; }
214  wxChoice* GetChoiceMaxRectivePower() { return m_choiceMaxRectivePower; }
215  wxCheckBox* GetCheckBoxMinReactive() { return m_checkBoxMinReactive; }
216  wxTextCtrl* GetTextCtrlMinRectivePower() { return m_textCtrlMinRectivePower; }
217  wxChoice* GetChoiceMinRectivePower() { return m_choiceMinRectivePower; }
218  wxCheckBox* GetCheckBoxUseMachinePower() { return m_checkBoxUseMachinePower; }
219  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
220  wxStaticText* GetStaticTextPosResistance() { return m_staticTextPosResistance; }
221  wxTextCtrl* GetTextCtrlPosResistance() { return m_textCtrlPosResistance; }
222  wxStaticText* GetStaticTextPosReactance() { return m_staticTextPosReactance; }
223  wxTextCtrl* GetTextCtrlPosReactance() { return m_textCtrlPosReactance; }
224  wxStaticText* GetStaticTextNegResistance() { return m_staticTextNegResistance; }
225  wxTextCtrl* GetTextCtrlNegResistance() { return m_textCtrlNegResistance; }
226  wxStaticText* GetStaticTextNegReactance() { return m_staticTextNegReactance; }
227  wxTextCtrl* GetTextCtrlNegReactance() { return m_textCtrlNegReactance; }
228  wxStaticText* GetStaticTextZeroResistance() { return m_staticTextZeroResistance; }
229  wxTextCtrl* GetTextCtrlZeroResistance() { return m_textCtrlZeroResistance; }
230  wxStaticText* GetStaticTextZeroReactance() { return m_staticTextZeroReactance; }
231  wxTextCtrl* GetTextCtrlZeroReactance() { return m_textCtrlZeroReactance; }
232  wxStaticText* GetStaticTextGrdResistance() { return m_staticTextGrdResistance; }
233  wxTextCtrl* GetTextCtrlGrdResistance() { return m_textCtrlGrdResistance; }
234  wxStaticText* GetStaticTextGrdReactance() { return m_staticTextGrdReactance; }
235  wxTextCtrl* GetTextCtrlGrdReactance() { return m_textCtrlGrdReactance; }
236  wxCheckBox* GetCheckBoxGroundNeutral() { return m_checkBoxGroundNeutral; }
237  wxPanel* GetPanelFault() { return m_panelFault; }
238  wxNotebook* GetNotebook() { return m_notebook; }
239  wxButton* GetButtonStab() { return m_buttonStab; }
240  wxButton* GetButtonOK() { return m_buttonOK; }
241  wxButton* GetButtonCancel() { return m_ButtonCancel; }
242  SyncMachineFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Generator"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
243  virtual ~SyncMachineFormBase();
244 };
245 
246 
247 class GeneratorStabFormBase : public wxDialog
248 {
249 protected:
250  wxCheckBox* m_checkBoxPlotSyncMachine;
251  wxStaticText* m_staticTextInertia;
252  wxTextCtrl* m_textCtrlInertia;
253  wxStaticText* m_staticTextS_1;
254  wxStaticText* m_staticTextDamping;
255  wxTextCtrl* m_textCtrlDamping;
256  wxStaticText* m_staticTextPU_1;
257  wxCheckBox* m_checkBoxUseAVR;
258  wxButton* m_buttonEditAVR;
259  wxCheckBox* m_checkBoxUseSG;
260  wxButton* m_buttonEditSG;
261  wxStaticLine* m_staticLine_1;
262  wxStaticText* m_staticTextRa;
263  wxTextCtrl* m_textCtrlRa;
264  wxStaticText* m_staticTextPU_2;
265  wxStaticText* m_staticTextXp;
266  wxTextCtrl* m_textCtrlXp;
267  wxStaticText* m_staticTextPU_9;
268  wxStaticText* m_staticTextSat;
269  wxTextCtrl* m_textCtrlSat;
270  wxStaticText* m_staticTextPU_10;
271  wxStaticText* m_staticTextSyncXd;
272  wxTextCtrl* m_textCtrlSyncXd;
273  wxStaticText* m_staticTextPU_3;
274  wxStaticText* m_staticTextSyncXq;
275  wxTextCtrl* m_textCtrlSyncXq;
276  wxStaticText* m_staticTextPU_4;
277  wxStaticText* m_staticTextTranXd;
278  wxTextCtrl* m_textCtrlTranXd;
279  wxStaticText* m_staticTextPU_5;
280  wxStaticText* m_staticTextTranXq;
281  wxTextCtrl* m_textCtrlTranXq;
282  wxStaticText* m_staticTextPU_6;
283  wxStaticText* m_staticTextTranTd0;
284  wxTextCtrl* m_textCtrlTranTd0;
285  wxStaticText* m_staticTextS_2;
286  wxStaticText* m_staticTextTranTq0;
287  wxTextCtrl* m_textCtrlTranTq0;
288  wxStaticText* m_staticTextS_3;
289  wxStaticText* m_staticTextSubXd;
290  wxTextCtrl* m_textCtrlSubXd;
291  wxStaticText* m_staticTextPU_7;
292  wxStaticText* m_staticTextSubXq;
293  wxTextCtrl* m_textCtrlSubXq;
294  wxStaticText* m_staticTextPU_8;
295  wxStaticText* m_staticTextSubTd0;
296  wxTextCtrl* m_textCtrlSubTd0;
297  wxStaticText* m_staticTextS_4;
298  wxStaticText* m_staticTextSubTq0;
299  wxTextCtrl* m_textCtrlSubTq0;
300  wxStaticText* m_staticTextS_5;
301  wxButton* m_buttonSwitching;
302  wxButton* m_buttonOK;
303  wxButton* m_ButtonCancel;
304 
305 protected:
306  virtual void UseAVRClick(wxCommandEvent& event) { event.Skip(); }
307  virtual void OnEditAVRButtonClick(wxCommandEvent& event) { event.Skip(); }
308  virtual void UseSGClick(wxCommandEvent& event) { event.Skip(); }
309  virtual void OnSpeedGovernorButtonClick(wxCommandEvent& event) { event.Skip(); }
310  virtual void OnSwitchingButtonClick(wxCommandEvent& event) { event.Skip(); }
311  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
312  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
313 
314 public:
315  wxCheckBox* GetCheckBoxPlotSyncMachine() { return m_checkBoxPlotSyncMachine; }
316  wxStaticText* GetStaticTextInertia() { return m_staticTextInertia; }
317  wxTextCtrl* GetTextCtrlInertia() { return m_textCtrlInertia; }
318  wxStaticText* GetStaticTextS_1() { return m_staticTextS_1; }
319  wxStaticText* GetStaticTextDamping() { return m_staticTextDamping; }
320  wxTextCtrl* GetTextCtrlDamping() { return m_textCtrlDamping; }
321  wxStaticText* GetStaticTextPU_1() { return m_staticTextPU_1; }
322  wxCheckBox* GetCheckBoxUseAVR() { return m_checkBoxUseAVR; }
323  wxButton* GetButtonEditAVR() { return m_buttonEditAVR; }
324  wxCheckBox* GetCheckBoxUseSG() { return m_checkBoxUseSG; }
325  wxButton* GetButtonEditSG() { return m_buttonEditSG; }
326  wxStaticLine* GetStaticLine_1() { return m_staticLine_1; }
327  wxStaticText* GetStaticTextRa() { return m_staticTextRa; }
328  wxTextCtrl* GetTextCtrlRa() { return m_textCtrlRa; }
329  wxStaticText* GetStaticTextPU_2() { return m_staticTextPU_2; }
330  wxStaticText* GetStaticTextXp() { return m_staticTextXp; }
331  wxTextCtrl* GetTextCtrlXp() { return m_textCtrlXp; }
332  wxStaticText* GetStaticTextPU_9() { return m_staticTextPU_9; }
333  wxStaticText* GetStaticTextSat() { return m_staticTextSat; }
334  wxTextCtrl* GetTextCtrlSat() { return m_textCtrlSat; }
335  wxStaticText* GetStaticTextPU_10() { return m_staticTextPU_10; }
336  wxStaticText* GetStaticTextSyncXd() { return m_staticTextSyncXd; }
337  wxTextCtrl* GetTextCtrlSyncXd() { return m_textCtrlSyncXd; }
338  wxStaticText* GetStaticTextPU_3() { return m_staticTextPU_3; }
339  wxStaticText* GetStaticTextSyncXq() { return m_staticTextSyncXq; }
340  wxTextCtrl* GetTextCtrlSyncXq() { return m_textCtrlSyncXq; }
341  wxStaticText* GetStaticTextPU_4() { return m_staticTextPU_4; }
342  wxStaticText* GetStaticTextTranXd() { return m_staticTextTranXd; }
343  wxTextCtrl* GetTextCtrlTranXd() { return m_textCtrlTranXd; }
344  wxStaticText* GetStaticTextPU_5() { return m_staticTextPU_5; }
345  wxStaticText* GetStaticTextTranXq() { return m_staticTextTranXq; }
346  wxTextCtrl* GetTextCtrlTranXq() { return m_textCtrlTranXq; }
347  wxStaticText* GetStaticTextPU_6() { return m_staticTextPU_6; }
348  wxStaticText* GetStaticTextTranTd0() { return m_staticTextTranTd0; }
349  wxTextCtrl* GetTextCtrlTranTd0() { return m_textCtrlTranTd0; }
350  wxStaticText* GetStaticTextS_2() { return m_staticTextS_2; }
351  wxStaticText* GetStaticTextTranTq0() { return m_staticTextTranTq0; }
352  wxTextCtrl* GetTextCtrlTranTq0() { return m_textCtrlTranTq0; }
353  wxStaticText* GetStaticTextS_3() { return m_staticTextS_3; }
354  wxStaticText* GetStaticTextSubXd() { return m_staticTextSubXd; }
355  wxTextCtrl* GetTextCtrlSubXd() { return m_textCtrlSubXd; }
356  wxStaticText* GetStaticTextPU_7() { return m_staticTextPU_7; }
357  wxStaticText* GetStaticTextSubXq() { return m_staticTextSubXq; }
358  wxTextCtrl* GetTextCtrlSubXq() { return m_textCtrlSubXq; }
359  wxStaticText* GetStaticTextPU_8() { return m_staticTextPU_8; }
360  wxStaticText* GetStaticTextSubTd0() { return m_staticTextSubTd0; }
361  wxTextCtrl* GetTextCtrlSubTd0() { return m_textCtrlSubTd0; }
362  wxStaticText* GetStaticTextS_4() { return m_staticTextS_4; }
363  wxStaticText* GetStaticTextSubTq0() { return m_staticTextSubTq0; }
364  wxTextCtrl* GetTextCtrlSubTq0() { return m_textCtrlSubTq0; }
365  wxStaticText* GetStaticTextS_5() { return m_staticTextS_5; }
366  wxButton* GetButtonSwitching() { return m_buttonSwitching; }
367  wxButton* GetButtonOK() { return m_buttonOK; }
368  wxButton* GetButtonCancel() { return m_ButtonCancel; }
369  GeneratorStabFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Generator: Stability"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
370  virtual ~GeneratorStabFormBase();
371 };
372 
373 
374 class LineFormBase : public wxDialog
375 {
376 protected:
377  wxNotebook* m_notebook;
378  wxPanel* m_panelGeneral;
379  wxStaticText* m_staticTextName;
380  wxTextCtrl* m_textCtrlName;
381  wxStaticText* m_staticTextNominalVoltage;
382  wxStaticText* m_staticTextNominalVoltageValue;
383  wxStaticText* m_staticTextNominalPower;
384  wxTextCtrl* m_textCtrlNominalPower;
385  wxChoice* m_choiceNominalPower;
386  wxStaticText* m_staticTextResistance;
387  wxTextCtrl* m_textCtrlResistance;
388  wxChoice* m_choiceResistance;
389  wxStaticText* m_staticTextReactance;
390  wxTextCtrl* m_textCtrlReactance;
391  wxChoice* m_choiceReactance;
392  wxStaticText* m_staticTextSusceptance;
393  wxTextCtrl* m_textCtrlSusceptance;
394  wxChoice* m_choiceSusceptance;
395  wxStaticText* m_staticTextLineSize;
396  wxTextCtrl* m_textCtrlLineSize;
397  wxStaticText* m_staticTextKM;
398  wxCheckBox* m_checkUseLinePower;
399  wxPanel* m_panelFault;
400  wxStaticText* m_staticTextZeroResistance;
401  wxTextCtrl* m_textCtrlZeroResistance;
402  wxStaticText* m_staticTextZeroReactance;
403  wxTextCtrl* m_textCtrlZeroReactance;
404  wxStaticText* m_staticTextZeroSusceptance;
405  wxTextCtrl* m_textCtrlZeroSusceptance;
406  wxButton* m_buttonStability;
407  wxButton* m_buttonOK;
408  wxButton* m_buttonCancel;
409 
410 protected:
411  virtual void OnStabilityButtonClick(wxCommandEvent& event) { event.Skip(); }
412  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
413  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
414 
415 public:
416  wxStaticText* GetStaticTextName() { return m_staticTextName; }
417  wxTextCtrl* GetTextCtrlName() { return m_textCtrlName; }
418  wxStaticText* GetStaticTextNominalVoltage() { return m_staticTextNominalVoltage; }
419  wxStaticText* GetStaticTextNominalVoltageValue() { return m_staticTextNominalVoltageValue; }
420  wxStaticText* GetStaticTextNominalPower() { return m_staticTextNominalPower; }
421  wxTextCtrl* GetTextCtrlNominalPower() { return m_textCtrlNominalPower; }
422  wxChoice* GetChoiceNominalPower() { return m_choiceNominalPower; }
423  wxStaticText* GetStaticTextResistance() { return m_staticTextResistance; }
424  wxTextCtrl* GetTextCtrlResistance() { return m_textCtrlResistance; }
425  wxChoice* GetChoiceResistance() { return m_choiceResistance; }
426  wxStaticText* GetStaticTextReactance() { return m_staticTextReactance; }
427  wxTextCtrl* GetTextCtrlReactance() { return m_textCtrlReactance; }
428  wxChoice* GetChoiceReactance() { return m_choiceReactance; }
429  wxStaticText* GetStaticTextSusceptance() { return m_staticTextSusceptance; }
430  wxTextCtrl* GetTextCtrlSusceptance() { return m_textCtrlSusceptance; }
431  wxChoice* GetChoiceSusceptance() { return m_choiceSusceptance; }
432  wxStaticText* GetStaticTextLineSize() { return m_staticTextLineSize; }
433  wxTextCtrl* GetTextCtrlLineSize() { return m_textCtrlLineSize; }
434  wxStaticText* GetStaticTextKM() { return m_staticTextKM; }
435  wxCheckBox* GetCheckUseLinePower() { return m_checkUseLinePower; }
436  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
437  wxStaticText* GetStaticTextZeroResistance() { return m_staticTextZeroResistance; }
438  wxTextCtrl* GetTextCtrlZeroResistance() { return m_textCtrlZeroResistance; }
439  wxStaticText* GetStaticTextZeroReactance() { return m_staticTextZeroReactance; }
440  wxTextCtrl* GetTextCtrlZeroReactance() { return m_textCtrlZeroReactance; }
441  wxStaticText* GetStaticTextZeroSusceptance() { return m_staticTextZeroSusceptance; }
442  wxTextCtrl* GetTextCtrlZeroSusceptance() { return m_textCtrlZeroSusceptance; }
443  wxPanel* GetPanelFault() { return m_panelFault; }
444  wxNotebook* GetNotebook() { return m_notebook; }
445  wxButton* GetButtonStability() { return m_buttonStability; }
446  wxButton* GetButtonOK() { return m_buttonOK; }
447  wxButton* GetButtonCancel() { return m_buttonCancel; }
448  LineFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
449  virtual ~LineFormBase();
450 };
451 
452 
453 class TransformerFormBase : public wxDialog
454 {
455 protected:
456  wxNotebook* m_notebook;
457  wxPanel* m_panelGeneral;
458  wxStaticText* m_staticTextName;
459  wxTextCtrl* m_textCtrlName;
460  wxStaticText* m_staticTextNominalVoltage;
461  wxStaticText* m_staticTextNominalVoltageValue;
462  wxStaticText* m_staticTextBaseVoltage;
463  wxChoice* m_choiceBaseVoltage;
464  wxStaticText* m_staticTextNominalPower;
465  wxTextCtrl* m_textCtrlNominalPower;
466  wxChoice* m_choiceNominalPower;
467  wxStaticText* m_staticTextResistance;
468  wxTextCtrl* m_textCtrlResistance;
469  wxChoice* m_choiceResistance;
470  wxStaticText* m_staticTextReactance;
471  wxTextCtrl* m_textCtrlReactance;
472  wxChoice* m_choiceReactance;
473  wxStaticLine* m_staticLine_1;
474  wxStaticText* m_staticTextConnection;
475  wxChoice* m_choiceConnection;
476  wxStaticText* m_staticTextTurnsRatio;
477  wxTextCtrl* m_textCtrlTurnRatio;
478  wxStaticText* m_staticTextPhaseShift;
479  wxTextCtrl* m_textCtrlPhaseShift;
480  wxStaticText* m_staticTextDeg;
481  wxCheckBox* m_checkUseTransformerPower;
482  wxPanel* m_panelFault;
483  wxStaticText* m_staticTextZeroResistance;
484  wxTextCtrl* m_textCtrlZeroResistance;
485  wxStaticText* m_staticTextZeroReactance;
486  wxTextCtrl* m_textCtrlZeroReactance;
487  wxStaticText* m_staticTextPrimResistance;
488  wxTextCtrl* m_textCtrlPrimResistance;
489  wxStaticText* m_staticTextPrimReactance;
490  wxTextCtrl* m_textCtrlPrimReactance;
491  wxStaticText* m_staticTextSecResistance;
492  wxTextCtrl* m_textCtrlSecResistance;
493  wxStaticText* m_staticTextSecReactance;
494  wxTextCtrl* m_textCtrlSecReactance;
495  wxButton* m_buttonStability;
496  wxButton* m_buttonOK;
497  wxButton* m_buttonCancel;
498 
499 protected:
500  virtual void OnStabilityButtonClick(wxCommandEvent& event) { event.Skip(); }
501  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
502  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
503 
504 public:
505  wxStaticText* GetStaticTextName() { return m_staticTextName; }
506  wxTextCtrl* GetTextCtrlName() { return m_textCtrlName; }
507  wxStaticText* GetStaticTextNominalVoltage() { return m_staticTextNominalVoltage; }
508  wxStaticText* GetStaticTextNominalVoltageValue() { return m_staticTextNominalVoltageValue; }
509  wxStaticText* GetStaticTextBaseVoltage() { return m_staticTextBaseVoltage; }
510  wxChoice* GetChoiceBaseVoltage() { return m_choiceBaseVoltage; }
511  wxStaticText* GetStaticTextNominalPower() { return m_staticTextNominalPower; }
512  wxTextCtrl* GetTextCtrlNominalPower() { return m_textCtrlNominalPower; }
513  wxChoice* GetChoiceNominalPower() { return m_choiceNominalPower; }
514  wxStaticText* GetStaticTextResistance() { return m_staticTextResistance; }
515  wxTextCtrl* GetTextCtrlResistance() { return m_textCtrlResistance; }
516  wxChoice* GetChoiceResistance() { return m_choiceResistance; }
517  wxStaticText* GetStaticTextReactance() { return m_staticTextReactance; }
518  wxTextCtrl* GetTextCtrlReactance() { return m_textCtrlReactance; }
519  wxChoice* GetChoiceReactance() { return m_choiceReactance; }
520  wxStaticLine* GetStaticLine_1() { return m_staticLine_1; }
521  wxStaticText* GetStaticTextConnection() { return m_staticTextConnection; }
522  wxChoice* GetChoiceConnection() { return m_choiceConnection; }
523  wxStaticText* GetStaticTextTurnsRatio() { return m_staticTextTurnsRatio; }
524  wxTextCtrl* GetTextCtrlTurnRatio() { return m_textCtrlTurnRatio; }
525  wxStaticText* GetStaticTextPhaseShift() { return m_staticTextPhaseShift; }
526  wxTextCtrl* GetTextCtrlPhaseShift() { return m_textCtrlPhaseShift; }
527  wxStaticText* GetStaticTextDeg() { return m_staticTextDeg; }
528  wxCheckBox* GetCheckUseTransformerPower() { return m_checkUseTransformerPower; }
529  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
530  wxStaticText* GetStaticTextZeroResistance() { return m_staticTextZeroResistance; }
531  wxTextCtrl* GetTextCtrlZeroResistance() { return m_textCtrlZeroResistance; }
532  wxStaticText* GetStaticTextZeroReactance() { return m_staticTextZeroReactance; }
533  wxTextCtrl* GetTextCtrlZeroReactance() { return m_textCtrlZeroReactance; }
534  wxStaticText* GetStaticTextPrimResistance() { return m_staticTextPrimResistance; }
535  wxTextCtrl* GetTextCtrlPrimResistance() { return m_textCtrlPrimResistance; }
536  wxStaticText* GetStaticTextPrimReactance() { return m_staticTextPrimReactance; }
537  wxTextCtrl* GetTextCtrlPrimReactance() { return m_textCtrlPrimReactance; }
538  wxStaticText* GetStaticTextSecResistance() { return m_staticTextSecResistance; }
539  wxTextCtrl* GetTextCtrlSecResistance() { return m_textCtrlSecResistance; }
540  wxStaticText* GetStaticTextSecReactance() { return m_staticTextSecReactance; }
541  wxTextCtrl* GetTextCtrlSecReactance() { return m_textCtrlSecReactance; }
542  wxPanel* GetPanelFault() { return m_panelFault; }
543  wxNotebook* GetNotebook() { return m_notebook; }
544  wxButton* GetButtonStability() { return m_buttonStability; }
545  wxButton* GetButtonOK() { return m_buttonOK; }
546  wxButton* GetButtonCancel() { return m_buttonCancel; }
547  TransformerFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Transformer"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
548  virtual ~TransformerFormBase();
549 };
550 
551 
552 class LoadFormBase : public wxDialog
553 {
554 protected:
555  wxNotebook* m_notebook;
556  wxPanel* m_panelGeneral;
557  wxStaticText* m_staticTextName;
558  wxTextCtrl* m_textCtrlName;
559  wxStaticText* m_staticTextActivePower;
560  wxTextCtrl* m_textCtrlActivePower;
561  wxChoice* m_choiceActivePower;
562  wxStaticText* m_staticTextReactivePower;
563  wxTextCtrl* m_textCtrlReactivePower;
564  wxChoice* m_choiceReactivePower;
565  wxStaticText* m_staticTextType;
566  wxChoice* m_choiceType;
567  wxPanel* m_panelStability;
568  wxCheckBox* m_checkBoxPlotData;
569  wxCheckBox* m_checkBoxUseCompLoad;
570  wxStaticText* m_staticTextActivePowerImp;
571  wxTextCtrl* m_textCtrlActivePowerImp;
572  wxStaticText* m_staticTextPerc_1;
573  wxStaticText* m_staticTextActivePowerCur;
574  wxTextCtrl* m_textCtrlActivePowerCur;
575  wxStaticText* m_staticTextPerc_2;
576  wxStaticText* m_staticTextActivePowerPow;
577  wxTextCtrl* m_textCtrlActivePowerPow;
578  wxStaticText* m_staticTextPerc_3;
579  wxStaticText* m_staticTextReactivePowerImp;
580  wxTextCtrl* m_textCtrlReactivePowerImp;
581  wxStaticText* m_staticTextPerc_4;
582  wxStaticText* m_staticTextReactivePowerCur;
583  wxTextCtrl* m_textCtrlReactivePowerCur;
584  wxStaticText* m_staticTextPerc_5;
585  wxStaticText* m_staticTextReactivePowerPow;
586  wxTextCtrl* m_textCtrlReactivePowerPow;
587  wxStaticText* m_staticTextPerc_6;
588  wxButton* m_buttonStabButton;
589  wxButton* m_buttonOK;
590  wxButton* m_ButtonCancel;
591 
592 protected:
593  virtual void OnCheckBoxCompLoadClick(wxCommandEvent& event) { event.Skip(); }
594  virtual void OnStabilityButtonClick(wxCommandEvent& event) { event.Skip(); }
595  virtual void OnOnButtonClick(wxCommandEvent& event) { event.Skip(); }
596  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
597 
598 public:
599  wxStaticText* GetStaticTextName() { return m_staticTextName; }
600  wxTextCtrl* GetTextCtrlName() { return m_textCtrlName; }
601  wxStaticText* GetStaticTextActivePower() { return m_staticTextActivePower; }
602  wxTextCtrl* GetTextCtrlActivePower() { return m_textCtrlActivePower; }
603  wxChoice* GetChoiceActivePower() { return m_choiceActivePower; }
604  wxStaticText* GetStaticTextReactivePower() { return m_staticTextReactivePower; }
605  wxTextCtrl* GetTextCtrlReactivePower() { return m_textCtrlReactivePower; }
606  wxChoice* GetChoiceReactivePower() { return m_choiceReactivePower; }
607  wxStaticText* GetStaticTextType() { return m_staticTextType; }
608  wxChoice* GetChoiceType() { return m_choiceType; }
609  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
610  wxCheckBox* GetCheckBoxPlotData() { return m_checkBoxPlotData; }
611  wxCheckBox* GetCheckBoxUseCompLoad() { return m_checkBoxUseCompLoad; }
612  wxStaticText* GetStaticTextActivePowerImp() { return m_staticTextActivePowerImp; }
613  wxTextCtrl* GetTextCtrlActivePowerImp() { return m_textCtrlActivePowerImp; }
614  wxStaticText* GetStaticTextPerc_1() { return m_staticTextPerc_1; }
615  wxStaticText* GetStaticTextActivePowerCur() { return m_staticTextActivePowerCur; }
616  wxTextCtrl* GetTextCtrlActivePowerCur() { return m_textCtrlActivePowerCur; }
617  wxStaticText* GetStaticTextPerc_2() { return m_staticTextPerc_2; }
618  wxStaticText* GetStaticTextActivePowerPow() { return m_staticTextActivePowerPow; }
619  wxTextCtrl* GetTextCtrlActivePowerPow() { return m_textCtrlActivePowerPow; }
620  wxStaticText* GetStaticTextPerc_3() { return m_staticTextPerc_3; }
621  wxStaticText* GetStaticTextReactivePowerImp() { return m_staticTextReactivePowerImp; }
622  wxTextCtrl* GetTextCtrlReactivePowerImp() { return m_textCtrlReactivePowerImp; }
623  wxStaticText* GetStaticTextPerc_4() { return m_staticTextPerc_4; }
624  wxStaticText* GetStaticTextReactivePowerCur() { return m_staticTextReactivePowerCur; }
625  wxTextCtrl* GetTextCtrlReactivePowerCur() { return m_textCtrlReactivePowerCur; }
626  wxStaticText* GetStaticTextPerc_5() { return m_staticTextPerc_5; }
627  wxStaticText* GetStaticTextReactivePowerPow() { return m_staticTextReactivePowerPow; }
628  wxTextCtrl* GetTextCtrlReactivePowerPow() { return m_textCtrlReactivePowerPow; }
629  wxStaticText* GetStaticTextPerc_6() { return m_staticTextPerc_6; }
630  wxPanel* GetPanelStability() { return m_panelStability; }
631  wxNotebook* GetNotebook() { return m_notebook; }
632  wxButton* GetButtonStabButton() { return m_buttonStabButton; }
633  wxButton* GetButtonOK() { return m_buttonOK; }
634  wxButton* GetButtonCancel() { return m_ButtonCancel; }
635  LoadFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Load"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
636  virtual ~LoadFormBase();
637 };
638 
639 
640 class ReactiveShuntElementFormBase : public wxDialog
641 {
642 protected:
643  wxNotebook* m_notebook;
644  wxPanel* m_panelGeneral;
645  wxStaticText* m_staticTextName;
646  wxTextCtrl* m_textCtrlName;
647  wxStaticText* m_staticTextReactivePower;
648  wxTextCtrl* m_textCtrlReactivePower;
649  wxChoice* m_choiceReactivePower;
650  wxButton* m_buttonStabButton;
651  wxButton* m_buttonOK;
652  wxButton* m_buttonCancel;
653 
654 protected:
655  virtual void OnStabilityButtonClick(wxCommandEvent& event) { event.Skip(); }
656  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
657  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
658 
659 public:
660  wxStaticText* GetStaticTextName() { return m_staticTextName; }
661  wxTextCtrl* GetTextCtrlName() { return m_textCtrlName; }
662  wxStaticText* GetStaticTextReactivePower() { return m_staticTextReactivePower; }
663  wxTextCtrl* GetTextCtrlReactivePower() { return m_textCtrlReactivePower; }
664  wxChoice* GetChoiceReactivePower() { return m_choiceReactivePower; }
665  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
666  wxNotebook* GetNotebook() { return m_notebook; }
667  wxButton* GetButtonStabButton() { return m_buttonStabButton; }
668  wxButton* GetButtonOK() { return m_buttonOK; }
669  wxButton* GetButtonCancel() { return m_buttonCancel; }
670  ReactiveShuntElementFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Reactive shunt element"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
671  virtual ~ReactiveShuntElementFormBase();
672 };
673 
674 
675 class SwitchingFormBase : public wxDialog
676 {
677 protected:
678  wxPropertyGridManager* m_pgMgrSwitchingsProp;
679  wxPGProperty* m_pgPropTitle;
680  wxPGProperty* m_pgPropType;
681  wxPGProperty* m_pgPropTime;
682  wxButton* m_buttonInsert;
683  wxButton* m_buttonRemove;
684  wxButton* m_buttonUp;
685  wxButton* m_buttonDown;
686  wxStaticText* m_staticTextSwList;
687  wxListCtrl* m_listCtrlSwitchings;
688  wxButton* m_buttonOK;
689  wxButton* m_buttonCancel;
690 
691 protected:
692  virtual void OnChangeProperties(wxPropertyGridEvent& event) { event.Skip(); }
693  virtual void OnInsertButtonClick(wxCommandEvent& event) { event.Skip(); }
694  virtual void OnRemoveButtonClick(wxCommandEvent& event) { event.Skip(); }
695  virtual void OnUpButtonClick(wxCommandEvent& event) { event.Skip(); }
696  virtual void OnDownButtonClick(wxCommandEvent& event) { event.Skip(); }
697  virtual void OnSelectItem(wxListEvent& event) { event.Skip(); }
698  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
699  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
700 
701 public:
702  wxPropertyGridManager* GetPgMgrSwitchingsProp() { return m_pgMgrSwitchingsProp; }
703  wxButton* GetButtonInsert() { return m_buttonInsert; }
704  wxButton* GetButtonRemove() { return m_buttonRemove; }
705  wxButton* GetButtonUp() { return m_buttonUp; }
706  wxButton* GetButtonDown() { return m_buttonDown; }
707  wxStaticText* GetStaticTextSwList() { return m_staticTextSwList; }
708  wxListCtrl* GetListCtrlSwitchings() { return m_listCtrlSwitchings; }
709  wxButton* GetButtonOK() { return m_buttonOK; }
710  wxButton* GetButtonCancel() { return m_buttonCancel; }
711  SwitchingFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Switching"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
712  virtual ~SwitchingFormBase();
713 };
714 
715 
716 class IndMotorFormBase : public wxDialog
717 {
718 protected:
719  wxNotebook* m_notebook;
720  wxPanel* m_panelGeneral;
721  wxStaticText* m_staticTextName;
722  wxTextCtrl* m_textCtrlName;
723  wxStaticText* m_staticTextActivePower;
724  wxTextCtrl* m_textCtrlActivePower;
725  wxChoice* m_choiceActivePower;
726  wxStaticText* m_staticTextReactivePower;
727  wxTextCtrl* m_textCtrlReactivePower;
728  wxChoice* m_choiceReactivePower;
729  wxButton* m_buttonStabButton;
730  wxButton* m_buttonOK;
731  wxButton* m_ButtonCancel;
732 
733 protected:
734  virtual void OnStabilityButtonClick(wxCommandEvent& event) { event.Skip(); }
735  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
736  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
737 
738 public:
739  wxStaticText* GetStaticTextName() { return m_staticTextName; }
740  wxTextCtrl* GetTextCtrlName() { return m_textCtrlName; }
741  wxStaticText* GetStaticTextActivePower() { return m_staticTextActivePower; }
742  wxTextCtrl* GetTextCtrlActivePower() { return m_textCtrlActivePower; }
743  wxChoice* GetChoiceActivePower() { return m_choiceActivePower; }
744  wxStaticText* GetStaticTextReactivePower() { return m_staticTextReactivePower; }
745  wxTextCtrl* GetTextCtrlReactivePower() { return m_textCtrlReactivePower; }
746  wxChoice* GetChoiceReactivePower() { return m_choiceReactivePower; }
747  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
748  wxNotebook* GetNotebook() { return m_notebook; }
749  wxButton* GetButtonStabButton() { return m_buttonStabButton; }
750  wxButton* GetButtonOK() { return m_buttonOK; }
751  wxButton* GetButtonCancel() { return m_ButtonCancel; }
752  IndMotorFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Motor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
753  virtual ~IndMotorFormBase();
754 };
755 
756 
757 class TextFormBase : public wxDialog
758 {
759 protected:
760  wxNotebook* m_notebook;
761  wxPanel* m_panelGeneral;
762  wxStaticText* m_staticTextElement;
763  wxChoice* m_choiceElement;
764  wxStaticText* m_staticTextName;
765  wxChoice* m_choiceName;
766  wxStaticText* m_staticTextType;
767  wxChoice* m_choiceTextType;
768  wxStaticText* m_staticTextFromBus;
769  wxChoice* m_choiceTextFromBus;
770  wxStaticText* m_staticTextToBus;
771  wxChoice* m_choiceTextToBus;
772  wxStaticText* m_staticTextUnit;
773  wxChoice* m_choiceTextUnit;
774  wxStaticText* m_staticTextDecimal;
775  wxTextCtrl* m_textCtrlDecimal;
776  wxStaticText* m_staticTextPreview;
777  wxTextCtrl* m_textCtrlPreview;
778  wxButton* m_buttonOK;
779  wxButton* m_ButtonCancel;
780 
781 protected:
782  virtual void OnElementChoiceSelected(wxCommandEvent& event) { event.Skip(); }
783  virtual void OnNameChoiceSelected(wxCommandEvent& event) { event.Skip(); }
784  virtual void OnTypeChoiceSelected(wxCommandEvent& event) { event.Skip(); }
785  virtual void OnFromBusChoiceSelected(wxCommandEvent& event) { event.Skip(); }
786  virtual void OnToBusChoiceSelected(wxCommandEvent& event) { event.Skip(); }
787  virtual void OnUnitChoiceSelected(wxCommandEvent& event) { event.Skip(); }
788  virtual void OnTextEnter(wxCommandEvent& event) { event.Skip(); }
789  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
790  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
791 
792 public:
793  wxStaticText* GetStaticTextElement() { return m_staticTextElement; }
794  wxChoice* GetChoiceElement() { return m_choiceElement; }
795  wxStaticText* GetStaticTextName() { return m_staticTextName; }
796  wxChoice* GetChoiceName() { return m_choiceName; }
797  wxStaticText* GetStaticTextType() { return m_staticTextType; }
798  wxChoice* GetChoiceTextType() { return m_choiceTextType; }
799  wxStaticText* GetStaticTextFromBus() { return m_staticTextFromBus; }
800  wxChoice* GetChoiceTextFromBus() { return m_choiceTextFromBus; }
801  wxStaticText* GetStaticTextToBus() { return m_staticTextToBus; }
802  wxChoice* GetChoiceTextToBus() { return m_choiceTextToBus; }
803  wxStaticText* GetStaticTextUnit() { return m_staticTextUnit; }
804  wxChoice* GetChoiceTextUnit() { return m_choiceTextUnit; }
805  wxStaticText* GetStaticTextDecimal() { return m_staticTextDecimal; }
806  wxTextCtrl* GetTextCtrlDecimal() { return m_textCtrlDecimal; }
807  wxStaticText* GetStaticTextPreview() { return m_staticTextPreview; }
808  wxTextCtrl* GetTextCtrlPreview() { return m_textCtrlPreview; }
809  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
810  wxNotebook* GetNotebook() { return m_notebook; }
811  wxButton* GetButtonOK() { return m_buttonOK; }
812  wxButton* GetButtonCancel() { return m_ButtonCancel; }
813  TextFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
814  virtual ~TextFormBase();
815 };
816 
817 
818 class TransferFunctionFormBase : public wxDialog
819 {
820 protected:
821  wxNotebook* m_notebook;
822  wxPanel* m_panelGeneral;
823  wxStaticText* m_staticTextNumerator;
824  wxTextCtrl* m_textCtrlNumerator;
825  wxStaticText* m_staticTextDenominator;
826  wxTextCtrl* m_textCtrlDenominator;
827  wxButton* m_buttonOK;
828  wxButton* m_ButtonCancel;
829 
830 protected:
831  virtual void OnOKClick(wxCommandEvent& event) { event.Skip(); }
832  virtual void OnCancelClick(wxCommandEvent& event) { event.Skip(); }
833 
834 public:
835  wxStaticText* GetStaticTextNumerator() { return m_staticTextNumerator; }
836  wxTextCtrl* GetTextCtrlNumerator() { return m_textCtrlNumerator; }
837  wxStaticText* GetStaticTextDenominator() { return m_staticTextDenominator; }
838  wxTextCtrl* GetTextCtrlDenominator() { return m_textCtrlDenominator; }
839  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
840  wxNotebook* GetNotebook() { return m_notebook; }
841  wxButton* GetButtonOK() { return m_buttonOK; }
842  wxButton* GetButtonCancel() { return m_ButtonCancel; }
843  TransferFunctionFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Transfer function"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
844  virtual ~TransferFunctionFormBase();
845 };
846 
847 
848 class SumFormBase : public wxDialog
849 {
850 protected:
851  wxNotebook* m_notebook;
852  wxPanel* m_panelGeneral;
853  wxStaticText* m_staticTextSigns;
854  wxTextCtrl* m_textCtrlSigns;
855  wxButton* m_buttonOK;
856  wxButton* m_ButtonCancel;
857 
858 protected:
859  virtual void OnOKClick(wxCommandEvent& event) { event.Skip(); }
860  virtual void OnCancelClick(wxCommandEvent& event) { event.Skip(); }
861 
862 public:
863  wxStaticText* GetStaticTextSigns() { return m_staticTextSigns; }
864  wxTextCtrl* GetTextCtrlSigns() { return m_textCtrlSigns; }
865  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
866  wxNotebook* GetNotebook() { return m_notebook; }
867  wxButton* GetButtonOK() { return m_buttonOK; }
868  wxButton* GetButtonCancel() { return m_ButtonCancel; }
869  SumFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Sum"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
870  virtual ~SumFormBase();
871 };
872 
873 
874 class LimiterFormBase : public wxDialog
875 {
876 protected:
877  wxNotebook* m_notebook;
878  wxPanel* m_panelGeneral;
879  wxStaticText* m_staticTextUpLimiter;
880  wxTextCtrl* m_textCtrlUpLimit;
881  wxStaticText* m_staticTextLowLimit;
882  wxTextCtrl* m_textCtrlLowLimit;
883  wxButton* m_buttonOK;
884  wxButton* m_ButtonCancel;
885 
886 protected:
887  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
888  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
889 
890 public:
891  wxStaticText* GetStaticTextUpLimiter() { return m_staticTextUpLimiter; }
892  wxTextCtrl* GetTextCtrlUpLimit() { return m_textCtrlUpLimit; }
893  wxStaticText* GetStaticTextLowLimit() { return m_staticTextLowLimit; }
894  wxTextCtrl* GetTextCtrlLowLimit() { return m_textCtrlLowLimit; }
895  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
896  wxNotebook* GetNotebook() { return m_notebook; }
897  wxButton* GetButtonOK() { return m_buttonOK; }
898  wxButton* GetButtonCancel() { return m_ButtonCancel; }
899  LimiterFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Limiter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
900  virtual ~LimiterFormBase();
901 };
902 
903 
904 class RateLimiterFormBase : public wxDialog
905 {
906 protected:
907  wxNotebook* m_notebook;
908  wxPanel* m_panelGeneral;
909  wxStaticText* m_staticTextUpLimiter;
910  wxTextCtrl* m_textCtrlUpLimit;
911  wxStaticText* m_staticTextLowLimit;
912  wxTextCtrl* m_textCtrlLowLimit;
913  wxButton* m_buttonOK;
914  wxButton* m_ButtonCancel;
915 
916 protected:
917  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
918  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
919 
920 public:
921  wxStaticText* GetStaticTextUpLimiter() { return m_staticTextUpLimiter; }
922  wxTextCtrl* GetTextCtrlUpLimit() { return m_textCtrlUpLimit; }
923  wxStaticText* GetStaticTextLowLimit() { return m_staticTextLowLimit; }
924  wxTextCtrl* GetTextCtrlLowLimit() { return m_textCtrlLowLimit; }
925  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
926  wxNotebook* GetNotebook() { return m_notebook; }
927  wxButton* GetButtonOK() { return m_buttonOK; }
928  wxButton* GetButtonCancel() { return m_ButtonCancel; }
929  RateLimiterFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Rate limiter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
930  virtual ~RateLimiterFormBase();
931 };
932 
933 
934 class ExponentialFormBase : public wxDialog
935 {
936 protected:
937  wxNotebook* m_notebook;
938  wxPanel* m_panelGeneral;
939  wxStaticText* m_staticTextExp;
940  wxStaticText* m_staticTextAValue;
941  wxTextCtrl* m_textCtrlAValue;
942  wxStaticText* m_staticTextBValue;
943  wxTextCtrl* m_textCtrlBValue;
944  wxButton* m_buttonOK;
945  wxButton* m_buttonCancel;
946 
947 protected:
948  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
949  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
950 
951 public:
952  wxStaticText* GetStaticTextExp() { return m_staticTextExp; }
953  wxStaticText* GetStaticTextAValue() { return m_staticTextAValue; }
954  wxTextCtrl* GetTextCtrlAValue() { return m_textCtrlAValue; }
955  wxStaticText* GetStaticTextBValue() { return m_staticTextBValue; }
956  wxTextCtrl* GetTextCtrlBValue() { return m_textCtrlBValue; }
957  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
958  wxNotebook* GetNotebook() { return m_notebook; }
959  wxButton* GetButtonOK() { return m_buttonOK; }
960  wxButton* GetButtonCancel() { return m_buttonCancel; }
961  ExponentialFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Exponential"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
962  virtual ~ExponentialFormBase();
963 };
964 
965 
966 class ConstantFormBase : public wxDialog
967 {
968 protected:
969  wxNotebook* m_notebook;
970  wxPanel* m_panelGeneral;
971  wxStaticText* m_staticTextValue;
972  wxTextCtrl* m_textCtrlValue;
973  wxButton* m_buttonOK;
974  wxButton* m_buttonCancel;
975 
976 protected:
977  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
978  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
979 
980 public:
981  wxStaticText* GetStaticTextValue() { return m_staticTextValue; }
982  wxTextCtrl* GetTextCtrlValue() { return m_textCtrlValue; }
983  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
984  wxNotebook* GetNotebook() { return m_notebook; }
985  wxButton* GetButtonOK() { return m_buttonOK; }
986  wxButton* GetButtonCancel() { return m_buttonCancel; }
987  ConstantFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Constant"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
988  virtual ~ConstantFormBase();
989 };
990 
991 
992 class GainFormBase : public wxDialog
993 {
994 protected:
995  wxNotebook* m_notebook;
996  wxPanel* m_panelGeneral;
997  wxStaticText* m_staticTextValue;
998  wxTextCtrl* m_textCtrlValue;
999  wxButton* m_buttonOK;
1000  wxButton* m_buttonCancel;
1001 
1002 protected:
1003  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
1004  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
1005 
1006 public:
1007  wxStaticText* GetStaticTextValue() { return m_staticTextValue; }
1008  wxTextCtrl* GetTextCtrlValue() { return m_textCtrlValue; }
1009  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
1010  wxNotebook* GetNotebook() { return m_notebook; }
1011  wxButton* GetButtonOK() { return m_buttonOK; }
1012  wxButton* GetButtonCancel() { return m_buttonCancel; }
1013  GainFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Gain"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
1014  virtual ~GainFormBase();
1015 };
1016 
1017 
1018 class IOControlFormBase : public wxDialog
1019 {
1020 protected:
1021  wxNotebook* m_notebook;
1022  wxPanel* m_panelGeneral;
1023  wxCheckBox* m_checkBoxInput;
1024  wxChoice* m_choiceInput;
1025  wxCheckBox* m_checkBoxOutput;
1026  wxChoice* m_choiceOutput;
1027  wxButton* m_buttonOK;
1028  wxButton* m_ButtonCancel;
1029 
1030 protected:
1031  virtual void OnInputChecked(wxCommandEvent& event) { event.Skip(); }
1032  virtual void OnOutputChecked(wxCommandEvent& event) { event.Skip(); }
1033  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
1034  virtual void OnCancelButtonClick(wxCommandEvent& event) { event.Skip(); }
1035 
1036 public:
1037  wxCheckBox* GetCheckBoxInput() { return m_checkBoxInput; }
1038  wxChoice* GetChoiceInput() { return m_choiceInput; }
1039  wxCheckBox* GetCheckBoxOutput() { return m_checkBoxOutput; }
1040  wxChoice* GetChoiceOutput() { return m_choiceOutput; }
1041  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
1042  wxNotebook* GetNotebook() { return m_notebook; }
1043  wxButton* GetButtonOK() { return m_buttonOK; }
1044  wxButton* GetButtonCancel() { return m_ButtonCancel; }
1045  IOControlFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Input / Output"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
1046  virtual ~IOControlFormBase();
1047 };
1048 
1049 #endif
- - - - - - - - - - - - - - - - - -
-
- - - - diff --git a/docs/doxygen/html/_element_form_bitmaps_8cpp_source.html b/docs/doxygen/html/_element_form_bitmaps_8cpp_source.html deleted file mode 100644 index e437032..0000000 --- a/docs/doxygen/html/_element_form_bitmaps_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/ElementFormBitmaps.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElementFormBitmaps.cpp
-
-
-
1 //
2 // This file was automatically generated by wxrc, do not edit by hand.
3 //
4 
5 #include <wx/wxprec.h>
6 
7 #ifdef __BORLANDC__
8  #pragma hdrstop
9 #endif
10 
11 #include <wx/filesys.h>
12 #include <wx/fs_mem.h>
13 #include <wx/xrc/xmlres.h>
14 #include <wx/xrc/xh_all.h>
15 
16 #if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
17  #define XRC_ADD_FILE(name, data, size, mime) \
18  wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
19 #else
20  #define XRC_ADD_FILE(name, data, size, mime) \
21  wxMemoryFSHandler::AddFile(name, data, size)
22 #endif
23 
24 static size_t xml_res_size_0 = 137;
25 static unsigned char xml_res_file_0[] = {
26 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
27 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
28 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
29 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
30 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
31 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
32 45,62,10,60,47,114,101,115,111,117,114,99,101,62,10};
33 
34 void wxC9EE9InitBitmapResources()
35 {
36 
37  // Check for memory FS. If not present, load the handler:
38  {
39  wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
40  wxFileSystem fsys;
41  wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
42  wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
43  if (f) delete f;
44  else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
45  }
46 
47  XRC_ADD_FILE(wxT("XRC_resource/ElementFormBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ElementFormBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml"));
48  wxXmlResource::Get()->Load(wxT("memory:XRC_resource/ElementFormBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_ElementFormBitmaps.xrc"));
49 }
-
- - - - diff --git a/docs/doxygen/html/_element_plot_data_8cpp_source.html b/docs/doxygen/html/_element_plot_data_8cpp_source.html deleted file mode 100644 index 80d9705..0000000 --- a/docs/doxygen/html/_element_plot_data_8cpp_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - -Project/ElementPlotData.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElementPlotData.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ElementPlotData.h"
19 
20 ElementPlotData::ElementPlotData(wxString name, CurveType curveType)
21 {
22  m_name = name;
23  m_curveType = curveType;
24 }
25 
26 ElementPlotData::~ElementPlotData() {}
27 void ElementPlotData::AddData(std::vector<double> values, wxString name)
28 {
29  PlotData* data = new PlotData();
30  data->SetName(name);
31  data->SetValues(values);
32  data->SetPlot(false);
33  data->SetAxis(0);
34  data->SetColour(*wxBLACK);
35  data->SetPenType(wxPENSTYLE_SOLID);
36  data->SetThick(1);
37 
38  m_elementData.push_back(data);
39 }
-
This class is responsible to manage the graphical data of electromechanical result to be plotted on c...
-
-
- - - - diff --git a/docs/doxygen/html/_element_plot_data_8h.html b/docs/doxygen/html/_element_plot_data_8h.html index efd1791..1c50289 100644 --- a/docs/doxygen/html/_element_plot_data_8h.html +++ b/docs/doxygen/html/_element_plot_data_8h.html @@ -94,9 +94,7 @@ $(document).ready(function(){initNavTree('_element_plot_data_8h.html','');}); #include <wx/colour.h>
#include <wx/pen.h>
#include <vector>
- -

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_element_plot_data_8h_source.html b/docs/doxygen/html/_element_plot_data_8h_source.html deleted file mode 100644 index b86375d..0000000 --- a/docs/doxygen/html/_element_plot_data_8h_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - -Project/ElementPlotData.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  PlotData
- - - - - -
- - - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ElementPlotData.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ELEMENTPLOTDATA_H
19 #define ELEMENTPLOTDATA_H
20 
21 #include <wx/treectrl.h>
22 #include <wx/colour.h>
23 #include <wx/pen.h>
24 
25 #include <vector>
26 
35 class PlotData : public wxTreeItemData
36 {
37  public:
38  PlotData() {}
39  ~PlotData() {}
40  void SetAxis(int axis) { m_axis = axis; }
41  void SetColour(const wxColour& colour) { m_colour = colour; }
42  void SetName(const wxString& name) { m_name = name; }
43  void SetPenType(const wxPenStyle& penType) { m_penType = penType; }
44  void SetPlot(bool plot) { m_plot = plot; }
45  void SetThick(int thick) { m_thick = thick; }
46  void SetValues(const std::vector<double>& values) { m_values = values; }
47  int GetAxis() const { return m_axis; }
48  wxColour GetColour() const { return m_colour; }
49  wxString GetName() const { return m_name; }
50  wxPenStyle GetPenType() const { return m_penType; }
51  bool IsPlot() const { return m_plot; }
52  int GetThick() const { return m_thick; }
53  std::vector<double> GetValues() const { return m_values; }
54  protected:
55  std::vector<double> m_values;
56  wxString m_name;
57  bool m_plot;
58  wxColour m_colour;
59  int m_thick;
60  wxPenStyle m_penType;
61  int m_axis;
62 };
63 
65 {
66  public:
67  enum CurveType {
68  CT_BUS = 0,
69  CT_SYNC_GENERATOR,
70  CT_SYNC_COMPENSATOR,
71  CT_TRANSFORMER,
72  CT_LINE,
73  CT_IND_MOTOR,
74  CT_SHUNT_INDUCTOR,
75  CT_SHUNT_CAPACITOR,
76  CT_LOAD,
77  CT_TEST,
78  NUM_ELEMENTS,
79  CT_TIME
80  };
81  ElementPlotData(){};
82  ElementPlotData(wxString name, CurveType curveType);
83  ~ElementPlotData();
84 
85  wxString GetName() const { return m_name; }
86  void SetName(wxString name) { m_name = name; }
87  CurveType GetCurveType() const { return m_curveType; }
88  void SetCurveType(CurveType type) { m_curveType = type; }
89  PlotData* GetPlotData(int index) const { return m_elementData[index]; }
90  void AddData(std::vector<double> values, wxString name);
91 
92  int GetElementDataNumber() const { return static_cast<int>(m_elementData.size()); }
93  std::vector<double> GetValues(int index) const { return m_elementData[index]->GetValues(); }
94  void SetValues(int index, std::vector<double> values) { m_elementData[index]->SetValues(values); }
95  void SetPlot(int index, bool plot = true) { m_elementData[index]->SetPlot(plot); }
96  wxString GetDataName(int index) const { return m_elementData[index]->GetName(); }
97  void SetDataName(int index, wxString name) { m_elementData[index]->SetName(name); }
98  wxColour GetColour(int index) const { return m_elementData[index]->GetColour(); }
99  void SetColour(int index, wxColour colour) { m_elementData[index]->SetColour(colour); }
100  int GetThick(int index) const { return m_elementData[index]->GetThick(); }
101  void SetThick(int index, int thick) { m_elementData[index]->SetThick(thick); }
102  wxPenStyle GetPenType(int index) const { return m_elementData[index]->GetPenType(); }
103  void SetPenType(int index, wxPenStyle penType) { m_elementData[index]->SetPenType(penType); }
104  int GetAxis(int index) const { return m_elementData[index]->GetAxis(); }
105  void SetAxis(int index, int axis) { m_elementData[index]->SetAxis(axis); }
106  protected:
107  wxString m_name;
108  CurveType m_curveType;
109  std::vector<PlotData*> m_elementData;
110 };
111 
112 #endif // ELEMENTPLOTDATA_H
-
This class is responsible to manage the graphical data of electromechanical result to be plotted on c...
-
-
- - - - diff --git a/docs/doxygen/html/_exponential_8cpp_source.html b/docs/doxygen/html/_exponential_8cpp_source.html deleted file mode 100644 index 5061d3d..0000000 --- a/docs/doxygen/html/_exponential_8cpp_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/Exponential.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Exponential.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Exponential.h"
19 #include "ExponentialForm.h"
20 
21 Exponential::Exponential(int id) : ControlElement(id)
22 {
23  m_width = m_height = 36.0;
24  Node* nodeIn = new Node(m_position + wxPoint2DDouble(-18, 0), Node::NODE_IN, m_borderSize);
25  nodeIn->StartMove(m_position);
26  Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
27  nodeOut->SetAngle(180.0);
28  nodeOut->StartMove(m_position);
29  m_nodeList.push_back(nodeIn);
30  m_nodeList.push_back(nodeOut);
31 }
32 
33 Exponential::~Exponential() {}
34 void Exponential::Draw(wxPoint2DDouble translation, double scale) const
35 {
36  glLineWidth(1.0);
37  if(m_selected) {
38  glColor4dv(m_selectionColour.GetRGBA());
39  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
40  DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
41  }
42  glColor4d(1.0, 1.0, 1.0, 1.0);
43  DrawRectangle(m_position, m_width, m_height);
44  glColor4d(0.0, 0.0, 0.0, 1.0);
45  DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
46 
47  // Plot symbol.
48  std::vector<wxPoint2DDouble> axis;
49  axis.push_back(m_position + wxPoint2DDouble(-13, 13));
50  axis.push_back(m_position + wxPoint2DDouble(13, 13));
51  axis.push_back(m_position + wxPoint2DDouble(-13, -13));
52  axis.push_back(m_position + wxPoint2DDouble(-13, 13));
53  DrawLine(axis, GL_LINES);
54 
55  glLineWidth(2.0);
56  std::vector<wxPoint2DDouble> expSymbol;
57  expSymbol.push_back(m_position + wxPoint2DDouble(-13, 13));
58  expSymbol.push_back(m_position + wxPoint2DDouble(-6, 13));
59  expSymbol.push_back(m_position + wxPoint2DDouble(2, 12));
60  expSymbol.push_back(m_position + wxPoint2DDouble(4, 11));
61  expSymbol.push_back(m_position + wxPoint2DDouble(6, 10));
62  expSymbol.push_back(m_position + wxPoint2DDouble(8, 7));
63  expSymbol.push_back(m_position + wxPoint2DDouble(11, -1));
64  expSymbol.push_back(m_position + wxPoint2DDouble(12, -7));
65  expSymbol.push_back(m_position + wxPoint2DDouble(13, -13));
66  glColor4d(0.0, 0.3, 1.0, 1.0);
67  DrawLine(expSymbol);
68 
69  glColor4d(0.0, 0.0, 0.0, 1.0);
70  DrawNodes();
71 }
72 
73 bool Exponential::ShowForm(wxWindow* parent, Element* element)
74 {
75  ExponentialForm* form = new ExponentialForm(parent, this);
76  if(form->ShowModal() == wxID_OK) {
77  form->Destroy();
78  return true;
79  }
80  form->Destroy();
81  return false;
82 }
83 
84 void Exponential::Rotate(bool clockwise)
85 {
86  if(clockwise)
87  m_angle += 90.0;
88  else
89  m_angle -= 90.0;
90  if(m_angle >= 360.0)
91  m_angle = 0.0;
92  else if(m_angle < 0)
93  m_angle = 270.0;
94 
95  UpdatePoints();
96 
97  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
98  Node* node = *it;
99  node->Rotate(clockwise);
100  }
101 }
102 
103 void Exponential::UpdatePoints()
104 {
105  if(m_angle == 0.0) {
106  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
107  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, 0));
108  } else if(m_angle == 90.0) {
109  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -18));
110  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, 18));
111  } else if(m_angle == 180.0) {
112  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 0));
113  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
114  } else if(m_angle == 270.0) {
115  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, 18));
116  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -18));
117  }
118 }
119 
120 void Exponential::GetValues(double& aValue, double& bValue)
121 {
122  aValue = m_aValue;
123  bValue = m_bValue;
124 }
125 
126 void Exponential::SetValues(double aValue, double bValue)
127 {
128  m_aValue = aValue;
129  m_bValue = bValue;
130 }
131 
132 bool Exponential::Solve(double input, double timeStep)
133 {
134  m_output = m_aValue * std::exp(m_bValue * input);
135  return true;
136 }
137 
139 {
140  Exponential* copy = new Exponential(m_elementID);
141  *copy = *this;
142  return copy;
143 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual bool Solve(double input, double timeStep)
Calculates the exponential.
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Exponential.cpp:84
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Exponential.cpp:73
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Exponential.cpp:34
-
virtual Element * GetCopy()
Get a the element copy.
-
Generates an output following an exponential function.
Definition: Exponential.h:32
-
Form to edit the exponential control data.
- - - -
-
- - - - diff --git a/docs/doxygen/html/_exponential_8h.html b/docs/doxygen/html/_exponential_8h.html index 56fc1e9..1ebafb2 100644 --- a/docs/doxygen/html/_exponential_8h.html +++ b/docs/doxygen/html/_exponential_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_exponential_8h.html','');});
Exponential.h File Reference
-
#include "ControlElement.h"
-
-

Go to the source code of this file.

- +
#include "ControlElement.h"
+
diff --git a/docs/doxygen/html/_exponential_8h_source.html b/docs/doxygen/html/_exponential_8h_source.html deleted file mode 100644 index 429bace..0000000 --- a/docs/doxygen/html/_exponential_8h_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/Exponential.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Exponential
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Exponential.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef EXPONENTIAL_H
19 #define EXPONENTIAL_H
20 
21 #include "ControlElement.h"
22 
23 class ExponentialForm;
24 
33 {
34  public:
35  Exponential(int id);
36  ~Exponential();
37 
38  virtual void Draw(wxPoint2DDouble translation, double scale) const;
39  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
40  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
41  virtual bool ShowForm(wxWindow* parent, Element* element);
42  virtual void Rotate(bool clockwise = true);
43 
44  virtual void UpdatePoints();
45 
46  virtual void GetValues(double& aValue, double& bValue);
47  virtual void SetValues(double aValue, double bValue);
48 
57  virtual bool Solve(double input, double timeStep);
58 
59  virtual Element* GetCopy();
60 
61  protected:
62  double m_aValue = 0.001;
63  double m_bValue = 5.0;
64 };
65 
66 #endif // EXPONENTIAL_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Exponential.h:39
-
virtual bool Solve(double input, double timeStep)
Calculates the exponential.
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Exponential.cpp:84
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Exponential.cpp:73
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Exponential.cpp:34
-
virtual Element * GetCopy()
Get a the element copy.
-
Generates an output following an exponential function.
Definition: Exponential.h:32
-
Form to edit the exponential control data.
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Exponential.h:40
-
Base class of a control element. Provide general methods to other control classes.
- -
-
- - - - diff --git a/docs/doxygen/html/_exponential_form_8cpp_source.html b/docs/doxygen/html/_exponential_form_8cpp_source.html deleted file mode 100644 index 2fb0046..0000000 --- a/docs/doxygen/html/_exponential_form_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/ExponentialForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ExponentialForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "ExponentialForm.h"
19 #include "Exponential.h"
20 
21 ExponentialForm::ExponentialForm(wxWindow* parent, Exponential* exponential) : ExponentialFormBase(parent)
22 {
23  SetSize(GetBestSize());
24 
25  wxString expSymbol = wxString::FromUTF8("\xF0\x9D\x91\x92");
26  wxString superscriptCapitalB = wxString::FromUTF8("\xE1\xB4\xAE");
27  wxString superscriptSmallX = wxString::FromUTF8("\xCB\xA3");
28  m_staticTextExp->SetLabel("y = A" + expSymbol + superscriptCapitalB + superscriptSmallX);
29 
30  wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
31  font.SetPointSize(14);
32  m_staticTextExp->SetFont(font);
33 
34  m_parent = parent;
35  m_exponential = exponential;
36 
37  double a, b;
38  m_exponential->GetValues(a, b);
39  m_textCtrlAValue->SetValue(m_exponential->StringFromDouble(a));
40  m_textCtrlBValue->SetValue(m_exponential->StringFromDouble(b));
41 
42  SetInitialSize();
43  Layout();
44 }
45 
46 ExponentialForm::~ExponentialForm() {}
47 void ExponentialForm::OnOKButtonClick(wxCommandEvent& event)
48 {
49  if(ValidateData()) EndModal(wxID_OK);
50 }
51 
52 bool ExponentialForm::ValidateData()
53 {
54  double a, b;
55  if(!m_exponential->DoubleFromString(this, m_textCtrlAValue->GetValue(), a,
56  _("Value entered incorrectly in the field \"A value\".")))
57  return false;
58  if(!m_exponential->DoubleFromString(this, m_textCtrlBValue->GetValue(), b,
59  _("Value entered incorrectly in the field \"B value\".")))
60  return false;
61  m_exponential->SetValues(a, b);
62  return true;
63 }
-
Generates an output following an exponential function.
Definition: Exponential.h:32
- - -
-
- - - - diff --git a/docs/doxygen/html/_exponential_form_8h.html b/docs/doxygen/html/_exponential_form_8h.html index 027fe13..fd13f0e 100644 --- a/docs/doxygen/html/_exponential_form_8h.html +++ b/docs/doxygen/html/_exponential_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_exponential_form_8h.html','');});
ExponentialForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_exponential_form_8h_source.html b/docs/doxygen/html/_exponential_form_8h_source.html deleted file mode 100644 index 6bdf2ee..0000000 --- a/docs/doxygen/html/_exponential_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/ExponentialForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ExponentialForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ExponentialForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef EXPONENTIALFORM_H
19 #define EXPONENTIALFORM_H
20 #include "ElementForm.h"
21 
22 class Exponential;
23 
32 {
33  public:
34  ExponentialForm(wxWindow* parent, Exponential* exponential);
35  virtual ~ExponentialForm();
36  virtual bool ValidateData();
37 
38  protected:
39  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
40  virtual void OnOKButtonClick(wxCommandEvent& event);
41 
42  wxWindow* m_parent = NULL;
43  Exponential* m_exponential = NULL;
44 };
45 #endif // EXPONENTIALFORM_H
-
Generates an output following an exponential function.
Definition: Exponential.h:32
-
Form to edit the exponential control data.
-
-
- - - - diff --git a/docs/doxygen/html/_fault_8cpp_source.html b/docs/doxygen/html/_fault_8cpp_source.html deleted file mode 100644 index d78a93d..0000000 --- a/docs/doxygen/html/_fault_8cpp_source.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - -Project/Fault.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Fault.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Fault.h"
19 #ifdef USING_WX_3_0_X
20 #include "DegreesAndRadians.h"
21 #endif
22 
24 Fault::Fault(std::vector<Element*> elementList) { GetElementsFromList(elementList); }
26 bool Fault::RunFaultCalculation(double systemPowerBase)
27 {
28  m_systemPowerBase = systemPowerBase;
29  int numberOfBuses = static_cast<int>(m_busList.size());
30  if(numberOfBuses == 0) {
31  m_errorMsg = _("There is no buses in the system.");
32  return false;
33  }
34 
35  // Get adimittance matrices.
36  std::vector<std::vector<std::complex<double> > > yBusPos;
37  GetYBus(yBusPos, systemPowerBase, POSITIVE_SEQ, true);
38  std::vector<std::vector<std::complex<double> > > yBusNeg;
39  GetYBus(yBusNeg, systemPowerBase, NEGATIVE_SEQ, true);
40  std::vector<std::vector<std::complex<double> > > yBusZero;
41  GetYBus(yBusZero, systemPowerBase, ZERO_SEQ, true);
42 
43  // Calculate the impedance matrices.
44  if(!InvertMatrix(yBusPos, m_zBusPos)) {
45  m_errorMsg = _("Fail to invert the positive sequence admittance matrix.");
46  return false;
47  }
48  if(!InvertMatrix(yBusNeg, m_zBusNeg)) {
49  m_errorMsg = _("Fail to invert the negative sequence admittance matrix.");
50  return false;
51  }
52  if(!InvertMatrix(yBusZero, m_zBusZero)) {
53  m_errorMsg = _("Fail to invert the zero sequence admittance matrix.");
54  return false;
55  }
56 
57  // Pre-fault voltages (power flow solution).
58  std::vector<std::complex<double> > preFaultVoltages;
59  preFaultVoltages.resize(m_busList.size());
60 
61  // Get fault parameters.
62  int fNumber = -1;
64  FaultData fLocation = FAULT_LINE_A;
65  std::complex<double> fImpedance = std::complex<double>(0.0, 0.0);
66  for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) {
67  Bus* bus = *it;
68  BusElectricalData data = bus->GetElectricalData();
69  preFaultVoltages[data.number] = data.voltage;
70  if(data.hasFault) {
71  fNumber = data.number;
72  fType = data.faultType;
73  fLocation = data.faultLocation;
74  fImpedance = std::complex<double>(data.faultResistance, data.faultReactance);
75  }
76  }
77 
78  if(fNumber == -1) {
79  m_errorMsg = _("There is no fault in the system.");
80  return false;
81  }
82 
83  // Fault calculation.
84  std::complex<double> fCurrentPos = std::complex<double>(0.0, 0.0);
85  std::complex<double> fCurrentNeg = std::complex<double>(0.0, 0.0);
86  std::complex<double> fCurrentZero = std::complex<double>(0.0, 0.0);
87 
88  std::complex<double> preFaultVoltage = preFaultVoltages[fNumber];
89  std::complex<double> a = std::complex<double>(-0.5, 0.866025403784);
90  std::complex<double> a2 = std::complex<double>(-0.5, -0.866025403784);
91 
92  switch(fType) {
93  case FAULT_THREEPHASE: {
94  fCurrentPos = preFaultVoltage / (m_zBusPos[fNumber][fNumber] + fImpedance);
95  } break;
96  case FAULT_2LINE: {
97  fCurrentPos = preFaultVoltage / (m_zBusPos[fNumber][fNumber] + m_zBusNeg[fNumber][fNumber] + fImpedance);
98 
99  switch(fLocation) {
100  case FAULT_LINE_A: {
101  fCurrentNeg = -a2 * fCurrentPos;
102  } break;
103  case FAULT_LINE_B: {
104  fCurrentNeg = -fCurrentPos;
105  } break;
106  case FAULT_LINE_C: {
107  fCurrentNeg = -a * fCurrentPos;
108  } break;
109  default:
110  break;
111  }
112  } break;
113  case FAULT_2LINE_GROUND: {
114  std::complex<double> z1 = m_zBusPos[fNumber][fNumber];
115  std::complex<double> z2 = m_zBusNeg[fNumber][fNumber];
116  std::complex<double> z0 = m_zBusZero[fNumber][fNumber];
117  std::complex<double> zf_3 = std::complex<double>(3.0, 0.0) * fImpedance;
118 
119  fCurrentPos = (preFaultVoltage * (z2 + z0 + zf_3)) / (z1 * z2 + z2 * z0 + z2 * zf_3 + z1 * z0 + z1 * zf_3);
120 
121  switch(fLocation) {
122  case FAULT_LINE_A: {
123  fCurrentNeg = -a2 * ((preFaultVoltage - z1 * fCurrentPos) / z2);
124  fCurrentZero = -a * ((preFaultVoltage - z1 * fCurrentPos) / (z0 + zf_3));
125  } break;
126  case FAULT_LINE_B: {
127  fCurrentNeg = -((preFaultVoltage - z1 * fCurrentPos) / z2);
128  fCurrentZero = -((preFaultVoltage - z1 * fCurrentPos) / (z0 + zf_3));
129  } break;
130  case FAULT_LINE_C: {
131  fCurrentNeg = -a * ((preFaultVoltage - z1 * fCurrentPos) / z2);
132  fCurrentZero = -a2 * ((preFaultVoltage - z1 * fCurrentPos) / (z0 + zf_3));
133  } break;
134  default:
135  break;
136  }
137  } break;
138  case FAULT_LINE_GROUND: {
139  fCurrentPos =
140  preFaultVoltage / (m_zBusPos[fNumber][fNumber] + m_zBusNeg[fNumber][fNumber] +
141  m_zBusZero[fNumber][fNumber] + std::complex<double>(3.0, 0.0) * fImpedance);
142  switch(fLocation) {
143  case FAULT_LINE_A: {
144  fCurrentNeg = fCurrentPos;
145  fCurrentZero = fCurrentPos;
146  } break;
147  case FAULT_LINE_B: {
148  fCurrentNeg = a * fCurrentPos;
149  fCurrentZero = a2 * fCurrentPos;
150  } break;
151  case FAULT_LINE_C: {
152  fCurrentNeg = a2 * fCurrentPos;
153  fCurrentZero = a * fCurrentPos;
154  } break;
155  default:
156  break;
157  }
158  } break;
159  default:
160  break;
161  }
162 
163  // Convert sequence currents to ABC. [Iabc] = [A]*[I012]
164  m_fCurrentA = fCurrentZero + fCurrentPos + fCurrentNeg;
165  m_fCurrentB = fCurrentZero + a2 * fCurrentPos + a * fCurrentNeg;
166  m_fCurrentC = fCurrentZero + a * fCurrentPos + a2 * fCurrentNeg;
167 
168  // Pos-fault voltages calculation
169  m_posFaultVoltagePos.clear();
170  m_posFaultVoltageNeg.clear();
171  m_posFaultVoltageZero.clear();
172  m_posFaultVoltageA.clear();
173  m_posFaultVoltageB.clear();
174  m_posFaultVoltageC.clear();
175 
176  for(int i = 0; i < numberOfBuses; ++i) {
177  m_posFaultVoltagePos.push_back(preFaultVoltages[i] - m_zBusPos[i][fNumber] * fCurrentPos);
178  m_posFaultVoltageNeg.push_back(-m_zBusNeg[i][fNumber] * fCurrentNeg);
179  m_posFaultVoltageZero.push_back(-m_zBusZero[i][fNumber] * fCurrentZero);
180 
181  // V012 -> Vabc
182  m_posFaultVoltageA.push_back(m_posFaultVoltageZero[i] + m_posFaultVoltagePos[i] + m_posFaultVoltageNeg[i]);
183  m_posFaultVoltageB.push_back(m_posFaultVoltageZero[i] + a2 * m_posFaultVoltagePos[i] +
184  a * m_posFaultVoltageNeg[i]);
185  m_posFaultVoltageC.push_back(m_posFaultVoltageZero[i] + a * m_posFaultVoltagePos[i] +
186  a2 * m_posFaultVoltageNeg[i]);
187  }
188 
189  UpdateElementsFault(systemPowerBase);
190  return true;
191 }
192 
193 void Fault::UpdateElementsFault(double systemPowerBase)
194 {
195  std::complex<double> a = std::complex<double>(-0.5, 0.866025403784);
196  std::complex<double> a2 = std::complex<double>(-0.5, -0.866025403784);
197 
198  for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) {
199  Bus* bus = *it;
200  auto data = bus->GetElectricalData();
201  if(data.hasFault) {
202  data.faultCurrent[0] = m_fCurrentA;
203  data.faultCurrent[1] = m_fCurrentB;
204  data.faultCurrent[2] = m_fCurrentC;
205  } else {
206  data.faultCurrent[0] = data.faultCurrent[1] = data.faultCurrent[2] = std::complex<double>(0.0, 0.0);
207  }
208  data.faultVoltage[0] = m_posFaultVoltageA[data.number];
209  data.faultVoltage[1] = m_posFaultVoltageB[data.number];
210  data.faultVoltage[2] = m_posFaultVoltageC[data.number];
211  bus->SetElectricalData(data);
212  }
213 
214  for(auto it = m_lineList.begin(), itEnd = m_lineList.end(); it != itEnd; ++it) {
215  Line* line = *it;
216  if(line->IsOnline()) {
217  int n1 = static_cast<Bus*>(line->GetParentList()[0])->GetElectricalData().number;
218  int n2 = static_cast<Bus*>(line->GetParentList()[1])->GetElectricalData().number;
219  auto data = line->GetElectricalData();
220  auto puData = line->GetPUElectricalData(m_systemPowerBase);
221  std::complex<double> vPos[2] = {m_posFaultVoltagePos[n1], m_posFaultVoltagePos[n2]};
222  std::complex<double> vNeg[2] = {m_posFaultVoltageNeg[n1], m_posFaultVoltageNeg[n2]};
223  std::complex<double> vZero[2] = {m_posFaultVoltageZero[n1], m_posFaultVoltageZero[n2]};
224  std::complex<double> zPos(puData.resistance, puData.indReactance);
225  std::complex<double> bPos(0.0, puData.capSusceptance / 2.0);
226  std::complex<double> zZero(puData.zeroResistance, puData.zeroIndReactance);
227  std::complex<double> bZero(0.0, puData.zeroCapSusceptance / 2.0);
228 
229  std::complex<double> lineCurrentPos[2];
230  std::complex<double> lineCurrentNeg[2];
231  std::complex<double> lineCurrentZero[2];
232 
233  lineCurrentPos[0] = ((vPos[0] - vPos[1]) / zPos) + (vPos[0] * bPos);
234  lineCurrentNeg[0] = ((vNeg[0] - vNeg[1]) / zPos) + (vNeg[0] * bPos);
235  lineCurrentZero[0] = ((vZero[0] - vZero[1]) / zZero) + (vZero[0] * bZero);
236  lineCurrentPos[1] = ((vPos[1] - vPos[0]) / zPos) + (vPos[1] * bPos);
237  lineCurrentNeg[1] = ((vNeg[1] - vNeg[0]) / zPos) + (vNeg[1] * bPos);
238  lineCurrentZero[1] = ((vZero[1] - vZero[0]) / zZero) + (vZero[1] * bZero);
239 
240  data.faultCurrent[0][0] = lineCurrentZero[0] + lineCurrentPos[0] + lineCurrentNeg[0];
241  data.faultCurrent[0][1] = lineCurrentZero[0] + a2 * lineCurrentPos[0] + a * lineCurrentNeg[0];
242  data.faultCurrent[0][2] = lineCurrentZero[0] + a * lineCurrentPos[0] + a2 * lineCurrentNeg[0];
243  data.faultCurrent[1][0] = lineCurrentZero[1] + lineCurrentPos[1] + lineCurrentNeg[1];
244  data.faultCurrent[1][1] = lineCurrentZero[1] + a2 * lineCurrentPos[1] + a * lineCurrentNeg[1];
245  data.faultCurrent[1][2] = lineCurrentZero[1] + a * lineCurrentPos[1] + a2 * lineCurrentNeg[1];
246 
247  line->SetElectricalData(data);
248  }
249  }
250 
251  for(auto it = m_transformerList.begin(), itEnd = m_transformerList.end(); it != itEnd; ++it) {
252  Transformer* transformer = *it;
253  if(transformer->IsOnline()) {
254  int n1 = static_cast<Bus*>(transformer->GetParentList()[0])->GetElectricalData().number;
255  int n2 = static_cast<Bus*>(transformer->GetParentList()[1])->GetElectricalData().number;
256  auto data = transformer->GetElectricalData();
257  auto puData = transformer->GetPUElectricalData(m_systemPowerBase);
258 
259  std::complex<double> vPos[2] = {m_posFaultVoltagePos[n1], m_posFaultVoltagePos[n2]};
260  std::complex<double> vNeg[2] = {m_posFaultVoltageNeg[n1], m_posFaultVoltageNeg[n2]};
261  std::complex<double> vZero[2] = {m_posFaultVoltageZero[n1], m_posFaultVoltageZero[n2]};
262  std::complex<double> zPos(puData.resistance, puData.indReactance);
263  std::complex<double> zZero(puData.zeroResistance, puData.zeroIndReactance);
264 
265  std::complex<double> transformerCurrentPos[2];
266  std::complex<double> transformerCurrentNeg[2];
267  std::complex<double> transformerCurrentZero[2];
268 
269  if(data.turnsRatio == 1.0 && data.phaseShift == 0.0) {
270  transformerCurrentPos[0] = (vPos[0] - vPos[1]) / zPos;
271  transformerCurrentNeg[0] = (vNeg[0] - vNeg[1]) / zPos;
272  transformerCurrentZero[0] = (vZero[0] - vZero[1]) / zZero;
273  transformerCurrentPos[1] = (vPos[1] - vPos[0]) / zPos;
274  transformerCurrentNeg[1] = (vNeg[1] - vNeg[0]) / zPos;
275  transformerCurrentZero[1] = (vZero[1] - vZero[0]) / zZero;
276  } else {
277  double radPhaseShift = wxDegToRad(data.phaseShift);
278  std::complex<double> t = std::complex<double>(data.turnsRatio * std::cos(radPhaseShift),
279  -data.turnsRatio * std::sin(radPhaseShift));
280 
281  transformerCurrentPos[0] =
282  vPos[0] * (1.0 / (std::pow(std::abs(t), 2.0) * zPos)) - vPos[1] * (1.0 / (std::conj(t) * zPos));
283  transformerCurrentNeg[0] =
284  vNeg[0] * (1.0 / (std::pow(std::abs(t), 2.0) * zPos)) - vNeg[1] * (1.0 / (t * zPos));
285 
286  transformerCurrentPos[1] = -vPos[0] * (1.0 / (t * zPos)) + vPos[1] / zPos;
287  transformerCurrentNeg[1] = -vNeg[0] * (1.0 / (std::conj(t) * zPos)) + vNeg[1] / zPos;
288  }
289 
290  switch(data.connection) {
291  case GWYE_GWYE: {
292  transformerCurrentZero[0] = (vZero[0] - vZero[1]) / zZero;
293  transformerCurrentZero[1] = (vZero[1] - vZero[0]) / zZero;
294  break;
295  }
296  case GWYE_DELTA: {
297  transformerCurrentZero[0] = vZero[0] / zZero;
298  transformerCurrentZero[1] = std::complex<double>(0.0, 0.0);
299  break;
300  }
301  case DELTA_GWYE: {
302  transformerCurrentZero[0] = std::complex<double>(0.0, 0.0);
303  transformerCurrentZero[1] = vZero[1] / zZero;
304  break;
305  }
306  default: {
307  transformerCurrentZero[0] = std::complex<double>(0.0, 0.0);
308  transformerCurrentZero[1] = std::complex<double>(0.0, 0.0);
309  break;
310  }
311  }
312 
313  data.faultCurrent[0][0] = transformerCurrentZero[0] + transformerCurrentPos[0] + transformerCurrentNeg[0];
314  data.faultCurrent[0][1] =
315  transformerCurrentZero[0] + a2 * transformerCurrentPos[0] + a * transformerCurrentNeg[0];
316  data.faultCurrent[0][2] =
317  transformerCurrentZero[0] + a * transformerCurrentPos[0] + a2 * transformerCurrentNeg[0];
318  data.faultCurrent[1][0] = transformerCurrentZero[1] + transformerCurrentPos[1] + transformerCurrentNeg[1];
319  data.faultCurrent[1][1] =
320  transformerCurrentZero[1] + a2 * transformerCurrentPos[1] + a * transformerCurrentNeg[1];
321  data.faultCurrent[1][2] =
322  transformerCurrentZero[1] + a * transformerCurrentPos[1] + a2 * transformerCurrentNeg[1];
323 
324  transformer->SetElectricaData(data);
325  }
326  }
327 
328  for(auto it = m_syncGeneratorList.begin(), itEnd = m_syncGeneratorList.end(); it != itEnd; ++it) {
329  SyncGenerator* syncGenerator = *it;
330  if(syncGenerator->IsOnline()) {
331  Bus* bus = static_cast<Bus*>(syncGenerator->GetParentList()[0]);
332  int n = bus->GetElectricalData().number;
333  std::complex<double> v = bus->GetElectricalData().voltage; // Pre-fault voltage.
334  auto data = syncGenerator->GetElectricalData();
335  auto puData = syncGenerator->GetPUElectricalData(m_systemPowerBase);
336 
337  std::complex<double> vPos = m_posFaultVoltagePos[n];
338  std::complex<double> vNeg = m_posFaultVoltageNeg[n];
339  std::complex<double> vZero = m_posFaultVoltageZero[n];
340 
341  std::complex<double> zPos(puData.positiveResistance, puData.positiveReactance);
342  std::complex<double> zNeg(puData.negativeResistance, puData.negativeReactance);
343  std::complex<double> zZero(puData.zeroResistance + 3.0 * puData.groundResistance,
344  puData.zeroReactance + 3.0 * puData.groundReactance);
345 
346  // Internal voltage
347  std::complex<double> i = std::complex<double>(puData.activePower, -puData.reactivePower) / std::conj(v);
348  std::complex<double> e = v + zPos * i;
349 
350  std::complex<double> syncGeneratorCurrentPos = (e - vPos) / zPos;
351  std::complex<double> syncGeneratorCurrentNeg = (-vNeg) / zNeg;
352  std::complex<double> syncGeneratorCurrentZero(0.0, 0.0);
353  if(data.groundNeutral) syncGeneratorCurrentZero = (-vZero) / zZero;
354 
355  data.faultCurrent[0] = syncGeneratorCurrentZero + syncGeneratorCurrentPos + syncGeneratorCurrentNeg;
356  data.faultCurrent[1] =
357  syncGeneratorCurrentZero + a2 * syncGeneratorCurrentPos + a * syncGeneratorCurrentNeg;
358  data.faultCurrent[2] =
359  syncGeneratorCurrentZero + a * syncGeneratorCurrentPos + a2 * syncGeneratorCurrentNeg;
360 
361  syncGenerator->SetElectricalData(data);
362  }
363  }
364 
365  for(auto it = m_syncMotorList.begin(), itEnd = m_syncMotorList.end(); it != itEnd; ++it) {
366  SyncMotor* syncMotor = *it;
367  if(syncMotor->IsOnline()) {
368  Bus* bus = static_cast<Bus*>(syncMotor->GetParentList()[0]);
369  int n = bus->GetElectricalData().number;
370  std::complex<double> v = bus->GetElectricalData().voltage; // Pre-fault voltage.
371  auto data = syncMotor->GetElectricalData();
372  auto puData = syncMotor->GetPUElectricalData(m_systemPowerBase);
373 
374  std::complex<double> vPos = m_posFaultVoltagePos[n];
375  std::complex<double> vNeg = m_posFaultVoltageNeg[n];
376  std::complex<double> vZero = m_posFaultVoltageZero[n];
377 
378  std::complex<double> zPos(puData.positiveResistance, puData.positiveReactance);
379  std::complex<double> zNeg(puData.negativeResistance, puData.negativeReactance);
380  std::complex<double> zZero(puData.zeroResistance + 3.0 * puData.groundResistance,
381  puData.zeroReactance + 3.0 * puData.groundReactance);
382 
383  std::complex<double> syncGeneratorCurrentPos = (v - vPos) / zPos;
384  std::complex<double> syncGeneratorCurrentNeg = (-vNeg) / zNeg;
385  std::complex<double> syncGeneratorCurrentZero(0.0, 0.0);
386  if(data.groundNeutral) syncGeneratorCurrentZero = (-vZero) / zZero;
387 
388  data.faultCurrent[0] = syncGeneratorCurrentZero + syncGeneratorCurrentPos + syncGeneratorCurrentNeg;
389  data.faultCurrent[1] =
390  syncGeneratorCurrentZero + a2 * syncGeneratorCurrentPos + a * syncGeneratorCurrentNeg;
391  data.faultCurrent[2] =
392  syncGeneratorCurrentZero + a * syncGeneratorCurrentPos + a2 * syncGeneratorCurrentNeg;
393 
394  syncMotor->SetElectricalData(data);
395  }
396  }
397 }
398 
399 bool Fault::RunSCPowerCalcutation(double systemPowerBase)
400 {
401  // Get adimittance matrix.
402  std::vector<std::vector<std::complex<double> > > yBusPos;
403  GetYBus(yBusPos, systemPowerBase, POSITIVE_SEQ, true);
404 
405  // Calculate the impedance matrix.
406  if(!InvertMatrix(yBusPos, m_zBusPos)) {
407  m_errorMsg = _("Fail to invert the positive sequence admittance matrix.");
408  return false;
409  }
410 
411  // Set the SC power.
412  for(auto it = m_busList.begin(), itEnd = m_busList.end(); it != itEnd; ++it) {
413  Bus* bus = *it;
414  auto data = bus->GetElectricalData();
415  int n = data.number;
416  data.scPower = 1.0 / std::abs(m_zBusPos[n][n]);
417  bus->SetElectricalData(data);
418  }
419 
420  return true;
421 }
- -
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
-
FaultData
Information about fault (type and location).
Definition: PowerElement.h:55
-
Synchronous generator power element.
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
-
virtual bool RunFaultCalculation(double systemPowerBase)
Calculate the fault of the system. Return true if was possible the calculation.
Definition: Fault.cpp:26
- -
Fault()
Default contructor. Use GetElementsFromList(std::vector<Element*> elementList).
Definition: Fault.cpp:23
- - - -
virtual bool InvertMatrix(std::vector< std::vector< std::complex< double > > > matrix, std::vector< std::vector< std::complex< double > > > &inverse)
Invert a matrix.
-
Power line element.
Definition: Line.h:59
-
virtual bool GetYBus(std::vector< std::vector< std::complex< double > > > &yBus, double systemPowerBase, YBusSequence sequence=POSITIVE_SEQ, bool includeSyncMachines=false, bool allLoadsAsImpedances=false)
Get the admittance matrix from the list of elements (use GetElementsFromList first).
-
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
- -
virtual bool RunSCPowerCalcutation(double systemPowerBase)
Calculate the short-circuit power of the system. Return true if was possible the calculation.
Definition: Fault.cpp:399
-
~Fault()
Destructor.
Definition: Fault.cpp:25
- -
virtual void GetElementsFromList(std::vector< Element *> elementList)
Separate the power elements from a generic list.
-
Base class of electric calculations, with general methods.
-
virtual void UpdateElementsFault(double systemPowerBase)
Update the data of the elements.
Definition: Fault.cpp:193
-
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_fault_8h.html b/docs/doxygen/html/_fault_8h.html index c85b102..45a7dd1 100644 --- a/docs/doxygen/html/_fault_8h.html +++ b/docs/doxygen/html/_fault_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_fault_8h.html','');});
Fault.h File Reference
- -

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_fault_8h_source.html b/docs/doxygen/html/_fault_8h_source.html deleted file mode 100644 index 622d6a9..0000000 --- a/docs/doxygen/html/_fault_8h_source.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - -Project/Fault.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Fault
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Fault.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef FAULT_H
19 #define FAULT_H
20 
21 #include "ElectricCalculation.h"
30 class Fault : public ElectricCalculation
31 {
32  public:
37  Fault(std::vector<Element*> elementList);
38 
42  Fault();
43 
47  ~Fault();
48 
53  virtual bool RunFaultCalculation(double systemPowerBase);
54 
59  virtual bool RunSCPowerCalcutation(double systemPowerBase);
60 
65  virtual void UpdateElementsFault(double systemPowerBase);
66 
71  virtual wxString GetErrorMessage() { return m_errorMsg; }
72  protected:
73  wxString m_errorMsg = "";
74 
75  double m_systemPowerBase;
76 
77  std::vector<std::vector<std::complex<double> > > m_zBusPos;
78  std::vector<std::vector<std::complex<double> > > m_zBusNeg;
79  std::vector<std::vector<std::complex<double> > > m_zBusZero;
80 
81  std::vector<std::complex<double> > m_posFaultVoltagePos;
82  std::vector<std::complex<double> > m_posFaultVoltageNeg;
83  std::vector<std::complex<double> > m_posFaultVoltageZero;
84 
85  std::complex<double> m_fCurrentA;
86  std::complex<double> m_fCurrentB;
87  std::complex<double> m_fCurrentC;
88 
89  std::vector<std::complex<double> > m_posFaultVoltageA;
90  std::vector<std::complex<double> > m_posFaultVoltageB;
91  std::vector<std::complex<double> > m_posFaultVoltageC;
92 };
93 
94 #endif // FAULT_H
-
virtual wxString GetErrorMessage()
Get the error message generated in RunFaultCalculation(double systemPowerBase).
Definition: Fault.h:71
-
virtual bool RunFaultCalculation(double systemPowerBase)
Calculate the fault of the system. Return true if was possible the calculation.
Definition: Fault.cpp:26
-
Fault()
Default contructor. Use GetElementsFromList(std::vector<Element*> elementList).
Definition: Fault.cpp:23
-
Calculate the fault of the system and update the elements data.
Definition: Fault.h:30
-
virtual bool RunSCPowerCalcutation(double systemPowerBase)
Calculate the short-circuit power of the system. Return true if was possible the calculation.
Definition: Fault.cpp:399
-
~Fault()
Destructor.
Definition: Fault.cpp:25
-
Base class of electric calculations, with general methods.
-
virtual void UpdateElementsFault(double systemPowerBase)
Update the data of the elements.
Definition: Fault.cpp:193
-
-
- - - - diff --git a/docs/doxygen/html/_file_handing_8cpp_source.html b/docs/doxygen/html/_file_handing_8cpp_source.html deleted file mode 100644 index b70102d..0000000 --- a/docs/doxygen/html/_file_handing_8cpp_source.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - -Project/FileHanding.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
FileHanding.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "FileHanding.h"
19 
20 FileHanding::~FileHanding() {}
21 FileHanding::FileHanding(Workspace* workspace) { m_workspace = workspace; }
22 FileHanding::FileHanding(ControlEditor* controlEditor) { m_controlEditor = controlEditor; }
23 FileHanding::FileHanding() {}
24 void FileHanding::SaveProject(wxFileName path)
25 {
26  // Erase the file (if exists or not) and write the initial data
27  std::ofstream writeProjectsFile(path.GetFullPath());
28  writeProjectsFile.close();
29 
30  rapidxml::xml_document<> doc;
31  rapidxml::file<> xmlFile(path.GetFullPath().mb_str());
32  doc.parse<0>(xmlFile.data());
33 
34  rapidxml::xml_node<>* decl = doc.allocate_node(rapidxml::node_declaration);
35  rapidxml::xml_attribute<>* ver = doc.allocate_attribute("version", "1.0");
36  rapidxml::xml_attribute<>* encoding = doc.allocate_attribute("encoding", "utf-8");
37  decl->append_attribute(ver);
38  decl->append_attribute(encoding);
39  doc.append_node(decl);
40 
41  rapidxml::xml_node<>* rootNode = doc.allocate_node(rapidxml::node_element, "Project");
42  doc.append_node(rootNode);
43 
44  rapidxml::xml_node<>* projectNameNode = AppendNode(doc, rootNode, "Name");
45  SetNodeValue(doc, projectNameNode, path.GetName());
46 
47  //{ Simulation properties
48  PropertiesData* properties = m_workspace->GetProperties();
49  auto propertiesNode = AppendNode(doc, rootNode, "Properties");
50 
51  SimulationData simulationData = properties->GetSimulationPropertiesData();
52  auto simulationPropNode = AppendNode(doc, propertiesNode, "SimulationProperties");
53 
54  auto generalPropNode = AppendNode(doc, simulationPropNode, "General");
55  auto basePower = AppendNode(doc, generalPropNode, "BasePower");
56  SetNodeValue(doc, basePower, simulationData.basePower);
57  SetNodeAttribute(doc, basePower, "UnitID", simulationData.basePowerUnit);
58  auto contCalc = AppendNode(doc, generalPropNode, "ContinuousCalculation");
59  auto contCalcFault = AppendNode(doc, contCalc, "Fault");
60  SetNodeValue(doc, contCalcFault, simulationData.faultAfterPowerFlow);
61  auto contCalcSCPower = AppendNode(doc, contCalc, "SCPower");
62  SetNodeValue(doc, contCalcSCPower, simulationData.scPowerAfterPowerFlow);
63 
64  auto powerFlowPropNode = AppendNode(doc, simulationPropNode, "PowerFlow");
65  auto solutionMethod = AppendNode(doc, powerFlowPropNode, "SolutionMethod");
66  SetNodeValue(doc, solutionMethod, simulationData.powerFlowMethod);
67  auto accFactor = AppendNode(doc, powerFlowPropNode, "AccFactor");
68  SetNodeValue(doc, accFactor, simulationData.accFator);
69  auto pfTolerance = AppendNode(doc, powerFlowPropNode, "Tolerance");
70  SetNodeValue(doc, pfTolerance, simulationData.powerFlowTolerance);
71  auto pfMaxIter = AppendNode(doc, powerFlowPropNode, "MaxIterations");
72  SetNodeValue(doc, pfMaxIter, simulationData.powerFlowMaxIterations);
73 
74  auto stabilityPropNode = AppendNode(doc, simulationPropNode, "Stability");
75  auto timeStep = AppendNode(doc, stabilityPropNode, "TimeStep");
76  SetNodeValue(doc, timeStep, simulationData.timeStep);
77  auto simTime = AppendNode(doc, stabilityPropNode, "SimulationTime");
78  SetNodeValue(doc, simTime, simulationData.stabilitySimulationTime);
79  auto freq = AppendNode(doc, stabilityPropNode, "Frequency");
80  SetNodeValue(doc, freq, simulationData.stabilityFrequency);
81  auto stabTolerance = AppendNode(doc, stabilityPropNode, "Tolerance");
82  SetNodeValue(doc, stabTolerance, simulationData.stabilityTolerance);
83  auto stabTMaxIter = AppendNode(doc, stabilityPropNode, "MaxIterations");
84  SetNodeValue(doc, stabTMaxIter, simulationData.stabilityMaxIterations);
85  auto controlRatio = AppendNode(doc, stabilityPropNode, "ControlStepRatio");
86  SetNodeValue(doc, controlRatio, simulationData.controlTimeStepRatio);
87  auto plotStep = AppendNode(doc, stabilityPropNode, "PlotStep");
88  SetNodeValue(doc, plotStep, simulationData.plotTime);
89  auto useCOI = AppendNode(doc, stabilityPropNode, "UseCOI");
90  SetNodeValue(doc, useCOI, simulationData.useCOI);
91 
92  auto zipPropNode = AppendNode(doc, simulationPropNode, "ZIPLoad");
93  auto useCompLoads = AppendNode(doc, zipPropNode, "UseCompositeLoad");
94  SetNodeValue(doc, useCompLoads, simulationData.useCompLoads);
95  auto activePowerComp = AppendNode(doc, zipPropNode, "ActivePowerComposition");
96  auto pz = AppendNode(doc, activePowerComp, "ConstantImpedance");
97  SetNodeValue(doc, pz, simulationData.constImpedanceActive);
98  auto pi = AppendNode(doc, activePowerComp, "ConstantCurrent");
99  SetNodeValue(doc, pi, simulationData.constCurrentActive);
100  auto pp = AppendNode(doc, activePowerComp, "ConstantPower");
101  SetNodeValue(doc, pp, simulationData.constPowerActive);
102  auto reactivePowerComp = AppendNode(doc, zipPropNode, "ReactivePowerComposition");
103  auto qz = AppendNode(doc, reactivePowerComp, "ConstantImpedance");
104  SetNodeValue(doc, qz, simulationData.constImpedanceReactive);
105  auto qi = AppendNode(doc, reactivePowerComp, "ConstantCurrent");
106  SetNodeValue(doc, qi, simulationData.constCurrentReactive);
107  auto qp = AppendNode(doc, reactivePowerComp, "ConstantPower");
108  SetNodeValue(doc, qp, simulationData.constPowerReactive);
109  auto undervoltageLim = AppendNode(doc, zipPropNode, "UndervoltageLimit");
110  auto uvi = AppendNode(doc, undervoltageLim, "ConstantCurrent");
111  SetNodeValue(doc, uvi, simulationData.underVoltageConstCurrent);
112  auto uvp = AppendNode(doc, undervoltageLim, "ConstantPower");
113  SetNodeValue(doc, uvp, simulationData.underVoltageConstPower);
114 
115  //}
116 
117  auto elementsNode = AppendNode(doc, rootNode, "Elements");
118 
119  // Save all the data
120  ElectricCalculation allElements;
121  allElements.GetElementsFromList(m_workspace->GetElementList());
122 
123  //{ Buses
124  auto busesNode = AppendNode(doc, elementsNode, "BusList");
125  auto busList = allElements.GetBusList();
126  for(int i = 0; i < (int)busList.size(); i++) {
127  Bus* bus = busList[i];
128  auto busNode = AppendNode(doc, busesNode, "Bus");
129  SetNodeAttribute(doc, busNode, "ID", i);
130  auto cadProp = AppendNode(doc, busNode, "CADProperties");
131  auto position = AppendNode(doc, cadProp, "Position");
132  auto posX = AppendNode(doc, position, "X");
133  SetNodeValue(doc, posX, bus->GetPosition().m_x);
134  auto posY = AppendNode(doc, position, "Y");
135  SetNodeValue(doc, posY, bus->GetPosition().m_y);
136  auto size = AppendNode(doc, cadProp, "Size");
137  auto width = AppendNode(doc, size, "Width");
138  SetNodeValue(doc, width, bus->GetWidth());
139  auto height = AppendNode(doc, size, "Height");
140  SetNodeValue(doc, height, bus->GetHeight());
141  auto angle = AppendNode(doc, cadProp, "Angle");
142  SetNodeValue(doc, angle, bus->GetAngle());
143 
144  BusElectricalData data = bus->GetElectricalData();
145  auto electricalProp = AppendNode(doc, busNode, "ElectricalProperties");
146  auto name = AppendNode(doc, electricalProp, "Name");
147  SetNodeValue(doc, name, data.name);
148  auto nominalVoltage = AppendNode(doc, electricalProp, "NominalVoltage");
149  SetNodeValue(doc, nominalVoltage, data.nominalVoltage);
150  SetNodeAttribute(doc, nominalVoltage, "UnitID", data.nominalVoltageUnit);
151  auto isVoltageControlled = AppendNode(doc, electricalProp, "IsVoltageControlled");
152  SetNodeValue(doc, isVoltageControlled, data.isVoltageControlled);
153  auto controlledVoltage = AppendNode(doc, electricalProp, "ControlledVoltage");
154  SetNodeValue(doc, controlledVoltage, data.controlledVoltage);
155  SetNodeAttribute(doc, controlledVoltage, "Choice", data.controlledVoltageUnitChoice);
156  auto slackBus = AppendNode(doc, electricalProp, "SlackBus");
157  SetNodeValue(doc, slackBus, data.slackBus);
158 
159  auto fault = AppendNode(doc, electricalProp, "Fault");
160  auto hasFault = AppendNode(doc, fault, "HasFault");
161  SetNodeValue(doc, hasFault, data.hasFault);
162  auto faultType = AppendNode(doc, fault, "Type");
163  SetNodeValue(doc, faultType, data.faultType);
164  auto faultLocation = AppendNode(doc, fault, "Location");
165  SetNodeValue(doc, faultLocation, data.faultLocation);
166  auto faultResistance = AppendNode(doc, fault, "Resistance");
167  SetNodeValue(doc, faultResistance, data.faultResistance);
168  auto faultReactance = AppendNode(doc, fault, "Reactance");
169  SetNodeValue(doc, faultReactance, data.faultReactance);
170 
171  auto stability = AppendNode(doc, electricalProp, "Stability");
172  auto plotBus = AppendNode(doc, stability, "Plot");
173  SetNodeValue(doc, plotBus, data.plotBus);
174  auto stabHasFault = AppendNode(doc, stability, "HasFault");
175  SetNodeValue(doc, stabHasFault, data.stabHasFault);
176  auto stabFaultTime = AppendNode(doc, stability, "FaultTime");
177  SetNodeValue(doc, stabFaultTime, data.stabFaultTime);
178  auto stabFaultLength = AppendNode(doc, stability, "FaultLength");
179  SetNodeValue(doc, stabFaultLength, data.stabFaultLength);
180  auto stabFaultResistance = AppendNode(doc, stability, "FaultResistance");
181  SetNodeValue(doc, stabFaultResistance, data.stabFaultResistance);
182  auto stabFaultReactance = AppendNode(doc, stability, "FaultReactance");
183  SetNodeValue(doc, stabFaultReactance, data.stabFaultReactance);
184 
185  data.number = i;
186  bus->SetElectricalData(data);
187  } //}
188 
189  //{ Capacitor
190  auto capacitorsNode = AppendNode(doc, elementsNode, "CapacitorList");
191  auto capacitorList = allElements.GetCapacitorList();
192  for(int i = 0; i < (int)capacitorList.size(); i++) {
193  Capacitor* capacitor = capacitorList[i];
194  auto capacitorNode = AppendNode(doc, capacitorsNode, "Capacitor");
195  SetNodeAttribute(doc, capacitorNode, "ID", i);
196  auto cadProp = AppendNode(doc, capacitorNode, "CADProperties");
197  auto position = AppendNode(doc, cadProp, "Position");
198  auto posX = AppendNode(doc, position, "X");
199  SetNodeValue(doc, posX, capacitor->GetPosition().m_x);
200  auto posY = AppendNode(doc, position, "Y");
201  SetNodeValue(doc, posY, capacitor->GetPosition().m_y);
202  auto size = AppendNode(doc, cadProp, "Size");
203  auto width = AppendNode(doc, size, "Width");
204  SetNodeValue(doc, width, capacitor->GetWidth());
205  auto height = AppendNode(doc, size, "Height");
206  SetNodeValue(doc, height, capacitor->GetHeight());
207  auto angle = AppendNode(doc, cadProp, "Angle");
208  SetNodeValue(doc, angle, capacitor->GetAngle());
209  auto nodePos = AppendNode(doc, cadProp, "NodePosition");
210  auto nodePosX = AppendNode(doc, nodePos, "X");
211  SetNodeValue(doc, nodePosX, capacitor->GetPointList()[0].m_x);
212  auto nodePosY = AppendNode(doc, nodePos, "Y");
213  SetNodeValue(doc, nodePosY, capacitor->GetPointList()[0].m_y);
214  auto parentID = AppendNode(doc, cadProp, "ParentID");
215  Bus* parent = static_cast<Bus*>(capacitor->GetParentList()[0]);
216  if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number);
217 
218  CapacitorElectricalData data = capacitor->GetElectricalData();
219  auto electricalProp = AppendNode(doc, capacitorNode, "ElectricalProperties");
220  auto isOnline = AppendNode(doc, electricalProp, "IsOnline");
221  SetNodeValue(doc, isOnline, capacitor->IsOnline());
222  auto name = AppendNode(doc, electricalProp, "Name");
223  SetNodeValue(doc, name, data.name);
224  auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower");
225  SetNodeValue(doc, reactivePower, data.reactivePower);
226  SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit);
227 
228  auto switchingList = AppendNode(doc, electricalProp, "SwitchingList");
229  SwitchingData swData = capacitor->GetSwitchingData();
230  for(int j = 0; j < (int)swData.swType.size(); j++) {
231  auto switching = AppendNode(doc, switchingList, "Switching");
232  SetNodeAttribute(doc, switching, "ID", j);
233  auto swType = AppendNode(doc, switching, "Type");
234  SetNodeValue(doc, swType, swData.swType[j]);
235  auto swTime = AppendNode(doc, switching, "Time");
236  SetNodeValue(doc, swTime, swData.swTime[j]);
237  }
238  } //}
239 
240  //{ IndMotor
241  auto indMotorsNode = AppendNode(doc, elementsNode, "IndMotorList");
242  auto indMotorList = allElements.GetIndMotorList();
243  for(int i = 0; i < (int)indMotorList.size(); i++) {
244  IndMotor* indMotor = indMotorList[i];
245  auto indMotorNode = AppendNode(doc, indMotorsNode, "IndMotor");
246  SetNodeAttribute(doc, indMotorNode, "ID", i);
247  auto cadProp = AppendNode(doc, indMotorNode, "CADProperties");
248  auto position = AppendNode(doc, cadProp, "Position");
249  auto posX = AppendNode(doc, position, "X");
250  SetNodeValue(doc, posX, indMotor->GetPosition().m_x);
251  auto posY = AppendNode(doc, position, "Y");
252  SetNodeValue(doc, posY, indMotor->GetPosition().m_y);
253  auto size = AppendNode(doc, cadProp, "Size");
254  auto width = AppendNode(doc, size, "Width");
255  SetNodeValue(doc, width, indMotor->GetWidth());
256  auto height = AppendNode(doc, size, "Height");
257  SetNodeValue(doc, height, indMotor->GetHeight());
258  auto angle = AppendNode(doc, cadProp, "Angle");
259  SetNodeValue(doc, angle, indMotor->GetAngle());
260  auto nodePos = AppendNode(doc, cadProp, "NodePosition");
261  auto nodePosX = AppendNode(doc, nodePos, "X");
262  SetNodeValue(doc, nodePosX, indMotor->GetPointList()[0].m_x);
263  auto nodePosY = AppendNode(doc, nodePos, "Y");
264  SetNodeValue(doc, nodePosY, indMotor->GetPointList()[0].m_y);
265  auto parentID = AppendNode(doc, cadProp, "ParentID");
266  Bus* parent = static_cast<Bus*>(indMotor->GetParentList()[0]);
267  if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number);
268 
269  IndMotorElectricalData data = indMotor->GetElectricalData();
270  auto electricalProp = AppendNode(doc, indMotorNode, "ElectricalProperties");
271  auto isOnline = AppendNode(doc, electricalProp, "IsOnline");
272  SetNodeValue(doc, isOnline, indMotor->IsOnline());
273  auto name = AppendNode(doc, electricalProp, "Name");
274  SetNodeValue(doc, name, data.name);
275  auto activePower = AppendNode(doc, electricalProp, "ActivePower");
276  SetNodeValue(doc, activePower, data.activePower);
277  SetNodeAttribute(doc, activePower, "UnitID", data.activePowerUnit);
278  auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower");
279  SetNodeValue(doc, reactivePower, data.reactivePower);
280  SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit);
281  } //}
282 
283  //{ Inductor
284  auto inductorsNode = AppendNode(doc, elementsNode, "InductorList");
285  auto inductorList = allElements.GetInductorList();
286  for(int i = 0; i < (int)inductorList.size(); i++) {
287  Inductor* inductor = inductorList[i];
288  auto inductorNode = AppendNode(doc, inductorsNode, "Inductor");
289  SetNodeAttribute(doc, inductorNode, "ID", i);
290  auto cadProp = AppendNode(doc, inductorNode, "CADProperties");
291  auto position = AppendNode(doc, cadProp, "Position");
292  auto posX = AppendNode(doc, position, "X");
293  SetNodeValue(doc, posX, inductor->GetPosition().m_x);
294  auto posY = AppendNode(doc, position, "Y");
295  SetNodeValue(doc, posY, inductor->GetPosition().m_y);
296  auto size = AppendNode(doc, cadProp, "Size");
297  auto width = AppendNode(doc, size, "Width");
298  SetNodeValue(doc, width, inductor->GetWidth());
299  auto height = AppendNode(doc, size, "Height");
300  SetNodeValue(doc, height, inductor->GetHeight());
301  auto angle = AppendNode(doc, cadProp, "Angle");
302  SetNodeValue(doc, angle, inductor->GetAngle());
303  auto nodePos = AppendNode(doc, cadProp, "NodePosition");
304  auto nodePosX = AppendNode(doc, nodePos, "X");
305  SetNodeValue(doc, nodePosX, inductor->GetPointList()[0].m_x);
306  auto nodePosY = AppendNode(doc, nodePos, "Y");
307  SetNodeValue(doc, nodePosY, inductor->GetPointList()[0].m_y);
308  auto parentID = AppendNode(doc, cadProp, "ParentID");
309  Bus* parent = static_cast<Bus*>(inductor->GetParentList()[0]);
310  if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number);
311 
312  InductorElectricalData data = inductor->GetElectricalData();
313  auto electricalProp = AppendNode(doc, inductorNode, "ElectricalProperties");
314  auto isOnline = AppendNode(doc, electricalProp, "IsOnline");
315  SetNodeValue(doc, isOnline, inductor->IsOnline());
316  auto name = AppendNode(doc, electricalProp, "Name");
317  SetNodeValue(doc, name, data.name);
318  auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower");
319  SetNodeValue(doc, reactivePower, data.reactivePower);
320  SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit);
321 
322  auto switchingList = AppendNode(doc, electricalProp, "SwitchingList");
323  SwitchingData swData = inductor->GetSwitchingData();
324  for(int j = 0; j < (int)swData.swType.size(); j++) {
325  auto switching = AppendNode(doc, switchingList, "Switching");
326  SetNodeAttribute(doc, switching, "ID", j);
327  auto swType = AppendNode(doc, switching, "Type");
328  SetNodeValue(doc, swType, swData.swType[j]);
329  auto swTime = AppendNode(doc, switching, "Time");
330  SetNodeValue(doc, swTime, swData.swTime[j]);
331  }
332  } //}
333 
334  //{ Line
335  auto linesNode = AppendNode(doc, elementsNode, "LineList");
336  auto lineList = allElements.GetLineList();
337  for(int i = 0; i < (int)lineList.size(); i++) {
338  Line* line = lineList[i];
339  auto lineNode = AppendNode(doc, linesNode, "Line");
340  SetNodeAttribute(doc, lineNode, "ID", i);
341  auto cadProp = AppendNode(doc, lineNode, "CADProperties");
342  auto nodeList = AppendNode(doc, cadProp, "NodeList");
343  auto ptList = line->GetPointList();
344  int nodeID = 0;
345  for(int j = 0; j < (int)ptList.size(); j++) {
346  if((j != 1) && (j != (int)ptList.size() - 2)) {
347  auto nodePos = AppendNode(doc, nodeList, "Node");
348  SetNodeAttribute(doc, nodePos, "ID", nodeID);
349  auto nodePosX = AppendNode(doc, nodePos, "X");
350  SetNodeValue(doc, nodePosX, ptList[j].m_x);
351  auto nodePosY = AppendNode(doc, nodePos, "Y");
352  SetNodeValue(doc, nodePosY, ptList[j].m_y);
353  nodeID++;
354  }
355  }
356 
357  auto parentIDList = AppendNode(doc, cadProp, "ParentIDList");
358  for(int j = 0; j < (int)line->GetParentList().size(); j++) {
359  Bus* parent = static_cast<Bus*>(line->GetParentList()[j]);
360  if(parent) {
361  auto parentID = AppendNode(doc, parentIDList, "ParentID");
362  SetNodeAttribute(doc, parentID, "ID", j);
363  SetNodeValue(doc, parentID, parent->GetElectricalData().number);
364  }
365  }
366 
367  LineElectricalData data = line->GetElectricalData();
368  auto electricalProp = AppendNode(doc, lineNode, "ElectricalProperties");
369  auto isOnline = AppendNode(doc, electricalProp, "IsOnline");
370  SetNodeValue(doc, isOnline, line->IsOnline());
371  auto name = AppendNode(doc, electricalProp, "Name");
372  SetNodeValue(doc, name, data.name);
373  auto nominalVoltage = AppendNode(doc, electricalProp, "NominalVoltage");
374  SetNodeValue(doc, nominalVoltage, data.nominalVoltage);
375  SetNodeAttribute(doc, nominalVoltage, "UnitID", data.nominalVoltageUnit);
376  auto nominalPower = AppendNode(doc, electricalProp, "NominalPower");
377  SetNodeValue(doc, nominalPower, data.nominalPower);
378  SetNodeAttribute(doc, nominalPower, "UnitID", data.nominalPowerUnit);
379  auto resistance = AppendNode(doc, electricalProp, "Resistance");
380  SetNodeValue(doc, resistance, data.resistance);
381  SetNodeAttribute(doc, resistance, "UnitID", data.resistanceUnit);
382  auto indReactance = AppendNode(doc, electricalProp, "IndReactance");
383  SetNodeValue(doc, indReactance, data.indReactance);
384  SetNodeAttribute(doc, indReactance, "UnitID", data.indReactanceUnit);
385  auto capSusceptance = AppendNode(doc, electricalProp, "CapSusceptance");
386  SetNodeValue(doc, capSusceptance, data.capSusceptance);
387  SetNodeAttribute(doc, capSusceptance, "UnitID", data.capSusceptanceUnit);
388  auto lineSize = AppendNode(doc, electricalProp, "LineSize");
389  SetNodeValue(doc, lineSize, data.lineSize);
390  auto useLinePower = AppendNode(doc, electricalProp, "UseLinePower");
391  SetNodeValue(doc, useLinePower, data.useLinePower);
392 
393  auto fault = AppendNode(doc, electricalProp, "Fault");
394  auto zeroResistance = AppendNode(doc, fault, "ZeroResistance");
395  SetNodeValue(doc, zeroResistance, data.zeroResistance);
396  auto zeroIndReactance = AppendNode(doc, fault, "ZeroIndReactance");
397  SetNodeValue(doc, zeroIndReactance, data.zeroIndReactance);
398  auto zeroCapSusceptance = AppendNode(doc, fault, "ZeroCapSusceptance");
399  SetNodeValue(doc, zeroCapSusceptance, data.zeroCapSusceptance);
400 
401  auto switchingList = AppendNode(doc, electricalProp, "SwitchingList");
402  SwitchingData swData = line->GetSwitchingData();
403  for(int j = 0; j < (int)swData.swType.size(); j++) {
404  auto switching = AppendNode(doc, switchingList, "Switching");
405  SetNodeAttribute(doc, switching, "ID", j);
406  auto swType = AppendNode(doc, switching, "Type");
407  SetNodeValue(doc, swType, swData.swType[j]);
408  auto swTime = AppendNode(doc, switching, "Time");
409  SetNodeValue(doc, swTime, swData.swTime[j]);
410  }
411  } //}
412 
413  //{ Load
414  auto loadsNode = AppendNode(doc, elementsNode, "LoadList");
415  auto loadList = allElements.GetLoadList();
416  for(int i = 0; i < (int)loadList.size(); i++) {
417  Load* load = loadList[i];
418  auto loadNode = AppendNode(doc, loadsNode, "Load");
419  SetNodeAttribute(doc, loadNode, "ID", i);
420  auto cadProp = AppendNode(doc, loadNode, "CADProperties");
421  auto position = AppendNode(doc, cadProp, "Position");
422  auto posX = AppendNode(doc, position, "X");
423  SetNodeValue(doc, posX, load->GetPosition().m_x);
424  auto posY = AppendNode(doc, position, "Y");
425  SetNodeValue(doc, posY, load->GetPosition().m_y);
426  auto size = AppendNode(doc, cadProp, "Size");
427  auto width = AppendNode(doc, size, "Width");
428  SetNodeValue(doc, width, load->GetWidth());
429  auto height = AppendNode(doc, size, "Height");
430  SetNodeValue(doc, height, load->GetHeight());
431  auto angle = AppendNode(doc, cadProp, "Angle");
432  SetNodeValue(doc, angle, load->GetAngle());
433  auto nodePos = AppendNode(doc, cadProp, "NodePosition");
434  auto nodePosX = AppendNode(doc, nodePos, "X");
435  SetNodeValue(doc, nodePosX, load->GetPointList()[0].m_x);
436  auto nodePosY = AppendNode(doc, nodePos, "Y");
437  SetNodeValue(doc, nodePosY, load->GetPointList()[0].m_y);
438  auto parentID = AppendNode(doc, cadProp, "ParentID");
439  Bus* parent = static_cast<Bus*>(load->GetParentList()[0]);
440  if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number);
441 
442  LoadElectricalData data = load->GetElectricalData();
443  auto electricalProp = AppendNode(doc, loadNode, "ElectricalProperties");
444  auto isOnline = AppendNode(doc, electricalProp, "IsOnline");
445  SetNodeValue(doc, isOnline, load->IsOnline());
446  auto name = AppendNode(doc, electricalProp, "Name");
447  SetNodeValue(doc, name, data.name);
448  auto activePower = AppendNode(doc, electricalProp, "ActivePower");
449  SetNodeValue(doc, activePower, data.activePower);
450  SetNodeAttribute(doc, activePower, "UnitID", data.activePowerUnit);
451  auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower");
452  SetNodeValue(doc, reactivePower, data.reactivePower);
453  SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit);
454  auto loadType = AppendNode(doc, electricalProp, "LoadType");
455  SetNodeValue(doc, loadType, data.loadType);
456 
457  auto stability = AppendNode(doc, electricalProp, "Stability");
458  auto plotLoad = AppendNode(doc, stability, "PlotLoad");
459  SetNodeValue(doc, plotLoad, data.plotLoad);
460  auto useCompLoad = AppendNode(doc, stability, "UseCompositeLoad");
461  SetNodeValue(doc, useCompLoad, data.useCompLoad);
462  auto activePowerCompl = AppendNode(doc, stability, "ActivePowerComposition");
463  auto pzl = AppendNode(doc, activePowerCompl, "ConstantImpedance");
464  SetNodeValue(doc, pzl, data.constImpedanceActive);
465  auto pil = AppendNode(doc, activePowerCompl, "ConstantCurrent");
466  SetNodeValue(doc, pil, data.constCurrentActive);
467  auto ppl = AppendNode(doc, activePowerCompl, "ConstantPower");
468  SetNodeValue(doc, ppl, data.constPowerActive);
469  auto reactivePowerCompl = AppendNode(doc, stability, "ReactivePowerComposition");
470  auto qzl = AppendNode(doc, reactivePowerCompl, "ConstantImpedance");
471  SetNodeValue(doc, qzl, data.constImpedanceReactive);
472  auto qil = AppendNode(doc, reactivePowerCompl, "ConstantCurrent");
473  SetNodeValue(doc, qil, data.constCurrentReactive);
474  auto qpl = AppendNode(doc, reactivePowerCompl, "ConstantPower");
475  SetNodeValue(doc, qpl, data.constPowerReactive);
476 
477  auto switchingList = AppendNode(doc, electricalProp, "SwitchingList");
478  SwitchingData swData = load->GetSwitchingData();
479  for(int j = 0; j < (int)swData.swType.size(); j++) {
480  auto switching = AppendNode(doc, switchingList, "Switching");
481  SetNodeAttribute(doc, switching, "ID", j);
482  auto swType = AppendNode(doc, switching, "Type");
483  SetNodeValue(doc, swType, swData.swType[j]);
484  auto swTime = AppendNode(doc, switching, "Time");
485  SetNodeValue(doc, swTime, swData.swTime[j]);
486  }
487  } //}
488 
489  //{ SyncGenerator
490  auto syncGeneratorsNode = AppendNode(doc, elementsNode, "SyncGeneratorList");
491  auto syncGeneratorList = allElements.GetSyncGeneratorList();
492  for(int i = 0; i < (int)syncGeneratorList.size(); i++) {
493  SyncGenerator* syncGenerator = syncGeneratorList[i];
494  auto syncGeneratorNode = AppendNode(doc, syncGeneratorsNode, "SyncGenerator");
495  SetNodeAttribute(doc, syncGeneratorNode, "ID", i);
496  auto cadProp = AppendNode(doc, syncGeneratorNode, "CADProperties");
497  auto position = AppendNode(doc, cadProp, "Position");
498  auto posX = AppendNode(doc, position, "X");
499  SetNodeValue(doc, posX, syncGenerator->GetPosition().m_x);
500  auto posY = AppendNode(doc, position, "Y");
501  SetNodeValue(doc, posY, syncGenerator->GetPosition().m_y);
502  auto size = AppendNode(doc, cadProp, "Size");
503  auto width = AppendNode(doc, size, "Width");
504  SetNodeValue(doc, width, syncGenerator->GetWidth());
505  auto height = AppendNode(doc, size, "Height");
506  SetNodeValue(doc, height, syncGenerator->GetHeight());
507  auto angle = AppendNode(doc, cadProp, "Angle");
508  SetNodeValue(doc, angle, syncGenerator->GetAngle());
509  auto nodePos = AppendNode(doc, cadProp, "NodePosition");
510  auto nodePosX = AppendNode(doc, nodePos, "X");
511  SetNodeValue(doc, nodePosX, syncGenerator->GetPointList()[0].m_x);
512  auto nodePosY = AppendNode(doc, nodePos, "Y");
513  SetNodeValue(doc, nodePosY, syncGenerator->GetPointList()[0].m_y);
514  auto parentID = AppendNode(doc, cadProp, "ParentID");
515  Bus* parent = static_cast<Bus*>(syncGenerator->GetParentList()[0]);
516  if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number);
517 
518  SyncGeneratorElectricalData data = syncGenerator->GetElectricalData();
519  auto electricalProp = AppendNode(doc, syncGeneratorNode, "ElectricalProperties");
520  auto isOnline = AppendNode(doc, electricalProp, "IsOnline");
521  SetNodeValue(doc, isOnline, syncGenerator->IsOnline());
522  auto name = AppendNode(doc, electricalProp, "Name");
523  SetNodeValue(doc, name, data.name);
524  auto nominalPower = AppendNode(doc, electricalProp, "NominalPower");
525  SetNodeValue(doc, nominalPower, data.nominalPower);
526  SetNodeAttribute(doc, nominalPower, "UnitID", data.nominalPowerUnit);
527  auto nominalVoltage = AppendNode(doc, electricalProp, "NominalVoltage");
528  SetNodeValue(doc, nominalVoltage, data.nominalVoltage);
529  SetNodeAttribute(doc, nominalVoltage, "UnitID", data.nominalVoltageUnit);
530  auto activePower = AppendNode(doc, electricalProp, "ActivePower");
531  SetNodeValue(doc, activePower, data.activePower);
532  SetNodeAttribute(doc, activePower, "UnitID", data.activePowerUnit);
533  auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower");
534  SetNodeValue(doc, reactivePower, data.reactivePower);
535  SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit);
536  auto haveMaxReactive = AppendNode(doc, electricalProp, "HaveMaxReactive");
537  SetNodeValue(doc, haveMaxReactive, data.haveMaxReactive);
538  auto maxReactive = AppendNode(doc, electricalProp, "MaxReactive");
539  SetNodeValue(doc, maxReactive, data.maxReactive);
540  SetNodeAttribute(doc, maxReactive, "UnitID", data.maxReactiveUnit);
541  auto haveMinReactive = AppendNode(doc, electricalProp, "HaveMinReactive");
542  SetNodeValue(doc, haveMinReactive, data.haveMinReactive);
543  auto minReactive = AppendNode(doc, electricalProp, "MinReactive");
544  SetNodeValue(doc, minReactive, data.minReactive);
545  SetNodeAttribute(doc, minReactive, "UnitID", data.minReactiveUnit);
546  auto useMachineBase = AppendNode(doc, electricalProp, "UseMachineBase");
547  SetNodeValue(doc, useMachineBase, data.useMachineBase);
548 
549  auto fault = AppendNode(doc, electricalProp, "Fault");
550  auto positiveResistance = AppendNode(doc, fault, "PositiveResistance");
551  SetNodeValue(doc, positiveResistance, data.positiveResistance);
552  auto positiveReactance = AppendNode(doc, fault, "PositiveReactance");
553  SetNodeValue(doc, positiveReactance, data.positiveReactance);
554  auto negativeResistance = AppendNode(doc, fault, "NegativeResistance");
555  SetNodeValue(doc, negativeResistance, data.negativeResistance);
556  auto negativeReactance = AppendNode(doc, fault, "NegativeReactance");
557  SetNodeValue(doc, negativeReactance, data.negativeReactance);
558  auto zeroResistance = AppendNode(doc, fault, "ZeroResistance");
559  SetNodeValue(doc, zeroResistance, data.zeroResistance);
560  auto zeroReactance = AppendNode(doc, fault, "ZeroReactance");
561  SetNodeValue(doc, zeroReactance, data.zeroReactance);
562  auto groundResistance = AppendNode(doc, fault, "GroundResistance");
563  SetNodeValue(doc, groundResistance, data.groundResistance);
564  auto groundReactance = AppendNode(doc, fault, "GroundReactance");
565  SetNodeValue(doc, groundReactance, data.groundReactance);
566  auto groundNeutral = AppendNode(doc, fault, "GroundNeutral");
567  SetNodeValue(doc, groundNeutral, data.groundNeutral);
568 
569  auto stability = AppendNode(doc, electricalProp, "Stability");
570  auto plotSyncMachine = AppendNode(doc, stability, "PlotSyncMachine");
571  SetNodeValue(doc, plotSyncMachine, data.plotSyncMachine);
572  auto inertia = AppendNode(doc, stability, "Inertia");
573  SetNodeValue(doc, inertia, data.inertia);
574  auto damping = AppendNode(doc, stability, "Damping");
575  SetNodeValue(doc, damping, data.damping);
576  auto useAVR = AppendNode(doc, stability, "UseAVR");
577  SetNodeValue(doc, useAVR, data.useAVR);
578  auto useSpeedGovernor = AppendNode(doc, stability, "UseSpeedGovernor");
579  SetNodeValue(doc, useSpeedGovernor, data.useSpeedGovernor);
580  auto armResistance = AppendNode(doc, stability, "ArmResistance");
581  SetNodeValue(doc, armResistance, data.armResistance);
582  auto potierReactance = AppendNode(doc, stability, "PotierReactance");
583  SetNodeValue(doc, potierReactance, data.potierReactance);
584  auto satFactor = AppendNode(doc, stability, "SatFactor");
585  SetNodeValue(doc, satFactor, data.satFactor);
586  auto syncXd = AppendNode(doc, stability, "SyncXd");
587  SetNodeValue(doc, syncXd, data.syncXd);
588  auto syncXq = AppendNode(doc, stability, "SyncXq");
589  SetNodeValue(doc, syncXq, data.syncXq);
590  auto transXd = AppendNode(doc, stability, "TransXd");
591  SetNodeValue(doc, transXd, data.transXd);
592  auto transXq = AppendNode(doc, stability, "TransXq");
593  SetNodeValue(doc, transXq, data.transXq);
594  auto transTd0 = AppendNode(doc, stability, "TransTd0");
595  SetNodeValue(doc, transTd0, data.transTd0);
596  auto transTq0 = AppendNode(doc, stability, "TransTq0");
597  SetNodeValue(doc, transTq0, data.transTq0);
598  auto subXd = AppendNode(doc, stability, "SubXd");
599  SetNodeValue(doc, subXd, data.subXd);
600  auto subXq = AppendNode(doc, stability, "SubXq");
601  SetNodeValue(doc, subXq, data.subXq);
602  auto subTd0 = AppendNode(doc, stability, "SubTd0");
603  SetNodeValue(doc, subTd0, data.subTd0);
604  auto subTq0 = AppendNode(doc, stability, "SubTq0");
605  SetNodeValue(doc, subTq0, data.subTq0);
606 
607  auto avr = AppendNode(doc, stability, "AVR");
608  if(data.avr) SaveControlElements(doc, avr, data.avr);
609 
610  auto speedGov = AppendNode(doc, stability, "SpeedGovernor");
611  if(data.speedGov) SaveControlElements(doc, speedGov, data.speedGov);
612 
613  auto switchingList = AppendNode(doc, electricalProp, "SwitchingList");
614  SwitchingData swData = syncGenerator->GetSwitchingData();
615  for(int j = 0; j < (int)swData.swType.size(); j++) {
616  auto switching = AppendNode(doc, switchingList, "Switching");
617  SetNodeAttribute(doc, switching, "ID", j);
618  auto swType = AppendNode(doc, switching, "Type");
619  SetNodeValue(doc, swType, swData.swType[j]);
620  auto swTime = AppendNode(doc, switching, "Time");
621  SetNodeValue(doc, swTime, swData.swTime[j]);
622  }
623  } //}
624 
625  //{ SyncMotor
626  auto syncMotorsNode = AppendNode(doc, elementsNode, "SyncMotorList");
627  auto syncMotorList = allElements.GetSyncMotorList();
628  for(int i = 0; i < (int)syncMotorList.size(); i++) {
629  SyncMotor* syncMotor = syncMotorList[i];
630  auto syncMotorNode = AppendNode(doc, syncMotorsNode, "SyncMotor");
631  SetNodeAttribute(doc, syncMotorNode, "ID", i);
632  auto cadProp = AppendNode(doc, syncMotorNode, "CADProperties");
633  auto position = AppendNode(doc, cadProp, "Position");
634  auto posX = AppendNode(doc, position, "X");
635  SetNodeValue(doc, posX, syncMotor->GetPosition().m_x);
636  auto posY = AppendNode(doc, position, "Y");
637  SetNodeValue(doc, posY, syncMotor->GetPosition().m_y);
638  auto size = AppendNode(doc, cadProp, "Size");
639  auto width = AppendNode(doc, size, "Width");
640  SetNodeValue(doc, width, syncMotor->GetWidth());
641  auto height = AppendNode(doc, size, "Height");
642  SetNodeValue(doc, height, syncMotor->GetHeight());
643  auto angle = AppendNode(doc, cadProp, "Angle");
644  SetNodeValue(doc, angle, syncMotor->GetAngle());
645  auto nodePos = AppendNode(doc, cadProp, "NodePosition");
646  auto nodePosX = AppendNode(doc, nodePos, "X");
647  SetNodeValue(doc, nodePosX, syncMotor->GetPointList()[0].m_x);
648  auto nodePosY = AppendNode(doc, nodePos, "Y");
649  SetNodeValue(doc, nodePosY, syncMotor->GetPointList()[0].m_y);
650  auto parentID = AppendNode(doc, cadProp, "ParentID");
651  Bus* parent = static_cast<Bus*>(syncMotor->GetParentList()[0]);
652  if(parent) SetNodeValue(doc, parentID, parent->GetElectricalData().number);
653 
654  SyncMotorElectricalData data = syncMotor->GetElectricalData();
655  auto electricalProp = AppendNode(doc, syncMotorNode, "ElectricalProperties");
656  auto isOnline = AppendNode(doc, electricalProp, "IsOnline");
657  SetNodeValue(doc, isOnline, syncMotor->IsOnline());
658  auto name = AppendNode(doc, electricalProp, "Name");
659  SetNodeValue(doc, name, data.name);
660  auto nominalPower = AppendNode(doc, electricalProp, "NominalPower");
661  SetNodeValue(doc, nominalPower, data.nominalPower);
662  SetNodeAttribute(doc, nominalPower, "UnitID", data.nominalPowerUnit);
663  // auto nominalVoltage = AppendNode(doc, electricalProp, "NominalVoltage");
664  // SetNodeValue(doc, nominalVoltage, data.nominalVoltage);
665  // SetNodeAttribute(doc, nominalVoltage, "UnitID", data.nominalVoltageUnit);
666  auto activePower = AppendNode(doc, electricalProp, "ActivePower");
667  SetNodeValue(doc, activePower, data.activePower);
668  SetNodeAttribute(doc, activePower, "UnitID", data.activePowerUnit);
669  auto reactivePower = AppendNode(doc, electricalProp, "ReactivePower");
670  SetNodeValue(doc, reactivePower, data.reactivePower);
671  SetNodeAttribute(doc, reactivePower, "UnitID", data.reactivePowerUnit);
672  auto haveMaxReactive = AppendNode(doc, electricalProp, "HaveMaxReactive");
673  SetNodeValue(doc, haveMaxReactive, data.haveMaxReactive);
674  auto maxReactive = AppendNode(doc, electricalProp, "MaxReactive");
675  SetNodeValue(doc, maxReactive, data.maxReactive);
676  SetNodeAttribute(doc, maxReactive, "UnitID", data.maxReactiveUnit);
677  auto haveMinReactive = AppendNode(doc, electricalProp, "HaveMinReactive");
678  SetNodeValue(doc, haveMinReactive, data.haveMinReactive);
679  auto minReactive = AppendNode(doc, electricalProp, "MinReactive");
680  SetNodeValue(doc, minReactive, data.minReactive);
681  SetNodeAttribute(doc, minReactive, "UnitID", data.minReactiveUnit);
682  auto useMachineBase = AppendNode(doc, electricalProp, "UseMachineBase");
683  SetNodeValue(doc, useMachineBase, data.useMachineBase);
684 
685  auto fault = AppendNode(doc, electricalProp, "Fault");
686  auto positiveResistance = AppendNode(doc, fault, "PositiveResistance");
687  SetNodeValue(doc, positiveResistance, data.positiveResistance);
688  auto positiveReactance = AppendNode(doc, fault, "PositiveReactance");
689  SetNodeValue(doc, positiveReactance, data.positiveReactance);
690  auto negativeResistance = AppendNode(doc, fault, "NegativeResistance");
691  SetNodeValue(doc, negativeResistance, data.negativeResistance);
692  auto negativeReactance = AppendNode(doc, fault, "NegativeReactance");
693  SetNodeValue(doc, negativeReactance, data.negativeReactance);
694  auto zeroResistance = AppendNode(doc, fault, "ZeroResistance");
695  SetNodeValue(doc, zeroResistance, data.zeroResistance);
696  auto zeroReactance = AppendNode(doc, fault, "ZeroReactance");
697  SetNodeValue(doc, zeroReactance, data.zeroReactance);
698  auto groundResistance = AppendNode(doc, fault, "GroundResistance");
699  SetNodeValue(doc, groundResistance, data.groundResistance);
700  auto groundReactance = AppendNode(doc, fault, "GroundReactance");
701  SetNodeValue(doc, groundReactance, data.groundReactance);
702  auto groundNeutral = AppendNode(doc, fault, "GroundNeutral");
703  SetNodeValue(doc, groundNeutral, data.groundNeutral);
704 
705  // To future use...
706  /*auto stability = AppendNode(doc, electricalProp, "Stability");
707  auto plotSyncMachine = AppendNode(doc, stability, "PlotSyncMotor");
708  SetNodeValue(doc, plotSyncMachine, data.plotSyncMachine);
709  auto inertia = AppendNode(doc, stability, "Inertia");
710  SetNodeValue(doc, inertia, data.inertia);
711  auto damping = AppendNode(doc, stability, "Damping");
712  SetNodeValue(doc, damping, data.damping);
713  auto useAVR = AppendNode(doc, stability, "UseAVR");
714  SetNodeValue(doc, useAVR, data.useAVR);
715  auto armResistance = AppendNode(doc, stability, "ArmResistance");
716  SetNodeValue(doc, armResistance, data.armResistance);
717  auto potierReactance = AppendNode(doc, stability, "PotierReactance");
718  SetNodeValue(doc, potierReactance, data.potierReactance);
719  auto satFactor = AppendNode(doc, stability, "SatFactor");
720  SetNodeValue(doc, satFactor, data.satFactor);
721  auto syncXd = AppendNode(doc, stability, "SyncXd");
722  SetNodeValue(doc, syncXd, data.syncXd);
723  auto syncXq = AppendNode(doc, stability, "SyncXq");
724  SetNodeValue(doc, syncXq, data.syncXq);
725  auto transXd = AppendNode(doc, stability, "TransXd");
726  SetNodeValue(doc, transXd, data.transXd);
727  auto transXq = AppendNode(doc, stability, "TransXq");
728  SetNodeValue(doc, transXq, data.transXq);
729  auto transTd0 = AppendNode(doc, stability, "TransTd0");
730  SetNodeValue(doc, transTd0, data.transTd0);
731  auto transTq0 = AppendNode(doc, stability, "TransTq0");
732  SetNodeValue(doc, transTq0, data.transTq0);
733  auto subXd = AppendNode(doc, stability, "SubXd");
734  SetNodeValue(doc, subXd, data.subXd);
735  auto subXq = AppendNode(doc, stability, "SubXq");
736  SetNodeValue(doc, subXq, data.subXq);
737  auto subTd0 = AppendNode(doc, stability, "SubTd0");
738  SetNodeValue(doc, subTd0, data.subTd0);
739  auto subTq0 = AppendNode(doc, stability, "SubTq0");
740  SetNodeValue(doc, subTq0, data.subTq0);
741 
742  auto switchingList = AppendNode(doc, electricalProp, "SwitchingList");
743  SwitchingData swData = syncGenerator->GetSwitchingData();
744  for(int j = 0; j < (int)swData.swType.size(); j++) {
745  auto switching = AppendNode(doc, switchingList, "Switching");
746  SetNodeAttribute(doc, switching, "ID", j);
747  auto swType = AppendNode(doc, switching, "Type");
748  SetNodeValue(doc, swType, swData.swType[j]);
749  auto swTime = AppendNode(doc, switching, "Time");
750  SetNodeValue(doc, swTime, swData.swTime[j]);
751  }*/
752  } //}
753 
754  //{ Transfomer
755  auto transformersNode = AppendNode(doc, elementsNode, "TransformerList");
756  auto transformerList = allElements.GetTransformerList();
757  for(int i = 0; i < (int)transformerList.size(); i++) {
758  Transformer* transfomer = transformerList[i];
759  auto transformerNode = AppendNode(doc, transformersNode, "Transfomer");
760  SetNodeAttribute(doc, transformerNode, "ID", i);
761  auto cadProp = AppendNode(doc, transformerNode, "CADProperties");
762  auto position = AppendNode(doc, cadProp, "Position");
763  auto posX = AppendNode(doc, position, "X");
764  SetNodeValue(doc, posX, transfomer->GetPosition().m_x);
765  auto posY = AppendNode(doc, position, "Y");
766  SetNodeValue(doc, posY, transfomer->GetPosition().m_y);
767  auto size = AppendNode(doc, cadProp, "Size");
768  auto width = AppendNode(doc, size, "Width");
769  SetNodeValue(doc, width, transfomer->GetWidth());
770  auto height = AppendNode(doc, size, "Height");
771  SetNodeValue(doc, height, transfomer->GetHeight());
772  auto angle = AppendNode(doc, cadProp, "Angle");
773  SetNodeValue(doc, angle, transfomer->GetAngle());
774  auto nodeList = AppendNode(doc, cadProp, "NodeList");
775  auto nodePos1 = AppendNode(doc, nodeList, "Node");
776  SetNodeAttribute(doc, nodePos1, "ID", 0);
777  auto nodePosX1 = AppendNode(doc, nodePos1, "X");
778  SetNodeValue(doc, nodePosX1, transfomer->GetPointList()[0].m_x);
779  auto nodePosY1 = AppendNode(doc, nodePos1, "Y");
780  SetNodeValue(doc, nodePosY1, transfomer->GetPointList()[0].m_y);
781  auto nodePos2 = AppendNode(doc, nodeList, "Node");
782  SetNodeAttribute(doc, nodePos2, "ID", 1);
783  auto nodePosX2 = AppendNode(doc, nodePos2, "X");
784  SetNodeValue(doc, nodePosX2, transfomer->GetPointList()[transfomer->GetPointList().size() - 1].m_x);
785  auto nodePosY2 = AppendNode(doc, nodePos2, "Y");
786  SetNodeValue(doc, nodePosY2, transfomer->GetPointList()[transfomer->GetPointList().size() - 1].m_y);
787 
788  auto parentIDList = AppendNode(doc, cadProp, "ParentIDList");
789  for(int j = 0; j < (int)transfomer->GetParentList().size(); j++) {
790  Bus* parent = static_cast<Bus*>(transfomer->GetParentList()[j]);
791  if(parent) {
792  auto parentID = AppendNode(doc, parentIDList, "ParentID");
793  SetNodeAttribute(doc, parentID, "ID", j);
794  SetNodeValue(doc, parentID, parent->GetElectricalData().number);
795  }
796  }
797 
798  TransformerElectricalData data = transfomer->GetElectricalData();
799  auto electricalProp = AppendNode(doc, transformerNode, "ElectricalProperties");
800  auto isOnline = AppendNode(doc, electricalProp, "IsOnline");
801  SetNodeValue(doc, isOnline, transfomer->IsOnline());
802  auto name = AppendNode(doc, electricalProp, "Name");
803  SetNodeValue(doc, name, data.name);
804  auto primaryNominalVoltage = AppendNode(doc, electricalProp, "PrimaryNominalVoltage");
805  SetNodeValue(doc, primaryNominalVoltage, data.primaryNominalVoltage);
806  SetNodeAttribute(doc, primaryNominalVoltage, "UnitID", data.primaryNominalVoltageUnit);
807  auto secondaryNominalVoltage = AppendNode(doc, electricalProp, "SecondaryNominalVoltage");
808  SetNodeValue(doc, secondaryNominalVoltage, data.secondaryNominalVoltage);
809  SetNodeAttribute(doc, secondaryNominalVoltage, "UnitID", data.secondaryNominalVoltageUnit);
810  auto nominalPower = AppendNode(doc, electricalProp, "NominalPower");
811  SetNodeValue(doc, nominalPower, data.nominalPower);
812  SetNodeAttribute(doc, nominalPower, "UnitID", data.nominalPowerUnit);
813  auto resistance = AppendNode(doc, electricalProp, "Resistance");
814  SetNodeValue(doc, resistance, data.resistance);
815  SetNodeAttribute(doc, resistance, "UnitID", data.resistanceUnit);
816  auto indReactance = AppendNode(doc, electricalProp, "IndReactance");
817  SetNodeValue(doc, indReactance, data.indReactance);
818  SetNodeAttribute(doc, indReactance, "UnitID", data.indReactanceUnit);
819  auto connection = AppendNode(doc, electricalProp, "Connection");
820  SetNodeValue(doc, connection, data.connection);
821  auto turnsRatio = AppendNode(doc, electricalProp, "TurnsRatio");
822  SetNodeValue(doc, turnsRatio, data.turnsRatio);
823  auto phaseShift = AppendNode(doc, electricalProp, "PhaseShift");
824  SetNodeValue(doc, phaseShift, data.phaseShift);
825  auto useTransformerPower = AppendNode(doc, electricalProp, "UseTransfomerPower");
826  SetNodeValue(doc, useTransformerPower, data.useTransformerPower);
827 
828  auto fault = AppendNode(doc, electricalProp, "Fault");
829  auto zeroResistance = AppendNode(doc, fault, "ZeroResistance");
830  SetNodeValue(doc, zeroResistance, data.zeroResistance);
831  auto zeroIndReactance = AppendNode(doc, fault, "ZeroIndReactance");
832  SetNodeValue(doc, zeroIndReactance, data.zeroIndReactance);
833  auto primaryGrndResistance = AppendNode(doc, fault, "PrimaryGrndResistance");
834  SetNodeValue(doc, primaryGrndResistance, data.primaryGrndResistance);
835  auto primaryGrndReactance = AppendNode(doc, fault, "PrimaryGrndReactance");
836  SetNodeValue(doc, primaryGrndReactance, data.primaryGrndReactance);
837  auto secondaryGrndResistance = AppendNode(doc, fault, "SecondaryGrndResistance");
838  SetNodeValue(doc, secondaryGrndResistance, data.secondaryGrndResistance);
839  auto secondaryGrndReactance = AppendNode(doc, fault, "SecondaryGrndReactance");
840  SetNodeValue(doc, secondaryGrndReactance, data.secondaryGrndReactance);
841 
842  auto switchingList = AppendNode(doc, electricalProp, "SwitchingList");
843  SwitchingData swData = transfomer->GetSwitchingData();
844  for(int j = 0; j < (int)swData.swType.size(); j++) {
845  auto switching = AppendNode(doc, switchingList, "Switching");
846  SetNodeAttribute(doc, switching, "ID", j);
847  auto swType = AppendNode(doc, switching, "Type");
848  SetNodeValue(doc, swType, swData.swType[j]);
849  auto swTime = AppendNode(doc, switching, "Time");
850  SetNodeValue(doc, swTime, swData.swTime[j]);
851  }
852  } //}
853 
854  //{ Text
855  auto textsNode = AppendNode(doc, elementsNode, "TextList");
856  auto textList = m_workspace->GetTextList();
857  for(int i = 0; i < (int)textList.size(); i++) {
858  Text* text = textList[i];
859  auto textNode = AppendNode(doc, textsNode, "Text");
860  SetNodeAttribute(doc, textNode, "ID", i);
861  auto cadProp = AppendNode(doc, textNode, "CADProperties");
862  auto position = AppendNode(doc, cadProp, "Position");
863  auto posX = AppendNode(doc, position, "X");
864  SetNodeValue(doc, posX, text->GetPosition().m_x);
865  auto posY = AppendNode(doc, position, "Y");
866  SetNodeValue(doc, posY, text->GetPosition().m_y);
867  auto size = AppendNode(doc, cadProp, "Size");
868  auto width = AppendNode(doc, size, "Width");
869  SetNodeValue(doc, width, text->GetWidth());
870  auto height = AppendNode(doc, size, "Height");
871  SetNodeValue(doc, height, text->GetHeight());
872  auto angle = AppendNode(doc, cadProp, "Angle");
873  SetNodeValue(doc, angle, text->GetAngle());
874  auto textProperties = AppendNode(doc, textNode, "TextProperties");
875  auto elementType = AppendNode(doc, textProperties, "ElementType");
876  SetNodeValue(doc, elementType, text->GetElementType());
877  auto elementNumber = AppendNode(doc, textProperties, "ElementNumber");
878  SetNodeValue(doc, elementNumber, text->GetElementNumber());
879  auto dataType = AppendNode(doc, textProperties, "DataType");
880  SetNodeValue(doc, dataType, text->GetDataType());
881  auto dataUnit = AppendNode(doc, textProperties, "DataUnit");
882  SetNodeValue(doc, dataUnit, text->GetUnit());
883  auto direction = AppendNode(doc, textProperties, "Direction");
884  SetNodeValue(doc, direction, text->GetDirection());
885  auto decimalPlaces = AppendNode(doc, textProperties, "DecimalPlaces");
886  SetNodeValue(doc, decimalPlaces, text->GetDecimalPlaces());
887  }
888  //}
889 
890  std::ofstream writeXML(path.GetFullPath());
891  writeXML << doc;
892  writeXML.close();
893 }
894 
895 bool FileHanding::OpenProject(wxFileName path)
896 {
897  rapidxml::xml_document<> doc;
898  rapidxml::file<> xmlFile(path.GetFullPath().mb_str());
899 
900  doc.parse<0>(xmlFile.data());
901 
902  auto projectNode = doc.first_node("Project");
903  if(!projectNode) return false;
904  auto nameNode = projectNode->first_node("Name");
905  if(!nameNode) return false;
906  m_workspace->SetName(nameNode->value());
907 
908  PropertiesData* propData = m_workspace->GetProperties();
909  SimulationData simData = propData->GetSimulationPropertiesData();
910 
911  // { Properties data
912  auto propertiesNode = projectNode->first_node("Properties");
913  if(propertiesNode) {
914  auto simPropertiesNode = propertiesNode->first_node("SimulationProperties");
915  if(simPropertiesNode) {
916  // General
917  auto general = simPropertiesNode->first_node("General");
918  simData.basePower = GetNodeValueDouble(general, "BasePower");
919  simData.basePowerUnit = static_cast<ElectricalUnit>(GetAttributeValueInt(general, "BasePower", "UnitID"));
920  auto contCalc = general->first_node("ContinuousCalculation");
921  simData.faultAfterPowerFlow = GetNodeValueInt(contCalc, "Fault");
922  simData.scPowerAfterPowerFlow = GetNodeValueInt(contCalc, "SCPower");
923 
924  // Power flow
925  auto powerFlow = simPropertiesNode->first_node("PowerFlow");
926  simData.powerFlowMethod = static_cast<PowerFlowMethod>(GetNodeValueInt(powerFlow, "SolutionMethod"));
927  simData.accFator = GetNodeValueDouble(powerFlow, "AccFactor");
928  simData.powerFlowTolerance = GetNodeValueDouble(powerFlow, "Tolerance");
929  simData.powerFlowMaxIterations = GetNodeValueInt(powerFlow, "MaxIterations");
930 
931  // Stability
932  auto stability = simPropertiesNode->first_node("Stability");
933  simData.timeStep = GetNodeValueDouble(stability, "TimeStep");
934  simData.stabilitySimulationTime = GetNodeValueDouble(stability, "SimulationTime");
935  simData.stabilityFrequency = GetNodeValueDouble(stability, "Frequency");
936  simData.stabilityTolerance = GetNodeValueDouble(stability, "Tolerance");
937  simData.stabilityMaxIterations = GetNodeValueDouble(stability, "MaxIterations");
938  simData.controlTimeStepRatio = GetNodeValueInt(stability, "ControlStepRatio");
939  simData.plotTime = GetNodeValueDouble(stability, "PlotStep");
940  simData.useCOI = GetNodeValueInt(stability, "UseCOI");
941 
942  // ZIP load
943  auto compLoads = simPropertiesNode->first_node("ZIPLoad");
944  simData.useCompLoads = GetNodeValueInt(compLoads, "UseCompositeLoad");
945  auto activePowerComp = compLoads->first_node("ActivePowerComposition");
946  simData.constImpedanceActive = GetNodeValueDouble(activePowerComp, "ConstantImpedance");
947  simData.constCurrentActive = GetNodeValueDouble(activePowerComp, "ConstantCurrent");
948  simData.constPowerActive = GetNodeValueDouble(activePowerComp, "ConstantPower");
949  auto reactivePowerComp = compLoads->first_node("ReactivePowerComposition");
950  simData.constImpedanceReactive = GetNodeValueDouble(reactivePowerComp, "ConstantImpedance");
951  simData.constCurrentReactive = GetNodeValueDouble(reactivePowerComp, "ConstantCurrent");
952  simData.constPowerReactive = GetNodeValueDouble(reactivePowerComp, "ConstantPower");
953  auto uvLimit = compLoads->first_node("UndervoltageLimit");
954  simData.underVoltageConstCurrent = GetNodeValueDouble(uvLimit, "ConstantCurrent");
955  simData.underVoltageConstPower = GetNodeValueDouble(uvLimit, "ConstantPower");
956  }
957  }
958  // }
959 
960  propData->SetSimulationPropertiesData(simData);
961 
962  // Open elements
963  auto elementsNode = projectNode->first_node("Elements");
964  if(!elementsNode) return false;
965  std::vector<Element*> elementList;
966  // Save lists individually to get parents
967  std::vector<Bus*> busList;
968  std::vector<Capacitor*> capacitorList;
969  std::vector<IndMotor*> indMotorList;
970  std::vector<Inductor*> inductorList;
971  std::vector<Line*> lineList;
972  std::vector<Load*> loadList;
973  std::vector<SyncGenerator*> syncGeneratorList;
974  std::vector<SyncMotor*> syncMotorList;
975  std::vector<Transformer*> transformerList;
976  std::vector<Text*> textList;
977 
978  //{ Bus
979  auto busListNode = elementsNode->first_node("BusList");
980  if(!busListNode) return false;
981  auto busNode = busListNode->first_node("Bus");
982  while(busNode) {
983  auto cadPropNode = busNode->first_node("CADProperties");
984  if(!cadPropNode) return false;
985 
986  auto position = cadPropNode->first_node("Position");
987  double posX = GetNodeValueDouble(position, "X");
988  double posY = GetNodeValueDouble(position, "Y");
989  Bus* bus = new Bus(wxPoint2DDouble(posX, posY));
990 
991  auto size = cadPropNode->first_node("Size");
992  double width = GetNodeValueDouble(size, "Width");
993  double height = GetNodeValueDouble(size, "Height");
994  double angle = GetNodeValueDouble(cadPropNode, "Angle");
995  bus->SetWidth(width);
996  bus->SetHeight(height);
997  bus->SetPosition(bus->GetPosition()); // Update bus rectangle.
998  int numRot = angle / bus->GetRotationAngle();
999  bool clockwise = true;
1000  if(numRot < 0) {
1001  numRot = std::abs(numRot);
1002  clockwise = false;
1003  }
1004  for(int i = 0; i < numRot; i++) bus->Rotate(clockwise);
1005 
1006  BusElectricalData data = bus->GetElectricalData();
1007  auto electricalProp = busNode->first_node("ElectricalProperties");
1008  if(!electricalProp) return false;
1009 
1010  data.name = electricalProp->first_node("Name")->value();
1011  data.nominalVoltage = GetNodeValueDouble(electricalProp, "NominalVoltage");
1012  data.nominalVoltageUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID");
1013  data.isVoltageControlled = GetNodeValueInt(electricalProp, "IsVoltageControlled");
1014  data.controlledVoltage = GetNodeValueDouble(electricalProp, "ControlledVoltage");
1015  data.controlledVoltageUnitChoice = GetAttributeValueInt(electricalProp, "ControlledVoltage", "Choice");
1016  data.slackBus = GetNodeValueInt(electricalProp, "SlackBus");
1017  auto fault = electricalProp->first_node("Fault");
1018  data.hasFault = GetNodeValueInt(fault, "HasFault");
1019  data.faultType = (FaultData)GetNodeValueInt(fault, "Type");
1020  data.faultLocation = (FaultData)GetNodeValueInt(fault, "Location");
1021  data.faultResistance = GetNodeValueDouble(fault, "Resistance");
1022  data.faultReactance = GetNodeValueDouble(fault, "Reactance");
1023  auto stability = electricalProp->first_node("Stability");
1024  data.plotBus = GetNodeValueInt(stability, "Plot");
1025  data.stabHasFault = GetNodeValueInt(stability, "HasFault");
1026  data.stabFaultTime = GetNodeValueDouble(stability, "FaultTime");
1027  data.stabFaultLength = GetNodeValueDouble(stability, "FaultLength");
1028  data.stabFaultResistance = GetNodeValueDouble(stability, "FaultResistance");
1029  data.stabFaultReactance = GetNodeValueDouble(stability, "FaultReactance");
1030 
1031  bus->SetElectricalData(data);
1032 
1033  if(data.stabHasFault) bus->SetDynamicEvent(true);
1034 
1035  elementList.push_back(bus);
1036  busList.push_back(bus);
1037  busNode = busNode->next_sibling("Bus");
1038  } //}
1039 
1040  //{ Capacitor
1041  auto capacitorListNode = elementsNode->first_node("CapacitorList");
1042  if(!capacitorListNode) return false;
1043  auto capacitorNode = capacitorListNode->first_node("Capacitor");
1044  while(capacitorNode) {
1045  Capacitor* capacitor = new Capacitor();
1046 
1047  auto cadPropNode = capacitorNode->first_node("CADProperties");
1048  if(!cadPropNode) return false;
1049 
1050  auto position = cadPropNode->first_node("Position");
1051  double posX = GetNodeValueDouble(position, "X");
1052  double posY = GetNodeValueDouble(position, "Y");
1053  auto size = cadPropNode->first_node("Size");
1054  double width = GetNodeValueDouble(size, "Width");
1055  double height = GetNodeValueDouble(size, "Height");
1056  double angle = GetNodeValueDouble(cadPropNode, "Angle");
1057  auto nodePosition = cadPropNode->first_node("NodePosition");
1058  double nodePosX = GetNodeValueDouble(nodePosition, "X");
1059  double nodePosY = GetNodeValueDouble(nodePosition, "Y");
1060  int parentID = GetNodeValueInt(cadPropNode, "ParentID");
1061  if(parentID == -1) {
1062  // If the element has no parent, create a temporary one, remove and delete.
1063  Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY));
1064  capacitor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1065  capacitor->StartMove(capacitor->GetPosition());
1066  capacitor->Move(wxPoint2DDouble(posX, posY));
1067  capacitor->RemoveParent(parent);
1068  delete parent;
1069  } else {
1070  Bus* parent = busList[parentID];
1071  capacitor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1072  capacitor->StartMove(capacitor->GetPosition());
1073  capacitor->Move(wxPoint2DDouble(posX, posY));
1074  }
1075  capacitor->SetWidth(width);
1076  capacitor->SetHeight(height);
1077 
1078  int numRot = angle / capacitor->GetRotationAngle();
1079  bool clockwise = true;
1080  if(numRot < 0) {
1081  numRot = std::abs(numRot);
1082  clockwise = false;
1083  }
1084  for(int i = 0; i < numRot; i++) capacitor->Rotate(clockwise);
1085 
1086  auto electricalProp = capacitorNode->first_node("ElectricalProperties");
1087  if(!electricalProp) return false;
1088 
1089  capacitor->SetOnline(GetNodeValueInt(electricalProp, "IsOnline"));
1090  CapacitorElectricalData data = capacitor->GetElectricalData();
1091  data.name = electricalProp->first_node("Name")->value();
1092  data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower");
1093  data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID");
1094 
1095  SwitchingData swData;
1096  auto switchingList = electricalProp->first_node("SwitchingList");
1097  if(!switchingList) return false;
1098  auto swNode = switchingList->first_node("Switching");
1099  while(swNode) {
1100  swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type"));
1101  swData.swTime.push_back(GetNodeValueDouble(swNode, "Time"));
1102  swNode = swNode->next_sibling("Switching");
1103  }
1104  capacitor->SetSwitchingData(swData);
1105 
1106  capacitor->SetElectricalData(data);
1107 
1108  if(swData.swTime.size() != 0) capacitor->SetDynamicEvent(true);
1109 
1110  elementList.push_back(capacitor);
1111  capacitorList.push_back(capacitor);
1112  capacitorNode = capacitorNode->next_sibling("Capacitor");
1113  } //}
1114 
1115  //{ IndMotor
1116  auto indMotorListNode = elementsNode->first_node("IndMotorList");
1117  if(!indMotorListNode) return false;
1118  auto indMotorNode = indMotorListNode->first_node("IndMotor");
1119  while(indMotorNode) {
1120  IndMotor* indMotor = new IndMotor();
1121 
1122  auto cadPropNode = indMotorNode->first_node("CADProperties");
1123  if(!cadPropNode) return false;
1124 
1125  auto position = cadPropNode->first_node("Position");
1126  double posX = GetNodeValueDouble(position, "X");
1127  double posY = GetNodeValueDouble(position, "Y");
1128  auto size = cadPropNode->first_node("Size");
1129  double width = GetNodeValueDouble(size, "Width");
1130  double height = GetNodeValueDouble(size, "Height");
1131  double angle = GetNodeValueDouble(cadPropNode, "Angle");
1132  auto nodePosition = cadPropNode->first_node("NodePosition");
1133  double nodePosX = GetNodeValueDouble(nodePosition, "X");
1134  double nodePosY = GetNodeValueDouble(nodePosition, "Y");
1135  int parentID = GetNodeValueInt(cadPropNode, "ParentID");
1136  if(parentID == -1) {
1137  // If the element has no parent, create a temporary one, remove and delete.
1138  Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY));
1139  indMotor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1140  indMotor->StartMove(indMotor->GetPosition());
1141  indMotor->Move(wxPoint2DDouble(posX, posY));
1142  indMotor->RemoveParent(parent);
1143  delete parent;
1144  } else {
1145  Bus* parent = busList[parentID];
1146  indMotor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1147  indMotor->StartMove(indMotor->GetPosition());
1148  indMotor->Move(wxPoint2DDouble(posX, posY));
1149  }
1150  indMotor->SetWidth(width);
1151  indMotor->SetHeight(height);
1152 
1153  int numRot = angle / indMotor->GetRotationAngle();
1154  bool clockwise = true;
1155  if(numRot < 0) {
1156  numRot = std::abs(numRot);
1157  clockwise = false;
1158  }
1159  for(int i = 0; i < numRot; i++) indMotor->Rotate(clockwise);
1160 
1161  auto electricalProp = indMotorNode->first_node("ElectricalProperties");
1162  if(!electricalProp) return false;
1163 
1164  indMotor->SetOnline(GetNodeValueInt(electricalProp, "IsOnline"));
1165  IndMotorElectricalData data = indMotor->GetElectricalData();
1166  data.name = electricalProp->first_node("Name")->value();
1167  data.activePower = GetNodeValueDouble(electricalProp, "ActivePower");
1168  data.activePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ActivePower", "UnitID");
1169  data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower");
1170  data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID");
1171 
1172  indMotor->SetElectricalData(data);
1173  elementList.push_back(indMotor);
1174  indMotorList.push_back(indMotor);
1175  indMotorNode = indMotorNode->next_sibling("IndMotor");
1176  } //}
1177 
1178  //{ Inductor
1179  auto inductorListNode = elementsNode->first_node("InductorList");
1180  if(!inductorListNode) return false;
1181  auto inductorNode = inductorListNode->first_node("Inductor");
1182  while(inductorNode) {
1183  Inductor* inductor = new Inductor();
1184 
1185  auto cadPropNode = inductorNode->first_node("CADProperties");
1186  if(!cadPropNode) return false;
1187 
1188  auto position = cadPropNode->first_node("Position");
1189  double posX = GetNodeValueDouble(position, "X");
1190  double posY = GetNodeValueDouble(position, "Y");
1191  auto size = cadPropNode->first_node("Size");
1192  double width = GetNodeValueDouble(size, "Width");
1193  double height = GetNodeValueDouble(size, "Height");
1194  double angle = GetNodeValueDouble(cadPropNode, "Angle");
1195  auto nodePosition = cadPropNode->first_node("NodePosition");
1196  double nodePosX = GetNodeValueDouble(nodePosition, "X");
1197  double nodePosY = GetNodeValueDouble(nodePosition, "Y");
1198  int parentID = GetNodeValueInt(cadPropNode, "ParentID");
1199  if(parentID == -1) {
1200  // If the element has no parent, create a temporary one, remove and delete.
1201  Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY));
1202  inductor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1203  inductor->StartMove(inductor->GetPosition());
1204  inductor->Move(wxPoint2DDouble(posX, posY));
1205  inductor->RemoveParent(parent);
1206  delete parent;
1207  } else {
1208  Bus* parent = busList[parentID];
1209  inductor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1210  inductor->StartMove(inductor->GetPosition());
1211  inductor->Move(wxPoint2DDouble(posX, posY));
1212  }
1213  inductor->SetWidth(width);
1214  inductor->SetHeight(height);
1215 
1216  int numRot = angle / inductor->GetRotationAngle();
1217  bool clockwise = true;
1218  if(numRot < 0) {
1219  numRot = std::abs(numRot);
1220  clockwise = false;
1221  }
1222  for(int i = 0; i < numRot; i++) inductor->Rotate(clockwise);
1223 
1224  auto electricalProp = inductorNode->first_node("ElectricalProperties");
1225  if(!electricalProp) return false;
1226 
1227  inductor->SetOnline(GetNodeValueInt(electricalProp, "IsOnline"));
1228  InductorElectricalData data = inductor->GetElectricalData();
1229  data.name = electricalProp->first_node("Name")->value();
1230  data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower");
1231  data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID");
1232 
1233  SwitchingData swData;
1234  auto switchingList = electricalProp->first_node("SwitchingList");
1235  if(!switchingList) return false;
1236  auto swNode = switchingList->first_node("Switching");
1237  while(swNode) {
1238  swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type"));
1239  swData.swTime.push_back(GetNodeValueDouble(swNode, "Time"));
1240  swNode = swNode->next_sibling("Switching");
1241  }
1242  inductor->SetSwitchingData(swData);
1243 
1244  inductor->SetElectricalData(data);
1245 
1246  if(swData.swTime.size() != 0) inductor->SetDynamicEvent(true);
1247 
1248  elementList.push_back(inductor);
1249  inductorList.push_back(inductor);
1250  inductorNode = inductorNode->next_sibling("Inductor");
1251  } //}
1252 
1253  //{ Line
1254  auto lineListNode = elementsNode->first_node("LineList");
1255  if(!lineListNode) return false;
1256  auto lineNode = lineListNode->first_node("Line");
1257  while(lineNode) {
1258  Line* line = new Line();
1259 
1260  auto cadPropNode = lineNode->first_node("CADProperties");
1261  if(!cadPropNode) return false;
1262 
1263  // Get nodes points
1264  std::vector<wxPoint2DDouble> ptsList;
1265  auto nodePosList = cadPropNode->first_node("NodeList");
1266  if(!nodePosList) return false;
1267  auto nodePos = nodePosList->first_node("Node");
1268  while(nodePos) {
1269  double nodePosX = GetNodeValueDouble(nodePos, "X");
1270  double nodePosY = GetNodeValueDouble(nodePos, "Y");
1271  ptsList.push_back(wxPoint2DDouble(nodePosX, nodePosY));
1272  nodePos = nodePos->next_sibling("Node");
1273  }
1274 
1275  // Get parents IDs
1276  auto parentIDList = cadPropNode->first_node("ParentIDList");
1277  if(!parentIDList) return false;
1278  auto parentNode = parentIDList->first_node("ParentID");
1279  long parentID[2] = {-1, -1};
1280  while(parentNode) {
1281  long index = 0;
1282  wxString(parentNode->first_attribute("ID")->value()).ToLong(&index);
1283  wxString(parentNode->value()).ToCLong(&parentID[index]);
1284  parentNode = parentNode->next_sibling("ParentID");
1285  }
1286 
1287  // Set parents (if have)
1288  Bus *parent1, *parent2;
1289  if(parentID[0] == -1) {
1290  parent1 = new Bus(ptsList[0]);
1291  line->AddParent(parent1, ptsList[0]);
1292  } else {
1293  parent1 = busList[parentID[0]];
1294  line->AddParent(parent1, ptsList[0]);
1295  }
1296  if(parentID[1] == -1) {
1297  parent2 = new Bus(ptsList[ptsList.size() - 1]);
1298  line->AddParent(parent2, ptsList[ptsList.size() - 1]);
1299  } else {
1300  parent2 = busList[parentID[1]];
1301  line->AddParent(parent2, ptsList[ptsList.size() - 1]);
1302  }
1303 
1304  // Add the others nodes (if have)
1305  std::vector<wxPoint2DDouble> midPts;
1306  for(int i = 1; i < (int)ptsList.size() - 1; i++) midPts.push_back(ptsList[i]);
1307  std::vector<wxPoint2DDouble> edgesPts = line->GetPointList();
1308  edgesPts.insert(edgesPts.begin() + 2, midPts.begin(), midPts.end());
1309  line->SetPointList(edgesPts);
1310 
1311  if(parentID[0] == -1) {
1312  line->RemoveParent(parent1);
1313  delete parent1;
1314  }
1315  if(parentID[1] == -1) {
1316  line->RemoveParent(parent2);
1317  delete parent2;
1318  }
1319 
1320  auto electricalProp = lineNode->first_node("ElectricalProperties");
1321  if(!electricalProp) return false;
1322 
1323  line->SetOnline(GetNodeValueInt(electricalProp, "IsOnline"));
1324  LineElectricalData data = line->GetElectricalData();
1325  data.name = electricalProp->first_node("Name")->value();
1326  data.nominalVoltage = GetNodeValueDouble(electricalProp, "NominalVoltage");
1327  data.nominalVoltageUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID");
1328  data.nominalPower = GetNodeValueDouble(electricalProp, "NominalPower");
1329  data.nominalPowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalPower", "UnitID");
1330  data.resistance = GetNodeValueDouble(electricalProp, "Resistance");
1331  data.resistanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "Resistance", "UnitID");
1332  data.indReactance = GetNodeValueDouble(electricalProp, "IndReactance");
1333  data.indReactanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "IndReactance", "UnitID");
1334  data.capSusceptance = GetNodeValueDouble(electricalProp, "CapSusceptance");
1335  data.capSusceptanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "CapSusceptance", "UnitID");
1336  data.lineSize = GetNodeValueDouble(electricalProp, "LineSize");
1337  data.useLinePower = GetNodeValueInt(electricalProp, "UseLinePower");
1338 
1339  auto fault = electricalProp->first_node("Fault");
1340  data.zeroResistance = GetNodeValueDouble(fault, "ZeroResistance");
1341  data.zeroIndReactance = GetNodeValueDouble(fault, "ZeroIndReactance");
1342  data.zeroCapSusceptance = GetNodeValueDouble(fault, "ZeroCapSusceptance");
1343 
1344  SwitchingData swData;
1345  auto switchingList = electricalProp->first_node("SwitchingList");
1346  if(!switchingList) return false;
1347  auto swNode = switchingList->first_node("Switching");
1348  while(swNode) {
1349  swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type"));
1350  swData.swTime.push_back(GetNodeValueDouble(swNode, "Time"));
1351  swNode = swNode->next_sibling("Switching");
1352  }
1353  line->SetSwitchingData(swData);
1354 
1355  line->SetElectricalData(data);
1356 
1357  if(swData.swTime.size() != 0) line->SetDynamicEvent(true);
1358 
1359  elementList.push_back(line);
1360  lineList.push_back(line);
1361  lineNode = lineNode->next_sibling("Line");
1362  } //}
1363 
1364  //{ Load
1365  auto loadListNode = elementsNode->first_node("LoadList");
1366  if(!loadListNode) return false;
1367  auto loadNode = loadListNode->first_node("Load");
1368  while(loadNode) {
1369  Load* load = new Load();
1370 
1371  auto cadPropNode = loadNode->first_node("CADProperties");
1372  if(!cadPropNode) return false;
1373 
1374  auto position = cadPropNode->first_node("Position");
1375  double posX = GetNodeValueDouble(position, "X");
1376  double posY = GetNodeValueDouble(position, "Y");
1377  auto size = cadPropNode->first_node("Size");
1378  double width = GetNodeValueDouble(size, "Width");
1379  double height = GetNodeValueDouble(size, "Height");
1380  double angle = GetNodeValueDouble(cadPropNode, "Angle");
1381  auto nodePosition = cadPropNode->first_node("NodePosition");
1382  double nodePosX = GetNodeValueDouble(nodePosition, "X");
1383  double nodePosY = GetNodeValueDouble(nodePosition, "Y");
1384  int parentID = GetNodeValueInt(cadPropNode, "ParentID");
1385  if(parentID == -1) {
1386  // If the element has no parent, create a temporary one, remove and delete.
1387  Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY));
1388  load->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1389  load->StartMove(load->GetPosition());
1390  load->Move(wxPoint2DDouble(posX, posY));
1391  load->RemoveParent(parent);
1392  delete parent;
1393  } else {
1394  Bus* parent = busList[parentID];
1395  load->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1396  load->StartMove(load->GetPosition());
1397  load->Move(wxPoint2DDouble(posX, posY));
1398  }
1399  load->SetWidth(width);
1400  load->SetHeight(height);
1401 
1402  int numRot = angle / load->GetRotationAngle();
1403  bool clockwise = true;
1404  if(numRot < 0) {
1405  numRot = std::abs(numRot);
1406  clockwise = false;
1407  }
1408  for(int i = 0; i < numRot; i++) load->Rotate(clockwise);
1409 
1410  auto electricalProp = loadNode->first_node("ElectricalProperties");
1411  if(!electricalProp) return false;
1412 
1413  load->SetOnline(GetNodeValueInt(electricalProp, "IsOnline"));
1414  LoadElectricalData data = load->GetElectricalData();
1415  data.name = electricalProp->first_node("Name")->value();
1416  data.activePower = GetNodeValueDouble(electricalProp, "ActivePower");
1417  data.activePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ActivePower", "UnitID");
1418  data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower");
1419  data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID");
1420  data.loadType = (LoadType)GetNodeValueInt(electricalProp, "LoadType");
1421  // Stability
1422  auto stability = electricalProp->first_node("Stability");
1423  if(stability) {
1424  data.plotLoad = GetNodeValueInt(stability, "PlotLoad");
1425  data.useCompLoad = GetNodeValueInt(stability, "UseCompositeLoad");
1426  auto activePowerComp = stability->first_node("ActivePowerComposition");
1427  data.constImpedanceActive = GetNodeValueDouble(activePowerComp, "ConstantImpedance");
1428  data.constCurrentActive = GetNodeValueDouble(activePowerComp, "ConstantCurrent");
1429  data.constPowerActive = GetNodeValueDouble(activePowerComp, "ConstantPower");
1430  auto reactivePowerComp = stability->first_node("ReactivePowerComposition");
1431  data.constImpedanceReactive = GetNodeValueDouble(reactivePowerComp, "ConstantImpedance");
1432  data.constCurrentReactive = GetNodeValueDouble(reactivePowerComp, "ConstantCurrent");
1433  data.constPowerReactive = GetNodeValueDouble(reactivePowerComp, "ConstantPower");
1434  }
1435 
1436  SwitchingData swData;
1437  auto switchingList = electricalProp->first_node("SwitchingList");
1438  if(!switchingList) return false;
1439  auto swNode = switchingList->first_node("Switching");
1440  while(swNode) {
1441  swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type"));
1442  swData.swTime.push_back(GetNodeValueDouble(swNode, "Time"));
1443  swNode = swNode->next_sibling("Switching");
1444  }
1445  load->SetSwitchingData(swData);
1446 
1447  load->SetElectricalData(data);
1448 
1449  if(swData.swTime.size() != 0) load->SetDynamicEvent(true);
1450 
1451  elementList.push_back(load);
1452  loadList.push_back(load);
1453  loadNode = loadNode->next_sibling("Load");
1454  } //}
1455 
1456  //{ SyncGenerator
1457  auto syncGeneratorListNode = elementsNode->first_node("SyncGeneratorList");
1458  if(!syncGeneratorListNode) return false;
1459  auto syncGeneratorNode = syncGeneratorListNode->first_node("SyncGenerator");
1460  while(syncGeneratorNode) {
1461  SyncGenerator* syncGenerator = new SyncGenerator();
1462 
1463  auto cadPropNode = syncGeneratorNode->first_node("CADProperties");
1464  if(!cadPropNode) return false;
1465 
1466  auto position = cadPropNode->first_node("Position");
1467  double posX = GetNodeValueDouble(position, "X");
1468  double posY = GetNodeValueDouble(position, "Y");
1469  auto size = cadPropNode->first_node("Size");
1470  double width = GetNodeValueDouble(size, "Width");
1471  double height = GetNodeValueDouble(size, "Height");
1472  double angle = GetNodeValueDouble(cadPropNode, "Angle");
1473  auto nodePosition = cadPropNode->first_node("NodePosition");
1474  double nodePosX = GetNodeValueDouble(nodePosition, "X");
1475  double nodePosY = GetNodeValueDouble(nodePosition, "Y");
1476  int parentID = GetNodeValueInt(cadPropNode, "ParentID");
1477  if(parentID == -1) {
1478  // If the element has no parent, create a temporary one, remove and delete.
1479  Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY));
1480  syncGenerator->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1481  syncGenerator->StartMove(syncGenerator->GetPosition());
1482  syncGenerator->Move(wxPoint2DDouble(posX, posY));
1483  syncGenerator->RemoveParent(parent);
1484  delete parent;
1485  } else {
1486  Bus* parent = busList[parentID];
1487  syncGenerator->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1488  syncGenerator->StartMove(syncGenerator->GetPosition());
1489  syncGenerator->Move(wxPoint2DDouble(posX, posY));
1490  }
1491  syncGenerator->SetWidth(width);
1492  syncGenerator->SetHeight(height);
1493 
1494  int numRot = angle / syncGenerator->GetRotationAngle();
1495  bool clockwise = true;
1496  if(numRot < 0) {
1497  numRot = std::abs(numRot);
1498  clockwise = false;
1499  }
1500  for(int i = 0; i < numRot; i++) syncGenerator->Rotate(clockwise);
1501 
1502  auto electricalProp = syncGeneratorNode->first_node("ElectricalProperties");
1503  if(!electricalProp) return false;
1504 
1505  syncGenerator->SetOnline(GetNodeValueInt(electricalProp, "IsOnline"));
1506  SyncGeneratorElectricalData data = syncGenerator->GetElectricalData();
1507  data.name = electricalProp->first_node("Name")->value();
1508  data.nominalPower = GetNodeValueDouble(electricalProp, "NominalPower");
1509  data.nominalPowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalPower", "UnitID");
1510  data.nominalVoltage = GetNodeValueDouble(electricalProp, "NominalVoltage");
1511  data.nominalVoltageUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID");
1512  data.activePower = GetNodeValueDouble(electricalProp, "ActivePower");
1513  data.activePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ActivePower", "UnitID");
1514  data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower");
1515  data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID");
1516  data.haveMaxReactive = GetNodeValueInt(electricalProp, "HaveMaxReactive");
1517  data.maxReactive = GetNodeValueDouble(electricalProp, "MaxReactive");
1518  data.maxReactiveUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "MaxReactive", "UnitID");
1519  data.haveMinReactive = GetNodeValueInt(electricalProp, "HaveMinReactive");
1520  data.minReactive = GetNodeValueDouble(electricalProp, "MinReactive");
1521  data.minReactiveUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "MinReactive", "UnitID");
1522  data.useMachineBase = GetNodeValueInt(electricalProp, "UseMachineBase");
1523 
1524  auto fault = electricalProp->first_node("Fault");
1525  if(!fault) return false;
1526  data.positiveResistance = GetNodeValueDouble(fault, "PositiveResistance");
1527  data.positiveReactance = GetNodeValueDouble(fault, "PositiveReactance");
1528  data.negativeResistance = GetNodeValueDouble(fault, "NegativeResistance");
1529  data.negativeReactance = GetNodeValueDouble(fault, "NegativeReactance");
1530  data.zeroResistance = GetNodeValueDouble(fault, "ZeroResistance");
1531  data.zeroReactance = GetNodeValueDouble(fault, "ZeroReactance");
1532  data.groundResistance = GetNodeValueDouble(fault, "GroundResistance");
1533  data.groundReactance = GetNodeValueDouble(fault, "GroundReactance");
1534  data.groundNeutral = GetNodeValueInt(fault, "GroundNeutral");
1535 
1536  auto stability = electricalProp->first_node("Stability");
1537  if(!stability) return false;
1538  data.plotSyncMachine = GetNodeValueInt(stability, "PlotSyncMachine");
1539  data.inertia = GetNodeValueDouble(stability, "Inertia");
1540  data.damping = GetNodeValueDouble(stability, "Damping");
1541  data.useAVR = GetNodeValueInt(stability, "UseAVR");
1542  data.useSpeedGovernor = GetNodeValueInt(stability, "UseSpeedGovernor");
1543  data.armResistance = GetNodeValueDouble(stability, "ArmResistance");
1544  data.potierReactance = GetNodeValueDouble(stability, "PotierReactance");
1545  data.satFactor = GetNodeValueDouble(stability, "SatFactor");
1546  data.syncXd = GetNodeValueDouble(stability, "SyncXd");
1547  data.syncXq = GetNodeValueDouble(stability, "SyncXq");
1548  data.transXd = GetNodeValueDouble(stability, "TransXd");
1549  data.transXq = GetNodeValueDouble(stability, "TransXq");
1550  data.transTd0 = GetNodeValueDouble(stability, "TransTd0");
1551  data.transTq0 = GetNodeValueDouble(stability, "TransTq0");
1552  data.subXd = GetNodeValueDouble(stability, "SubXd");
1553  data.subXq = GetNodeValueDouble(stability, "SubXq");
1554  data.subTd0 = GetNodeValueDouble(stability, "SubTd0");
1555  data.subTq0 = GetNodeValueDouble(stability, "SubTq0");
1556 
1557  auto avr = stability->first_node("AVR");
1558  if(!avr) return false;
1559  if(!OpenControlElements(doc, avr, data.avr)) return false;
1560 
1561  auto speedGov = stability->first_node("SpeedGovernor");
1562  if(!speedGov) return false;
1563  if(!OpenControlElements(doc, speedGov, data.speedGov)) return false;
1564 
1565  SwitchingData swData;
1566  auto switchingList = electricalProp->first_node("SwitchingList");
1567  if(!switchingList) return false;
1568  auto swNode = switchingList->first_node("Switching");
1569  while(swNode) {
1570  swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type"));
1571  swData.swTime.push_back(GetNodeValueDouble(swNode, "Time"));
1572  swNode = swNode->next_sibling("Switching");
1573  }
1574  syncGenerator->SetSwitchingData(swData);
1575 
1576  syncGenerator->SetElectricalData(data);
1577 
1578  if(swData.swTime.size() != 0) syncGenerator->SetDynamicEvent(true);
1579 
1580  elementList.push_back(syncGenerator);
1581  syncGeneratorList.push_back(syncGenerator);
1582  syncGeneratorNode = syncGeneratorNode->next_sibling("SyncGenerator");
1583  } //}
1584 
1585  //{ SyncMotor
1586  auto syncMotorListNode = elementsNode->first_node("SyncMotorList");
1587  if(!syncMotorListNode) return false;
1588  auto syncMotorNode = syncMotorListNode->first_node("SyncMotor");
1589  while(syncMotorNode) {
1590  SyncMotor* syncMotor = new SyncMotor();
1591 
1592  auto cadPropNode = syncMotorNode->first_node("CADProperties");
1593  if(!cadPropNode) return false;
1594 
1595  auto position = cadPropNode->first_node("Position");
1596  double posX = GetNodeValueDouble(position, "X");
1597  double posY = GetNodeValueDouble(position, "Y");
1598  auto size = cadPropNode->first_node("Size");
1599  double width = GetNodeValueDouble(size, "Width");
1600  double height = GetNodeValueDouble(size, "Height");
1601  double angle = GetNodeValueDouble(cadPropNode, "Angle");
1602  auto nodePosition = cadPropNode->first_node("NodePosition");
1603  double nodePosX = GetNodeValueDouble(nodePosition, "X");
1604  double nodePosY = GetNodeValueDouble(nodePosition, "Y");
1605  int parentID = GetNodeValueInt(cadPropNode, "ParentID");
1606  if(parentID == -1) {
1607  // If the element has no parent, create a temporary one, remove and delete.
1608  Bus* parent = new Bus(wxPoint2DDouble(nodePosX, nodePosY));
1609  syncMotor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1610  syncMotor->StartMove(syncMotor->GetPosition());
1611  syncMotor->Move(wxPoint2DDouble(posX, posY));
1612  syncMotor->RemoveParent(parent);
1613  delete parent;
1614  } else {
1615  Bus* parent = busList[parentID];
1616  syncMotor->AddParent(parent, wxPoint2DDouble(nodePosX, nodePosY));
1617  syncMotor->StartMove(syncMotor->GetPosition());
1618  syncMotor->Move(wxPoint2DDouble(posX, posY));
1619  }
1620  syncMotor->SetWidth(width);
1621  syncMotor->SetHeight(height);
1622 
1623  int numRot = angle / syncMotor->GetRotationAngle();
1624  bool clockwise = true;
1625  if(numRot < 0) {
1626  numRot = std::abs(numRot);
1627  clockwise = false;
1628  }
1629  for(int i = 0; i < numRot; i++) syncMotor->Rotate(clockwise);
1630 
1631  auto electricalProp = syncMotorNode->first_node("ElectricalProperties");
1632  if(!electricalProp) return false;
1633 
1634  syncMotor->SetOnline(GetNodeValueInt(electricalProp, "IsOnline"));
1635  SyncMotorElectricalData data = syncMotor->GetElectricalData();
1636  data.name = electricalProp->first_node("Name")->value();
1637  data.nominalPower = GetNodeValueDouble(electricalProp, "NominalPower");
1638  data.nominalPowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalPower", "UnitID");
1639  // data.nominalVoltage = GetNodeValueDouble(electricalProp, "NominalVoltage");
1640  // data.nominalVoltageUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalVoltage", "UnitID");
1641  data.activePower = GetNodeValueDouble(electricalProp, "ActivePower");
1642  data.activePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ActivePower", "UnitID");
1643  data.reactivePower = GetNodeValueDouble(electricalProp, "ReactivePower");
1644  data.reactivePowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "ReactivePower", "UnitID");
1645  data.haveMaxReactive = GetNodeValueInt(electricalProp, "HaveMaxReactive");
1646  data.maxReactive = GetNodeValueDouble(electricalProp, "MaxReactive");
1647  data.maxReactiveUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "MaxReactive", "UnitID");
1648  data.haveMinReactive = GetNodeValueInt(electricalProp, "HaveMinReactive");
1649  data.minReactive = GetNodeValueDouble(electricalProp, "MinReactive");
1650  data.minReactiveUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "MinReactive", "UnitID");
1651  data.useMachineBase = GetNodeValueInt(electricalProp, "UseMachineBase");
1652 
1653  auto fault = electricalProp->first_node("Fault");
1654  if(!fault) return false;
1655  data.positiveResistance = GetNodeValueDouble(fault, "PositiveResistance");
1656  data.positiveReactance = GetNodeValueDouble(fault, "PositiveReactance");
1657  data.negativeResistance = GetNodeValueDouble(fault, "NegativeResistance");
1658  data.negativeReactance = GetNodeValueDouble(fault, "NegativeReactance");
1659  data.zeroResistance = GetNodeValueDouble(fault, "ZeroResistance");
1660  data.zeroReactance = GetNodeValueDouble(fault, "ZeroReactance");
1661  data.groundResistance = GetNodeValueDouble(fault, "GroundResistance");
1662  data.groundReactance = GetNodeValueDouble(fault, "GroundReactance");
1663  data.groundNeutral = GetNodeValueInt(fault, "GroundNeutral");
1664 
1665  /*SwitchingData swData;
1666  auto switchingList = electricalProp->first_node("SwitchingList");
1667  if(!switchingList) return false;
1668  auto swNode = switchingList->first_node("Switching");
1669  while(swNode) {
1670  swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type"));
1671  swData.swTime.push_back(GetNodeValueDouble(swNode, "Time"));
1672  swNode = swNode->next_sibling("Switching");
1673  }
1674  syncMotor->SetSwitchingData(swData);*/
1675 
1676  syncMotor->SetElectricalData(data);
1677  elementList.push_back(syncMotor);
1678  syncMotorList.push_back(syncMotor);
1679  syncMotorNode = syncMotorNode->next_sibling("SyncMotor");
1680  } //}
1681 
1682  //{ Transformer
1683  auto transformerListNode = elementsNode->first_node("TransformerList");
1684  if(!transformerListNode) return false;
1685  auto transfomerNode = transformerListNode->first_node("Transfomer");
1686  while(transfomerNode) {
1687  Transformer* transformer = new Transformer();
1688 
1689  auto cadPropNode = transfomerNode->first_node("CADProperties");
1690  if(!cadPropNode) return false;
1691 
1692  auto position = cadPropNode->first_node("Position");
1693  double posX = GetNodeValueDouble(position, "X");
1694  double posY = GetNodeValueDouble(position, "Y");
1695  auto size = cadPropNode->first_node("Size");
1696  double width = GetNodeValueDouble(size, "Width");
1697  double height = GetNodeValueDouble(size, "Height");
1698  double angle = GetNodeValueDouble(cadPropNode, "Angle");
1699 
1700  // Get nodes points
1701  std::vector<wxPoint2DDouble> ptsList;
1702  auto nodePosList = cadPropNode->first_node("NodeList");
1703  if(!nodePosList) return false;
1704  auto nodePos = nodePosList->first_node("Node");
1705  while(nodePos) {
1706  double nodePosX = GetNodeValueDouble(nodePos, "X");
1707  double nodePosY = GetNodeValueDouble(nodePos, "Y");
1708  ptsList.push_back(wxPoint2DDouble(nodePosX, nodePosY));
1709  nodePos = nodePos->next_sibling("Node");
1710  }
1711 
1712  // Get parents IDs
1713  auto parentIDList = cadPropNode->first_node("ParentIDList");
1714  if(!parentIDList) return false;
1715  auto parentNode = parentIDList->first_node("ParentID");
1716  long parentID[2] = {-1, -1};
1717  while(parentNode) {
1718  long index = 0;
1719  wxString(parentNode->first_attribute("ID")->value()).ToLong(&index);
1720  wxString(parentNode->value()).ToCLong(&parentID[index]);
1721  parentNode = parentNode->next_sibling("ParentID");
1722  }
1723 
1724  // Set parents (if have)
1725  Bus *parent1, *parent2;
1726  if(parentID[0] == -1) {
1727  parent1 = new Bus(ptsList[0]);
1728  transformer->AddParent(parent1, ptsList[0]);
1729  } else {
1730  parent1 = busList[parentID[0]];
1731  transformer->AddParent(parent1, ptsList[0]);
1732  }
1733  if(parentID[1] == -1) {
1734  parent2 = new Bus(ptsList[ptsList.size() - 1]);
1735  transformer->AddParent(parent2, ptsList[ptsList.size() - 1]);
1736  } else {
1737  parent2 = busList[parentID[1]];
1738  transformer->AddParent(parent2, ptsList[ptsList.size() - 1]);
1739  }
1740 
1741  transformer->StartMove(transformer->GetPosition());
1742  transformer->Move(wxPoint2DDouble(posX, posY));
1743 
1744  if(parentID[0] == -1) {
1745  transformer->RemoveParent(parent1);
1746  delete parent1;
1747  }
1748  if(parentID[1] == -1) {
1749  transformer->RemoveParent(parent2);
1750  delete parent2;
1751  }
1752 
1753  transformer->SetWidth(width);
1754  transformer->SetHeight(height);
1755 
1756  int numRot = angle / transformer->GetRotationAngle();
1757  bool clockwise = true;
1758  if(numRot < 0) {
1759  numRot = std::abs(numRot);
1760  clockwise = false;
1761  }
1762  for(int i = 0; i < numRot; i++) transformer->Rotate(clockwise);
1763 
1764  auto electricalProp = transfomerNode->first_node("ElectricalProperties");
1765  if(!electricalProp) return false;
1766 
1767  transformer->SetOnline(GetNodeValueInt(electricalProp, "IsOnline"));
1768  TransformerElectricalData data = transformer->GetElectricalData();
1769  data.name = electricalProp->first_node("Name")->value();
1770  data.primaryNominalVoltage = GetNodeValueDouble(electricalProp, "PrimaryNominalVoltage");
1771  data.primaryNominalVoltageUnit =
1772  (ElectricalUnit)GetAttributeValueInt(electricalProp, "PrimaryNominalVoltage", "UnitID");
1773  data.secondaryNominalVoltage = GetNodeValueDouble(electricalProp, "SecondaryNominalVoltage");
1774  data.secondaryNominalVoltageUnit =
1775  (ElectricalUnit)GetAttributeValueInt(electricalProp, "SecondaryNominalVoltage", "UnitID");
1776  data.nominalPower = GetNodeValueDouble(electricalProp, "NominalPower");
1777  data.nominalPowerUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "NominalPower", "UnitID");
1778  data.resistance = GetNodeValueDouble(electricalProp, "Resistance");
1779  data.resistanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "Resistance", "UnitID");
1780  data.indReactance = GetNodeValueDouble(electricalProp, "IndReactance");
1781  data.indReactanceUnit = (ElectricalUnit)GetAttributeValueInt(electricalProp, "IndReactance", "UnitID");
1782  data.connection = (TransformerConnection)GetNodeValueInt(electricalProp, "Connection");
1783  data.turnsRatio = GetNodeValueDouble(electricalProp, "TurnsRatio");
1784  data.phaseShift = GetNodeValueDouble(electricalProp, "PhaseShift");
1785  data.useTransformerPower = GetNodeValueInt(electricalProp, "UseTransfomerPower");
1786 
1787  auto fault = electricalProp->first_node("Fault");
1788  data.zeroResistance = GetNodeValueDouble(fault, "ZeroResistance");
1789  data.zeroIndReactance = GetNodeValueDouble(fault, "ZeroIndReactance");
1790  data.primaryGrndResistance = GetNodeValueDouble(fault, "PrimaryGrndResistance");
1791  data.primaryGrndReactance = GetNodeValueDouble(fault, "PrimaryGrndReactance");
1792  data.secondaryGrndResistance = GetNodeValueDouble(fault, "SecondaryGrndResistance");
1793  data.secondaryGrndReactance = GetNodeValueDouble(fault, "SecondaryGrndReactance");
1794 
1795  SwitchingData swData;
1796  auto switchingList = electricalProp->first_node("SwitchingList");
1797  if(!switchingList) return false;
1798  auto swNode = switchingList->first_node("Switching");
1799  while(swNode) {
1800  swData.swType.push_back((SwitchingType)GetNodeValueInt(swNode, "Type"));
1801  swData.swTime.push_back(GetNodeValueDouble(swNode, "Time"));
1802  swNode = swNode->next_sibling("Switching");
1803  }
1804  transformer->SetSwitchingData(swData);
1805 
1806  transformer->SetElectricaData(data);
1807 
1808  if(swData.swTime.size() != 0) transformer->SetDynamicEvent(true);
1809 
1810  elementList.push_back(transformer);
1811  transformerList.push_back(transformer);
1812  transfomerNode = transfomerNode->next_sibling("Transfomer");
1813  } //}
1814 
1815  m_workspace->SetElementList(elementList);
1816 
1817  //{ Text
1818  auto textListNode = elementsNode->first_node("TextList");
1819  if(!textListNode) return false;
1820  auto textNode = textListNode->first_node("Text");
1821  while(textNode) {
1822  auto cadPropNode = textNode->first_node("CADProperties");
1823  if(!cadPropNode) return false;
1824 
1825  auto position = cadPropNode->first_node("Position");
1826  double posX = GetNodeValueDouble(position, "X");
1827  double posY = GetNodeValueDouble(position, "Y");
1828  auto size = cadPropNode->first_node("Size");
1829  double width = GetNodeValueDouble(size, "Width");
1830  double height = GetNodeValueDouble(size, "Height");
1831  double angle = GetNodeValueDouble(cadPropNode, "Angle");
1832 
1833  Text* text = new Text(wxPoint2DDouble(posX, posY));
1834 
1835  text->SetWidth(width);
1836  text->SetHeight(height);
1837 
1838  auto textProperties = textNode->first_node("TextProperties");
1839  if(!textProperties) return false;
1840 
1841  text->SetElementType((ElementType)GetNodeValueDouble(textProperties, "ElementType"));
1842  text->SetDataType((DataType)GetNodeValueDouble(textProperties, "DataType"));
1843  text->SetUnit((ElectricalUnit)GetNodeValueDouble(textProperties, "DataUnit"));
1844  text->SetDirection(GetNodeValueDouble(textProperties, "Direction"));
1845  text->SetDecimalPlaces(GetNodeValueDouble(textProperties, "DecimalPlaces"));
1846 
1847  text->SetElementNumber(GetNodeValueInt(textProperties, "ElementNumber"));
1848  switch(text->GetElementType()) {
1849  case TYPE_NONE:
1850  break;
1851  case TYPE_BUS: {
1852  Bus* bus = busList[text->GetElementNumber()];
1853  text->SetElement(bus);
1854  } break;
1855  case TYPE_CAPACITOR: {
1856  Capacitor* capacitor = capacitorList[text->GetElementNumber()];
1857  text->SetElement(capacitor);
1858  } break;
1859  case TYPE_IND_MOTOR: {
1860  IndMotor* indMotor = indMotorList[text->GetElementNumber()];
1861  text->SetElement(indMotor);
1862  } break;
1863  case TYPE_INDUCTOR: {
1864  Inductor* inductor = inductorList[text->GetElementNumber()];
1865  text->SetElement(inductor);
1866  } break;
1867  case TYPE_LINE: {
1868  Line* line = lineList[text->GetElementNumber()];
1869  text->SetElement(line);
1870  } break;
1871  case TYPE_LOAD: {
1872  Load* load = loadList[text->GetElementNumber()];
1873  text->SetElement(load);
1874  } break;
1875  case TYPE_SYNC_GENERATOR: {
1876  SyncGenerator* syncGenerator = syncGeneratorList[text->GetElementNumber()];
1877  text->SetElement(syncGenerator);
1878  } break;
1879  case TYPE_SYNC_MOTOR: {
1880  SyncMotor* syncMotor = syncMotorList[text->GetElementNumber()];
1881  text->SetElement(syncMotor);
1882  } break;
1883  case TYPE_TRANSFORMER: {
1884  Transformer* transformer = transformerList[text->GetElementNumber()];
1885  text->SetElement(transformer);
1886  } break;
1887  }
1888 
1889  int numRot = angle / text->GetRotationAngle();
1890  bool clockwise = true;
1891  if(numRot < 0) {
1892  numRot = std::abs(numRot);
1893  clockwise = false;
1894  }
1895  for(int i = 0; i < numRot; i++) text->Rotate(clockwise);
1896 
1897  textList.push_back(text);
1898  textNode = textNode->next_sibling("Text");
1899  } //}
1900 
1901  m_workspace->SetTextList(textList);
1902  return true;
1903 }
1904 
1905 void FileHanding::SaveControl(wxFileName path)
1906 {
1907  // Same process present in SaveProject():
1908  std::ofstream writeProjectsFile(path.GetFullPath());
1909  writeProjectsFile.close();
1910 
1911  rapidxml::xml_document<> doc;
1912  rapidxml::file<> xmlFile(path.GetFullPath().mb_str());
1913  doc.parse<0>(xmlFile.data());
1914 
1915  rapidxml::xml_node<>* decl = doc.allocate_node(rapidxml::node_declaration);
1916  rapidxml::xml_attribute<>* ver = doc.allocate_attribute("version", "1.0");
1917  rapidxml::xml_attribute<>* encoding = doc.allocate_attribute("encoding", "utf-8");
1918  decl->append_attribute(ver);
1919  decl->append_attribute(encoding);
1920  doc.append_node(decl);
1921 
1922  rapidxml::xml_node<>* rootNode = doc.allocate_node(rapidxml::node_element, "Control");
1923  doc.append_node(rootNode);
1924 
1925  rapidxml::xml_node<>* projectNameNode = AppendNode(doc, rootNode, "Name");
1926  SetNodeValue(doc, projectNameNode, path.GetName());
1927 
1928  auto elementsNode = AppendNode(doc, rootNode, "ControlElements");
1929  SaveControlElements(doc, elementsNode);
1930  std::ofstream writeXML(path.GetFullPath());
1931  writeXML << doc;
1932  writeXML.close();
1933 }
1934 
1935 bool FileHanding::OpenControl(wxFileName path,
1936  std::vector<ControlElement*>& ctrlElementList,
1937  std::vector<ConnectionLine*>& ctrlConnectionList)
1938 {
1939  rapidxml::xml_document<> doc;
1940  rapidxml::file<> xmlFile(path.GetFullPath().mb_str());
1941 
1942  doc.parse<0>(xmlFile.data());
1943 
1944  auto projectNode = doc.first_node("Control");
1945  if(!projectNode) return false;
1946  // auto nameNode = projectNode->first_node("Name");
1947  // if(!nameNode) return false;
1948  // m_controlEditor->SetName(nameNode->value());
1949 
1950  // Open elements
1951  auto elementsNode = projectNode->first_node("ControlElements");
1952  if(!elementsNode) return false;
1953 
1954  // auto elementsNode = AppendNode(doc, rootNode, "ControlElements");
1955  ControlElementContainer* ctrlElementContainer = new ControlElementContainer();
1956  if(!OpenControlElements(doc, elementsNode, ctrlElementContainer)) return false;
1957  ctrlElementList = ctrlElementContainer->GetControlElementsList();
1958  ctrlConnectionList = ctrlElementContainer->GetConnectionLineList();
1959  return true;
1960 }
1961 
1962 void FileHanding::SaveControlElements(rapidxml::xml_document<>& doc,
1963  rapidxml::xml_node<>* elementsNode,
1964  ControlElementContainer* ctrlContainer)
1965 {
1966  if(!ctrlContainer) {
1967  ctrlContainer = new ControlElementContainer();
1968  ctrlContainer->FillContainer(m_controlEditor);
1969  }
1970 
1971  //{ Constant
1972  auto constsNode = AppendNode(doc, elementsNode, "ConstantList");
1973  auto constList = ctrlContainer->GetConstantList();
1974  for(auto it = constList.begin(), itEnd = constList.end(); it != itEnd; ++it) {
1975  Constant* constant = *it;
1976  auto constNode = AppendNode(doc, constsNode, "Constant");
1977  SetNodeAttribute(doc, constNode, "ID", constant->GetID());
1978  auto cadProp = AppendNode(doc, constNode, "CADProperties");
1979  auto position = AppendNode(doc, cadProp, "Position");
1980  auto posX = AppendNode(doc, position, "X");
1981  SetNodeValue(doc, posX, constant->GetPosition().m_x);
1982  auto posY = AppendNode(doc, position, "Y");
1983  SetNodeValue(doc, posY, constant->GetPosition().m_y);
1984  auto size = AppendNode(doc, cadProp, "Size");
1985  auto width = AppendNode(doc, size, "Width");
1986  SetNodeValue(doc, width, constant->GetWidth());
1987  auto height = AppendNode(doc, size, "Height");
1988  SetNodeValue(doc, height, constant->GetHeight());
1989  auto angle = AppendNode(doc, cadProp, "Angle");
1990  SetNodeValue(doc, angle, constant->GetAngle());
1991 
1992  // Nodes
1993  auto nodeList = AppendNode(doc, constNode, "NodeList");
1994  SaveControlNodes(doc, nodeList, constant->GetNodeList());
1995 
1996  // Control properties
1997  auto value = AppendNode(doc, constNode, "Value");
1998  SetNodeValue(doc, value, constant->GetValue());
1999  } //}
2000 
2001  //{ Exponential
2002  auto expsNode = AppendNode(doc, elementsNode, "ExponentialList");
2003  auto expList = ctrlContainer->GetExponentialList();
2004  for(auto it = expList.begin(), itEnd = expList.end(); it != itEnd; ++it) {
2005  Exponential* exponential = *it;
2006  auto expNode = AppendNode(doc, expsNode, "Exponential");
2007  SetNodeAttribute(doc, expNode, "ID", exponential->GetID());
2008  auto cadProp = AppendNode(doc, expNode, "CADProperties");
2009  auto position = AppendNode(doc, cadProp, "Position");
2010  auto posX = AppendNode(doc, position, "X");
2011  SetNodeValue(doc, posX, exponential->GetPosition().m_x);
2012  auto posY = AppendNode(doc, position, "Y");
2013  SetNodeValue(doc, posY, exponential->GetPosition().m_y);
2014  auto size = AppendNode(doc, cadProp, "Size");
2015  auto width = AppendNode(doc, size, "Width");
2016  SetNodeValue(doc, width, exponential->GetWidth());
2017  auto height = AppendNode(doc, size, "Height");
2018  SetNodeValue(doc, height, exponential->GetHeight());
2019  auto angle = AppendNode(doc, cadProp, "Angle");
2020  SetNodeValue(doc, angle, exponential->GetAngle());
2021 
2022  // Nodes
2023  auto nodeList = AppendNode(doc, expNode, "NodeList");
2024  SaveControlNodes(doc, nodeList, exponential->GetNodeList());
2025 
2026  // Control properties
2027  double a, b;
2028  exponential->GetValues(a, b);
2029  auto value = AppendNode(doc, expNode, "Value");
2030  auto aValue = AppendNode(doc, value, "A");
2031  SetNodeValue(doc, aValue, a);
2032  auto bValue = AppendNode(doc, value, "B");
2033  SetNodeValue(doc, bValue, b);
2034  } //}
2035 
2036  //{ Gain
2037  auto gainsNode = AppendNode(doc, elementsNode, "GainList");
2038  auto gainList = ctrlContainer->GetGainList();
2039  for(auto it = gainList.begin(), itEnd = gainList.end(); it != itEnd; ++it) {
2040  Gain* gain = *it;
2041  auto gainNode = AppendNode(doc, gainsNode, "Gain");
2042  SetNodeAttribute(doc, gainNode, "ID", gain->GetID());
2043  auto cadProp = AppendNode(doc, gainNode, "CADProperties");
2044  auto position = AppendNode(doc, cadProp, "Position");
2045  auto posX = AppendNode(doc, position, "X");
2046  SetNodeValue(doc, posX, gain->GetPosition().m_x);
2047  auto posY = AppendNode(doc, position, "Y");
2048  SetNodeValue(doc, posY, gain->GetPosition().m_y);
2049  auto size = AppendNode(doc, cadProp, "Size");
2050  auto width = AppendNode(doc, size, "Width");
2051  SetNodeValue(doc, width, gain->GetWidth());
2052  auto height = AppendNode(doc, size, "Height");
2053  SetNodeValue(doc, height, gain->GetHeight());
2054  auto angle = AppendNode(doc, cadProp, "Angle");
2055  SetNodeValue(doc, angle, gain->GetAngle());
2056 
2057  // Nodes
2058  auto nodeList = AppendNode(doc, gainNode, "NodeList");
2059  SaveControlNodes(doc, nodeList, gain->GetNodeList());
2060 
2061  // Control properties
2062  auto value = AppendNode(doc, gainNode, "Value");
2063  SetNodeValue(doc, value, gain->GetValue());
2064  } //}
2065 
2066  //{ IO
2067  auto iosNode = AppendNode(doc, elementsNode, "IOList");
2068  auto ioList = ctrlContainer->GetIOControlList();
2069  for(auto it = ioList.begin(), itEnd = ioList.end(); it != itEnd; ++it) {
2070  IOControl* io = *it;
2071  auto ioNode = AppendNode(doc, iosNode, "IO");
2072  SetNodeAttribute(doc, ioNode, "ID", io->GetID());
2073  auto cadProp = AppendNode(doc, ioNode, "CADProperties");
2074  auto position = AppendNode(doc, cadProp, "Position");
2075  auto posX = AppendNode(doc, position, "X");
2076  SetNodeValue(doc, posX, io->GetPosition().m_x);
2077  auto posY = AppendNode(doc, position, "Y");
2078  SetNodeValue(doc, posY, io->GetPosition().m_y);
2079  auto size = AppendNode(doc, cadProp, "Size");
2080  auto width = AppendNode(doc, size, "Width");
2081  SetNodeValue(doc, width, io->GetWidth());
2082  auto height = AppendNode(doc, size, "Height");
2083  SetNodeValue(doc, height, io->GetHeight());
2084  auto angle = AppendNode(doc, cadProp, "Angle");
2085  SetNodeValue(doc, angle, io->GetAngle());
2086 
2087  // Nodes
2088  auto nodeList = AppendNode(doc, ioNode, "NodeList");
2089  SaveControlNodes(doc, nodeList, io->GetNodeList());
2090 
2091  // Control properties
2092  auto value = AppendNode(doc, ioNode, "Value");
2093  SetNodeValue(doc, value, io->GetValue());
2094  auto ioFlags = AppendNode(doc, ioNode, "IOFlags");
2095  SetNodeValue(doc, ioFlags, io->GetIOFlags());
2096  } //}
2097 
2098  //{ Limiter
2099  auto limitersNode = AppendNode(doc, elementsNode, "LimiterList");
2100  auto limiterList = ctrlContainer->GetLimiterList();
2101  for(auto it = limiterList.begin(), itEnd = limiterList.end(); it != itEnd; ++it) {
2102  Limiter* limiter = *it;
2103  auto limiterNode = AppendNode(doc, limitersNode, "Limiter");
2104  SetNodeAttribute(doc, limiterNode, "ID", limiter->GetID());
2105  auto cadProp = AppendNode(doc, limiterNode, "CADProperties");
2106  auto position = AppendNode(doc, cadProp, "Position");
2107  auto posX = AppendNode(doc, position, "X");
2108  SetNodeValue(doc, posX, limiter->GetPosition().m_x);
2109  auto posY = AppendNode(doc, position, "Y");
2110  SetNodeValue(doc, posY, limiter->GetPosition().m_y);
2111  auto size = AppendNode(doc, cadProp, "Size");
2112  auto width = AppendNode(doc, size, "Width");
2113  SetNodeValue(doc, width, limiter->GetWidth());
2114  auto height = AppendNode(doc, size, "Height");
2115  SetNodeValue(doc, height, limiter->GetHeight());
2116  auto angle = AppendNode(doc, cadProp, "Angle");
2117  SetNodeValue(doc, angle, limiter->GetAngle());
2118 
2119  // Nodes
2120  auto nodeList = AppendNode(doc, limiterNode, "NodeList");
2121  SaveControlNodes(doc, nodeList, limiter->GetNodeList());
2122 
2123  // Control properties
2124  auto upLimit = AppendNode(doc, limiterNode, "UpperLimit");
2125  SetNodeValue(doc, upLimit, limiter->GetUpLimit());
2126  auto lowLimit = AppendNode(doc, limiterNode, "LowerLimit");
2127  SetNodeValue(doc, lowLimit, limiter->GetLowLimit());
2128  } //}
2129 
2130  //{ Multiplier
2131  auto multipliersNode = AppendNode(doc, elementsNode, "MultiplierList");
2132  auto multiplierList = ctrlContainer->GetMultiplierList();
2133  for(auto it = multiplierList.begin(), itEnd = multiplierList.end(); it != itEnd; ++it) {
2134  Multiplier* multiplier = *it;
2135  auto multiplierNode = AppendNode(doc, multipliersNode, "Multiplier");
2136  SetNodeAttribute(doc, multiplierNode, "ID", multiplier->GetID());
2137  auto cadProp = AppendNode(doc, multiplierNode, "CADProperties");
2138  auto position = AppendNode(doc, cadProp, "Position");
2139  auto posX = AppendNode(doc, position, "X");
2140  SetNodeValue(doc, posX, multiplier->GetPosition().m_x);
2141  auto posY = AppendNode(doc, position, "Y");
2142  SetNodeValue(doc, posY, multiplier->GetPosition().m_y);
2143  auto size = AppendNode(doc, cadProp, "Size");
2144  auto width = AppendNode(doc, size, "Width");
2145  SetNodeValue(doc, width, multiplier->GetWidth());
2146  auto height = AppendNode(doc, size, "Height");
2147  SetNodeValue(doc, height, multiplier->GetHeight());
2148  auto angle = AppendNode(doc, cadProp, "Angle");
2149  SetNodeValue(doc, angle, multiplier->GetAngle());
2150 
2151  // Nodes
2152  auto nodeList = AppendNode(doc, multiplierNode, "NodeList");
2153  SaveControlNodes(doc, nodeList, multiplier->GetNodeList());
2154  } //}
2155 
2156  //{ Divider
2157  auto dividersNode = AppendNode(doc, elementsNode, "DividerList");
2158  auto dividersList = ctrlContainer->GetDividerList();
2159  for(auto it = dividersList.begin(), itEnd = dividersList.end(); it != itEnd; ++it) {
2160  Divider* divider = *it;
2161  auto dividerNode = AppendNode(doc, dividersNode, "Divider");
2162  SetNodeAttribute(doc, dividerNode, "ID", divider->GetID());
2163  auto cadProp = AppendNode(doc, dividerNode, "CADProperties");
2164  auto position = AppendNode(doc, cadProp, "Position");
2165  auto posX = AppendNode(doc, position, "X");
2166  SetNodeValue(doc, posX, divider->GetPosition().m_x);
2167  auto posY = AppendNode(doc, position, "Y");
2168  SetNodeValue(doc, posY, divider->GetPosition().m_y);
2169  auto size = AppendNode(doc, cadProp, "Size");
2170  auto width = AppendNode(doc, size, "Width");
2171  SetNodeValue(doc, width, divider->GetWidth());
2172  auto height = AppendNode(doc, size, "Height");
2173  SetNodeValue(doc, height, divider->GetHeight());
2174  auto angle = AppendNode(doc, cadProp, "Angle");
2175  SetNodeValue(doc, angle, divider->GetAngle());
2176 
2177  // Nodes
2178  auto nodeList = AppendNode(doc, dividerNode, "NodeList");
2179  SaveControlNodes(doc, nodeList, divider->GetNodeList());
2180  } //}
2181 
2182  //{ Rate limiter
2183  auto rateLimitersNode = AppendNode(doc, elementsNode, "RateLimiterList");
2184  auto rateLimiterList = ctrlContainer->GetRateLimiterList();
2185  for(auto it = rateLimiterList.begin(), itEnd = rateLimiterList.end(); it != itEnd; ++it) {
2186  RateLimiter* rateLimiter = *it;
2187  auto rateLimiterNode = AppendNode(doc, rateLimitersNode, "RateLimiter");
2188  SetNodeAttribute(doc, rateLimiterNode, "ID", rateLimiter->GetID());
2189  auto cadProp = AppendNode(doc, rateLimiterNode, "CADProperties");
2190  auto position = AppendNode(doc, cadProp, "Position");
2191  auto posX = AppendNode(doc, position, "X");
2192  SetNodeValue(doc, posX, rateLimiter->GetPosition().m_x);
2193  auto posY = AppendNode(doc, position, "Y");
2194  SetNodeValue(doc, posY, rateLimiter->GetPosition().m_y);
2195  auto size = AppendNode(doc, cadProp, "Size");
2196  auto width = AppendNode(doc, size, "Width");
2197  SetNodeValue(doc, width, rateLimiter->GetWidth());
2198  auto height = AppendNode(doc, size, "Height");
2199  SetNodeValue(doc, height, rateLimiter->GetHeight());
2200  auto angle = AppendNode(doc, cadProp, "Angle");
2201  SetNodeValue(doc, angle, rateLimiter->GetAngle());
2202 
2203  // Nodes
2204  auto nodeList = AppendNode(doc, rateLimiterNode, "NodeList");
2205  SaveControlNodes(doc, nodeList, rateLimiter->GetNodeList());
2206 
2207  // Control properties
2208  auto upLimit = AppendNode(doc, rateLimiterNode, "UpperLimit");
2209  SetNodeValue(doc, upLimit, rateLimiter->GetUpLimit());
2210  auto lowLimit = AppendNode(doc, rateLimiterNode, "LowerLimit");
2211  SetNodeValue(doc, lowLimit, rateLimiter->GetLowLimit());
2212  } //}
2213 
2214  //{ Sum
2215  auto sumsNode = AppendNode(doc, elementsNode, "SumList");
2216  auto sumList = ctrlContainer->GetSumList();
2217  for(auto it = sumList.begin(), itEnd = sumList.end(); it != itEnd; ++it) {
2218  Sum* sum = *it;
2219  auto sumNode = AppendNode(doc, sumsNode, "Sum");
2220  SetNodeAttribute(doc, sumNode, "ID", sum->GetID());
2221  auto cadProp = AppendNode(doc, sumNode, "CADProperties");
2222  auto position = AppendNode(doc, cadProp, "Position");
2223  auto posX = AppendNode(doc, position, "X");
2224  SetNodeValue(doc, posX, sum->GetPosition().m_x);
2225  auto posY = AppendNode(doc, position, "Y");
2226  SetNodeValue(doc, posY, sum->GetPosition().m_y);
2227  auto size = AppendNode(doc, cadProp, "Size");
2228  auto width = AppendNode(doc, size, "Width");
2229  SetNodeValue(doc, width, sum->GetWidth());
2230  auto height = AppendNode(doc, size, "Height");
2231  SetNodeValue(doc, height, sum->GetHeight());
2232  auto angle = AppendNode(doc, cadProp, "Angle");
2233  SetNodeValue(doc, angle, sum->GetAngle());
2234 
2235  // Nodes
2236  auto nodeList = AppendNode(doc, sumNode, "NodeList");
2237  SaveControlNodes(doc, nodeList, sum->GetNodeList());
2238 
2239  // Control properties
2240  auto signsNode = AppendNode(doc, sumNode, "Signs");
2241  auto signs = sum->GetSignalList();
2242  for(int i = 0; i < (int)signs.size(); ++i) {
2243  auto value = AppendNode(doc, signsNode, "Value");
2244  SetNodeValue(doc, value, static_cast<int>(signs[i]));
2245  }
2246 
2247  } //}
2248 
2249  //{ Transfer function
2250  auto tfsNode = AppendNode(doc, elementsNode, "TransferFunctionList");
2251  auto tfList = ctrlContainer->GetTFList();
2252  for(auto it = tfList.begin(), itEnd = tfList.end(); it != itEnd; ++it) {
2253  TransferFunction* tf = *it;
2254  auto tfNode = AppendNode(doc, tfsNode, "TransferFunction");
2255  SetNodeAttribute(doc, tfNode, "ID", tf->GetID());
2256  auto cadProp = AppendNode(doc, tfNode, "CADProperties");
2257  auto position = AppendNode(doc, cadProp, "Position");
2258  auto posX = AppendNode(doc, position, "X");
2259  SetNodeValue(doc, posX, tf->GetPosition().m_x);
2260  auto posY = AppendNode(doc, position, "Y");
2261  SetNodeValue(doc, posY, tf->GetPosition().m_y);
2262  auto size = AppendNode(doc, cadProp, "Size");
2263  auto width = AppendNode(doc, size, "Width");
2264  SetNodeValue(doc, width, tf->GetWidth());
2265  auto height = AppendNode(doc, size, "Height");
2266  SetNodeValue(doc, height, tf->GetHeight());
2267  auto angle = AppendNode(doc, cadProp, "Angle");
2268  SetNodeValue(doc, angle, tf->GetAngle());
2269 
2270  // Nodes
2271  auto nodeList = AppendNode(doc, tfNode, "NodeList");
2272  SaveControlNodes(doc, nodeList, tf->GetNodeList());
2273 
2274  // Control properties
2275  auto numeratorNode = AppendNode(doc, tfNode, "Numerator");
2276  auto numerator = tf->GetNumerator();
2277  for(int i = 0; i < (int)numerator.size(); ++i) {
2278  auto value = AppendNode(doc, numeratorNode, "Value");
2279  SetNodeValue(doc, value, numerator[i]);
2280  }
2281  auto denominatorNode = AppendNode(doc, tfNode, "Denominator");
2282  auto denominator = tf->GetDenominator();
2283  for(int i = 0; i < (int)denominator.size(); ++i) {
2284  auto value = AppendNode(doc, denominatorNode, "Value");
2285  SetNodeValue(doc, value, denominator[i]);
2286  }
2287  } //}
2288 
2289  //{ Connection line
2290  auto cLinesNode = AppendNode(doc, elementsNode, "ConnectionList");
2291  auto connLineList = ctrlContainer->GetConnectionLineList();
2292  for(auto it = connLineList.begin(), itEnd = connLineList.end(); it != itEnd; ++it) {
2293  ConnectionLine* cLine = *it;
2294  auto cLineNode = AppendNode(doc, cLinesNode, "Connection");
2295  SetNodeAttribute(doc, cLineNode, "ID", cLine->GetID());
2296 
2297  // CAD properties
2298  auto cadProp = AppendNode(doc, cLineNode, "CADProperties");
2299  auto offset = AppendNode(doc, cadProp, "Offset");
2300  SetNodeValue(doc, offset, cLine->GetOffset());
2301 
2302  // Parent list
2303  auto parentsNode = AppendNode(doc, cLineNode, "ParentList");
2304  auto parentList = cLine->GetParentList();
2305  int nodeIndex = 0;
2306  for(auto itP = parentList.begin(), itPEnd = parentList.end(); itP != itPEnd; ++itP) {
2307  Element* parent = *itP;
2308  auto parentNode = AppendNode(doc, parentsNode, "Parent");
2309  auto elementID = AppendNode(doc, parentNode, "ElementID");
2310  SetNodeValue(doc, elementID, parent->GetID());
2311  auto nodeID = AppendNode(doc, parentNode, "NodeID");
2312  SetNodeValue(doc, nodeID, cLine->GetNodeList()[nodeIndex]->GetID());
2313  nodeIndex++;
2314  }
2315 
2316  auto parentLine = AppendNode(doc, cLineNode, "ParentLine");
2317  if(cLine->GetParentLine()) {
2318  ConnectionLine* parent = cLine->GetParentLine();
2319  SetNodeAttribute(doc, parentLine, "ID", parent->GetID());
2320  } else {
2321  SetNodeAttribute(doc, parentLine, "ID", -1);
2322  }
2323  } //}
2324 }
2325 
2326 bool FileHanding::OpenControlElements(rapidxml::xml_document<>& doc,
2327  rapidxml::xml_node<>* elementsNode,
2328  ControlElementContainer* ctrlContainer)
2329 {
2330  std::vector<ControlElement*> elementList;
2331  std::vector<ConnectionLine*> connectionList;
2332 
2333  //{ Constant
2334  auto constListNode = elementsNode->first_node("ConstantList");
2335  if(constListNode) {
2336  auto constNode = constListNode->first_node("Constant");
2337  while(constNode) {
2338  int id = GetAttributeValueInt(constNode, "ID");
2339  Constant* constant = new Constant(id);
2340 
2341  auto cadPropNode = constNode->first_node("CADProperties");
2342  if(!cadPropNode) return false;
2343 
2344  auto position = cadPropNode->first_node("Position");
2345  double posX = GetNodeValueDouble(position, "X");
2346  double posY = GetNodeValueDouble(position, "Y");
2347  auto size = cadPropNode->first_node("Size");
2348  double width = GetNodeValueDouble(size, "Width");
2349  double height = GetNodeValueDouble(size, "Height");
2350  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2351 
2352  double value = GetNodeValueDouble(constNode, "Value");
2353 
2354  constant->SetWidth(width);
2355  constant->SetHeight(height);
2356  constant->SetAngle(angle);
2357  constant->SetPosition(wxPoint2DDouble(posX, posY));
2358  constant->StartMove(constant->GetPosition());
2359 
2360  constant->SetValue(value);
2361 
2362  std::vector<Node*> nodeVector;
2363  if(!OpenControlNodeList(constNode, nodeVector)) return false;
2364 
2365  constant->SetNodeList(nodeVector);
2366  constant->UpdatePoints();
2367  elementList.push_back(constant);
2368 
2369  constNode = constNode->next_sibling("Constant");
2370  }
2371  }
2372  //}
2373 
2374  //{ Exponential
2375  auto expListNode = elementsNode->first_node("ExponentialList");
2376  if(expListNode) {
2377  auto expNode = expListNode->first_node("Exponential");
2378  while(expNode) {
2379  int id = GetAttributeValueInt(expNode, "ID");
2380  Exponential* exponential = new Exponential(id);
2381 
2382  auto cadPropNode = expNode->first_node("CADProperties");
2383  if(!cadPropNode) return false;
2384 
2385  auto position = cadPropNode->first_node("Position");
2386  double posX = GetNodeValueDouble(position, "X");
2387  double posY = GetNodeValueDouble(position, "Y");
2388  auto size = cadPropNode->first_node("Size");
2389  double width = GetNodeValueDouble(size, "Width");
2390  double height = GetNodeValueDouble(size, "Height");
2391  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2392 
2393  auto value = expNode->first_node("Value");
2394  double a = GetNodeValueDouble(value, "A");
2395  double b = GetNodeValueDouble(value, "B");
2396 
2397  exponential->SetWidth(width);
2398  exponential->SetHeight(height);
2399  exponential->SetAngle(angle);
2400  exponential->SetPosition(wxPoint2DDouble(posX, posY));
2401  exponential->StartMove(exponential->GetPosition());
2402 
2403  exponential->SetValues(a, b);
2404 
2405  std::vector<Node*> nodeVector;
2406  if(!OpenControlNodeList(expNode, nodeVector)) return false;
2407 
2408  exponential->SetNodeList(nodeVector);
2409  exponential->UpdatePoints();
2410  elementList.push_back(exponential);
2411 
2412  expNode = expNode->next_sibling("Exponential");
2413  }
2414  }
2415  //}
2416 
2417  //{ Gain
2418  auto gainListNode = elementsNode->first_node("GainList");
2419  if(gainListNode) {
2420  auto gainNode = gainListNode->first_node("Gain");
2421  while(gainNode) {
2422  int id = GetAttributeValueInt(gainNode, "ID");
2423  Gain* gain = new Gain(id);
2424 
2425  auto cadPropNode = gainNode->first_node("CADProperties");
2426  if(!cadPropNode) return false;
2427 
2428  auto position = cadPropNode->first_node("Position");
2429  double posX = GetNodeValueDouble(position, "X");
2430  double posY = GetNodeValueDouble(position, "Y");
2431  auto size = cadPropNode->first_node("Size");
2432  double width = GetNodeValueDouble(size, "Width");
2433  double height = GetNodeValueDouble(size, "Height");
2434  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2435 
2436  double value = GetNodeValueDouble(gainNode, "Value");
2437 
2438  gain->SetWidth(width);
2439  gain->SetHeight(height);
2440  gain->SetAngle(angle);
2441  gain->SetPosition(wxPoint2DDouble(posX, posY));
2442  gain->SetValue(value);
2443  gain->StartMove(gain->GetPosition());
2444 
2445  std::vector<Node*> nodeVector;
2446  if(!OpenControlNodeList(gainNode, nodeVector)) return false;
2447 
2448  gain->SetNodeList(nodeVector);
2449  gain->UpdatePoints();
2450  elementList.push_back(gain);
2451 
2452  gainNode = gainNode->next_sibling("Gain");
2453  }
2454  }
2455  //}
2456 
2457  //{ IO
2458  auto ioListNode = elementsNode->first_node("IOList");
2459  if(ioListNode) {
2460  auto ioNode = ioListNode->first_node("IO");
2461  while(ioNode) {
2462  int id = GetAttributeValueInt(ioNode, "ID");
2463 
2464  auto cadPropNode = ioNode->first_node("CADProperties");
2465  if(!cadPropNode) return false;
2466 
2467  auto position = cadPropNode->first_node("Position");
2468  double posX = GetNodeValueDouble(position, "X");
2469  double posY = GetNodeValueDouble(position, "Y");
2470  auto size = cadPropNode->first_node("Size");
2471  double width = GetNodeValueDouble(size, "Width");
2472  double height = GetNodeValueDouble(size, "Height");
2473  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2474 
2475  std::vector<Node*> nodeVector;
2476  if(!OpenControlNodeList(ioNode, nodeVector)) return false;
2477 
2478  IOControl::IOFlags value = static_cast<IOControl::IOFlags>(GetNodeValueInt(ioNode, "Value"));
2479  int ioFlags = GetNodeValueInt(ioNode, "IOFlags");
2480 
2481  IOControl* io = new IOControl(ioFlags, id);
2482 
2483  io->SetWidth(width);
2484  io->SetHeight(height);
2485  io->SetAngle(angle);
2486  io->SetPosition(wxPoint2DDouble(posX, posY));
2487  io->SetValue(value);
2488  io->StartMove(io->GetPosition());
2489  io->SetNodeList(nodeVector);
2490  io->UpdatePoints();
2491  elementList.push_back(io);
2492 
2493  ioNode = ioNode->next_sibling("IO");
2494  }
2495  }
2496  //}
2497 
2498  //{ Limiter
2499  auto limiterListNode = elementsNode->first_node("LimiterList");
2500  if(limiterListNode) {
2501  auto limiterNode = limiterListNode->first_node("Limiter");
2502  while(limiterNode) {
2503  int id = GetAttributeValueInt(limiterNode, "ID");
2504  Limiter* limiter = new Limiter(id);
2505 
2506  auto cadPropNode = limiterNode->first_node("CADProperties");
2507  if(!cadPropNode) return false;
2508 
2509  auto position = cadPropNode->first_node("Position");
2510  double posX = GetNodeValueDouble(position, "X");
2511  double posY = GetNodeValueDouble(position, "Y");
2512  auto size = cadPropNode->first_node("Size");
2513  double width = GetNodeValueDouble(size, "Width");
2514  double height = GetNodeValueDouble(size, "Height");
2515  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2516 
2517  double upLimit = GetNodeValueDouble(limiterNode, "UpperLimit");
2518  double lowLimit = GetNodeValueDouble(limiterNode, "LowerLimit");
2519 
2520  std::vector<Node*> nodeVector;
2521  if(!OpenControlNodeList(limiterNode, nodeVector)) return false;
2522 
2523  limiter->SetWidth(width);
2524  limiter->SetHeight(height);
2525  limiter->SetAngle(angle);
2526  limiter->SetPosition(wxPoint2DDouble(posX, posY));
2527  limiter->SetUpLimit(upLimit);
2528  limiter->SetLowLimit(lowLimit);
2529 
2530  limiter->StartMove(limiter->GetPosition());
2531  limiter->SetNodeList(nodeVector);
2532  limiter->UpdatePoints();
2533  elementList.push_back(limiter);
2534 
2535  limiterNode = limiterNode->next_sibling("Limiter");
2536  }
2537  }
2538  //}
2539 
2540  //{ Multiplier
2541  auto multiplierListNode = elementsNode->first_node("MultiplierList");
2542  if(multiplierListNode) {
2543  auto multiplierNode = multiplierListNode->first_node("Multiplier");
2544  while(multiplierNode) {
2545  int id = GetAttributeValueInt(multiplierNode, "ID");
2546  Multiplier* multiplier = new Multiplier(id);
2547 
2548  auto cadPropNode = multiplierNode->first_node("CADProperties");
2549  if(!cadPropNode) return false;
2550 
2551  auto position = cadPropNode->first_node("Position");
2552  double posX = GetNodeValueDouble(position, "X");
2553  double posY = GetNodeValueDouble(position, "Y");
2554  auto size = cadPropNode->first_node("Size");
2555  double width = GetNodeValueDouble(size, "Width");
2556  double height = GetNodeValueDouble(size, "Height");
2557  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2558 
2559  std::vector<Node*> nodeVector;
2560  if(!OpenControlNodeList(multiplierNode, nodeVector)) return false;
2561 
2562  multiplier->SetWidth(width);
2563  multiplier->SetHeight(height);
2564  multiplier->SetAngle(angle);
2565  multiplier->SetPosition(wxPoint2DDouble(posX, posY));
2566 
2567  multiplier->StartMove(multiplier->GetPosition());
2568  multiplier->SetNodeList(nodeVector);
2569  multiplier->UpdatePoints();
2570  elementList.push_back(multiplier);
2571 
2572  multiplierNode = multiplierNode->next_sibling("Multiplier");
2573  }
2574  }
2575  //}
2576 
2577  //{ Divider
2578  auto dividerListNode = elementsNode->first_node("DividerList");
2579  if(dividerListNode) {
2580  auto dividerNode = dividerListNode->first_node("Divider");
2581  while(dividerNode) {
2582  int id = GetAttributeValueInt(dividerNode, "ID");
2583  Divider* divider = new Divider(id);
2584 
2585  auto cadPropNode = dividerNode->first_node("CADProperties");
2586  if(!cadPropNode) return false;
2587 
2588  auto position = cadPropNode->first_node("Position");
2589  double posX = GetNodeValueDouble(position, "X");
2590  double posY = GetNodeValueDouble(position, "Y");
2591  auto size = cadPropNode->first_node("Size");
2592  double width = GetNodeValueDouble(size, "Width");
2593  double height = GetNodeValueDouble(size, "Height");
2594  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2595 
2596  std::vector<Node*> nodeVector;
2597  if(!OpenControlNodeList(dividerNode, nodeVector)) return false;
2598 
2599  divider->SetWidth(width);
2600  divider->SetHeight(height);
2601  divider->SetAngle(angle);
2602  divider->SetPosition(wxPoint2DDouble(posX, posY));
2603 
2604  divider->StartMove(divider->GetPosition());
2605  divider->SetNodeList(nodeVector);
2606  divider->UpdatePoints();
2607  elementList.push_back(divider);
2608 
2609  dividerNode = dividerNode->next_sibling("Divider");
2610  }
2611  }
2612  //}
2613 
2614  //{ Rate limiter
2615  auto rateLimiterListNode = elementsNode->first_node("RateLimiterList");
2616  if(rateLimiterListNode) {
2617  auto rateLimiterNode = rateLimiterListNode->first_node("RateLimiter");
2618  while(rateLimiterNode) {
2619  int id = GetAttributeValueInt(rateLimiterNode, "ID");
2620  RateLimiter* limiter = new RateLimiter(id);
2621 
2622  auto cadPropNode = rateLimiterNode->first_node("CADProperties");
2623  if(!cadPropNode) return false;
2624 
2625  auto position = cadPropNode->first_node("Position");
2626  double posX = GetNodeValueDouble(position, "X");
2627  double posY = GetNodeValueDouble(position, "Y");
2628  auto size = cadPropNode->first_node("Size");
2629  double width = GetNodeValueDouble(size, "Width");
2630  double height = GetNodeValueDouble(size, "Height");
2631  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2632 
2633  double upLimit = GetNodeValueDouble(rateLimiterNode, "UpperLimit");
2634  double lowLimit = GetNodeValueDouble(rateLimiterNode, "LowerLimit");
2635 
2636  std::vector<Node*> nodeVector;
2637  if(!OpenControlNodeList(rateLimiterNode, nodeVector)) return false;
2638 
2639  limiter->SetWidth(width);
2640  limiter->SetHeight(height);
2641  limiter->SetAngle(angle);
2642  limiter->SetPosition(wxPoint2DDouble(posX, posY));
2643  limiter->SetUpLimit(upLimit);
2644  limiter->SetLowLimit(lowLimit);
2645 
2646  limiter->StartMove(limiter->GetPosition());
2647  limiter->SetNodeList(nodeVector);
2648  limiter->UpdatePoints();
2649  elementList.push_back(limiter);
2650 
2651  rateLimiterNode = rateLimiterNode->next_sibling("RateLimiter");
2652  }
2653  }
2654  //}
2655 
2656  //{ Sum
2657  auto sumListNode = elementsNode->first_node("SumList");
2658  if(sumListNode) {
2659  auto sumNode = sumListNode->first_node("Sum");
2660  while(sumNode) {
2661  int id = GetAttributeValueInt(sumNode, "ID");
2662  Sum* sum = new Sum(id);
2663 
2664  auto cadPropNode = sumNode->first_node("CADProperties");
2665  if(!cadPropNode) return false;
2666 
2667  auto position = cadPropNode->first_node("Position");
2668  double posX = GetNodeValueDouble(position, "X");
2669  double posY = GetNodeValueDouble(position, "Y");
2670  auto size = cadPropNode->first_node("Size");
2671  double width = GetNodeValueDouble(size, "Width");
2672  double height = GetNodeValueDouble(size, "Height");
2673  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2674 
2675  std::vector<Sum::Signal> signs;
2676  auto signsNode = sumNode->first_node("Signs");
2677  auto sign = signsNode->first_node("Value");
2678  while(sign) {
2679  long value;
2680  wxString(sign->value()).ToCLong(&value);
2681  signs.push_back(static_cast<Sum::Signal>(value));
2682  sign = sign->next_sibling("Value");
2683  }
2684  sum->SetSignalList(signs);
2685 
2686  std::vector<Node*> nodeVector;
2687  if(!OpenControlNodeList(sumNode, nodeVector)) return false;
2688 
2689  sum->SetWidth(width);
2690  sum->SetHeight(height);
2691  sum->SetAngle(angle);
2692  sum->SetPosition(wxPoint2DDouble(posX, posY));
2693 
2694  sum->StartMove(sum->GetPosition());
2695  sum->SetNodeList(nodeVector);
2696  sum->UpdatePoints();
2697  elementList.push_back(sum);
2698 
2699  sumNode = sumNode->next_sibling("Sum");
2700  }
2701  }
2702  //}
2703 
2704  //{ Transfer function
2705  auto tfListNode = elementsNode->first_node("TransferFunctionList");
2706  if(tfListNode) {
2707  auto tfNode = tfListNode->first_node("TransferFunction");
2708  while(tfNode) {
2709  int id = GetAttributeValueInt(tfNode, "ID");
2710  TransferFunction* tf = new TransferFunction(id);
2711 
2712  auto cadPropNode = tfNode->first_node("CADProperties");
2713  if(!cadPropNode) return false;
2714 
2715  auto position = cadPropNode->first_node("Position");
2716  double posX = GetNodeValueDouble(position, "X");
2717  double posY = GetNodeValueDouble(position, "Y");
2718  auto size = cadPropNode->first_node("Size");
2719  double width = GetNodeValueDouble(size, "Width");
2720  double height = GetNodeValueDouble(size, "Height");
2721  double angle = GetNodeValueDouble(cadPropNode, "Angle");
2722 
2723  std::vector<double> numerator, denominator;
2724  auto numeratorNode = tfNode->first_node("Numerator");
2725  auto nValue = numeratorNode->first_node("Value");
2726  while(nValue) {
2727  double value = 0.0;
2728  wxString(nValue->value()).ToCDouble(&value);
2729  numerator.push_back(value);
2730  nValue = nValue->next_sibling("Value");
2731  }
2732  auto denominatorNode = tfNode->first_node("Denominator");
2733  auto dValue = denominatorNode->first_node("Value");
2734  while(dValue) {
2735  double value = 0.0;
2736  wxString(dValue->value()).ToCDouble(&value);
2737  denominator.push_back(value);
2738  dValue = dValue->next_sibling("Value");
2739  }
2740 
2741  std::vector<Node*> nodeVector;
2742  if(!OpenControlNodeList(tfNode, nodeVector)) return false;
2743 
2744  tf->SetWidth(width);
2745  tf->SetHeight(height);
2746  tf->SetAngle(angle);
2747  tf->SetPosition(wxPoint2DDouble(posX, posY));
2748 
2749  tf->SetNumerator(numerator);
2750  tf->SetDenominator(denominator);
2751 
2752  tf->StartMove(tf->GetPosition());
2753  tf->SetNodeList(nodeVector);
2754 
2755  tf->UpdateTFText();
2756 
2757  elementList.push_back(tf);
2758 
2759  tfNode = tfNode->next_sibling("TransferFunction");
2760  }
2761  }
2762  //}
2763 
2764  // Connection line
2765  auto connectionListNode = elementsNode->first_node("ConnectionList");
2766  if(connectionListNode) {
2767  auto connNode = connectionListNode->first_node("Connection");
2768  while(connNode) {
2769  ConnectionLine* cLine = NULL;
2770  int id = GetAttributeValueInt(connNode, "ID");
2771 
2772  auto cadPropNode = connNode->first_node("CADProperties");
2773  if(!cadPropNode) return false;
2774  double offset = GetNodeValueDouble(cadPropNode, "Offset");
2775 
2776  auto parentList = connNode->first_node("ParentList");
2777  if(!parentList) return false;
2778 
2779  auto parentNode = parentList->first_node("Parent");
2780  bool firstNode = true;
2781  while(parentNode) {
2782  int elementID = GetNodeValueInt(parentNode, "ElementID");
2783  int nodeID = GetNodeValueInt(parentNode, "NodeID");
2784 
2785  ControlElement* element = GetControlElementFromID(elementList, elementID);
2786  Node* node = element->GetNodeList()[nodeID];
2787 
2788  if(firstNode) cLine = new ConnectionLine(node, id);
2789  cLine->AddParent(element);
2790  element->AddChild(cLine);
2791  if(!firstNode) cLine->AppendNode(node, element);
2792 
2793  if(firstNode) firstNode = false;
2794  parentNode = parentNode->next_sibling("Parent");
2795  }
2796 
2797  auto parentLine = connNode->first_node("ParentLine");
2798  if(!parentLine) return false;
2799  int parentLineID = GetAttributeValueInt(parentLine, "ID");
2800  if(parentLineID != -1) {
2801  for(auto it = connectionList.begin(), itEnd = connectionList.end(); it != itEnd; ++it) {
2802  ConnectionLine* parent = *it;
2803  if(parent->GetID() == parentLineID) {
2804  cLine->SetParentLine(parent);
2805  parent->AddChild(cLine);
2806  }
2807  }
2808  }
2809 
2810  cLine->SetOffset(offset);
2811  cLine->UpdatePoints();
2812  connectionList.push_back(cLine);
2813  connNode = connNode->next_sibling("Connection");
2814  }
2815  }
2816  ctrlContainer->FillContainer(elementList, connectionList);
2817  return true;
2818 }
2819 
2820 void FileHanding::SaveControlNodes(rapidxml::xml_document<>& doc,
2821  rapidxml::xml_node<>* nodesN,
2822  std::vector<Node*> nodeList)
2823 {
2824  int id = 0;
2825  for(auto it = nodeList.begin(), itEnd = nodeList.end(); it != itEnd; ++it) {
2826  Node* node = *it;
2827  node->SetID(id);
2828  auto nodeN = AppendNode(doc, nodesN, "Node");
2829  SetNodeAttribute(doc, nodeN, "ID", id);
2830  auto nodePosition = AppendNode(doc, nodeN, "Position");
2831  auto posNodeX = AppendNode(doc, nodePosition, "X");
2832  SetNodeValue(doc, posNodeX, node->GetPosition().m_x);
2833  auto posNodeY = AppendNode(doc, nodePosition, "Y");
2834  SetNodeValue(doc, posNodeY, node->GetPosition().m_y);
2835  auto angle = AppendNode(doc, nodeN, "Angle");
2836  SetNodeValue(doc, angle, node->GetAngle());
2837  auto nodeType = AppendNode(doc, nodeN, "Type");
2838  SetNodeValue(doc, nodeType, node->GetNodeType());
2839  id++;
2840  }
2841 }
2842 
2843 ControlElement* FileHanding::GetControlElementFromID(std::vector<ControlElement*> elementList, int id)
2844 {
2845  for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
2846  ControlElement* element = *it;
2847  if(element->GetID() == id) return element;
2848  }
2849  return NULL;
2850 }
2851 
2852 bool FileHanding::OpenControlNodeList(rapidxml::xml_node<>* elementNode, std::vector<Node*>& nodeVector)
2853 {
2854  auto nodeList = elementNode->first_node("NodeList");
2855  if(!nodeList) return false;
2856  auto nodeN = nodeList->first_node("Node");
2857  while(nodeN) {
2858  auto nodePosition = nodeN->first_node("Position");
2859  double nodePosX = GetNodeValueDouble(nodePosition, "X");
2860  double nodePosY = GetNodeValueDouble(nodePosition, "Y");
2861  double nodeAngle = GetNodeValueDouble(nodeN, "Angle");
2862  Node::NodeType nodeType = (Node::NodeType)GetNodeValueInt(nodeN, "Type");
2863  Node* node = new Node(wxPoint2DDouble(nodePosX, nodePosY), nodeType, 2.0);
2864  node->SetAngle(nodeAngle);
2865  nodeVector.push_back(node);
2866  nodeN = nodeN->next_sibling("Node");
2867  }
2868  return true;
2869 }
2870 
2871 rapidxml::xml_node<>* FileHanding::AppendNode(rapidxml::xml_document<>& doc,
2872  rapidxml::xml_node<>* parentNode,
2873  const char* name,
2874  rapidxml::node_type nodeType)
2875 {
2876  rapidxml::xml_node<>* node = doc.allocate_node(nodeType, name);
2877  parentNode->append_node(node);
2878  return node;
2879 }
2880 
2881 void FileHanding::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, wxString value)
2882 {
2883  node->value(doc.allocate_string(value.mb_str()));
2884 }
2885 
2886 void FileHanding::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, int value)
2887 {
2888  node->value(doc.allocate_string(wxString::Format("%d", value).mb_str()));
2889 }
2890 
2891 void FileHanding::SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, double value)
2892 {
2893  node->value(doc.allocate_string(wxString::FromCDouble(value, 13).mb_str()));
2894 }
2895 
2896 void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc,
2897  rapidxml::xml_node<>* node,
2898  const char* atrName,
2899  wxString value)
2900 {
2901  node->append_attribute(doc.allocate_attribute(atrName, doc.allocate_string(value.mb_str())));
2902 }
2903 
2904 void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc,
2905  rapidxml::xml_node<>* node,
2906  const char* atrName,
2907  int value)
2908 {
2909  node->append_attribute(
2910  doc.allocate_attribute(atrName, doc.allocate_string(wxString::Format("%d", value).mb_str())));
2911 }
2912 
2913 void FileHanding::SetNodeAttribute(rapidxml::xml_document<>& doc,
2914  rapidxml::xml_node<>* node,
2915  const char* atrName,
2916  double value)
2917 {
2918  node->append_attribute(
2919  doc.allocate_attribute(atrName, doc.allocate_string(wxString::FromCDouble(value, 13).mb_str())));
2920 }
2921 
2922 double FileHanding::GetNodeValueDouble(rapidxml::xml_node<>* parent, const char* nodeName)
2923 {
2924  double dValue = 0.0;
2925  if(parent) {
2926  auto node = parent->first_node(nodeName);
2927  if(node) wxString(node->value()).ToCDouble(&dValue);
2928  }
2929  return dValue;
2930 }
2931 
2932 int FileHanding::GetNodeValueInt(rapidxml::xml_node<>* parent, const char* nodeName)
2933 {
2934  long iValue = -1;
2935  if(parent) {
2936  auto node = parent->first_node(nodeName);
2937  if(node) wxString(node->value()).ToCLong(&iValue);
2938  }
2939  return (int)iValue;
2940 }
2941 
2942 int FileHanding::GetAttributeValueInt(rapidxml::xml_node<>* parent, const char* nodeName, const char* atrName)
2943 {
2944  long iValue = -1;
2945  if(parent) {
2946  auto node = parent->first_node(nodeName);
2947  if(node) {
2948  auto atr = node->first_attribute(atrName);
2949  if(atr) wxString(atr->value()).ToCLong(&iValue);
2950  }
2951  }
2952  return (int)iValue;
2953 }
2954 
2955 int FileHanding::GetAttributeValueInt(rapidxml::xml_node<>* node, const char* atrName)
2956 {
2957  long intValue;
2958  auto atr = node->first_attribute(atrName);
2959  if(!atr) return false;
2960  wxString(atr->value()).ToCLong(&intValue);
2961  return (int)intValue;
2962 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
Element that shows power element informations in workspace.
Definition: Text.h:75
-
General and simulation data manager.
-
Multiplies two inputs.
Definition: Multiplier.h:32
-
std::vector< double > swTime
Definition: PowerElement.h:95
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Machines.cpp:146
- - -
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Branch.cpp:105
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
const std::vector< Transformer * > GetTransformerList() const
Get the transformers of the system (use GetElementsFromList first).
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Text.cpp:114
-
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
-
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
-
void SetWidth(double width)
Set element width.
Definition: Element.h:151
-
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
-
FaultData
Information about fault (type and location).
Definition: PowerElement.h:55
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Capacitor.cpp:115
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
const std::vector< IndMotor * > GetIndMotorList() const
Get the induction motors of the system (use GetElementsFromList first).
-
bool SetOnline(bool online=true)
Set if the element is online or offline.
Definition: Element.cpp:235
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Shunt.cpp:74
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Load.cpp:121
-
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Inductor.cpp:113
- -
Synchronous generator power element.
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Machines.cpp:111
-
const std::vector< Bus * > GetBusList() const
Get the buses of the system (use GetElementsFromList first).
- -
std::vector< SwitchingType > swType
Definition: PowerElement.h:94
-
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
-
Provides the communication with the power element.
Definition: IOControl.h:35
-
virtual void SetDynamicEvent(bool dynEvent=true)
Set if the power element have dynamic event.
Definition: PowerElement.h:208
-
const std::vector< SyncGenerator * > GetSyncGeneratorList() const
Get the synchronous generators of the system (use GetElementsFromList first).
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
-
const std::vector< Inductor * > GetInductorList() const
Get the inductors of the system (use GetElementsFromList first).
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Element.h:240
-
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Inductor.cpp:24
-
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
-
Switching data of power elements.
Definition: PowerElement.h:93
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Shunt.cpp:32
- -
Control element that divides two inputs.
Definition: Divider.h:32
-
Generates an output following an exponential function.
Definition: Exponential.h:32
-
void SetAngle(double angle)
Set element angle.
Definition: Element.h:156
-
double GetWidth() const
Get the element width.
Definition: Element.h:207
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Line.cpp:136
-
void SetPosition(const wxPoint2DDouble position)
Set the element position and update the rectangle.
Definition: Element.cpp:25
-
const std::vector< Capacitor * > GetCapacitorList() const
Get the capacitors of the system (use GetElementsFromList first).
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Machines.cpp:25
-
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
-
Power line element.
Definition: Line.h:59
- -
Loas shunt power element.
Definition: Load.h:73
-
double GetHeight() const
Get the element height.
Definition: Element.h:197
-
virtual std::vector< wxPoint2DDouble > GetPointList() const
Get the list of points that connect the element to bus.
Definition: Element.h:232
-
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
-
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
- -
const std::vector< Load * > GetLoadList() const
Get the loads of the system (use GetElementsFromList first).
- -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Machines.cpp:232
-
virtual void SetPointList(std::vector< wxPoint2DDouble > pointList)
Set the list of points that connect the element to the bus.
Definition: Line.cpp:492
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Bus.cpp:184
-
virtual SwitchingData GetSwitchingData()
Returns the switching data of the element.
Definition: PowerElement.h:182
-
Connection between two control elements or other connection line and an element.
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Shunt.cpp:67
-
SwitchingType
Type of switching.
Definition: PowerElement.h:69
-
Calculates the time response by a frequency domain transfer function.
-
Induction motor power element.
Definition: IndMotor.h:40
- -
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Transformer.cpp:39
-
const std::vector< SyncMotor * > GetSyncMotorList() const
Get the synchronous motors of the system (use GetElementsFromList first).
-
virtual int GetID() const
Get the element ID.
Definition: Element.h:272
-
Shunt capactior power element.
Definition: Capacitor.h:38
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Load.cpp:23
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Machines.cpp:165
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
Inductor shunt power element.
Definition: Inductor.h:38
-
virtual void GetElementsFromList(std::vector< Element *> elementList)
Separate the power elements from a generic list.
- -
Base class of electric calculations, with general methods.
- -
A control element that provides a constant value.
Definition: Constant.h:35
-
This class manages the graphical and power elements. It is responsible for handling the user&#39;s intera...
Definition: Workspace.h:81
-
virtual void SetSwitchingData(SwitchingData data)
Set the switching data of the element.
Definition: PowerElement.h:177
-
double GetRotationAngle() const
Get the angle of rotation.
Definition: Element.h:217
-
const std::vector< Line * > GetLineList() const
Get the lines of the system (use GetElementsFromList first).
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Capacitor.cpp:24
-
Two-winding transformer power element.
Definition: Transformer.h:78
-
void SetHeight(double height)
Set element height.
Definition: Element.h:135
- - -
-
- - - - diff --git a/docs/doxygen/html/_file_handing_8h.html b/docs/doxygen/html/_file_handing_8h.html index 8b51868..045a245 100644 --- a/docs/doxygen/html/_file_handing_8h.html +++ b/docs/doxygen/html/_file_handing_8h.html @@ -93,17 +93,15 @@ $(document).ready(function(){initNavTree('_file_handing_8h.html','');});
#include <wx/string.h>
#include <fstream>
#include <sstream>
-#include "Workspace.h"
-#include "ControlEditor.h"
-#include "ControlElementContainer.h"
-#include "ElectricCalculation.h"
-#include "Text.h"
+#include "Workspace.h"
+#include "ControlEditor.h"
+#include "ControlElementContainer.h"
+#include "ElectricCalculation.h"
+#include "Text.h"
#include "rapidXML/rapidxml.hpp"
#include "rapidXML/rapidxml_print.hpp"
#include "rapidXML/rapidxml_utils.hpp"
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_file_handing_8h_source.html b/docs/doxygen/html/_file_handing_8h_source.html deleted file mode 100644 index c4be33b..0000000 --- a/docs/doxygen/html/_file_handing_8h_source.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - -Project/FileHanding.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  FileHanding
- - - - - -
- - - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
FileHanding.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef FILEHANDING_H
19 #define FILEHANDING_H
20 
21 #include <wx/string.h>
22 #include <fstream>
23 #include <sstream>
24 
25 #include "Workspace.h"
26 #include "ControlEditor.h"
28 #include "ElectricCalculation.h"
29 #include "Text.h"
30 
31 #include "rapidXML/rapidxml.hpp"
32 // Modified: http://stackoverflow.com/questions/14113923/rapidxml-print-header-has-undefined-methods
33 #include "rapidXML/rapidxml_print.hpp"
34 #include "rapidXML/rapidxml_utils.hpp"
35 
44 {
45 public:
46  FileHanding();
47  FileHanding(Workspace* workspace);
48  FileHanding(ControlEditor* controlEditor);
49  ~FileHanding();
50 
51  void SetWorkspace(Workspace* workspace) { m_workspace = workspace; }
52  void SetControlEditor(ControlEditor* controlEditor) { m_controlEditor = controlEditor; }
53 
54  void SaveProject(wxFileName path);
55  bool OpenProject(wxFileName path);
56 
57  void SaveControl(wxFileName path);
58  bool OpenControl(wxFileName path, std::vector<ControlElement*>& ctrlElementList, std::vector<ConnectionLine*>& ctrlConnectionList);
59 
60  void SaveControlElements(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementsNode, ControlElementContainer* ctrlContainer = NULL);
61  bool OpenControlElements(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* elementsNode, ControlElementContainer* ctrlContainer = NULL);
62 
63 protected:
64  Workspace* m_workspace = NULL;
65  ControlEditor* m_controlEditor = NULL;
66 
67  rapidxml::xml_node<>* AppendNode(rapidxml::xml_document<>& doc,
68  rapidxml::xml_node<>* parentNode,
69  const char* name,
70  rapidxml::node_type nodeType = rapidxml::node_element);
71  void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, wxString value);
72  void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, int value);
73  void SetNodeValue(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, double value);
74  void SetNodeAttribute(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, const char* atrName, wxString value);
75  void SetNodeAttribute(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, const char* atrName, int value);
76  void SetNodeAttribute(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* node, const char* atrName, double value);
77  double GetNodeValueDouble(rapidxml::xml_node<>* parent, const char* nodeName);
78  int GetNodeValueInt(rapidxml::xml_node<>* parent, const char* nodeName);
79  int GetAttributeValueInt(rapidxml::xml_node<>* parent, const char* nodeName, const char* atrName);
80  int GetAttributeValueInt(rapidxml::xml_node<>* node, const char* atrName);
81 
82  void SaveControlNodes(rapidxml::xml_document<>& doc, rapidxml::xml_node<>* nodesN, std::vector<Node*> nodeList);
83  ControlElement* GetControlElementFromID(std::vector<ControlElement*> elementList, int id);
84  bool OpenControlNodeList(rapidxml::xml_node<>* elementNode, std::vector<Node*>& nodeVector);
85 };
86 
87 #endif // FILEHANDING_H
-
Save and opens the projects created on disk.
Definition: FileHanding.h:43
- - -
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
- - - - -
This class manages the graphical and power elements. It is responsible for handling the user&#39;s intera...
Definition: Workspace.h:81
-
-
- - - - diff --git a/docs/doxygen/html/_gain_8cpp_source.html b/docs/doxygen/html/_gain_8cpp_source.html deleted file mode 100644 index 0820a21..0000000 --- a/docs/doxygen/html/_gain_8cpp_source.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - -Project/Gain.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Gain.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Gain.h"
19 #include "GainForm.h"
20 
21 Gain::Gain(int id) : ControlElement(id)
22 {
23  m_triPts.resize(3);
24  SetValue(m_value);
25  Node* nodeIn = new Node(m_position + wxPoint2DDouble(-m_width / 2, 0), Node::NODE_IN, m_borderSize);
26  nodeIn->StartMove(m_position);
27  Node* nodeOut = new Node(m_position + wxPoint2DDouble(m_width / 2, 0), Node::NODE_OUT, m_borderSize);
28  nodeOut->SetAngle(180.0);
29  nodeOut->StartMove(m_position);
30  m_nodeList.push_back(nodeIn);
31  m_nodeList.push_back(nodeOut);
32 }
33 
34 Gain::~Gain()
35 {
36  if(m_glText) delete m_glText;
37 }
38 void Gain::Draw(wxPoint2DDouble translation, double scale) const
39 {
40  if(m_selected) {
41  glColor4dv(m_selectionColour.GetRGBA());
42  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
43  std::vector<wxPoint2DDouble> m_triSelectedPts;
44  if(m_angle == 0.0) {
45  m_triSelectedPts.push_back(m_triPts[0] - wxPoint2DDouble(borderSize / 2, borderSize / 1.5));
46  m_triSelectedPts.push_back(m_triPts[1] - wxPoint2DDouble(borderSize / 2, -borderSize / 1.5));
47  m_triSelectedPts.push_back(m_triPts[2] - wxPoint2DDouble(-borderSize, 0));
48  } else if(m_angle == 90.0) {
49  m_triSelectedPts.push_back(m_triPts[0] - wxPoint2DDouble(borderSize / 1.5, borderSize / 2));
50  m_triSelectedPts.push_back(m_triPts[1] - wxPoint2DDouble(-borderSize / 1.5, borderSize / 2));
51  m_triSelectedPts.push_back(m_triPts[2] - wxPoint2DDouble(0, -borderSize));
52  } else if(m_angle == 180.0) {
53  m_triSelectedPts.push_back(m_triPts[0] - wxPoint2DDouble(borderSize, 0));
54  m_triSelectedPts.push_back(m_triPts[1] - wxPoint2DDouble(-borderSize / 2, borderSize / 1.5));
55  m_triSelectedPts.push_back(m_triPts[2] - wxPoint2DDouble(-borderSize / 2, -borderSize / 1.5));
56  } else if(m_angle == 270.0) {
57  m_triSelectedPts.push_back(m_triPts[0] - wxPoint2DDouble(0, borderSize));
58  m_triSelectedPts.push_back(m_triPts[1] - wxPoint2DDouble(-borderSize / 1.5, -borderSize / 2));
59  m_triSelectedPts.push_back(m_triPts[2] - wxPoint2DDouble(borderSize / 1.5, -borderSize / 2));
60  }
61  DrawTriangle(m_triSelectedPts);
62  }
63  glLineWidth(1.0);
64  glColor4d(1.0, 1.0, 1.0, 1.0);
65  DrawTriangle(m_triPts);
66  glColor4d(0.0, 0.0, 0.0, 1.0);
67  DrawTriangle(m_triPts, GL_LINE_LOOP);
68 
69  // Plot number.
70  glColor4d(0.0, 0.0, 0.0, 1.0);
71  if(m_angle == 0.0)
72  m_glText->Draw(m_position + wxPoint2DDouble(-m_width / 2 + m_glText->GetWidth() / 2 + 2 + m_borderSize, 0.0));
73  else if(m_angle == 90.0)
74  m_glText->Draw(m_position + wxPoint2DDouble(0.0, -m_height / 2 + m_glText->GetHeight() / 2 + 2 + m_borderSize));
75  else if(m_angle == 180.0)
76  m_glText->Draw(m_position + wxPoint2DDouble(m_width / 2 - m_glText->GetWidth() / 2 - 2 - m_borderSize, 0.0));
77  else if(m_angle == 270.0)
78  m_glText->Draw(m_position + wxPoint2DDouble(0.0, m_height / 2 - m_glText->GetHeight() / 2 - 2 - m_borderSize));
79 
80  glColor4d(0.0, 0.0, 0.0, 1.0);
81  DrawNodes();
82 }
83 
84 bool Gain::ShowForm(wxWindow* parent, Element* element)
85 {
86  GainForm* form = new GainForm(parent, this);
87  if(form->ShowModal() == wxID_OK) {
88  form->Destroy();
89  return true;
90  }
91  form->Destroy();
92  return false;
93 }
94 
95 void Gain::Rotate(bool clockwise)
96 {
97  if(clockwise)
98  m_angle += 90.0;
99  else
100  m_angle -= 90.0;
101  if(m_angle >= 360.0)
102  m_angle = 0.0;
103  else if(m_angle < 0)
104  m_angle = 270.0;
105 
106  UpdatePoints();
107 
108  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
109  Node* node = *it;
110  node->Rotate(clockwise);
111  }
112 }
113 
114 void Gain::SetValue(double value)
115 {
116  m_value = value;
117  wxString text = "";
118  if(std::abs(m_value) > 1e3 || std::abs(m_value) < 1e-3)
119  text = wxString::Format("%g", m_value);
120  else
121  text = StringFromDouble(m_value);
122 
123  if(m_glText)
124  m_glText->SetText(text);
125  else
126  m_glText = new OpenGLText(text);
127 
128  m_width = m_glText->GetWidth() + 18 + 2 * m_borderSize;
129  m_height = m_glText->GetHeight() + 18 + 2 * m_borderSize;
130 
131  if(m_width > m_height)
132  m_height = m_width;
133  else
134  m_width = m_height;
135 
136  SetPosition(m_position); // Update rectangle.
137 
138  UpdatePoints();
139 }
140 
141 void Gain::UpdatePoints()
142 {
143  if(m_nodeList.size() != 0) {
144  if(m_angle == 0.0) {
145  m_triPts[0] = m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize);
146  m_triPts[1] = m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize);
147  m_triPts[2] = m_position + wxPoint2DDouble(m_width / 2 - m_borderSize, 0);
148  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
149  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(m_width / 2 - 2, 0));
150  } else if(m_angle == 90.0) {
151  m_triPts[0] = m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize);
152  m_triPts[1] = m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize);
153  m_triPts[2] = m_position + wxPoint2DDouble(0, m_height / 2 - m_borderSize);
154  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
155  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2 - 2));
156  } else if(m_angle == 180.0) {
157  m_triPts[0] = m_position + wxPoint2DDouble(-m_width / 2 + m_borderSize, 0);
158  m_triPts[1] = m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize);
159  m_triPts[2] = m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize);
160  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
161  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2 + 2, 0));
162  } else if(m_angle == 270.0) {
163  m_triPts[0] = m_position + wxPoint2DDouble(0, -m_height / 2 + m_borderSize);
164  m_triPts[1] = m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize);
165  m_triPts[2] = m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize);
166  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
167  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2 + 2));
168  }
169  }
170 }
171 
172 void Gain::Move(wxPoint2DDouble position)
173 {
174  SetPosition(m_movePos + position - m_moveStartPt);
175  UpdatePoints();
176 }
177 
178 bool Gain::Solve(double input, double timeStep)
179 {
180  m_output = input * m_value;
181  return true;
182 }
183 
185 {
186  Gain* copy = new Gain(m_elementID);
187  *copy = *this;
188  copy->m_glText = m_glText->GetCopy();
189  return copy;
190 }
191 
193 {
194  SetValue(m_value);
195  if(!m_glText->IsTextureOK()) return false;
196  return true;
197 }
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Gain.cpp:172
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Gain.cpp:184
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
Definition: Gain.cpp:192
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Gain.cpp:84
- -
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Gain.cpp:95
-
Form to edit the gain control data.
Definition: GainForm.h:31
-
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
virtual bool Solve(double input, double timeStep)
Multiply the input by a constant.
Definition: Gain.cpp:178
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Gain.cpp:38
- -
-
- - - - diff --git a/docs/doxygen/html/_gain_8h.html b/docs/doxygen/html/_gain_8h.html index c191167..26eb104 100644 --- a/docs/doxygen/html/_gain_8h.html +++ b/docs/doxygen/html/_gain_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_gain_8h.html','');});
Gain.h File Reference
-
#include "ControlElement.h"
+
#include "ControlElement.h"
#include <wx/dcscreen.h>
-#include "OpenGLText.h"
-
-

Go to the source code of this file.

- +#include "OpenGLText.h"
+
diff --git a/docs/doxygen/html/_gain_8h_source.html b/docs/doxygen/html/_gain_8h_source.html deleted file mode 100644 index 1add68f..0000000 --- a/docs/doxygen/html/_gain_8h_source.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - -Project/Gain.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Gain
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Gain.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GAIN_H
19 #define GAIN_H
20 
21 #include "ControlElement.h"
22 
23 #include <wx/dcscreen.h>
24 #include "OpenGLText.h"
25 
26 class GainForm;
27 
35 class Gain : public ControlElement
36 {
37  public:
38  Gain(int id);
39  ~Gain();
40 
41  virtual void Draw(wxPoint2DDouble translation, double scale) const;
42  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
43  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
44  virtual bool ShowForm(wxWindow* parent, Element* element);
45  virtual void Rotate(bool clockwise = true);
46  virtual void Move(wxPoint2DDouble position);
47  virtual bool UpdateText();
48  virtual void SetValue(double value);
49  virtual double GetValue() const { return m_value; }
50  virtual void UpdatePoints();
59  virtual bool Solve(double input, double timeStep);
60 
61  virtual Element* GetCopy();
62 
63  protected:
64  double m_value = 1.0;
65 
66  OpenGLText* m_glText = NULL;
67 
68  std::vector<wxPoint2DDouble> m_triPts;
69 };
70 
71 #endif // GAIN_H
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Gain.cpp:172
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Gain.cpp:184
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Gain.h:43
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
Definition: Gain.cpp:192
- -
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Gain.cpp:84
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Gain.cpp:95
-
Form to edit the gain control data.
Definition: GainForm.h:31
-
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
Base class of a control element. Provide general methods to other control classes.
-
virtual bool Solve(double input, double timeStep)
Multiply the input by a constant.
Definition: Gain.cpp:178
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Gain.h:42
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Gain.cpp:38
- -
-
- - - - diff --git a/docs/doxygen/html/_gain_form_8cpp_source.html b/docs/doxygen/html/_gain_form_8cpp_source.html deleted file mode 100644 index 06542d9..0000000 --- a/docs/doxygen/html/_gain_form_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/GainForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
GainForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "GainForm.h"
19 #include "Gain.h"
20 
21 GainForm::GainForm(wxWindow* parent, Gain* gain) : GainFormBase(parent)
22 {
23  SetSize(GetBestSize());
24 
25  m_parent = parent;
26  m_gain = gain;
27 
28  m_textCtrlValue->SetValue(m_gain->StringFromDouble(m_gain->GetValue()));
29 }
30 
31 GainForm::~GainForm() {}
32 void GainForm::OnOKButtonClick(wxCommandEvent& event)
33 {
34  if(ValidateData()) EndModal(wxID_OK);
35 }
36 
37 bool GainForm::ValidateData()
38 {
39  double value;
40  if(!m_gain->DoubleFromString(this, m_textCtrlValue->GetValue(), value,
41  _("Value entered incorrectly in the field \"Gain value\".")))
42  return false;
43 
44  m_gain->SetValue(value);
45  return true;
46 }
-
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
- - -
-
- - - - diff --git a/docs/doxygen/html/_gain_form_8h.html b/docs/doxygen/html/_gain_form_8h.html index d7db441..beea57f 100644 --- a/docs/doxygen/html/_gain_form_8h.html +++ b/docs/doxygen/html/_gain_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_gain_form_8h.html','');});
GainForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_gain_form_8h_source.html b/docs/doxygen/html/_gain_form_8h_source.html deleted file mode 100644 index 72383b1..0000000 --- a/docs/doxygen/html/_gain_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/GainForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  GainForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
GainForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GAINFORM_H
19 #define GAINFORM_H
20 #include "ElementForm.h"
21 
22 class Gain;
23 
31 class GainForm : public GainFormBase
32 {
33  public:
34  GainForm(wxWindow* parent, Gain* gain);
35  virtual ~GainForm();
36 
37  virtual bool ValidateData();
38 
39  protected:
40  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
41  virtual void OnOKButtonClick(wxCommandEvent& event);
42 
43  wxWindow* m_parent;
44  Gain* m_gain;
45 };
46 #endif // GAINFORM_H
Provide an output multiplying the input by a constant.
Definition: Gain.h:35
- -
Form to edit the gain control data.
Definition: GainForm.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_general_properties_form_8cpp_source.html b/docs/doxygen/html/_general_properties_form_8cpp_source.html deleted file mode 100644 index f4c2ba0..0000000 --- a/docs/doxygen/html/_general_properties_form_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/GeneralPropertiesForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
GeneralPropertiesForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "GeneralPropertiesForm.h"
19 #include "PropertiesData.h"
20 
21 GeneralPropertiesForm::GeneralPropertiesForm(wxWindow* parent, PropertiesData* properties)
23 {
24  m_properties = properties;
25  auto data = m_properties->GetGeneralPropertiesData();
26 
27  // Clear the choices and rebuild to set the correct translations.
28  m_choiceLanguage->Clear();
29  m_choiceLanguage->Insert(_("English"), 0);
30  m_choiceLanguage->Insert(_("Portuguese"), 1);
31  m_choiceTheme->Clear();
32  m_choiceTheme->Insert(_("Light"), 0);
33  m_choiceTheme->Insert(_("Dark"), 1);
34 
35  switch(data.language) {
36  case wxLANGUAGE_ENGLISH: {
37  m_choiceLanguage->SetSelection(0);
38  } break;
39  case wxLANGUAGE_PORTUGUESE_BRAZILIAN: {
40  m_choiceLanguage->SetSelection(1);
41  } break;
42  default: {
43  m_choiceLanguage->SetSelection(wxNOT_FOUND);
44  } break;
45  }
46  switch(data.theme) {
47  case THEME_LIGHT: {
48  m_choiceTheme->SetSelection(0);
49  } break;
50  case THEME_DARK: {
51  m_choiceTheme->SetSelection(1);
52  } break;
53  }
54 }
55 
56 GeneralPropertiesForm::~GeneralPropertiesForm() {}
57 void GeneralPropertiesForm::OnButtonOKClick(wxCommandEvent& event)
58 {
59  if(ValidateData()) EndModal(wxID_OK);
60 }
61 
62 bool GeneralPropertiesForm::ValidateData()
63 {
64  auto data = m_properties->GetGeneralPropertiesData();
65  auto checkData = m_properties->GetGeneralPropertiesData();
66  bool hasChanges = false;
67 
68  wxTextFile file("config.ini");
69  if(!file.Create()) {
70  if(!file.Open()) {
71  // Fail to access the file.
72  wxMessageDialog msgDialog(this,
73  _("It was not possible to access the init file.\nThe settings won't be applied."),
74  _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
75  msgDialog.ShowModal();
76  }
77  file.Clear();
78  }
79 
80  wxString line = "lang=";
81  switch(m_choiceLanguage->GetSelection()) {
82  case 0: {
83  line += "en";
84  data.language = wxLANGUAGE_ENGLISH;
85  } break;
86  case 1: {
87  line += "pt-br";
88  data.language = wxLANGUAGE_PORTUGUESE_BRAZILIAN;
89  } break;
90  }
91  file.AddLine(line);
92  if(data.language != checkData.language) hasChanges = true;
93 
94  line = "theme=";
95  switch(m_choiceTheme->GetSelection()) {
96  case 0: {
97  line += "light";
98  data.theme = THEME_LIGHT;
99  } break;
100  case 1: {
101  line += "dark";
102  data.theme = THEME_DARK;
103  } break;
104  }
105  file.AddLine(line);
106  if(data.theme != checkData.theme) hasChanges = true;
107 
108  file.Write();
109  file.Close();
110 
111  if(hasChanges) {
112  wxMessageDialog msgDialog(this, _("The application must be restarted to settings changes be applied."),
113  _("Info"), wxOK | wxCENTRE | wxICON_INFORMATION);
114  msgDialog.ShowModal();
115  }
116  m_properties->SetGeneralPropertiesData(data);
117  return true;
118 }
General and simulation data manager.
- - - -
-
- - - - diff --git a/docs/doxygen/html/_general_properties_form_8h.html b/docs/doxygen/html/_general_properties_form_8h.html index 86aa7a7..eb891fa 100644 --- a/docs/doxygen/html/_general_properties_form_8h.html +++ b/docs/doxygen/html/_general_properties_form_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_general_properties_form_8h.html','');
GeneralPropertiesForm.h File Reference
-
#include "PropertiesForm.h"
+
#include "base/PropertiesFormBase.h"
#include <wx/textfile.h>
#include <wx/msgdlg.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_general_properties_form_8h_source.html b/docs/doxygen/html/_general_properties_form_8h_source.html deleted file mode 100644 index 231dc0d..0000000 --- a/docs/doxygen/html/_general_properties_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/GeneralPropertiesForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  GeneralPropertiesForm
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
GeneralPropertiesForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GENERALPROPERTIESFORM_H
19 #define GENERALPROPERTIESFORM_H
20 
21 #include "PropertiesForm.h"
22 
23 #include <wx/textfile.h>
24 #include <wx/msgdlg.h>
25 
26 class PropertiesData;
27 
36 {
37  public:
38  GeneralPropertiesForm(wxWindow* parent, PropertiesData* properties);
39  virtual ~GeneralPropertiesForm();
40 
41  protected:
42  virtual void OnButtonCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
43  virtual void OnButtonOKClick(wxCommandEvent& event);
44  virtual bool ValidateData();
45 
46  PropertiesData* m_properties = NULL;
47 };
48 #endif // GENERALPROPERTIESFORM_H
General and simulation data manager.
-
Form to edit the software&#39;s general data.
- -
-
- - - - diff --git a/docs/doxygen/html/_generator_stab_form_8cpp_source.html b/docs/doxygen/html/_generator_stab_form_8cpp_source.html deleted file mode 100644 index a1d3009..0000000 --- a/docs/doxygen/html/_generator_stab_form_8cpp_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/GeneratorStabForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
GeneratorStabForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "GeneratorStabForm.h"
19 #include "ControlEditor.h"
21 #include "SwitchingForm.h"
22 #include "SyncGenerator.h"
23 
24 GeneratorStabForm::GeneratorStabForm(wxWindow* parent, SyncGenerator* syncGenerator)
25  : GeneratorStabFormBase(parent)
26 {
27  SetSize(GetBestSize());
28  m_syncGenerator = syncGenerator;
29  m_parent = parent;
30 
31  SyncGeneratorElectricalData data = syncGenerator->GetElectricalData();
32 
33  m_checkBoxPlotSyncMachine->SetValue(data.plotSyncMachine);
34 
35  m_textCtrlInertia->SetValue(SyncGenerator::StringFromDouble(data.inertia));
36  m_textCtrlDamping->SetValue(SyncGenerator::StringFromDouble(data.damping));
37 
38  m_checkBoxUseAVR->SetValue(data.useAVR);
39  m_buttonEditAVR->Enable(data.useAVR);
40 
41  m_checkBoxUseSG->SetValue(data.useSpeedGovernor);
42  m_buttonEditSG->Enable(data.useSpeedGovernor);
43 
44  m_textCtrlRa->SetValue(SyncGenerator::StringFromDouble(data.armResistance));
45  m_textCtrlXp->SetValue(SyncGenerator::StringFromDouble(data.potierReactance));
46  m_textCtrlSat->SetValue(SyncGenerator::StringFromDouble(data.satFactor));
47 
48  m_textCtrlSyncXd->SetValue(SyncGenerator::StringFromDouble(data.syncXd));
49  m_textCtrlSyncXq->SetValue(SyncGenerator::StringFromDouble(data.syncXq));
50 
51  m_textCtrlTranXd->SetValue(SyncGenerator::StringFromDouble(data.transXd));
52  m_textCtrlTranXq->SetValue(SyncGenerator::StringFromDouble(data.transXq));
53  m_textCtrlTranTd0->SetValue(SyncGenerator::StringFromDouble(data.transTd0));
54  m_textCtrlTranTq0->SetValue(SyncGenerator::StringFromDouble(data.transTq0));
55 
56  m_textCtrlSubXd->SetValue(SyncGenerator::StringFromDouble(data.subXd));
57  m_textCtrlSubXq->SetValue(SyncGenerator::StringFromDouble(data.subXq));
58  m_textCtrlSubTd0->SetValue(SyncGenerator::StringFromDouble(data.subTd0));
59  m_textCtrlSubTq0->SetValue(SyncGenerator::StringFromDouble(data.subTq0));
60 }
61 
62 GeneratorStabForm::~GeneratorStabForm()
63 {
64 }
65 void GeneratorStabForm::OnCancelButtonClick(wxCommandEvent& event)
66 {
67  EndModal(wxID_CANCEL);
68 }
69 void GeneratorStabForm::OnEditAVRButtonClick(wxCommandEvent& event)
70 {
71  if(ValidateData()) {
72  SyncGeneratorElectricalData data = m_syncGenerator->GetElectricalData();
73  if(!data.avr) {
74  data.avr = new ControlElementContainer();
75  m_syncGenerator->SetElectricalData(data);
76  }
77  ControlEditor* cEditor = new ControlEditor(m_parent, IOControl::IN_TERMINAL_VOLTAGE | IOControl::IN_ACTIVE_POWER |
78  IOControl::IN_REACTIVE_POWER | IOControl::IN_INITIAL_TERMINAL_VOLTAGE | IOControl::IN_VELOCITY |
79  IOControl::IN_INITIAL_VELOCITY | IOControl::IN_DELTA_VELOCITY | IOControl::IN_DELTA_ACTIVE_POWER |
80  IOControl::OUT_FIELD_VOLTAGE);
81  cEditor->SetElementsList(data.avr->GetControlElementsList());
82  cEditor->SetConnectionsList(data.avr->GetConnectionLineList());
83  cEditor->SetControlContainer(data.avr);
84  cEditor->Show();
85  cEditor->SetJustOpened(true);
86  #ifdef __WXGTK__
87  EndModal(wxID_OK);
88  #endif
89  }
90 }
91 
92 void GeneratorStabForm::OnOKButtonClick(wxCommandEvent& event)
93 {
94  if(ValidateData())
95  EndModal(wxID_OK);
96 }
97 
98 void GeneratorStabForm::OnSpeedGovernorButtonClick(wxCommandEvent& event)
99 {
100  if(ValidateData()) {
101  SyncGeneratorElectricalData data = m_syncGenerator->GetElectricalData();
102  if(!data.speedGov) {
103  data.speedGov = new ControlElementContainer();
104  m_syncGenerator->SetElectricalData(data);
105  }
106  ControlEditor* cEditor =
107  new ControlEditor(NULL, IOControl::IN_VELOCITY | IOControl::IN_ACTIVE_POWER | IOControl::IN_REACTIVE_POWER |
108  IOControl::IN_INITIAL_VELOCITY | IOControl::IN_INITIAL_MEC_POWER | IOControl::OUT_MEC_POWER);
109  cEditor->SetElementsList(data.speedGov->GetControlElementsList());
110  cEditor->SetConnectionsList(data.speedGov->GetConnectionLineList());
111  cEditor->SetControlContainer(data.speedGov);
112  cEditor->Show();
113  cEditor->SetJustOpened(true);
114  #ifdef __WXGTK__
115  EndModal(wxID_OK);
116  #endif
117  }
118 }
119 
120 void GeneratorStabForm::OnSwitchingButtonClick(wxCommandEvent& event)
121 {
122  if(ValidateData()) {
123  SwitchingForm swForm(m_parent, m_syncGenerator);
124  swForm.SetTitle(_("Synchronous generator: Switching"));
125  swForm.ShowModal();
126  EndModal(wxID_OK);
127  }
128 }
129 
130 bool GeneratorStabForm::ValidateData()
131 {
132  SyncGeneratorElectricalData data = m_syncGenerator->GetElectricalData();
133 
134  data.plotSyncMachine = m_checkBoxPlotSyncMachine->GetValue();
135 
136  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlInertia->GetValue(), data.inertia,
137  _("Value entered incorrectly in the field \"Inertia\".")))
138  return false;
139 
140  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlDamping->GetValue(), data.damping,
141  _("Value entered incorrectly in the field \"Damping factor\".")))
142  return false;
143 
144  data.useAVR = m_checkBoxUseAVR->GetValue();
145  data.useSpeedGovernor = m_checkBoxUseSG->GetValue();
146 
147  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlRa->GetValue(), data.armResistance,
148  _("Value entered incorrectly in the field \"Armature resistance\".")))
149  return false;
150 
151  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlXp->GetValue(), data.potierReactance,
152  _("Value entered incorrectly in the field \"Potier reactance\".")))
153  return false;
154 
155  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlSat->GetValue(), data.satFactor,
156  _("Value entered incorrectly in the field \"Saturation factor\".")))
157  return false;
158 
159  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlSyncXd->GetValue(), data.syncXd,
160  _("Value entered incorrectly in the field \"Synchronous direct-axis reactance\".")))
161  return false;
162 
163  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlSyncXq->GetValue(), data.syncXq,
164  _("Value entered incorrectly in the field \"Synchronous quadrature-axis reactance\".")))
165  return false;
166 
167  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlTranXd->GetValue(), data.transXd,
168  _("Value entered incorrectly in the field \"Transitory direct-axis reactance\".")))
169  return false;
170 
171  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlTranXq->GetValue(), data.transXq,
172  _("Value entered incorrectly in the field \"Transitory quadrature-axis reactance\".")))
173  return false;
174 
175  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlTranTd0->GetValue(), data.transTd0,
176  _("Value entered incorrectly in the field \"Transitory direct-axis time constant\".")))
177  return false;
178 
179  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlTranTq0->GetValue(), data.transTq0,
180  _("Value entered incorrectly in the field \"Transitory quadrature-axis time constant\".")))
181  return false;
182 
183  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlSubXd->GetValue(), data.subXd,
184  _("Value entered incorrectly in the field \"Subtransitory direct-axis reactance\".")))
185  return false;
186 
187  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlSubXq->GetValue(), data.subXq,
188  _("Value entered incorrectly in the field \"Subtransitory quadrature-axis reactance\".")))
189  return false;
190 
191  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlSubTd0->GetValue(), data.subTd0,
192  _("Value entered incorrectly in the field \"Subtransitory direct-axis time constant\".")))
193  return false;
194 
195  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlSubTq0->GetValue(), data.subTq0,
196  _("Value entered incorrectly in the field \"Subtransitory quadrature-axis time constant\".")))
197  return false;
198 
199  m_syncGenerator->SetElectricalData(data);
200 
201  return true;
202 }
203 void GeneratorStabForm::UseAVRClick(wxCommandEvent& event)
204 {
205  m_buttonEditAVR->Enable(m_checkBoxUseAVR->GetValue());
206 }
207 void GeneratorStabForm::UseSGClick(wxCommandEvent& event)
208 {
209  m_buttonEditSG->Enable(m_checkBoxUseSG->GetValue());
210 }
-
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
- -
Synchronous generator power element.
- - - -
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
- - - -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
-
-
- - - - diff --git a/docs/doxygen/html/_generator_stab_form_8h.html b/docs/doxygen/html/_generator_stab_form_8h.html index 780c73c..5c3ebf2 100644 --- a/docs/doxygen/html/_generator_stab_form_8h.html +++ b/docs/doxygen/html/_generator_stab_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_generator_stab_form_8h.html','');});
GeneratorStabForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_generator_stab_form_8h_source.html b/docs/doxygen/html/_generator_stab_form_8h_source.html deleted file mode 100644 index 668fd46..0000000 --- a/docs/doxygen/html/_generator_stab_form_8h_source.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - -Project/GeneratorStabForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  GeneratorStabForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
GeneratorStabForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GENERATORSTABFORM_H
19 #define GENERATORSTABFORM_H
20 
21 #include "ElementForm.h"
22 
23 class SwitchingForm;
24 class SyncGenerator;
25 class ControlEditor;
27 
36 {
37  public:
38  GeneratorStabForm(wxWindow* parent, SyncGenerator* syncGenerator);
39  virtual ~GeneratorStabForm();
40 
41  protected:
42  virtual void UseAVRClick(wxCommandEvent& event);
43  virtual void UseSGClick(wxCommandEvent& event);
44  virtual void OnCancelButtonClick(wxCommandEvent& event);
45  virtual void OnEditAVRButtonClick(wxCommandEvent& event);
46  virtual void OnOKButtonClick(wxCommandEvent& event);
47  virtual void OnSpeedGovernorButtonClick(wxCommandEvent& event);
48  virtual void OnSwitchingButtonClick(wxCommandEvent& event);
49 
50  virtual bool ValidateData();
51 
52  SyncGenerator* m_syncGenerator = NULL;
53  wxWindow* m_parent = NULL;
54 };
55 #endif // GENERATORSTABFORM_H
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
-
Synchronous generator power element.
-
Form to edit the synchronous generator data for electromechanical studies.
-
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
- - -
-
- - - - diff --git a/docs/doxygen/html/_graphical_element_8cpp_source.html b/docs/doxygen/html/_graphical_element_8cpp_source.html deleted file mode 100644 index d5d8d72..0000000 --- a/docs/doxygen/html/_graphical_element_8cpp_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - -Project/GraphicalElement.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
GraphicalElement.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "GraphicalElement.h"
19 
20 GraphicalElement::GraphicalElement() : Element()
21 {
22 }
23 
24 GraphicalElement::~GraphicalElement()
25 {
26 }
27 
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
-
- - - - diff --git a/docs/doxygen/html/_graphical_element_8h.html b/docs/doxygen/html/_graphical_element_8h.html index 362b0bf..a534b9b 100644 --- a/docs/doxygen/html/_graphical_element_8h.html +++ b/docs/doxygen/html/_graphical_element_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_graphical_element_8h.html','');});
GraphicalElement.h File Reference
-
#include "Element.h"
-
-

Go to the source code of this file.

- +
#include "Element.h"
+
diff --git a/docs/doxygen/html/_graphical_element_8h_source.html b/docs/doxygen/html/_graphical_element_8h_source.html deleted file mode 100644 index 3f28397..0000000 --- a/docs/doxygen/html/_graphical_element_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/GraphicalElement.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  GraphicalElement
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
GraphicalElement.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef GRAPHICALELEMENT_H
19 #define GRAPHICALELEMENT_H
20 
21 #include "Element.h"
22 
30 class GraphicalElement : public Element
31 {
32  public:
35 };
36 
37 #endif // GRAPHICALELEMENT_H
Abstract class for graphical elements shown with power elements in workspace.
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
-
- - - - diff --git a/docs/doxygen/html/_i_o_control_8cpp_source.html b/docs/doxygen/html/_i_o_control_8cpp_source.html deleted file mode 100644 index c4f6ddf..0000000 --- a/docs/doxygen/html/_i_o_control_8cpp_source.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - -Project/IOControl.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
IOControl.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "IOControl.h"
19 #include "IOControlForm.h"
20 
21 IOControl::IOControl(int ioFlags, int id) : ControlElement(id)
22 {
23  m_ioFlags = ioFlags;
24 
25  Node* node = new Node(m_position, Node::NODE_IN, m_borderSize);
26  m_nodeList.push_back(node);
27 
28  if(ioFlags & IN_TERMINAL_VOLTAGE)
29  SetValue(IN_TERMINAL_VOLTAGE);
30  else if(ioFlags & IN_VELOCITY)
31  SetValue(IN_VELOCITY);
32  node->StartMove(m_position);
33 }
34 
35 IOControl::~IOControl()
36 {
37  if(m_glText) delete m_glText;
38 }
39 
40 void IOControl::Draw(wxPoint2DDouble translation, double scale) const
41 {
42  std::vector<wxPoint2DDouble> pts;
43  if(m_angle == 0.0) {
44  pts.push_back(m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize));
45  pts.push_back(m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize - 10, m_borderSize));
46  pts.push_back(m_position + wxPoint2DDouble(m_width / 2 - m_borderSize, 0));
47  pts.push_back(m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize - 10, -m_borderSize));
48  pts.push_back(m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize));
49  } else if(m_angle == 90.0) {
50  pts.push_back(m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize));
51  pts.push_back(m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize));
52  pts.push_back(m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize - 10));
53  pts.push_back(m_position + wxPoint2DDouble(0, m_height / 2 - m_borderSize));
54  pts.push_back(m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize - 10));
55  } else if(m_angle == 180.0) {
56  pts.push_back(m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize + 10, m_borderSize));
57  pts.push_back(m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize));
58  pts.push_back(m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize));
59  pts.push_back(m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize + 10, -m_borderSize));
60  pts.push_back(m_position + wxPoint2DDouble(-m_width / 2 + m_borderSize, 0));
61  } else if(m_angle == 270.0) {
62  pts.push_back(m_position + wxPoint2DDouble(0, -m_height / 2 + m_borderSize));
63  pts.push_back(m_rect.GetRightTop() + wxPoint2DDouble(-m_borderSize, m_borderSize + 10));
64  pts.push_back(m_rect.GetRightBottom() + wxPoint2DDouble(-m_borderSize, -m_borderSize));
65  pts.push_back(m_rect.GetLeftBottom() + wxPoint2DDouble(m_borderSize, -m_borderSize));
66  pts.push_back(m_rect.GetLeftTop() + wxPoint2DDouble(m_borderSize, m_borderSize + 10));
67  }
68 
69  if(m_selected) {
70  glColor4dv(m_selectionColour.GetRGBA());
71  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
72  std::vector<wxPoint2DDouble> selPts = pts;
73  if(m_angle == 0.0) {
74  selPts[0] += wxPoint2DDouble(-borderSize / 2, -borderSize / 2);
75  selPts[1] += wxPoint2DDouble(borderSize / 2, -borderSize / 2);
76  selPts[2] += wxPoint2DDouble(1.5 * borderSize / 2, 0);
77  selPts[3] += wxPoint2DDouble(borderSize / 2, borderSize / 2);
78  selPts[4] += wxPoint2DDouble(-borderSize / 2, borderSize / 2);
79  } else if(m_angle == 90.0) {
80  selPts[0] += wxPoint2DDouble(-borderSize / 2, -borderSize / 2);
81  selPts[1] += wxPoint2DDouble(borderSize / 2, -borderSize / 2);
82  selPts[2] += wxPoint2DDouble(borderSize / 2, borderSize / 2);
83  selPts[3] += wxPoint2DDouble(0, 1.5 * borderSize / 2);
84  selPts[4] += wxPoint2DDouble(-borderSize / 2, borderSize / 2);
85  } else if(m_angle == 180.0) {
86  selPts[0] += wxPoint2DDouble(-borderSize / 2, -borderSize / 2);
87  selPts[1] += wxPoint2DDouble(borderSize / 2, -borderSize / 2);
88  selPts[2] += wxPoint2DDouble(borderSize / 2, borderSize / 2);
89  selPts[3] += wxPoint2DDouble(-borderSize / 2, borderSize / 2);
90  selPts[4] += wxPoint2DDouble(-1.5 * borderSize / 2, 0);
91  } else if(m_angle == 270.0) {
92  selPts[0] += wxPoint2DDouble(0, -1.5 * borderSize / 2);
93  selPts[1] += wxPoint2DDouble(borderSize / 2, -borderSize / 2);
94  selPts[2] += wxPoint2DDouble(borderSize / 2, borderSize / 2);
95  selPts[3] += wxPoint2DDouble(-borderSize / 2, borderSize / 2);
96  selPts[4] += wxPoint2DDouble(-borderSize / 2, -borderSize / 2);
97  }
98  DrawLine(selPts, GL_POLYGON);
99  }
100  glLineWidth(1.0);
101  glColor4d(1.0, 1.0, 1.0, 1.0);
102  DrawLine(pts, GL_POLYGON);
103  glColor4d(0.0, 0.0, 0.0, 1.0);
104  DrawLine(pts, GL_LINE_LOOP);
105 
106  // Plot number.
107  glColor4d(0.0, 0.0, 0.0, 1.0);
108  if(m_angle == 0.0) {
109  m_glText->Draw(m_position + wxPoint2DDouble(-5.0, 0.0));
110  } else if(m_angle == 90.0) {
111  m_glText->Draw(m_position + wxPoint2DDouble(0.0, -5.0));
112  } else if(m_angle == 180.0) {
113  m_glText->Draw(m_position + wxPoint2DDouble(5.0, 0.0));
114  } else if(m_angle == 270.0) {
115  m_glText->Draw(m_position + wxPoint2DDouble(0.0, 5.0));
116  }
117 
118  glColor4d(0.0, 0.0, 0.0, 1.0);
119  DrawNodes();
120 }
121 
122 bool IOControl::ShowForm(wxWindow* parent, Element* element)
123 {
124  IOControlForm* form = new IOControlForm(parent, this);
125  if(form->ShowModal() == wxID_OK) {
126  form->Destroy();
127  return true;
128  }
129  form->Destroy();
130  return false;
131 }
132 
133 void IOControl::Rotate(bool clockwise)
134 {
135  if(clockwise)
136  m_angle += 90.0;
137  else
138  m_angle -= 90.0;
139  if(m_angle >= 360.0)
140  m_angle = 0.0;
141  else if(m_angle < 0)
142  m_angle = 270.0;
143 
144  UpdatePoints();
145 
146  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
147  Node* node = *it;
148  node->Rotate(clockwise);
149  }
150 }
151 
152 wxString IOControl::GenerateText()
153 {
154  wxString omega = wxString::FromUTF8("\xCF\x89");
155  wxString subZero = wxString::FromUTF8("\xE2\x82\x92");
156  wxString capDelta = wxString::FromUTF8("\xCE\x94");
157 
158  switch(m_value) {
159  case IN_TERMINAL_VOLTAGE: {
160  m_ioNodeType = Node::NODE_OUT;
161  return _("Vt");
162  } break;
163  case IN_VELOCITY: {
164  m_ioNodeType = Node::NODE_OUT;
165  return omega;
166  } break;
167  case IN_ACTIVE_POWER: {
168  m_ioNodeType = Node::NODE_OUT;
169  return _("P");
170  } break;
171  case IN_REACTIVE_POWER: {
172  m_ioNodeType = Node::NODE_OUT;
173  return _("Q");
174  } break;
175  case OUT_FIELD_VOLTAGE: {
176  m_ioNodeType = Node::NODE_IN;
177  return _("Vf");
178  } break;
179  case OUT_MEC_POWER: {
180  m_ioNodeType = Node::NODE_IN;
181  return _("Pm");
182  } break;
183  case IN_INITIAL_TERMINAL_VOLTAGE: {
184  m_ioNodeType = Node::NODE_OUT;
185  return _("Vt") + subZero;
186  } break;
187  case IN_INITIAL_MEC_POWER: {
188  m_ioNodeType = Node::NODE_OUT;
189  return _("Pm") + subZero;
190  } break;
191  case IN_INITIAL_VELOCITY: {
192  m_ioNodeType = Node::NODE_OUT;
193  return omega + subZero;
194  } break;
195  case IN_DELTA_VELOCITY: {
196  m_ioNodeType = Node::NODE_OUT;
197  return capDelta + omega;
198  } break;
199  case IN_DELTA_ACTIVE_POWER: {
200  m_ioNodeType = Node::NODE_OUT;
201  return capDelta + _("P");
202  } break;
203  }
204  return "";
205 }
206 
207 void IOControl::SetValue(IOFlags value)
208 {
209  m_value = value;
210  wxString text = GenerateText();
211 
212  if(m_glText)
213  m_glText->SetText(text);
214  else
215  m_glText = new OpenGLText(text);
216 
217  m_width = m_glText->GetWidth() + 10 + 2 * m_borderSize;
218  m_height = m_glText->GetHeight() + 10 + 2 * m_borderSize;
219 
220  SetPosition(m_position); // Update rectangle.
221 
222  UpdatePoints();
223 }
224 
225 void IOControl::UpdatePoints()
226 {
227  if(m_nodeList.size() != 0) {
228  Node* node = m_nodeList[0];
229  if(node->GetNodeType() != m_ioNodeType) {
230  // Rotate 180 degrees
231  node->Rotate();
232  node->Rotate();
233  }
234  node->SetNodeType(m_ioNodeType);
235  if(m_angle == 0.0) {
236  if(m_ioNodeType == Node::NODE_IN)
237  node->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
238  else
239  node->SetPosition(m_position + wxPoint2DDouble(m_width / 2 - 2, 0));
240  } else if(m_angle == 90.0) {
241  if(m_ioNodeType == Node::NODE_IN)
242  node->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
243  else
244  node->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2 - 2));
245  } else if(m_angle == 180.0) {
246  if(m_ioNodeType == Node::NODE_IN)
247  node->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
248  else
249  node->SetPosition(m_position + wxPoint2DDouble(2 - m_width / 2, 0));
250  } else if(m_angle == 270.0) {
251  if(m_ioNodeType == Node::NODE_IN)
252  node->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
253  else
254  node->SetPosition(m_position + wxPoint2DDouble(0, 2 - m_height / 2));
255  }
256  }
257 }
258 
260 {
261  IOControl* copy = new IOControl(m_ioFlags, m_elementID);
262  *copy = *this;
263  copy->m_glText = m_glText->GetCopy();
264  return copy;
265 }
266 
268 {
269  SetValue(m_value);
270  if(!m_glText->IsTextureOK()) return false;
271  return true;
272 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void DrawLine(std::vector< wxPoint2DDouble > points, GLenum mode=GL_LINE_STRIP) const
Draw line.
Definition: Element.cpp:89
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: IOControl.cpp:133
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
Definition: IOControl.cpp:267
-
Provides the communication with the power element.
Definition: IOControl.h:35
- -
virtual Element * GetCopy()
Get a the element copy.
Definition: IOControl.cpp:259
-
void SetPosition(const wxPoint2DDouble position)
Set the element position and update the rectangle.
Definition: Element.cpp:25
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: IOControl.cpp:122
-
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: IOControl.cpp:40
- -
Form to edit the input/output control data.
Definition: IOControlForm.h:31
- -
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
-
- - - - diff --git a/docs/doxygen/html/_i_o_control_8h.html b/docs/doxygen/html/_i_o_control_8h.html index 119082e..fc6fa27 100644 --- a/docs/doxygen/html/_i_o_control_8h.html +++ b/docs/doxygen/html/_i_o_control_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_i_o_control_8h.html','');});
IOControl.h File Reference
-
#include "ControlElement.h"
+
#include "ControlElement.h"
#include <wx/dcscreen.h>
-#include "OpenGLText.h"
-
-

Go to the source code of this file.

- +#include "OpenGLText.h"
+
diff --git a/docs/doxygen/html/_i_o_control_8h_source.html b/docs/doxygen/html/_i_o_control_8h_source.html deleted file mode 100644 index 7090270..0000000 --- a/docs/doxygen/html/_i_o_control_8h_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -Project/IOControl.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  IOControl
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
IOControl.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef IOCONTROL_H
19 #define IOCONTROL_H
20 
21 #include "ControlElement.h"
22 
23 #include <wx/dcscreen.h>
24 #include "OpenGLText.h"
25 
26 class IOControlForm;
27 
35 class IOControl : public ControlElement
36 {
37  public:
38  enum IOFlags {
39  IN_TERMINAL_VOLTAGE = 1 << 0,
40  IN_VELOCITY = 1 << 1,
41  IN_ACTIVE_POWER = 1 << 2,
42  IN_REACTIVE_POWER = 1 << 3,
43  OUT_FIELD_VOLTAGE = 1 << 4,
44  OUT_MEC_POWER = 1 << 5,
45  IN_INITIAL_TERMINAL_VOLTAGE = 1 << 6,
46  IN_INITIAL_MEC_POWER = 1 << 7,
47  IN_INITIAL_VELOCITY = 1 << 8,
48  IN_DELTA_VELOCITY = 1 << 9,
49  IN_DELTA_ACTIVE_POWER = 1 << 10,
50  };
51 
52  IOControl(int ioFlags, int id);
53  ~IOControl();
54 
55  virtual void Draw(wxPoint2DDouble translation, double scale) const;
56  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
57  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
58  virtual bool ShowForm(wxWindow* parent, Element* element);
59  virtual void Rotate(bool clockwise = true);
60  virtual bool UpdateText();
61  virtual wxString GenerateText();
62  virtual void UpdatePoints();
63 
64  virtual IOFlags GetValue() const { return m_value; }
65  virtual void SetValue(IOFlags value);
66  virtual int GetIOFlags() const { return m_ioFlags; }
67  virtual Node::NodeType GetType() { return m_ioNodeType; }
68  virtual Element* GetCopy();
69 
70  protected:
71  IOFlags m_value;
72  int m_ioFlags;
73 
74  Node::NodeType m_ioNodeType = Node::NODE_IN;
75 
76  OpenGLText* m_glText = NULL;
77 };
78 
79 #endif // IOCONTROL_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: IOControl.h:56
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: IOControl.cpp:133
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
Definition: IOControl.cpp:267
-
Provides the communication with the power element.
Definition: IOControl.h:35
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: IOControl.h:57
- -
virtual Element * GetCopy()
Get a the element copy.
Definition: IOControl.cpp:259
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: IOControl.cpp:122
-
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: IOControl.cpp:40
-
Base class of a control element. Provide general methods to other control classes.
-
Form to edit the input/output control data.
Definition: IOControlForm.h:31
- -
-
- - - - diff --git a/docs/doxygen/html/_i_o_control_form_8cpp_source.html b/docs/doxygen/html/_i_o_control_form_8cpp_source.html deleted file mode 100644 index 82b4948..0000000 --- a/docs/doxygen/html/_i_o_control_form_8cpp_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/IOControlForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
IOControlForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "IOControlForm.h"
19 
20 IOControlForm::IOControlForm(wxWindow* parent, IOControl* ioControl) : IOControlFormBase(parent)
21 {
22  SetSize(GetBestSize());
23 
24  m_parent = parent;
25  m_ioControl = ioControl;
26 
27  int ioFlags = m_ioControl->GetIOFlags();
28  int inChoiceNumber = -1;
29  int outChoiceNumber = -1;
30 
31  if(ioFlags & IOControl::IN_TERMINAL_VOLTAGE) {
32  m_choiceInput->Append(_("Terminal voltage"));
33  m_inputFlags.push_back(IOControl::IN_TERMINAL_VOLTAGE);
34  if(m_ioControl->GetValue() == IOControl::IN_TERMINAL_VOLTAGE) inChoiceNumber = (int)m_inputFlags.size() - 1;
35  }
36  if(ioFlags & IOControl::IN_VELOCITY) {
37  m_choiceInput->Append(_("Velocity"));
38  m_inputFlags.push_back(IOControl::IN_VELOCITY);
39  if(m_ioControl->GetValue() == IOControl::IN_VELOCITY) inChoiceNumber = (int)m_inputFlags.size() - 1;
40  }
41  if(ioFlags & IOControl::IN_ACTIVE_POWER) {
42  m_choiceInput->Append(_("Active power"));
43  m_inputFlags.push_back(IOControl::IN_ACTIVE_POWER);
44  if(m_ioControl->GetValue() == IOControl::IN_ACTIVE_POWER) inChoiceNumber = (int)m_inputFlags.size() - 1;
45  }
46  if(ioFlags & IOControl::IN_REACTIVE_POWER) {
47  m_choiceInput->Append(_("Reactive power"));
48  m_inputFlags.push_back(IOControl::IN_REACTIVE_POWER);
49  if(m_ioControl->GetValue() == IOControl::IN_REACTIVE_POWER) inChoiceNumber = (int)m_inputFlags.size() - 1;
50  }
51  if(ioFlags & IOControl::OUT_FIELD_VOLTAGE) {
52  m_choiceOutput->Append(_("Field voltage"));
53  m_outputFlags.push_back(IOControl::OUT_FIELD_VOLTAGE);
54  if(m_ioControl->GetValue() == IOControl::OUT_FIELD_VOLTAGE) outChoiceNumber = (int)m_outputFlags.size() - 1;
55  }
56  if(ioFlags & IOControl::OUT_MEC_POWER) {
57  m_choiceOutput->Append(_("Mechanical power"));
58  m_outputFlags.push_back(IOControl::OUT_MEC_POWER);
59  if(m_ioControl->GetValue() == IOControl::OUT_MEC_POWER) outChoiceNumber = (int)m_outputFlags.size() - 1;
60  }
61 
62  if(ioFlags & IOControl::IN_INITIAL_MEC_POWER) {
63  m_choiceInput->Append(_("Initial mechanical power"));
64  m_inputFlags.push_back(IOControl::IN_INITIAL_MEC_POWER);
65  if(m_ioControl->GetValue() == IOControl::IN_INITIAL_MEC_POWER) inChoiceNumber = (int)m_inputFlags.size() - 1;
66  }
67 
68  if(ioFlags & IOControl::IN_INITIAL_TERMINAL_VOLTAGE) {
69  m_choiceInput->Append(_("Initial terminal voltage"));
70  m_inputFlags.push_back(IOControl::IN_INITIAL_TERMINAL_VOLTAGE);
71  if(m_ioControl->GetValue() == IOControl::IN_INITIAL_TERMINAL_VOLTAGE)
72  inChoiceNumber = (int)m_inputFlags.size() - 1;
73  }
74 
75  if(ioFlags & IOControl::IN_INITIAL_VELOCITY) {
76  m_choiceInput->Append(_("Initial velocity"));
77  m_inputFlags.push_back(IOControl::IN_INITIAL_VELOCITY);
78  if(m_ioControl->GetValue() == IOControl::IN_INITIAL_VELOCITY) inChoiceNumber = (int)m_inputFlags.size() - 1;
79  }
80 
81  if(ioFlags & IOControl::IN_DELTA_VELOCITY) {
82  m_choiceInput->Append(_("Velocity variation"));
83  m_inputFlags.push_back(IOControl::IN_DELTA_VELOCITY);
84  if(m_ioControl->GetValue() == IOControl::IN_DELTA_VELOCITY) inChoiceNumber = (int)m_inputFlags.size() - 1;
85  }
86 
87  if(ioFlags & IOControl::IN_DELTA_ACTIVE_POWER) {
88  m_choiceInput->Append(_("Active power variation"));
89  m_inputFlags.push_back(IOControl::IN_DELTA_ACTIVE_POWER);
90  if(m_ioControl->GetValue() == IOControl::IN_DELTA_ACTIVE_POWER) inChoiceNumber = (int)m_inputFlags.size() - 1;
91  }
92 
93  if(inChoiceNumber != -1) {
94  m_choiceInput->SetSelection(inChoiceNumber);
95  m_checkBoxInput->SetValue(true);
96  m_checkBoxOutput->SetValue(false);
97  m_choiceOutput->Enable(false);
98  } else {
99  m_choiceOutput->SetSelection(outChoiceNumber);
100  m_checkBoxInput->SetValue(false);
101  m_checkBoxOutput->SetValue(true);
102  m_choiceInput->Enable(false);
103  }
104 }
105 
106 IOControlForm::~IOControlForm() {}
107 void IOControlForm::OnOKButtonClick(wxCommandEvent& event)
108 {
109  if(ValidateData()) EndModal(wxID_OK);
110 }
111 
112 bool IOControlForm::ValidateData()
113 {
114  if(m_checkBoxInput->GetValue() && m_choiceInput->GetSelection() != -1) {
115  m_ioControl->SetValue(m_inputFlags[m_choiceInput->GetSelection()]);
116  return true;
117  } else if(m_checkBoxOutput->GetValue() && m_choiceOutput->GetSelection() != -1) {
118  m_ioControl->SetValue(m_outputFlags[m_choiceOutput->GetSelection()]);
119  return true;
120  }
121 
122  return false;
123 }
124 
125 void IOControlForm::OnInputChecked(wxCommandEvent& event)
126 {
127  m_checkBoxInput->SetValue(true);
128  m_checkBoxOutput->SetValue(false);
129  m_choiceOutput->Enable(false);
130  m_choiceInput->Enable(true);
131 }
132 
133 void IOControlForm::OnOutputChecked(wxCommandEvent& event)
134 {
135  m_checkBoxOutput->SetValue(true);
136  m_checkBoxInput->SetValue(false);
137  m_choiceOutput->Enable(true);
138  m_choiceInput->Enable(false);
139 }
-
Provides the communication with the power element.
Definition: IOControl.h:35
- -
-
- - - - diff --git a/docs/doxygen/html/_i_o_control_form_8h.html b/docs/doxygen/html/_i_o_control_form_8h.html index dac7afb..8bf3bdf 100644 --- a/docs/doxygen/html/_i_o_control_form_8h.html +++ b/docs/doxygen/html/_i_o_control_form_8h.html @@ -90,11 +90,9 @@ $(document).ready(function(){initNavTree('_i_o_control_form_8h.html','');});
IOControlForm.h File Reference
-
#include "ElementForm.h"
-#include "IOControl.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+#include "IOControl.h"
+
diff --git a/docs/doxygen/html/_i_o_control_form_8h_source.html b/docs/doxygen/html/_i_o_control_form_8h_source.html deleted file mode 100644 index 55acd09..0000000 --- a/docs/doxygen/html/_i_o_control_form_8h_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/IOControlForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  IOControlForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
IOControlForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef IOCONTROLFORM_H
19 #define IOCONTROLFORM_H
20 
21 #include "ElementForm.h"
22 #include "IOControl.h"
23 
32 {
33  public:
34  IOControlForm(wxWindow* parent, IOControl* ioControl);
35  virtual ~IOControlForm();
36 
37  virtual bool ValidateData();
38 
39  protected:
40  virtual void OnInputChecked(wxCommandEvent& event);
41  virtual void OnOutputChecked(wxCommandEvent& event);
42  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); };
43  virtual void OnOKButtonClick(wxCommandEvent& event);
44 
45  wxWindow* m_parent;
46  IOControl* m_ioControl;
47 
48  std::vector<IOControl::IOFlags> m_inputFlags;
49  std::vector<IOControl::IOFlags> m_outputFlags;
50 };
51 #endif // IOCONTROLFORM_H
-
Provides the communication with the power element.
Definition: IOControl.h:35
- -
Form to edit the input/output control data.
Definition: IOControlForm.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_ind_motor_8cpp_source.html b/docs/doxygen/html/_ind_motor_8cpp_source.html deleted file mode 100644 index 3b97823..0000000 --- a/docs/doxygen/html/_ind_motor_8cpp_source.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - -Project/IndMotor.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
IndMotor.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "IndMotorForm.h"
19 #include "IndMotor.h"
20 
21 IndMotor::IndMotor() : Machines() {}
22 IndMotor::IndMotor(wxString name) : Machines() { m_electricalData.name = name; }
23 IndMotor::~IndMotor() {}
24 void IndMotor::DrawSymbol() const
25 {
26  std::vector<wxPoint2DDouble> mPts;
27  mPts.push_back(wxPoint2DDouble(-10, 13) + m_position);
28  mPts.push_back(wxPoint2DDouble(-10, -13) + m_position);
29  mPts.push_back(wxPoint2DDouble(0, 2) + m_position);
30  mPts.push_back(wxPoint2DDouble(10, -13) + m_position);
31  mPts.push_back(wxPoint2DDouble(10, 13) + m_position);
32  DrawLine(mPts);
33 }
34 
35 bool IndMotor::GetContextMenu(wxMenu& menu)
36 {
37  menu.Append(ID_EDIT_ELEMENT, _("Edit induction motor"));
38  GeneralMenuItens(menu);
39  return true;
40 }
41 
42 bool IndMotor::ShowForm(wxWindow* parent, Element* element)
43 {
44  IndMotorForm* indMotorForm = new IndMotorForm(parent, this);
45  if(indMotorForm->ShowModal() == wxID_OK) {
46  indMotorForm->Destroy();
47  return true;
48  }
49  indMotorForm->Destroy();
50  return false;
51 }
52 
53 IndMotorElectricalData IndMotor::GetPUElectricalData(double systemPowerBase)
54 {
55  IndMotorElectricalData data = m_electricalData;
56 
57  switch(data.activePowerUnit) {
58  case UNIT_W: {
59  data.activePower = data.activePower / systemPowerBase;
60  data.activePowerUnit = UNIT_PU;
61  } break;
62  case UNIT_kW: {
63  data.activePower = (data.activePower * 1e3) / systemPowerBase;
64  data.activePowerUnit = UNIT_PU;
65  } break;
66  case UNIT_MW: {
67  data.activePower = (data.activePower * 1e6) / systemPowerBase;
68  data.activePowerUnit = UNIT_PU;
69  } break;
70  default:
71  break;
72  }
73  switch(data.reactivePowerUnit) {
74  case UNIT_VAr: {
75  data.reactivePower = data.reactivePower / systemPowerBase;
76  data.reactivePowerUnit = UNIT_PU;
77  } break;
78  case UNIT_kVAr: {
79  data.reactivePower = (data.reactivePower * 1e3) / systemPowerBase;
80  data.reactivePowerUnit = UNIT_PU;
81  } break;
82  case UNIT_MVAr: {
83  data.reactivePower = (data.reactivePower * 1e6) / systemPowerBase;
84  data.reactivePowerUnit = UNIT_PU;
85  } break;
86  default:
87  break;
88  }
89 
90  return data;
91 }
92 
94 {
95  IndMotor* copy = new IndMotor();
96  *copy = *this;
97  return copy;
98 }
99 
100 wxString IndMotor::GetTipText() const
101 {
102  wxString tipText = m_electricalData.name;
103  tipText += "\n";
104  double activePower = m_electricalData.activePower;
105  if(!m_online) activePower = 0.0;
106  tipText += _("\nP = ") + wxString::FromDouble(activePower, 5);
107  switch(m_electricalData.activePowerUnit) {
108  case UNIT_PU: {
109  tipText += _(" p.u.");
110  } break;
111  case UNIT_W: {
112  tipText += _(" W");
113  } break;
114  case UNIT_kW: {
115  tipText += _(" kW");
116  } break;
117  case UNIT_MW: {
118  tipText += _(" MW");
119  } break;
120  default:
121  break;
122  }
123  double reactivePower = m_electricalData.reactivePower;
124  if(!m_online) reactivePower = 0.0;
125  tipText += _("\nQ = ") + wxString::FromDouble(reactivePower, 5);
126  switch(m_electricalData.reactivePowerUnit) {
127  case UNIT_PU: {
128  tipText += _(" p.u.");
129  } break;
130  case UNIT_VAr: {
131  tipText += _(" VAr");
132  } break;
133  case UNIT_kVAr: {
134  tipText += _(" kVAr");
135  } break;
136  case UNIT_MVAr: {
137  tipText += _(" MVAr");
138  } break;
139  default:
140  break;
141  }
142 
143  return tipText;
144 }
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
virtual void DrawLine(std::vector< wxPoint2DDouble > points, GLenum mode=GL_LINE_STRIP) const
Draw line.
Definition: Element.cpp:89
- -
virtual wxString GetTipText() const
Get the tip text.
Definition: IndMotor.cpp:100
- - -
virtual void GeneralMenuItens(wxMenu &menu)
Insert general itens to context menu.
Definition: Element.cpp:245
- - - - -
virtual Element * GetCopy()
Get a the element copy.
Definition: IndMotor.cpp:93
-
Induction motor power element.
Definition: IndMotor.h:40
- -
Abstract class for rotary machines power elements.
Definition: Machines.h:33
-
Form to edit the induction motor power data.
Definition: IndMotorForm.h:31
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: IndMotor.cpp:42
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: IndMotor.cpp:35
- -
-
- - - - diff --git a/docs/doxygen/html/_ind_motor_8h.html b/docs/doxygen/html/_ind_motor_8h.html index eee2bbb..47c5593 100644 --- a/docs/doxygen/html/_ind_motor_8h.html +++ b/docs/doxygen/html/_ind_motor_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_ind_motor_8h.html','');});
IndMotor.h File Reference
-
#include "Machines.h"
-
-

Go to the source code of this file.

- +
#include "Machines.h"
+
diff --git a/docs/doxygen/html/_ind_motor_8h_source.html b/docs/doxygen/html/_ind_motor_8h_source.html deleted file mode 100644 index cca021d..0000000 --- a/docs/doxygen/html/_ind_motor_8h_source.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - -Project/IndMotor.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  IndMotorElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
IndMotor.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef INDMOTOR_H
19 #define INDMOTOR_H
20 
21 #include "Machines.h"
22 
23 class IndMotorForm;
24 
26  wxString name;
27  double activePower = 100.0;
28  ElectricalUnit activePowerUnit = UNIT_MW;
29  double reactivePower = 0.0;
30  ElectricalUnit reactivePowerUnit = UNIT_MVAr;
31 };
32 
40 class IndMotor : public Machines
41 {
42  public:
43  IndMotor();
44  IndMotor(wxString name);
45  ~IndMotor();
46 
47  virtual Element* GetCopy();
48  virtual void DrawSymbol() const;
49  virtual bool GetContextMenu(wxMenu& menu);
50  virtual wxString GetTipText() const;
51  virtual bool ShowForm(wxWindow* parent, Element* element);
52  virtual IndMotorElectricalData GetElectricalData() { return m_electricalData; }
53  virtual IndMotorElectricalData GetPUElectricalData(double systemPowerBase);
54  virtual void SetElectricalData(IndMotorElectricalData electricalData) { m_electricalData = electricalData; }
55  protected:
56  IndMotorElectricalData m_electricalData;
57 };
58 
59 #endif // INDMOTOR_H
- -
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- -
Induction motor power element.
Definition: IndMotor.h:40
-
Abstract class for rotary machines power elements.
Definition: Machines.h:33
-
Form to edit the induction motor power data.
Definition: IndMotorForm.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_ind_motor_form_8cpp_source.html b/docs/doxygen/html/_ind_motor_form_8cpp_source.html deleted file mode 100644 index a547072..0000000 --- a/docs/doxygen/html/_ind_motor_form_8cpp_source.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - -Project/IndMotorForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
IndMotorForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "IndMotorForm.h"
19 #include "IndMotor.h"
20 
21 IndMotorForm::IndMotorForm(wxWindow* parent, IndMotor* indMotor) : IndMotorFormBase(parent)
22 {
23  SetSize(GetBestSize());
24  m_buttonStabButton->Enable(false);
25  IndMotorElectricalData data = indMotor->GetElectricalData();
26 
27  m_textCtrlName->SetValue(data.name);
28 
29  m_textCtrlActivePower->SetValue(IndMotor::StringFromDouble(data.activePower));
30  switch(data.activePowerUnit) {
31  case UNIT_PU: {
32  m_choiceActivePower->SetSelection(0);
33  } break;
34  case UNIT_W: {
35  m_choiceActivePower->SetSelection(1);
36  } break;
37  case UNIT_kW: {
38  m_choiceActivePower->SetSelection(2);
39  } break;
40  case UNIT_MW: {
41  m_choiceActivePower->SetSelection(3);
42  } break;
43  default:
44  break;
45  }
46 
47  m_textCtrlReactivePower->SetValue(IndMotor::StringFromDouble(data.reactivePower));
48  switch(data.reactivePowerUnit) {
49  case UNIT_PU: {
50  m_choiceReactivePower->SetSelection(0);
51  } break;
52  case UNIT_VAr: {
53  m_choiceReactivePower->SetSelection(1);
54  } break;
55  case UNIT_kVAr: {
56  m_choiceReactivePower->SetSelection(2);
57  } break;
58  case UNIT_MVAr: {
59  m_choiceReactivePower->SetSelection(3);
60  } break;
61  default:
62  break;
63  }
64 
65  m_parent = parent;
66  m_indMotor = indMotor;
67 }
68 
69 IndMotorForm::~IndMotorForm() {}
70 void IndMotorForm::OnOKButtonClick(wxCommandEvent& event)
71 {
72  if(ValidateData()) EndModal(wxID_OK);
73 }
74 void IndMotorForm::OnStabilityButtonClick(wxCommandEvent& event)
75 {
76  // TODO: Induction motor stability form
77 }
78 
79 bool IndMotorForm::ValidateData()
80 {
82 
83  data.name = m_textCtrlName->GetValue();
84 
85  if(!m_indMotor->DoubleFromString(m_parent, m_textCtrlActivePower->GetValue(), data.activePower,
86  _("Value entered incorrectly in the field \"Active power\".")))
87  return false;
88  switch(m_choiceActivePower->GetSelection()) {
89  case 0: {
90  data.activePowerUnit = UNIT_PU;
91  } break;
92  case 1: {
93  data.activePowerUnit = UNIT_W;
94  } break;
95  case 2: {
96  data.activePowerUnit = UNIT_kW;
97  } break;
98  case 3: {
99  data.activePowerUnit = UNIT_MW;
100  } break;
101  }
102 
103  if(!m_indMotor->DoubleFromString(m_parent, m_textCtrlReactivePower->GetValue(), data.reactivePower,
104  _("Value entered incorrectly in the field \"Reactive power\".")))
105  return false;
106  switch(m_choiceReactivePower->GetSelection()) {
107  case 0: {
108  data.reactivePowerUnit = UNIT_PU;
109  } break;
110  case 1: {
111  data.reactivePowerUnit = UNIT_VAr;
112  } break;
113  case 2: {
114  data.reactivePowerUnit = UNIT_kVAr;
115  } break;
116  case 3: {
117  data.reactivePowerUnit = UNIT_MVAr;
118  } break;
119  }
120 
121  m_indMotor->SetElectricalData(data);
122  return true;
123 }
- - - - - - - - -
Induction motor power element.
Definition: IndMotor.h:40
- -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- -
-
- - - - diff --git a/docs/doxygen/html/_ind_motor_form_8h.html b/docs/doxygen/html/_ind_motor_form_8h.html index 404c7ed..b61ca8b 100644 --- a/docs/doxygen/html/_ind_motor_form_8h.html +++ b/docs/doxygen/html/_ind_motor_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_ind_motor_form_8h.html','');});
IndMotorForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_ind_motor_form_8h_source.html b/docs/doxygen/html/_ind_motor_form_8h_source.html deleted file mode 100644 index b1f254f..0000000 --- a/docs/doxygen/html/_ind_motor_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/IndMotorForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  IndMotorForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
IndMotorForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef INDMOTORFORM_H
19 #define INDMOTORFORM_H
20 #include "ElementForm.h"
21 
22 class IndMotor;
23 
32 {
33  public:
34  IndMotorForm(wxWindow* parent, IndMotor* indMotor);
35  virtual ~IndMotorForm();
36  virtual bool ValidateData();
37 
38  protected:
39  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); };
40  virtual void OnOKButtonClick(wxCommandEvent& event);
41  virtual void OnStabilityButtonClick(wxCommandEvent& event);
42 
43  wxWindow* m_parent = NULL;
44  IndMotor* m_indMotor = NULL;
45 };
46 #endif // INDMOTORFORM_H
-
Induction motor power element.
Definition: IndMotor.h:40
-
Form to edit the induction motor power data.
Definition: IndMotorForm.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_inductor_8cpp_source.html b/docs/doxygen/html/_inductor_8cpp_source.html deleted file mode 100644 index ec93e1b..0000000 --- a/docs/doxygen/html/_inductor_8cpp_source.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - -Project/Inductor.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Inductor.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
19 #include "Inductor.h"
20 
21 Inductor::Inductor() : Shunt() {}
22 Inductor::Inductor(wxString name) : Shunt() { m_electricalData.name = name; }
23 Inductor::~Inductor() {}
24 bool Inductor::AddParent(Element* parent, wxPoint2DDouble position)
25 {
26  if(parent) {
27  m_parentList.push_back(parent);
28  parent->AddChild(this);
29  wxPoint2DDouble parentPt =
30  parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position.
31  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
32  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back.
33 
34  m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus.
35  m_width = 20.0;
36  m_height = 70.0;
37  m_rect = wxRect2DDouble(m_position.m_x - m_width / 2.0, m_position.m_y - m_height / 2.0, m_width, m_height);
38 
39  m_pointList.push_back(parentPt);
40  m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_position));
41  m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -m_height / 2.0 - 10.0));
42  m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -m_height / 2.0));
43 
44  m_inserted = true;
45 
46  wxRect2DDouble genRect(0, 0, 0, 0);
47  m_switchRect.push_back(genRect); // Push a general rectangle.
48  UpdateSwitches();
49 
50  return true;
51  }
52  return false;
53 }
54 
55 void Inductor::Draw(wxPoint2DDouble translation, double scale) const
56 {
57  OpenGLColour elementColour;
58  if(m_online) {
59  if(m_dynEvent)
60  elementColour = m_dynamicEventColour;
61  else
62  elementColour = m_onlineElementColour;
63  } else
64  elementColour = m_offlineElementColour;
65 
66  if(m_inserted) {
67  if(m_selected) {
68  glLineWidth(1.5 + m_borderSize * 2.0);
69  glColor4dv(m_selectionColour.GetRGBA());
70 
71  DrawLine(m_pointList);
72 
73  glPushMatrix();
74  glTranslated(m_position.m_x, m_position.m_y, 0.0);
75  glRotated(m_angle, 0.0, 0.0, 1.0);
76  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
77 
78  DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 10.0), 10, 45, 270, 30, GL_LINE_STRIP);
79  DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 25.0), 10, 45, 315, 30, GL_LINE_STRIP);
80  DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 40.0), 10, 90, 315, 30, GL_LINE_STRIP);
81 
82  DrawGround(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 50.0));
83 
84  glPopMatrix();
85 
86  // Draw node selection.
87  DrawCircle(m_pointList[0], 5.0 + m_borderSize / scale, 10, GL_POLYGON);
88  }
89  // Draw Load (layer 2).
90  glLineWidth(1.5);
91  glColor4dv(elementColour.GetRGBA());
92  DrawCircle(m_pointList[0], 5.0, 10, GL_POLYGON);
93  DrawLine(m_pointList);
94 
95  DrawSwitches();
96 
97  glPushMatrix();
98  glTranslated(m_position.m_x, m_position.m_y, 0.0);
99  glRotated(m_angle, 0.0, 0.0, 1.0);
100  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
101 
102  glColor4dv(elementColour.GetRGBA());
103  DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 10.0), 10, 45, 270, 10, GL_LINE_STRIP);
104  DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 25.0), 10, 45, 315, 10, GL_LINE_STRIP);
105  DrawArc(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 40.0), 10, 90, 315, 10, GL_LINE_STRIP);
106 
107  DrawGround(m_position + wxPoint2DDouble(0, -m_height / 2.0 + 50.0));
108 
109  glPopMatrix();
110  }
111 }
112 
113 void Inductor::Rotate(bool clockwise)
114 {
115  double rotAngle = m_rotationAngle;
116  if(!clockwise) rotAngle = -m_rotationAngle;
117 
118  m_angle += rotAngle;
119  if(m_angle >= 360 || m_angle <= -360) m_angle = 0.0;
120  m_pointList[2] = RotateAtPosition(m_pointList[2], rotAngle);
121  m_pointList[3] = RotateAtPosition(m_pointList[3], rotAngle);
122  UpdateSwitchesPosition();
123 }
124 
125 bool Inductor::GetContextMenu(wxMenu& menu)
126 {
127  menu.Append(ID_EDIT_ELEMENT, _("Edit Inductor"));
128  GeneralMenuItens(menu);
129  return true;
130 }
131 
132 bool Inductor::Contains(wxPoint2DDouble position) const
133 {
134  wxPoint2DDouble ptR = RotateAtPosition(position, -m_angle);
135  return m_rect.Contains(ptR);
136 }
137 
138 bool Inductor::Intersects(wxRect2DDouble rect) const { return RotatedRectanglesIntersects(m_rect, rect, m_angle, 0.0); }
139 bool Inductor::ShowForm(wxWindow* parent, Element* element)
140 {
141  ReactiveShuntElementForm* capacitorForm = new ReactiveShuntElementForm(parent, this);
142  capacitorForm->SetTitle(_("Inductor"));
143  if(capacitorForm->ShowModal() == wxID_OK) {
144  capacitorForm->Destroy();
145  return true;
146  }
147  capacitorForm->Destroy();
148  return false;
149 }
150 
151 InductorElectricalData Inductor::GetPUElectricalData(double systemPowerBase)
152 {
153  InductorElectricalData data = m_electricalData;
154  switch(data.reactivePowerUnit) {
155  case UNIT_VAr: {
156  data.reactivePower = data.reactivePower / systemPowerBase;
157  data.reactivePowerUnit = UNIT_PU;
158  } break;
159  case UNIT_kVAr: {
160  data.reactivePower = (data.reactivePower * 1e3) / systemPowerBase;
161  data.reactivePowerUnit = UNIT_PU;
162  } break;
163  case UNIT_MVAr: {
164  data.reactivePower = (data.reactivePower * 1e6) / systemPowerBase;
165  data.reactivePowerUnit = UNIT_PU;
166  } break;
167  default:
168  break;
169  }
170 
171  return data;
172 }
173 
175 {
176  Inductor* copy = new Inductor();
177  *copy = *this;
178  return copy;
179 }
180 
181 wxString Inductor::GetTipText() const
182 {
183  wxString tipText = m_electricalData.name;
184 
185  // TODO: Avoid reactive power calculation.
186  double reactivePower = m_electricalData.reactivePower;
187  if(!m_online)
188  reactivePower = 0.0;
189  else {
190  std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetElectricalData().voltage;
191  reactivePower *= std::pow(std::abs(v), 2);
192  }
193  tipText += "\n";
194  tipText += _("\nQ = ") + wxString::FromDouble(reactivePower, 5);
195  switch(m_electricalData.reactivePowerUnit) {
196  case UNIT_PU: {
197  tipText += _(" p.u.");
198  } break;
199  case UNIT_VAr: {
200  tipText += _(" VAr");
201  } break;
202  case UNIT_kVAr: {
203  tipText += _(" kVAr");
204  } break;
205  case UNIT_MVAr: {
206  tipText += _(" MVAr");
207  } break;
208  default:
209  break;
210  }
211 
212  return tipText;
213 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Inductor.cpp:139
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
virtual wxString GetTipText() const
Get the tip text.
Definition: Inductor.cpp:181
- -
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Inductor.cpp:132
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Inductor.cpp:113
- -
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Inductor.cpp:174
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: Inductor.cpp:125
- -
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Inductor.cpp:55
-
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Inductor.cpp:24
- -
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
- - -
Class to manage color of OpenGL.
Definition: Element.h:67
- -
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Inductor.cpp:138
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
Inductor shunt power element.
Definition: Inductor.h:38
-
Abstract class for shunt power elements.
Definition: Shunt.h:31
-
Form to edit the reactive shunt element power data.
-
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
-
- - - - diff --git a/docs/doxygen/html/_inductor_8h.html b/docs/doxygen/html/_inductor_8h.html index 6328d39..fce0e23 100644 --- a/docs/doxygen/html/_inductor_8h.html +++ b/docs/doxygen/html/_inductor_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_inductor_8h.html','');});
Inductor.h File Reference
-
#include "Shunt.h"
-
-

Go to the source code of this file.

- +
#include "Shunt.h"
+
diff --git a/docs/doxygen/html/_inductor_8h_source.html b/docs/doxygen/html/_inductor_8h_source.html deleted file mode 100644 index d663b20..0000000 --- a/docs/doxygen/html/_inductor_8h_source.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - -Project/Inductor.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  InductorElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Inductor.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef INDUCTOR_H
19 #define INDUCTOR_H
20 
21 #include "Shunt.h"
22 
24 
26  wxString name;
27  double reactivePower = 100.0;
28  ElectricalUnit reactivePowerUnit = UNIT_MVAr;
29 };
30 
38 class Inductor : public Shunt
39 {
40  public:
41  Inductor();
42  Inductor(wxString name);
43  ~Inductor();
44 
45  virtual Element* GetCopy();
46  virtual bool AddParent(Element* parent, wxPoint2DDouble position);
47  virtual void Draw(wxPoint2DDouble translation, double scale) const;
48  virtual bool Contains(wxPoint2DDouble position) const;
49  virtual bool Intersects(wxRect2DDouble rect) const;
50  virtual void Rotate(bool clockwise = true);
51  virtual bool GetContextMenu(wxMenu& menu);
52  virtual wxString GetTipText() const;
53  virtual bool ShowForm(wxWindow* parent, Element* element);
54  virtual InductorElectricalData GetElectricalData() { return m_electricalData; }
55  virtual InductorElectricalData GetPUElectricalData(double systemPowerBase);
56  virtual void SetElectricalData(InductorElectricalData electricalData) { m_electricalData = electricalData; }
57  protected:
58  InductorElectricalData m_electricalData;
59 };
60 
61 #endif // INDUCTOR_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- - -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- -
Inductor shunt power element.
Definition: Inductor.h:38
-
Abstract class for shunt power elements.
Definition: Shunt.h:31
-
Form to edit the reactive shunt element power data.
-
-
- - - - diff --git a/docs/doxygen/html/_limiter_8cpp_source.html b/docs/doxygen/html/_limiter_8cpp_source.html deleted file mode 100644 index 39c92ff..0000000 --- a/docs/doxygen/html/_limiter_8cpp_source.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - -Project/Limiter.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Limiter.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Limiter.h"
19 #include "LimiterForm.h"
20 
21 Limiter::Limiter(int id) : ControlElement(id)
22 {
23  m_width = m_height = 36.0;
24  Node* nodeIn = new Node(m_position + wxPoint2DDouble(-18, 0), Node::NODE_IN, m_borderSize);
25  nodeIn->StartMove(m_position);
26  Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
27  nodeOut->SetAngle(180.0);
28  nodeOut->StartMove(m_position);
29  m_nodeList.push_back(nodeIn);
30  m_nodeList.push_back(nodeOut);
31 }
32 
33 Limiter::~Limiter() {}
34 void Limiter::Draw(wxPoint2DDouble translation, double scale) const
35 {
36  glLineWidth(1.0);
37  if(m_selected) {
38  glColor4dv(m_selectionColour.GetRGBA());
39  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
40  DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
41  }
42  glColor4d(1.0, 1.0, 1.0, 1.0);
43  DrawRectangle(m_position, m_width, m_height);
44  glColor4d(0.0, 0.0, 0.0, 1.0);
45  DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
46 
47  // Plot symbol.
48  glLineWidth(2.0);
49  std::vector<wxPoint2DDouble> limSymbol;
50  limSymbol.push_back(m_position + wxPoint2DDouble(10, -10));
51  limSymbol.push_back(m_position + wxPoint2DDouble(2, -10));
52  limSymbol.push_back(m_position + wxPoint2DDouble(-2, 10));
53  limSymbol.push_back(m_position + wxPoint2DDouble(-10, 10));
54  glColor4d(0.0, 0.3, 1.0, 1.0);
55  DrawLine(limSymbol);
56 
57  glColor4d(0.0, 0.0, 0.0, 1.0);
58  DrawNodes();
59 }
60 
61 bool Limiter::ShowForm(wxWindow* parent, Element* element)
62 {
63  LimiterForm* limiter = new LimiterForm(parent, this);
64  if(limiter->ShowModal() == wxID_OK) {
65  limiter->Destroy();
66  return true;
67  }
68  limiter->Destroy();
69  return false;
70 }
71 
72 void Limiter::Rotate(bool clockwise)
73 {
74  if(clockwise)
75  m_angle += 90.0;
76  else
77  m_angle -= 90.0;
78  if(m_angle >= 360.0)
79  m_angle = 0.0;
80  else if(m_angle < 0)
81  m_angle = 270.0;
82 
83  UpdatePoints();
84 
85  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
86  Node* node = *it;
87  node->Rotate(clockwise);
88  }
89 }
90 
91 void Limiter::UpdatePoints()
92 {
93  if(m_angle == 0.0) {
94  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
95  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, 0));
96  } else if(m_angle == 90.0) {
97  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -18));
98  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, 18));
99  } else if(m_angle == 180.0) {
100  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 0));
101  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
102  } else if(m_angle == 270.0) {
103  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, 18));
104  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -18));
105  }
106 }
107 
108 bool Limiter::Solve(double input, double timeStep)
109 {
110  m_output = input;
111  if(m_output > m_upLimit)
112  m_output = m_upLimit;
113  else if(m_output < m_lowLimit)
114  m_output = m_lowLimit;
115 
116  return true;
117 }
118 
120 {
121  Limiter* copy = new Limiter(m_elementID);
122  *copy = *this;
123  return copy;
124 }
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Limiter.cpp:34
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Limiter.cpp:119
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
-
Form to edit the limit control data.
Definition: LimiterForm.h:31
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Limiter.cpp:72
- - - -
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Limiter.cpp:61
-
-
- - - - diff --git a/docs/doxygen/html/_limiter_8h.html b/docs/doxygen/html/_limiter_8h.html index 41e6b15..1b44798 100644 --- a/docs/doxygen/html/_limiter_8h.html +++ b/docs/doxygen/html/_limiter_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_limiter_8h.html','');});
Limiter.h File Reference
-
#include "ControlElement.h"
-
-

Go to the source code of this file.

- +
#include "ControlElement.h"
+
diff --git a/docs/doxygen/html/_limiter_8h_source.html b/docs/doxygen/html/_limiter_8h_source.html deleted file mode 100644 index 5d47955..0000000 --- a/docs/doxygen/html/_limiter_8h_source.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - -Project/Limiter.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Limiter
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Limiter.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef LIMITER_H
19 #define LIMITER_H
20 
21 #include "ControlElement.h"
22 
23 class LimiterForm;
24 
32 class Limiter : public ControlElement
33 {
34  public:
35  Limiter(int id);
36  ~Limiter();
37 
38  virtual void Draw(wxPoint2DDouble translation, double scale) const;
39  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
40  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
41  virtual bool ShowForm(wxWindow* parent, Element* element);
42  virtual void Rotate(bool clockwise = true);
43  virtual bool Solve(double input, double timeStep);
44 
45  virtual void UpdatePoints();
46 
47  double GetUpLimit() const { return m_upLimit; }
48  double GetLowLimit() const { return m_lowLimit; }
49  void SetUpLimit(double upLimit) { m_upLimit = upLimit; }
50  void SetLowLimit(double lowLimit) { m_lowLimit = lowLimit; }
51  virtual Element* GetCopy();
52 
53  protected:
54  double m_upLimit = 5.0;
55  double m_lowLimit = -5.0;
56 };
57 
58 #endif // LIMITER_H
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Limiter.cpp:34
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Limiter.cpp:119
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Limiter.h:39
-
Form to edit the limit control data.
Definition: LimiterForm.h:31
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Limiter.h:40
-
Base class of a control element. Provide general methods to other control classes.
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Limiter.cpp:72
- -
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Limiter.cpp:61
-
-
- - - - diff --git a/docs/doxygen/html/_limiter_form_8cpp_source.html b/docs/doxygen/html/_limiter_form_8cpp_source.html deleted file mode 100644 index 22cb91e..0000000 --- a/docs/doxygen/html/_limiter_form_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/LimiterForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
LimiterForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "LimiterForm.h"
19 #include "Limiter.h"
20 
21 LimiterForm::LimiterForm(wxWindow* parent, Limiter* limiter) : LimiterFormBase(parent)
22 {
23  SetSize(GetBestSize());
24 
25  m_limiter = limiter;
26  m_parent = parent;
27 
28  m_textCtrlUpLimit->SetValue(m_limiter->StringFromDouble(m_limiter->GetUpLimit()));
29  m_textCtrlLowLimit->SetValue(m_limiter->StringFromDouble(m_limiter->GetLowLimit()));
30 }
31 
32 LimiterForm::~LimiterForm() {}
33 void LimiterForm::OnOKButtonClick(wxCommandEvent& event)
34 {
35  if(ValidateData()) EndModal(wxID_OK);
36 }
37 
38 bool LimiterForm::ValidateData()
39 {
40  double upLimit;
41  double lowLimit;
42 
43  if(!m_limiter->DoubleFromString(this, m_textCtrlUpLimit->GetValue(), upLimit,
44  _("Value entered incorrectly in the field \"Upper limit\".")))
45  return false;
46  if(!m_limiter->DoubleFromString(this, m_textCtrlLowLimit->GetValue(), lowLimit,
47  _("Value entered incorrectly in the field \"Lower limit\".")))
48  return false;
49 
50  m_limiter->SetUpLimit(upLimit);
51  m_limiter->SetLowLimit(lowLimit);
52  return true;
53 }
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
- - - -
-
- - - - diff --git a/docs/doxygen/html/_limiter_form_8h.html b/docs/doxygen/html/_limiter_form_8h.html index cca1910..fc26a70 100644 --- a/docs/doxygen/html/_limiter_form_8h.html +++ b/docs/doxygen/html/_limiter_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_limiter_form_8h.html','');});
LimiterForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_limiter_form_8h_source.html b/docs/doxygen/html/_limiter_form_8h_source.html deleted file mode 100644 index 09384a4..0000000 --- a/docs/doxygen/html/_limiter_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/LimiterForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  LimiterForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
LimiterForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef LIMITERFORM_H
19 #define LIMITERFORM_H
20 #include "ElementForm.h"
21 
22 class Limiter;
23 
32 {
33  public:
34  LimiterForm(wxWindow* parent, Limiter* limiter);
35  virtual ~LimiterForm();
36  virtual bool ValidateData();
37 
38  protected:
39  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
40  virtual void OnOKButtonClick(wxCommandEvent& event);
41 
42  wxWindow* m_parent = NULL;
43  Limiter* m_limiter = NULL;
44 };
45 #endif // LIMITERFORM_H
Limits the input value by superior and inferior values.
Definition: Limiter.h:32
- -
Form to edit the limit control data.
Definition: LimiterForm.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_line_8cpp_source.html b/docs/doxygen/html/_line_8cpp_source.html deleted file mode 100644 index be4f201..0000000 --- a/docs/doxygen/html/_line_8cpp_source.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - -Project/Line.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Line.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Line.h"
19 
20 Line::Line() : Branch()
21 {
22  for(int i = 0; i < 2; i++) {
23  for(int j = 0; j < 3; j++) {
24  m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0);
25  }
26  }
27 }
28 
29 Line::Line(wxString name) : Branch()
30 {
31  for(int i = 0; i < 2; i++) {
32  for(int j = 0; j < 3; j++) {
33  m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0);
34  }
35  }
36  m_electricalData.name = name;
37 }
38 Line::~Line() {}
39 bool Line::Contains(wxPoint2DDouble position) const
40 {
41  if(PointToLineDistance(position) < 5.0) {
42  return true;
43  }
44  return false;
45 }
46 
47 void Line::Draw(wxPoint2DDouble translation, double scale) const
48 {
49  OpenGLColour elementColour;
50  if(m_online) {
51  if(m_dynEvent)
52  elementColour = m_dynamicEventColour;
53  else
54  elementColour = m_onlineElementColour;
55 
56  } else
57  elementColour = m_offlineElementColour;
58 
59  std::vector<wxPoint2DDouble> pointList = m_pointList;
60  if(!m_inserted && pointList.size() > 0) {
61  wxPoint2DDouble secondPoint = m_position;
62  if(pointList.size() > 2) {
63  secondPoint = pointList[2];
64  }
65  pointList[1] = GetSwitchPoint(m_parentList[0], pointList[0], secondPoint);
66  pointList.push_back(m_position);
67  }
68 
69  // Line selected (Layer 1).
70  if(m_selected) {
71  glLineWidth(1.5 + m_borderSize * 2.0);
72  glColor4dv(m_selectionColour.GetRGBA());
73  DrawLine(pointList);
74 
75  // Draw nodes selection.
76  if(pointList.size() > 0) {
77  DrawCircle(pointList[0], 5.0 + m_borderSize / scale, 10, GL_POLYGON);
78  if(m_inserted) {
79  DrawCircle(pointList[pointList.size() - 1], 5.0 + m_borderSize / scale, 10, GL_POLYGON);
80  }
81  }
82  }
83 
84  // Draw line (Layer 2)
85  glLineWidth(1.5);
86  glColor4dv(elementColour.GetRGBA());
87  DrawLine(pointList);
88 
89  if(m_inserted) {
90  DrawSwitches();
91  DrawPowerFlowPts();
92  }
93 
94  // Draw nodes.
95  if(pointList.size() > 0) {
96  glColor4dv(elementColour.GetRGBA());
97  DrawCircle(pointList[0], 5.0, 10, GL_POLYGON);
98  if(m_inserted) {
99  DrawCircle(pointList[pointList.size() - 1], 5.0, 10, GL_POLYGON);
100  }
101  }
102 
103  // Draw pickboxes (Layer 3).
104  if(m_showPickbox) {
105  glPushMatrix();
106  glLoadIdentity();
107 
108  for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
109  DrawPickbox(WorldToScreen(m_pointList[i], translation, scale));
110  }
111 
112  glPopMatrix();
113  }
114 }
115 
116 void Line::Move(wxPoint2DDouble position)
117 {
118  if(!m_parentList[0]) {
119  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
120  UpdateSwitchesPosition();
121  UpdatePowerFlowArrowsPosition();
122  }
123  if(!m_parentList[1]) {
124  m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
125  UpdateSwitchesPosition();
126  UpdatePowerFlowArrowsPosition();
127  }
128 
129  if(!m_parentList[0] && !m_parentList[1]) {
130  for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
131  m_pointList[i] = m_movePts[i] + position - m_moveStartPt;
132  }
133  }
134 }
135 
136 bool Line::AddParent(Element* parent, wxPoint2DDouble position)
137 {
138  if(parent) {
139  // First bus.
140  if(m_parentList.size() == 0) {
141  m_position = position;
142  m_parentList.push_back(parent);
143  parent->AddChild(this);
144  wxPoint2DDouble parentPt =
145  parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position.
146  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
147  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back.
148  m_pointList.push_back(parentPt); // First point
149  m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_position));
150 
151  wxRect2DDouble genRect(0, 0, 0, 0);
152  m_switchRect.push_back(genRect);
153  UpdateSwitches();
154 
155  Bus* parentBus = static_cast<Bus*>(parent);
156  m_electricalData.nominalVoltage = parentBus->GetElectricalData().nominalVoltage;
157  m_electricalData.nominalVoltageUnit = parentBus->GetElectricalData().nominalVoltageUnit;
158 
159  return false;
160  }
161  // Second bus.
162  else if(parent != m_parentList[0]) {
163  Bus* parentBus = static_cast<Bus*>(parent);
164  if(m_electricalData.nominalVoltage != parentBus->GetElectricalData().nominalVoltage ||
165  m_electricalData.nominalVoltageUnit != parentBus->GetElectricalData().nominalVoltageUnit) {
166  wxMessageDialog msgDialog(NULL, _("Unable to connect two buses with different nominal voltages.\n"
167  "Use a transformer or edit the bus properties."),
168  _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
169  msgDialog.ShowModal();
170  return false;
171  }
172 
173  m_parentList.push_back(parent);
174  parent->AddChild(this);
175  wxPoint2DDouble parentPt =
176  parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position.
177  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
178  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back.
179 
180  // Set first switch point.
181  wxPoint2DDouble secondPoint = parentPt;
182  if(m_pointList.size() > 2) {
183  secondPoint = m_pointList[2];
184  }
185  m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], secondPoint);
186 
187  // Set the second switch point.
188  m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_pointList[m_pointList.size() - 1]));
189 
190  m_pointList.push_back(parentPt); // Last point.
191 
192  wxRect2DDouble genRect(0, 0, 0, 0);
193  m_switchRect.push_back(genRect);
194  UpdateSwitches();
195 
196  m_inserted = true;
197  UpdatePowerFlowArrowsPosition();
198  return true;
199  }
200  }
201  return false;
202 }
203 bool Line::Intersects(wxRect2DDouble rect) const
204 {
205  for(auto it = m_pointList.begin(); it != m_pointList.end(); ++it) {
206  if(rect.Contains(*it)) return true;
207  }
208  return false;
209 }
210 void Line::MovePickbox(wxPoint2DDouble position)
211 {
212  if(m_activePickboxID == ID_PB_NONE) return;
213 
214  for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
215  if(m_activePickboxID == i) {
216  m_pointList[i] = m_movePts[i] + position - m_moveStartPt;
217  UpdateSwitchesPosition();
218  UpdatePowerFlowArrowsPosition();
219  }
220  }
221 }
222 bool Line::PickboxContains(wxPoint2DDouble position)
223 {
224  for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
225  wxRect2DDouble rect(m_pointList[i].m_x - 5.0, m_pointList[i].m_y - 5.0, 10.0, 10.0);
226  if(rect.Contains(position)) {
227  m_activePickboxID = i;
228  return true;
229  }
230  }
231  return false;
232 }
233 
234 void Line::AddPoint(wxPoint2DDouble point)
235 {
236  if(m_parentList.size() != 0) {
237  m_pointList.push_back(point);
238  }
239 }
240 
241 void Line::StartMove(wxPoint2DDouble position)
242 {
243  m_moveStartPt = position;
244  m_movePts = m_pointList;
245 }
246 
247 void Line::MoveNode(Element* parent, wxPoint2DDouble position)
248 {
249  if(parent) {
250  // First bus.
251  if(parent == m_parentList[0]) {
252  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
253  }
254  // Second bus.
255  else if(parent == m_parentList[1]) {
256  m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
257  }
258 
259  // If the line is selected, move all the points, except the switches and buses points.
260  if(m_selected) {
261  for(int i = 2; i < (int)m_pointList.size() - 1; i++) {
262  m_pointList[i] = m_movePts[i] + position - m_moveStartPt;
263  }
264  }
265  } else {
266  // If parent is setted to NULL for the firts time, remove the parent child
267  if(m_activeNodeID == 1) {
268  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
269  if(m_parentList[0]) {
270  m_parentList[0]->RemoveChild(this);
271  m_parentList[0] = NULL;
272  m_online = false;
273  }
274  } else if(m_activeNodeID == 2) {
275  m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
276  if(m_parentList[1]) {
277  m_parentList[1]->RemoveChild(this);
278  m_parentList[1] = NULL;
279  m_online = false;
280  }
281  }
282  }
283 
284  // Recalculate switches positions
285  UpdateSwitchesPosition();
286  UpdatePowerFlowArrowsPosition();
287 }
288 
289 bool Line::GetContextMenu(wxMenu& menu)
290 {
291  wxFileName exeFileName(wxStandardPaths::Get().GetExecutablePath());
292  wxString exePath = exeFileName.GetPath();
293 
294  menu.Append(ID_EDIT_ELEMENT, _("Edit line"));
295  if(m_activePickboxID == ID_PB_NONE) {
296  wxMenuItem* addNodeItem = new wxMenuItem(&menu, ID_LINE_ADD_NODE, _("Insert node"));
297  addNodeItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\addNode16.png", wxPATH_WIN).GetPath()));
298  menu.Append(addNodeItem);
299  } else {
300  wxMenuItem* addNodeItem = new wxMenuItem(&menu, ID_LINE_REMOVE_NODE, _("Remove node"));
301  addNodeItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\removeNode16.png", wxPATH_WIN).GetPath()));
302  menu.Append(addNodeItem);
303  }
304  wxMenuItem* deleteItem = new wxMenuItem(&menu, ID_DELETE, _("Delete"));
305  deleteItem->SetBitmap(wxImage(exePath + wxFileName::DirName("\\..\\data\\images\\menu\\delete16.png", wxPATH_WIN).GetPath()));
306  menu.Append(deleteItem);
307  return true;
308 }
309 
310 void Line::RemoveNode(wxPoint2DDouble point)
311 {
312  if(PickboxContains(point)) {
313  for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
314  if(m_activePickboxID == i) {
315  m_pointList.erase(m_pointList.begin() + i);
316  break;
317  }
318  }
319  }
320  UpdateSwitchesPosition();
321  UpdatePowerFlowArrowsPosition();
322 }
323 
324 void Line::AddNode(wxPoint2DDouble point)
325 {
326  int segmentNumber = 0;
327  PointToLineDistance(point, &segmentNumber);
328  if(segmentNumber > 0 && segmentNumber < (int)m_pointList.size() - 2) {
329  m_pointList.insert(m_pointList.begin() + segmentNumber + 1, point);
330  }
331  UpdateSwitchesPosition();
332  UpdatePowerFlowArrowsPosition();
333 }
334 
335 void Line::CalculateBoundaries(wxPoint2DDouble& leftUp, wxPoint2DDouble& rightBottom) const
336 {
337  if(m_pointList.size() > 0) {
338  // Check points list boundaries.
339  leftUp = m_pointList[0];
340  rightBottom = m_pointList[0];
341  for(int i = 1; i < (int)m_pointList.size(); i++) {
342  if(m_pointList[i].m_x < leftUp.m_x) leftUp.m_x = m_pointList[i].m_x;
343  if(m_pointList[i].m_y < leftUp.m_y) leftUp.m_y = m_pointList[i].m_y;
344  if(m_pointList[i].m_x > rightBottom.m_x) rightBottom.m_x = m_pointList[i].m_x;
345  if(m_pointList[i].m_y > rightBottom.m_y) rightBottom.m_y = m_pointList[i].m_y;
346  }
347  }
348 }
349 
350 bool Line::ShowForm(wxWindow* parent, Element* element)
351 {
352  LineForm* lineForm = new LineForm(parent, this);
353  if(lineForm->ShowModal() == wxID_OK) {
354  lineForm->Destroy();
355  return true;
356  }
357  lineForm->Destroy();
358  return false;
359 }
360 
361 void Line::SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit)
362 {
363  if(nominalVoltage.size() > 0) {
364  m_electricalData.nominalVoltage = nominalVoltage[0];
365  m_electricalData.nominalVoltageUnit = nominalVoltageUnit[0];
366  }
367 }
368 
370 {
371  if(m_activeNodeID == 1 && parent == m_parentList[0]) return false;
372  if(m_activeNodeID == 2 && parent == m_parentList[1]) return false;
373 
374  if(parent && m_activeNodeID != 0) {
375  wxRect2DDouble nodeRect(0, 0, 0, 0);
376  if(m_activeNodeID == 1) {
377  nodeRect = wxRect2DDouble(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
378  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
379  }
380  if(m_activeNodeID == 2) {
381  nodeRect = wxRect2DDouble(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize,
382  m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize,
383  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
384  }
385 
386  if(parent->Intersects(nodeRect)) {
387  // If the line has no parents set the new rated voltage, otherwise check if it's not connecting
388  // two different voltages buses
389  Bus* parentBus = static_cast<Bus*>(parent);
390  if(!m_parentList[0] && !m_parentList[1]) {
391  m_electricalData.nominalVoltage = parentBus->GetElectricalData().nominalVoltage;
392  m_electricalData.nominalVoltageUnit = parentBus->GetElectricalData().nominalVoltageUnit;
393  } else if(m_electricalData.nominalVoltage != parentBus->GetElectricalData().nominalVoltage ||
394  m_electricalData.nominalVoltageUnit != parentBus->GetElectricalData().nominalVoltageUnit) {
395  wxMessageDialog msgDialog(NULL, _("Unable to connect two buses with different nominal voltages.\n"
396  "Use a transformer or edit the bus properties."),
397  _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
398  msgDialog.ShowModal();
399  m_activeNodeID = 0;
400  return false;
401  }
402 
403  if(m_activeNodeID == 1) {
404  // Check if the user is trying to connect the same bus.
405  if(m_parentList[1] == parent) {
406  m_activeNodeID = 0;
407  return false;
408  }
409 
410  m_parentList[0] = parent;
411 
412  // Centralize the node on bus.
413  wxPoint2DDouble parentPt = parent->RotateAtPosition(
414  m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position.
415  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
416  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle());
417  m_pointList[0] = parentPt;
418 
419  UpdateSwitchesPosition();
420  UpdatePowerFlowArrowsPosition();
421  return true;
422  }
423  if(m_activeNodeID == 2) {
424  if(m_parentList[0] == parent) {
425  m_activeNodeID = 0;
426  return false;
427  }
428 
429  m_parentList[1] = parent;
430 
431  wxPoint2DDouble parentPt =
432  parent->RotateAtPosition(m_pointList[m_pointList.size() - 1], -parent->GetAngle());
433  parentPt.m_y = parent->GetPosition().m_y;
434  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle());
435  m_pointList[m_pointList.size() - 1] = parentPt;
436 
437  UpdateSwitchesPosition();
438  UpdatePowerFlowArrowsPosition();
439  return true;
440  }
441  } else {
442  if(m_activeNodeID == 1) m_parentList[0] = NULL;
443  if(m_activeNodeID == 2) m_parentList[1] = NULL;
444  }
445  }
446  return false;
447 }
448 
450 {
451  m_pfDirection = pfDirection;
452  UpdatePowerFlowArrowsPosition();
453 }
454 
455 void Line::UpdatePowerFlowArrowsPosition()
456 {
457  std::vector<wxPoint2DDouble> edges;
458  switch(m_pfDirection) {
459  case PF_NONE: {
460  m_powerFlowArrow.clear();
461  } break;
462  case PF_BUS1_TO_BUS2: {
463  for(int i = 1; i < (int)m_pointList.size() - 1; i++) {
464  edges.push_back(m_pointList[i]);
465  }
466  } break;
467  case PF_BUS2_TO_BUS1: {
468  for(int i = (int)m_pointList.size() - 2; i > 0; i--) {
469  edges.push_back(m_pointList[i]);
470  }
471  } break;
472  default:
473  break;
474  }
475  CalculatePowerFlowPts(edges);
476 }
477 
478 void Line::RotateNode(Element* parent, bool clockwise)
479 {
480  double rotAngle = m_rotationAngle;
481  if(!clockwise) rotAngle = -m_rotationAngle;
482 
483  if(parent == m_parentList[0]) {
484  m_pointList[0] = parent->RotateAtPosition(m_pointList[0], rotAngle);
485  } else if(parent == m_parentList[1]) {
486  m_pointList[m_pointList.size() - 1] = parent->RotateAtPosition(m_pointList[m_pointList.size() - 1], rotAngle);
487  }
488  UpdateSwitchesPosition();
489  UpdatePowerFlowArrowsPosition();
490 }
491 
492 void Line::SetPointList(std::vector<wxPoint2DDouble> pointList)
493 {
494  m_pointList = pointList;
495  UpdateSwitchesPosition();
496  UpdatePowerFlowArrowsPosition();
497 }
498 
500 {
501  Line* copy = new Line();
502  *copy = *this;
503  return copy;
504 }
505 
506 wxString Line::GetTipText() const
507 {
508  wxString tipText = m_electricalData.name;
509 
510  if(m_online) {
511  tipText += "\n";
512  int busNumber[2];
513  busNumber[0] = static_cast<Bus*>(m_parentList[0])->GetElectricalData().number + 1;
514  busNumber[1] = static_cast<Bus*>(m_parentList[1])->GetElectricalData().number + 1;
515 
516  tipText += _("\nP") + wxString::Format("(%d-%d) = ", busNumber[0], busNumber[1]) +
517  wxString::FromDouble(m_electricalData.powerFlow[0].real(), 5) + _(" p.u.");
518  tipText += _("\nQ") + wxString::Format("(%d-%d) = ", busNumber[0], busNumber[1]) +
519  wxString::FromDouble(m_electricalData.powerFlow[0].imag(), 5) + _(" p.u.");
520  tipText += _("\nP") + wxString::Format("(%d-%d) = ", busNumber[1], busNumber[0]) +
521  wxString::FromDouble(m_electricalData.powerFlow[1].real(), 5) + _(" p.u.");
522  tipText += _("\nQ") + wxString::Format("(%d-%d) = ", busNumber[1], busNumber[0]) +
523  wxString::FromDouble(m_electricalData.powerFlow[1].imag(), 5) + _(" p.u.");
524  }
525 
526  return tipText;
527 }
528 
529 LineElectricalData Line::GetPUElectricalData(double systemBasePower)
530 {
531  LineElectricalData data = m_electricalData;
532  double lineBasePower = GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
533  double baseVoltage = GetValueFromUnit(data.nominalVoltage, data.nominalVoltageUnit);
534  double systemBaseImpedance = (baseVoltage * baseVoltage) / systemBasePower;
535  double lineBaseImpedance = (baseVoltage * baseVoltage) / lineBasePower;
536 
537  // Resistance
538  double r = data.resistance;
539  if(data.resistanceUnit == UNIT_OHM_km) r *= data.lineSize;
540  if(data.resistanceUnit == UNIT_PU) {
541  if(data.useLinePower) data.resistance = (r * lineBaseImpedance) / systemBaseImpedance;
542  } else {
543  data.resistance = r / systemBaseImpedance;
544  }
545  data.resistanceUnit = UNIT_PU;
546 
547  // Inductive reactance
548  double x = data.indReactance;
549  if(data.indReactanceUnit == UNIT_OHM_km) x *= data.lineSize;
550  if(data.indReactanceUnit == UNIT_PU) {
551  if(data.useLinePower) data.indReactance = (x * lineBaseImpedance) / systemBaseImpedance;
552  } else {
553  data.indReactance = x / systemBaseImpedance;
554  }
555  data.indReactanceUnit = UNIT_PU;
556 
557  // Capacitive susceptance
558  double b = data.capSusceptance;
559  if(data.capSusceptanceUnit == UNIT_OHM_km) b *= data.lineSize;
560  if(data.capSusceptanceUnit == UNIT_PU) {
561  if(data.useLinePower) data.capSusceptance = (b * lineBaseImpedance) / systemBaseImpedance;
562  } else {
563  data.capSusceptance = b / systemBaseImpedance;
564  }
565  data.capSusceptanceUnit = UNIT_PU;
566 
567  // Fault
568 
569  // Zero seq. resistance
570  double r0 = data.zeroResistance;
571  if(data.useLinePower) data.zeroResistance = (r0 * lineBaseImpedance) / systemBaseImpedance;
572 
573  // Zero seq. ind. reactance
574  double x0 = data.zeroIndReactance;
575  if(data.useLinePower) data.zeroIndReactance = (x0 * lineBaseImpedance) / systemBaseImpedance;
576 
577  // Zero seq. cap. susceptance
578  double b0 = data.zeroCapSusceptance;
579  if(data.useLinePower) data.zeroCapSusceptance = (b0 * lineBaseImpedance) / systemBaseImpedance;
580 
581  if(!m_online) {
582  data.powerFlow[0] = std::complex<double>(0, 0);
583  data.powerFlow[1] = std::complex<double>(0, 0);
584  data.faultCurrent[0][0] = std::complex<double>(0, 0);
585  data.faultCurrent[0][1] = std::complex<double>(0, 0);
586  data.faultCurrent[0][2] = std::complex<double>(0, 0);
587  data.faultCurrent[1][0] = std::complex<double>(0, 0);
588  data.faultCurrent[1][1] = std::complex<double>(0, 0);
589  data.faultCurrent[1][2] = std::complex<double>(0, 0);
590  }
591 
592  return data;
593 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void MovePickbox(wxPoint2DDouble position)
Move the pickbox.
Definition: Line.cpp:210
- -
Form to edit the line power data.
Definition: LineForm.h:32
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Line.cpp:241
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Line.cpp:39
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Line.cpp:369
-
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
-
virtual void MoveNode(Element *parent, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
Definition: Line.cpp:247
-
virtual bool Intersects(wxRect2DDouble rect) const =0
Check if the element&#39;s rect intersects other rect.
- - -
virtual bool PickboxContains(wxPoint2DDouble position)
Check if a pickbox contains a point. If contains the attributes related to pickbox movement will be c...
Definition: Line.cpp:222
-
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
- -
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Line.cpp:136
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Line.cpp:350
-
virtual void CalculateBoundaries(wxPoint2DDouble &leftUp, wxPoint2DDouble &rightBottom) const
Calculate the element boundaries.
Definition: Line.cpp:335
- - -
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Line.cpp:116
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Line.cpp:47
-
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
-
Power line element.
Definition: Line.h:59
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Line.cpp:478
- - - -
virtual void SetPointList(std::vector< wxPoint2DDouble > pointList)
Set the list of points that connect the element to the bus.
Definition: Line.cpp:492
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Line.cpp:203
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: Line.cpp:289
- -
virtual void SetNominalVoltage(std::vector< double > nominalVoltage, std::vector< ElectricalUnit > nominalVoltageUnit)
Set nominal voltage of the element.
Definition: Line.cpp:361
-
Class to manage color of OpenGL.
Definition: Element.h:67
-
PowerFlowDirection
Direction of power flow arrows.
Definition: PowerElement.h:78
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Line.cpp:499
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
- -
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
Definition: Line.cpp:449
-
virtual void AddPoint(wxPoint2DDouble point)
Add point to the list of points that connect the element to the bus.
Definition: Line.cpp:234
-
virtual wxString GetTipText() const
Get the tip text.
Definition: Line.cpp:506
- -
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
Abstract class for branch power elements.
Definition: Branch.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_line_8h.html b/docs/doxygen/html/_line_8h.html index 56bcb24..dd6bae4 100644 --- a/docs/doxygen/html/_line_8h.html +++ b/docs/doxygen/html/_line_8h.html @@ -90,11 +90,9 @@ $(document).ready(function(){initNavTree('_line_8h.html','');});
Line.h File Reference
-
#include "LineForm.h"
-#include "Branch.h"
-
-

Go to the source code of this file.

- +
#include "LineForm.h"
+#include "Branch.h"
+
diff --git a/docs/doxygen/html/_line_8h_source.html b/docs/doxygen/html/_line_8h_source.html deleted file mode 100644 index 46b6918..0000000 --- a/docs/doxygen/html/_line_8h_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/Line.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  LineElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Line.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef LINE_H
19 #define LINE_H
20 
21 #include "LineForm.h"
22 #include "Branch.h"
23 
25  // General
26  wxString name = "";
27  double nominalVoltage = 138.0;
28  ElectricalUnit nominalVoltageUnit = UNIT_kV;
29  double nominalPower = 100.0;
30  ElectricalUnit nominalPowerUnit = UNIT_MVA;
31  double resistance = 0.0;
32  ElectricalUnit resistanceUnit = UNIT_PU;
33  double indReactance = 1.0;
34  ElectricalUnit indReactanceUnit = UNIT_PU;
35  double capSusceptance = 0.0;
36  ElectricalUnit capSusceptanceUnit = UNIT_PU;
37  double lineSize = 100.0;
38  bool useLinePower = false;
39 
40  // Power flow (p.u.)
41  std::complex<double> current[2] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0)};
42  std::complex<double> powerFlow[2] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0)};
43 
44  // Fault
45  double zeroResistance = 0.0;
46  double zeroIndReactance = 1.0;
47  double zeroCapSusceptance = 0.0;
48  // p.u. fault data
49  std::complex<double> faultCurrent[2][3];
50 };
51 
59 class Line : public Branch
60 {
61  public:
62  Line();
63  Line(wxString name);
64  ~Line();
65  virtual bool Contains(wxPoint2DDouble position) const;
66  virtual void Draw(wxPoint2DDouble translation, double scale) const;
67  virtual void Move(wxPoint2DDouble position);
68  virtual void StartMove(wxPoint2DDouble position);
69  virtual void MoveNode(Element* parent, wxPoint2DDouble position);
70  virtual bool SetNodeParent(Element* parent);
71  virtual wxCursor GetBestPickboxCursor() const { return wxCURSOR_SIZING; }
72  virtual Element* GetCopy();
73  virtual bool AddParent(Element* parent, wxPoint2DDouble position);
74  virtual bool Intersects(wxRect2DDouble rect) const;
75  virtual void MovePickbox(wxPoint2DDouble position);
76  virtual bool PickboxContains(wxPoint2DDouble position);
77  virtual void AddPoint(wxPoint2DDouble point);
78  virtual bool GetContextMenu(wxMenu& menu);
79  virtual wxString GetTipText() const;
80  virtual void RemoveNode(wxPoint2DDouble point);
81  virtual void AddNode(wxPoint2DDouble point);
82  virtual void RotateNode(Element* parent, bool clockwise = true);
83  virtual void CalculateBoundaries(wxPoint2DDouble& leftUp, wxPoint2DDouble& rightBottom) const;
84  virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection);
85  virtual bool ShowForm(wxWindow* parent, Element* element);
86  virtual LineElectricalData GetElectricalData() const { return m_electricalData; }
87  virtual LineElectricalData GetPUElectricalData(double systemBasePower);
88  virtual void SetElectricalData(LineElectricalData electricalData) { m_electricalData = electricalData; }
89  virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit);
90  virtual void SetPointList(std::vector<wxPoint2DDouble> pointList);
91 
92  protected:
93  void UpdatePowerFlowArrowsPosition();
94  LineElectricalData m_electricalData;
95 };
96 
97 #endif // LINE_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- - -
virtual wxCursor GetBestPickboxCursor() const
Get the best cursor to shown to the user when the mouse is above a pickbox.
Definition: Line.h:71
- -
Power line element.
Definition: Line.h:59
- - -
PowerFlowDirection
Direction of power flow arrows.
Definition: PowerElement.h:78
-
Abstract class for branch power elements.
Definition: Branch.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_line_form_8cpp_source.html b/docs/doxygen/html/_line_form_8cpp_source.html deleted file mode 100644 index 1c97d7b..0000000 --- a/docs/doxygen/html/_line_form_8cpp_source.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - -Project/LineForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
LineForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "LineForm.h"
19 #include "SwitchingForm.h"
20 #include "Line.h"
21 
22 LineForm::LineForm(wxWindow* parent, Line* line) : LineFormBase(parent)
23 {
24  SetSize(GetBestSize());
25  m_choiceResistance->SetString(1, L'\u03A9');
26  m_choiceResistance->SetString(2, (wxString)L'\u03A9' + "/km");
27  m_choiceResistance->SetInitialSize();
28  m_textCtrlResistance->SetInitialSize();
29 
30  m_choiceReactance->SetString(1, L'\u03A9');
31  m_choiceReactance->SetString(2, (wxString)L'\u03A9' + "/km");
32  m_choiceReactance->SetInitialSize();
33  m_textCtrlReactance->SetInitialSize();
34 
35  ReplaceStaticTextLabelChar(m_staticTextZeroResistance, L'\u2080');
36  ReplaceStaticTextLabelChar(m_staticTextZeroReactance, L'\u2080');
37  ReplaceStaticTextLabelChar(m_staticTextZeroSusceptance, L'\u2080');
38 
39  SetSize(GetBestSize());
40  Layout();
41  m_parent = parent;
42  m_line = line;
43 
44  LineElectricalData data = line->GetElectricalData();
45 
46  m_textCtrlName->SetValue(data.name);
47 
48  wxString nominalVoltageStr = Line::StringFromDouble(data.nominalVoltage);
49  switch(data.nominalVoltageUnit) {
50  case UNIT_V: {
51  nominalVoltageStr += " V";
52  } break;
53  case UNIT_kV: {
54  nominalVoltageStr += " kV";
55  } break;
56  default:
57  break;
58  }
59  m_staticTextNominalVoltageValue->SetLabel(nominalVoltageStr);
60 
61  m_textCtrlNominalPower->SetValue(Line::StringFromDouble(data.nominalPower));
62  switch(data.nominalPowerUnit) {
63  case UNIT_VA: {
64  m_choiceNominalPower->SetSelection(0);
65  } break;
66  case UNIT_kVA: {
67  m_choiceNominalPower->SetSelection(1);
68  } break;
69  case UNIT_MVA: {
70  m_choiceNominalPower->SetSelection(2);
71  } break;
72  default:
73  break;
74  }
75 
76  m_textCtrlResistance->SetValue(Line::StringFromDouble(data.resistance));
77  switch(data.resistanceUnit) {
78  case UNIT_PU: {
79  m_choiceResistance->SetSelection(0);
80  } break;
81  case UNIT_OHM: {
82  m_choiceResistance->SetSelection(1);
83  } break;
84  case UNIT_OHM_km: {
85  m_choiceResistance->SetSelection(2);
86  } break;
87  default:
88  break;
89  }
90 
91  m_textCtrlReactance->SetValue(Line::StringFromDouble(data.indReactance));
92  switch(data.indReactanceUnit) {
93  case UNIT_PU: {
94  m_choiceReactance->SetSelection(0);
95  } break;
96  case UNIT_OHM: {
97  m_choiceReactance->SetSelection(1);
98  } break;
99  case UNIT_OHM_km: {
100  m_choiceReactance->SetSelection(2);
101  } break;
102  default:
103  break;
104  }
105 
106  m_textCtrlSusceptance->SetValue(Line::StringFromDouble(data.capSusceptance));
107  switch(data.capSusceptanceUnit) {
108  case UNIT_PU: {
109  m_choiceSusceptance->SetSelection(0);
110  } break;
111  case UNIT_S: {
112  m_choiceSusceptance->SetSelection(1);
113  } break;
114  case UNIT_S_km: {
115  m_choiceSusceptance->SetSelection(2);
116  } break;
117  default:
118  break;
119  }
120 
121  m_textCtrlLineSize->SetValue(Line::StringFromDouble(data.lineSize));
122  m_checkUseLinePower->SetValue(data.useLinePower);
123 
124  m_textCtrlZeroResistance->SetValue(Line::StringFromDouble(data.zeroResistance));
125  m_textCtrlZeroReactance->SetValue(Line::StringFromDouble(data.zeroIndReactance));
126  m_textCtrlZeroSusceptance->SetValue(Line::StringFromDouble(data.zeroCapSusceptance));
127 }
128 
129 LineForm::~LineForm() {}
130 void LineForm::OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
131 void LineForm::OnOKButtonClick(wxCommandEvent& event)
132 {
133  if(ValidateData()) EndModal(wxID_OK);
134 }
135 
136 void LineForm::OnStabilityButtonClick(wxCommandEvent& event)
137 {
138  if(ValidateData()) {
139  SwitchingForm swForm(m_parent, m_line);
140  swForm.SetTitle(_("Line: Switching"));
141  swForm.ShowModal();
142  EndModal(wxID_OK);
143  }
144 }
145 
146 void LineForm::ReplaceStaticTextLabelChar(wxStaticText* staticText, wchar_t newChar)
147 {
148  wxString label = staticText->GetLabel();
149  label[label.length() - 2] = newChar;
150  staticText->SetLabel(label);
151 }
152 
153 bool LineForm::ValidateData()
154 {
155  LineElectricalData data = m_line->GetElectricalData();
156 
157  data.name = m_textCtrlName->GetValue();
158 
159  if(!m_line->DoubleFromString(m_parent, m_textCtrlNominalPower->GetValue(), data.nominalPower,
160  _("Value entered incorrectly in the field \"Nominal power\".")))
161  return false;
162  switch(m_choiceNominalPower->GetSelection()) {
163  case 0: {
164  data.nominalPowerUnit = UNIT_VA;
165  } break;
166  case 1: {
167  data.nominalPowerUnit = UNIT_kVA;
168  } break;
169  case 2: {
170  data.nominalPowerUnit = UNIT_MVA;
171  } break;
172  }
173 
174  if(!m_line->DoubleFromString(m_parent, m_textCtrlResistance->GetValue(), data.resistance,
175  _("Value entered incorrectly in the field \"Resistance\".")))
176  return false;
177  switch(m_choiceResistance->GetSelection()) {
178  case 0: {
179  data.resistanceUnit = UNIT_PU;
180  } break;
181  case 1: {
182  data.resistanceUnit = UNIT_OHM;
183  } break;
184  case 2: {
185  data.resistanceUnit = UNIT_OHM_km;
186  } break;
187  }
188 
189  if(!m_line->DoubleFromString(m_parent, m_textCtrlReactance->GetValue(), data.indReactance,
190  _("Value entered incorrectly in the field \"Indutive Reactance\".")))
191  return false;
192  switch(m_choiceReactance->GetSelection()) {
193  case 0: {
194  data.indReactanceUnit = UNIT_PU;
195  } break;
196  case 1: {
197  data.indReactanceUnit = UNIT_OHM;
198  } break;
199  case 2: {
200  data.indReactanceUnit = UNIT_OHM_km;
201  } break;
202  }
203 
204  if(!m_line->DoubleFromString(m_parent, m_textCtrlSusceptance->GetValue(), data.capSusceptance,
205  _("Value entered incorrectly in the field \"Capacitive Susceptance\".")))
206  return false;
207  switch(m_choiceSusceptance->GetSelection()) {
208  case 0: {
209  data.capSusceptanceUnit = UNIT_PU;
210  } break;
211  case 1: {
212  data.capSusceptanceUnit = UNIT_S;
213  } break;
214  case 2: {
215  data.capSusceptanceUnit = UNIT_S_km;
216  } break;
217  }
218 
219  if(!m_line->DoubleFromString(m_parent, m_textCtrlLineSize->GetValue(), data.lineSize,
220  _("Value entered incorrectly in the field \"Line size\".")))
221  return false;
222 
223  data.useLinePower = m_checkUseLinePower->GetValue();
224 
225  if(!m_line->DoubleFromString(m_parent, m_textCtrlZeroResistance->GetValue(), data.zeroResistance,
226  _("Value entered incorrectly in the field \"Zero-sequence resistance\".")))
227  return false;
228  if(!m_line->DoubleFromString(m_parent, m_textCtrlZeroReactance->GetValue(), data.zeroIndReactance,
229  _("Value entered incorrectly in the field \"Zero-sequence indutive reactance\".")))
230  return false;
231  if(!m_line->DoubleFromString(m_parent, m_textCtrlZeroSusceptance->GetValue(), data.zeroCapSusceptance,
232  _("Value entered incorrectly in the field \"Zero-sequence capacitive susceptance\".")))
233  return false;
234 
235  m_line->SetElectricalData(data);
236 
237  return true;
238 }
- -
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
- - - - - - - - -
Power line element.
Definition: Line.h:59
- - -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- - - -
-
- - - - diff --git a/docs/doxygen/html/_line_form_8h.html b/docs/doxygen/html/_line_form_8h.html index 10dd01f..a39d44e 100644 --- a/docs/doxygen/html/_line_form_8h.html +++ b/docs/doxygen/html/_line_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_line_form_8h.html','');});
LineForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_line_form_8h_source.html b/docs/doxygen/html/_line_form_8h_source.html deleted file mode 100644 index 911327d..0000000 --- a/docs/doxygen/html/_line_form_8h_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/LineForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  LineForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
LineForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef LINEFORM_H
19 #define LINEFORM_H
20 #include "ElementForm.h"
21 
22 class Line;
23 class SwitchingForm;
24 
32 class LineForm : public LineFormBase
33 {
34  public:
35  LineForm(wxWindow* parent, Line* line);
36  virtual ~LineForm();
37 
38  protected:
39  virtual void OnCancelButtonClick(wxCommandEvent& event);
40  virtual void OnOKButtonClick(wxCommandEvent& event);
41  virtual void OnStabilityButtonClick(wxCommandEvent& event);
42  virtual void ReplaceStaticTextLabelChar(wxStaticText* staticText, wchar_t newChar);
43  virtual bool ValidateData();
44 
45  wxWindow* m_parent = NULL;
46  Line* m_line = NULL;
47 };
48 #endif // LINEFORM_H
Form to edit the line power data.
Definition: LineForm.h:32
-
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
- -
Power line element.
Definition: Line.h:59
-
-
- - - - diff --git a/docs/doxygen/html/_load_8cpp_source.html b/docs/doxygen/html/_load_8cpp_source.html deleted file mode 100644 index 1f66473..0000000 --- a/docs/doxygen/html/_load_8cpp_source.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - -Project/Load.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Load.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Load.h"
19 
20 Load::Load() : Shunt() {}
21 Load::Load(wxString name) : Shunt() { m_electricalData.name = name; }
22 Load::~Load() {}
23 bool Load::AddParent(Element* parent, wxPoint2DDouble position)
24 {
25  if(parent) {
26  m_parentList.push_back(parent);
27  parent->AddChild(this);
28  wxPoint2DDouble parentPt =
29  parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position.
30  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
31  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back.
32 
33  m_position = parentPt + wxPoint2DDouble(0.0, 100.0); // Shifts the position to the down of the bus.
34  m_width = m_height = 20.0;
35  m_rect = wxRect2DDouble(m_position.m_x - 10.0, m_position.m_y - 10.0, m_width, m_height);
36 
37  m_pointList.push_back(parentPt);
38  m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_position));
39  m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -20.0));
40  m_pointList.push_back(m_position + wxPoint2DDouble(0.0, -10.0));
41 
42  m_triangPts.push_back(wxPoint2DDouble(-m_width / 2.0, -m_height / 2.0));
43  m_triangPts.push_back(wxPoint2DDouble(m_width / 2.0, -m_height / 2.0));
44  m_triangPts.push_back(wxPoint2DDouble(0.0, m_height / 2.0));
45 
46  m_inserted = true;
47 
48  wxRect2DDouble genRect(0, 0, 0, 0);
49  m_switchRect.push_back(genRect); // Push a general rectangle.
50  UpdateSwitches();
51  m_pfDirection = PF_TO_ELEMENT;
52  UpdatePowerFlowArrowsPosition();
53 
54  return true;
55  }
56  return false;
57 }
58 
59 void Load::Draw(wxPoint2DDouble translation, double scale) const
60 {
61  OpenGLColour elementColour;
62  if(m_online) {
63  if(m_dynEvent)
64  elementColour = m_dynamicEventColour;
65  else
66  elementColour = m_onlineElementColour;
67  } else
68  elementColour = m_offlineElementColour;
69 
70  if(m_inserted) {
71  // Draw Selection (layer 1).
72  if(m_selected) {
73  glLineWidth(1.5 + m_borderSize * 2.0);
74  glColor4dv(m_selectionColour.GetRGBA());
75  std::vector<wxPoint2DDouble> selTriangPts;
76  selTriangPts.push_back(m_triangPts[0] + m_position +
77  wxPoint2DDouble(-m_borderSize / scale, -m_borderSize / scale));
78  selTriangPts.push_back(m_triangPts[1] + m_position +
79  wxPoint2DDouble(m_borderSize / scale, -m_borderSize / scale));
80  selTriangPts.push_back(m_triangPts[2] + m_position + wxPoint2DDouble(0.0, m_borderSize / scale));
81 
82  glPushMatrix();
83  glTranslated(m_position.m_x, m_position.m_y, 0.0);
84  glRotated(m_angle, 0.0, 0.0, 1.0);
85  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
86  DrawTriangle(selTriangPts);
87  glPopMatrix();
88 
89  DrawLine(m_pointList);
90 
91  // Draw node selection.
92  DrawCircle(m_pointList[0], 5.0 + m_borderSize / scale, 10, GL_POLYGON);
93  }
94 
95  // Draw Load (layer 2).
96  glLineWidth(1.5);
97 
98  // Draw node.
99  glColor4dv(elementColour.GetRGBA());
100  DrawCircle(m_pointList[0], 5.0, 10, GL_POLYGON);
101 
102  DrawLine(m_pointList);
103 
104  DrawSwitches();
105  DrawPowerFlowPts();
106 
107  std::vector<wxPoint2DDouble> triangPts;
108  for(int i = 0; i < 3; i++) {
109  triangPts.push_back(m_triangPts[i] + m_position);
110  }
111  glPushMatrix();
112  glTranslated(m_position.m_x, m_position.m_y, 0.0);
113  glRotated(m_angle, 0.0, 0.0, 1.0);
114  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
115  glColor4dv(elementColour.GetRGBA());
116  DrawTriangle(triangPts);
117  glPopMatrix();
118  }
119 }
120 
121 void Load::Rotate(bool clockwise)
122 {
123  double rotAngle = m_rotationAngle;
124  if(!clockwise) rotAngle = -m_rotationAngle;
125 
126  m_angle += rotAngle;
127  if(m_angle >= 360 || m_angle <= -360) m_angle = 0.0;
128  m_pointList[2] = RotateAtPosition(m_pointList[2], rotAngle);
129  m_pointList[3] = RotateAtPosition(m_pointList[3], rotAngle);
130  UpdateSwitchesPosition();
131  UpdatePowerFlowArrowsPosition();
132 }
133 
134 bool Load::GetContextMenu(wxMenu& menu)
135 {
136  menu.Append(ID_EDIT_ELEMENT, _("Edit Load"));
137  GeneralMenuItens(menu);
138  return true;
139 }
140 
141 bool Load::ShowForm(wxWindow* parent, Element* element)
142 {
143  LoadForm* loadForm = new LoadForm(parent, this);
144  if(loadForm->ShowModal() == wxID_OK) {
145  loadForm->Destroy();
146  return true;
147  }
148  loadForm->Destroy();
149  return false;
150 }
151 
152 LoadElectricalData Load::GetPUElectricalData(double systemPowerBase)
153 {
154  LoadElectricalData data = m_electricalData;
155  switch(data.activePowerUnit) {
156  case UNIT_W: {
157  data.activePower = data.activePower / systemPowerBase;
158  data.activePowerUnit = UNIT_PU;
159  } break;
160  case UNIT_kW: {
161  data.activePower = (data.activePower * 1e3) / systemPowerBase;
162  data.activePowerUnit = UNIT_PU;
163  } break;
164  case UNIT_MW: {
165  data.activePower = (data.activePower * 1e6) / systemPowerBase;
166  data.activePowerUnit = UNIT_PU;
167  } break;
168  default:
169  break;
170  }
171  switch(data.reactivePowerUnit) {
172  case UNIT_VAr: {
173  data.reactivePower = data.reactivePower / systemPowerBase;
174  data.reactivePowerUnit = UNIT_PU;
175  } break;
176  case UNIT_kVAr: {
177  data.reactivePower = (data.reactivePower * 1e3) / systemPowerBase;
178  data.reactivePowerUnit = UNIT_PU;
179  } break;
180  case UNIT_MVAr: {
181  data.reactivePower = (data.reactivePower * 1e6) / systemPowerBase;
182  data.reactivePowerUnit = UNIT_PU;
183  } break;
184  default:
185  break;
186  }
187 
188  return data;
189 }
190 
192 {
193  Load* copy = new Load();
194  *copy = *this;
195  return copy;
196 }
197 
198 wxString Load::GetTipText() const
199 {
200  wxString tipText = m_electricalData.name;
201 
202  // TODO: Avoid power calculation.
203  double activePower = m_electricalData.activePower;
204  double reactivePower = m_electricalData.reactivePower;
205  if(!m_online) {
206  activePower = 0.0;
207  reactivePower = 0.0;
208  }
209  if(m_online && m_electricalData.loadType == CONST_IMPEDANCE) {
210  std::complex<double> v = static_cast<Bus*>(m_parentList[0])->GetElectricalData().voltage;
211  reactivePower *= std::pow(std::abs(v), 2);
212  activePower *= std::pow(std::abs(v), 2);
213  }
214  tipText += "\n";
215  tipText += _("\nP = ") + wxString::FromDouble(activePower, 5);
216  switch(m_electricalData.activePowerUnit) {
217  case UNIT_PU: {
218  tipText += _(" p.u.");
219  } break;
220  case UNIT_W: {
221  tipText += _(" W");
222  } break;
223  case UNIT_kW: {
224  tipText += _(" kW");
225  } break;
226  case UNIT_MW: {
227  tipText += _(" MW");
228  } break;
229  default:
230  break;
231  }
232  tipText += _("\nQ = ") + wxString::FromDouble(reactivePower, 5);
233  switch(m_electricalData.reactivePowerUnit) {
234  case UNIT_PU: {
235  tipText += _(" p.u.");
236  } break;
237  case UNIT_VAr: {
238  tipText += _(" VAr");
239  } break;
240  case UNIT_kVAr: {
241  tipText += _(" kVAr");
242  } break;
243  case UNIT_MVAr: {
244  tipText += _(" MVAr");
245  } break;
246  default:
247  break;
248  }
249 
250  return tipText;
251 }
252 
254 {
255  if(!m_electricalData.plotLoad) return false;
256  plotData.SetName(m_electricalData.name);
257  plotData.SetCurveType(ElementPlotData::CT_LOAD);
258 
259  std::vector<double> absVoltage, activePower, reactivePower, current;
260  for(unsigned int i = 0; i < m_electricalData.voltageVector.size(); ++i) {
261  absVoltage.push_back(std::abs(m_electricalData.voltageVector[i]));
262  activePower.push_back(std::real(m_electricalData.electricalPowerVector[i]));
263  reactivePower.push_back(std::imag(m_electricalData.electricalPowerVector[i]));
264  current.push_back(std::abs(std::complex<double>(activePower[i], -reactivePower[i]) /
265  std::conj(m_electricalData.voltageVector[i])));
266  }
267 
268  plotData.AddData(absVoltage, _("Voltage"));
269  plotData.AddData(activePower, _("Active power"));
270  plotData.AddData(reactivePower, _("Reactive power"));
271  plotData.AddData(current, _("Current"));
272 
273  return true;
274 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Load.cpp:121
- -
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
- -
virtual bool GetPlotData(ElementPlotData &plotData)
Fill the plot data.
Definition: Load.cpp:253
- - -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Load.cpp:191
- - - -
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: Load.cpp:134
-
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
-
Loas shunt power element.
Definition: Load.h:73
- -
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Load.cpp:59
- - -
Class to manage color of OpenGL.
Definition: Element.h:67
-
Form to edit the load power data.
Definition: LoadForm.h:32
-
virtual wxString GetTipText() const
Get the tip text.
Definition: Load.cpp:198
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Load.cpp:23
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
Abstract class for shunt power elements.
Definition: Shunt.h:31
- -
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Load.cpp:141
-
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
-
- - - - diff --git a/docs/doxygen/html/_load_8h.html b/docs/doxygen/html/_load_8h.html index af11d9f..bb1556a 100644 --- a/docs/doxygen/html/_load_8h.html +++ b/docs/doxygen/html/_load_8h.html @@ -91,11 +91,9 @@ $(document).ready(function(){initNavTree('_load_8h.html','');});
Load.h File Reference
-
#include "LoadForm.h"
-#include "Shunt.h"
-
-

Go to the source code of this file.

- +
#include "LoadForm.h"
+#include "Shunt.h"
+
diff --git a/docs/doxygen/html/_load_8h_source.html b/docs/doxygen/html/_load_8h_source.html deleted file mode 100644 index 3bb0e1c..0000000 --- a/docs/doxygen/html/_load_8h_source.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - -Project/Load.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  LoadElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Load.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef LOAD_H
19 #define LOAD_H
20 
21 #include "LoadForm.h"
22 #include "Shunt.h"
23 
24 enum LoadType { CONST_POWER = 0, CONST_IMPEDANCE };
25 
27  wxString name;
28  double activePower = 100.0;
29  ElectricalUnit activePowerUnit = UNIT_MW;
30  double reactivePower = 0.0;
31  ElectricalUnit reactivePowerUnit = UNIT_MVAr;
32  LoadType loadType = CONST_POWER;
33 
34  // Stability
35  bool plotLoad = false;
36  // ZIP load
37  bool useCompLoad = false;
38  // The power injected on the "i" bus flollow the quadratic equation:
39  // -p(i) = pz0 * (v(i) / v0) ^ 2 + pi0 * (v(i) / v0) + pp0
40  double v0 = 1.0; // Initial load voltage from load flow in p.u.
41  double pz0 = 1.0; // Initial active power modelled as constant impedance from load flow in p.u.
42  double pi0 = 0.0; // Initial active power modelled as constant current from load flow in p.u.
43  double pp0 = 0.0; // Initial active power modelled as constant power from load flow in p.u.
44  double qz0 = 1.0; // Initial reactive power modelled as constant impedance from load flow in p.u.
45  double qi0 = 0.0; // Initial reactive power modelled as constant current from load flow in p.u.
46  double qp0 = 0.0; // Initial reactive power modelled as constant power from load flow in p.u.
47  double constImpedanceActive = 100.0; // Constant impedance portion of active power (%).
48  double constCurrentActive = 0.0; // Constant current portion of active power (%).
49  double constPowerActive = 0.0; // Constant power portion of active power (%).
50  double constImpedanceReactive = 100.0; // Constant impedance portion of reactive power (%).
51  double constCurrentReactive = 0.0; // Constant current portion of reactive power (%).
52  double constPowerReactive = 0.0; // Constant power portion of reactive power (%).
53  std::complex<double> y0; // Steady-state equivalent admittance calculated from power flow.
54  // Undervoltage (in p.u.) which the constant current portion will be modelled as constant impedance.
55  double constCurrentUV = 0.7;
56  // Undervoltage (in p.u.) which the constant power portion will be modelled as constant impedance.
57  double constPowerUV = 0.7;
58 
59  // Load state variables
60  std::complex<double> voltage;
61  std::vector<std::complex<double> > voltageVector;
62  std::complex<double> electricalPower;
63  std::vector<std::complex<double> > electricalPowerVector;
64 };
65 
73 class Load : public Shunt
74 {
75  public:
76  Load();
77  Load(wxString name);
78  ~Load();
79 
80  virtual Element* GetCopy();
81  virtual bool AddParent(Element* parent, wxPoint2DDouble position);
82  virtual void Draw(wxPoint2DDouble translation, double scale) const;
83  virtual void Rotate(bool clockwise = true);
84  virtual bool GetContextMenu(wxMenu& menu);
85  virtual wxString GetTipText() const;
86  virtual bool ShowForm(wxWindow* parent, Element* element);
87  LoadElectricalData GetElectricalData() { return m_electricalData; }
88  LoadElectricalData GetPUElectricalData(double systemPowerBase);
89  void SetElectricalData(LoadElectricalData electricalData) { m_electricalData = electricalData; }
90  virtual bool GetPlotData(ElementPlotData& plotData);
91 
92  protected:
93  std::vector<wxPoint2DDouble> m_triangPts;
94  LoadElectricalData m_electricalData;
95 };
96 
97 #endif // LOAD_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- - -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- - - -
Loas shunt power element.
Definition: Load.h:73
- -
Abstract class for shunt power elements.
Definition: Shunt.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_load_form_8cpp_source.html b/docs/doxygen/html/_load_form_8cpp_source.html deleted file mode 100644 index cd1c453..0000000 --- a/docs/doxygen/html/_load_form_8cpp_source.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - -Project/LoadForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
LoadForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "LoadForm.h"
19 #include "SwitchingForm.h"
20 #include "Load.h"
21 
22 LoadForm::LoadForm(wxWindow* parent, Load* load) : LoadFormBase(parent)
23 {
24  SetSize(GetBestSize());
25  LoadElectricalData data = load->GetElectricalData();
26 
27  m_textCtrlName->SetValue(data.name);
28 
29  m_textCtrlActivePower->SetValue(Load::StringFromDouble(data.activePower));
30  switch(data.activePowerUnit) {
31  case UNIT_PU: {
32  m_choiceActivePower->SetSelection(0);
33  } break;
34  case UNIT_W: {
35  m_choiceActivePower->SetSelection(1);
36  } break;
37  case UNIT_kW: {
38  m_choiceActivePower->SetSelection(2);
39  } break;
40  case UNIT_MW: {
41  m_choiceActivePower->SetSelection(3);
42  } break;
43  default:
44  break;
45  }
46 
47  m_textCtrlReactivePower->SetValue(Load::StringFromDouble(data.reactivePower));
48  switch(data.reactivePowerUnit) {
49  case UNIT_PU: {
50  m_choiceReactivePower->SetSelection(0);
51  } break;
52  case UNIT_VAr: {
53  m_choiceReactivePower->SetSelection(1);
54  } break;
55  case UNIT_kVAr: {
56  m_choiceReactivePower->SetSelection(2);
57  } break;
58  case UNIT_MVAr: {
59  m_choiceReactivePower->SetSelection(3);
60  } break;
61  default:
62  break;
63  }
64 
65  switch(data.loadType) {
66  case CONST_POWER: {
67  m_choiceType->SetSelection(0);
68  } break;
69  case CONST_IMPEDANCE: {
70  m_choiceType->SetSelection(1);
71  } break;
72  }
73 
74  m_checkBoxPlotData->SetValue(data.plotLoad);
75 
76  m_checkBoxUseCompLoad->SetValue(data.useCompLoad);
77 
78  m_textCtrlActivePowerImp->SetValue(Element::StringFromDouble(data.constImpedanceActive));
79  m_textCtrlActivePowerCur->SetValue(Element::StringFromDouble(data.constCurrentActive));
80  m_textCtrlActivePowerPow->SetValue(Element::StringFromDouble(data.constPowerActive));
81  m_textCtrlReactivePowerImp->SetValue(Element::StringFromDouble(data.constImpedanceReactive));
82  m_textCtrlReactivePowerCur->SetValue(Element::StringFromDouble(data.constCurrentReactive));
83  m_textCtrlReactivePowerPow->SetValue(Element::StringFromDouble(data.constPowerReactive));
84 
85  m_parent = parent;
86  m_load = load;
87 
88  UpdateZIPLoadFieldStatus();
89 }
90 
91 LoadForm::~LoadForm() {}
92 void LoadForm::OnOnButtonClick(wxCommandEvent& event)
93 {
94  if(ValidateData()) EndModal(wxID_OK);
95 }
96 
97 void LoadForm::OnStabilityButtonClick(wxCommandEvent& event)
98 {
99  if(ValidateData()) {
100  SwitchingForm swForm(m_parent, m_load);
101  swForm.SetTitle(_("Load: Switching"));
102  swForm.ShowModal();
103  EndModal(wxID_OK);
104  }
105 }
106 
107 bool LoadForm::ValidateData()
108 {
109  LoadElectricalData data;
110 
111  data.name = m_textCtrlName->GetValue();
112 
113  if(!m_load->DoubleFromString(m_parent, m_textCtrlActivePower->GetValue(), data.activePower,
114  _("Value entered incorrectly in the field \"Active power\".")))
115  return false;
116  switch(m_choiceActivePower->GetSelection()) {
117  case 0: {
118  data.activePowerUnit = UNIT_PU;
119  } break;
120  case 1: {
121  data.activePowerUnit = UNIT_W;
122  } break;
123  case 2: {
124  data.activePowerUnit = UNIT_kW;
125  } break;
126  case 3: {
127  data.activePowerUnit = UNIT_MW;
128  } break;
129  }
130 
131  if(!m_load->DoubleFromString(m_parent, m_textCtrlReactivePower->GetValue(), data.reactivePower,
132  _("Value entered incorrectly in the field \"Reactive power\".")))
133  return false;
134  switch(m_choiceReactivePower->GetSelection()) {
135  case 0: {
136  data.reactivePowerUnit = UNIT_PU;
137  } break;
138  case 1: {
139  data.reactivePowerUnit = UNIT_VAr;
140  } break;
141  case 2: {
142  data.reactivePowerUnit = UNIT_kVAr;
143  } break;
144  case 3: {
145  data.reactivePowerUnit = UNIT_MVAr;
146  } break;
147  }
148 
149  switch(m_choiceType->GetSelection()) {
150  case 0: {
151  data.loadType = CONST_POWER;
152  } break;
153  case 1: {
154  data.loadType = CONST_IMPEDANCE;
155  } break;
156  }
157 
158  data.plotLoad = m_checkBoxPlotData->GetValue();
159 
160  data.useCompLoad = m_checkBoxUseCompLoad->GetValue();
161 
163  this, m_textCtrlActivePowerImp->GetValue(), data.constImpedanceActive,
164  _("Value entered incorrectly in the field \"Constant impedance portion of active power\".")))
165  return false;
167  this, m_textCtrlActivePowerCur->GetValue(), data.constCurrentActive,
168  _("Value entered incorrectly in the field \"Constant current portion of active power\".")))
169  return false;
171  this, m_textCtrlActivePowerPow->GetValue(), data.constPowerActive,
172  _("Value entered incorrectly in the field \"Constant power portion of active power\".")))
173  return false;
175  this, m_textCtrlReactivePowerImp->GetValue(), data.constImpedanceReactive,
176  _("Value entered incorrectly in the field \"Constant impedance portion of reactive power\".")))
177  return false;
179  this, m_textCtrlReactivePowerCur->GetValue(), data.constCurrentReactive,
180  _("Value entered incorrectly in the field \"Constant current portion of reactive power\".")))
181  return false;
183  this, m_textCtrlReactivePowerPow->GetValue(), data.constPowerReactive,
184  _("Value entered incorrectly in the field \"Constant power portion of reactive power\".")))
185  return false;
186 
187  double sum = data.constImpedanceActive + data.constCurrentActive + data.constPowerActive;
188  if(sum > 100.01 || sum < 99.99) {
189  wxMessageDialog msgDialog(this, _("The sum of active power load composition must be 100%."), _("Error"),
190  wxOK | wxCENTRE | wxICON_ERROR);
191  msgDialog.ShowModal();
192  return false;
193  }
194  sum = data.constImpedanceReactive + data.constCurrentReactive + data.constPowerReactive;
195  if(sum > 100.01 || sum < 99.99) {
196  wxMessageDialog msgDialog(this, _("The sum of reactive power load composition must be 100%."), _("Error"),
197  wxOK | wxCENTRE | wxICON_ERROR);
198  msgDialog.ShowModal();
199  return false;
200  }
201 
202  m_load->SetElectricalData(data);
203  return true;
204 }
205 
206 void LoadForm::UpdateZIPLoadFieldStatus()
207 {
208  m_textCtrlActivePowerImp->Enable(m_checkBoxUseCompLoad->GetValue());
209  m_textCtrlActivePowerCur->Enable(m_checkBoxUseCompLoad->GetValue());
210  m_textCtrlActivePowerPow->Enable(m_checkBoxUseCompLoad->GetValue());
211  m_textCtrlReactivePowerImp->Enable(m_checkBoxUseCompLoad->GetValue());
212  m_textCtrlReactivePowerCur->Enable(m_checkBoxUseCompLoad->GetValue());
213  m_textCtrlReactivePowerPow->Enable(m_checkBoxUseCompLoad->GetValue());
214 }
static bool DoubleFromString(wxWindow *parent, wxString strValue, double &value, wxString errorMsg)
Get a double value from a string. Show a error message if the conversion fail.
Definition: Element.cpp:292
-
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
- - - - - - - -
Loas shunt power element.
Definition: Load.h:73
- - - - -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- -
-
- - - - diff --git a/docs/doxygen/html/_load_form_8h.html b/docs/doxygen/html/_load_form_8h.html index 8e881d7..8616467 100644 --- a/docs/doxygen/html/_load_form_8h.html +++ b/docs/doxygen/html/_load_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_load_form_8h.html','');});
LoadForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_load_form_8h_source.html b/docs/doxygen/html/_load_form_8h_source.html deleted file mode 100644 index 6b0a831..0000000 --- a/docs/doxygen/html/_load_form_8h_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/LoadForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  LoadForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
LoadForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef LOADFORM_H
19 #define LOADFORM_H
20 #include "ElementForm.h"
21 
22 class Load;
23 class SwitchingForm;
24 
32 class LoadForm : public LoadFormBase
33 {
34  public:
35  LoadForm(wxWindow* parent, Load* load);
36  virtual ~LoadForm();
37 
38  virtual bool ValidateData();
39 
40  protected:
41  virtual void OnCheckBoxCompLoadClick(wxCommandEvent& event) { UpdateZIPLoadFieldStatus(); }
42  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); };
43  virtual void OnOnButtonClick(wxCommandEvent& event);
44  virtual void OnStabilityButtonClick(wxCommandEvent& event);
45  virtual void UpdateZIPLoadFieldStatus();
46 
47  wxWindow* m_parent = NULL;
48  Load* m_load = NULL;
49 };
50 #endif // LOADFORM_H
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
-
Loas shunt power element.
Definition: Load.h:73
- -
Form to edit the load power data.
Definition: LoadForm.h:32
-
-
- - - - diff --git a/docs/doxygen/html/_machines_8cpp_source.html b/docs/doxygen/html/_machines_8cpp_source.html deleted file mode 100644 index 51a16f2..0000000 --- a/docs/doxygen/html/_machines_8cpp_source.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - -Project/Machines.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Machines.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Machines.h"
19 
21 #include "ControlElementSolver.h"
22 
23 Machines::Machines() : PowerElement() {}
24 Machines::~Machines() {}
25 bool Machines::AddParent(Element* parent, wxPoint2DDouble position)
26 {
27  if(parent) {
28  m_parentList.push_back(parent);
29  parent->AddChild(this);
30  wxPoint2DDouble parentPt =
31  parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position.
32  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
33  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back.
34 
35  m_position = parentPt + wxPoint2DDouble(-100.0, 0.0); // Shifts the position to the left of the bus.
36  m_width = m_height = 50.0;
37  m_rect = wxRect2DDouble(m_position.m_x - 25.0, m_position.m_y - 25.0, m_width, m_height);
38 
39  m_pointList.push_back(parentPt);
40  m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_position));
41  m_pointList.push_back(m_position + wxPoint2DDouble(35.0, 0.0));
42  m_pointList.push_back(m_position + wxPoint2DDouble(25.0, 0.0));
43  m_inserted = true;
44 
45  wxRect2DDouble genRect(0, 0, 0, 0);
46  m_switchRect.push_back(genRect); // Push a general rectangle.
47  UpdateSwitches();
48  UpdatePowerFlowArrowsPosition();
49  return true;
50  }
51  return false;
52 }
53 
54 void Machines::Draw(wxPoint2DDouble translation, double scale) const
55 {
56  OpenGLColour elementColour;
57  if(m_online) {
58  if(m_dynEvent)
59  elementColour = m_dynamicEventColour;
60  else
61  elementColour = m_onlineElementColour;
62  } else
63  elementColour = m_offlineElementColour;
64 
65  if(m_inserted) {
66  // Draw Selection (layer 1).
67  if(m_selected) {
68  glLineWidth(1.5 + m_borderSize * 2.0);
69  glColor4dv(m_selectionColour.GetRGBA());
70  DrawCircle(m_position, 25.0 + (m_borderSize + 1.5) / scale, 20, GL_POLYGON);
71  DrawLine(m_pointList);
72 
73  // Draw node selection.
74  DrawCircle(m_pointList[0], 5.0 + m_borderSize / scale, 10, GL_POLYGON);
75  }
76 
77  // Draw Machines (layer 2).
78  glLineWidth(1.5);
79 
80  // Draw node.
81  glColor4dv(elementColour.GetRGBA());
82  DrawCircle(m_pointList[0], 5.0, 10, GL_POLYGON);
83 
84  DrawLine(m_pointList);
85 
86  DrawSwitches();
87  DrawPowerFlowPts();
88 
89  glColor4d(1.0, 1.0, 1.0, 1.0);
90  DrawCircle(m_position, 25.0, 20, GL_POLYGON);
91 
92  glColor4dv(elementColour.GetRGBA());
93  DrawCircle(m_position, 25.0, 20);
94 
95  // Draw machine symbol.
96  glLineWidth(2.0);
97  DrawSymbol();
98  }
99 }
100 
101 void Machines::UpdateSwitchesPosition()
102 {
103  if(m_parentList[0]) {
104  m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], m_pointList[2]);
105  } else {
106  m_pointList[1] = m_pointList[0];
107  }
108  UpdateSwitches();
109 }
110 
111 void Machines::Move(wxPoint2DDouble position)
112 {
113  SetPosition(m_movePos + position - m_moveStartPt);
114  for(int i = 2; i < (int)m_pointList.size(); i++) {
115  m_pointList[i] = m_movePts[i] + position - m_moveStartPt;
116  }
117  if(!m_parentList[0]) {
118  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
119  }
120  UpdateSwitchesPosition();
121  UpdatePowerFlowArrowsPosition();
122 }
123 
124 void Machines::MoveNode(Element* element, wxPoint2DDouble position)
125 {
126  if(element) {
127  if(element == m_parentList[0]) {
128  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
129  }
130  } else {
131  if(m_activeNodeID == 1) {
132  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
133  if(m_parentList[0]) {
134  m_parentList[0]->RemoveChild(this);
135  m_parentList[0] = NULL;
136  m_online = false;
137  }
138  }
139  }
140 
141  // Recalculate switches positions
142  UpdateSwitchesPosition();
143  UpdatePowerFlowArrowsPosition();
144 }
145 
146 void Machines::StartMove(wxPoint2DDouble position)
147 {
148  m_moveStartPt = position;
149  m_movePts = m_pointList;
150  m_movePos = m_position;
151 }
152 
153 void Machines::RotateNode(Element* parent, bool clockwise)
154 {
155  double rotAngle = m_rotationAngle;
156  if(!clockwise) rotAngle = -m_rotationAngle;
157 
158  if(parent == m_parentList[0]) {
159  m_pointList[0] = parent->RotateAtPosition(m_pointList[0], rotAngle);
160  UpdateSwitchesPosition();
161  UpdatePowerFlowArrowsPosition();
162  }
163 }
164 
166 {
167  if(parent == m_parentList[0]) {
168  m_parentList[0] = NULL;
169  m_online = false;
170  UpdateSwitchesPosition();
171  UpdatePowerFlowArrowsPosition();
172  }
173 }
174 
175 bool Machines::NodeContains(wxPoint2DDouble position)
176 {
177  wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
178  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
179 
180  if(nodeRect.Contains(position)) {
181  m_activeNodeID = 1;
182  return true;
183  }
184 
185  m_activeNodeID = 0;
186  return false;
187 }
188 
190 {
191  if(parent && m_activeNodeID != 0) {
192  wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
193  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
194 
195  if(parent->Intersects(nodeRect)) {
196  m_parentList[0] = parent;
197 
198  // Centralize the node on bus.
199  wxPoint2DDouble parentPt =
200  parent->RotateAtPosition(m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position.
201  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
202  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle());
203  m_pointList[0] = parentPt;
204 
205  UpdateSwitchesPosition();
206  UpdatePowerFlowArrowsPosition();
207  return true;
208  } else {
209  m_parentList[0] = NULL;
210  m_online = false;
211  }
212  }
213  return false;
214 }
215 
217 {
218  if(m_parentList[0]) {
219  wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
220  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
221 
222  if(!m_parentList[0]->Intersects(nodeRect)) {
223  m_parentList[0]->RemoveChild(this);
224  m_parentList[0] = NULL;
225  m_online = false;
226  UpdateSwitchesPosition();
227  UpdatePowerFlowArrowsPosition();
228  }
229  }
230 }
231 
232 void Machines::Rotate(bool clockwise)
233 {
234  double rotAngle = m_rotationAngle;
235  if(!clockwise) rotAngle = -m_rotationAngle;
236 
237  m_angle += rotAngle;
238  if(m_angle >= 360 || m_angle <= -360) m_angle = 0.0;
239  m_pointList[2] = RotateAtPosition(m_pointList[2], rotAngle);
240  m_pointList[3] = RotateAtPosition(m_pointList[3], rotAngle);
241  UpdateSwitchesPosition();
242  UpdatePowerFlowArrowsPosition();
243 }
244 
245 void Machines::UpdatePowerFlowArrowsPosition()
246 {
247  std::vector<wxPoint2DDouble> edges;
248  switch(m_pfDirection) {
249  case PF_NONE: {
250  m_powerFlowArrow.clear();
251  } break;
252  case PF_TO_BUS: {
253  edges.push_back(m_pointList[2]);
254  edges.push_back(m_pointList[1]);
255  } break;
256  case PF_TO_ELEMENT: {
257  edges.push_back(m_pointList[1]);
258  edges.push_back(m_pointList[2]);
259  } break;
260  default:
261  break;
262  }
263 
264  CalculatePowerFlowPts(edges);
265 }
266 
268 {
269  m_pfDirection = pfDirection;
270  UpdatePowerFlowArrowsPosition();
271 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
- -
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Machines.cpp:146
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Machines.cpp:111
-
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
-
virtual bool Intersects(wxRect2DDouble rect) const =0
Check if the element&#39;s rect intersects other rect.
-
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement...
Definition: Machines.cpp:175
- -
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
Definition: Machines.cpp:267
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Machines.cpp:153
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Machines.cpp:25
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Machines.cpp:189
-
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
Definition: Machines.cpp:216
-
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Machines.cpp:232
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Machines.cpp:54
- - - -
Class to manage color of OpenGL.
Definition: Element.h:67
- -
PowerFlowDirection
Direction of power flow arrows.
Definition: PowerElement.h:78
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Machines.cpp:165
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
virtual void MoveNode(Element *element, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
Definition: Machines.cpp:124
-
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
-
- - - - diff --git a/docs/doxygen/html/_machines_8h.html b/docs/doxygen/html/_machines_8h.html index 7c8209e..3b472a4 100644 --- a/docs/doxygen/html/_machines_8h.html +++ b/docs/doxygen/html/_machines_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_machines_8h.html','');});
Machines.h File Reference
-
#include "PowerElement.h"
-
-

Go to the source code of this file.

- +
#include "PowerElement.h"
+
diff --git a/docs/doxygen/html/_machines_8h_source.html b/docs/doxygen/html/_machines_8h_source.html deleted file mode 100644 index d2264c3..0000000 --- a/docs/doxygen/html/_machines_8h_source.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - -Project/Machines.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Machines
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Machines.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef MACHINES_H
19 #define MACHINES_H
20 
21 #include "PowerElement.h"
22 
25 
33 class Machines : public PowerElement
34 {
35  public:
36  enum SyncMachineModel { SM_MODEL_1 = 0, SM_MODEL_2, SM_MODEL_3, SM_MODEL_4, SM_MODEL_5 };
37 
38  Machines();
39  ~Machines();
40 
41  virtual bool AddParent(Element* parent, wxPoint2DDouble position);
42  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
43  virtual void Draw(wxPoint2DDouble translation, double scale) const;
44  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
45  virtual void Move(wxPoint2DDouble position);
46  virtual void MoveNode(Element* element, wxPoint2DDouble position);
47  virtual void StartMove(wxPoint2DDouble position);
48  virtual void RotateNode(Element* parent, bool clockwise = true);
49  virtual void RemoveParent(Element* parent);
50  virtual bool NodeContains(wxPoint2DDouble position);
51  virtual bool SetNodeParent(Element* parent);
52  virtual void UpdateNodes();
53  virtual void Rotate(bool clockwise = true);
54  virtual void DrawSymbol() const {}
55  virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection);
56 
57  protected:
58  void UpdateSwitchesPosition();
59  void UpdatePowerFlowArrowsPosition();
60  bool m_inserted = false;
61 };
62 
63 #endif // MACHINES_H
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Machines.h:42
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Machines.cpp:146
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Machines.cpp:111
-
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement...
Definition: Machines.cpp:175
-
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
Definition: Machines.cpp:267
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Machines.cpp:153
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Machines.cpp:25
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Machines.cpp:189
-
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
Definition: Machines.cpp:216
-
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
- -
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Machines.cpp:232
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Machines.cpp:54
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Machines.h:44
-
Abstract class for rotary machines power elements.
Definition: Machines.h:33
-
PowerFlowDirection
Direction of power flow arrows.
Definition: PowerElement.h:78
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Machines.cpp:165
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
virtual void MoveNode(Element *element, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
Definition: Machines.cpp:124
-
-
- - - - diff --git a/docs/doxygen/html/_main_frame_8cpp_source.html b/docs/doxygen/html/_main_frame_8cpp_source.html deleted file mode 100644 index 7afa9cb..0000000 --- a/docs/doxygen/html/_main_frame_8cpp_source.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - -Project/MainFrame.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
MainFrame.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "MainFrame.h"
19 #include "ArtMetro.h"
20 #include "Workspace.h"
21 #include "Bus.h"
22 #include "Line.h"
23 #include "Transformer.h"
24 #include "SyncGenerator.h"
25 #include "IndMotor.h"
26 #include "SyncMotor.h"
27 #include "Load.h"
28 #include "Inductor.h"
29 #include "Capacitor.h"
30 #include "FileHanding.h"
31 #include "GeneralPropertiesForm.h"
33 #include "PropertiesData.h"
34 #include "ChartView.h"
35 #include "DataReport.h"
36 #include "AboutForm.h"
37 
39 MainFrame::MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties, wxString openPath)
40  : MainFrameBase(parent)
41 {
42  m_locale = locale;
43  m_generalProperties = initProperties;
44 
45  Init();
46 
47  if(openPath != "") {
48  EnableCurrentProjectRibbon();
49  Workspace* newWorkspace = new Workspace(this, _("Open project"), this->GetStatusBar(), m_sharedGLContext);
50  if(!m_sharedGLContext) m_sharedGLContext = newWorkspace->GetOpenGLContext();
51 
52  FileHanding fileHandling(newWorkspace);
53  if(fileHandling.OpenProject(openPath)) {
54  newWorkspace->SetSavedPath(openPath);
55 
56  m_workspaceList.push_back(newWorkspace);
57 
58  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
59  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
60 
61  m_auiNotebook->AddPage(newWorkspace, newWorkspace->GetName(), true);
62  m_auiNotebook->Layout();
63  newWorkspace->Redraw();
64  newWorkspace->SetJustOpened(true);
65  m_projectNumber++;
66  }
67  }
68 }
69 
71 {
72  // if(m_artMetro) delete m_artMetro;
73  if(m_addElementsMenu) {
74  m_addElementsMenu->Disconnect(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAddElementsClick),
75  NULL, this);
76  delete m_addElementsMenu;
77  }
78  if(m_locale) delete m_locale;
79  if(m_generalProperties) delete m_generalProperties;
80 }
81 
82 void MainFrame::Init()
83 {
84  this->SetSize(800, 600);
85 
86  CreateAddElementsMenu();
87 
88  EnableCurrentProjectRibbon(false);
89 
90  m_artMetro = new wxRibbonMetroArtProvider();
91  m_ribbonBar->SetArtProvider(m_artMetro);
92  m_ribbonBar->Realize();
93 
94  this->Layout();
95 }
96 
97 void MainFrame::EnableCurrentProjectRibbon(bool enable)
98 {
99  m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_ADDELEMENT, enable);
100  m_ribbonButtonBarReports->EnableButton(ID_RIBBON_CHARTS, enable);
101  m_ribbonButtonBarCProject->EnableButton(ID_RIBBON_CLOSE, enable);
102  m_ribbonButtonBarClipboard->EnableButton(ID_RIBBON_COPY, enable);
103  m_ribbonButtonBarReports->EnableButton(ID_RIBBON_DATAREPORT, enable);
104  m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_DELETE, enable);
105  m_ribbonButtonBarContinuous->EnableButton(ID_RIBBON_DISABLESOL, enable);
106  m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_DRAG, enable);
107  m_ribbonButtonBarContinuous->EnableButton(ID_RIBBON_ENABLESOL, enable);
108  m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_FAULT, enable);
109  m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_FIT, enable);
110  m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_MOVE, enable);
111  m_ribbonButtonBarClipboard->EnableButton(ID_RIBBON_PASTE, enable);
112  m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_POWERFLOW, enable);
113  m_ribbonButtonBarClipboard->EnableButton(ID_RIBBON_REDO, enable);
114  m_ribbonButtonBarContinuous->EnableButton(ID_RIBBON_RESETVOLT, enable);
115  m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_RUNSTAB, enable);
116  m_ribbonButtonBarCProject->EnableButton(ID_RIBBON_SAVE, enable);
117  m_ribbonButtonBarCProject->EnableButton(ID_RIBBON_SAVEAS, enable);
118  m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_SCPOWER, enable);
119  m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_PROJSETTINGS, enable);
120  m_ribbonButtonBarReports->EnableButton(ID_RIBBON_SNAPSHOT, enable);
121  m_ribbonButtonBarSimulations->EnableButton(ID_RIBBON_SIMULSETTINGS, enable);
122  m_ribbonButtonBarClipboard->EnableButton(ID_RIBBON_UNDO, enable);
123  m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_ROTATEC, enable);
124  m_ribbonButtonBarCircuit->EnableButton(ID_RIBBON_ROTATECC, enable);
125 }
126 
127 void MainFrame::CreateAddElementsMenu()
128 {
129  m_addElementsMenu = new wxMenu();
130 
131  wxMenuItem* busElement =
132  new wxMenuItem(m_addElementsMenu, ID_ADDMENU_BUS, _("&Bus\tB"), _("Adds a bus at the circuit"));
133  // busElement->SetBitmap(wxArtProvider::GetBitmap(wxART_WARNING));
134  wxMenuItem* lineElement =
135  new wxMenuItem(m_addElementsMenu, ID_ADDMENU_LINE, _("&Line\tL"), _("Adds a power line at the circuit"));
136  wxMenuItem* transformerElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_TRANSFORMER, _("&Transformer\tT"),
137  _("Adds a transformer at the circuit"));
138  wxMenuItem* generatorElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_GENERATOR, _("&Generator\tG"),
139  _("Adds a generator at the circuit"));
140  wxMenuItem* indMotorElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_INDMOTOR, _("&Induction motor\tI"),
141  _("Adds an induction motor at the circuit"));
142  wxMenuItem* syncCompElement =
143  new wxMenuItem(m_addElementsMenu, ID_ADDMENU_SYNCCOMP, _("&Synchronous compensator \tK"),
144  _("Adds an induction motor at the circuit"));
145  wxMenuItem* loadElement =
146  new wxMenuItem(m_addElementsMenu, ID_ADDMENU_LOAD, _("&Load\tShift-L"), _("Adds a load at the circuit"));
147  wxMenuItem* capacitorElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_CAPACITOR, _("&Capacitor\tShift-C"),
148  _("Adds a shunt capacitor at the circuit"));
149  wxMenuItem* inductorElement = new wxMenuItem(m_addElementsMenu, ID_ADDMENU_INDUCTOR, _("&Inductor\tShift-I"),
150  _("Adds a shunt inductor at the circuit"));
151 
152  m_addElementsMenu->Append(busElement);
153  m_addElementsMenu->Append(lineElement);
154  m_addElementsMenu->Append(transformerElement);
155  m_addElementsMenu->Append(generatorElement);
156  m_addElementsMenu->Append(indMotorElement);
157  m_addElementsMenu->Append(syncCompElement);
158  m_addElementsMenu->Append(loadElement);
159  m_addElementsMenu->Append(capacitorElement);
160  m_addElementsMenu->Append(inductorElement);
161 
162  m_addElementsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, &MainFrame::OnAddElementsClick, this);
163 }
164 
165 void MainFrame::OnNewClick(wxRibbonButtonBarEvent& event)
166 {
167  EnableCurrentProjectRibbon();
168 
169  Workspace* newWorkspace =
170  new Workspace(this, wxString::Format(_("New project %d"), m_projectNumber), this->GetStatusBar(), m_sharedGLContext);
171  if(!m_sharedGLContext) m_sharedGLContext = newWorkspace->GetOpenGLContext();
172  m_workspaceList.push_back(newWorkspace);
173 
174  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
175  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
176 
177  m_auiNotebook->AddPage(newWorkspace, newWorkspace->GetName(), true);
178  newWorkspace->Redraw();
179  m_projectNumber++;
180 }
181 
182 void MainFrame::OnAboutClick(wxRibbonButtonBarEvent& event)
183 {
184  AboutForm about(this);
185  about.ShowModal();
186 }
187 
188 void MainFrame::OnAddElementDropdown(wxRibbonButtonBarEvent& event) { event.PopupMenu(m_addElementsMenu); }
189 void MainFrame::OnChartsClick(wxRibbonButtonBarEvent& event)
190 {
191  if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) {
192  std::vector<ElementPlotData> plotDataList;
193  auto elementList = workspace->GetElementList();
194  for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
195  if(PowerElement* powerElement = dynamic_cast<PowerElement*>(*it)) {
196  ElementPlotData plotData;
197  if(powerElement->GetPlotData(plotData)) plotDataList.push_back(plotData);
198  }
199  }
200  ChartView* cView = new ChartView(workspace, plotDataList, workspace->GetStabilityTimeVector());
201  cView->Show();
202  }
203 }
204 
205 void MainFrame::OnCloseClick(wxRibbonButtonBarEvent& event) {}
206 void MainFrame::OnCopyClick(wxRibbonButtonBarEvent& event) {}
207 void MainFrame::OnDataReportClick(wxRibbonButtonBarEvent& event)
208 {
209  if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) {
210  DataReport* dataReport = new DataReport(workspace, workspace);
211  dataReport->Show();
212  }
213 }
214 void MainFrame::OnDeleteClick(wxRibbonButtonBarEvent& event)
215 {
216  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
217  if(workspace) {
218  workspace->DeleteSelectedElements();
219  }
220 }
221 void MainFrame::OnDisableSolutionClick(wxRibbonButtonBarEvent& event)
222 {
223  if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) {
224  workspace->SetContinuousCalculationActive(false);
225  }
226  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
227  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
228 }
229 
230 void MainFrame::OnDragClick(wxRibbonButtonBarEvent& event) {}
231 void MainFrame::OnEnableSolutionClick(wxRibbonButtonBarEvent& event)
232 {
233  if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) {
234  workspace->SetContinuousCalculationActive(true);
235  workspace->RunStaticStudies();
236  }
237  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, true);
238  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, false);
239 }
240 
241 void MainFrame::OnExpImpClick(wxRibbonButtonBarEvent& event) {}
242 void MainFrame::OnFaultClick(wxRibbonButtonBarEvent& event)
243 {
244  if(Workspace* workspace = dynamic_cast<Workspace*>(m_auiNotebook->GetCurrentPage())) {
245  workspace->RunFault();
246  }
247 }
248 
249 void MainFrame::OnFitClick(wxRibbonButtonBarEvent& event)
250 {
251  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
252  if(workspace) {
253  workspace->Fit();
254  }
255 }
256 
257 void MainFrame::OnMoveClick(wxRibbonButtonBarEvent& event)
258 {
259  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
260  if(workspace) {
261  auto elementList = workspace->GetAllElements();
262  // Calculate the average position of selected elements.
263  wxPoint2DDouble averagePos(0, 0);
264  int numSelElements = 0;
265  for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
266  Element* element = *it;
267  if(element->IsSelected()) {
268  averagePos += element->GetPosition();
269  numSelElements++;
270  }
271  }
272  averagePos = wxPoint2DDouble(averagePos.m_x / double(numSelElements), averagePos.m_y / double(numSelElements));
273  // Set the move position to the average of selected elements.
274  for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) {
275  Element* element = *it;
276  if(element->IsSelected()) {
277  element->StartMove(averagePos);
278  }
279  }
280  workspace->SetWorkspaceMode(Workspace::MODE_MOVE_ELEMENT);
281  }
282 }
283 
284 void MainFrame::OnOpenClick(wxRibbonButtonBarEvent& event)
285 {
286  wxFileDialog openFileDialog(this, _("Open PSP file"), "", "", "PSP files (*.psp)|*.psp",
287  wxFD_OPEN | wxFD_FILE_MUST_EXIST);
288  if(openFileDialog.ShowModal() == wxID_CANCEL) return;
289 
290  wxFileName fileName(openFileDialog.GetPath());
291 
292  EnableCurrentProjectRibbon();
293  Workspace* newWorkspace = new Workspace(this, _("Open project"), this->GetStatusBar(), m_sharedGLContext);
294  if(!m_sharedGLContext) m_sharedGLContext = newWorkspace->GetOpenGLContext();
295 
296  FileHanding fileHandling(newWorkspace);
297  if(fileHandling.OpenProject(fileName)) {
298  newWorkspace->SetSavedPath(fileName);
299 
300  m_workspaceList.push_back(newWorkspace);
301 
302  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_DISABLESOL, true);
303  m_ribbonButtonBarContinuous->ToggleButton(ID_RIBBON_ENABLESOL, false);
304 
305  m_auiNotebook->AddPage(newWorkspace, newWorkspace->GetName(), true);
306  m_auiNotebook->Layout();
307  newWorkspace->Redraw();
308  newWorkspace->SetJustOpened(true);
309  m_projectNumber++;
310  } else {
311  wxMessageDialog msgDialog(this, _("It was not possible to open the selected file."), _("Error"),
312  wxOK | wxCENTRE | wxICON_ERROR);
313  msgDialog.ShowModal();
314  delete newWorkspace;
315  }
316 }
317 
318 void MainFrame::OnPSPGuideClick(wxRibbonButtonBarEvent& event) {}
319 void MainFrame::OnPasteClick(wxRibbonButtonBarEvent& event) {}
320 void MainFrame::OnPowerFlowClick(wxRibbonButtonBarEvent& event)
321 {
322  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
323  if(workspace) {
324  workspace->RunPowerFlow();
325  }
326 }
327 
328 void MainFrame::OnRedoClick(wxRibbonButtonBarEvent& event) {}
329 void MainFrame::OnResetVoltagesClick(wxRibbonButtonBarEvent& event) {}
330 void MainFrame::OnRunStabilityClick(wxRibbonButtonBarEvent& event)
331 {
332  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
333  if(workspace) {
334  workspace->RunStability();
335  }
336 }
337 
338 void MainFrame::OnSCPowerClick(wxRibbonButtonBarEvent& event)
339 {
340  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
341  if(workspace) {
342  workspace->RunSCPower();
343  }
344 }
345 
346 void MainFrame::OnSaveAsClick(wxRibbonButtonBarEvent& event)
347 {
348  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
349  if(workspace) {
350  FileHanding fileHandling(workspace);
351 
352  wxFileDialog saveFileDialog(this, _("Save PSP file"), "", "", "PSP files (*.psp)|*.psp",
353  wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
354  if(saveFileDialog.ShowModal() == wxID_CANCEL) return;
355 
356  fileHandling.SaveProject(saveFileDialog.GetPath());
357  wxFileName fileName(saveFileDialog.GetPath());
358  workspace->SetName(fileName.GetName());
359  m_auiNotebook->SetPageText(m_auiNotebook->GetPageIndex(workspace), workspace->GetName());
360  workspace->SetSavedPath(fileName);
361  }
362 }
363 
364 void MainFrame::OnSaveClick(wxRibbonButtonBarEvent& event)
365 {
366  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
367  if(workspace) {
368  FileHanding fileHandling(workspace);
369 
370  if(workspace->GetSavedPath().IsOk()) {
371  fileHandling.SaveProject(workspace->GetSavedPath());
372  } else {
373  wxFileDialog saveFileDialog(this, _("Save PSP file"), "", "", "PSP files (*.psp)|*.psp",
374  wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
375  if(saveFileDialog.ShowModal() == wxID_CANCEL) return;
376 
377  fileHandling.SaveProject(saveFileDialog.GetPath());
378  wxFileName fileName(saveFileDialog.GetPath());
379  workspace->SetName(fileName.GetName());
380  m_auiNotebook->SetPageText(m_auiNotebook->GetPageIndex(workspace), workspace->GetName());
381  workspace->SetSavedPath(fileName);
382  }
383  }
384 }
385 
386 void MainFrame::OnSnapshotClick(wxRibbonButtonBarEvent& event) {}
387 void MainFrame::OnUndoClick(wxRibbonButtonBarEvent& event) {}
388 void MainFrame::OnAddElementsClick(wxCommandEvent& event)
389 {
390  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
391 
392  if(workspace) {
393  if(workspace->GetWorkspaceMode() != Workspace::MODE_INSERT) {
394  auto elementList = workspace->GetElementList();
395  wxString statusBarText = "";
396  bool newElement = false;
397 
398  switch(event.GetId()) {
399  case ID_ADDMENU_BUS: {
400  Bus* newBus = new Bus(wxPoint2DDouble(0, 0),
401  wxString::Format(_("Bus %d"), workspace->GetElementNumber(ID_BUS)));
402  workspace->IncrementElementNumber(ID_BUS);
403  elementList.push_back(newBus);
404  statusBarText = _("Insert Bus: Click to insert, ESC to cancel.");
405  newElement = true;
406  } break;
407  case ID_ADDMENU_LINE: {
408  Line* newLine = new Line(wxString::Format(_("Line %d"), workspace->GetElementNumber(ID_LINE)));
409  elementList.push_back(newLine);
410  workspace->IncrementElementNumber(ID_LINE);
411  statusBarText = _("Insert Line: Click on two buses, ESC to cancel.");
412  newElement = true;
413  } break;
414  case ID_ADDMENU_TRANSFORMER: {
415  Transformer* newTransformer = new Transformer(
416  wxString::Format(_("Transformer %d"), workspace->GetElementNumber(ID_TRANSFORMER)));
417  workspace->IncrementElementNumber(ID_TRANSFORMER);
418  elementList.push_back(newTransformer);
419  statusBarText = _("Insert Transformer: Click on two buses, ESC to cancel.");
420  newElement = true;
421  } break;
422  case ID_ADDMENU_GENERATOR: {
423  SyncGenerator* newGenerator = new SyncGenerator(
424  wxString::Format(_("Generator %d"), workspace->GetElementNumber(ID_SYNCGENERATOR)));
425  workspace->IncrementElementNumber(ID_SYNCGENERATOR);
426  elementList.push_back(newGenerator);
427  statusBarText = _("Insert Generator: Click on a buses, ESC to cancel.");
428  newElement = true;
429  } break;
430  case ID_ADDMENU_LOAD: {
431  Load* newLoad = new Load(wxString::Format(_("Load %d"), workspace->GetElementNumber(ID_LOAD)));
432  workspace->IncrementElementNumber(ID_LOAD);
433  elementList.push_back(newLoad);
434  statusBarText = _("Insert Load: Click on a buses, ESC to cancel.");
435  newElement = true;
436  } break;
437  case ID_ADDMENU_CAPACITOR: {
438  Capacitor* newCapacitor =
439  new Capacitor(wxString::Format(_("Capacitor %d"), workspace->GetElementNumber(ID_CAPACITOR)));
440  workspace->IncrementElementNumber(ID_CAPACITOR);
441  elementList.push_back(newCapacitor);
442  statusBarText = _("Insert Capacitor: Click on a buses, ESC to cancel.");
443  newElement = true;
444  } break;
445  case ID_ADDMENU_INDUCTOR: {
446  Inductor* newInductor =
447  new Inductor(wxString::Format(_("Inductor %d"), workspace->GetElementNumber(ID_INDUCTOR)));
448  workspace->IncrementElementNumber(ID_INDUCTOR);
449  elementList.push_back(newInductor);
450  statusBarText = _("Insert Inductor: Click on a buses, ESC to cancel.");
451  newElement = true;
452  } break;
453  case ID_ADDMENU_INDMOTOR: {
454  IndMotor* newIndMotor = new IndMotor(
455  wxString::Format(_("Induction motor %d"), workspace->GetElementNumber(ID_INDMOTOR)));
456  workspace->IncrementElementNumber(ID_INDMOTOR);
457  elementList.push_back(newIndMotor);
458  statusBarText = _("Insert Induction Motor: Click on a buses, ESC to cancel.");
459  newElement = true;
460  } break;
461  case ID_ADDMENU_SYNCCOMP: {
462  SyncMotor* newSyncCondenser = new SyncMotor(
463  wxString::Format(_("Synchronous condenser %d"), workspace->GetElementNumber(ID_SYNCMOTOR)));
464  workspace->IncrementElementNumber(ID_SYNCMOTOR);
465  elementList.push_back(newSyncCondenser);
466  statusBarText = _("Insert Synchronous Condenser: Click on a buses, ESC to cancel.");
467  newElement = true;
468  } break;
469  }
470  if(newElement) {
471  workspace->SetElementList(elementList);
472  workspace->SetWorkspaceMode(Workspace::MODE_INSERT);
473  workspace->SetStatusBarText(statusBarText);
474  workspace->Redraw();
475  }
476  }
477  }
478 }
479 void MainFrame::NotebookPageClosed(wxAuiNotebookEvent& event)
480 {
481  if(m_auiNotebook->GetPageCount() == 0) EnableCurrentProjectRibbon(false);
482 }
483 
484 void MainFrame::NotebookPageClosing(wxAuiNotebookEvent& event)
485 {
486  auto it = m_workspaceList.begin();
487  while(it != m_workspaceList.end()) {
488  if(*it == m_auiNotebook->GetCurrentPage()) {
489  if((*it)->GetOpenGLContext() == m_sharedGLContext) m_sharedGLContext = NULL;
490  m_workspaceList.erase(it);
491  break;
492  }
493  it++;
494  }
495  if(!m_sharedGLContext && m_workspaceList.size() != 0) {
496  m_sharedGLContext = m_workspaceList[0]->GetOpenGLContext();
497  }
498  event.Skip();
499 }
500 
501 void MainFrame::OnRotClockClick(wxRibbonButtonBarEvent& event)
502 {
503  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
504  if(workspace) {
505  workspace->RotateSelectedElements();
506  }
507 }
508 
509 void MainFrame::OnRotCounterClockClick(wxRibbonButtonBarEvent& event)
510 {
511  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
512  if(workspace) {
513  workspace->RotateSelectedElements(false);
514  }
515 }
516 
517 void MainFrame::OnGeneralSettingsClick(wxRibbonButtonBarEvent& event)
518 {
519  GeneralPropertiesForm genPropForm(this, m_generalProperties);
520  genPropForm.SetInitialSize();
521  genPropForm.ShowModal();
522 }
523 
524 void MainFrame::OnSimulationSettingsClick(wxRibbonButtonBarEvent& event)
525 {
526  Workspace* workspace = static_cast<Workspace*>(m_auiNotebook->GetCurrentPage());
527  if(workspace) {
528  SimulationsSettingsForm simulSettingsForm(this, workspace->GetProperties());
529  simulSettingsForm.SetInitialSize();
530  simulSettingsForm.ShowModal();
531  }
532 }
General and simulation data manager.
- -
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- - - -
~MainFrame()
Default destructor.
Definition: MainFrame.cpp:70
- - - -
MainFrame()
Default constructor.
Definition: MainFrame.cpp:38
-
Save and opens the projects created on disk.
Definition: FileHanding.h:43
-
Form to edit the software&#39;s general data.
- - -
Synchronous generator power element.
- - -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
- - - - - -
Power line element.
Definition: Line.h:59
- -
Loas shunt power element.
Definition: Load.h:73
-
This class is responsible to manage the charts generated in the transient electromechanical studies...
Definition: ChartView.h:40
- -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
-
Form to edit the simulation data.
-
Induction motor power element.
Definition: IndMotor.h:40
-
bool IsSelected() const
Checks if the element is selected.
Definition: Element.h:202
- - -
Shunt capactior power element.
Definition: Capacitor.h:38
-
Form that shows the results of power flow and fault calculations.
Definition: DataReport.h:33
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Element.cpp:117
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
Inductor shunt power element.
Definition: Inductor.h:38
-
Form to show some informations.
Definition: AboutForm.h:32
- -
This class manages the graphical and power elements. It is responsible for handling the user&#39;s intera...
Definition: Workspace.h:81
-
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_main_frame_8h.html b/docs/doxygen/html/_main_frame_8h.html index cf5d664..77d8246 100644 --- a/docs/doxygen/html/_main_frame_8h.html +++ b/docs/doxygen/html/_main_frame_8h.html @@ -95,10 +95,8 @@ $(document).ready(function(){initNavTree('_main_frame_8h.html','');}); #include <wx/msgdlg.h>
#include <wx/filedlg.h>
#include <wx/glcanvas.h>
-#include "MainFrameBase.h"
- -

Go to the source code of this file.

- +#include "base/MainFrameBase.h"
+
@@ -107,7 +105,7 @@ Classes

Classes

class  MainFrame
-   ID_ADDMENU_SYNCCOMP
} - +

Enumerations

enum  {
+
enum  {
  ID_ADDMENU_BUS = 20000, ID_ADDMENU_LINE, ID_ADDMENU_TRANSFORMER, @@ -121,7 +119,7 @@ Enumerations
 
 
diff --git a/docs/doxygen/html/_main_frame_8h.js b/docs/doxygen/html/_main_frame_8h.js index f2a8e51..58f3047 100644 --- a/docs/doxygen/html/_main_frame_8h.js +++ b/docs/doxygen/html/_main_frame_8h.js @@ -1,13 +1,13 @@ var _main_frame_8h = [ [ "MainFrame", "class_main_frame.html", "class_main_frame" ], - [ "ID_ADDMENU_BUS", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a972a4490c2c106d50fad31bf61c954ee", null ], - [ "ID_ADDMENU_LINE", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a8f622d047e7be05ca22e68cf3c495891", null ], - [ "ID_ADDMENU_TRANSFORMER", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac723eda89da3d08df66556102f04fb3f", null ], - [ "ID_ADDMENU_GENERATOR", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a78ef6f7d5925a2d3f66fb4b985cde4c8", null ], - [ "ID_ADDMENU_LOAD", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a0448f71ade0850cce41f666113d61646", null ], - [ "ID_ADDMENU_CAPACITOR", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a19b41804a810ff58604d9a2e98a12d9b", null ], - [ "ID_ADDMENU_INDUCTOR", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ae8447bb338d69f233187fa7ecddb269b", null ], - [ "ID_ADDMENU_INDMOTOR", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a88478f64002d3686cd141ab42431c654", null ], - [ "ID_ADDMENU_SYNCCOMP", "_main_frame_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a713348ad9d91573d5729b0a8b8e66e04", null ] + [ "ID_ADDMENU_BUS", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba972a4490c2c106d50fad31bf61c954ee", null ], + [ "ID_ADDMENU_LINE", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba8f622d047e7be05ca22e68cf3c495891", null ], + [ "ID_ADDMENU_TRANSFORMER", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55bac723eda89da3d08df66556102f04fb3f", null ], + [ "ID_ADDMENU_GENERATOR", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba78ef6f7d5925a2d3f66fb4b985cde4c8", null ], + [ "ID_ADDMENU_LOAD", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba0448f71ade0850cce41f666113d61646", null ], + [ "ID_ADDMENU_CAPACITOR", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba19b41804a810ff58604d9a2e98a12d9b", null ], + [ "ID_ADDMENU_INDUCTOR", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55bae8447bb338d69f233187fa7ecddb269b", null ], + [ "ID_ADDMENU_INDMOTOR", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba88478f64002d3686cd141ab42431c654", null ], + [ "ID_ADDMENU_SYNCCOMP", "_main_frame_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba713348ad9d91573d5729b0a8b8e66e04", null ] ]; \ No newline at end of file diff --git a/docs/doxygen/html/_main_frame_8h_source.html b/docs/doxygen/html/_main_frame_8h_source.html deleted file mode 100644 index 0eca7c8..0000000 --- a/docs/doxygen/html/_main_frame_8h_source.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - -Project/MainFrame.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
MainFrame.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef MAINFRAME_H
19 #define MAINFRAME_H
20 
21 #include <wx/menu.h>
22 #include <wx/msgdlg.h>
23 #include <wx/filedlg.h>
24 #include <wx/glcanvas.h>
25 
26 #include "MainFrameBase.h"
27 
28 class MainFrameBase;
30 class Workspace;
31 class FileHanding;
34 class PropertiesData;
35 class ChartView;
36 class DataReport;
37 class AboutForm;
38 
39 enum {
40  ID_ADDMENU_BUS = 20000,
41  ID_ADDMENU_LINE,
42  ID_ADDMENU_TRANSFORMER,
43  ID_ADDMENU_GENERATOR,
44  ID_ADDMENU_LOAD,
45  ID_ADDMENU_CAPACITOR,
46  ID_ADDMENU_INDUCTOR,
47  ID_ADDMENU_INDMOTOR,
48  ID_ADDMENU_SYNCCOMP
49 };
50 
58 class MainFrame : public MainFrameBase
59 {
60  public:
65  MainFrame();
72  MainFrame(wxWindow* parent, wxLocale* locale, PropertiesData* initProperties, wxString openPath = "");
73 
77  ~MainFrame();
78 
79  protected:
80  virtual void OnGeneralSettingsClick(wxRibbonButtonBarEvent& event);
81  virtual void OnSimulationSettingsClick(wxRibbonButtonBarEvent& event);
82  virtual void OnRotClockClick(wxRibbonButtonBarEvent& event);
83  virtual void OnRotCounterClockClick(wxRibbonButtonBarEvent& event);
84  virtual void NotebookPageClosed(wxAuiNotebookEvent& event);
85  virtual void NotebookPageClosing(wxAuiNotebookEvent& event);
86  virtual void OnAboutClick(wxRibbonButtonBarEvent& event);
87  virtual void OnAddElementDropdown(wxRibbonButtonBarEvent& event);
88  virtual void OnChartsClick(wxRibbonButtonBarEvent& event);
89  virtual void OnCloseClick(wxRibbonButtonBarEvent& event);
90  virtual void OnCopyClick(wxRibbonButtonBarEvent& event);
91  virtual void OnDataReportClick(wxRibbonButtonBarEvent& event);
92  virtual void OnDeleteClick(wxRibbonButtonBarEvent& event);
93  virtual void OnDisableSolutionClick(wxRibbonButtonBarEvent& event);
94  virtual void OnDragClick(wxRibbonButtonBarEvent& event);
95  virtual void OnEnableSolutionClick(wxRibbonButtonBarEvent& event);
96  virtual void OnExitClick(wxRibbonButtonBarEvent& event) { this->Close(); };
97  virtual void OnExpImpClick(wxRibbonButtonBarEvent& event);
98  virtual void OnFaultClick(wxRibbonButtonBarEvent& event);
99  virtual void OnFitClick(wxRibbonButtonBarEvent& event);
100  virtual void OnMoveClick(wxRibbonButtonBarEvent& event);
101  virtual void OnOpenClick(wxRibbonButtonBarEvent& event);
102  virtual void OnPSPGuideClick(wxRibbonButtonBarEvent& event);
103  virtual void OnPasteClick(wxRibbonButtonBarEvent& event);
104  virtual void OnPowerFlowClick(wxRibbonButtonBarEvent& event);
105  virtual void OnRedoClick(wxRibbonButtonBarEvent& event);
106  virtual void OnResetVoltagesClick(wxRibbonButtonBarEvent& event);
107  virtual void OnRunStabilityClick(wxRibbonButtonBarEvent& event);
108  virtual void OnSCPowerClick(wxRibbonButtonBarEvent& event);
109  virtual void OnSaveAsClick(wxRibbonButtonBarEvent& event);
110  virtual void OnSaveClick(wxRibbonButtonBarEvent& event);
111  virtual void OnSnapshotClick(wxRibbonButtonBarEvent& event);
112  virtual void OnUndoClick(wxRibbonButtonBarEvent& event);
113  virtual void OnNewClick(wxRibbonButtonBarEvent& event);
114 
115  std::vector<Workspace*> m_workspaceList;
116  int m_projectNumber = 1;
117 
118  wxRibbonMetroArtProvider* m_artMetro = NULL;
119  wxMenu* m_addElementsMenu = NULL;
120  wxLocale* m_locale = NULL;
121  PropertiesData* m_generalProperties = NULL;
122  wxGLContext* m_sharedGLContext = NULL;
123 
124  void Init();
125  void EnableCurrentProjectRibbon(bool enable = true);
126  void CreateAddElementsMenu();
127 
128  void OnAddElementsClick(wxCommandEvent& event);
129 };
130 
131 #endif // MAINFRAME_H
General and simulation data manager.
- -
~MainFrame()
Default destructor.
Definition: MainFrame.cpp:70
-
MainFrame()
Default constructor.
Definition: MainFrame.cpp:38
-
Save and opens the projects created on disk.
Definition: FileHanding.h:43
-
Form to edit the software&#39;s general data.
-
Main frame of the program. This class manage the ribbon menu and the notebook behavior.
Definition: MainFrame.h:58
- -
This class is responsible to manage the charts generated in the transient electromechanical studies...
Definition: ChartView.h:40
-
Form to edit the simulation data.
-
Form that shows the results of power flow and fault calculations.
Definition: DataReport.h:33
-
Form to show some informations.
Definition: AboutForm.h:32
-
This class manages the graphical and power elements. It is responsible for handling the user&#39;s intera...
Definition: Workspace.h:81
-
-
- - - - diff --git a/docs/doxygen/html/_main_frame_base_8cpp_source.html b/docs/doxygen/html/_main_frame_base_8cpp_source.html deleted file mode 100644 index 70a4db0..0000000 --- a/docs/doxygen/html/_main_frame_base_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/MainFrameBase.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
MainFrameBase.cpp
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: MainFrame.wxcp
4 // Do not modify this file by hand!
6 
7 #include "MainFrameBase.h"
8 
9 
10 // Declare the bitmap loading function
11 extern void wxC9ED9InitBitmapResources();
12 
13 static bool bBitmapLoaded = false;
14 
15 
16 MainFrameBase::MainFrameBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
17  : wxFrame(parent, id, title, pos, size, style)
18 {
19  if ( !bBitmapLoaded ) {
20  // We need to initialise the default bitmap handler
21  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
22  wxC9ED9InitBitmapResources();
23  bBitmapLoaded = true;
24  }
25  // Set icon(s) to the application/dialog
26  wxIconBundle app_icons;
27  {
28  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("logo16"));
29  wxIcon icn;
30  icn.CopyFromBitmap(iconBmp);
31  app_icons.AddIcon( icn );
32  }
33  {
34  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("logo32"));
35  wxIcon icn;
36  icn.CopyFromBitmap(iconBmp);
37  app_icons.AddIcon( icn );
38  }
39  {
40  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("logo64"));
41  wxIcon icn;
42  icn.CopyFromBitmap(iconBmp);
43  app_icons.AddIcon( icn );
44  }
45  {
46  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("logo128"));
47  wxIcon icn;
48  icn.CopyFromBitmap(iconBmp);
49  app_icons.AddIcon( icn );
50  }
51  {
52  wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("logo256"));
53  wxIcon icn;
54  icn.CopyFromBitmap(iconBmp);
55  app_icons.AddIcon( icn );
56  }
57  SetIcons( app_icons );
58 
59 
60  wxBoxSizer* boxSizer_lvl_1_1 = new wxBoxSizer(wxVERTICAL);
61  this->SetSizer(boxSizer_lvl_1_1);
62 
63  wxBoxSizer* boxSizer_lvl_2_1 = new wxBoxSizer(wxVERTICAL);
64 
65  boxSizer_lvl_1_1->Add(boxSizer_lvl_2_1, 0, wxEXPAND, WXC_FROM_DIP(5));
66 
67  m_ribbonBar = new wxRibbonBar(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxRIBBON_BAR_DEFAULT_STYLE);
68  m_ribbonBar->SetArtProvider(new wxRibbonDefaultArtProvider);
69 
70  boxSizer_lvl_2_1->Add(m_ribbonBar, 0, wxEXPAND, WXC_FROM_DIP(5));
71 
72  m_ribbonPageFile = new wxRibbonPage(m_ribbonBar, wxID_ANY, _("File"), wxNullBitmap, 0);
73  m_ribbonPageFile->SetToolTip(_("File"));
74  m_ribbonBar->SetActivePage( m_ribbonPageFile );
75 
76  m_ribbonPanelProjects = new wxRibbonPanel(m_ribbonPageFile, wxID_ANY, _("Projects"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageFile, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
77  m_ribbonPanelProjects->SetToolTip(_("Projects"));
78 
79  m_ribbonButtonBarProjects = new wxRibbonButtonBar(m_ribbonPanelProjects, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelProjects, wxSize(-1,-1)), 0);
80  m_ribbonButtonBarProjects->SetToolTip(_("Projects"));
81 
82  m_ribbonButtonBarProjects->AddButton(ID_RIBBON_NEW, _("New"), wxXmlResource::Get()->LoadBitmap(wxT("new32")), _("Create new project"), wxRIBBON_BUTTON_NORMAL);
83 
84  m_ribbonButtonBarProjects->AddButton(ID_RIBBON_OPEN, _("Open"), wxXmlResource::Get()->LoadBitmap(wxT("open32")), _("Open saved project"), wxRIBBON_BUTTON_NORMAL);
85 
86  m_ribbonButtonBarProjects->AddButton(ID_RIBBON_GENSETTINGS, _("General Settings"), wxXmlResource::Get()->LoadBitmap(wxT("settings32")), _("Opens a dialog to set the main settings of the program"), wxRIBBON_BUTTON_NORMAL);
87 
88  m_ribbonButtonBarProjects->AddButton(ID_RIBBON_EXIT, _("Exit"), wxXmlResource::Get()->LoadBitmap(wxT("exit32")), _("Closes the application"), wxRIBBON_BUTTON_NORMAL);
89  m_ribbonButtonBarProjects->Realize();
90 
91  m_ribbonPanelCProject = new wxRibbonPanel(m_ribbonPageFile, wxID_ANY, _("Current project"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageFile, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
92  m_ribbonPanelCProject->SetToolTip(_("Current project"));
93 
94  m_ribbonButtonBarCProject = new wxRibbonButtonBar(m_ribbonPanelCProject, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelCProject, wxSize(-1,-1)), 0);
95 
96  m_ribbonButtonBarCProject->AddButton(ID_RIBBON_SAVE, _("Save"), wxXmlResource::Get()->LoadBitmap(wxT("save32")), _("Save the current project"), wxRIBBON_BUTTON_NORMAL);
97 
98  m_ribbonButtonBarCProject->AddButton(ID_RIBBON_SAVEAS, _("Save As..."), wxXmlResource::Get()->LoadBitmap(wxT("saveAs32")), _("Save as the current project"), wxRIBBON_BUTTON_NORMAL);
99 
100  m_ribbonButtonBarCProject->AddButton(ID_RIBBON_CLOSE, _("Close"), wxXmlResource::Get()->LoadBitmap(wxT("close32")), _("Close the current project"), wxRIBBON_BUTTON_NORMAL);
101  m_ribbonButtonBarCProject->Realize();
102 
103  m_ribbonPanelHelp = new wxRibbonPanel(m_ribbonPageFile, wxID_ANY, _("Help"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageFile, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
104  m_ribbonPanelHelp->SetToolTip(_("Help"));
105 
106  m_ribbonButtonBarHelp = new wxRibbonButtonBar(m_ribbonPanelHelp, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelHelp, wxSize(-1,-1)), 0);
107  m_ribbonButtonBarHelp->SetToolTip(_("Help"));
108 
109  m_ribbonButtonBarHelp->AddButton(ID_RIBBON_GUIDE, _("PSP-UFU Guide"), wxXmlResource::Get()->LoadBitmap(wxT("guide32")), _("Open PSP-UFU Guide"), wxRIBBON_BUTTON_NORMAL);
110 
111  m_ribbonButtonBarHelp->AddButton(ID_RIBBON_ABOUT, _("About..."), wxXmlResource::Get()->LoadBitmap(wxT("about32")), _("About PSP-UFU"), wxRIBBON_BUTTON_NORMAL);
112  m_ribbonButtonBarHelp->Realize();
113 
114  m_ribbonPageTools = new wxRibbonPage(m_ribbonBar, wxID_ANY, _("Tools"), wxNullBitmap, 0);
115  m_ribbonPageTools->SetToolTip(_("Tools"));
116 
117  m_ribbonPanelClipboard = new wxRibbonPanel(m_ribbonPageTools, wxID_ANY, _("Clipboard"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageTools, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
118  m_ribbonPanelClipboard->SetToolTip(_("Clipboard"));
119 
120  m_ribbonButtonBarClipboard = new wxRibbonButtonBar(m_ribbonPanelClipboard, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelClipboard, wxSize(-1,-1)), 0);
121  m_ribbonButtonBarClipboard->SetToolTip(_("Clipboard"));
122 
123  m_ribbonButtonBarClipboard->AddButton(ID_RIBBON_COPY, _("Copy"), wxXmlResource::Get()->LoadBitmap(wxT("copy32")), _("Copies the selected elements"), wxRIBBON_BUTTON_NORMAL);
124 
125  m_ribbonButtonBarClipboard->AddButton(ID_RIBBON_PASTE, _("Paste"), wxXmlResource::Get()->LoadBitmap(wxT("paste32")), _("Pastes the elements from clipboard"), wxRIBBON_BUTTON_NORMAL);
126 
127  m_ribbonButtonBarClipboard->AddButton(ID_RIBBON_UNDO, _("Undo"), wxXmlResource::Get()->LoadBitmap(wxT("undo32")), _("Undoes the last action"), wxRIBBON_BUTTON_NORMAL);
128 
129  m_ribbonButtonBarClipboard->AddButton(ID_RIBBON_REDO, _("Redo"), wxXmlResource::Get()->LoadBitmap(wxT("redo32")), _("Redoes the last undo action"), wxRIBBON_BUTTON_NORMAL);
130  m_ribbonButtonBarClipboard->Realize();
131 
132  m_ribbonPanelCircuit = new wxRibbonPanel(m_ribbonPageTools, wxID_ANY, _("Circuit"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageTools, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
133  m_ribbonPanelCircuit->SetToolTip(_("Circuit"));
134 
135  m_ribbonButtonBarCircuit = new wxRibbonButtonBar(m_ribbonPanelCircuit, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelCircuit, wxSize(-1,-1)), 0);
136  m_ribbonButtonBarCircuit->SetToolTip(_("Circuit"));
137 
138  m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_ADDELEMENT, _("Add Element"), wxXmlResource::Get()->LoadBitmap(wxT("add32")), _("Add a new element in the project"), wxRIBBON_BUTTON_DROPDOWN);
139 
140  m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_DRAG, _("Drag"), wxXmlResource::Get()->LoadBitmap(wxT("drag32")), _("Drag all the elements"), wxRIBBON_BUTTON_NORMAL);
141 
142  m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_MOVE, _("Move"), wxXmlResource::Get()->LoadBitmap(wxT("move32")), _("Move the selected elements"), wxRIBBON_BUTTON_NORMAL);
143 
144  m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_DELETE, _("Delete"), wxXmlResource::Get()->LoadBitmap(wxT("delete32")), _("Removes all selected elements"), wxRIBBON_BUTTON_NORMAL);
145 
146  m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_FIT, _("Fit"), wxXmlResource::Get()->LoadBitmap(wxT("fit32")), _("Applies the drag and zoom tools to show all elements in workspace"), wxRIBBON_BUTTON_NORMAL);
147 
148  m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_ROTATEC, _("Rotate Clockwise"), wxXmlResource::Get()->LoadBitmap(wxT("rotateClock32")), _("Rotate clockwise"), wxRIBBON_BUTTON_NORMAL);
149 
150  m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_ROTATECC, _("Rotate Counter-clockwise"), wxXmlResource::Get()->LoadBitmap(wxT("rotateCounterClock32")), _("Rotate the selected elements counter-clockwise"), wxRIBBON_BUTTON_NORMAL);
151 
152  m_ribbonButtonBarCircuit->AddButton(ID_RIBBON_PROJSETTINGS, _("Project Settings"), wxXmlResource::Get()->LoadBitmap(wxT("settings32")), _("Opens a dialog to set the main settings of the current project"), wxRIBBON_BUTTON_NORMAL);
153  m_ribbonButtonBarCircuit->Realize();
154 
155  m_ribbonPanelReports = new wxRibbonPanel(m_ribbonPageTools, wxID_ANY, _("Reports"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageTools, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
156  m_ribbonPanelReports->SetToolTip(_("Reports"));
157 
158  m_ribbonButtonBarReports = new wxRibbonButtonBar(m_ribbonPanelReports, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelReports, wxSize(-1,-1)), 0);
159 
160  m_ribbonButtonBarReports->AddButton(ID_RIBBON_DATAREPORT, _("Data Report"), wxXmlResource::Get()->LoadBitmap(wxT("dataReport32")), _("Opens a data report"), wxRIBBON_BUTTON_NORMAL);
161 
162  m_ribbonButtonBarReports->AddButton(ID_RIBBON_CHARTS, _("Charts"), wxXmlResource::Get()->LoadBitmap(wxT("chart32")), _("Open the charts"), wxRIBBON_BUTTON_NORMAL);
163 
164  m_ribbonButtonBarReports->AddButton(ID_RIBBON_SNAPSHOT, _("Snapshot"), wxXmlResource::Get()->LoadBitmap(wxT("snap32")), _("Capture a snapshot of the circuit"), wxRIBBON_BUTTON_NORMAL);
165  m_ribbonButtonBarReports->Realize();
166 
167  m_ribbonPageSimulation = new wxRibbonPage(m_ribbonBar, wxID_ANY, _("Simulation"), wxNullBitmap, 0);
168  m_ribbonPageSimulation->SetToolTip(_("Simulation"));
169 
170  m_ribbonPanelContinuous = new wxRibbonPanel(m_ribbonPageSimulation, wxID_ANY, _("Continuous"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageSimulation, wxSize(-1,-1)), wxRIBBON_PANEL_DEFAULT_STYLE);
171  m_ribbonPanelContinuous->SetToolTip(_("Continuous"));
172 
173  m_ribbonButtonBarContinuous = new wxRibbonButtonBar(m_ribbonPanelContinuous, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelContinuous, wxSize(-1,-1)), 0);
174 
175  m_ribbonButtonBarContinuous->AddButton(ID_RIBBON_ENABLESOL, _("Enable Solution"), wxXmlResource::Get()->LoadBitmap(wxT("playStopped32")), _("Enables the power flow and fault (if exists) calculations after any circuit change"), wxRIBBON_BUTTON_TOGGLE);
176 
177  m_ribbonButtonBarContinuous->AddButton(ID_RIBBON_DISABLESOL, _("Disable Solution"), wxXmlResource::Get()->LoadBitmap(wxT("pauseStopped32")), _("Disables the power flow and fault calculations after any circuit changes"), wxRIBBON_BUTTON_TOGGLE);
178 
179  m_ribbonButtonBarContinuous->AddButton(ID_RIBBON_RESETVOLT, _("Reset Voltages"), wxXmlResource::Get()->LoadBitmap(wxT("reset32")), _("Reset all voltages to initial state"), wxRIBBON_BUTTON_NORMAL);
180  m_ribbonButtonBarContinuous->Realize();
181 
182  m_ribbonPanelSimulations = new wxRibbonPanel(m_ribbonPageSimulation, wxID_ANY, _("Simulations"), wxNullBitmap, wxDefaultPosition, wxDLG_UNIT(m_ribbonPageSimulation, wxSize(-1,-1)), wxRIBBON_PANEL_NO_AUTO_MINIMISE|wxRIBBON_PANEL_DEFAULT_STYLE);
183  m_ribbonPanelSimulations->SetToolTip(_("Simulations"));
184 
185  m_ribbonButtonBarSimulations = new wxRibbonButtonBar(m_ribbonPanelSimulations, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_ribbonPanelSimulations, wxSize(-1,-1)), 0);
186  m_ribbonButtonBarSimulations->SetToolTip(_("Simulations"));
187 
188  m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_POWERFLOW, _("Power Flow"), wxXmlResource::Get()->LoadBitmap(wxT("powerFLow32")), _("Calculate the circuit power flow"), wxRIBBON_BUTTON_NORMAL);
189 
190  m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_RUNSTAB, _("Run Stability"), wxXmlResource::Get()->LoadBitmap(wxT("playStopped32")), _("Run the stability calculations"), wxRIBBON_BUTTON_NORMAL);
191 
192  m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_FAULT, _("Fault"), wxXmlResource::Get()->LoadBitmap(wxT("fault32")), _("Calculate the circuit fault (if exists)"), wxRIBBON_BUTTON_NORMAL);
193 
194  m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_SCPOWER, _("Short-Circuit Power"), wxXmlResource::Get()->LoadBitmap(wxT("faultPower32")), _("Calculate the short-circuit power in all buses"), wxRIBBON_BUTTON_NORMAL);
195 
196  m_ribbonButtonBarSimulations->AddButton(ID_RIBBON_SIMULSETTINGS, _("Simulation Settings"), wxXmlResource::Get()->LoadBitmap(wxT("settings32")), _("Opens a dialog to set the settings of the simulations"), wxRIBBON_BUTTON_NORMAL);
197  m_ribbonButtonBarSimulations->Realize();
198  m_ribbonBar->Realize();
199  wxBoxSizer* boxSizer_lvl_2_2 = new wxBoxSizer(wxVERTICAL);
200 
201  boxSizer_lvl_1_1->Add(boxSizer_lvl_2_2, 1, wxEXPAND, WXC_FROM_DIP(5));
202 
203  m_auiNotebook = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxAUI_NB_DEFAULT_STYLE|wxBK_DEFAULT);
204  m_auiNotebook->SetName(wxT("m_auiNotebook"));
205 
206  boxSizer_lvl_2_2->Add(m_auiNotebook, 1, wxEXPAND, WXC_FROM_DIP(5));
207 
208  m_statusBar = new wxStatusBar(this, wxID_ANY, wxSTB_DEFAULT_STYLE);
209  m_statusBar->SetFieldsCount(4);
210  this->SetStatusBar(m_statusBar);
211 
212 
213  #if wxVERSION_NUMBER >= 2900
214  if(!wxPersistenceManager::Get().Find(m_auiNotebook)){
215  wxPersistenceManager::Get().RegisterAndRestore(m_auiNotebook);
216  } else {
217  wxPersistenceManager::Get().Restore(m_auiNotebook);
218  }
219  #endif
220 
221  SetName(wxT("MainFrameBase"));
222  SetSize(800,600);
223  if (GetSizer()) {
224  GetSizer()->Fit(this);
225  }
226  if(GetParent()) {
227  CentreOnParent(wxBOTH);
228  } else {
229  CentreOnScreen(wxBOTH);
230  }
231 #if wxVERSION_NUMBER >= 2900
232  if(!wxPersistenceManager::Get().Find(this)) {
233  wxPersistenceManager::Get().RegisterAndRestore(this);
234  } else {
235  wxPersistenceManager::Get().Restore(this);
236  }
237 #endif
238  // Connect events
239  m_ribbonButtonBarProjects->Connect(ID_RIBBON_NEW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnNewClick), NULL, this);
240  m_ribbonButtonBarProjects->Connect(ID_RIBBON_OPEN, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnOpenClick), NULL, this);
241  m_ribbonButtonBarProjects->Connect(ID_RIBBON_GENSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnGeneralSettingsClick), NULL, this);
242  m_ribbonButtonBarProjects->Connect(ID_RIBBON_EXIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnExitClick), NULL, this);
243  m_ribbonButtonBarCProject->Connect(ID_RIBBON_SAVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveClick), NULL, this);
244  m_ribbonButtonBarCProject->Connect(ID_RIBBON_SAVEAS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveAsClick), NULL, this);
245  m_ribbonButtonBarCProject->Connect(ID_RIBBON_CLOSE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnCloseClick), NULL, this);
246  m_ribbonButtonBarHelp->Connect(ID_RIBBON_GUIDE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPSPGuideClick), NULL, this);
247  m_ribbonButtonBarHelp->Connect(ID_RIBBON_ABOUT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnAboutClick), NULL, this);
248  m_ribbonButtonBarClipboard->Connect(ID_RIBBON_COPY, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnCopyClick), NULL, this);
249  m_ribbonButtonBarClipboard->Connect(ID_RIBBON_PASTE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPasteClick), NULL, this);
250  m_ribbonButtonBarClipboard->Connect(ID_RIBBON_UNDO, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnUndoClick), NULL, this);
251  m_ribbonButtonBarClipboard->Connect(ID_RIBBON_REDO, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRedoClick), NULL, this);
252  m_ribbonButtonBarCircuit->Connect(ID_RIBBON_ADDELEMENT, wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnAddElementDropdown), NULL, this);
253  m_ribbonButtonBarCircuit->Connect(ID_RIBBON_DRAG, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDragClick), NULL, this);
254  m_ribbonButtonBarCircuit->Connect(ID_RIBBON_MOVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnMoveClick), NULL, this);
255  m_ribbonButtonBarCircuit->Connect(ID_RIBBON_DELETE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDeleteClick), NULL, this);
256  m_ribbonButtonBarCircuit->Connect(ID_RIBBON_FIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFitClick), NULL, this);
257  m_ribbonButtonBarCircuit->Connect(ID_RIBBON_ROTATEC, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRotClockClick), NULL, this);
258  m_ribbonButtonBarCircuit->Connect(ID_RIBBON_ROTATECC, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRotCounterClockClick), NULL, this);
259  m_ribbonButtonBarReports->Connect(ID_RIBBON_DATAREPORT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDataReportClick), NULL, this);
260  m_ribbonButtonBarReports->Connect(ID_RIBBON_CHARTS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnChartsClick), NULL, this);
261  m_ribbonButtonBarReports->Connect(ID_RIBBON_SNAPSHOT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSnapshotClick), NULL, this);
262  m_ribbonButtonBarContinuous->Connect(ID_RIBBON_ENABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnEnableSolutionClick), NULL, this);
263  m_ribbonButtonBarContinuous->Connect(ID_RIBBON_DISABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDisableSolutionClick), NULL, this);
264  m_ribbonButtonBarContinuous->Connect(ID_RIBBON_RESETVOLT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnResetVoltagesClick), NULL, this);
265  m_ribbonButtonBarSimulations->Connect(ID_RIBBON_POWERFLOW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPowerFlowClick), NULL, this);
266  m_ribbonButtonBarSimulations->Connect(ID_RIBBON_RUNSTAB, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRunStabilityClick), NULL, this);
267  m_ribbonButtonBarSimulations->Connect(ID_RIBBON_FAULT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFaultClick), NULL, this);
268  m_ribbonButtonBarSimulations->Connect(ID_RIBBON_SCPOWER, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSCPowerClick), NULL, this);
269  m_ribbonButtonBarSimulations->Connect(ID_RIBBON_SIMULSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSimulationSettingsClick), NULL, this);
270  m_auiNotebook->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosing), NULL, this);
271  m_auiNotebook->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosed), NULL, this);
272 
273 }
274 
275 MainFrameBase::~MainFrameBase()
276 {
277  m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_NEW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnNewClick), NULL, this);
278  m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_OPEN, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnOpenClick), NULL, this);
279  m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_GENSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnGeneralSettingsClick), NULL, this);
280  m_ribbonButtonBarProjects->Disconnect(ID_RIBBON_EXIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnExitClick), NULL, this);
281  m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_SAVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveClick), NULL, this);
282  m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_SAVEAS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSaveAsClick), NULL, this);
283  m_ribbonButtonBarCProject->Disconnect(ID_RIBBON_CLOSE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnCloseClick), NULL, this);
284  m_ribbonButtonBarHelp->Disconnect(ID_RIBBON_GUIDE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPSPGuideClick), NULL, this);
285  m_ribbonButtonBarHelp->Disconnect(ID_RIBBON_ABOUT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnAboutClick), NULL, this);
286  m_ribbonButtonBarClipboard->Disconnect(ID_RIBBON_COPY, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnCopyClick), NULL, this);
287  m_ribbonButtonBarClipboard->Disconnect(ID_RIBBON_PASTE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPasteClick), NULL, this);
288  m_ribbonButtonBarClipboard->Disconnect(ID_RIBBON_UNDO, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnUndoClick), NULL, this);
289  m_ribbonButtonBarClipboard->Disconnect(ID_RIBBON_REDO, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRedoClick), NULL, this);
290  m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_ADDELEMENT, wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnAddElementDropdown), NULL, this);
291  m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_DRAG, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDragClick), NULL, this);
292  m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_MOVE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnMoveClick), NULL, this);
293  m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_DELETE, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDeleteClick), NULL, this);
294  m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_FIT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFitClick), NULL, this);
295  m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_ROTATEC, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRotClockClick), NULL, this);
296  m_ribbonButtonBarCircuit->Disconnect(ID_RIBBON_ROTATECC, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRotCounterClockClick), NULL, this);
297  m_ribbonButtonBarReports->Disconnect(ID_RIBBON_DATAREPORT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDataReportClick), NULL, this);
298  m_ribbonButtonBarReports->Disconnect(ID_RIBBON_CHARTS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnChartsClick), NULL, this);
299  m_ribbonButtonBarReports->Disconnect(ID_RIBBON_SNAPSHOT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSnapshotClick), NULL, this);
300  m_ribbonButtonBarContinuous->Disconnect(ID_RIBBON_ENABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnEnableSolutionClick), NULL, this);
301  m_ribbonButtonBarContinuous->Disconnect(ID_RIBBON_DISABLESOL, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnDisableSolutionClick), NULL, this);
302  m_ribbonButtonBarContinuous->Disconnect(ID_RIBBON_RESETVOLT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnResetVoltagesClick), NULL, this);
303  m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_POWERFLOW, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnPowerFlowClick), NULL, this);
304  m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_RUNSTAB, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnRunStabilityClick), NULL, this);
305  m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_FAULT, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnFaultClick), NULL, this);
306  m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_SCPOWER, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSCPowerClick), NULL, this);
307  m_ribbonButtonBarSimulations->Disconnect(ID_RIBBON_SIMULSETTINGS, wxEVT_COMMAND_RIBBONBUTTON_CLICKED, wxRibbonButtonBarEventHandler(MainFrameBase::OnSimulationSettingsClick), NULL, this);
308  m_auiNotebook->Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosing), NULL, this);
309  m_auiNotebook->Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEventHandler(MainFrameBase::NotebookPageClosed), NULL, this);
310 
311 }
-
- - - - diff --git a/docs/doxygen/html/_main_frame_base_8h_source.html b/docs/doxygen/html/_main_frame_base_8h_source.html deleted file mode 100644 index 703d9fc..0000000 --- a/docs/doxygen/html/_main_frame_base_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/MainFrameBase.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
MainFrameBase.h
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: MainFrame.wxcp
4 // Do not modify this file by hand!
6 
7 #ifndef _PSP_PROJECT_MAINFRAME_BASE_CLASSES_H
8 #define _PSP_PROJECT_MAINFRAME_BASE_CLASSES_H
9 
10 #include <wx/settings.h>
11 #include <wx/xrc/xmlres.h>
12 #include <wx/xrc/xh_bmp.h>
13 #include <wx/frame.h>
14 #include <wx/iconbndl.h>
15 #include <wx/artprov.h>
16 #include <wx/sizer.h>
17 #include <wx/ribbon/bar.h>
18 #include <wx/ribbon/art.h>
19 #include <wx/ribbon/page.h>
20 #include <wx/ribbon/panel.h>
21 #include <wx/ribbon/buttonbar.h>
22 #include <wx/aui/auibook.h>
23 #include <wx/statusbr.h>
24 #if wxVERSION_NUMBER >= 2900
25 #include <wx/persist.h>
26 #include <wx/persist/toplevel.h>
27 #include <wx/persist/bookctrl.h>
28 #include <wx/persist/treebook.h>
29 #endif
30 
31 #ifdef WXC_FROM_DIP
32 #undef WXC_FROM_DIP
33 #endif
34 #if wxVERSION_NUMBER >= 3100
35 #define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
36 #else
37 #define WXC_FROM_DIP(x) x
38 #endif
39 
40 
41 class MainFrameBase : public wxFrame
42 {
43 public:
44  enum {
45  ID_RIBBON_ABOUT = 10001,
46  ID_RIBBON_ADDELEMENT = 10002,
47  ID_RIBBON_CHARTS = 10003,
48  ID_RIBBON_CLOSE = 10004,
49  ID_RIBBON_COPY = 10005,
50  ID_RIBBON_DATAREPORT = 10006,
51  ID_RIBBON_DELETE = 10007,
52  ID_RIBBON_DISABLESOL = 10008,
53  ID_RIBBON_DRAG = 10009,
54  ID_RIBBON_ENABLESOL = 10010,
55  ID_RIBBON_EXIT = 10011,
56  ID_RIBBON_FAULT = 10012,
57  ID_RIBBON_FIT = 10013,
58  ID_RIBBON_GENSETTINGS = 10014,
59  ID_RIBBON_GUIDE = 10015,
60  ID_RIBBON_MOVE = 10016,
61  ID_RIBBON_NEW = 10017,
62  ID_RIBBON_OPEN = 10018,
63  ID_RIBBON_PASTE = 10019,
64  ID_RIBBON_POWERFLOW = 10020,
65  ID_RIBBON_PROJSETTINGS = 10021,
66  ID_RIBBON_REDO = 10022,
67  ID_RIBBON_RESETVOLT = 10023,
68  ID_RIBBON_ROTATEC = 10024,
69  ID_RIBBON_ROTATECC = 10025,
70  ID_RIBBON_RUNSTAB = 10026,
71  ID_RIBBON_SAVE = 10027,
72  ID_RIBBON_SAVEAS = 10028,
73  ID_RIBBON_SCPOWER = 10029,
74  ID_RIBBON_SIMULSETTINGS = 10030,
75  ID_RIBBON_SNAPSHOT = 10031,
76  ID_RIBBON_UNDO = 10032,
77  };
78 protected:
79  wxRibbonBar* m_ribbonBar;
80  wxRibbonPage* m_ribbonPageFile;
81  wxRibbonPanel* m_ribbonPanelProjects;
82  wxRibbonButtonBar* m_ribbonButtonBarProjects;
83  wxRibbonPanel* m_ribbonPanelCProject;
84  wxRibbonButtonBar* m_ribbonButtonBarCProject;
85  wxRibbonPanel* m_ribbonPanelHelp;
86  wxRibbonButtonBar* m_ribbonButtonBarHelp;
87  wxRibbonPage* m_ribbonPageTools;
88  wxRibbonPanel* m_ribbonPanelClipboard;
89  wxRibbonButtonBar* m_ribbonButtonBarClipboard;
90  wxRibbonPanel* m_ribbonPanelCircuit;
91  wxRibbonButtonBar* m_ribbonButtonBarCircuit;
92  wxRibbonPanel* m_ribbonPanelReports;
93  wxRibbonButtonBar* m_ribbonButtonBarReports;
94  wxRibbonPage* m_ribbonPageSimulation;
95  wxRibbonPanel* m_ribbonPanelContinuous;
96  wxRibbonButtonBar* m_ribbonButtonBarContinuous;
97  wxRibbonPanel* m_ribbonPanelSimulations;
98  wxRibbonButtonBar* m_ribbonButtonBarSimulations;
99  wxAuiNotebook* m_auiNotebook;
100  wxStatusBar* m_statusBar;
101 
102 protected:
103  virtual void OnNewClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
104  virtual void OnOpenClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
105  virtual void OnGeneralSettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
106  virtual void OnExitClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
107  virtual void OnSaveClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
108  virtual void OnSaveAsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
109  virtual void OnCloseClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
110  virtual void OnPSPGuideClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
111  virtual void OnAboutClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
112  virtual void OnCopyClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
113  virtual void OnPasteClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
114  virtual void OnUndoClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
115  virtual void OnRedoClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
116  virtual void OnAddElementDropdown(wxRibbonButtonBarEvent& event) { event.Skip(); }
117  virtual void OnDragClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
118  virtual void OnMoveClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
119  virtual void OnDeleteClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
120  virtual void OnFitClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
121  virtual void OnRotClockClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
122  virtual void OnRotCounterClockClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
123  virtual void OnDataReportClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
124  virtual void OnChartsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
125  virtual void OnSnapshotClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
126  virtual void OnEnableSolutionClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
127  virtual void OnDisableSolutionClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
128  virtual void OnResetVoltagesClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
129  virtual void OnPowerFlowClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
130  virtual void OnRunStabilityClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
131  virtual void OnFaultClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
132  virtual void OnSCPowerClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
133  virtual void OnSimulationSettingsClick(wxRibbonButtonBarEvent& event) { event.Skip(); }
134  virtual void NotebookPageClosing(wxAuiNotebookEvent& event) { event.Skip(); }
135  virtual void NotebookPageClosed(wxAuiNotebookEvent& event) { event.Skip(); }
136 
137 public:
138  wxRibbonBar* GetRibbonBar() { return m_ribbonBar; }
139  wxAuiNotebook* GetAuiNotebook() { return m_auiNotebook; }
140  wxStatusBar* GetStatusBar() { return m_statusBar; }
141  MainFrameBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("PSP-UFU"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(800,600), long style = wxCAPTION|wxRESIZE_BORDER|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxCLOSE_BOX);
142  virtual ~MainFrameBase();
143 };
144 
145 #endif
-
-
- - - - diff --git a/docs/doxygen/html/_main_frame_bitmaps_8cpp_source.html b/docs/doxygen/html/_main_frame_bitmaps_8cpp_source.html deleted file mode 100644 index 61747d5..0000000 --- a/docs/doxygen/html/_main_frame_bitmaps_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/MainFrameBitmaps.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
MainFrameBitmaps.cpp
-
-
-
1 //
2 // This file was automatically generated by wxrc, do not edit by hand.
3 //
4 
5 #include <wx/wxprec.h>
6 
7 #ifdef __BORLANDC__
8  #pragma hdrstop
9 #endif
10 
11 #include <wx/filesys.h>
12 #include <wx/fs_mem.h>
13 #include <wx/xrc/xmlres.h>
14 #include <wx/xrc/xh_all.h>
15 
16 #if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
17  #define XRC_ADD_FILE(name, data, size, mime) \
18  wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
19 #else
20  #define XRC_ADD_FILE(name, data, size, mime) \
21  wxMemoryFSHandler::AddFile(name, data, size)
22 #endif
23 
24 static size_t xml_res_size_0 = 875;
25 static unsigned char xml_res_file_0[] = {
26 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
27 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
28 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
29 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
30 46,111,114,103,155,238,60,26,0,0,2,232,73,68,65,84,88,133,197,151,59,72,
31 91,97,20,199,127,231,154,24,235,131,106,161,144,219,56,116,112,80,28,58,
32 88,177,69,4,17,92,42,168,163,208,173,157,58,88,112,45,106,140,136,180,147,
33 96,231,118,19,28,85,186,9,34,216,82,69,157,138,40,216,161,67,98,2,45,42,
34 24,53,15,147,211,33,137,154,24,147,155,135,237,31,238,240,61,207,239,126,
35 247,187,231,33,170,138,21,201,199,159,14,142,142,123,128,1,160,5,196,4,
36 53,147,163,126,80,63,176,11,44,210,80,191,162,195,77,97,75,251,230,3,144,
37 233,109,147,168,142,35,188,4,234,44,209,194,9,202,28,118,153,212,119,109,
38 254,162,0,196,179,90,133,212,142,2,35,64,181,69,195,153,58,3,102,208,224,
39 148,186,187,67,150,1,196,179,233,68,100,1,232,40,210,112,166,54,80,29,84,
40 119,123,32,47,128,140,125,125,130,189,234,11,208,120,219,110,206,90,59,
41 67,173,15,210,250,230,119,14,9,4,163,185,32,188,136,188,208,177,182,31,
42 183,2,200,232,154,137,198,54,169,168,116,97,171,188,117,167,103,141,53,
43 124,127,213,146,214,247,252,243,46,235,222,211,92,0,9,8,213,246,235,39,
44 97,92,26,247,172,86,17,143,45,161,184,184,136,192,69,36,223,102,197,168,
45 17,145,5,241,172,86,221,0,32,204,4,240,244,178,125,119,16,29,201,203,125,
46 5,32,163,43,46,132,183,55,166,222,29,196,136,76,111,155,0,54,0,226,198,
47 4,112,47,235,212,20,192,181,59,177,238,61,69,38,183,74,1,168,38,170,227,
48 192,27,97,118,223,65,192,251,7,165,54,231,18,91,37,185,46,102,17,58,161,
49 161,254,161,65,192,215,155,215,56,220,197,231,168,227,232,184,199,6,58,
50 104,121,73,18,160,213,188,207,167,254,199,105,67,175,151,126,177,243,251,
51 188,80,136,1,27,72,51,88,11,72,41,136,26,35,74,135,171,38,173,187,206,97,
52 220,178,32,167,90,12,20,103,161,171,244,34,66,40,148,213,181,23,40,49,13,
53 68,11,6,0,8,135,195,101,128,80,179,168,115,43,39,132,129,202,141,8,245,
54 239,32,196,111,32,148,4,144,130,136,71,45,37,64,25,82,191,1,186,87,42,0,
55 36,46,102,17,126,98,215,0,89,40,7,0,80,140,179,90,52,112,186,150,17,130,
56 255,1,226,132,134,250,21,67,135,155,194,40,243,101,3,176,10,161,204,233,
57 112,83,56,241,27,58,236,110,132,130,253,104,9,16,103,216,101,18,146,249,
58 128,186,59,15,80,102,203,10,144,27,98,38,149,174,95,57,34,7,19,64,73,65,
59 222,34,196,6,26,156,74,53,46,1,212,221,29,194,168,232,71,240,221,33,132,
60 55,145,158,95,213,8,105,174,88,167,186,252,64,95,62,136,243,168,178,127,
61 24,74,123,206,163,121,34,106,44,226,35,30,235,203,172,13,178,23,38,163,
62 107,38,241,216,18,215,147,212,210,180,133,81,209,159,124,193,52,101,13,
63 70,58,213,229,199,65,23,240,161,164,191,67,56,71,140,247,56,232,202,102,
64 28,172,20,167,158,111,143,8,71,61,8,67,150,82,183,132,225,32,202,60,14,
65 187,91,221,157,7,57,167,22,84,158,7,124,189,137,20,78,154,81,156,151,185,
66 132,74,32,17,212,116,15,100,1,167,107,217,106,121,254,23,223,163,88,99,
67 79,104,41,98,0,0,0,0,73,69,78,68,174,66,96,130};
68 
69 static size_t xml_res_size_1 = 1145;
70 static unsigned char xml_res_file_1[] = {
71 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
72 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
73 72,89,115,0,0,4,153,0,0,4,153,1,131,201,236,179,0,0,0,25,116,69,88,116,
74 83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,
75 101,46,111,114,103,155,238,60,26,0,0,3,246,73,68,65,84,88,133,229,151,91,
76 108,84,85,20,134,191,117,102,206,244,150,182,80,27,75,0,141,70,81,228,18,
77 193,64,140,141,198,7,37,68,95,72,144,242,128,198,120,41,15,106,8,150,72,
78 106,50,51,157,158,118,42,40,180,81,52,154,80,212,16,47,68,139,98,212,146,
79 244,193,56,65,5,17,138,24,163,196,164,177,36,21,20,52,157,222,152,94,102,
80 230,44,31,122,177,211,158,233,153,14,77,120,112,189,156,100,173,127,255,
81 255,191,247,94,103,239,115,68,85,185,150,97,92,83,117,192,59,231,140,150,
82 24,120,88,66,18,113,197,154,244,202,156,110,129,37,249,24,124,8,108,200,
83 0,253,21,54,143,207,221,10,88,178,0,225,11,96,141,11,50,142,16,36,192,43,
84 160,58,55,6,44,89,129,65,43,112,163,11,178,3,216,66,64,79,141,39,174,190,
85 9,235,100,29,6,223,185,138,11,7,177,89,77,240,63,113,184,218,38,172,151,
86 74,132,183,92,120,122,81,158,33,168,135,156,138,89,174,128,8,245,178,11,
87 104,118,17,63,129,205,42,106,156,197,113,25,236,28,150,228,98,112,16,216,
88 60,3,202,70,105,64,169,35,164,137,153,232,102,103,192,146,82,12,62,7,238,
89 153,1,213,133,193,99,248,245,88,38,148,153,159,3,97,185,29,165,21,184,101,
90 70,113,165,26,131,232,180,74,146,51,132,244,114,118,6,234,229,126,224,8,
91 48,63,51,183,41,17,5,94,32,168,239,56,21,221,13,88,98,32,108,64,200,73,
92 29,201,70,148,10,23,241,195,216,108,35,164,127,165,3,204,254,40,222,47,
93 102,207,121,26,243,125,108,243,121,210,162,46,34,60,71,64,63,115,163,155,
94 85,19,118,7,228,6,143,77,139,8,119,15,198,71,115,83,76,40,194,1,76,118,
95 82,173,189,153,112,102,108,160,47,40,235,61,202,251,8,165,227,185,41,38,
96 58,16,182,18,208,72,166,156,153,25,176,196,232,25,161,86,192,143,195,193,
97 53,24,39,129,210,228,155,71,45,85,58,56,27,113,87,3,253,181,82,106,199,
98 57,36,240,160,35,64,248,9,229,105,159,165,237,233,56,196,138,120,49,10,
99 239,64,245,54,148,223,88,214,121,78,43,42,146,19,245,116,77,216,95,35,229,
100 182,205,71,40,139,29,202,67,24,132,139,189,188,60,211,73,39,214,233,77,
101 99,119,69,233,164,244,37,84,159,213,208,218,79,211,26,232,241,203,14,129,
102 221,128,233,72,44,252,2,116,78,206,169,114,46,41,188,94,18,214,46,0,169,
103 59,93,5,52,1,236,44,95,192,163,43,75,248,224,231,110,246,28,31,123,35,133,
104 42,13,174,121,53,101,11,186,107,165,200,147,224,93,129,141,233,102,53,38,
105 182,28,88,62,70,20,49,132,166,162,48,95,194,232,108,196,58,185,12,241,236,
106 26,199,47,42,52,185,179,44,159,200,249,254,73,36,188,36,225,147,173,41,
107 6,100,136,121,134,143,70,160,17,192,78,242,36,80,233,224,97,68,132,22,85,
108 26,139,195,250,227,180,234,240,240,150,220,188,156,156,155,174,43,0,96,
109 126,158,119,226,185,180,52,23,128,206,232,112,222,112,210,216,148,182,7,
110 250,130,98,169,77,205,148,116,20,56,144,76,178,175,100,183,254,225,188,
111 62,32,254,175,143,174,93,88,240,208,183,91,87,225,243,249,28,49,171,247,
112 255,202,217,75,177,195,211,223,2,75,188,125,9,154,213,230,137,73,217,223,
113 197,224,181,193,33,222,46,219,163,87,210,9,79,132,26,49,91,161,103,32,70,
114 94,158,146,159,227,195,99,8,73,91,73,140,205,215,86,5,155,88,138,129,127,
115 170,165,208,244,242,9,176,14,64,132,227,10,77,197,38,71,8,169,93,228,170,
116 60,22,134,158,105,191,24,123,164,108,239,89,0,26,31,190,149,29,247,46,230,
117 141,83,151,121,190,173,107,18,78,218,39,12,196,44,89,104,154,28,101,180,
118 193,90,196,195,222,162,58,253,33,83,205,212,21,240,52,67,114,59,112,61,
119 64,124,120,144,145,145,145,169,168,63,49,125,239,25,0,3,126,89,145,72,208,
120 38,74,68,109,150,20,55,232,230,172,197,1,109,184,239,111,208,74,96,8,224,
121 251,11,87,120,243,68,23,223,116,78,124,38,196,80,125,74,95,92,25,149,104,
122 128,155,197,230,129,164,201,199,37,181,218,151,173,168,83,136,63,178,20,
123 216,7,148,163,20,32,12,224,205,61,134,225,219,174,161,187,58,32,155,235,
124 56,27,35,22,6,241,182,69,152,235,47,104,8,59,165,246,191,255,59,254,23,
125 116,158,121,223,246,238,101,75,0,0,0,0,73,69,78,68,174,66,96,130};
126 
127 static size_t xml_res_size_2 = 987;
128 static unsigned char xml_res_file_2[] = {
129 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
130 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
131 72,89,115,0,0,5,98,0,0,5,98,1,172,97,92,156,0,0,0,25,116,69,88,116,83,111,
132 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
133 111,114,103,155,238,60,26,0,0,3,88,73,68,65,84,88,133,197,151,123,104,141,
134 97,24,192,127,239,217,185,76,10,209,140,105,229,210,92,74,174,115,89,91,
135 20,139,134,48,127,80,194,220,134,63,8,145,63,196,54,119,43,33,252,97,182,
136 154,40,162,200,106,214,148,132,153,68,211,102,180,37,119,25,67,238,235,
137 236,59,231,59,123,253,113,182,119,59,190,239,59,151,156,195,243,215,251,
138 60,207,251,188,207,239,125,222,219,247,9,242,238,74,226,28,252,47,177,227,
139 213,72,238,233,100,250,144,62,0,220,122,253,147,151,223,180,127,6,96,3,
140 24,213,219,70,81,86,18,165,243,6,50,105,64,247,152,36,74,166,153,25,226,
141 158,57,0,128,219,237,198,227,241,196,36,57,192,78,81,194,53,54,80,69,46,
142 233,212,25,1,58,32,218,116,111,212,147,15,162,137,229,148,3,144,33,106,
143 25,79,131,57,0,128,207,211,10,122,116,43,145,39,138,113,160,3,240,142,4,
144 138,88,96,13,0,248,1,162,4,145,194,91,150,82,161,244,253,114,37,26,206,
145 16,0,81,132,200,19,197,196,209,6,192,27,250,81,194,188,0,191,53,64,20,32,
146 134,243,138,197,92,83,250,94,185,10,15,129,119,78,112,128,63,32,250,243,
147 57,34,128,2,113,10,91,251,236,95,146,196,105,230,24,250,132,6,0,156,122,
148 11,39,244,125,52,137,44,62,136,153,28,17,135,67,198,140,228,57,11,185,174,
149 244,61,114,53,94,236,145,3,36,241,137,10,177,145,37,190,43,104,58,36,242,
150 133,77,156,39,85,52,4,141,219,69,17,2,9,192,51,146,57,195,108,211,126,65,
151 1,50,68,45,183,196,90,82,219,207,109,171,14,154,255,52,145,47,139,45,227,
152 198,240,148,108,113,179,19,70,230,226,179,72,101,9,176,94,92,160,140,45,
153 36,240,85,217,170,25,173,32,230,136,170,128,11,165,171,116,157,125,35,3,
154 57,199,76,75,88,3,128,11,141,82,177,139,189,156,84,199,199,131,131,77,114,
155 11,179,229,81,106,25,166,32,242,133,177,10,169,162,129,185,226,118,39,140,
156 204,165,45,72,161,13,158,29,162,148,108,110,42,189,137,4,178,56,166,118,
157 240,65,153,3,248,151,99,134,94,197,56,26,3,226,119,115,82,181,159,48,152,
158 139,100,90,38,55,5,72,226,147,106,87,49,150,41,242,20,53,114,184,178,85,
159 146,70,29,67,21,196,118,189,72,249,210,168,39,139,187,74,47,96,77,208,217,
160 155,2,116,200,113,22,49,95,30,226,51,189,12,190,66,185,76,181,51,125,119,
161 24,163,63,6,2,103,95,71,10,151,228,180,160,201,77,1,126,208,157,28,10,216,
162 41,215,89,238,220,10,210,121,68,138,210,183,249,74,72,215,31,144,41,238,
163 43,91,190,92,139,68,68,14,176,77,110,160,76,78,13,25,88,72,103,21,102,81,
164 205,81,223,1,90,219,143,104,13,35,40,35,244,24,166,0,94,194,251,62,172,
165 144,233,60,102,136,210,83,120,139,166,251,247,69,190,92,19,214,24,166,0,
166 225,138,68,80,72,142,193,94,173,143,224,170,62,49,246,0,0,229,50,131,39,
167 93,170,0,176,159,21,17,189,162,198,215,33,2,145,8,246,176,138,173,156,5,
168 224,5,3,184,33,39,248,157,29,0,118,167,69,116,20,0,0,42,101,26,149,164,
169 153,59,195,128,248,171,37,8,75,66,44,71,236,1,66,64,216,1,122,184,226,148,
170 97,100,223,110,124,215,124,49,225,176,57,156,216,28,46,0,30,190,111,225,
171 99,139,238,7,24,218,59,94,117,218,60,57,145,205,147,19,99,2,0,224,114,185,
172 136,143,143,39,251,226,51,174,52,126,251,251,77,24,169,104,90,224,127,167,
173 29,224,114,227,87,117,107,127,248,229,229,135,167,45,230,32,53,239,90,1,
174 225,7,168,111,118,83,223,236,142,121,82,131,216,157,252,6,173,114,47,95,
175 172,143,154,9,0,0,0,0,73,69,78,68,174,66,96,130};
176 
177 static size_t xml_res_size_3 = 1135;
178 static unsigned char xml_res_file_3[] = {
179 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
180 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
181 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
182 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
183 46,111,114,103,155,238,60,26,0,0,3,236,73,68,65,84,88,133,173,151,77,72,
184 92,87,20,199,127,231,197,153,103,162,17,149,74,103,50,74,160,12,24,75,74,
185 41,81,92,4,33,45,180,16,99,73,150,45,5,55,237,198,20,23,133,172,196,102,
186 156,212,126,65,105,32,33,205,42,155,130,36,75,83,219,44,18,48,66,82,218,
187 84,67,104,41,73,138,18,8,126,204,72,165,150,204,24,157,55,58,167,139,153,
188 209,241,205,123,111,94,180,255,221,123,231,204,251,255,230,222,123,238,
189 61,87,84,21,63,146,139,51,38,203,255,190,5,156,4,218,64,194,160,225,66,
190 52,1,154,0,30,1,215,105,168,31,215,254,104,198,215,119,43,1,200,23,247,
191 195,100,245,44,194,7,192,126,95,180,144,66,25,33,32,231,116,224,72,98,71,
192 0,18,159,168,70,106,7,129,79,128,125,62,141,237,122,14,156,71,211,195,26,
193 59,182,230,27,64,226,147,33,68,70,129,206,29,26,219,117,15,213,83,26,235,
194 72,218,3,70,153,249,167,119,95,71,100,242,127,52,7,232,68,100,82,62,187,
195 255,154,39,128,12,222,9,147,91,255,137,117,171,217,158,88,27,44,99,117,
196 149,75,110,51,170,55,36,62,25,114,4,144,248,68,53,185,141,31,80,34,172,
197 91,176,110,109,38,245,181,55,241,240,244,97,162,141,102,69,243,104,163,
198 201,195,211,135,233,107,111,114,134,16,25,149,248,68,117,25,0,25,134,128,
199 246,205,231,2,68,95,123,19,151,186,15,210,82,23,228,118,111,171,39,68,180,
200 209,228,118,111,43,45,117,65,46,117,31,116,131,232,44,44,238,252,31,87,
201 85,100,112,60,130,26,211,40,123,75,51,63,124,227,37,46,190,27,101,111,245,
202 38,48,115,207,44,222,252,254,47,102,254,217,94,230,69,243,230,186,224,230,
203 59,5,62,190,241,148,203,83,127,219,33,158,83,37,81,29,56,146,200,143,64,
204 206,24,114,50,255,230,157,22,172,76,134,181,181,173,10,106,118,24,9,39,
205 115,0,1,183,145,216,71,86,207,230,115,46,76,155,36,231,150,80,106,139,209,
206 154,160,193,111,31,181,17,217,191,245,65,211,52,169,118,24,9,192,209,188,
207 84,179,207,44,94,253,238,79,210,86,174,244,117,138,134,250,38,97,96,162,
208 7,213,49,251,143,94,105,48,249,241,253,40,7,60,32,146,233,44,0,161,218,
209 128,171,185,219,148,21,212,109,128,158,114,138,60,89,206,208,115,117,134,
210 133,212,86,53,100,108,211,17,170,13,236,198,28,224,164,1,114,200,45,234,
211 7,98,23,230,0,109,6,74,200,43,99,39,16,62,205,1,9,27,136,122,2,148,66,44,
212 174,100,43,66,36,211,89,159,230,0,26,246,191,191,58,200,239,116,120,201,
213 64,165,236,132,178,171,88,17,47,215,148,47,56,167,133,89,105,199,220,146,
214 36,12,4,79,0,167,114,172,4,225,180,89,57,75,19,6,232,227,221,152,239,18,
215 226,145,1,50,186,83,243,197,149,172,231,194,244,1,113,221,32,20,185,133,
216 144,46,125,91,19,52,24,171,96,190,144,178,56,62,50,205,241,145,105,207,
217 18,109,174,11,50,222,219,234,212,35,164,104,168,31,55,180,63,154,65,185,
218 86,26,89,177,114,124,251,203,34,110,237,234,66,202,162,231,234,12,79,150,
219 51,21,247,9,5,190,188,155,176,159,3,160,140,104,127,52,147,199,50,3,49,
220 132,213,210,248,149,7,75,156,185,57,91,6,81,106,94,148,27,196,234,218,154,
221 251,113,28,144,115,80,104,72,52,118,116,1,229,130,61,203,14,225,100,238,
222 6,161,64,255,216,12,151,127,157,47,203,5,206,23,219,245,173,137,49,25,2,
223 166,220,32,230,61,204,237,16,243,41,139,51,55,103,185,242,96,9,123,123,
224 7,220,67,211,195,197,135,109,109,185,12,222,9,163,27,147,40,17,251,199,
225 107,130,6,43,246,121,116,145,99,110,85,16,170,130,115,168,118,148,182,231,
226 219,150,166,14,119,37,128,19,8,101,227,230,215,220,53,119,195,154,39,183,
227 113,194,126,55,40,171,13,253,252,216,239,200,158,14,28,166,99,23,154,66,
228 246,116,232,80,231,31,246,128,227,97,164,195,93,9,76,186,128,175,237,213,
229 241,66,18,86,17,227,43,76,186,10,163,91,158,82,241,114,26,255,249,0,153,
230 108,28,225,189,210,190,177,130,113,26,229,26,102,32,166,177,163,11,158,
231 169,47,116,61,79,206,191,157,111,225,228,16,74,104,179,151,80,73,230,15,
232 53,125,12,50,74,40,114,203,239,245,252,63,36,46,60,68,215,168,12,225,0,
233 0,0,0,73,69,78,68,174,66,96,130};
234 
235 static size_t xml_res_size_4 = 745;
236 static unsigned char xml_res_file_4[] = {
237 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
238 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
239 72,89,115,0,0,5,74,0,0,5,74,1,26,195,117,109,0,0,0,25,116,69,88,116,83,
240 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
241 46,111,114,103,155,238,60,26,0,0,2,102,73,68,65,84,88,133,197,150,75,72,
242 84,97,20,199,127,103,102,156,33,74,90,132,74,11,117,81,11,55,209,46,40,
243 92,70,16,173,130,137,220,4,81,164,102,20,61,209,76,131,102,132,80,202,116,
244 72,68,72,138,194,136,202,6,162,218,84,20,49,6,69,155,22,46,196,213,140,
245 211,131,194,77,77,249,184,119,230,107,49,134,58,119,30,247,53,117,224,194,
246 229,255,125,247,156,31,255,115,248,238,39,74,41,114,67,66,31,166,128,245,
247 134,5,19,177,153,25,105,33,58,122,246,226,237,78,51,251,125,5,244,26,187,
248 0,62,210,28,151,123,231,7,122,210,158,147,93,99,29,165,246,123,236,20,41,
249 21,1,52,218,212,131,246,193,80,211,149,255,2,0,224,71,163,77,198,207,68,
250 66,251,251,77,1,200,133,215,143,165,243,85,66,186,99,113,144,74,171,5,79,
251 51,102,208,42,208,105,147,241,83,67,225,125,131,37,1,80,108,4,169,37,173,
252 215,161,207,91,118,230,170,12,112,142,59,6,221,71,154,22,162,39,134,67,
253 193,235,197,1,86,134,174,129,190,96,149,129,62,137,112,128,103,121,33,154,
254 37,122,108,36,28,28,54,7,224,0,162,83,110,18,99,171,65,247,146,225,8,209,
255 214,27,225,189,35,230,0,28,64,52,242,145,23,108,99,134,26,146,84,243,137,
256 42,62,83,197,87,54,176,155,137,230,222,240,193,107,127,247,22,58,7,86,67,
257 0,248,2,150,32,118,242,158,30,14,211,173,90,243,45,111,111,95,122,49,55,
258 108,54,157,232,98,148,203,50,84,116,143,249,105,183,9,209,193,45,250,36,
259 82,112,189,116,11,114,33,32,111,59,166,168,71,80,75,15,8,217,127,140,160,
260 8,242,146,36,213,68,104,114,8,80,4,162,65,61,180,156,10,236,30,197,186,
261 6,250,162,173,79,221,1,128,44,128,11,16,206,126,70,46,64,24,102,96,77,133,
262 135,254,93,181,150,146,60,79,204,241,104,250,183,59,0,62,143,208,88,183,
263 206,82,146,169,217,249,172,19,62,191,115,128,159,11,105,182,12,79,90,78,
264 180,156,209,26,132,187,23,18,27,51,225,254,141,200,34,132,161,5,107,253,
265 30,238,7,55,57,98,120,19,79,209,251,110,214,84,59,202,118,39,52,235,132,
266 193,129,95,139,25,246,220,157,118,15,2,138,58,81,62,7,86,66,20,113,162,
267 252,0,37,32,12,45,168,12,120,121,123,168,193,81,189,137,153,20,173,79,226,
268 171,197,180,150,65,72,226,245,43,132,47,5,1,244,140,34,150,72,57,2,152,
269 252,62,103,20,85,38,165,46,237,168,207,149,13,0,115,90,134,163,79,227,185,
270 114,217,226,223,204,64,145,88,118,64,152,69,201,183,178,85,18,249,145,79,
271 254,3,152,12,212,147,138,121,230,178,0,0,0,0,73,69,78,68,174,66,96,130};
272 
273 static size_t xml_res_size_5 = 1105;
274 static unsigned char xml_res_file_5[] = {
275 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
276 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
277 72,89,115,0,0,4,193,0,0,4,193,1,17,118,177,117,0,0,0,25,116,69,88,116,83,
278 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
279 46,111,114,103,155,238,60,26,0,0,3,206,73,68,65,84,88,133,197,151,93,108,
280 20,85,20,199,127,119,102,187,187,109,193,74,181,216,210,168,169,65,173,
281 196,151,242,160,24,155,96,48,49,82,131,41,31,17,130,209,218,20,4,34,145,
282 7,77,144,144,106,96,137,190,245,69,227,55,26,44,105,37,212,66,169,2,9,24,
283 19,163,201,38,16,27,67,35,148,98,67,49,41,173,197,110,107,183,237,204,206,
284 236,92,31,216,46,59,221,153,217,169,149,250,127,185,59,247,158,115,238,
285 47,231,158,115,103,86,72,41,17,251,126,89,138,176,126,98,142,90,76,76,236,
286 21,7,219,95,111,252,122,135,95,159,192,205,65,6,128,123,220,140,138,136,
287 51,198,130,156,193,20,44,94,227,232,246,15,246,203,192,206,183,143,108,
288 245,3,160,0,144,152,84,48,19,182,133,39,184,192,97,209,72,143,88,207,117,
289 241,172,159,88,0,168,88,236,16,109,91,62,140,188,240,133,31,251,64,250,
290 87,10,32,20,128,125,124,202,155,162,25,21,11,0,157,32,0,29,27,151,178,32,
291 168,114,110,96,130,182,139,49,206,15,76,184,66,108,231,155,250,79,34,27,
292 212,109,141,109,117,94,0,138,237,201,76,112,36,249,6,187,197,161,244,230,
293 153,42,10,171,172,170,88,200,238,39,75,137,54,84,242,238,170,114,130,170,
294 112,9,108,177,149,99,47,127,182,127,221,97,223,0,245,162,147,167,204,40,
295 154,233,229,114,83,170,16,236,169,46,227,199,87,42,201,83,220,33,182,136,
296 227,47,126,30,89,219,154,19,160,132,24,7,248,8,0,221,196,23,4,192,227,229,
297 133,188,179,114,137,235,186,64,210,64,199,166,47,35,207,31,245,4,88,33,
298 186,41,100,42,189,48,27,136,183,170,75,169,42,45,240,132,168,167,115,195,
299 161,200,154,99,174,0,203,185,148,229,232,23,66,21,130,218,202,59,115,218,
300 213,241,109,109,243,129,154,19,153,115,233,46,232,147,229,124,204,250,108,
301 47,3,36,65,80,189,131,63,182,164,48,117,128,222,122,73,158,90,211,18,89,
302 253,221,230,198,83,207,217,0,154,169,225,222,162,32,15,223,21,118,116,124,
303 38,47,72,113,126,192,113,13,160,170,172,128,97,22,81,33,79,160,96,161,96,
304 33,32,53,74,20,100,106,180,16,200,154,93,239,125,255,208,240,158,167,47,
305 219,34,62,186,56,159,214,117,15,184,110,18,10,57,87,59,192,192,184,65,18,
306 133,171,148,185,218,216,148,16,10,204,104,195,174,235,147,158,62,186,174,
307 163,105,154,227,218,57,151,75,41,151,108,25,24,140,27,92,27,211,185,175,
308 40,228,9,1,16,14,219,143,234,231,107,241,44,219,144,42,120,164,36,223,54,
309 247,251,136,206,120,34,233,12,0,176,247,135,1,154,107,43,60,169,103,66,
310 156,31,152,160,165,123,36,203,174,98,81,136,174,87,151,217,230,86,183,244,
311 114,250,202,88,250,89,153,233,212,217,51,74,251,165,152,39,192,52,132,166,
312 105,104,166,69,93,199,85,76,75,230,244,113,146,99,89,239,58,253,7,134,37,
313 217,184,172,216,211,185,255,175,56,59,207,12,242,219,176,115,93,248,81,
314 86,6,0,198,245,36,219,58,251,217,220,222,199,149,145,236,224,147,134,69,
315 107,247,8,43,14,94,228,236,229,27,204,124,149,207,70,238,141,13,156,236,
316 29,227,100,239,24,197,249,1,150,151,21,80,82,24,224,215,193,41,122,110,
317 104,36,101,70,202,167,1,2,193,255,22,96,90,35,83,38,103,251,254,246,54,
318 250,151,16,190,0,188,180,242,254,133,52,175,189,213,53,161,112,152,234,
319 175,250,232,117,56,186,219,2,144,167,10,238,8,101,188,40,164,129,98,249,
320 175,9,199,34,156,171,164,145,240,93,152,190,50,208,80,117,119,214,71,199,
321 131,239,95,64,79,122,244,190,153,64,250,128,240,5,16,84,21,123,154,1,33,
322 4,224,125,249,72,35,129,174,235,132,66,238,87,251,109,57,130,76,105,154,
323 150,190,186,255,23,128,92,16,115,238,130,217,64,56,105,94,50,144,9,97,25,
324 246,194,156,87,0,0,203,208,109,45,58,111,71,96,147,153,128,100,82,185,5,
325 32,49,129,63,221,236,187,134,38,242,154,162,67,182,94,50,45,25,7,232,31,
326 213,213,166,232,144,237,179,39,166,153,147,128,21,211,76,165,41,58,100,
327 251,195,208,63,170,79,1,201,212,158,252,3,254,199,112,135,4,100,254,30,
328 0,0,0,0,73,69,78,68,174,66,96,130};
329 
330 static size_t xml_res_size_6 = 845;
331 static unsigned char xml_res_file_6[] = {
332 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
333 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
334 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
335 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
336 46,111,114,103,155,238,60,26,0,0,2,202,73,68,65,84,88,133,189,151,191,75,
337 91,81,20,199,63,231,249,226,139,162,160,208,66,210,116,180,160,67,113,176,
338 226,32,130,21,156,28,116,20,58,118,118,232,42,214,36,214,150,118,18,236,
339 127,80,42,56,198,210,77,16,161,237,32,209,193,14,254,192,14,29,140,9,88,
340 80,26,137,121,106,60,29,18,127,52,47,198,151,248,226,217,238,185,247,221,
341 239,135,115,223,61,231,92,81,85,220,152,124,252,101,113,112,56,0,12,3,29,
342 32,65,208,96,97,54,9,154,4,54,129,5,90,91,150,116,172,205,118,181,239,109,
343 0,242,110,45,200,169,78,34,188,0,154,93,209,66,26,101,14,159,76,233,120,
344 87,178,42,0,137,46,251,145,166,9,224,21,208,232,82,184,216,50,192,12,122,
345 52,173,225,254,172,107,0,137,198,3,136,196,128,158,42,133,139,109,5,213,
346 17,13,119,167,138,39,12,135,248,235,239,157,136,196,61,20,7,232,65,36,46,
347 111,214,158,58,244,174,71,64,38,190,5,209,92,156,186,250,16,102,189,135,
348 250,151,182,139,106,247,245,72,92,70,64,162,203,126,206,115,95,80,66,156,
349 157,192,217,73,45,0,30,35,18,147,232,178,223,1,128,77,4,120,118,57,174,
350 29,68,79,225,231,6,10,71,32,19,75,33,212,216,65,105,112,44,55,235,169,193,
351 113,100,48,165,77,199,187,146,249,8,156,27,145,146,226,80,171,72,52,114,
352 170,147,0,194,236,142,69,106,247,15,74,83,217,79,188,143,68,154,214,150,
353 135,6,169,196,224,173,226,80,139,72,52,115,112,56,96,130,142,252,231,181,
354 234,104,127,96,221,248,149,152,38,134,239,230,249,114,182,177,159,229,175,
355 157,187,238,26,54,65,218,225,42,23,116,6,26,248,58,250,164,236,70,150,101,
356 225,247,251,203,174,41,101,207,63,109,179,252,59,125,221,213,97,160,4,42,
357 221,200,182,109,178,217,146,169,189,66,147,160,129,104,197,0,222,65,104,
358 208,81,11,238,27,194,64,197,81,161,238,15,66,146,6,194,157,0,238,6,161,
359 73,19,116,11,232,189,112,173,167,142,25,252,188,93,21,136,152,245,101,175,
360 232,198,190,3,114,211,4,137,129,190,188,240,164,237,28,241,68,166,42,0,
361 200,84,154,49,23,12,2,161,69,132,163,42,21,157,230,62,99,166,105,109,89,
362 50,116,172,205,70,153,247,12,192,45,132,50,167,99,109,118,254,26,90,190,
363 48,194,241,61,66,100,240,201,20,20,26,18,13,247,238,161,204,122,10,80,30,
364 98,230,162,93,191,74,68,22,17,96,245,30,32,86,208,163,233,139,65,233,166,
365 84,9,121,14,146,191,29,55,55,165,0,58,221,151,4,134,16,18,158,3,228,78,
366 18,156,231,134,138,223,6,142,90,160,111,251,215,145,186,110,188,61,142,
367 85,164,174,91,35,61,63,139,39,74,22,35,157,238,75,98,209,7,124,184,211,
368 237,16,142,17,227,61,22,125,133,232,58,151,220,250,56,141,254,120,132,125,
369 26,69,24,117,213,186,229,133,143,80,230,177,124,97,13,247,238,149,93,90,
370 209,243,60,149,24,204,183,112,210,142,18,184,236,37,84,82,249,162,166,91,
371 32,49,2,161,69,183,207,243,127,112,231,61,10,138,240,143,199,0,0,0,0,73,
372 69,78,68,174,66,96,130};
373 
374 static size_t xml_res_size_7 = 1244;
375 static unsigned char xml_res_file_7[] = {
376 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
377 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
378 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
379 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
380 46,111,114,103,155,238,60,26,0,0,4,89,73,68,65,84,88,133,181,151,93,76,
381 91,101,24,199,127,207,161,165,5,193,208,32,210,2,83,230,72,216,98,252,64,
382 36,16,23,162,33,89,118,49,3,75,140,31,17,221,197,174,208,132,41,94,44,186,
383 32,208,73,102,188,218,148,59,19,99,162,33,89,116,78,70,162,162,219,8,6,
384 48,153,29,55,114,49,150,0,19,55,40,91,130,108,192,74,79,219,211,215,139,
385 150,66,219,211,210,18,247,191,122,63,158,243,60,191,243,158,247,60,239,
386 243,138,82,138,76,36,125,211,54,150,239,54,1,45,192,62,16,23,40,87,116,
387 214,11,202,11,92,3,46,224,40,26,86,237,85,122,70,126,183,3,144,83,19,46,
388 130,170,11,161,21,40,204,136,22,86,81,244,99,149,147,234,68,173,119,71,
389 0,226,30,177,35,5,157,64,7,144,159,97,224,68,249,128,211,168,181,94,213,
390 253,146,63,99,0,113,123,156,136,12,0,245,27,99,182,28,33,207,170,69,188,
391 6,195,4,140,204,62,93,84,87,80,234,176,234,174,91,76,156,208,146,130,127,
392 60,246,12,34,158,173,193,1,58,26,74,89,62,94,195,242,241,26,142,62,251,
393 72,54,193,1,234,17,241,200,39,19,79,165,5,144,206,81,23,225,208,79,132,
394 2,21,217,70,200,64,21,40,245,179,184,61,78,83,0,113,143,216,9,27,131,40,
395 202,9,5,32,20,120,0,12,84,32,50,32,238,17,123,18,0,58,61,192,243,177,254,
396 131,131,168,143,110,238,77,0,113,143,151,33,28,75,50,77,3,209,92,93,68,
397 91,109,9,109,181,37,20,230,230,100,11,209,33,167,38,92,0,22,0,244,160,27,
398 200,51,53,77,1,240,65,67,41,47,62,30,73,11,67,51,43,172,6,140,108,0,242,
399 9,170,46,224,29,139,244,77,219,16,222,32,221,95,21,10,16,10,164,78,108,
400 57,2,103,14,238,2,224,246,253,16,159,142,165,205,61,17,9,173,210,55,253,
401 190,133,197,249,3,40,10,182,179,55,130,1,252,126,63,118,187,61,105,206,
402 162,9,239,213,151,2,112,125,201,79,255,228,18,77,149,15,3,48,121,199,199,
403 132,215,103,230,178,144,229,187,77,22,80,135,183,199,141,72,215,51,74,239,
404 60,231,202,231,235,150,74,0,62,27,95,76,5,0,208,98,1,217,75,218,245,143,
405 168,198,153,31,131,232,122,161,24,71,225,102,118,30,62,82,29,107,63,225,
406 176,241,229,203,149,177,126,67,197,67,233,220,238,211,80,56,205,102,74,
407 11,172,113,125,239,90,48,214,206,215,140,184,205,89,86,184,105,107,213,
408 132,146,124,75,172,111,203,73,74,182,91,36,46,13,81,113,0,182,28,225,68,
409 163,139,201,182,39,105,125,186,56,54,126,115,37,254,111,208,117,29,191,
410 223,244,124,201,66,202,101,73,28,58,247,90,21,141,143,69,246,228,153,131,
411 187,152,187,167,51,54,183,134,32,73,143,111,236,9,179,141,153,169,52,148,
412 196,157,80,125,127,222,142,181,173,154,240,237,225,221,236,113,216,145,
413 228,248,49,136,157,175,132,120,53,132,56,128,223,102,86,232,159,92,138,
414 245,29,118,11,223,189,186,155,226,188,212,217,110,231,16,202,171,129,154,
415 74,28,254,232,242,60,11,171,155,223,124,143,195,206,187,117,143,166,117,
416 181,67,136,107,26,200,64,226,232,138,110,208,254,203,63,113,99,86,45,197,
417 55,216,6,194,179,112,63,221,35,23,52,156,229,23,17,214,18,103,46,223,88,
418 229,155,191,150,204,30,202,10,194,23,12,167,50,93,197,81,52,172,169,246,
419 42,29,197,89,51,139,15,47,221,226,143,155,73,108,89,67,152,74,209,175,218,
420 171,244,72,150,176,89,187,17,214,19,109,124,193,48,175,124,63,195,239,115,
421 171,255,55,132,15,171,156,132,104,61,160,186,247,47,160,248,194,204,114,
422 61,24,230,245,115,179,92,154,93,201,26,98,197,231,103,232,250,29,179,169,
423 211,27,229,250,102,158,180,209,3,92,53,179,246,135,194,188,121,126,150,
424 161,233,123,25,7,215,13,197,91,231,103,25,153,254,55,177,166,184,130,90,
425 235,221,232,196,149,229,210,57,234,66,25,30,20,229,102,78,173,154,240,85,
426 115,37,205,213,69,105,131,7,12,197,219,63,206,242,235,204,150,85,179,228,
427 130,37,247,22,74,213,109,45,207,227,78,10,213,219,232,5,14,33,204,155,57,
428 14,134,21,71,7,255,230,135,169,229,180,193,143,12,220,136,15,14,96,4,230,
429 9,27,135,18,239,6,230,23,147,206,81,23,97,99,144,173,69,234,22,105,2,133,
430 54,243,204,24,52,148,217,175,119,21,45,167,57,250,130,241,177,210,94,205,
431 116,122,16,142,161,82,212,139,219,73,88,7,237,115,114,195,238,172,174,102,
432 241,32,227,101,232,65,119,180,110,220,182,116,139,6,94,67,113,22,155,181,
433 91,117,239,95,72,107,154,213,245,124,113,254,64,164,132,147,189,40,156,
434 177,90,66,201,98,228,80,83,83,32,3,56,203,47,102,122,61,255,15,18,39,215,
435 228,219,192,187,72,0,0,0,0,73,69,78,68,174,66,96,130};
436 
437 static size_t xml_res_size_8 = 1526;
438 static unsigned char xml_res_file_8[] = {
439 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
440 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
441 72,89,115,0,0,4,215,0,0,4,215,1,216,97,229,36,0,0,0,25,116,69,88,116,83,
442 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
443 46,111,114,103,155,238,60,26,0,0,5,115,73,68,65,84,88,133,157,151,109,76,
444 147,87,20,199,127,247,161,165,133,242,86,24,133,90,20,167,12,209,153,24,
445 163,130,219,98,64,151,185,76,167,160,217,204,140,155,38,206,15,91,148,17,
446 247,97,75,20,149,26,117,203,62,184,24,183,79,91,246,102,28,26,93,68,227,
447 116,175,164,6,231,27,113,217,116,190,163,78,3,130,50,40,138,212,182,180,
448 189,251,0,62,125,158,182,208,226,249,244,156,151,231,158,255,185,247,156,
449 115,207,21,82,74,18,33,177,179,197,132,187,103,14,80,9,76,4,97,7,105,31,
450 212,182,131,108,7,46,1,7,177,102,53,202,234,34,95,66,235,198,3,32,182,157,
451 181,211,47,55,34,88,6,164,39,132,22,122,145,236,198,40,54,203,117,211,218,
452 159,8,128,112,186,204,136,180,90,96,45,144,154,160,227,72,242,0,159,34,
453 31,110,145,155,42,188,9,3,16,206,230,124,132,104,0,202,134,90,249,253,153,
454 121,20,231,152,1,184,218,229,101,251,169,187,195,1,57,141,148,85,114,211,
455 140,142,184,0,196,134,227,83,48,154,15,3,5,195,173,232,90,49,129,242,194,
456 129,19,57,118,171,151,138,111,175,12,103,14,208,138,16,243,228,134,105,
457 231,181,66,69,231,188,182,201,78,40,240,35,1,191,206,121,150,57,41,222,
458 226,81,148,156,36,34,69,5,72,121,68,56,155,243,99,2,16,78,151,153,80,240,
459 16,18,7,1,63,4,252,0,148,23,166,115,121,245,100,86,77,125,42,97,231,11,
460 39,100,113,225,221,201,234,17,233,64,8,209,32,156,46,85,17,222,1,31,117,
461 192,116,149,15,248,89,57,57,131,223,222,42,38,207,98,228,179,121,133,76,
462 179,199,207,197,50,135,133,250,197,227,40,202,54,113,98,101,9,207,21,164,
463 69,153,12,38,119,24,128,168,109,116,32,120,79,107,245,194,152,52,62,153,
464 109,35,224,31,40,103,83,146,96,203,108,71,92,0,219,231,142,38,213,56,16,
465 87,78,138,129,223,151,23,51,255,153,204,72,179,181,98,219,89,187,10,128,
466 144,82,135,36,229,177,54,63,205,200,215,149,99,49,40,2,159,207,135,215,
467 235,101,223,69,55,75,246,223,136,11,160,114,111,11,39,91,31,170,124,138,
468 65,225,139,5,99,49,27,116,233,150,74,191,220,8,160,136,157,45,38,4,111,
469 104,181,53,101,54,108,169,70,149,175,255,187,131,37,123,46,209,235,15,198,
470 5,240,159,39,192,139,223,93,229,192,101,183,42,179,167,25,121,59,50,135,
471 4,203,196,206,22,147,66,71,219,75,72,210,194,114,88,84,98,85,237,174,117,
472 123,89,115,228,54,218,196,140,71,143,2,33,222,60,112,147,78,79,64,149,125,
473 240,124,62,70,69,87,25,233,184,123,230,40,32,171,180,210,153,163,45,228,
474 167,133,163,255,230,175,46,60,253,161,1,102,4,32,60,253,33,182,159,12,247,
475 157,49,153,201,172,152,146,19,105,86,169,128,40,209,74,22,107,162,151,64,
476 195,149,30,253,47,35,0,241,121,115,39,247,125,225,99,171,24,27,117,149,
477 76,52,32,209,53,134,23,159,206,80,191,207,180,245,209,246,32,134,179,128,
478 159,117,191,220,192,150,105,1,6,206,61,22,245,250,131,92,235,242,50,125,
479 212,128,93,150,217,16,97,33,236,6,132,204,71,211,141,253,193,48,115,167,
480 119,232,72,79,220,116,131,161,15,12,201,67,218,0,184,189,225,29,176,70,
481 117,84,105,87,34,36,244,104,182,44,26,113,4,37,112,28,110,111,120,119,98,
482 181,116,5,41,116,55,212,125,111,112,216,31,70,10,162,48,211,164,126,39,
483 39,69,198,43,218,21,4,58,0,61,190,48,226,241,86,19,150,228,168,77,74,24,
484 68,97,102,50,101,14,139,202,255,116,253,126,132,133,108,87,64,94,214,138,
485 254,184,29,238,98,25,166,36,86,77,205,141,15,96,8,16,175,79,202,214,241,
486 123,47,116,71,254,117,73,1,209,160,149,212,159,239,166,85,147,249,171,75,
487 115,35,219,104,66,32,242,44,70,170,75,109,170,170,245,129,95,23,220,32,
488 29,84,200,119,252,138,64,213,244,135,36,59,78,223,83,45,108,169,70,190,
489 92,80,56,34,16,22,17,224,240,210,34,198,100,134,43,100,223,69,55,17,179,
490 87,47,214,172,70,69,86,23,249,144,236,209,106,118,157,235,162,163,175,95,
491 229,95,45,206,226,208,210,34,114,82,227,84,5,144,110,74,226,171,249,14,
492 38,103,135,19,184,165,219,199,71,199,35,102,83,201,110,89,93,228,27,8,203,
493 100,220,132,224,209,99,157,55,16,162,230,232,109,188,129,144,106,95,58,
494 202,66,227,242,98,214,148,218,24,157,25,93,251,214,20,3,235,102,217,249,
495 231,157,103,121,121,124,134,122,139,118,122,2,188,242,253,85,221,189,0,
496 120,48,138,205,160,153,9,197,58,215,199,192,135,90,171,82,135,133,61,175,
497 141,35,59,70,63,248,179,195,195,191,61,62,172,102,3,86,179,129,226,28,147,
498 58,7,104,3,89,184,255,22,103,238,70,117,202,173,114,227,244,90,61,0,167,
499 203,140,143,38,180,83,17,80,148,109,230,135,37,227,116,245,156,8,117,244,
500 245,83,115,244,54,63,95,127,48,208,45,195,29,243,52,242,97,197,227,49,93,
501 55,21,139,218,38,59,50,216,140,68,55,250,228,90,12,212,148,230,81,85,146,
502 69,65,198,240,173,183,245,129,159,29,167,239,177,235,92,151,238,8,7,65,
503 180,34,229,12,237,120,30,61,150,175,119,77,1,14,35,163,199,114,1,76,119,
504 164,82,53,193,202,220,241,25,4,67,208,253,40,128,251,81,16,183,47,192,153,
505 182,62,234,207,119,211,31,138,241,216,17,180,98,76,153,47,235,202,206,233,
506 196,49,31,38,117,199,242,241,203,3,192,204,97,195,77,156,78,145,44,22,201,
507 186,242,168,135,73,204,226,150,117,229,29,152,108,229,8,156,8,122,159,216,
508 173,160,23,69,113,98,178,149,199,114,14,137,60,78,215,55,229,18,10,62,126,
509 156,90,135,53,14,147,27,201,110,148,164,205,114,235,172,206,97,215,79,248,
510 121,238,116,25,240,137,10,160,10,33,39,33,25,133,24,76,86,73,27,130,59,
511 72,113,17,104,192,36,93,114,83,69,236,41,37,130,254,7,30,131,25,159,192,
512 210,21,210,0,0,0,0,73,69,78,68,174,66,96,130};
513 
514 static size_t xml_res_size_9 = 901;
515 static unsigned char xml_res_file_9[] = {
516 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
517 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
518 72,89,115,0,0,4,86,0,0,4,86,1,47,21,139,83,0,0,0,25,116,69,88,116,83,111,
519 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
520 111,114,103,155,238,60,26,0,0,3,2,73,68,65,84,88,133,197,151,79,104,84,
521 87,20,198,127,223,157,63,4,212,133,165,45,81,17,4,221,184,80,193,81,84,
522 2,18,211,141,168,180,46,164,162,210,133,224,38,180,165,165,214,150,168,
523 201,248,26,141,10,198,162,210,170,180,139,226,194,65,227,66,52,102,97,33,
524 25,37,237,34,198,42,46,82,23,13,180,182,138,136,208,210,26,197,201,204,
525 61,93,132,166,29,230,223,155,113,108,14,220,205,185,223,251,190,239,157,
526 115,223,225,93,153,25,83,25,110,74,213,129,104,189,9,213,211,19,97,100,
527 94,19,40,196,203,233,79,213,179,5,10,70,166,227,198,82,152,54,132,128,15,
528 225,180,181,110,45,80,112,107,54,122,122,61,132,184,199,236,16,246,164,
529 201,246,38,70,235,210,2,117,14,45,65,145,43,192,156,10,200,251,192,59,150,
530 92,54,240,79,230,133,43,160,96,120,29,230,6,193,202,139,139,139,196,114,
531 75,172,35,49,240,223,244,11,85,64,159,13,191,139,56,6,68,202,192,158,33,
532 125,100,237,137,83,197,54,107,50,160,0,7,195,221,136,15,43,64,239,96,185,
533 45,214,177,98,164,20,160,106,3,58,114,103,26,46,115,22,227,205,178,64,179,
534 227,188,50,243,19,123,127,193,243,114,176,170,12,168,235,230,44,178,214,
535 11,44,45,163,252,8,211,118,75,46,239,11,197,25,118,14,40,248,97,49,242,
536 189,192,220,50,176,7,136,157,120,30,22,236,68,109,212,246,44,255,181,32,
537 29,78,252,198,90,164,243,192,140,10,208,217,24,41,148,151,203,32,59,192,
538 107,238,187,162,220,149,42,160,96,36,142,27,123,187,208,172,214,99,108,
539 170,96,232,123,156,219,97,123,151,254,88,146,191,218,81,172,158,158,8,183,
540 95,63,136,139,125,76,44,174,18,176,39,136,54,252,178,47,45,137,47,203,87,
541 141,1,5,233,70,50,118,14,211,106,0,162,241,137,149,7,162,15,175,86,75,38,
542 238,133,225,12,253,21,168,61,221,76,142,20,168,113,50,153,205,48,105,4,
543 30,35,125,96,237,137,179,97,57,33,228,40,86,219,181,54,60,223,2,141,5,155,
544 217,12,140,143,167,48,45,172,86,28,42,84,64,109,131,51,81,246,12,98,3,197,
545 59,245,27,208,106,157,171,122,171,21,174,104,64,29,131,9,148,189,0,204,
546 43,220,52,143,113,154,92,252,83,59,220,244,87,173,226,19,84,69,14,161,118,
547 247,183,162,200,81,204,26,74,60,119,3,49,148,151,49,126,199,249,175,109,
548 127,203,47,53,27,208,174,171,211,136,197,79,3,219,170,224,248,25,167,19,
549 140,71,191,170,165,26,249,45,136,69,22,35,159,6,210,19,9,183,17,99,125,
550 241,71,53,132,212,77,124,245,133,74,223,122,185,40,57,7,180,231,218,46,
551 240,135,176,188,159,203,28,78,151,240,190,219,186,214,20,29,173,213,70,
552 193,33,84,128,227,121,250,24,240,30,147,67,221,198,144,190,193,249,207,
553 173,179,101,180,30,194,69,13,40,72,55,144,81,10,216,56,145,208,125,188,
554 255,130,6,157,180,100,243,31,245,20,46,48,160,32,253,42,25,46,99,182,18,
555 113,27,69,143,18,203,166,44,185,38,251,50,132,243,12,168,189,127,62,62,
556 210,135,241,19,145,220,27,214,217,210,255,50,69,243,12,168,227,250,34,188,
557 219,140,217,91,214,213,124,247,255,18,254,55,246,13,52,152,25,83,181,234,
558 122,53,171,37,166,252,118,252,55,50,148,111,19,84,139,201,163,0,0,0,0,73,
559 69,78,68,174,66,96,130};
560 
561 static size_t xml_res_size_10 = 1300;
562 static unsigned char xml_res_file_10[] = {
563 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
564 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
565 72,89,115,0,0,4,86,0,0,4,86,1,47,21,139,83,0,0,0,25,116,69,88,116,83,111,
566 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
567 111,114,103,155,238,60,26,0,0,4,145,73,68,65,84,88,133,197,150,91,108,84,
568 101,20,133,191,125,230,204,76,97,166,247,86,10,233,133,114,177,96,40,208,
569 150,114,49,218,146,8,54,220,195,131,137,90,64,1,83,19,13,26,19,98,34,5,
570 38,133,40,42,151,26,35,137,10,82,18,49,98,171,134,7,124,64,3,148,8,21,83,
571 74,161,177,208,40,134,32,119,66,11,132,118,202,180,51,179,125,152,58,165,
572 117,166,119,116,39,231,225,236,181,207,90,235,172,252,255,57,191,168,42,
573 255,103,153,67,73,38,31,158,136,164,213,158,211,195,132,23,114,170,212,
574 133,127,200,13,200,187,213,41,248,236,7,17,38,135,25,185,132,178,236,97,
575 113,0,99,72,196,75,106,178,241,201,175,16,70,92,165,28,53,167,170,43,231,
576 120,119,104,208,9,200,166,234,69,136,124,13,56,66,192,45,160,107,212,53,
577 173,44,220,243,131,74,64,54,85,191,9,114,32,140,120,13,134,47,75,55,230,
578 134,21,7,144,129,236,2,169,168,176,112,62,189,20,88,19,2,86,148,173,140,
579 148,245,90,148,211,222,43,87,127,13,200,182,58,7,173,158,253,168,44,12,
580 1,95,7,93,174,27,115,15,247,153,175,63,6,164,164,118,20,226,59,8,100,133,
581 128,31,0,219,17,110,119,182,244,26,27,114,43,20,194,138,244,121,17,202,
582 150,218,68,12,239,103,168,97,0,103,59,4,38,2,182,142,145,8,160,248,33,169,
583 47,80,235,222,158,196,97,160,107,160,164,50,2,156,59,17,86,133,128,255,
584 68,141,34,117,101,31,233,19,87,191,215,64,201,233,113,136,126,11,58,165,
585 27,228,67,165,148,168,182,141,250,214,172,214,190,242,245,235,59,32,235,
586 142,62,135,105,223,141,105,139,234,6,213,161,254,213,234,154,126,170,63,
587 124,208,199,4,164,164,210,196,35,219,65,223,0,192,180,5,46,240,0,155,73,
588 146,15,251,178,229,66,85,175,9,200,250,67,41,248,237,21,160,51,130,77,111,
589 27,136,84,97,216,86,171,43,167,97,32,194,65,254,158,18,144,117,199,10,64,
590 247,1,9,33,224,11,152,86,63,166,221,143,82,133,161,59,116,67,110,253,144,
591 25,144,226,202,73,168,172,69,212,130,104,10,126,201,239,54,226,3,57,128,
592 61,98,155,186,102,156,236,175,112,175,6,30,50,146,131,114,16,72,10,52,104,
593 6,41,195,144,82,221,156,119,113,160,194,255,84,143,107,64,138,143,45,4,
594 246,3,14,132,43,168,124,130,175,253,83,125,127,206,189,193,10,247,106,64,
595 214,87,190,134,242,49,112,6,97,7,54,202,213,149,239,29,42,225,176,6,4,132,
596 119,142,190,135,200,19,40,207,232,150,217,199,134,90,180,171,94,121,185,
597 133,115,137,214,96,167,205,50,19,139,222,198,226,191,240,40,133,3,53,187,
598 205,228,76,194,74,148,93,157,77,31,120,9,92,131,169,206,143,85,248,210,
599 234,121,6,128,205,34,20,78,142,15,246,71,56,173,228,165,57,131,247,14,155,
600 193,220,49,81,88,13,233,242,252,130,199,163,153,63,62,26,128,148,104,27,
601 47,102,198,51,38,214,206,11,153,113,68,90,124,224,109,35,53,218,198,146,
602 140,24,0,172,134,240,210,148,120,70,56,58,3,55,198,197,71,12,223,185,32,
603 141,173,115,146,1,136,29,102,242,211,178,241,172,156,154,64,113,222,72,
604 0,142,172,200,160,96,92,20,95,46,77,239,98,192,149,55,138,61,139,71,51,
605 204,106,176,98,74,60,59,231,167,146,149,52,156,162,236,68,22,103,196,128,
606 183,141,215,179,226,40,24,27,48,185,100,66,12,101,75,210,89,51,253,177,
607 78,3,69,211,70,78,60,125,205,29,108,204,74,118,80,117,165,133,15,78,220,
608 100,118,90,20,169,209,118,124,126,88,251,227,21,102,38,59,177,72,215,20,
609 46,52,121,120,50,217,65,126,90,36,245,183,2,63,193,242,250,59,44,237,120,
610 235,249,233,118,246,213,222,0,96,245,212,4,182,85,221,96,85,86,2,102,71,
611 154,198,219,135,46,214,124,83,223,20,36,28,27,27,65,107,187,159,214,118,
612 63,233,177,54,198,198,218,112,123,3,71,121,139,64,162,179,235,198,57,254,
613 215,125,22,101,196,144,28,105,229,247,166,7,0,124,223,112,135,167,211,34,
614 153,59,38,10,85,229,151,139,141,164,56,133,252,209,145,236,61,219,136,187,
615 221,31,72,136,16,167,226,186,155,110,18,135,155,36,56,44,156,186,234,166,
616 238,86,43,9,195,44,68,152,6,247,60,62,110,220,239,250,211,251,249,114,51,
617 133,153,241,156,188,218,18,60,250,220,108,110,167,234,114,51,165,5,41,84,
618 156,191,131,2,133,19,156,92,191,235,102,207,226,209,120,253,202,171,217,
619 137,161,13,212,92,119,227,180,89,248,232,217,84,190,250,173,145,70,183,
620 151,147,87,91,56,188,60,131,221,181,183,187,143,243,71,163,135,166,86,47,
621 199,47,53,119,233,151,159,107,34,57,202,70,69,253,93,12,129,194,204,56,
622 94,254,174,129,153,159,215,241,84,89,3,121,105,78,158,159,20,151,36,172,
623 59,242,10,42,187,254,197,252,40,203,106,7,139,21,84,231,153,136,249,3,126,
624 223,156,255,212,64,155,7,34,172,62,240,214,13,232,80,58,148,245,55,64,124,
625 153,96,137,219,15,113,0,0,0,0,73,69,78,68,174,66,96,130};
626 
627 static size_t xml_res_size_11 = 1478;
628 static unsigned char xml_res_file_11[] = {
629 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
630 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
631 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
632 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
633 46,111,114,103,155,238,60,26,0,0,5,67,73,68,65,84,88,133,189,151,107,76,
634 147,87,24,199,127,231,173,109,81,122,67,141,180,192,40,55,47,36,35,91,156,
635 78,39,226,133,136,155,26,81,163,91,12,110,51,102,126,28,203,220,246,97,
636 51,6,196,17,178,237,139,137,38,155,95,252,176,11,9,155,139,81,54,99,2,198,
637 129,96,230,13,99,220,140,23,16,16,129,146,101,220,90,110,45,109,207,62,
638 148,150,94,177,24,179,127,242,38,237,251,156,115,158,223,121,159,115,206,
639 243,28,33,165,36,30,137,147,109,90,6,135,10,129,29,64,46,8,11,72,203,148,
640 213,6,210,6,220,7,206,147,100,186,44,75,115,156,113,141,251,44,0,81,213,
641 98,97,82,150,33,216,7,232,227,162,5,7,146,106,212,226,152,60,252,154,237,
642 185,0,68,69,67,2,66,119,4,56,4,204,139,211,113,184,198,128,227,200,145,
643 74,89,190,97,34,110,0,81,113,211,140,16,231,128,85,207,233,56,92,215,145,
644 114,167,44,95,217,23,110,80,194,95,108,251,233,222,186,52,163,246,246,11,
645 116,142,70,37,86,21,101,27,239,190,89,221,186,38,220,22,242,5,196,145,38,
646 75,170,78,117,187,245,227,229,230,118,135,228,82,187,157,75,29,118,26,59,
647 71,112,184,60,179,114,154,183,104,46,155,179,13,108,202,52,80,96,213,227,
648 149,146,249,223,220,233,118,123,188,43,131,191,68,0,64,84,52,36,224,164,
649 9,88,113,227,96,46,121,41,70,18,18,18,0,112,123,37,215,186,71,185,212,97,
650 231,151,123,3,220,255,55,106,56,89,111,213,115,224,213,133,108,206,54,96,
651 209,169,67,108,191,63,26,102,123,77,43,192,117,228,200,6,255,154,152,14,
652 129,147,163,192,10,128,198,39,14,156,78,39,19,19,62,71,115,20,193,218,116,
653 29,239,230,45,192,225,242,198,156,245,227,65,39,5,233,186,8,231,0,245,237,
654 195,254,159,171,166,22,55,1,0,81,113,53,5,193,71,254,151,87,186,70,124,
655 76,65,16,18,168,106,182,209,109,119,197,4,232,182,187,168,106,182,17,109,
656 95,213,183,219,131,255,30,18,85,45,150,0,0,206,201,10,36,115,3,0,79,28,
657 120,166,66,227,135,16,192,169,109,86,138,151,154,98,2,20,47,53,241,237,
658 86,43,34,10,88,88,216,230,49,41,203,0,20,113,178,77,139,96,111,176,117,
659 120,194,67,139,109,44,48,115,63,132,70,37,56,179,39,155,45,57,198,168,206,
660 207,236,201,70,163,154,118,239,255,18,97,179,247,73,176,79,156,108,211,
661 42,244,245,20,33,209,133,219,47,119,56,104,31,116,242,225,197,46,92,30,
662 25,128,24,119,123,233,31,119,135,180,85,4,188,151,183,32,196,185,203,35,
663 57,88,219,73,251,160,147,186,199,81,0,64,207,224,80,225,28,144,59,163,89,
664 207,61,24,226,135,187,253,244,218,93,12,140,187,249,126,71,38,118,251,24,
665 187,207,118,113,243,159,80,0,175,132,146,179,237,168,148,44,118,45,75,194,
666 229,145,188,253,235,99,106,31,14,81,215,110,103,52,246,22,222,33,56,220,
667 208,140,148,249,177,90,248,85,148,101,96,96,194,77,75,239,24,204,209,248,
668 158,48,169,21,193,79,187,50,169,254,123,128,218,135,67,207,26,18,224,138,
669 224,139,134,54,144,217,241,180,14,81,12,8,33,32,206,4,11,136,86,5,33,205,
670 179,118,14,224,118,249,158,48,197,239,28,64,90,34,114,193,139,128,152,141,
671 20,164,136,200,80,255,31,132,176,41,8,226,2,200,74,210,198,5,145,110,210,
672 178,41,211,16,39,128,180,41,32,31,68,51,229,167,235,72,49,248,22,217,150,
673 197,70,174,125,144,75,233,235,201,51,66,164,207,147,52,190,191,132,11,37,
674 139,3,39,102,154,65,67,238,194,132,88,189,238,171,40,56,224,5,74,194,45,
675 135,215,90,248,60,223,204,168,219,203,119,91,173,104,84,130,194,76,61,35,
676 147,94,110,244,140,70,140,148,102,212,114,97,111,38,86,163,22,173,70,205,
677 238,220,36,122,28,147,156,222,158,129,71,250,18,92,20,149,41,152,83,235,
678 17,140,132,91,10,51,245,100,152,180,156,120,43,61,228,132,43,91,151,66,
679 166,41,50,28,57,38,13,102,157,38,228,216,62,93,156,65,206,252,152,33,113,
680 144,100,186,172,200,210,28,39,146,154,96,203,203,139,230,146,156,232,75,
681 169,193,137,197,229,145,236,63,223,65,199,80,100,193,219,240,196,193,254,
682 243,29,33,199,182,191,239,234,180,68,244,26,85,104,7,73,181,44,205,113,
683 250,182,161,86,93,142,96,124,122,246,145,196,18,248,164,238,41,23,91,135,
684 35,108,126,93,108,29,230,80,221,211,144,4,6,190,122,98,125,70,72,186,25,
685 67,45,142,193,84,58,150,229,249,189,72,78,248,173,235,173,145,213,183,0,
686 62,123,35,57,176,48,163,41,197,160,225,211,213,201,129,153,7,67,132,133,
687 225,184,191,92,159,62,136,180,28,5,110,105,84,130,53,105,137,33,3,247,58,
688 92,84,255,213,207,151,87,108,140,205,80,27,234,213,10,63,223,27,228,207,
689 238,81,38,189,161,245,196,166,172,0,192,117,228,72,101,96,98,225,69,233,
690 70,107,226,221,31,119,102,44,108,238,26,165,161,211,206,31,157,14,30,246,
691 71,175,1,103,82,162,70,33,255,37,29,27,51,244,108,176,26,120,37,205,200,
692 146,83,143,108,221,195,206,229,81,139,82,191,54,157,190,179,182,177,115,
693 184,198,237,145,169,179,246,58,131,82,12,154,190,229,233,243,223,249,173,
694 100,89,83,240,251,232,23,147,35,77,22,188,158,90,166,138,212,23,160,91,
695 40,170,98,89,89,16,113,77,139,154,140,100,101,129,13,45,5,192,215,193,187,
696 99,214,18,140,35,148,175,208,82,16,205,57,196,115,57,173,184,154,130,115,
697 178,2,193,222,104,165,91,12,199,35,72,106,208,170,203,101,121,126,239,140,
698 77,103,117,61,239,235,41,242,149,112,98,25,18,115,160,150,144,162,207,151,
699 212,228,3,16,231,48,167,214,199,123,61,255,15,248,15,77,215,175,116,59,
700 39,0,0,0,0,73,69,78,68,174,66,96,130};
701 
702 static size_t xml_res_size_12 = 1284;
703 static unsigned char xml_res_file_12[] = {
704 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
705 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
706 72,89,115,0,0,3,177,0,0,3,177,1,245,131,237,73,0,0,0,25,116,69,88,116,83,
707 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
708 46,111,114,103,155,238,60,26,0,0,4,129,73,68,65,84,88,133,197,151,107,108,
709 20,85,20,199,127,103,186,219,37,32,15,151,64,43,72,128,240,8,193,15,154,
710 64,27,136,193,23,2,169,248,8,180,240,129,4,33,53,212,87,154,26,161,88,208,
711 166,79,48,60,67,44,10,129,136,40,106,20,17,98,37,40,2,109,125,68,194,163,
712 168,160,161,126,130,88,232,83,83,75,67,218,238,110,231,248,161,110,59,179,
713 51,179,93,36,134,147,76,50,247,204,153,243,255,159,115,238,61,247,94,81,
714 85,238,164,24,119,20,29,240,221,174,3,41,193,208,34,76,139,70,40,103,42,
715 61,72,2,232,55,229,86,74,32,37,23,38,35,230,34,96,33,48,1,72,165,55,136,
716 22,160,97,24,55,191,171,147,172,251,239,225,207,199,18,112,119,14,147,101,
717 9,17,144,77,181,195,233,98,7,162,43,189,108,70,209,70,37,171,153,37,151,
718 6,114,103,162,108,33,149,66,114,52,60,96,9,164,244,124,6,200,94,68,199,
719 122,217,76,227,42,199,36,143,137,52,12,228,174,1,97,57,133,90,21,85,120,
720 18,144,146,218,193,160,21,8,217,224,157,165,71,57,207,97,89,203,8,58,6,
721 2,175,196,71,54,235,244,47,171,210,123,21,116,117,108,163,39,148,29,207,
722 227,10,142,114,92,114,227,130,119,18,224,53,114,235,197,172,206,140,5,247,
723 36,32,235,106,230,34,60,79,36,4,145,144,243,59,74,153,236,102,191,148,224,
724 39,226,9,126,137,201,164,233,7,108,214,103,199,97,12,89,239,138,21,59,9,
725 165,248,219,187,8,235,175,40,227,251,148,190,228,222,7,8,16,98,159,148,
726 177,140,175,61,129,1,118,178,148,124,205,163,139,228,168,42,140,152,105,
727 90,152,254,139,213,206,153,129,144,110,181,129,3,209,76,140,164,157,147,
728 188,28,23,188,149,187,121,138,237,228,106,190,21,28,192,143,26,251,101,
729 79,173,223,22,176,53,3,178,254,212,72,72,106,194,101,114,78,226,58,95,248,
730 11,184,207,119,205,19,188,158,20,242,116,13,141,50,210,241,237,138,142,
731 165,153,32,40,207,104,209,204,202,168,222,14,36,198,34,212,9,62,155,139,
732 124,36,133,4,35,55,232,2,6,121,172,157,113,52,115,88,242,109,186,110,146,
733 41,215,108,54,177,34,26,242,98,192,131,128,202,188,88,167,126,34,76,164,
734 145,114,125,174,87,17,134,36,77,98,129,255,2,153,84,197,154,219,228,7,125,
735 128,85,188,78,29,19,172,81,206,183,218,196,100,64,198,17,51,41,195,248,
736 248,152,5,253,38,40,249,61,7,200,144,26,207,46,210,193,96,10,52,151,93,
737 100,162,206,45,33,85,246,212,250,53,103,70,216,73,64,53,37,94,68,65,110,
738 176,135,13,60,206,89,194,17,92,203,113,84,231,240,34,5,92,99,180,151,27,
739 161,53,52,26,184,238,36,16,71,102,114,153,253,82,194,189,52,247,233,186,
740 255,109,1,131,124,208,66,144,60,93,205,39,204,247,240,224,46,246,101,40,
741 210,236,102,148,195,17,142,73,158,13,220,74,226,221,72,6,211,245,96,162,
742 224,202,168,228,150,232,32,54,3,245,192,236,232,96,8,157,84,200,22,22,83,
743 237,234,233,15,82,121,133,87,169,10,167,129,38,39,154,207,166,104,253,193,
744 209,136,204,19,209,183,105,92,165,90,94,112,5,55,49,216,69,22,179,244,61,
745 170,52,173,87,233,209,182,157,162,223,88,71,49,147,208,60,2,73,187,150,
746 114,210,183,67,182,49,152,46,87,23,23,153,194,32,237,102,3,239,244,233,
747 154,9,242,126,228,73,26,25,211,215,182,221,241,229,176,117,104,223,11,42,
748 36,112,168,41,253,194,60,206,78,79,32,20,0,234,152,192,78,93,202,103,204,
749 165,59,218,122,45,123,71,140,252,76,170,164,91,75,96,203,64,91,35,83,103,
750 24,191,111,127,73,215,190,217,173,129,81,25,242,35,89,156,114,5,174,102,
751 38,111,179,132,147,154,238,252,24,45,133,157,68,24,49,87,106,78,122,216,
752 170,116,61,146,201,154,175,230,173,10,28,63,190,137,10,49,44,231,205,16,
753 126,62,103,46,59,53,139,223,152,228,74,204,38,214,76,136,22,105,97,90,169,
754 195,196,249,151,72,123,128,12,165,191,133,181,49,148,125,60,205,94,93,68,
755 19,206,141,198,83,250,51,241,19,230,205,141,174,28,109,163,10,9,180,55,
756 113,0,88,2,208,74,176,99,51,203,135,126,168,25,116,18,72,28,216,78,226,
757 12,134,185,76,139,31,113,61,185,244,149,224,70,177,4,9,83,169,240,32,202,
758 105,12,182,13,247,115,68,58,79,44,196,240,239,6,29,115,139,208,93,32,197,
759 4,30,222,98,191,55,184,16,248,187,80,38,26,202,151,10,151,5,182,14,43,215,
760 51,54,163,226,154,17,132,140,183,192,92,158,24,182,158,195,151,180,66,75,
761 31,186,60,144,165,180,191,193,20,53,201,84,131,79,71,148,233,149,184,198,
762 235,191,159,138,161,139,17,227,9,212,28,143,106,10,170,62,160,21,161,17,
763 164,6,53,14,177,113,206,105,141,119,148,182,113,61,72,146,170,242,95,31,
764 138,213,184,157,255,111,233,106,246,127,200,29,191,29,255,3,97,2,5,212,
765 74,24,35,58,0,0,0,0,73,69,78,68,174,66,96,130};
766 
767 static size_t xml_res_size_13 = 4246;
768 static unsigned char xml_res_file_13[] = {
769 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,128,0,0,0,128,8,6,0,
770 0,0,195,62,97,203,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
771 72,89,115,0,0,14,225,0,0,14,225,1,42,185,74,121,0,0,0,25,116,69,88,116,
772 83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,
773 101,46,111,114,103,155,238,60,26,0,0,16,19,73,68,65,84,120,156,237,157,
774 121,124,85,213,181,199,191,59,132,8,4,80,148,50,84,177,224,0,148,65,80,
775 47,90,30,141,19,60,169,15,11,143,62,16,73,2,69,10,18,17,1,193,16,16,238,
776 5,207,85,4,209,32,8,17,153,202,12,2,173,136,34,210,10,10,15,5,202,85,91,
777 193,9,113,194,135,50,137,3,243,144,172,247,199,137,150,33,195,61,211,221,
778 39,185,247,251,249,228,243,185,159,228,236,189,86,178,126,217,123,159,61,
779 172,173,68,132,4,241,75,146,110,7,18,232,37,33,128,56,39,33,128,56,39,33,
780 128,56,39,33,128,56,39,33,128,56,39,33,128,56,39,33,128,56,39,33,128,56,
781 39,33,128,56,39,89,183,3,186,80,70,164,18,80,21,168,12,28,3,14,75,40,112,
782 220,81,165,97,117,49,16,44,172,211,239,124,7,140,83,229,113,45,64,25,145,
783 100,160,81,225,87,195,51,62,215,3,170,1,169,20,45,254,211,192,17,224,16,
784 240,21,240,113,225,215,142,159,62,75,40,112,186,72,163,97,117,21,176,170,
785 208,158,223,217,8,100,18,148,47,203,141,0,148,17,105,6,180,3,218,2,55,99,
786 6,218,109,14,1,235,129,215,128,181,18,10,108,7,32,172,218,0,43,128,154,
787 30,216,116,147,124,32,12,60,74,80,242,1,202,180,0,148,17,105,3,244,4,58,
788 1,181,53,184,176,55,135,185,219,199,170,169,55,37,33,21,53,216,183,194,
789 23,64,6,65,121,235,204,111,150,57,1,40,35,114,37,208,3,200,4,174,212,233,
790 203,72,102,19,86,211,80,248,254,111,184,4,200,34,40,63,156,251,131,50,51,
791 8,84,70,164,1,102,243,149,14,40,157,190,84,228,52,207,169,177,220,195,75,
792 58,221,136,134,195,192,0,130,50,183,184,7,124,47,0,101,68,106,98,142,172,
793 179,128,20,205,238,112,17,135,248,139,202,225,54,182,234,118,165,52,182,
794 2,233,4,101,103,73,15,249,86,0,202,136,164,2,67,128,108,188,25,208,89,166,
795 1,95,179,74,13,230,215,124,174,219,149,146,40,0,158,0,66,4,229,84,105,15,
796 251,78,0,133,175,112,125,129,16,80,71,179,59,63,115,35,219,89,169,134,82,
797 139,131,186,93,41,137,221,64,79,130,178,46,218,2,190,154,9,84,70,164,51,
798 240,1,144,135,143,130,223,133,181,188,174,178,252,30,252,21,64,11,43,193,
799 7,159,180,0,202,136,84,192,108,182,134,232,246,229,92,134,49,143,113,106,
800 138,159,71,250,199,128,33,4,101,154,157,194,218,5,160,140,200,133,152,175,
801 41,191,211,237,203,153,36,147,79,158,26,71,95,86,232,118,165,36,254,5,116,
802 39,40,31,218,173,64,171,0,148,17,185,10,120,9,104,172,211,143,115,169,206,
803 17,150,169,225,220,206,102,221,174,20,135,0,147,129,28,130,114,194,73,69,
804 218,4,160,140,72,59,96,41,80,67,151,15,69,113,57,123,88,165,6,211,140,79,
805 117,187,82,28,251,128,94,4,101,181,27,149,105,25,4,42,35,50,0,88,141,207,
806 130,31,224,67,182,168,94,126,14,254,171,192,53,110,5,31,98,220,2,40,35,
807 82,17,120,6,232,23,75,187,209,208,137,245,44,82,163,168,130,179,21,97,143,
808 56,1,12,7,38,17,116,119,238,62,102,107,1,202,136,40,96,25,240,63,49,49,
809 104,129,7,89,196,147,106,18,73,20,232,118,165,40,62,196,156,209,251,167,
810 23,149,199,178,5,24,131,207,130,95,129,2,38,171,9,244,103,185,110,87,138,
811 99,58,240,32,65,57,234,149,129,152,140,1,148,17,233,130,57,159,239,27,170,
812 114,148,149,106,136,47,131,127,144,234,252,65,38,160,100,235,58,47,131,
813 15,49,232,2,148,17,105,9,188,9,84,241,212,144,5,46,101,63,171,212,32,90,
814 240,137,110,87,206,227,13,174,39,83,194,236,230,23,96,78,242,164,73,40,
815 240,182,87,246,60,21,128,50,34,181,48,87,165,46,247,204,136,69,90,178,131,
816 151,213,96,46,101,191,110,87,206,226,52,21,8,73,22,227,233,73,193,217,13,
817 243,110,32,32,161,192,30,47,236,122,38,0,101,68,82,128,117,64,27,79,12,
818 216,160,3,27,89,162,70,82,21,79,91,85,203,124,202,101,164,203,163,252,131,
819 166,197,61,178,5,184,197,241,166,213,34,240,114,12,240,44,62,10,254,0,150,
820 242,162,26,234,187,224,207,163,3,215,202,194,146,130,15,112,35,48,195,11,
821 251,158,180,0,202,136,12,4,38,185,94,177,13,146,40,32,87,77,100,16,75,116,
822 187,114,22,63,146,74,150,140,96,49,237,173,20,203,145,80,224,9,55,253,112,
823 93,0,202,136,92,134,185,141,90,251,222,248,84,142,177,72,141,162,35,27,
824 116,187,114,22,155,104,78,186,60,198,23,212,181,90,244,36,208,88,66,1,215,
825 118,164,120,209,5,60,130,15,130,95,151,3,172,87,253,124,21,252,124,146,
826 8,211,135,52,153,105,39,248,96,110,137,11,187,233,147,171,45,128,50,34,
827 77,129,247,208,188,209,164,57,59,89,165,6,83,143,189,58,221,56,139,93,212,
828 33,83,12,254,151,107,157,86,37,192,117,18,10,184,50,51,232,118,160,198,
829 121,80,167,37,218,179,137,141,170,143,175,130,191,140,118,180,144,69,110,
830 4,31,204,29,209,227,220,168,8,92,108,1,148,17,185,9,243,212,140,54,250,
831 241,87,166,168,39,72,38,95,167,27,63,115,132,202,12,148,135,152,77,71,47,
832 170,111,43,161,128,165,237,95,69,225,230,127,171,171,163,83,43,40,132,9,
833 106,18,211,212,227,190,9,254,219,252,154,235,100,129,87,193,7,24,95,184,
834 192,230,8,87,4,80,56,215,127,163,27,117,89,165,50,39,88,166,134,243,16,
835 11,116,152,63,15,65,49,129,30,180,150,217,236,240,118,2,52,0,116,117,90,
836 137,227,46,160,112,27,247,7,192,213,78,157,177,74,109,14,178,82,13,225,
837 6,222,143,181,233,34,249,134,154,244,148,71,120,141,27,98,101,242,19,160,
838 73,177,39,150,163,192,141,22,224,79,104,8,126,19,62,103,179,234,229,155,
839 224,191,68,26,215,200,226,88,6,31,204,191,123,31,39,21,184,33,128,254,46,
840 212,97,137,182,108,229,45,213,155,250,124,19,107,211,231,113,156,20,6,200,
841 48,58,74,46,7,184,72,135,11,142,254,254,142,186,0,101,68,174,193,220,154,
842 28,51,122,179,146,105,234,113,42,98,187,213,115,141,237,92,73,119,121,140,
843 237,122,15,41,131,57,47,240,174,157,130,78,91,128,158,14,203,71,141,66,
844 120,76,229,49,75,133,125,17,252,41,220,69,43,153,231,135,224,3,244,178,
845 91,208,118,11,80,120,154,231,43,176,55,167,105,133,74,156,100,142,26,67,
846 55,254,238,181,169,168,200,39,41,102,205,189,160,88,192,29,132,36,139,99,
847 92,80,220,99,7,128,95,74,40,80,234,97,208,115,113,178,39,240,86,98,16,252,
848 154,124,207,139,106,40,255,193,123,94,155,138,154,10,20,80,59,6,231,4,191,
849 164,46,89,50,130,87,105,93,218,163,53,129,246,192,203,86,109,56,233,2,254,
850 211,65,217,168,104,196,151,108,86,247,248,42,248,177,160,128,36,158,161,
851 27,205,100,73,52,193,255,9,91,241,112,210,2,220,230,160,108,169,220,204,
852 59,188,160,178,169,193,143,94,154,241,29,31,208,128,62,18,100,19,205,173,
853 22,181,21,15,91,99,128,194,3,157,223,2,21,236,24,45,141,30,188,194,76,245,
854 40,41,88,238,210,202,44,167,72,230,113,122,241,152,244,230,36,182,242,77,
855 9,80,91,66,1,75,155,29,237,118,1,55,227,81,240,199,168,233,204,83,163,227,
856 42,248,91,104,198,117,178,128,209,210,207,110,240,193,92,37,188,213,106,
857 33,187,93,192,77,54,203,149,72,123,54,81,159,111,152,203,157,94,84,79,11,
858 118,208,146,29,158,212,109,135,35,84,102,148,220,199,100,186,157,187,19,
859 216,46,55,97,30,184,141,26,187,2,104,102,179,92,137,172,161,53,107,36,234,
860 65,143,37,250,179,156,238,106,141,39,117,219,225,111,252,134,126,242,176,
861 221,157,65,197,209,196,106,1,187,2,240,213,121,254,146,168,202,81,166,171,
862 177,116,199,31,193,63,72,117,134,200,131,94,181,114,141,172,22,176,60,8,
863 84,70,164,10,102,254,57,173,185,250,162,161,9,159,179,92,229,248,38,171,
864 215,82,218,241,128,100,179,143,139,189,52,83,77,66,129,195,209,62,108,167,
865 5,104,68,25,8,126,58,175,50,93,141,37,149,99,186,93,97,55,191,160,191,12,
866 103,165,55,67,167,115,105,4,68,125,148,204,174,0,124,75,10,167,120,90,229,
867 114,159,15,14,125,10,138,233,116,102,152,12,228,71,82,99,101,246,106,60,
868 22,128,167,237,151,19,234,243,13,203,84,14,1,108,231,76,114,141,29,92,78,
869 95,25,197,6,119,54,130,90,225,18,43,15,219,121,247,168,106,163,140,231,
870 116,96,35,111,171,76,237,193,63,77,5,198,209,139,22,178,88,71,240,193,98,
871 86,85,59,45,128,175,4,80,129,2,12,53,141,17,204,209,158,203,239,29,26,243,
872 39,9,242,79,189,119,70,84,183,242,112,153,22,64,109,14,178,88,141,228,86,
873 34,90,253,56,198,5,140,145,123,121,138,76,242,245,39,95,141,143,22,32,141,
874 119,121,94,61,76,93,14,104,245,227,13,174,167,175,140,100,39,245,180,250,
875 113,6,158,183,0,218,201,102,62,99,213,84,173,103,0,126,160,42,217,50,136,
876 153,116,66,252,255,86,92,44,118,4,16,245,36,131,219,92,200,97,230,170,49,
877 116,210,123,0,137,21,220,194,253,50,140,175,205,52,46,126,195,210,250,121,
878 153,17,192,181,124,204,114,149,195,21,236,214,97,30,128,61,92,194,3,146,
879 205,114,218,106,243,33,10,14,89,121,216,206,136,37,230,2,232,195,10,222,
880 82,189,181,6,255,207,252,158,38,178,212,239,193,135,242,212,2,84,225,56,
881 121,106,60,127,180,190,213,205,53,62,227,82,238,149,145,172,165,149,54,
882 31,44,98,169,5,176,35,128,152,220,154,208,144,93,44,87,57,52,167,196,43,
883 111,60,35,159,36,38,209,157,160,100,113,148,74,90,124,176,201,183,86,30,
884 182,35,128,143,109,148,177,68,23,214,50,91,25,84,211,148,208,233,61,174,
885 166,143,140,98,171,245,229,117,63,96,41,249,161,93,1,8,30,172,8,86,228,
886 52,19,212,36,109,9,157,78,144,194,163,210,155,241,252,145,83,101,243,13,
887 25,44,254,131,218,221,20,250,5,240,43,203,5,75,224,50,246,177,84,13,167,
888 53,219,220,172,54,106,222,164,5,125,100,20,31,81,95,139,125,151,248,90,
889 66,129,75,173,20,176,59,111,249,145,205,114,69,114,59,155,121,87,101,104,
890 9,254,33,170,48,64,134,145,38,51,202,122,240,193,70,247,108,87,0,219,109,
891 150,59,199,120,1,163,153,193,106,53,136,154,124,239,70,149,150,88,197,111,
892 105,42,75,153,74,215,50,61,155,119,6,31,88,45,96,183,163,219,0,12,181,89,
893 22,48,143,124,45,84,65,45,247,242,236,167,6,131,101,8,139,252,117,79,149,
894 27,88,206,137,103,87,0,235,49,175,34,183,117,54,224,55,108,99,153,26,206,
895 101,236,179,105,222,62,11,249,29,131,101,168,174,179,252,94,34,192,235,
896 86,11,217,234,2,36,20,248,1,176,117,30,125,16,75,216,160,238,141,121,240,
897 119,81,135,255,146,73,100,74,184,60,6,31,224,125,171,167,130,192,217,106,
898 224,58,204,68,69,81,81,141,163,204,82,97,186,242,154,3,147,214,41,32,137,
899 60,186,48,66,238,231,176,127,174,44,240,2,91,41,227,156,236,94,136,250,
900 176,126,115,118,18,81,61,98,30,252,15,105,64,154,204,224,1,201,46,239,193,
901 7,11,241,56,19,39,2,120,29,74,79,210,211,147,85,108,86,247,208,144,93,14,
902 76,89,227,20,201,132,233,67,75,89,200,91,92,19,51,187,26,57,0,246,78,190,
903 56,205,17,244,36,197,188,13,84,226,36,147,213,132,152,95,189,122,146,138,
904 76,160,7,219,197,219,212,45,255,160,41,159,97,105,206,197,75,38,75,40,48,
905 200,78,65,167,243,157,243,40,66,0,87,176,155,229,42,135,107,189,95,54,56,
906 143,20,78,49,146,217,158,28,93,41,32,137,23,184,133,92,201,240,83,240,1,
907 230,216,45,232,70,162,200,127,193,191,219,217,78,172,103,142,122,132,139,
908 172,173,74,250,154,195,84,97,54,29,153,36,119,251,45,240,0,219,36,20,176,
909 221,207,185,177,226,145,7,76,75,38,159,177,106,42,217,204,119,161,74,127,
910 240,127,212,226,25,233,198,116,58,243,189,181,205,182,177,36,207,73,97,
911 55,4,48,171,30,123,115,22,170,96,131,52,123,83,3,190,227,29,26,147,43,25,
912 44,165,157,223,87,5,63,1,102,58,169,192,241,111,39,170,85,218,113,82,46,
913 174,196,73,167,85,105,69,80,188,204,111,201,149,12,222,224,122,221,238,
914 68,203,40,39,121,130,193,137,0,194,74,97,94,104,28,174,196,73,79,210,197,
915 196,130,99,92,192,92,238,100,162,164,123,157,221,219,109,34,152,119,49,
916 59,194,158,0,194,170,6,48,31,232,224,212,1,93,236,225,18,166,74,87,158,
917 165,11,223,114,161,110,119,236,144,35,161,128,227,179,112,246,222,2,194,
918 170,53,69,108,8,25,40,15,101,239,167,198,117,209,86,51,68,45,164,149,245,
919 21,76,71,108,227,42,114,37,131,69,180,119,146,144,73,55,107,36,20,112,101,
920 41,83,203,165,81,201,228,243,156,26,75,111,86,186,102,187,52,214,208,154,
921 167,36,131,191,235,185,215,194,77,92,189,52,202,139,123,3,103,1,189,139,
922 251,121,53,142,178,76,13,167,61,155,92,181,91,20,39,72,97,1,119,48,81,210,
923 121,159,43,60,183,23,35,22,74,40,144,233,86,101,94,188,227,140,6,186,83,
924 196,221,129,191,100,63,171,212,96,207,83,181,29,224,34,242,232,194,84,233,
925 234,117,62,158,88,115,18,8,186,89,97,204,174,142,109,202,103,172,86,3,61,
926 189,206,237,35,234,51,81,210,153,71,7,142,147,226,153,29,141,248,255,234,
927 216,159,43,62,163,43,184,149,8,47,168,108,46,244,232,80,209,58,90,145,43,
928 233,188,66,155,242,178,183,175,40,22,72,40,208,195,237,74,189,156,230,186,
929 15,104,148,201,234,54,179,84,216,245,212,175,167,72,102,9,183,147,43,25,
930 186,51,114,196,130,45,64,95,47,42,246,172,5,0,216,23,190,120,108,45,190,
931 27,225,102,157,223,81,157,231,248,3,207,200,93,126,61,158,237,54,187,129,
932 128,132,2,123,188,168,220,27,1,132,85,50,230,34,133,107,170,221,73,61,158,
933 150,238,204,225,78,142,232,191,155,58,86,28,3,210,36,20,136,58,237,155,
934 85,220,239,2,194,170,42,102,194,226,59,220,168,110,35,45,121,74,50,88,201,
935 77,110,37,84,46,75,220,227,101,240,193,109,1,132,85,29,96,21,16,245,108,
936 96,81,156,166,2,203,105,75,174,100,148,213,3,154,110,16,150,80,224,121,
937 175,141,184,39,128,176,106,2,188,130,131,51,131,63,146,202,12,58,51,89,
938 186,177,139,58,174,185,86,6,249,43,230,124,138,231,184,35,128,176,186,25,
939 88,1,246,54,220,127,73,93,38,201,221,204,228,191,57,84,254,119,239,150,
940 198,115,192,3,110,44,244,68,131,115,1,132,85,119,204,61,105,150,103,94,
941 182,208,140,92,201,224,47,220,230,135,252,122,186,57,13,60,40,161,192,148,
942 88,26,117,38,128,176,26,14,140,197,218,22,204,2,96,197,227,244,218,240,
943 176,220,63,26,168,225,200,135,242,193,119,192,93,18,10,196,246,224,4,246,
944 151,131,43,0,83,128,44,11,165,14,3,127,6,158,38,40,159,1,40,35,114,21,240,
945 18,101,232,2,10,15,248,8,248,189,132,2,90,114,225,88,23,64,88,165,2,207,
946 19,253,102,144,221,192,100,96,58,65,57,239,12,120,225,13,100,75,160,252,
947 29,213,141,130,87,129,187,11,207,90,106,193,154,0,194,170,54,230,237,148,
948 209,156,9,124,7,200,5,150,18,148,18,231,129,11,175,161,125,2,24,18,189,
949 51,101,158,92,96,152,132,2,250,210,157,98,69,0,97,213,24,88,13,37,166,209,
950 16,76,129,228,18,148,55,44,59,99,68,58,3,227,49,47,61,40,175,236,196,12,
951 252,11,186,29,129,104,5,16,86,105,192,139,20,63,96,59,6,204,197,236,223,
952 29,29,7,82,70,36,25,115,10,57,4,229,106,50,96,47,96,0,51,236,92,242,236,
953 21,165,11,32,172,186,97,6,183,168,171,171,247,0,83,129,103,9,138,165,252,
954 116,165,58,102,68,82,49,187,132,108,44,166,64,247,25,135,129,39,129,167,
955 172,92,230,20,43,74,22,64,88,101,99,54,201,231,190,230,109,3,38,2,139,8,
956 202,9,207,188,3,148,17,169,137,185,11,38,11,27,115,13,26,57,5,76,7,12,9,
957 5,98,159,10,37,74,138,22,128,249,154,55,25,232,127,206,79,214,96,246,239,
958 127,243,222,181,179,81,70,164,1,16,6,210,241,247,173,101,130,185,24,54,
959 82,66,129,79,117,59,83,26,231,11,32,172,170,0,139,129,142,133,223,57,1,
960 44,196,12,252,251,49,245,174,8,148,17,185,18,232,1,100,2,222,158,1,183,
961 198,231,192,2,96,190,132,2,150,178,117,234,228,108,1,132,85,45,204,137,
962 153,27,48,147,14,228,1,121,4,197,187,141,124,14,80,70,164,13,208,19,232,
963 4,212,214,224,194,94,204,193,241,124,224,205,88,205,223,187,201,191,5,16,
964 86,13,49,95,243,78,98,246,239,243,9,138,254,91,23,163,68,25,145,102,64,
965 59,160,45,230,237,230,94,12,28,15,97,102,72,123,13,88,43,161,128,43,249,
966 18,117,98,10,32,172,218,0,131,48,71,251,175,16,244,112,159,88,12,40,124,
967 149,108,84,248,213,240,140,207,245,48,133,145,74,209,235,32,167,129,35,
968 152,129,254,10,51,243,230,199,192,142,159,62,59,61,140,233,55,148,24,84,
969 6,126,69,80,92,77,255,234,119,148,17,169,132,121,1,86,101,204,121,140,195,
970 18,10,28,215,235,85,236,241,116,83,104,2,255,19,247,139,240,241,78,66,0,
971 113,78,66,0,113,78,66,0,113,78,66,0,113,78,66,0,113,78,66,0,113,78,66,0,
972 113,78,66,0,113,78,66,0,113,206,255,3,145,115,236,65,132,111,52,203,0,0,
973 0,0,73,69,78,68,174,66,96,130};
974 
975 static size_t xml_res_size_14 = 629;
976 static unsigned char xml_res_file_14[] = {
977 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
978 0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
979 72,89,115,0,0,1,220,0,0,1,220,1,5,161,33,96,0,0,0,25,116,69,88,116,83,111,
980 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
981 111,114,103,155,238,60,26,0,0,1,242,73,68,65,84,56,141,165,147,77,72,84,
982 97,24,133,159,119,186,54,149,37,18,41,150,244,67,196,40,25,20,149,198,4,
983 81,230,162,69,5,133,171,104,149,43,9,23,206,40,69,53,57,78,152,68,145,182,
984 137,114,102,33,8,133,68,20,129,171,22,45,218,84,243,27,181,233,103,163,
985 130,69,24,58,57,193,224,204,120,223,22,54,247,50,215,217,249,237,190,195,
986 57,231,61,231,251,120,69,85,89,205,49,202,129,18,78,84,240,115,105,63,178,
987 166,25,81,183,65,33,150,230,228,209,74,205,214,151,16,93,188,89,97,32,161,
988 228,25,68,35,136,171,14,148,117,154,99,76,130,84,146,5,177,104,121,32,192,
989 18,19,37,6,114,43,126,7,225,106,241,94,195,60,175,164,7,47,159,45,206,12,
990 53,153,122,102,91,185,169,137,229,16,150,56,121,10,108,113,3,83,188,151,
991 75,37,226,8,231,240,232,139,77,66,236,144,221,2,16,16,48,35,69,240,56,73,
992 222,73,7,187,153,1,96,145,181,248,241,49,168,29,212,50,79,133,22,238,75,
993 232,99,181,157,96,32,238,1,182,3,120,152,198,207,19,162,52,241,155,106,
994 0,220,228,24,98,152,148,92,164,149,56,121,140,141,136,121,196,54,48,105,
995 41,78,255,198,14,218,185,203,39,221,195,22,210,86,252,151,156,96,175,62,
996 99,148,179,255,17,109,129,50,223,184,141,89,198,229,6,199,72,1,240,139,
997 205,116,113,133,231,218,230,164,98,27,184,136,98,66,27,49,158,74,128,90,
998 230,0,24,227,52,62,245,51,71,85,25,169,68,173,10,253,129,137,239,3,60,250,
999 243,90,186,44,113,134,13,52,48,197,32,15,105,100,210,169,254,139,186,62,
1000 88,6,193,225,144,123,90,183,246,134,57,191,220,14,225,45,7,185,206,101,
1001 58,185,198,23,118,57,134,211,163,193,3,105,187,194,2,139,35,114,123,95,
1002 30,163,240,152,118,227,129,94,224,43,59,203,118,70,25,215,190,195,97,203,
1003 75,135,88,79,134,123,8,63,48,24,145,92,194,139,152,17,160,206,33,93,0,237,
1004 214,190,230,209,146,48,218,143,7,152,36,168,57,11,116,44,19,166,70,169,
1005 42,164,212,231,205,174,120,202,213,174,243,63,218,64,171,61,237,173,51,
1006 184,0,0,0,0,73,69,78,68,174,66,96,130};
1007 
1008 static size_t xml_res_size_15 = 8746;
1009 static unsigned char xml_res_file_15[] = {
1010 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,0,0,0,1,0,8,6,0,0,0,
1011 92,114,168,102,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,
1012 89,115,0,0,29,195,0,0,29,195,1,143,57,51,30,0,0,0,25,116,69,88,116,83,111,
1013 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
1014 111,114,103,155,238,60,26,0,0,32,0,73,68,65,84,120,156,237,221,119,156,
1015 21,213,253,255,241,215,89,122,85,65,20,137,198,96,137,104,84,44,87,69,68,
1016 141,68,163,81,137,141,208,33,248,165,4,27,8,168,128,112,47,113,174,216,
1017 34,75,81,64,5,73,104,34,136,10,9,98,204,207,24,34,134,162,99,37,177,43,
1018 26,18,107,0,165,10,46,123,126,127,204,34,11,46,176,229,206,124,206,220,
1019 249,60,31,15,30,88,118,231,188,197,251,249,236,153,118,142,177,214,162,
1020 148,74,166,2,233,0,74,41,57,218,0,148,74,48,109,0,74,37,152,54,0,165,18,
1021 76,27,128,82,9,166,13,64,169,4,211,6,160,84,130,105,3,80,42,193,180,1,40,
1022 149,96,218,0,148,74,48,109,0,74,37,152,54,0,165,18,76,27,128,82,9,166,13,
1023 64,169,4,211,6,160,84,130,105,3,80,42,193,180,1,40,149,96,218,0,148,74,
1024 48,109,0,74,37,152,54,0,165,18,76,27,128,82,9,86,93,58,128,82,123,149,53,
1025 77,129,166,210,49,242,208,58,210,246,99,109,0,9,98,60,191,0,168,15,52,40,
1026 249,181,227,175,1,54,0,27,75,126,223,0,108,180,153,84,177,68,206,239,100,
1027 205,249,192,60,96,63,209,28,249,231,255,1,61,0,140,238,11,16,127,198,243,
1028 107,0,71,2,199,0,45,74,126,63,2,104,200,206,98,111,0,212,173,224,161,55,
1029 179,179,33,108,0,214,3,31,2,239,148,252,122,27,248,192,102,82,223,86,253,
1030 191,98,55,89,211,11,120,0,157,165,230,210,54,96,56,48,154,116,80,248,218,
1031 0,98,196,120,126,125,160,37,59,139,188,116,177,75,21,74,17,176,138,160,
1032 25,148,110,12,175,219,76,106,67,133,143,150,53,6,24,5,12,203,97,70,5,239,
1033 2,157,73,219,87,74,255,67,109,0,14,51,158,95,27,104,13,156,7,180,5,78,39,
1034 62,63,17,139,0,31,120,174,228,215,82,155,73,109,217,235,119,100,77,109,
1035 96,26,208,33,244,116,201,50,21,232,79,218,110,218,253,95,104,3,112,72,201,
1036 84,254,12,118,22,252,153,64,45,209,80,185,179,21,88,206,206,134,176,98,
1037 151,83,135,172,105,2,44,32,248,111,86,185,241,21,208,151,180,125,108,79,
1038 95,160,13,64,152,241,252,70,64,71,224,50,160,13,80,79,54,81,100,54,1,47,
1039 0,11,158,54,253,95,190,136,101,179,9,78,101,84,110,44,1,186,145,182,255,
1040 222,219,23,105,3,16,96,60,191,38,112,9,208,189,228,247,154,178,137,228,
1041 252,148,151,121,194,220,204,1,84,252,114,129,42,211,118,224,54,224,14,210,
1042 118,251,190,190,56,46,231,147,121,193,120,126,43,130,219,47,29,129,70,194,
1043 113,196,245,224,41,38,155,81,212,36,247,55,17,18,234,35,160,43,105,187,
1044 180,188,223,160,13,32,100,198,243,155,19,252,164,239,6,28,45,28,199,25,
1045 183,153,7,201,48,69,58,70,62,153,13,92,67,218,126,93,145,111,210,6,16,18,
1046 227,249,199,19,220,115,237,128,62,114,253,157,154,124,203,84,227,209,149,
1047 63,75,71,201,23,27,129,235,72,219,233,149,249,102,109,0,57,102,60,255,84,
1048 96,4,193,69,61,35,28,199,41,141,88,207,124,115,19,103,243,170,116,148,124,
1049 241,18,208,133,180,125,191,178,7,208,6,144,35,198,243,207,34,40,252,139,
1050 164,179,184,232,40,86,179,200,12,224,104,86,75,71,201,7,197,192,61,64,134,
1051 180,173,210,5,20,109,0,85,100,60,255,103,4,133,255,83,225,40,206,106,195,
1052 107,204,55,55,209,152,10,157,158,170,178,253,23,232,65,218,62,151,139,131,
1053 105,3,168,36,227,249,41,96,28,193,147,122,106,15,58,243,12,191,55,30,181,
1054 216,38,29,37,31,204,7,122,147,182,107,114,117,64,109,0,21,100,60,255,0,
1055 224,14,160,47,122,113,111,175,70,240,48,158,121,16,131,62,107,82,69,91,
1056 128,65,164,237,3,185,62,176,54,128,114,50,158,111,128,158,192,221,64,19,
1057 217,52,110,171,65,17,15,153,81,244,100,161,116,148,124,240,6,193,75,60,
1058 111,134,113,112,109,0,229,96,60,191,37,48,17,157,238,239,211,254,108,224,
1059 9,115,11,231,225,75,71,201,7,227,129,91,72,219,173,97,13,160,13,96,47,140,
1060 231,55,4,60,224,122,160,154,112,28,231,53,231,19,22,153,1,180,224,35,233,
1061 40,113,247,5,112,53,105,187,40,236,129,180,1,236,129,241,252,43,129,9,232,
1062 114,84,229,210,138,149,252,209,12,166,9,235,164,163,196,221,51,192,175,
1063 73,219,207,163,24,76,27,192,110,140,231,215,2,70,3,215,73,103,137,139,95,
1064 241,44,211,205,72,106,235,149,254,170,216,70,176,8,202,152,29,171,245,68,
1065 65,27,64,41,198,243,143,4,230,0,167,74,103,137,139,33,76,227,78,51,65,175,
1066 244,87,205,59,4,23,250,34,127,68,82,27,64,9,227,249,237,129,41,232,2,148,
1067 229,82,157,237,76,50,119,209,155,249,210,81,226,110,50,112,35,105,187,89,
1068 98,240,196,55,0,157,242,87,92,67,54,49,207,12,225,2,86,72,71,137,179,117,
1069 64,31,210,246,113,201,16,137,110,0,58,229,175,184,195,249,148,167,204,141,
1070 252,132,15,165,163,196,217,223,129,238,164,173,248,139,17,137,125,146,205,
1071 120,126,59,224,101,180,248,203,45,197,91,44,55,87,107,241,87,94,17,193,
1072 123,35,109,93,40,126,72,232,12,192,120,126,111,130,53,231,245,222,126,57,
1073 93,206,98,102,153,52,117,249,70,58,74,92,173,34,120,117,119,185,116,144,
1074 210,18,55,3,48,158,63,156,224,194,139,22,127,57,13,98,22,143,155,33,90,
1075 252,149,55,11,56,201,181,226,135,4,205,0,74,182,197,26,71,240,84,159,42,
1076 135,106,20,115,159,249,29,215,48,79,58,74,92,109,0,174,37,109,103,74,7,
1077 217,147,68,52,128,146,85,120,103,160,27,78,148,91,3,54,51,199,12,227,23,
1078 148,123,125,73,181,171,21,4,83,126,167,47,152,228,253,41,128,241,252,6,
1079 192,34,180,248,203,237,80,190,96,137,233,173,197,95,57,197,4,175,139,183,
1080 113,189,248,33,207,103,0,198,243,15,2,158,6,78,145,206,18,23,39,243,14,
1081 11,205,64,154,241,165,116,148,56,250,15,193,237,189,197,210,65,202,43,111,
1082 103,0,37,197,255,2,90,252,229,118,41,75,88,98,250,104,241,87,206,147,64,
1083 203,56,21,63,228,233,12,160,100,218,255,52,186,14,127,185,221,192,28,198,
1084 152,66,170,81,44,29,37,110,54,3,3,73,219,135,164,131,84,70,222,53,128,146,
1085 71,123,231,163,63,249,203,165,128,98,198,152,49,244,231,81,233,40,113,244,
1086 26,193,133,190,183,164,131,84,86,94,53,128,146,91,125,51,9,118,214,85,251,
1087 80,143,45,204,54,195,105,199,18,233,40,177,98,49,88,204,184,2,138,135,132,
1088 185,90,79,20,242,237,26,192,4,160,189,116,136,56,56,132,255,241,188,233,
1089 171,197,95,65,159,211,136,139,237,56,170,217,21,117,227,94,252,144,71,13,
1090 192,120,254,111,129,126,210,57,226,224,68,222,99,133,233,201,41,188,45,
1091 29,37,86,158,166,53,39,218,217,252,153,51,1,250,24,207,207,74,103,170,170,
1092 188,216,30,220,120,254,181,4,63,253,213,62,92,196,50,230,154,161,52,64,
1093 228,245,243,88,218,74,77,134,218,235,25,71,39,236,247,119,123,187,222,102,
1094 82,177,253,236,197,190,1,24,207,191,10,152,75,30,205,102,194,210,143,199,
1095 185,223,220,163,87,250,43,224,45,154,211,217,142,226,245,61,223,80,42,6,
1096 58,216,76,74,244,189,254,202,138,117,3,48,158,255,99,130,87,122,235,75,
1097 103,113,89,1,197,220,109,238,227,38,156,125,36,221,73,15,114,37,131,236,
1098 64,54,83,123,95,95,186,17,56,213,102,82,239,70,16,43,167,98,219,0,140,231,
1099 215,6,150,3,45,165,179,184,172,14,91,153,105,210,92,201,223,164,163,196,
1100 198,90,26,210,219,166,121,178,98,219,61,190,14,180,178,153,84,172,94,153,
1101 140,243,180,121,12,90,252,123,117,48,107,89,108,126,163,197,95,1,139,57,
1102 149,150,118,118,69,139,31,130,207,226,152,220,39,10,87,44,103,0,198,243,
1103 59,130,62,185,178,55,199,177,138,69,102,0,135,243,169,116,148,88,40,162,
1104 26,25,219,143,187,233,65,113,213,126,46,118,178,153,212,156,92,229,10,91,
1105 236,26,128,241,252,163,8,206,251,27,74,103,113,213,249,188,200,60,51,132,
1106 253,216,40,29,37,22,62,224,80,186,216,219,121,145,159,228,226,112,235,9,
1107 174,7,188,159,139,131,133,45,86,167,0,37,143,249,206,69,139,127,143,122,
1108 177,128,69,102,128,22,127,57,205,224,98,78,182,179,114,85,252,16,124,54,
1109 231,150,124,86,157,23,171,6,64,176,124,247,201,210,33,92,100,176,220,97,
1110 38,48,197,220,78,13,138,164,227,56,111,61,245,232,106,179,244,176,183,177,
1111 129,186,185,62,252,201,4,159,85,231,197,230,20,160,100,175,190,88,222,107,
1112 13,91,109,182,49,205,140,164,3,207,74,71,137,133,229,156,64,23,123,59,171,
1113 104,22,246,80,87,217,76,234,137,176,7,169,138,88,52,128,146,93,122,223,
1114 65,55,234,252,158,38,172,99,129,25,204,153,172,148,142,226,188,98,10,184,
1115 131,171,185,205,246,161,40,154,53,97,63,3,142,177,153,212,250,40,6,171,
1116 140,184,156,2,100,209,226,255,158,99,248,152,229,230,106,45,254,114,88,
1117 205,193,156,103,31,32,109,251,69,85,252,16,124,102,157,126,95,192,249,25,
1118 128,241,252,147,0,31,93,198,123,23,63,229,101,158,48,183,112,0,206,254,
1119 112,113,198,227,180,165,143,29,206,58,153,107,199,219,129,148,205,164,94,
1120 147,24,124,95,156,110,0,198,243,13,176,20,104,37,157,197,37,61,120,138,
1121 201,102,20,53,249,86,58,138,211,54,83,155,1,118,48,83,184,92,58,202,114,
1122 160,181,205,164,156,43,54,215,79,1,122,161,197,191,139,219,204,131,76,51,
1123 191,213,226,223,135,87,57,134,83,236,76,23,138,31,130,207,112,47,233,16,
1124 101,113,118,6,96,60,191,49,193,133,191,198,210,89,92,80,147,111,153,106,
1125 60,186,242,103,233,40,78,179,24,198,208,133,97,246,58,182,81,67,58,78,105,
1126 107,8,46,8,174,145,14,82,154,203,75,130,221,133,22,63,0,141,88,207,124,
1127 115,19,103,243,170,116,20,167,125,70,99,126,109,127,203,95,220,156,52,54,
1128 38,248,76,247,145,14,82,154,147,51,0,227,249,173,8,206,253,191,183,250,
1129 66,210,28,197,106,22,153,1,28,141,19,155,201,58,107,17,103,209,211,142,
1130 228,75,14,144,142,178,55,150,224,90,128,51,123,4,186,122,13,96,28,90,252,
1131 180,225,53,150,155,171,181,248,247,98,43,53,25,96,7,115,137,29,235,122,
1132 241,67,240,153,30,39,29,162,52,231,26,128,241,252,159,3,167,75,231,144,
1133 214,153,103,120,214,92,71,99,190,150,142,226,172,55,105,206,233,246,15,
1134 140,167,147,116,148,138,56,189,228,51,238,4,231,26,0,48,66,58,128,180,17,
1135 60,204,44,147,166,22,219,164,163,56,107,18,237,73,217,25,188,17,207,189,
1136 95,156,249,140,59,117,13,192,120,254,217,192,243,210,57,164,212,160,136,
1137 135,204,40,122,178,80,58,138,179,214,176,31,189,108,154,5,156,43,29,165,
1138 170,206,177,153,148,248,154,236,174,205,0,156,233,140,81,219,159,13,60,
1139 99,110,208,226,223,139,231,56,141,19,237,236,124,40,126,112,228,179,238,
1140 204,12,192,120,254,105,192,139,210,57,36,52,231,19,22,153,1,180,224,35,
1141 233,40,78,250,150,234,164,109,63,126,71,247,170,174,214,227,154,211,109,
1142 38,245,146,100,0,151,254,52,135,75,7,144,208,138,149,172,48,61,181,248,
1143 247,224,125,14,227,44,251,48,119,243,235,124,43,126,112,224,51,239,196,
1144 12,192,120,254,9,4,171,170,38,234,214,223,175,120,150,233,102,36,181,245,
1145 98,95,153,166,113,41,215,219,155,217,152,251,5,59,92,97,129,150,54,147,
1146 18,123,157,211,149,150,122,43,9,43,254,33,76,99,142,185,85,139,191,12,95,
1147 83,159,206,118,20,61,237,200,124,46,126,8,62,243,183,138,6,144,158,1,24,
1148 207,111,14,188,143,59,205,40,84,213,217,206,36,115,23,189,153,47,29,197,
1149 73,75,57,145,174,246,118,62,226,16,233,40,81,41,6,142,178,153,212,42,137,
1150 193,93,40,186,238,184,145,35,116,13,217,196,34,51,64,139,191,12,219,41,
1151 192,163,55,231,216,201,73,42,126,8,62,251,221,37,7,151,214,77,58,64,20,
1152 126,200,103,44,53,255,199,5,172,144,142,226,156,127,211,148,243,236,3,140,
1153 180,191,97,187,19,31,201,200,137,213,128,232,159,118,201,75,63,177,124,
1154 148,171,34,82,188,197,10,211,147,159,240,161,116,20,231,60,198,249,180,
1155 180,143,176,36,217,139,61,31,93,82,11,145,147,110,183,61,132,199,15,221,
1156 229,44,230,239,166,47,77,113,234,53,112,113,155,168,67,47,155,166,131,189,
1157 147,175,104,32,29,199,5,34,181,32,118,17,208,120,126,77,224,83,160,145,
1158 72,128,8,12,98,22,191,51,227,41,208,237,184,119,241,10,45,232,108,71,241,
1159 46,63,148,142,226,146,181,192,33,54,147,138,244,182,144,228,12,224,18,242,
1160 180,248,171,81,204,68,115,55,163,205,88,45,254,82,44,134,123,233,198,153,
1161 118,170,22,255,247,53,34,168,137,72,73,174,8,36,118,229,51,76,13,216,204,
1162 28,51,140,95,176,84,58,138,115,214,83,143,179,121,141,231,77,95,233,40,
1163 161,248,156,70,220,108,7,84,165,185,117,7,158,204,97,164,125,18,57,5,48,
1164 158,223,136,96,250,95,51,242,193,67,116,40,95,176,208,220,72,75,222,147,
1165 142,162,34,54,141,75,25,100,7,178,182,106,75,143,111,35,56,13,88,155,163,
1166 88,251,36,117,10,208,145,60,43,254,147,121,135,21,166,167,22,127,194,124,
1167 196,33,92,104,239,163,167,29,89,213,226,135,160,38,58,230,32,86,185,73,
1168 53,128,203,132,198,13,197,165,44,97,137,233,67,51,190,148,142,162,34,82,
1169 76,1,99,233,204,241,118,78,174,23,33,141,180,54,34,63,5,48,158,95,3,88,
1170 7,212,139,116,224,144,220,192,28,198,152,66,170,233,197,190,196,248,39,
1171 71,210,219,142,96,5,199,135,113,248,77,192,1,54,147,138,100,227,7,137,25,
1172 192,25,228,65,241,23,80,204,88,51,154,241,230,94,45,254,132,216,70,13,70,
1173 218,223,112,138,157,25,86,241,67,80,27,103,132,117,240,221,73,220,5,104,
1174 43,48,102,78,213,99,11,179,205,112,218,33,190,162,147,138,200,50,78,160,
1175 151,77,243,22,205,163,24,174,45,240,66,20,3,73,204,0,98,221,0,14,225,127,
1176 60,111,250,106,241,39,196,70,234,210,223,222,68,27,59,37,170,226,135,8,
1177 107,36,210,107,0,198,243,235,16,156,255,215,138,108,208,28,58,145,247,88,
1178 104,6,114,24,159,75,71,81,17,120,154,214,244,179,195,248,119,244,59,211,
1179 111,37,184,14,176,37,236,129,162,158,1,180,38,166,197,127,17,203,120,193,
1180 244,214,226,79,128,255,177,63,221,108,150,139,237,56,137,226,135,160,70,
1181 90,71,49,80,212,13,32,150,211,255,126,60,206,66,115,35,13,216,44,29,69,
1182 133,236,17,46,226,56,59,151,89,92,36,29,37,146,90,137,250,34,96,172,26,
1183 64,1,197,220,109,238,227,38,102,74,71,81,33,91,205,193,244,179,195,88,196,
1184 89,210,81,118,136,164,86,34,187,6,96,60,191,1,193,27,79,46,239,72,252,157,
1185 58,108,101,166,73,115,37,127,147,142,162,66,100,49,76,164,61,195,236,245,
1186 108,112,107,253,193,34,160,145,205,164,54,132,57,72,148,197,216,50,226,
1187 241,170,164,41,107,152,108,175,96,50,87,72,71,169,148,38,172,99,180,25,
1188 75,19,214,73,71,113,214,219,252,136,222,118,4,255,160,165,116,148,178,84,
1189 39,168,153,80,111,7,70,89,144,45,34,28,171,202,86,209,140,85,52,147,142,
1190 81,41,173,121,131,41,38,171,197,191,7,223,82,157,187,249,53,183,219,255,
1191 99,171,219,175,164,180,32,143,26,192,49,17,142,149,88,3,121,132,123,204,
1192 120,170,179,93,58,138,147,94,226,56,122,217,52,43,57,74,58,74,121,132,94,
1193 51,218,0,242,68,67,54,49,213,120,92,197,115,210,81,156,180,153,218,140,
1194 176,215,48,158,78,113,90,120,52,175,26,64,172,78,1,226,228,68,222,99,158,
1195 25,194,209,172,150,142,226,164,103,57,157,190,118,120,28,79,233,66,175,
1196 153,72,238,2,148,188,1,184,153,24,93,4,140,139,158,44,100,162,185,139,58,
1197 108,149,142,226,156,117,52,100,144,29,200,31,184,84,58,74,101,21,1,117,
1198 195,124,51,48,170,130,60,50,194,177,18,161,54,219,184,223,220,67,47,22,
1199 72,71,113,210,99,156,207,13,246,102,62,143,247,178,147,213,9,106,231,237,
1200 48,7,136,130,78,255,115,232,72,254,195,60,51,132,147,120,87,58,138,115,
1201 62,161,9,215,218,33,44,224,92,233,40,185,210,130,16,27,64,84,87,67,244,
1202 2,96,142,92,193,98,94,54,221,181,248,119,99,49,60,196,21,28,103,231,230,
1203 83,241,67,200,181,19,213,12,64,27,64,21,85,103,59,119,153,251,25,172,143,
1204 37,127,207,123,28,70,31,59,130,191,115,138,116,148,48,228,69,3,56,34,162,
1205 113,242,82,51,190,100,142,185,149,54,188,38,29,197,41,69,84,99,52,221,248,
1206 173,237,203,55,110,63,208,83,21,161,214,78,84,13,160,202,203,165,38,85,
1207 91,94,98,182,25,193,65,68,182,82,116,44,188,66,11,122,219,17,188,154,255,
1208 147,203,80,107,39,170,6,160,155,191,85,144,193,114,43,191,231,54,243,160,
1209 174,57,88,202,22,106,241,91,219,151,66,186,82,68,53,233,56,81,8,181,118,
1210 180,1,56,168,17,235,153,97,50,92,204,63,164,163,56,101,49,167,210,199,14,
1211 231,125,14,147,142,18,37,109,0,73,114,26,111,242,152,25,202,225,124,42,
1212 29,197,25,95,83,159,155,237,0,166,112,25,22,35,29,39,106,161,214,78,232,
1213 79,2,26,207,47,0,125,51,165,60,174,101,30,99,76,33,53,137,100,73,248,88,
1214 152,207,79,185,206,222,194,39,52,145,142,34,169,154,205,164,66,57,15,140,
1215 98,6,80,63,130,49,98,173,30,91,152,108,70,209,153,103,164,163,56,227,51,
1216 26,115,131,189,153,121,252,76,58,138,11,234,3,235,195,56,112,20,13,64,167,
1217 255,123,113,28,171,152,103,134,112,44,171,164,163,56,227,247,180,99,176,
1218 189,145,117,122,243,104,135,6,104,3,200,63,93,248,51,15,153,59,168,71,232,
1219 171,63,199,194,135,252,128,190,118,56,127,229,52,233,40,174,9,173,134,244,
1220 20,64,64,77,190,101,172,41,228,26,230,73,71,113,194,118,10,24,71,103,210,
1221 182,31,155,169,45,29,199,69,161,213,144,206,0,34,118,56,159,242,152,25,
1222 202,105,188,41,29,197,9,111,112,52,189,237,8,94,226,56,233,40,46,139,245,
1223 12,64,149,184,132,23,152,110,70,210,40,156,211,185,88,217,74,77,178,182,
1224 23,247,208,131,111,245,99,40,38,138,63,249,80,151,53,142,131,106,20,227,
1225 153,7,24,198,31,48,68,187,29,187,139,94,224,36,250,216,225,188,205,143,
1226 164,163,196,69,104,53,20,69,3,216,24,193,24,206,58,152,181,204,54,195,57,
1227 15,95,58,138,184,13,212,101,168,189,129,73,92,149,196,7,122,170,34,180,
1228 26,210,25,64,136,206,230,85,30,53,195,105,198,151,210,81,196,61,69,27,174,
1229 177,67,89,205,193,210,81,226,40,214,51,128,68,54,128,155,152,201,157,230,
1230 254,196,47,207,253,37,7,48,192,14,102,54,23,74,71,137,179,88,55,128,68,
1231 157,2,236,199,70,254,96,110,227,114,22,75,71,17,55,147,95,112,163,29,204,
1232 26,246,147,142,18,119,161,213,80,84,171,2,111,2,183,54,94,11,195,73,188,
1233 203,60,51,132,35,249,143,116,20,81,31,115,8,253,236,48,254,204,153,210,
1234 81,242,193,102,155,73,213,11,235,224,81,173,9,152,247,167,1,189,153,207,
1235 50,115,117,162,139,191,152,2,238,163,35,199,219,71,181,248,115,39,47,54,
1236 7,221,0,249,121,245,167,14,91,153,104,238,162,39,11,165,163,136,122,147,
1237 230,244,182,105,150,113,130,116,148,124,147,55,13,32,239,28,205,106,30,
1238 55,183,112,2,239,75,71,17,179,141,26,220,73,79,238,176,87,179,141,26,210,
1239 113,242,81,94,52,128,188,123,244,237,42,158,99,170,241,104,200,38,233,40,
1240 98,86,112,60,189,108,154,127,233,154,175,97,10,181,118,162,186,6,240,97,
1241 68,227,132,174,6,69,140,49,133,204,51,67,18,91,252,155,168,195,141,118,
1242 48,173,237,195,90,252,225,11,181,118,162,154,1,188,19,209,56,161,58,148,
1243 47,152,99,134,209,154,55,164,163,136,121,134,51,233,103,135,241,17,135,
1244 72,71,73,138,80,107,71,27,64,57,93,192,10,102,153,52,77,88,39,29,69,196,
1245 26,246,99,144,29,200,116,46,145,142,146,52,121,209,0,66,219,219,44,108,
1246 5,20,51,130,169,140,52,147,41,72,232,242,220,115,184,128,254,246,38,190,
1247 136,247,70,155,113,21,106,237,68,213,0,62,32,216,234,56,86,239,125,54,230,
1248 107,102,153,52,23,178,76,58,138,136,255,112,16,215,218,161,252,137,179,
1249 165,163,36,85,17,65,237,132,38,146,139,128,37,251,155,199,106,209,187,51,
1250 248,39,175,154,174,137,44,126,139,97,18,237,249,137,157,171,197,47,107,
1251 85,73,237,132,38,202,159,200,111,3,71,71,56,94,165,221,192,28,70,155,177,
1252 212,160,72,58,74,228,222,225,112,250,216,225,44,225,100,233,40,42,130,83,
1253 231,40,27,192,59,64,187,8,199,171,176,6,108,102,138,201,210,129,103,165,
1254 163,68,174,136,106,220,67,15,60,219,155,173,249,187,209,102,220,132,126,
1255 241,60,234,6,224,172,227,249,128,121,102,8,199,240,177,116,148,200,189,
1256 204,177,244,178,105,94,143,199,4,45,73,242,170,1,56,123,39,160,59,139,120,
1257 192,220,73,93,190,145,142,18,169,45,212,34,99,251,49,134,46,108,143,236,
1258 153,48,85,1,121,117,10,240,58,142,221,9,168,197,54,198,155,123,233,203,
1259 147,210,81,34,247,28,167,209,215,222,202,7,28,42,29,69,149,173,136,160,
1260 102,66,21,201,122,0,223,13,230,249,203,128,86,145,13,184,23,205,249,132,
1261 121,102,8,167,184,59,49,9,197,87,52,224,38,59,128,135,185,76,58,138,218,
1262 187,229,54,147,10,253,157,234,168,231,125,207,69,60,94,153,218,177,132,
1263 87,76,183,196,21,255,19,156,199,177,246,49,45,254,120,136,164,86,18,213,
1264 0,170,81,204,93,230,126,22,152,193,236,159,159,111,40,151,233,83,14,228,
1265 42,123,15,87,217,123,248,140,198,210,113,84,249,68,82,43,81,159,143,47,
1266 5,182,2,181,34,30,151,166,172,225,81,115,43,231,242,74,212,67,139,154,194,
1267 229,220,108,251,243,149,110,208,20,39,91,9,106,37,116,145,206,0,108,38,
1268 181,5,88,30,229,152,0,231,242,10,175,154,174,137,42,254,15,56,148,182,118,
1269 18,125,236,112,45,254,248,89,94,82,43,161,147,184,247,19,217,105,128,193,
1270 50,132,105,252,213,92,67,83,214,68,53,172,168,237,20,240,59,186,115,130,
1271 125,148,191,145,146,142,163,42,39,178,26,145,184,37,247,28,112,91,216,131,
1272 236,207,6,166,155,145,180,99,73,216,67,57,227,53,126,76,111,59,130,151,
1273 57,86,58,138,170,154,188,110,0,43,128,77,64,104,75,29,159,194,219,204,51,
1274 67,104,206,39,97,13,225,148,111,168,137,103,251,240,59,186,83,68,53,233,
1275 56,170,106,54,17,212,72,36,34,63,5,40,121,187,233,133,176,142,255,27,158,
1276 96,169,233,149,152,226,127,158,147,105,105,103,115,39,61,181,248,243,195,
1277 11,97,191,1,88,154,212,83,121,11,32,183,123,69,213,229,27,30,48,119,210,
1278 157,69,185,60,172,179,214,83,143,33,246,6,30,228,74,221,104,51,191,44,136,
1279 114,48,169,7,192,231,0,219,114,117,176,99,248,152,23,205,175,19,83,252,
1280 127,228,28,142,179,143,241,128,238,178,155,111,182,17,212,70,100,68,26,
1281 128,205,164,214,2,79,229,226,88,29,120,22,223,244,224,39,249,179,240,240,
1282 30,125,65,35,58,218,59,185,204,142,230,191,52,145,142,163,114,239,169,146,
1283 218,136,140,228,43,96,51,170,242,205,53,40,98,188,185,151,57,102,24,245,
1284 217,156,171,76,206,154,198,165,28,107,31,99,46,231,75,71,81,225,169,82,
1285 77,84,134,228,155,121,79,1,107,161,226,43,77,30,198,231,60,102,134,114,
1286 6,255,204,125,42,7,125,202,129,236,207,6,166,26,79,58,74,149,173,176,199,
1287 243,32,87,178,150,134,210,81,92,147,179,89,113,69,68,250,54,224,247,6,247,
1288 252,137,192,53,21,249,158,11,89,198,44,147,166,49,95,135,148,74,229,90,
1289 49,5,44,224,28,70,219,110,252,131,150,210,113,92,53,201,102,82,215,70,61,
1290 168,244,187,249,211,41,103,3,40,160,152,145,102,50,35,152,154,216,229,185,
1291 227,102,19,117,248,61,237,24,107,59,235,186,3,251,54,93,98,80,209,25,0,
1292 128,241,252,119,217,199,98,161,77,88,199,44,147,230,130,232,158,143,80,
1293 85,240,95,154,112,191,237,192,131,92,201,58,157,234,151,199,123,54,147,
1294 250,177,196,192,210,51,0,128,153,236,229,209,224,214,188,193,92,51,148,
1295 31,240,101,132,145,84,101,188,202,49,20,218,174,204,225,2,190,117,226,163,
1296 21,27,51,165,6,118,225,255,210,12,96,36,101,220,145,24,200,35,220,109,238,
1297 75,228,242,220,113,97,49,44,226,44,70,219,174,250,242,81,229,20,35,112,
1298 245,127,7,241,83,0,0,227,249,179,129,78,59,254,190,33,155,152,106,60,174,
1299 114,99,1,33,85,134,45,212,98,58,151,48,214,118,230,109,126,36,29,39,206,
1300 30,181,153,84,103,169,193,93,152,1,0,220,1,116,4,204,137,188,199,60,51,
1301 132,163,89,45,157,73,149,225,115,26,49,193,254,138,73,180,231,127,236,47,
1302 29,39,238,44,193,103,95,140,19,51,0,0,227,249,243,123,178,240,178,137,230,
1303 46,234,176,85,58,142,218,205,191,56,130,66,219,149,89,92,164,27,135,228,
1304 206,2,155,73,93,46,25,192,141,25,64,214,212,254,216,52,53,63,228,51,233,
1305 36,106,55,127,161,21,133,182,11,207,16,250,2,181,73,52,74,58,128,252,12,
1306 32,107,142,4,230,1,39,201,6,81,59,108,165,38,143,112,33,99,108,23,86,114,
1307 148,116,156,124,245,23,155,73,229,244,141,216,202,144,157,1,100,205,229,
1308 192,31,128,253,68,115,40,0,214,176,31,147,104,207,4,251,43,93,61,56,124,
1309 183,75,7,0,169,6,144,53,213,129,59,129,155,68,198,87,187,120,151,31,50,
1310 198,118,97,26,151,178,37,250,5,155,147,104,137,205,164,156,88,171,46,250,
1311 6,144,53,205,8,222,121,110,19,249,216,106,23,139,57,149,66,219,149,133,
1312 180,209,117,5,162,229,196,79,127,136,250,26,64,214,180,5,102,3,7,69,55,
1313 168,42,237,91,170,51,151,243,41,180,93,121,133,22,210,113,146,232,69,155,
1314 73,157,33,29,98,135,232,102,0,89,115,10,112,45,176,108,95,95,250,57,141,
1315 14,88,206,9,231,132,29,169,45,47,209,32,1,107,9,64,176,39,224,67,92,193,
1316 120,219,73,23,19,145,99,129,1,210,33,74,147,191,11,176,7,198,243,39,3,189,
1317 195,56,118,1,197,140,53,133,220,16,237,234,75,34,62,228,7,140,179,157,152,
1318 202,47,217,72,93,233,56,73,55,197,102,82,125,164,67,148,230,198,115,0,101,
1319 27,10,92,1,185,189,28,93,135,173,60,98,70,112,57,139,115,121,88,231,44,
1320 229,68,70,219,110,204,231,92,138,69,23,126,82,37,214,16,124,166,157,226,
1321 236,12,0,192,120,126,111,96,114,174,142,119,32,95,241,39,51,136,86,172,
1322 204,213,33,157,178,157,2,158,160,45,163,109,87,86,112,188,116,28,181,171,
1323 62,54,147,154,34,29,98,119,46,207,0,0,30,6,122,1,173,170,122,160,163,88,
1324 205,211,102,0,71,229,225,59,6,27,168,203,20,46,103,188,237,196,71,28,34,
1325 29,71,125,223,114,130,207,178,115,156,158,1,0,24,207,63,9,240,161,242,187,
1326 94,180,98,37,127,50,131,56,144,175,114,23,204,1,255,166,41,227,109,71,166,
1327 112,57,95,83,95,58,142,42,219,118,32,101,51,169,215,164,131,148,197,249,
1328 6,0,96,60,127,28,208,191,50,223,123,5,139,153,101,70,228,213,11,70,47,113,
1329 28,133,182,43,243,248,153,238,6,228,190,241,54,147,114,234,202,127,105,
1330 174,159,2,236,144,6,58,0,77,43,242,77,253,121,148,49,102,76,94,172,33,88,
1331 76,1,127,228,28,10,109,23,150,112,178,116,28,85,62,159,17,124,118,157,21,
1332 139,25,0,128,241,252,43,129,199,203,245,181,88,238,53,227,24,196,172,144,
1333 83,133,111,51,181,191,91,88,243,125,14,147,142,163,42,230,42,155,73,61,
1334 33,29,98,111,98,211,0,0,140,231,223,15,92,183,183,175,169,205,54,102,152,
1335 12,237,249,107,68,169,194,241,73,169,133,53,117,13,253,88,154,96,51,169,
1336 235,165,67,236,75,92,78,1,118,24,12,180,134,178,231,192,141,249,154,5,102,
1337 48,103,241,122,180,169,114,232,117,142,166,208,118,229,81,126,206,54,106,
1338 72,199,81,149,243,42,193,103,213,121,177,154,1,0,24,207,63,10,120,25,118,
1339 253,177,120,4,255,229,105,211,159,31,243,111,153,96,85,96,49,60,77,107,
1340 10,109,87,254,202,105,210,113,84,213,172,7,78,181,153,212,251,210,65,202,
1341 35,118,13,0,192,120,126,71,224,209,29,127,127,26,111,178,208,12,228,32,
1342 34,221,87,177,202,190,161,38,51,184,152,49,182,11,111,209,92,58,142,202,
1343 141,78,54,147,138,205,51,230,177,108,0,0,198,243,39,1,253,218,177,132,71,
1344 205,173,212,229,27,233,72,229,246,5,141,152,104,219,51,145,246,124,201,
1345 1,210,113,84,238,60,96,51,169,10,109,117,39,45,110,215,0,74,27,120,11,211,
1346 47,189,195,76,56,180,90,76,110,243,189,73,115,198,216,46,204,228,98,190,
1347 209,133,53,243,205,235,192,64,233,16,21,21,207,6,144,53,198,26,110,131,
1348 120,108,56,247,44,167,51,218,118,227,25,90,233,194,27,249,105,35,208,193,
1349 102,82,241,153,134,150,136,95,3,200,154,90,4,235,8,118,218,199,87,138,218,
1350 70,13,102,115,33,133,182,11,111,236,125,235,67,21,111,197,64,79,155,73,
1351 189,43,29,164,50,226,213,0,178,230,0,96,62,16,250,98,33,149,181,150,134,
1352 223,45,172,249,41,7,74,199,81,225,235,111,51,169,114,61,160,230,162,248,
1353 52,128,172,57,28,120,26,56,86,58,74,89,222,227,176,239,22,214,220,76,109,
1354 233,56,42,26,183,219,76,106,130,116,136,170,136,199,93,128,96,57,177,167,
1355 168,224,187,0,81,120,158,147,25,109,187,177,144,54,186,240,70,178,76,182,
1356 153,84,95,233,16,85,229,254,12,32,107,126,1,204,5,119,222,119,45,162,26,
1357 115,185,128,66,219,133,151,221,156,144,168,112,205,7,98,117,187,111,79,
1358 220,158,1,100,77,31,96,34,142,52,170,175,169,207,67,92,193,125,182,35,171,
1359 57,88,58,142,146,177,4,248,121,28,175,248,151,197,221,6,144,53,183,3,195,
1360 165,99,0,172,162,25,227,108,103,30,214,133,53,147,110,37,112,142,205,164,
1361 242,102,101,25,39,126,178,238,34,107,106,0,83,129,110,210,81,150,113,2,
1362 133,182,43,79,114,30,219,245,252,62,233,86,1,23,229,83,241,131,107,13,32,
1363 107,246,3,158,0,218,74,69,216,78,1,79,114,30,133,182,43,203,56,65,42,134,
1364 114,203,74,130,226,255,68,58,72,174,185,211,0,178,230,48,96,17,200,44,103,
1365 187,145,186,60,204,47,25,103,59,179,138,102,18,17,148,155,150,0,191,204,
1366 183,159,252,59,184,209,0,178,166,37,65,241,71,94,121,171,57,152,251,108,
1367 71,30,226,10,93,88,83,237,110,62,208,57,95,46,248,149,69,190,1,100,205,
1368 207,129,121,64,131,40,135,125,153,99,41,180,93,152,203,5,186,176,166,42,
1369 203,100,224,26,155,73,109,151,14,18,38,217,6,144,53,87,3,15,69,152,163,
1370 120,37,71,189,123,189,189,165,197,243,186,176,166,218,179,219,109,38,229,
1371 244,98,158,185,34,119,105,59,107,70,18,92,237,143,162,248,55,3,147,128,
1372 22,39,164,223,59,246,121,78,238,67,176,94,187,82,165,21,3,215,39,165,248,
1373 65,226,57,128,172,169,78,240,83,255,234,8,70,251,20,152,0,76,34,109,119,
1374 89,46,200,120,126,59,96,6,176,95,4,57,148,251,54,18,188,213,23,219,23,123,
1375 42,35,218,6,144,53,13,8,206,247,127,30,242,72,111,0,133,192,108,210,118,
1376 219,158,190,200,120,254,145,192,28,224,212,144,243,40,183,189,78,240,62,
1377 127,44,95,233,173,138,232,26,64,214,52,35,184,210,223,50,164,17,44,240,
1378 12,48,154,180,125,182,188,223,100,60,191,22,48,154,125,44,55,174,242,214,
1379 3,192,192,124,190,210,191,55,209,52,128,172,57,158,160,248,195,216,217,
1380 226,27,96,38,48,134,180,125,179,178,7,49,158,223,30,152,130,158,18,36,197,
1381 122,160,111,156,22,240,12,67,248,13,32,107,218,18,60,221,151,235,194,250,
1382 146,224,69,161,137,164,237,23,185,56,160,158,18,36,198,171,4,83,254,88,
1383 44,221,29,166,112,27,64,214,116,35,184,210,159,203,29,46,222,2,198,0,51,
1384 72,219,156,79,219,244,148,32,239,77,0,6,219,76,42,127,118,139,173,130,240,
1385 26,64,214,12,7,110,207,225,17,255,74,112,97,239,105,210,225,159,183,148,
1386 236,69,56,1,7,23,33,81,149,242,25,112,157,235,123,245,69,45,247,13,32,184,
1387 205,55,17,232,147,131,163,109,35,216,0,164,144,180,141,124,191,47,227,249,
1388 13,1,15,184,30,244,113,193,152,218,78,208,200,211,54,147,90,47,29,198,53,
1389 185,109,0,89,83,159,96,245,158,95,84,241,72,107,129,7,129,251,73,91,241,
1390 55,176,140,231,183,36,104,106,173,165,179,168,10,89,78,240,56,239,107,210,
1391 65,92,149,187,6,144,53,77,9,214,237,59,165,10,71,121,31,24,11,252,158,180,
1392 221,156,147,92,57,98,60,223,0,61,129,187,129,38,178,105,212,62,172,1,134,
1393 2,15,219,76,202,209,21,111,220,144,155,6,144,53,199,18,172,216,123,120,
1394 37,143,176,132,224,252,254,143,164,173,211,219,252,24,207,63,0,184,3,232,
1395 139,228,163,212,170,44,22,120,24,24,106,51,169,53,210,97,226,160,234,13,
1396 32,107,206,33,120,109,178,162,155,220,21,17,60,21,88,72,218,190,84,181,
1397 16,209,51,158,159,2,198,161,167,5,174,120,17,24,96,51,169,229,210,65,226,
1398 164,106,13,32,107,58,17,236,210,83,171,2,223,181,158,224,85,203,241,164,
1399 109,252,246,242,222,141,241,252,159,1,35,128,159,10,71,73,170,37,4,111,
1400 239,253,69,58,72,28,85,190,1,100,205,45,192,93,80,238,205,238,62,2,198,
1401 3,83,72,219,13,149,27,212,93,198,243,207,34,104,4,23,73,103,73,136,191,
1402 16,20,254,18,233,32,113,86,241,6,144,53,213,128,251,40,255,186,232,43,8,
1403 30,172,121,130,180,205,251,87,112,141,231,159,74,208,8,46,163,252,205,81,
1404 149,143,5,254,8,140,178,153,84,236,78,27,93,84,177,6,144,53,117,9,238,203,
1405 183,219,199,87,22,19,92,23,24,77,218,46,173,116,186,24,51,158,127,60,193,
1406 178,230,29,208,139,133,85,85,76,112,123,249,14,155,73,173,148,14,147,79,
1407 202,223,0,178,230,32,96,33,112,218,94,190,106,35,193,163,191,227,72,219,
1408 15,171,156,46,15,24,207,111,14,116,39,88,230,92,183,9,174,152,247,8,94,
1409 244,154,97,51,169,85,210,97,242,81,249,26,64,214,252,152,224,54,223,17,
1410 123,248,138,255,18,156,223,63,68,218,230,229,234,169,185,96,60,191,21,208,
1411 3,232,8,52,18,142,227,170,181,4,47,100,77,215,43,250,225,219,119,3,200,
1412 154,179,128,5,64,227,50,254,237,43,4,247,239,231,146,182,223,230,60,93,
1413 158,50,158,95,19,184,132,96,102,112,9,80,83,54,145,184,109,4,15,145,205,
1414 0,158,178,153,212,30,23,113,81,185,181,247,6,144,53,237,9,254,167,148,222,
1415 239,218,18,156,10,20,146,182,139,195,12,151,4,198,243,27,17,204,8,43,148,
1416 13,189,0,0,1,155,73,68,65,84,46,3,218,0,245,100,19,69,102,19,240,2,193,
1417 15,151,57,54,147,90,187,143,175,87,33,216,115,3,200,154,65,192,189,236,
1418 188,146,189,5,152,70,176,240,70,226,150,78,138,130,241,252,26,192,25,192,
1419 121,4,187,35,157,73,197,158,177,112,217,86,130,103,243,159,43,249,181,194,
1420 102,82,58,107,20,246,253,6,144,53,5,4,239,219,247,47,249,39,159,177,115,
1421 97,77,125,188,50,66,198,243,107,19,60,105,184,163,33,156,142,244,82,238,
1422 229,87,4,248,236,44,248,165,54,147,218,34,27,73,237,110,215,6,144,53,117,
1423 128,89,192,21,192,63,9,206,239,31,33,109,117,241,4,7,24,207,175,79,176,
1424 166,98,11,224,152,82,191,31,129,92,99,40,34,216,56,243,109,224,157,146,
1425 95,111,3,175,219,76,42,239,30,248,202,55,59,27,64,214,28,72,240,144,197,
1426 122,130,243,123,125,180,50,38,74,78,29,142,228,251,77,161,33,193,142,75,
1427 59,126,85,116,111,243,205,192,134,82,191,214,3,31,178,107,161,127,160,83,
1428 249,248,10,26,64,214,28,74,112,159,250,79,164,237,191,164,67,169,112,24,
1429 207,47,0,234,179,179,33,236,248,107,8,10,124,35,59,139,125,163,205,164,
1430 156,126,51,83,85,221,142,6,80,157,180,45,146,14,163,148,138,86,244,59,3,
1431 41,165,156,161,207,168,43,149,96,218,0,148,74,48,109,0,74,37,152,54,0,165,
1432 18,76,27,128,82,9,166,13,64,169,4,211,6,160,84,130,105,3,80,42,193,180,
1433 1,40,149,96,218,0,148,74,48,109,0,74,37,152,54,0,165,18,76,27,128,82,9,
1434 166,13,64,169,4,211,6,160,84,130,105,3,80,42,193,180,1,40,149,96,218,0,
1435 148,74,48,109,0,74,37,152,54,0,165,18,76,27,128,82,9,246,255,1,12,204,192,
1436 135,186,54,132,175,0,0,0,0,73,69,78,68,174,66,96,130};
1437 
1438 static size_t xml_res_size_16 = 1184;
1439 static unsigned char xml_res_file_16[] = {
1440 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1441 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1442 72,89,115,0,0,3,184,0,0,3,184,1,3,78,7,200,0,0,0,25,116,69,88,116,83,111,
1443 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
1444 111,114,103,155,238,60,26,0,0,4,29,73,68,65,84,88,133,197,151,127,76,149,
1445 85,24,199,63,207,27,23,74,26,37,4,225,28,165,137,213,202,173,150,130,214,
1446 102,163,214,82,51,109,68,179,132,10,162,69,115,196,248,195,40,127,112,163,
1447 43,228,194,128,88,184,165,210,15,230,106,21,110,212,200,25,106,163,198,
1448 156,86,64,148,148,179,127,202,70,32,96,63,48,7,194,189,248,62,253,65,55,
1449 238,123,121,223,123,47,186,198,179,221,237,190,207,121,206,247,243,156,
1450 231,188,231,188,231,136,170,50,147,102,204,40,29,136,186,84,1,241,96,104,
1451 25,102,128,71,168,224,70,46,32,17,208,135,101,58,83,32,158,111,83,17,51,
1452 19,88,13,204,3,146,153,24,196,32,208,23,199,112,219,73,121,228,182,57,252,
1453 126,111,4,114,237,152,100,71,148,128,84,118,94,197,40,181,136,230,57,197,
1454 36,242,23,205,108,100,153,116,135,147,51,81,94,35,25,55,5,234,11,59,5,178,
1455 173,99,21,72,61,162,115,157,98,110,230,20,7,164,152,249,244,133,147,235,
1456 67,120,2,183,182,250,29,142,9,136,167,115,22,104,29,66,62,56,87,233,30,
1457 58,104,146,23,184,154,115,225,224,205,68,145,207,102,253,35,208,25,98,21,
1458 104,229,4,220,217,114,217,207,65,41,10,9,63,79,12,47,82,212,35,230,23,89,
1459 193,112,199,4,196,211,145,129,80,232,36,42,40,229,178,139,6,241,224,98,
1460 220,17,222,77,42,105,186,151,29,250,100,10,70,236,22,91,173,224,151,80,
1461 170,142,199,50,226,237,6,230,219,117,136,193,203,59,82,78,54,45,142,96,
1462 128,157,172,163,68,139,25,37,218,239,242,33,102,154,186,211,191,15,140,
1463 155,90,129,17,111,165,19,60,129,179,124,78,97,72,248,25,102,179,134,26,
1464 138,180,36,16,14,224,66,141,6,217,211,233,10,116,90,42,32,158,99,241,136,
1465 107,0,155,151,115,33,61,28,144,98,82,233,113,132,247,112,45,197,250,60,
1466 167,37,97,74,219,47,58,151,1,226,65,121,72,203,150,52,251,253,86,144,17,
1467 181,22,157,10,95,78,23,31,75,9,9,156,117,132,3,164,48,64,147,148,88,124,
1468 99,68,83,161,249,84,146,251,239,40,245,97,192,33,1,149,251,131,69,93,140,
1469 179,128,94,74,117,131,197,127,159,124,67,22,173,193,225,22,59,162,183,243,
1470 12,91,57,201,188,0,175,149,17,60,218,148,96,17,31,81,52,240,224,100,119,
1471 148,82,121,155,76,190,116,4,159,99,22,155,180,136,55,201,66,167,126,18,
1472 146,101,79,167,75,11,22,251,236,18,72,118,84,101,226,37,124,15,55,43,57,
1473 230,24,179,95,151,179,129,77,252,70,146,83,136,112,198,155,4,244,218,37,
1474 224,104,75,249,129,70,217,204,117,244,219,182,15,18,79,177,110,228,67,166,
1475 204,98,72,11,94,134,182,234,207,209,72,155,20,56,194,247,178,154,91,180,
1476 49,82,184,146,24,61,232,127,8,174,128,101,141,93,201,8,111,73,5,143,114,
1477 216,86,233,20,115,120,150,45,28,210,101,145,128,253,214,239,159,127,8,174,
1478 128,232,33,255,223,91,249,153,118,201,181,133,155,24,212,178,158,69,250,
1479 209,116,225,192,36,3,130,43,96,142,55,35,174,241,28,90,162,118,203,118,
1480 98,57,111,43,209,197,77,92,161,99,84,83,251,159,175,159,4,234,201,164,151,
1481 196,48,124,105,10,124,180,126,11,234,36,230,179,161,187,58,86,113,116,81,
1482 68,131,1,126,228,6,106,52,135,247,89,201,152,117,235,181,179,239,72,150,
1483 244,192,41,176,86,96,136,212,116,57,81,245,148,190,180,99,84,99,146,214,
1484 74,27,235,57,104,171,116,152,165,212,144,67,139,222,25,105,174,62,196,204,
1485 211,130,116,95,160,211,246,72,38,158,142,140,66,99,95,235,27,84,137,17,
1486 112,222,244,226,226,3,86,80,163,217,28,103,97,164,96,63,169,76,221,105,
1487 219,130,221,54,251,128,136,10,15,192,228,22,246,39,113,236,34,139,157,186,
1488 142,211,92,51,61,240,132,117,97,14,111,183,107,176,38,80,39,49,12,209,128,
1489 240,24,192,0,9,127,151,243,116,220,187,186,134,17,46,191,24,48,192,81,12,
1490 243,113,45,205,176,61,185,76,78,193,171,50,27,47,159,32,220,141,114,4,131,
1491 106,46,208,44,210,190,2,164,30,156,15,165,14,54,10,82,138,46,126,221,122,
1492 111,176,75,224,21,185,30,147,79,17,78,160,84,227,214,118,75,80,4,199,114,
1493 171,233,87,24,146,167,165,75,126,10,23,41,90,206,2,148,76,12,246,177,85,
1494 127,13,25,28,230,98,2,180,162,70,19,101,119,124,173,161,142,210,150,92,
1495 27,185,76,85,185,216,31,47,171,113,41,253,167,117,53,251,63,108,198,111,
1496 199,255,0,65,159,207,163,152,64,70,71,0,0,0,0,73,69,78,68,174,66,96,130};
1497 
1498 static size_t xml_res_size_17 = 2289;
1499 static unsigned char xml_res_file_17[] = {
1500 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,64,0,0,0,64,8,6,0,0,
1501 0,170,105,113,222,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1502 72,89,115,0,0,7,113,0,0,7,113,1,220,215,168,124,0,0,0,25,116,69,88,116,
1503 83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,
1504 101,46,111,114,103,155,238,60,26,0,0,8,110,73,68,65,84,120,156,237,155,
1505 107,112,85,213,21,128,191,117,115,243,144,132,71,176,76,32,8,82,7,173,80,
1506 80,30,137,72,43,51,22,181,128,32,216,34,157,129,96,69,6,4,6,121,8,33,64,
1507 32,185,220,148,240,208,18,148,135,1,4,170,128,4,10,177,72,35,181,101,202,
1508 67,104,25,26,34,237,48,60,44,148,210,210,6,4,66,0,109,200,243,174,254,128,
1509 84,72,238,57,247,156,115,15,102,58,248,205,228,71,238,94,107,237,181,214,
1510 89,103,159,125,246,222,71,84,149,187,25,79,67,59,208,208,124,147,128,134,
1511 118,160,161,185,235,19,224,109,200,206,5,4,255,158,104,245,61,89,110,42,
1512 232,23,47,66,63,60,68,184,236,194,81,249,58,158,2,50,255,112,11,170,171,
1513 251,163,146,4,146,8,154,8,36,2,45,129,72,224,10,72,49,162,197,4,40,6,57,
1514 131,167,230,99,2,143,29,212,24,105,76,37,91,128,103,92,116,73,129,69,36,
1515 144,126,199,18,32,115,15,125,7,101,16,202,64,160,39,14,110,183,7,248,87,
1516 201,94,25,235,185,143,207,227,93,116,237,28,202,75,100,234,78,0,215,19,
1517 32,254,67,157,16,22,0,253,195,177,147,204,49,182,203,20,90,82,226,146,103,
1518 0,20,224,101,36,51,245,98,237,15,174,141,1,146,125,160,53,213,145,89,8,
1519 35,8,115,112,253,17,123,216,32,25,52,194,124,104,176,65,57,48,141,12,93,
1520 86,183,193,149,10,144,172,67,211,0,63,112,79,184,182,166,240,62,111,200,
1521 18,60,4,194,246,235,38,71,129,161,100,232,145,96,141,97,85,128,248,247,
1522 196,64,236,26,68,134,133,99,7,32,130,0,75,121,131,113,178,53,92,83,183,
1523 242,54,113,164,242,154,94,55,18,112,92,1,226,63,156,136,212,108,3,146,157,
1524 122,87,75,99,202,216,44,51,233,199,31,195,53,85,75,9,194,72,102,235,246,
1525 80,130,142,42,224,230,64,247,59,160,149,19,253,91,185,143,11,20,200,100,
1526 30,229,100,184,166,106,217,69,128,23,241,105,177,21,97,219,131,149,204,
1527 63,220,2,161,0,23,130,239,202,103,28,148,17,174,4,95,133,151,77,252,112,
1528 7,1,158,177,26,60,216,76,128,172,42,138,164,170,58,31,184,223,182,135,117,
1529 24,32,251,216,39,163,73,228,98,104,225,16,156,162,13,223,215,53,12,213,
1530 236,190,66,97,95,59,186,246,42,224,60,203,65,122,217,210,9,194,4,217,204,
1531 54,82,137,197,112,108,178,204,123,12,160,171,110,160,144,142,0,30,132,60,
1532 153,251,105,7,171,250,150,7,65,201,42,124,25,100,173,67,63,1,240,16,96,
1533 177,44,102,34,155,194,49,3,192,85,226,24,167,51,200,163,79,144,86,57,73,
1534 124,211,206,58,161,125,69,104,159,44,32,254,99,113,32,243,109,123,121,11,
1535 177,92,103,155,164,186,18,252,1,58,211,69,55,26,4,15,160,15,114,165,116,
1536 130,21,91,214,110,1,41,75,5,18,44,250,87,143,86,92,226,19,121,133,231,216,
1537 231,212,4,0,1,60,252,76,71,209,75,87,115,38,212,24,172,146,46,11,142,132,
1538 124,135,8,153,0,241,23,182,4,82,45,123,89,135,71,56,201,65,25,65,55,78,
1539 56,53,1,192,89,18,248,1,43,200,100,12,53,214,174,91,60,149,229,179,66,9,
1540 89,176,36,62,32,214,74,143,117,233,43,7,216,47,163,104,195,231,78,212,255,
1541 199,86,125,138,71,117,35,159,104,87,155,154,242,170,248,139,218,154,73,
1542 152,38,64,150,158,138,70,24,110,179,87,0,198,146,79,1,147,105,76,153,19,
1543 117,0,202,136,97,180,206,98,8,11,40,165,137,19,19,209,136,190,104,38,96,
1544 62,19,44,189,210,27,136,179,211,163,135,0,175,179,148,169,178,193,142,90,
1545 61,20,97,29,253,137,227,58,147,201,179,172,119,137,102,108,164,15,129,175,
1546 174,237,64,32,219,72,222,244,49,40,254,67,185,8,99,173,118,126,15,21,108,
1547 32,131,31,203,110,171,42,174,146,71,31,38,233,84,46,114,219,216,167,120,
1548 165,181,166,119,63,23,76,199,176,2,4,4,97,160,213,206,19,184,204,118,166,
1549 240,152,28,181,238,177,75,156,37,129,113,58,131,143,120,34,88,179,80,163,
1550 207,1,171,130,53,26,223,2,254,162,174,8,137,86,28,104,206,53,86,202,60,
1551 162,169,228,47,60,24,82,62,150,114,218,115,214,138,105,83,20,33,151,193,
1552 204,208,9,124,65,35,51,193,1,216,78,128,4,58,128,88,114,228,50,77,120,94,
1553 127,110,73,182,19,127,35,95,210,44,201,154,113,130,118,140,102,22,251,181,
1554 139,21,113,195,169,177,201,83,64,44,93,125,59,252,148,143,56,40,35,120,
1555 136,127,58,182,81,133,151,108,29,73,23,125,223,106,240,128,113,37,27,39,
1556 64,173,149,191,21,98,168,100,149,100,243,158,204,9,107,157,239,144,118,
1557 32,73,215,49,155,113,84,16,101,71,181,145,44,44,106,26,172,193,228,49,40,
1558 137,55,150,207,195,227,1,254,205,86,153,78,87,62,115,108,163,140,24,50,
1559 25,195,155,12,179,58,11,172,79,149,36,2,87,235,254,108,108,77,52,236,10,
1560 24,196,94,62,149,225,97,5,255,123,146,233,172,155,88,164,195,157,7,15,16,
1561 168,9,26,207,29,217,26,243,82,195,60,150,51,77,214,59,182,81,74,19,82,117,
1562 18,107,173,63,137,29,97,156,0,149,98,196,254,45,144,200,69,54,201,44,122,
1563 113,216,177,83,249,244,230,85,77,227,60,247,58,182,81,15,79,68,208,101,
1564 50,147,10,176,190,174,86,75,111,41,100,35,179,73,224,178,93,85,0,206,241,
1565 45,198,235,116,126,197,147,142,244,77,137,12,30,143,201,60,0,203,9,16,148,
1566 116,249,5,126,86,18,225,112,67,99,53,207,51,77,39,114,133,198,142,244,67,
1567 80,166,211,187,215,27,0,33,100,5,132,158,8,53,231,26,235,201,228,89,254,
1568 224,200,179,83,180,225,21,77,103,55,73,142,244,45,98,120,49,77,198,0,207,
1569 241,80,99,64,50,199,216,34,51,184,159,160,239,25,166,212,224,33,71,83,240,
1570 49,134,235,68,219,214,183,201,113,163,6,227,231,138,175,251,97,76,50,55,
1571 94,182,176,95,70,57,10,254,207,60,68,15,125,151,52,38,126,29,193,115,115,
1572 31,35,40,134,9,80,80,148,122,91,75,113,148,145,39,179,88,198,235,68,81,
1573 101,203,143,114,162,72,103,60,201,186,142,34,227,233,185,219,40,17,242,
1574 107,163,70,243,121,128,176,29,190,90,15,232,200,223,201,151,52,30,230,140,
1575 109,47,206,208,138,73,164,242,87,109,107,249,77,240,31,180,114,163,66,10,
1576 141,214,2,32,84,2,226,155,237,162,244,202,151,64,92,10,31,179,82,230,57,
1577 222,204,104,199,57,62,100,106,200,113,85,17,10,120,130,69,58,156,19,180,
1578 115,212,87,29,76,55,72,77,231,150,58,161,125,69,28,215,243,114,101,1,27,
1579 36,195,149,157,28,35,202,136,33,87,95,224,97,221,202,64,205,97,47,221,220,
1580 48,91,129,154,79,71,205,43,192,47,237,74,60,145,61,236,222,235,118,56,207,
1581 189,44,227,39,172,208,193,148,16,244,133,45,12,116,153,250,146,76,223,189,
1582 77,86,132,164,57,66,90,148,84,29,47,212,142,17,167,105,253,221,186,34,109,
1583 57,79,79,130,30,188,8,201,17,218,147,163,41,108,164,15,149,68,58,178,17,
1584 130,82,162,98,12,23,67,107,177,180,55,40,254,99,113,72,217,41,110,217,29,
1585 74,146,227,20,48,217,214,180,87,17,126,171,143,147,67,10,59,233,97,89,207,
1586 17,162,211,52,35,57,228,50,149,165,247,75,245,117,252,18,116,102,237,255,
1587 3,100,31,123,24,99,57,248,10,162,88,195,32,58,233,102,250,177,228,206,7,
1588 143,156,164,89,252,82,75,146,118,142,200,72,86,209,170,49,146,63,122,57,
1589 11,45,205,249,47,18,79,46,131,89,174,67,184,64,115,203,253,132,201,53,60,
1590 158,199,117,118,55,195,217,223,173,216,88,15,16,169,18,239,101,47,213,33,
1591 37,143,243,109,22,235,48,214,243,44,229,246,150,174,194,37,128,50,212,106,
1592 240,96,53,1,126,137,34,130,181,94,170,83,204,196,118,105,50,139,36,133,
1593 223,232,247,80,139,43,202,46,51,67,125,73,59,236,40,132,190,5,22,74,83,
1594 42,249,0,232,29,172,185,10,47,121,244,33,71,83,44,237,9,220,65,150,106,
1595 102,210,68,187,74,230,21,144,45,109,80,118,0,157,234,54,5,144,171,43,244,
1596 133,178,108,94,110,85,76,11,187,253,186,73,53,162,147,52,35,249,109,39,
1597 202,198,21,224,151,71,240,176,3,104,93,167,229,20,194,155,196,240,174,252,
1598 103,119,141,91,7,37,29,82,2,50,68,51,187,59,222,140,12,158,128,185,242,
1599 52,74,62,220,182,39,189,15,33,135,26,182,227,211,219,30,1,110,30,149,181,
1600 193,159,80,134,170,47,233,116,56,70,234,39,32,75,94,66,120,135,27,231,248,
1601 171,129,173,64,14,25,90,104,106,200,197,195,210,33,56,13,154,78,102,242,
1602 47,213,133,141,139,219,19,48,87,50,80,178,128,171,40,171,81,150,224,83,
1603 91,251,88,110,29,151,15,194,37,208,185,104,108,174,250,58,86,186,101,244,
1604 70,2,252,226,37,130,21,40,79,1,111,17,205,26,210,244,139,176,12,187,240,
1605 193,4,232,5,84,10,128,15,105,82,181,83,95,235,233,250,235,168,232,28,226,
1606 136,96,42,1,142,209,129,15,24,162,53,174,119,18,206,39,51,62,247,206,205,
1607 7,69,23,210,88,85,105,136,63,84,133,57,187,99,26,170,127,85,117,255,147,
1608 153,255,55,238,250,239,6,191,73,64,67,59,208,208,220,245,9,248,47,129,162,
1609 138,91,51,247,7,138,0,0,0,0,73,69,78,68,174,66,96,130};
1610 
1611 static size_t xml_res_size_18 = 1387;
1612 static unsigned char xml_res_file_18[] = {
1613 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1614 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1615 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
1616 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1617 46,111,114,103,155,238,60,26,0,0,4,232,73,68,65,84,88,133,157,151,93,108,
1618 84,69,20,128,191,217,237,222,187,109,183,116,55,180,208,165,11,180,6,161,
1619 109,68,137,72,90,5,82,160,18,76,32,252,36,62,16,49,38,168,49,106,2,145,
1620 24,35,82,161,187,88,8,241,15,8,250,64,162,79,136,33,18,21,80,49,4,45,148,
1621 96,160,20,98,168,134,22,65,133,208,150,109,5,183,101,75,187,255,227,67,
1622 183,187,221,191,123,47,158,100,30,102,206,153,51,223,189,103,230,156,25,
1623 33,165,196,136,136,125,215,85,124,3,75,128,85,64,53,8,39,72,103,92,123,
1624 27,228,109,160,19,56,138,195,222,34,55,204,8,26,242,171,7,32,118,94,114,
1625 18,150,219,16,172,3,138,12,209,130,31,201,65,44,98,187,220,50,247,246,255,
1626 2,16,158,211,86,132,237,93,96,19,80,144,205,198,97,53,227,11,68,181,252,
1627 15,3,187,145,67,205,178,105,81,192,48,128,240,180,151,33,196,17,160,86,
1628 203,251,129,53,149,28,187,58,192,225,43,62,45,51,128,54,164,92,45,155,230,
1629 121,211,21,166,140,197,183,158,125,12,33,218,245,22,175,115,21,178,110,
1630 246,68,62,88,58,21,107,94,134,155,116,169,69,136,118,241,222,165,217,154,
1631 0,194,221,90,70,44,242,61,145,144,75,203,155,0,246,44,155,134,0,166,23,
1632 43,188,245,212,100,61,0,0,23,82,30,23,158,246,178,172,0,194,115,69,33,36,
1633 191,69,226,34,18,130,72,40,167,167,231,31,157,72,109,121,97,162,191,121,
1634 190,19,215,4,197,24,132,16,71,132,231,180,53,3,128,96,127,35,80,151,232,
1635 231,128,40,180,152,216,213,144,250,131,10,44,38,118,53,148,27,1,0,168,141,
1636 111,238,36,128,104,60,225,68,240,102,134,105,22,136,45,11,157,76,41,178,
1637 100,152,62,55,123,34,117,174,194,140,241,28,178,73,236,188,228,76,0,32,
1638 21,15,146,236,179,199,65,56,172,102,26,42,39,208,121,39,245,68,141,68,98,
1639 116,244,13,179,126,78,137,81,128,2,194,114,27,128,96,255,69,11,55,253,119,
1640 145,58,73,38,79,25,109,64,133,93,229,239,141,201,13,125,185,111,152,57,
1641 251,175,24,93,124,76,252,56,236,165,38,110,12,45,209,91,220,44,68,206,61,
1642 161,57,71,91,138,240,13,44,49,33,99,43,115,89,168,102,193,27,117,147,249,
1643 120,89,124,211,61,0,196,249,151,170,88,49,179,88,207,108,149,9,147,168,
1644 206,166,89,57,203,78,219,203,213,184,235,167,80,164,154,147,138,72,8,25,
1645 214,175,51,85,37,249,124,183,246,97,78,172,155,73,77,105,126,46,179,106,
1646 193,59,167,186,128,89,99,35,53,165,249,188,255,180,139,5,211,108,9,171,
1647 152,132,112,44,153,178,5,80,84,96,197,106,29,61,206,18,8,69,83,83,186,98,
1648 22,140,5,33,18,147,124,218,222,143,187,181,151,129,148,218,33,174,9,182,
1649 156,242,35,177,57,242,243,104,92,88,198,250,57,37,70,226,7,128,170,170,
1650 9,8,35,114,103,56,66,99,75,15,159,253,250,15,241,239,25,74,73,197,6,175,
1651 6,9,9,6,131,4,2,89,139,92,86,145,241,54,94,50,66,80,93,154,207,174,134,
1652 114,234,167,39,15,70,182,16,40,230,228,95,82,84,21,147,69,77,113,60,62,
1653 4,225,152,228,147,11,253,120,90,123,25,12,102,134,160,5,201,226,116,218,
1654 229,51,139,105,94,92,78,165,93,229,155,46,31,47,30,189,145,208,77,43,86,
1655 233,120,181,38,209,255,189,127,132,5,7,254,74,228,9,0,255,230,199,177,41,
1656 38,126,188,62,200,166,19,183,184,122,55,235,159,58,147,71,76,118,34,68,
1657 6,192,15,127,12,114,242,207,123,188,246,196,36,42,29,6,10,205,216,241,140,
1658 67,116,222,25,193,221,218,203,241,107,131,90,179,58,243,16,166,99,32,95,
1659 207,166,13,69,37,123,219,250,12,111,202,241,16,79,126,222,69,84,127,83,
1660 29,53,81,97,107,65,224,215,178,50,224,40,21,34,18,50,50,199,143,195,222,
1661 98,146,175,204,13,35,229,33,35,190,237,86,51,63,189,48,139,175,158,125,
1662 136,80,84,38,90,133,93,225,236,250,42,246,60,51,53,5,66,83,36,7,229,134,
1663 25,193,209,99,168,152,182,33,184,175,7,48,16,136,114,246,166,159,170,18,
1664 43,138,89,36,154,77,49,243,200,164,124,190,252,237,223,164,177,54,196,48,
1665 22,177,29,226,229,88,186,235,189,72,62,210,3,0,248,240,92,31,253,195,225,
1666 140,241,175,187,124,92,232,73,251,134,220,16,187,199,174,235,201,68,164,
1667 78,218,1,156,215,3,24,10,69,105,62,147,122,213,15,68,98,52,157,238,205,
1668 62,33,19,162,13,57,212,60,214,73,0,200,166,154,16,138,88,131,160,91,15,
1669 226,139,142,187,92,246,142,36,250,123,47,244,211,61,168,17,243,36,68,247,
1670 232,245,60,249,70,72,77,197,238,122,47,176,2,65,143,22,64,76,194,219,63,
1671 223,2,160,251,94,136,221,231,250,244,152,33,26,234,33,22,93,158,254,54,
1672 200,184,208,203,29,139,46,35,204,243,128,139,90,254,206,119,223,231,112,
1673 167,143,173,167,122,9,68,98,122,203,95,68,152,231,73,119,109,71,186,66,
1674 251,105,22,196,141,96,35,146,172,5,221,110,53,167,149,215,116,39,140,128,
1675 105,47,74,204,243,64,79,179,84,144,95,166,16,12,123,16,172,69,98,211,52,
1676 78,46,60,132,228,16,170,165,73,54,205,207,177,59,13,2,36,12,247,93,87,241,
1677 246,44,5,185,26,68,21,146,50,132,28,125,229,72,225,69,224,5,217,5,226,8,
1678 101,229,39,141,62,207,255,3,52,228,253,72,11,53,84,78,0,0,0,0,73,69,78,
1679 68,174,66,96,130};
1680 
1681 static size_t xml_res_size_19 = 834;
1682 static unsigned char xml_res_file_19[] = {
1683 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1684 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1685 72,89,115,0,0,4,193,0,0,4,193,1,17,118,177,117,0,0,0,25,116,69,88,116,83,
1686 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1687 46,111,114,103,155,238,60,26,0,0,2,191,73,68,65,84,88,133,189,214,95,72,
1688 20,65,28,192,241,239,236,237,221,94,137,217,147,82,113,15,161,16,249,24,
1689 17,190,154,80,20,24,25,151,4,253,67,210,58,43,130,222,18,41,202,243,37,
1690 162,151,144,34,178,68,138,186,176,212,254,19,189,20,5,62,4,41,81,4,82,25,
1691 21,97,89,87,88,230,221,185,183,211,195,157,94,247,135,107,246,254,244,131,
1692 101,102,118,118,126,243,97,119,102,88,33,165,68,28,123,86,133,176,158,144,
1693 103,148,243,93,180,139,243,253,7,14,7,90,85,199,232,177,66,234,64,69,190,
1694 0,13,139,125,244,249,186,58,164,190,255,200,213,22,181,49,0,145,223,26,
1695 102,36,223,249,1,112,96,209,42,174,53,159,246,55,94,80,7,0,152,17,10,137,
1696 240,113,189,233,172,223,219,171,14,40,48,66,195,162,133,129,29,231,58,54,
1697 93,82,7,20,1,209,44,6,183,118,251,27,174,168,3,10,140,16,72,118,113,99,
1698 75,143,127,67,159,58,160,8,136,38,110,121,123,253,245,3,234,128,2,35,0,
1699 118,114,123,227,197,206,245,55,213,1,69,64,108,151,247,234,47,251,215,221,
1700 153,109,11,41,37,162,253,113,53,50,250,50,235,72,221,21,187,178,132,3,11,
1701 15,159,209,176,208,176,16,16,47,37,26,50,94,198,218,159,156,229,203,38,
1702 218,234,70,117,101,250,236,91,200,130,136,162,241,142,69,106,249,34,66,
1703 3,149,79,144,138,40,224,231,176,15,40,2,194,62,160,192,136,180,53,224,212,
1704 4,1,111,165,210,96,167,203,133,203,112,207,181,79,14,141,243,224,237,100,
1705 126,0,135,38,168,91,90,170,156,192,237,54,48,12,3,128,192,139,160,173,201,
1706 51,2,66,166,197,194,227,195,54,179,252,123,139,42,3,114,138,148,45,186,
1707 71,244,179,92,142,1,240,26,15,93,52,22,25,144,130,104,224,33,107,197,16,
1708 0,143,88,65,151,180,1,16,128,167,204,200,217,33,156,130,121,97,1,102,34,
1709 95,182,72,3,24,186,198,115,95,117,206,0,0,247,96,9,188,143,213,157,142,
1710 4,70,9,96,90,146,158,145,175,121,1,214,4,67,84,154,96,232,16,149,217,159,
1711 205,8,56,120,255,131,242,100,135,68,47,123,73,254,215,152,79,136,80,188,
1712 94,163,143,240,67,212,38,245,183,177,143,51,114,115,102,128,221,112,203,
1713 48,11,196,84,198,190,144,9,110,162,148,233,191,146,238,27,114,102,174,158,
1714 219,81,108,35,66,38,132,237,172,1,93,19,116,214,46,86,158,192,19,172,99,
1715 56,152,124,114,86,77,220,165,116,250,35,0,227,162,130,192,204,106,116,233,
1716 64,215,29,0,60,37,177,200,51,2,124,43,203,149,1,224,141,95,127,69,223,27,
1717 24,139,3,156,75,56,26,222,29,223,9,233,39,102,26,32,108,90,172,234,126,
1718 101,3,144,30,167,126,78,81,19,175,79,207,68,19,29,25,126,106,210,0,18,24,
1719 253,22,74,189,109,43,166,132,53,87,183,82,183,225,44,194,97,100,6,252,151,
1720 48,35,16,141,106,9,128,196,4,190,20,42,127,187,108,213,79,136,109,2,96,
1721 82,150,72,50,157,133,177,57,249,3,235,9,253,190,72,67,151,122,0,0,0,0,73,
1722 69,78,68,174,66,96,130};
1723 
1724 static size_t xml_res_size_20 = 544;
1725 static unsigned char xml_res_file_20[] = {
1726 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1727 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1728 72,89,115,0,0,4,193,0,0,4,193,1,17,118,177,117,0,0,0,25,116,69,88,116,83,
1729 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1730 46,111,114,103,155,238,60,26,0,0,1,157,73,68,65,84,88,133,197,214,187,74,
1731 3,65,20,198,241,255,108,54,23,215,66,8,104,33,190,129,160,157,181,118,54,
1732 1,45,237,4,65,124,8,49,104,163,98,161,96,35,216,9,193,215,136,160,62,128,
1733 133,141,141,18,65,137,226,5,194,102,77,54,57,22,154,16,67,46,123,153,93,
1734 191,106,216,153,195,252,56,59,59,172,18,17,56,86,105,62,120,96,88,20,251,
1735 108,202,225,208,117,62,162,68,4,182,85,70,20,85,165,60,84,8,235,108,201,
1736 169,46,128,209,26,216,117,16,241,80,161,56,97,71,173,232,2,180,59,240,89,
1737 163,106,26,96,37,193,83,39,194,166,201,8,121,113,140,206,103,110,211,71,
1738 39,52,197,108,143,70,199,97,114,14,23,176,19,6,86,42,17,93,39,74,151,80,
1739 121,237,2,76,204,194,114,1,224,7,97,154,88,150,133,138,66,113,182,0,149,
1740 34,208,113,8,187,227,186,46,182,109,35,17,191,15,115,208,100,11,209,221,
1741 137,171,82,133,131,235,231,224,187,150,87,201,89,99,201,53,112,6,2,122,
1742 33,110,95,170,228,206,239,120,119,26,193,1,76,51,35,23,9,24,210,129,110,
1743 196,155,107,178,88,8,187,249,223,152,0,187,153,141,244,222,253,18,28,221,
1744 12,92,92,19,3,71,165,180,94,20,74,68,80,219,197,12,95,84,61,85,24,9,72,
1745 102,194,35,164,50,34,249,121,167,239,87,208,55,205,6,212,29,109,183,149,
1746 127,128,102,68,48,128,70,68,112,64,39,226,223,0,45,68,205,219,249,141,6,
1747 16,18,161,7,16,2,161,15,16,16,161,23,16,0,161,31,224,19,17,13,192,7,34,
1748 58,128,71,68,180,0,15,136,232,1,67,16,241,0,6,32,226,3,244,65,196,11,232,
1749 129,136,31,208,66,252,230,231,167,52,59,37,60,61,150,99,69,100,167,4,224,
1750 27,27,92,198,229,13,213,26,65,0,0,0,0,73,69,78,68,174,66,96,130};
1751 
1752 static size_t xml_res_size_21 = 680;
1753 static unsigned char xml_res_file_21[] = {
1754 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1755 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1756 72,89,115,0,0,4,68,0,0,4,68,1,25,255,88,16,0,0,0,25,116,69,88,116,83,111,
1757 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
1758 111,114,103,155,238,60,26,0,0,2,37,73,68,65,84,88,133,189,151,63,104,19,
1759 81,28,199,63,239,229,146,92,18,144,154,193,34,56,116,8,56,185,8,82,71,23,
1760 55,65,11,130,21,92,116,23,255,141,34,37,155,163,131,142,130,147,224,160,
1761 131,155,197,65,233,98,21,135,130,165,14,69,227,159,34,73,53,38,173,73,147,
1762 188,196,231,164,189,36,191,94,238,206,75,190,112,144,247,126,47,191,247,
1763 201,189,207,5,78,89,107,25,21,85,124,225,160,114,183,65,221,24,185,24,214,
1764 81,246,140,189,117,108,53,192,90,84,31,64,81,77,13,46,184,203,124,246,186,
1765 186,242,196,224,204,6,105,8,160,176,141,195,124,62,191,102,207,46,9,229,
1766 38,11,182,243,119,160,61,155,187,104,126,14,94,167,244,203,141,48,155,3,
1767 88,84,238,28,139,79,165,126,104,46,121,215,106,239,192,244,194,108,19,79,
1768 28,239,160,105,32,11,36,19,187,115,105,12,179,188,11,221,248,144,170,132,
1769 7,144,32,14,242,157,87,234,98,104,128,160,209,210,100,211,76,238,56,68,
1770 128,73,66,236,62,134,69,229,214,59,236,120,139,239,153,225,180,115,15,18,
1771 67,39,21,57,219,228,182,154,251,167,15,216,203,133,54,8,14,120,99,112,40,
1772 155,44,224,198,9,177,143,234,87,5,5,192,231,8,250,73,90,208,235,198,5,208,
1773 151,96,0,99,132,8,14,48,38,136,112,0,99,128,8,15,240,15,194,196,2,16,72,
1774 237,66,222,101,102,42,53,52,175,83,46,218,73,138,223,89,219,220,225,83,
1775 189,35,214,66,3,92,56,146,231,234,241,105,177,150,201,100,72,165,134,225,
1776 174,61,251,194,157,229,114,60,0,15,86,126,240,188,180,181,103,61,145,116,
1777 81,3,119,98,189,218,14,210,58,24,64,169,214,166,84,243,107,248,11,146,105,
1778 72,200,199,225,151,104,18,74,49,237,72,98,254,151,132,82,246,18,243,219,
1779 182,97,165,220,140,6,224,39,161,20,73,204,71,171,85,230,31,127,136,6,48,
1780 74,66,41,131,98,86,26,242,159,87,76,18,74,9,38,102,124,18,74,9,32,102,236,
1781 18,74,209,41,151,154,81,188,222,104,68,3,8,43,161,148,55,155,93,78,62,252,
1782 24,13,32,138,132,131,169,183,126,67,175,55,228,196,24,37,244,137,22,63,
1783 78,40,166,255,135,120,239,64,23,203,125,111,177,162,243,121,44,115,227,
1784 228,81,126,175,231,234,230,210,81,108,239,109,236,187,166,201,216,133,19,
1785 45,128,63,147,180,205,25,132,236,135,65,0,0,0,0,73,69,78,68,174,66,96,130};
1786 
1787 static size_t xml_res_size_22 = 934;
1788 static unsigned char xml_res_file_22[] = {
1789 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1790 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1791 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
1792 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1793 46,111,114,103,155,238,60,26,0,0,3,35,73,68,65,84,88,133,197,151,207,111,
1794 19,87,16,199,63,243,188,217,24,228,0,17,82,126,72,21,225,0,2,170,220,32,
1795 132,0,7,211,162,74,205,161,228,88,196,129,91,47,136,3,135,94,106,130,237,
1796 68,201,21,33,254,134,64,111,13,28,80,85,104,229,75,81,163,170,151,86,162,
1797 169,26,169,165,42,10,84,145,32,36,106,252,214,235,29,14,177,29,255,10,89,
1798 59,27,152,211,122,222,188,253,126,222,123,126,51,179,162,170,132,49,185,
1799 189,208,201,203,87,31,1,23,128,99,32,253,160,253,165,225,231,160,139,96,
1800 230,81,185,15,175,31,105,58,153,15,245,222,173,0,100,250,151,126,10,122,
1801 3,225,18,208,21,138,22,86,81,253,26,199,207,104,106,228,89,91,0,165,21,
1802 143,3,215,128,221,33,133,235,109,13,229,38,172,78,110,182,35,77,1,100,122,
1803 174,23,223,204,130,156,106,83,184,222,230,80,29,211,244,208,243,45,1,36,
1804 59,247,33,18,123,0,12,68,36,94,182,127,17,25,213,241,227,191,109,10,32,
1805 217,199,61,120,133,159,137,117,28,192,113,35,214,47,65,168,14,85,239,132,
1806 217,16,127,226,226,121,223,160,122,0,223,3,223,219,9,128,15,16,153,149,
1807 108,46,94,118,56,149,33,111,41,133,114,186,242,219,247,112,140,144,216,
1808 29,167,222,2,133,215,182,88,227,235,114,99,196,76,67,40,171,94,128,31,212,
1809 28,243,48,36,198,129,20,148,142,64,82,115,189,176,182,128,146,168,142,60,
1810 59,144,224,225,229,65,226,241,90,136,167,203,30,7,111,253,90,227,155,191,
1811 50,200,145,253,141,176,159,222,249,147,111,23,150,235,221,107,196,10,135,
1812 53,53,242,108,157,57,88,203,212,139,151,205,90,75,62,31,42,167,180,98,187,
1813 240,157,12,128,145,108,206,65,184,248,182,232,29,129,16,249,92,178,185,
1814 184,193,202,199,192,222,173,226,119,0,34,1,123,206,59,160,23,194,206,176,
1815 214,150,158,154,252,219,218,49,209,207,28,224,72,43,115,172,181,216,188,
1816 68,3,64,112,212,0,125,173,78,243,60,27,81,158,144,126,3,244,182,53,55,154,
1817 100,213,183,189,195,140,0,194,0,13,21,234,221,65,200,162,65,182,9,80,130,
1818 176,182,157,43,170,139,6,149,249,109,3,0,94,123,121,226,119,3,204,70,1,
1819 0,109,37,171,123,134,78,205,1,47,223,3,196,10,221,251,126,48,154,78,250,
1820 40,51,81,1,132,134,80,102,244,234,33,187,126,13,125,111,18,97,229,29,66,
1821 252,79,135,76,64,85,75,38,169,92,6,37,93,29,101,4,220,38,93,134,170,98,
1822 139,181,189,164,27,19,140,52,166,104,79,28,130,88,67,123,55,165,55,78,92,
1823 135,234,142,104,160,107,138,191,87,206,3,103,202,174,64,33,239,7,155,173,
1824 162,86,168,168,64,179,22,223,91,119,87,122,76,253,137,238,238,201,242,104,
1825 101,121,250,197,241,2,46,99,192,95,161,20,91,177,141,100,245,20,39,24,211,
1826 171,135,202,101,181,182,174,106,38,185,4,222,232,142,64,20,11,255,160,197,
1827 81,253,106,248,69,181,187,225,128,117,250,147,121,92,78,2,63,70,167,174,
1828 143,113,59,134,52,61,252,164,126,164,105,49,210,76,114,137,131,93,231,16,
1829 178,219,186,29,194,42,48,65,103,239,57,77,159,254,175,105,200,150,31,167,
1830 95,126,215,131,227,142,151,62,78,187,67,74,47,163,220,197,236,202,232,84,
1831 237,150,183,12,80,9,204,230,28,172,36,129,49,68,143,162,244,177,209,204,
1832 188,96,189,170,254,1,114,143,78,253,94,211,73,63,204,123,223,0,202,222,
1833 98,133,128,94,40,169,0,0,0,0,73,69,78,68,174,66,96,130};
1834 
1835 static size_t xml_res_size_23 = 1152;
1836 static unsigned char xml_res_file_23[] = {
1837 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1838 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1839 72,89,115,0,0,4,196,0,0,4,196,1,60,204,212,131,0,0,0,25,116,69,88,116,83,
1840 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1841 46,111,114,103,155,238,60,26,0,0,3,253,73,68,65,84,88,133,173,151,65,76,
1842 20,87,24,199,127,111,152,221,69,11,90,148,194,34,132,42,49,21,65,15,141,
1843 65,42,189,44,149,152,200,161,154,216,52,109,106,218,30,219,8,7,107,232,
1844 65,130,187,104,36,169,77,234,129,52,105,155,244,72,172,39,177,77,218,164,
1845 182,64,90,171,130,161,166,33,82,108,108,172,20,187,64,41,84,89,101,103,
1846 153,229,235,129,101,217,93,102,103,150,45,255,211,236,188,239,125,255,223,
1847 124,111,231,125,111,148,136,144,137,84,231,93,15,51,255,190,4,28,2,118,
1848 130,42,1,41,137,13,143,131,4,65,27,65,212,151,240,232,59,241,251,194,25,
1849 229,117,2,80,29,131,37,204,203,41,20,111,0,249,25,209,66,8,145,47,208,205,
1850 128,180,238,123,144,21,64,236,137,219,128,227,192,250,12,141,83,53,135,
1851 112,30,66,103,210,85,196,18,64,117,244,23,99,106,221,160,94,200,210,56,
1852 85,253,136,28,22,127,205,184,35,128,106,239,175,66,229,124,13,60,187,70,
1853 230,75,26,67,169,70,105,219,51,148,22,64,181,95,43,34,50,127,147,28,87,
1854 57,186,123,141,253,99,16,34,53,137,149,208,150,205,135,221,68,34,151,16,
1855 41,199,140,128,25,137,207,218,146,239,226,185,205,185,107,1,80,134,82,221,
1856 170,189,47,158,44,14,64,100,170,21,161,46,254,59,1,162,162,192,195,237,
1857 119,171,233,60,88,78,225,122,253,255,66,212,66,94,91,18,128,106,237,47,
1858 134,133,247,86,132,198,32,116,77,161,107,138,166,154,34,238,54,239,230,
1859 253,58,47,158,28,149,61,130,226,184,58,123,189,52,14,192,194,92,0,33,207,
1860 50,216,140,160,69,151,151,99,163,39,135,15,26,202,184,211,180,155,215,119,
1861 109,34,75,140,117,152,122,96,145,37,208,171,99,48,5,108,76,23,221,80,177,
1862 129,175,142,86,145,155,187,242,127,48,240,224,49,39,174,252,201,213,209,
1863 208,106,33,66,72,232,25,13,67,237,183,51,7,208,53,133,97,24,132,195,43,
1864 247,146,189,165,79,241,227,219,149,92,124,165,130,210,252,85,189,57,121,
1865 176,161,65,3,57,228,20,169,107,139,133,78,7,1,240,106,213,38,70,142,237,
1866 162,165,206,139,75,203,112,97,148,188,172,1,59,156,1,150,175,237,32,242,
1867 220,26,231,26,202,248,229,157,106,234,183,102,210,54,22,42,53,192,235,12,
1868 144,252,68,118,16,0,59,11,115,233,121,115,7,23,142,84,176,37,223,101,147,
1869 89,149,104,64,241,106,1,50,129,0,120,173,122,113,89,78,236,43,182,204,1,
1870 120,53,171,187,153,42,19,8,0,187,142,175,3,227,192,102,187,4,230,66,250,
1871 12,134,97,0,88,190,162,93,67,255,208,114,101,140,96,104,62,205,108,21,212,
1872 81,140,35,84,103,11,96,5,49,52,57,71,211,55,163,252,112,127,214,118,30,
1873 72,80,71,212,8,200,126,123,0,135,60,49,136,71,70,148,142,27,211,124,124,
1874 115,210,17,58,166,95,117,160,27,56,102,15,96,159,76,128,139,183,167,57,
1875 213,251,23,147,134,98,21,173,252,178,142,71,250,48,152,1,10,178,1,184,62,
1876 246,152,214,158,49,126,14,62,73,30,112,134,152,165,224,233,30,77,252,62,
1877 19,161,203,46,210,10,224,247,153,48,71,47,221,227,96,215,111,43,205,83,
1878 206,19,150,18,186,164,121,187,161,199,38,156,193,237,126,11,177,62,245,
1879 154,9,239,209,116,216,228,220,213,113,62,191,53,197,188,221,210,44,1,88,
1880 87,226,9,46,117,26,98,237,88,62,60,48,9,124,148,54,215,130,96,68,133,206,
1881 129,9,158,255,116,152,79,6,255,182,55,79,132,176,174,196,121,57,185,39,
1882 8,9,103,66,245,217,160,139,63,102,123,129,23,83,163,189,121,46,220,57,26,
1883 163,15,13,103,83,43,233,238,132,74,200,13,10,10,124,210,188,221,72,2,0,
1884 80,129,190,66,34,12,0,219,178,115,114,132,184,143,30,173,149,147,181,19,
1885 75,183,147,182,98,9,248,166,32,210,8,220,91,115,128,232,252,40,18,109,76,
1886 52,95,1,0,32,29,7,70,112,179,23,248,105,237,220,229,26,110,87,141,248,107,
1887 135,83,71,44,155,145,4,124,83,108,205,175,71,209,142,194,105,63,77,47,69,
1888 8,56,141,167,184,94,252,117,147,150,33,142,31,167,45,223,22,161,187,219,
1889 98,31,167,105,55,171,20,61,68,184,128,182,46,32,103,147,75,190,106,128,
1890 120,96,123,159,142,161,124,192,97,148,84,34,120,89,62,204,76,176,216,85,
1891 239,128,186,140,71,190,23,191,207,204,36,239,127,184,206,178,106,141,44,
1892 108,8,0,0,0,0,73,69,78,68,174,66,96,130};
1893 
1894 static size_t xml_res_size_24 = 637;
1895 static unsigned char xml_res_file_24[] = {
1896 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1897 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1898 72,89,115,0,0,6,40,0,0,6,40,1,59,154,118,221,0,0,0,25,116,69,88,116,83,
1899 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1900 46,111,114,103,155,238,60,26,0,0,1,250,73,68,65,84,88,133,237,151,191,107,
1901 212,96,24,199,63,79,46,119,189,90,184,201,193,31,187,5,7,57,255,128,162,
1902 14,66,55,71,65,144,34,232,162,130,131,58,28,5,53,151,156,83,55,113,237,
1903 230,225,84,112,40,66,135,20,58,116,170,168,8,138,184,168,224,15,112,234,
1904 116,73,239,146,199,161,173,151,228,114,114,105,211,166,195,125,167,228,
1905 155,188,249,126,242,62,111,158,36,162,170,20,41,163,208,244,49,192,81,0,
1906 16,26,238,38,200,68,220,45,45,106,107,230,118,174,65,214,198,51,132,91,
1907 9,219,51,119,194,227,0,26,84,242,12,223,38,160,60,144,195,17,40,193,232,
1908 0,182,44,225,200,108,113,0,80,71,121,141,45,43,88,114,238,208,1,182,2,202,
1909 59,155,151,49,120,139,35,139,88,114,234,208,0,188,30,166,31,68,198,41,55,
1910 48,248,130,45,22,11,50,117,224,0,10,166,215,133,173,32,102,31,3,30,209,
1911 225,51,77,185,122,160,0,40,38,64,103,16,2,224,52,194,75,108,113,177,228,
1912 108,22,0,51,213,21,206,200,188,123,51,106,253,17,179,90,214,30,187,16,0,
1913 149,210,192,200,75,161,33,31,214,237,250,202,117,154,175,190,114,210,235,
1914 95,83,166,73,121,241,10,141,85,143,148,6,145,212,111,153,165,138,31,243,
1915 38,203,169,16,0,252,226,56,15,244,30,109,254,251,228,250,251,106,68,67,
1916 202,145,73,67,74,32,235,24,210,142,90,37,13,22,80,170,105,16,208,159,137,
1917 16,9,215,56,239,206,209,92,254,46,39,250,37,80,174,129,206,140,6,160,250,
1918 73,237,11,207,163,214,230,124,207,129,65,128,4,196,170,17,234,221,139,143,
1919 223,124,252,150,188,167,230,70,29,24,17,32,77,66,47,109,17,109,31,226,167,
1920 215,229,97,229,137,182,211,207,24,174,145,215,128,64,47,233,41,116,16,158,
1921 250,21,166,107,173,236,225,144,97,6,66,37,144,232,174,240,98,2,26,147,142,
1922 254,216,75,112,102,128,127,51,32,184,166,114,127,202,209,119,251,9,222,
1923 11,192,123,224,78,205,209,229,60,130,51,3,212,90,122,37,207,224,93,21,254,
1924 69,100,130,250,32,113,87,233,230,158,164,116,145,68,47,7,79,198,191,102,
1925 99,128,162,1,254,2,87,167,156,99,57,199,119,147,0,0,0,0,73,69,78,68,174,
1926 66,96,130};
1927 
1928 static size_t xml_res_size_25 = 708;
1929 static unsigned char xml_res_file_25[] = {
1930 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1931 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1932 72,89,115,0,0,5,163,0,0,5,163,1,164,52,119,130,0,0,0,25,116,69,88,116,83,
1933 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1934 46,111,114,103,155,238,60,26,0,0,2,65,73,68,65,84,88,133,197,151,189,107,
1935 19,113,24,199,63,207,229,146,212,40,173,118,16,117,112,208,69,16,28,10,
1936 138,56,104,193,197,127,160,8,110,110,29,44,74,209,74,91,46,103,154,74,65,
1937 240,101,17,58,184,72,55,157,116,18,234,34,138,155,131,130,173,98,21,193,
1938 183,56,136,73,91,95,146,92,238,113,136,74,122,36,185,203,93,94,158,237,
1939 126,207,243,251,62,159,251,253,158,223,155,168,42,161,45,43,7,113,249,142,
1940 173,43,97,37,140,240,217,1,225,16,6,75,204,200,13,50,50,216,125,0,48,129,
1941 56,194,89,12,86,200,202,56,25,73,116,15,64,137,213,124,109,3,174,98,176,
1942 204,140,140,116,7,160,58,2,94,219,131,112,135,172,60,229,178,28,246,19,
1943 16,111,17,22,44,57,153,48,152,218,100,18,164,58,183,3,59,155,248,21,88,
1944 32,198,4,83,250,213,23,96,117,90,78,40,220,3,18,73,19,250,234,253,95,56,
1945 43,0,105,246,113,147,17,173,212,5,88,75,203,17,215,101,17,37,245,207,217,
1946 102,8,16,94,160,156,193,210,199,27,0,242,147,114,64,12,30,1,91,189,125,
1947 218,14,81,5,89,160,194,4,182,230,36,63,205,94,148,39,192,142,70,241,29,
1948 129,128,85,148,81,67,148,219,205,146,3,20,29,248,237,180,53,121,25,152,
1949 39,197,125,83,133,254,32,245,94,252,11,208,134,145,120,136,203,24,182,190,
1950 130,250,235,184,83,16,31,81,198,73,235,221,218,198,150,165,66,64,148,80,
1951 174,147,34,203,121,253,225,117,6,149,121,143,203,241,255,16,37,232,51,112,
1952 137,49,138,114,177,73,191,7,8,231,176,244,117,163,128,160,0,229,129,57,
1953 125,231,109,116,50,242,205,172,191,153,63,71,185,64,90,23,253,132,35,157,
1954 5,191,202,184,158,213,241,9,56,141,203,80,144,228,16,162,6,106,77,133,74,
1955 209,1,129,181,164,201,21,92,174,97,235,207,86,52,162,45,42,165,4,220,114,
1956 4,43,105,105,46,140,68,36,128,254,56,243,216,234,70,209,136,118,31,136,
1957 152,60,58,64,27,44,232,20,36,11,147,50,228,23,52,176,139,151,140,105,177,
1958 19,0,187,49,120,230,23,180,158,99,255,22,88,106,5,160,231,83,208,123,0,
1959 169,222,215,122,7,224,192,41,224,109,207,0,6,103,245,67,60,193,81,224,77,
1960 79,0,0,82,182,126,142,11,199,68,104,120,108,118,20,0,32,53,171,95,98,38,
1961 195,34,44,119,19,96,195,62,176,249,146,230,214,51,50,92,41,51,39,66,75,
1962 143,76,0,195,36,223,106,159,63,132,231,183,174,19,196,144,63,0,0,0,0,73,
1963 69,78,68,174,66,96,130};
1964 
1965 static size_t xml_res_size_26 = 915;
1966 static unsigned char xml_res_file_26[] = {
1967 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
1968 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
1969 72,89,115,0,0,4,109,0,0,4,109,1,125,26,147,5,0,0,0,25,116,69,88,116,83,
1970 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
1971 46,111,114,103,155,238,60,26,0,0,3,16,73,68,65,84,88,133,197,151,75,76,
1972 19,81,20,134,191,51,45,69,141,70,37,186,192,184,48,4,19,21,220,128,10,198,
1973 32,132,196,133,47,140,27,163,241,177,48,49,198,168,145,141,137,82,218,177,
1974 173,2,75,8,137,46,140,27,99,226,194,133,111,19,87,20,65,23,10,46,84,92,
1975 24,95,43,93,152,136,111,177,237,204,113,161,192,148,182,208,78,139,158,
1976 100,22,115,207,127,206,249,230,222,59,115,207,136,170,226,198,164,227,233,
1977 124,98,35,126,48,122,52,88,125,219,85,18,192,155,115,225,208,115,31,242,
1978 227,48,208,10,82,130,216,15,221,22,207,25,64,34,143,118,32,210,14,148,141,
1979 143,26,57,63,68,82,206,108,150,64,34,131,53,168,221,9,82,155,206,139,202,
1980 157,204,209,241,47,106,214,60,119,5,32,161,193,5,136,118,0,251,1,153,146,
1981 52,189,217,32,59,53,88,125,37,107,0,9,97,32,3,7,128,54,160,196,101,97,167,
1982 197,192,104,210,96,213,221,41,1,36,216,83,131,101,156,197,83,84,133,215,
1983 87,128,218,99,246,3,213,13,106,174,126,144,17,64,66,247,23,241,43,222,11,
1984 148,3,224,245,81,96,136,79,168,181,206,185,39,12,167,87,205,117,239,40,
1985 93,92,9,18,6,70,72,196,32,17,43,36,192,60,12,239,122,231,128,49,81,161,
1986 71,203,127,105,91,189,137,199,174,68,184,61,13,16,73,150,241,29,214,72,
1987 227,43,96,139,156,232,219,70,34,214,9,44,201,176,28,175,129,15,142,251,
1988 89,192,202,108,1,82,102,32,5,164,163,238,58,197,44,39,17,11,96,197,191,
1989 164,145,156,210,224,170,218,209,11,213,125,217,22,135,9,51,32,161,91,179,
1990 136,205,157,155,42,243,128,112,129,68,226,2,134,225,71,60,7,29,177,137,
1991 92,10,78,180,228,25,136,207,222,143,90,239,50,94,80,170,102,205,17,212,
1992 174,64,184,246,23,59,47,0,87,223,113,53,215,188,0,182,75,228,113,29,216,
1993 223,254,57,192,24,72,160,170,47,159,120,200,98,19,78,183,229,5,32,193,254,
1994 106,9,68,27,254,27,0,150,46,197,162,71,252,209,27,210,18,93,230,38,69,94,
1995 123,96,44,94,217,138,176,81,252,125,231,241,205,8,163,90,154,49,98,78,252,
1996 115,1,1,172,241,120,197,11,214,33,172,248,110,138,138,219,177,191,118,170,
1997 217,48,50,85,134,228,211,176,53,122,4,155,238,73,244,67,192,79,199,253,
1998 2,96,73,138,234,207,41,250,26,53,142,169,89,117,107,50,128,92,103,160,34,
1999 43,213,159,195,171,12,175,239,166,68,6,110,32,118,179,182,174,121,147,78,
2000 58,125,175,225,232,41,170,52,97,27,67,18,30,12,72,247,203,226,201,1,148,
2001 40,240,121,162,40,111,8,152,9,26,102,248,211,19,105,27,76,218,160,201,13,
2002 201,153,134,103,96,109,37,121,157,11,5,49,128,232,30,109,169,126,239,116,
2003 167,111,74,91,238,109,66,244,42,170,5,232,199,100,24,209,0,190,134,115,
2004 106,98,167,120,51,181,229,114,178,119,23,134,125,9,21,183,251,68,129,139,
2005 224,57,174,109,117,31,50,137,38,255,47,240,71,43,81,77,211,31,140,10,140,
2006 205,168,158,76,227,121,132,97,55,235,233,198,7,105,124,217,3,76,25,220,
2007 218,191,23,59,113,209,49,244,22,67,90,244,116,253,229,108,115,228,251,37,
2008 252,219,140,200,48,66,59,190,133,93,106,174,200,169,131,205,15,192,150,
2009 239,136,213,133,111,102,88,205,181,31,221,164,248,13,195,123,60,251,33,
2010 106,248,255,0,0,0,0,73,69,78,68,174,66,96,130};
2011 
2012 static size_t xml_res_size_27 = 1139;
2013 static unsigned char xml_res_file_27[] = {
2014 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
2015 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
2016 72,89,115,0,0,5,63,0,0,5,63,1,19,100,100,172,0,0,0,25,116,69,88,116,83,
2017 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
2018 46,111,114,103,155,238,60,26,0,0,3,240,73,68,65,84,88,133,197,151,105,104,
2019 92,85,20,199,127,231,189,89,226,130,173,68,91,148,182,81,16,23,90,16,67,
2020 6,53,16,237,88,63,196,74,49,69,237,7,23,4,69,106,5,133,32,196,36,109,153,
2021 219,44,141,130,40,42,162,45,8,34,181,197,20,75,145,10,130,202,196,170,165,
2022 38,197,5,219,88,233,7,169,180,136,138,154,72,200,100,250,150,227,135,201,
2023 50,153,119,103,156,73,90,60,48,204,155,179,253,255,247,222,243,206,153,
2024 11,139,145,151,143,92,68,207,72,247,98,82,56,139,34,240,207,18,23,165,159,
2025 158,99,157,255,15,129,186,156,11,128,234,0,61,35,29,11,73,33,53,121,155,
2026 99,171,112,194,187,80,167,25,209,6,84,150,131,222,60,109,85,224,25,50,169,
2027 55,206,63,1,51,220,138,35,237,40,119,83,121,215,20,216,66,38,181,235,252,
2028 16,232,251,166,129,32,120,19,184,167,218,132,192,36,49,185,142,173,77,191,
2029 86,227,28,43,107,49,195,173,4,193,30,160,190,6,240,28,208,86,45,56,128,
2030 107,213,118,14,109,36,56,119,0,213,75,113,203,115,44,145,60,200,3,100,82,
2031 31,87,27,0,182,243,220,62,212,130,232,62,32,78,224,129,151,47,182,250,8,
2032 7,129,135,112,221,107,208,96,229,180,62,7,108,32,211,244,81,45,224,80,122,
2033 4,38,187,148,60,123,128,228,172,46,240,10,223,241,228,97,52,216,66,230,
2034 182,209,89,91,255,209,229,248,228,128,251,200,164,62,169,21,28,74,119,32,
2035 79,31,232,170,136,87,224,237,66,39,214,97,138,192,1,188,208,91,12,56,20,
2036 191,5,29,217,21,196,56,133,82,55,223,69,247,178,51,253,8,34,186,80,144,
2037 74,50,183,3,46,155,163,224,252,76,82,54,95,40,112,40,174,1,145,251,209,
2038 18,28,113,123,48,119,76,92,40,240,57,2,29,217,21,168,222,84,98,27,35,81,
2039 191,215,22,164,6,103,210,231,201,139,147,172,3,38,9,217,47,25,106,126,3,
2040 96,230,8,28,214,68,44,226,124,134,89,125,206,22,52,238,243,129,23,242,214,
2041 148,199,131,40,143,33,28,210,94,186,22,78,64,194,107,163,166,96,52,170,
2042 131,241,110,238,37,164,13,32,239,195,148,63,109,80,118,104,63,87,213,74,
2043 160,112,4,110,44,65,16,206,183,132,50,110,11,8,225,214,226,1,146,159,38,
2044 80,23,35,142,79,35,88,142,194,140,172,193,161,185,36,209,17,76,234,120,
2045 129,64,168,97,36,72,244,18,27,1,81,206,150,142,176,34,18,103,108,49,136,
2046 108,68,181,167,36,209,227,192,241,194,17,168,156,182,68,93,111,203,165,
2047 73,222,135,40,80,222,231,40,33,63,88,9,192,13,209,68,250,7,204,212,128,
2048 203,143,22,214,107,81,141,140,235,203,13,99,161,203,122,148,17,20,5,60,
2049 28,14,198,160,77,12,209,157,52,234,0,107,35,250,152,124,15,197,157,176,
2050 107,232,180,165,13,111,96,32,125,168,204,170,248,219,176,116,98,156,252,
2051 202,87,200,149,243,193,140,172,71,34,117,241,11,153,84,3,20,119,66,13,163,
2052 64,34,59,24,28,180,143,108,10,187,81,25,92,29,132,190,136,94,101,112,230,
2053 113,142,128,200,235,80,82,140,170,141,124,187,108,126,241,212,34,193,87,
2054 189,192,45,37,218,16,120,59,74,96,32,125,18,113,14,68,217,106,23,219,14,
2055 183,215,12,222,153,125,14,207,235,194,143,244,178,247,48,77,39,103,126,
2056 204,47,50,243,229,213,228,189,81,96,73,36,161,56,239,146,136,183,99,154,
2057 255,170,8,220,245,105,61,184,175,2,15,207,234,98,137,194,7,198,113,189,
2058 213,108,107,62,107,39,0,208,253,249,38,52,216,7,98,251,247,59,6,206,59,
2059 56,236,39,30,14,99,210,133,14,96,78,36,240,126,111,68,101,19,202,19,160,
2060 151,69,34,221,132,18,75,180,97,82,31,206,91,151,117,21,157,217,231,17,94,
2061 168,184,82,193,7,249,13,21,129,240,74,32,94,214,87,81,92,167,131,254,59,
2062 95,138,166,41,39,91,179,79,17,242,90,197,196,213,137,135,208,206,206,180,
2063 245,194,82,249,94,176,125,168,5,95,119,3,55,46,8,90,57,69,60,246,40,189,
2064 45,95,151,115,249,239,155,145,57,145,192,251,243,105,194,224,89,192,50,
2065 53,173,114,6,135,23,137,47,219,93,110,164,87,79,96,150,136,58,76,102,211,
2066 184,210,138,112,59,42,13,136,94,129,50,133,72,14,229,39,144,239,32,56,72,
2067 50,253,5,70,162,109,217,34,255,2,107,225,84,76,2,118,23,86,0,0,0,0,73,69,
2068 78,68,174,66,96,130};
2069 
2070 static size_t xml_res_size_28 = 1110;
2071 static unsigned char xml_res_file_28[] = {
2072 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
2073 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
2074 72,89,115,0,0,5,59,0,0,5,59,1,236,153,227,190,0,0,0,25,116,69,88,116,83,
2075 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
2076 46,111,114,103,155,238,60,26,0,0,3,211,73,68,65,84,88,133,181,150,93,104,
2077 28,101,20,134,159,51,59,217,38,43,24,69,80,10,181,84,173,10,70,208,182,
2078 201,38,254,180,106,164,244,34,96,197,84,47,68,208,155,18,84,42,161,23,109,
2079 211,84,246,219,68,13,8,182,66,105,139,138,94,216,171,70,80,227,47,166,13,
2080 93,107,253,205,106,81,27,68,40,177,180,197,54,68,109,137,198,164,153,157,
2081 57,94,52,147,205,206,204,102,179,27,123,96,96,230,61,231,61,231,253,206,
2082 247,55,176,16,235,202,110,102,231,87,53,11,73,97,85,94,124,176,29,213,87,
2083 112,175,168,60,71,197,2,186,178,207,161,236,2,96,124,34,182,16,1,82,54,
2084 35,61,248,44,176,59,207,149,31,17,29,193,227,36,150,126,141,197,0,59,146,
2085 167,47,143,128,244,96,27,176,175,4,207,67,232,199,147,93,152,250,254,255,
2086 79,192,139,217,197,228,244,4,144,152,55,7,62,70,229,25,76,253,169,98,1,
2087 243,95,3,157,245,103,129,135,129,137,50,4,180,32,250,61,233,193,181,197,
2088 2,42,89,3,107,129,62,160,156,237,231,128,182,146,74,126,24,116,148,191,
2089 11,82,13,7,129,245,248,157,80,247,122,98,177,101,192,227,8,31,0,110,4,171,
2090 10,164,151,174,111,239,10,58,202,239,128,111,126,39,108,247,6,58,155,70,
2091 102,112,51,120,59,162,123,65,86,71,176,134,81,119,5,166,105,204,7,42,63,
2092 68,252,78,56,158,83,128,155,134,227,232,120,51,232,190,8,214,141,72,204,
2093 204,6,42,239,64,41,83,21,210,217,183,17,158,8,120,38,208,216,114,204,202,
2094 223,97,33,29,40,101,34,10,137,167,129,223,2,158,26,196,221,232,127,92,62,
2095 1,0,166,238,31,4,19,225,105,245,95,42,158,130,113,195,67,137,24,143,0,9,
2096 148,126,60,222,18,131,23,22,49,20,71,254,29,1,174,42,192,85,23,99,146,231,
2097 42,234,192,249,237,164,156,41,250,38,29,158,68,121,20,120,3,139,222,200,
2098 96,83,55,5,12,132,112,161,14,42,152,130,63,183,176,68,96,7,192,197,28,76,
2099 230,102,92,173,154,102,93,17,218,241,48,36,203,0,108,0,158,255,226,14,60,
2100 231,158,2,191,218,71,121,105,205,79,65,154,37,172,154,225,77,139,0,168,
2101 182,1,161,17,248,44,162,216,223,160,1,72,23,229,5,120,78,35,158,236,41,
2102 12,112,211,64,72,128,196,57,19,60,235,102,137,56,19,46,14,68,93,96,42,46,
2103 248,83,224,90,163,225,0,189,37,42,83,109,140,99,34,28,13,226,147,46,103,
2104 199,60,222,143,174,175,55,71,128,167,242,2,208,99,97,191,181,26,163,161,
2105 53,34,6,47,166,108,16,161,15,200,161,40,240,157,90,172,171,53,252,21,49,
2106 16,1,30,12,227,252,10,179,183,97,71,230,52,232,146,128,136,22,122,238,251,
2107 36,122,84,160,134,234,11,80,125,181,225,66,177,24,210,217,22,208,143,2,
2108 232,48,169,134,155,160,96,23,120,239,134,217,222,11,81,93,240,77,12,147,
2109 115,22,55,135,109,208,174,8,79,159,255,146,79,110,199,95,159,110,231,108,
2110 91,193,197,207,187,139,22,40,101,110,85,26,88,25,64,61,212,218,27,22,208,
2111 125,239,16,194,129,80,18,213,14,58,143,180,151,93,188,51,179,25,199,233,
2112 32,55,21,244,28,192,172,58,225,127,20,30,197,91,15,46,197,170,250,25,244,
2113 202,112,198,216,126,22,217,237,152,187,195,11,109,182,117,28,186,6,177,
2114 95,69,53,127,11,218,241,75,15,156,71,245,54,76,242,92,180,0,128,109,71,
2115 90,193,125,7,137,186,39,100,12,225,77,68,123,169,186,246,135,233,99,246,
2116 210,92,59,86,18,245,30,67,121,10,168,13,81,237,184,135,109,111,32,213,248,
2117 94,65,198,232,81,12,108,3,171,103,206,145,130,3,214,40,162,10,122,29,154,
2118 63,29,163,77,182,210,115,255,203,33,180,104,252,246,204,38,208,157,165,
2119 19,151,52,7,216,68,207,3,175,69,202,154,147,218,121,184,9,143,253,192,242,
2120 138,74,139,252,66,204,219,72,119,243,151,69,67,74,38,49,67,113,166,70,219,
2121 80,182,132,15,170,98,166,195,88,246,110,150,38,246,208,86,239,204,21,57,
2122 255,31,18,163,22,185,204,26,92,107,61,232,157,8,183,162,90,131,80,141,242,
2123 7,194,73,148,111,80,239,83,170,155,51,24,9,255,156,68,216,127,65,255,70,
2124 162,172,242,156,128,0,0,0,0,73,69,78,68,174,66,96,130};
2125 
2126 static size_t xml_res_size_29 = 555;
2127 static unsigned char xml_res_file_29[] = {
2128 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
2129 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
2130 72,89,115,0,0,5,137,0,0,5,137,1,109,104,157,250,0,0,0,25,116,69,88,116,
2131 83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,
2132 101,46,111,114,103,155,238,60,26,0,0,1,168,73,68,65,84,88,133,197,214,49,
2133 75,195,64,20,192,241,127,218,51,77,65,40,42,162,46,29,186,56,73,233,40,
2134 142,29,220,252,10,78,58,56,11,218,65,208,201,126,10,81,252,28,197,169,179,
2135 160,139,56,56,136,131,88,68,92,52,151,94,26,135,54,180,53,181,205,181,201,
2136 249,32,16,222,229,46,63,114,151,123,103,113,210,12,16,54,165,133,28,197,
2137 130,77,26,241,244,33,121,254,244,0,238,153,203,86,131,90,165,21,182,89,
2138 212,110,2,132,77,125,187,196,209,214,170,254,232,237,47,120,187,139,230,
2139 69,30,86,202,0,212,26,47,212,155,175,97,203,16,66,0,160,60,148,39,245,95,
2140 14,240,254,8,23,155,209,252,210,58,28,60,140,234,177,65,219,111,88,231,
2141 183,213,160,86,105,101,194,172,242,36,174,235,78,135,208,143,16,177,156,
2142 25,204,74,105,30,145,249,157,53,141,136,0,76,35,70,2,76,34,254,4,152,66,
2143 140,5,152,64,136,56,15,73,217,221,35,28,199,137,54,230,23,161,188,27,205,
2144 207,175,37,7,24,139,40,20,97,231,50,238,48,145,232,110,197,128,35,50,228,
2145 132,53,185,135,176,177,132,94,205,248,110,119,144,126,48,122,184,240,198,
2146 85,29,92,21,107,56,16,62,104,34,254,138,137,139,112,100,40,175,123,253,
2147 27,32,65,132,232,223,248,8,124,125,4,182,246,116,40,178,40,178,195,128,
2148 67,174,57,182,174,244,0,0,62,228,44,112,98,255,79,112,22,236,113,202,62,
2149 48,203,20,12,132,84,196,92,192,209,72,4,48,11,34,49,192,180,136,68,1,211,
2150 32,18,7,232,34,82,1,232,32,82,3,196,69,164,10,136,131,72,29,48,9,97,4,48,
2151 14,161,177,129,38,131,0,232,149,1,192,224,23,24,68,40,213,47,122,198,1,
2152 208,3,244,74,121,255,72,134,71,142,100,14,25,147,66,98,227,246,202,248,
2153 15,58,85,192,175,251,92,135,114,0,0,0,0,73,69,78,68,174,66,96,130};
2154 
2155 static size_t xml_res_size_30 = 743;
2156 static unsigned char xml_res_file_30[] = {
2157 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
2158 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
2159 72,89,115,0,0,5,186,0,0,5,186,1,27,237,141,201,0,0,0,25,116,69,88,116,83,
2160 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
2161 46,111,114,103,155,238,60,26,0,0,2,100,73,68,65,84,88,133,237,151,61,104,
2162 19,97,24,199,127,111,238,46,105,47,130,37,218,8,78,90,5,151,96,16,138,144,
2163 69,51,139,224,160,136,210,85,65,197,193,14,130,83,74,68,4,65,80,92,138,
2164 139,58,41,74,197,73,136,131,32,210,69,44,85,176,197,218,148,34,162,88,107,
2165 91,41,169,215,36,247,241,58,216,214,59,155,207,203,165,46,254,183,251,63,
2166 239,243,222,143,247,142,231,121,94,33,165,196,45,113,249,117,31,132,46,
2167 198,163,170,210,211,21,9,19,128,230,151,45,59,191,80,42,131,204,201,76,
2168 239,37,119,76,93,183,90,136,110,164,76,30,218,189,153,187,71,118,52,254,
2169 150,217,49,248,62,230,245,186,19,16,79,240,112,124,129,19,143,167,1,146,
2170 34,59,18,145,3,189,253,213,1,252,234,253,16,188,204,122,189,3,3,16,79,120,
2171 61,193,5,145,29,97,21,34,20,24,64,51,250,13,113,163,50,64,105,73,197,177,
2172 54,8,226,109,151,42,178,47,54,81,226,1,64,52,172,132,116,77,217,233,216,
2173 101,134,63,254,224,248,144,221,248,134,243,251,65,185,185,246,88,182,44,
2174 98,31,122,184,149,114,106,166,169,20,85,13,97,29,6,248,210,191,215,19,212,
2175 117,29,77,211,42,103,218,37,152,121,227,50,98,160,166,97,91,18,128,206,
2176 171,163,20,103,28,242,247,39,57,181,111,107,13,128,26,50,12,163,58,68,225,
2177 43,220,73,121,189,45,123,224,220,132,199,26,254,180,196,156,81,253,147,
2178 214,253,9,13,195,192,52,205,122,203,106,106,98,174,232,31,32,40,136,150,
2179 0,218,9,209,84,29,104,7,68,211,133,40,104,8,95,149,208,48,12,76,43,152,
2180 98,229,187,23,24,74,12,253,108,30,77,117,109,161,84,169,25,43,58,47,30,
2181 113,140,231,164,229,237,202,0,125,79,166,155,6,81,35,157,8,101,117,27,11,
2182 152,2,160,108,175,175,128,187,248,204,65,70,189,249,238,135,167,147,139,
2183 77,3,32,22,65,235,128,144,191,195,108,189,27,74,192,44,226,183,129,5,211,
2184 142,91,128,240,156,219,160,184,214,26,136,5,97,77,65,9,9,143,61,40,143,
2185 242,138,68,197,20,15,192,73,114,173,1,72,192,132,168,6,170,235,108,115,
2186 164,170,2,4,63,17,73,248,105,130,85,123,12,104,35,64,147,16,237,155,9,27,
2187 132,104,239,80,186,2,33,157,234,20,237,159,138,37,88,102,25,28,155,2,58,
2188 223,136,121,194,193,221,11,234,64,96,46,147,17,167,199,51,226,204,212,154,
2189 31,13,153,27,3,240,7,226,158,188,146,190,238,182,255,205,197,228,63,128,
2190 75,42,29,5,155,146,254,14,96,59,207,68,189,4,63,42,18,150,32,64,58,179,
2191 127,199,126,1,226,42,223,28,85,35,230,39,0,0,0,0,73,69,78,68,174,66,96,
2192 130};
2193 
2194 static size_t xml_res_size_31 = 1110;
2195 static unsigned char xml_res_file_31[] = {
2196 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
2197 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
2198 72,89,115,0,0,4,198,0,0,4,198,1,67,50,23,10,0,0,0,25,116,69,88,116,83,111,
2199 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
2200 111,114,103,155,238,60,26,0,0,3,211,73,68,65,84,88,133,181,151,77,108,84,
2201 85,20,199,127,231,205,180,99,75,90,153,6,91,208,82,67,44,73,149,88,173,
2202 118,106,92,64,23,26,67,217,24,53,22,141,113,225,74,131,214,68,91,52,148,
2203 143,9,177,104,68,36,49,152,70,13,38,117,225,71,74,82,54,13,2,146,128,138,
2204 11,27,170,80,148,64,196,16,107,83,105,196,78,117,106,103,94,233,123,199,
2205 197,56,227,76,231,190,233,188,166,158,228,109,206,61,231,127,126,185,247,
2206 220,123,223,21,85,197,175,73,207,208,26,92,235,211,92,39,49,221,217,220,
2207 230,87,43,232,187,58,128,74,4,184,47,215,7,178,123,120,133,70,239,189,230,
2208 71,202,90,20,128,75,147,209,47,238,93,126,165,22,7,96,201,221,102,0,235,
2209 255,7,144,215,135,87,161,180,24,7,213,53,251,11,233,21,219,132,178,251,
2210 204,131,136,244,130,174,93,32,242,39,84,183,104,180,249,132,111,0,233,62,
2211 245,5,200,44,34,31,179,162,228,176,190,116,127,66,246,141,44,99,198,126,
2212 11,228,57,64,138,162,5,5,125,143,242,208,86,237,106,252,91,246,141,44,35,
2213 113,253,97,112,159,68,41,209,93,145,141,121,0,178,237,203,199,17,237,207,
2214 18,153,198,10,124,69,105,217,157,192,234,34,11,207,183,49,132,31,80,54,
2215 0,229,255,225,233,99,26,141,12,100,0,228,192,229,16,191,141,93,2,110,205,
2216 147,8,150,166,190,165,181,43,132,151,223,174,29,245,118,170,9,199,127,125,
2217 197,88,28,96,110,54,245,45,173,173,33,22,123,25,210,7,145,37,53,20,234,
2218 197,52,64,214,76,84,134,2,52,173,76,205,234,247,87,103,248,203,118,124,
2219 50,200,77,144,221,3,221,39,187,65,122,40,212,104,193,82,170,42,202,233,
2220 221,84,71,251,186,170,76,160,2,253,63,78,178,229,200,40,147,137,185,133,
2221 42,59,160,157,186,43,242,78,14,0,128,108,255,250,9,212,233,3,66,166,204,
2222 112,89,144,111,159,109,100,109,117,165,81,121,244,207,89,154,62,184,80,
2223 0,66,166,81,221,172,209,230,35,105,79,206,65,164,123,214,127,134,59,183,
2224 195,11,253,237,135,106,169,14,41,201,100,210,56,94,119,99,41,189,155,234,
2225 188,210,65,180,51,187,120,30,64,42,72,170,76,185,21,161,0,143,52,132,1,
2226 176,109,219,19,162,125,93,21,149,161,128,25,192,149,91,230,187,242,1,172,
2227 192,61,166,220,198,154,178,156,230,240,130,16,200,52,103,190,182,54,47,
2228 12,224,97,166,77,98,219,54,182,109,23,21,235,101,249,0,174,243,157,41,240,
2229 252,68,194,40,156,76,38,115,32,20,56,123,117,198,92,205,149,51,11,3,136,
2230 53,101,202,141,219,14,135,46,76,26,117,179,33,62,57,255,135,247,153,32,
2231 58,158,239,202,222,134,59,78,63,141,235,124,8,90,98,202,95,126,67,128,211,
2232 207,52,80,91,105,62,154,127,183,45,90,250,46,19,75,122,1,16,199,213,118,
2233 141,70,142,166,93,153,25,144,109,39,119,226,206,125,228,85,28,96,42,233,
2234 176,190,239,18,3,23,99,57,203,161,192,192,197,24,45,239,159,35,54,157,240,
2235 74,7,165,2,145,65,121,109,248,197,76,93,85,69,182,159,122,23,229,121,239,
2236 204,124,171,8,5,104,172,41,3,96,100,34,65,60,123,218,139,185,192,148,253,
2237 26,109,238,76,221,5,174,78,32,197,94,245,41,139,219,14,223,140,78,155,7,
2238 13,119,71,158,137,94,131,244,18,220,188,122,47,240,139,47,130,133,172,240,
2239 45,122,133,112,120,127,6,64,59,234,109,84,182,206,11,154,194,178,14,131,
2240 142,45,30,194,30,71,221,99,64,238,190,84,237,210,142,122,59,3,0,160,111,
2241 180,30,2,78,0,131,168,180,179,170,118,165,246,108,120,20,39,126,7,234,28,
2242 68,125,156,47,138,162,206,65,156,120,131,70,91,54,82,94,90,141,200,83,136,
2243 14,130,30,75,255,13,129,159,159,210,174,227,109,132,66,7,80,189,173,112,
2244 32,63,115,221,121,65,247,62,112,180,96,156,95,128,76,194,171,159,215,18,
2245 44,31,65,53,156,63,40,253,186,167,117,179,31,61,223,239,2,125,179,109,12,
2246 200,59,82,255,29,29,242,171,183,184,151,145,234,57,15,53,179,127,201,1,
2247 44,49,94,88,4,57,235,87,106,113,175,99,113,134,192,154,183,12,50,169,209,
2248 86,95,47,99,128,127,0,231,244,140,94,3,164,35,138,0,0,0,0,73,69,78,68,174,
2249 66,96,130};
2250 
2251 static size_t xml_res_size_32 = 914;
2252 static unsigned char xml_res_file_32[] = {
2253 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
2254 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
2255 72,89,115,0,0,5,7,0,0,5,7,1,236,210,93,151,0,0,0,25,116,69,88,116,83,111,
2256 102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,
2257 111,114,103,155,238,60,26,0,0,3,15,73,68,65,84,88,133,237,151,93,72,83,
2258 97,24,199,127,239,230,218,102,26,36,125,104,17,20,102,102,73,162,105,41,
2259 70,22,66,209,85,55,65,5,82,4,121,147,150,125,42,6,65,69,132,4,101,23,65,
2260 16,20,81,65,17,20,131,40,251,162,46,42,40,115,73,177,18,179,32,178,154,
2261 105,68,31,150,231,52,207,222,46,206,113,31,109,122,206,50,240,34,255,55,
2262 123,207,115,254,123,158,223,158,243,188,123,55,33,165,100,36,101,27,209,
2263 234,163,0,64,146,21,147,216,223,210,0,212,37,148,89,200,13,114,79,209,105,
2264 51,219,136,119,96,196,1,146,68,253,157,101,224,72,29,212,225,74,214,176,
2265 145,69,162,187,85,138,2,177,207,251,101,72,143,8,126,23,236,190,251,18,
2266 73,214,160,38,187,3,28,206,4,171,91,86,187,249,16,106,1,253,53,2,34,9,141,
2267 92,94,83,196,11,0,30,51,7,31,153,244,99,79,152,192,210,46,64,11,128,128,
2268 212,36,141,195,162,145,10,154,112,163,70,89,250,112,114,142,21,236,144,
2269 219,248,78,114,76,10,27,65,118,113,150,12,241,137,131,114,3,221,164,25,
2270 113,139,42,237,111,161,89,91,77,37,158,152,226,0,110,84,42,241,240,76,172,
2271 161,140,39,49,247,151,226,165,65,28,163,134,11,108,22,23,67,113,75,29,200,
2272 228,61,151,68,29,174,126,21,5,112,205,88,4,243,214,193,148,66,221,240,161,
2273 5,158,157,129,206,251,76,199,79,147,216,66,158,60,79,7,211,66,57,222,146,
2274 142,68,32,144,188,145,25,161,184,233,16,218,8,114,77,212,80,140,15,16,176,
2275 244,0,206,210,173,184,220,127,180,89,6,225,209,81,184,181,19,144,60,32,
2276 143,197,242,4,193,136,38,103,209,73,58,159,184,71,254,64,168,221,244,17,
2277 172,229,166,81,28,200,223,8,69,85,168,191,2,40,138,18,109,20,54,40,222,
2278 14,133,155,0,40,229,41,235,185,26,101,233,96,90,100,113,227,3,154,168,76,
2279 120,245,133,123,60,148,237,13,197,85,85,141,133,0,40,111,0,183,62,96,229,
2280 162,217,44,189,57,64,62,237,250,34,163,16,198,140,141,186,23,23,98,76,10,
2281 76,93,8,64,33,109,195,3,112,163,50,147,119,250,197,164,220,184,158,184,
2282 16,147,243,0,152,197,91,146,137,211,37,171,0,125,56,249,74,138,126,241,
2283 227,227,160,62,85,85,81,213,136,173,217,235,7,224,11,169,252,196,245,247,
2284 0,0,173,100,235,139,174,214,33,125,138,162,132,33,252,250,220,180,144,99,
2285 150,222,28,192,203,108,125,209,211,6,175,174,155,67,248,46,67,183,190,107,
2286 154,153,59,124,128,147,114,37,223,48,134,239,230,214,80,123,227,170,215,
2287 143,114,165,10,85,131,175,164,112,92,174,26,62,128,159,9,212,203,106,163,
2288 64,23,156,42,129,231,23,32,24,8,155,130,1,61,118,170,4,122,187,80,2,176,
2289 165,191,134,247,76,52,5,48,63,142,13,29,19,135,168,160,41,28,176,59,195,
2290 59,163,219,7,90,120,8,207,177,130,106,89,171,159,160,118,199,80,105,45,
2291 28,199,134,170,101,45,183,89,192,17,209,72,26,223,244,130,198,176,13,232,
2292 51,227,216,46,183,225,97,137,30,8,24,80,67,64,88,6,0,240,176,132,7,50,143,
2293 229,60,100,190,104,163,192,248,146,122,66,54,94,153,195,13,138,233,97,124,
2294 244,155,76,32,44,63,130,97,43,254,227,48,63,140,254,153,2,106,248,215,85,
2295 132,196,232,127,195,255,30,224,55,133,61,15,69,51,241,172,123,0,0,0,0,73,
2296 69,78,68,174,66,96,130};
2297 
2298 static size_t xml_res_size_33 = 759;
2299 static unsigned char xml_res_file_33[] = {
2300 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,
2301 0,115,122,122,244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
2302 72,89,115,0,0,5,163,0,0,5,163,1,164,52,119,130,0,0,0,25,116,69,88,116,83,
2303 111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
2304 46,111,114,103,155,238,60,26,0,0,2,116,73,68,65,84,88,133,197,151,75,104,
2305 19,97,16,128,191,217,236,174,122,16,169,151,82,188,249,194,39,136,86,105,
2306 21,27,3,90,60,120,21,196,199,177,55,241,110,250,72,19,26,209,90,69,177,
2307 136,96,15,30,60,8,245,224,81,16,193,90,65,69,91,8,72,75,209,131,32,52,69,
2308 4,123,176,180,110,154,29,15,33,193,184,221,60,54,15,7,254,203,254,243,248,
2309 152,153,127,254,127,69,85,9,42,18,159,222,142,145,109,209,254,195,31,130,
2310 250,48,130,5,126,187,89,18,83,119,16,119,6,149,35,65,131,3,152,213,5,158,
2311 177,49,150,47,35,86,31,104,75,238,171,86,229,35,48,128,36,166,206,34,122,
2312 29,101,107,241,134,17,106,40,128,196,167,59,16,247,54,208,185,182,70,109,
2313 25,16,191,38,148,107,239,91,201,132,134,17,46,1,82,194,71,26,228,123,69,
2314 209,84,135,52,214,254,180,36,128,140,143,135,72,181,94,193,48,99,152,246,
2315 166,138,28,87,46,14,112,70,7,218,95,172,9,32,253,111,194,184,171,163,40,
2316 251,0,48,237,220,170,175,44,161,198,73,141,29,124,87,0,144,190,201,54,212,
2317 29,65,245,188,71,189,49,16,63,81,186,52,214,254,73,136,190,186,8,122,31,
2318 101,163,175,122,99,32,210,24,238,49,3,139,103,40,15,129,140,175,234,170,
2319 147,91,245,149,54,92,227,81,161,7,164,119,114,15,100,71,81,34,190,38,117,
2320 207,132,164,188,167,160,119,226,28,232,8,202,150,198,67,72,202,115,23,104,
2321 50,252,4,75,118,33,220,34,119,108,138,165,206,229,240,29,68,0,50,240,122,
2322 55,89,247,46,202,41,207,102,33,19,114,3,205,60,240,26,155,47,225,159,177,
2323 237,85,74,149,28,163,154,232,154,5,186,165,119,226,52,48,140,234,254,194,
2324 102,62,11,150,245,67,7,58,190,122,92,39,62,250,55,245,95,82,209,117,172,
2325 201,240,115,236,240,1,68,123,16,153,47,130,112,86,130,63,40,42,5,0,208,
2326 24,174,38,35,99,56,191,119,98,24,113,132,95,0,184,154,109,10,64,1,228,102,
2327 247,146,14,117,13,98,201,14,96,12,113,107,234,200,192,87,169,14,134,23,
2328 128,30,137,7,123,85,229,165,38,99,200,149,230,191,2,212,42,85,151,64,238,
2329 125,89,199,252,183,189,101,21,237,13,235,9,149,119,95,125,15,44,164,183,
2330 33,50,85,86,47,179,2,90,126,108,55,182,4,21,140,237,198,247,64,25,136,230,
2331 52,161,47,132,46,54,239,20,120,32,228,51,161,204,133,154,222,244,129,32,
2332 0,76,123,14,147,136,70,59,211,205,159,3,217,204,28,206,114,68,163,135,210,
2333 208,236,65,36,50,139,197,9,29,58,158,206,127,170,190,4,182,177,136,147,
2334 125,92,181,157,226,96,91,87,53,118,180,232,47,234,15,114,76,236,98,147,
2335 84,227,24,0,0,0,0,73,69,78,68,174,66,96,130};
2336 
2337 static size_t xml_res_size_34 = 3670;
2338 static unsigned char xml_res_file_34[] = {
2339 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
2340 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
2341 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
2342 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
2343 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
2344 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
2345 45,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,
2346 120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,97,98,111,117,116,
2347 51,50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,
2348 99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,
2349 111,110,95,97,98,111,117,116,51,50,46,112,110,103,60,47,111,98,106,101,
2350 99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,
2351 119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,97,100,100,51,
2352 50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,
2353 112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,
2354 110,95,97,100,100,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,
2355 32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,
2356 116,109,97,112,34,32,110,97,109,101,61,34,99,104,97,114,116,51,50,34,62,
2357 77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,
2358 36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
2359 99,104,97,114,116,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,
2360 32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,
2361 116,109,97,112,34,32,110,97,109,101,61,34,99,108,111,115,101,51,50,34,62,
2362 77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,
2363 36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
2364 99,108,111,115,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,
2365 10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,
2366 105,116,109,97,112,34,32,110,97,109,101,61,34,99,111,112,121,51,50,34,62,
2367 77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,
2368 36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
2369 99,111,112,121,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,
2370 32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,
2371 109,97,112,34,32,110,97,109,101,61,34,100,97,116,97,82,101,112,111,114,
2372 116,51,50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,
2373 46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,
2374 98,111,110,95,100,97,116,97,82,101,112,111,114,116,51,50,46,112,110,103,
2375 60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,
2376 108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,
2377 61,34,100,101,108,101,116,101,51,50,34,62,77,97,105,110,70,114,97,109,101,
2378 66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,
2379 103,101,115,95,114,105,98,98,111,110,95,100,101,108,101,116,101,51,50,46,
2380 112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,
2381 116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,
2382 97,109,101,61,34,100,114,97,103,51,50,34,62,77,97,105,110,70,114,97,109,
2383 101,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,
2384 97,103,101,115,95,114,105,98,98,111,110,95,100,114,97,103,51,50,46,112,
2385 110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,
2386 32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,
2387 101,61,34,101,120,105,116,51,50,34,62,77,97,105,110,70,114,97,109,101,66,
2388 105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,
2389 101,115,95,114,105,98,98,111,110,95,101,120,105,116,51,50,46,112,110,103,
2390 60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,
2391 108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,
2392 61,34,102,97,117,108,116,51,50,34,62,77,97,105,110,70,114,97,109,101,66,
2393 105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,
2394 101,115,95,114,105,98,98,111,110,95,102,97,117,108,116,51,50,46,112,110,
2395 103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,
2396 99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,
2397 101,61,34,102,97,117,108,116,80,111,119,101,114,51,50,34,62,77,97,105,110,
2398 70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,
2399 97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,102,97,117,108,
2400 116,80,111,119,101,114,51,50,46,112,110,103,60,47,111,98,106,101,99,116,
2401 62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,
2402 66,105,116,109,97,112,34,32,110,97,109,101,61,34,102,105,116,51,50,34,62,
2403 77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,
2404 36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
2405 102,105,116,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,
2406 60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,
2407 109,97,112,34,32,110,97,109,101,61,34,103,117,105,100,101,51,50,34,62,77,
2408 97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,
2409 100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,103,
2410 117,105,100,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,
2411 32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,
2412 116,109,97,112,34,32,110,97,109,101,61,34,108,111,103,111,49,50,56,34,62,
2413 77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,
2414 36,100,97,116,97,95,105,109,97,103,101,115,95,108,111,103,111,49,50,56,
2415 46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,
2416 99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,
2417 97,109,101,61,34,108,111,103,111,49,54,34,62,77,97,105,110,70,114,97,109,
2418 101,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,
2419 97,103,101,115,95,108,111,103,111,49,54,46,112,110,103,60,47,111,98,106,
2420 101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,
2421 34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,108,111,103,
2422 111,50,53,54,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,
2423 115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,108,111,
2424 103,111,50,53,54,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,
2425 60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,
2426 109,97,112,34,32,110,97,109,101,61,34,108,111,103,111,51,50,34,62,77,97,
2427 105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,100,
2428 97,116,97,95,105,109,97,103,101,115,95,108,111,103,111,51,50,46,112,110,
2429 103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,
2430 99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,
2431 101,61,34,108,111,103,111,54,52,34,62,77,97,105,110,70,114,97,109,101,66,
2432 105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,
2433 101,115,95,108,111,103,111,54,52,46,112,110,103,60,47,111,98,106,101,99,
2434 116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,
2435 120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,109,111,118,101,51,
2436 50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,
2437 112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,
2438 110,95,109,111,118,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,
2439 62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,
2440 66,105,116,109,97,112,34,32,110,97,109,101,61,34,110,101,119,51,50,34,62,
2441 77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,
2442 36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,
2443 110,101,119,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,
2444 60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,
2445 109,97,112,34,32,110,97,109,101,61,34,111,112,101,110,51,50,34,62,77,97,
2446 105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,100,
2447 97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,111,112,
2448 101,110,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,
2449 111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,
2450 97,112,34,32,110,97,109,101,61,34,112,97,115,116,101,51,50,34,62,77,97,
2451 105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,100,
2452 97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,112,97,
2453 115,116,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,
2454 60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,
2455 109,97,112,34,32,110,97,109,101,61,34,112,97,117,115,101,83,116,111,112,
2456 112,101,100,51,50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,
2457 97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,
2458 114,105,98,98,111,110,95,112,97,117,115,101,83,116,111,112,112,101,100,
2459 51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,
2460 106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,
2461 34,32,110,97,109,101,61,34,112,108,97,121,83,116,111,112,112,101,100,51,
2462 50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,
2463 112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,
2464 110,95,112,108,97,121,83,116,111,112,112,101,100,51,50,46,112,110,103,60,
2465 47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,
2466 97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,
2467 34,112,111,119,101,114,70,76,111,119,51,50,34,62,77,97,105,110,70,114,97,
2468 109,101,66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,
2469 109,97,103,101,115,95,114,105,98,98,111,110,95,112,111,119,101,114,70,76,
2470 111,119,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,
2471 111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,
2472 97,112,34,32,110,97,109,101,61,34,114,101,100,111,51,50,34,62,77,97,105,
2473 110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,100,97,
2474 116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,114,101,100,
2475 111,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,
2476 98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,
2477 112,34,32,110,97,109,101,61,34,114,101,115,101,116,51,50,34,62,77,97,105,
2478 110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,100,97,
2479 116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,114,101,115,
2480 101,116,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,
2481 111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,
2482 97,112,34,32,110,97,109,101,61,34,114,111,116,97,116,101,67,108,111,99,
2483 107,51,50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,
2484 46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,
2485 98,111,110,95,114,111,116,97,116,101,67,108,111,99,107,51,50,46,112,110,
2486 103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,
2487 99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,
2488 101,61,34,114,111,116,97,116,101,67,111,117,110,116,101,114,67,108,111,
2489 99,107,51,50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,
2490 115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,
2491 98,98,111,110,95,114,111,116,97,116,101,67,111,117,110,116,101,114,67,108,
2492 111,99,107,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,
2493 60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,
2494 109,97,112,34,32,110,97,109,101,61,34,115,97,118,101,51,50,34,62,77,97,
2495 105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,100,
2496 97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,115,97,
2497 118,101,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,
2498 111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,
2499 97,112,34,32,110,97,109,101,61,34,115,97,118,101,65,115,51,50,34,62,77,
2500 97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,99,112,112,36,
2501 100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,111,110,95,115,
2502 97,118,101,65,115,51,50,46,112,110,103,60,47,111,98,106,101,99,116,62,10,
2503 32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,
2504 116,109,97,112,34,32,110,97,109,101,61,34,115,101,116,116,105,110,103,115,
2505 51,50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,46,
2506 99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,98,
2507 111,110,95,115,101,116,116,105,110,103,115,51,50,46,112,110,103,60,47,111,
2508 98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,
2509 115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,115,
2510 110,97,112,51,50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,
2511 112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,
2512 105,98,98,111,110,95,115,110,97,112,51,50,46,112,110,103,60,47,111,98,106,
2513 101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,
2514 34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,117,110,100,
2515 111,51,50,34,62,77,97,105,110,70,114,97,109,101,66,105,116,109,97,112,115,
2516 46,99,112,112,36,100,97,116,97,95,105,109,97,103,101,115,95,114,105,98,
2517 98,111,110,95,117,110,100,111,51,50,46,112,110,103,60,47,111,98,106,101,
2518 99,116,62,10,60,47,114,101,115,111,117,114,99,101,62,10};
2519 
2520 void wxC9ED9InitBitmapResources()
2521 {
2522 
2523  // Check for memory FS. If not present, load the handler:
2524  {
2525  wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
2526  wxFileSystem fsys;
2527  wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
2528  wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
2529  if (f) delete f;
2530  else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
2531  }
2532 
2533  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_about32.png"), xml_res_file_0, xml_res_size_0, wxT("image/png"));
2534  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_add32.png"), xml_res_file_1, xml_res_size_1, wxT("image/png"));
2535  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_chart32.png"), xml_res_file_2, xml_res_size_2, wxT("image/png"));
2536  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_close32.png"), xml_res_file_3, xml_res_size_3, wxT("image/png"));
2537  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_copy32.png"), xml_res_file_4, xml_res_size_4, wxT("image/png"));
2538  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_dataReport32.png"), xml_res_file_5, xml_res_size_5, wxT("image/png"));
2539  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_delete32.png"), xml_res_file_6, xml_res_size_6, wxT("image/png"));
2540  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_drag32.png"), xml_res_file_7, xml_res_size_7, wxT("image/png"));
2541  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_exit32.png"), xml_res_file_8, xml_res_size_8, wxT("image/png"));
2542  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_fault32.png"), xml_res_file_9, xml_res_size_9, wxT("image/png"));
2543  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_faultPower32.png"), xml_res_file_10, xml_res_size_10, wxT("image/png"));
2544  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_fit32.png"), xml_res_file_11, xml_res_size_11, wxT("image/png"));
2545  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_guide32.png"), xml_res_file_12, xml_res_size_12, wxT("image/png"));
2546  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_logo128.png"), xml_res_file_13, xml_res_size_13, wxT("image/png"));
2547  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_logo16.png"), xml_res_file_14, xml_res_size_14, wxT("image/png"));
2548  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_logo256.png"), xml_res_file_15, xml_res_size_15, wxT("image/png"));
2549  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_logo32.png"), xml_res_file_16, xml_res_size_16, wxT("image/png"));
2550  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_logo64.png"), xml_res_file_17, xml_res_size_17, wxT("image/png"));
2551  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_move32.png"), xml_res_file_18, xml_res_size_18, wxT("image/png"));
2552  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_new32.png"), xml_res_file_19, xml_res_size_19, wxT("image/png"));
2553  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_open32.png"), xml_res_file_20, xml_res_size_20, wxT("image/png"));
2554  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_paste32.png"), xml_res_file_21, xml_res_size_21, wxT("image/png"));
2555  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_pauseStopped32.png"), xml_res_file_22, xml_res_size_22, wxT("image/png"));
2556  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_playStopped32.png"), xml_res_file_23, xml_res_size_23, wxT("image/png"));
2557  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_powerFLow32.png"), xml_res_file_24, xml_res_size_24, wxT("image/png"));
2558  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_redo32.png"), xml_res_file_25, xml_res_size_25, wxT("image/png"));
2559  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_reset32.png"), xml_res_file_26, xml_res_size_26, wxT("image/png"));
2560  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_rotateClock32.png"), xml_res_file_27, xml_res_size_27, wxT("image/png"));
2561  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_rotateCounterClock32.png"), xml_res_file_28, xml_res_size_28, wxT("image/png"));
2562  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_save32.png"), xml_res_file_29, xml_res_size_29, wxT("image/png"));
2563  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_saveAs32.png"), xml_res_file_30, xml_res_size_30, wxT("image/png"));
2564  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_settings32.png"), xml_res_file_31, xml_res_size_31, wxT("image/png"));
2565  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_snap32.png"), xml_res_file_32, xml_res_size_32, wxT("image/png"));
2566  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$data_images_ribbon_undo32.png"), xml_res_file_33, xml_res_size_33, wxT("image/png"));
2567  XRC_ADD_FILE(wxT("XRC_resource/MainFrameBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_MainFrameBitmaps.xrc"), xml_res_file_34, xml_res_size_34, wxT("text/xml"));
2568  wxXmlResource::Get()->Load(wxT("memory:XRC_resource/MainFrameBitmaps.cpp$C__Users_NDSE-69_Documents_GitHub_PSP_Project_MainFrameBitmaps.xrc"));
2569 }
-
- - - - diff --git a/docs/doxygen/html/_math_operation_8cpp_source.html b/docs/doxygen/html/_math_operation_8cpp_source.html deleted file mode 100644 index 8d2f113..0000000 --- a/docs/doxygen/html/_math_operation_8cpp_source.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - -Project/MathOperation.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
MathOperation.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "MathOperation.h"
19 #include "ConnectionLine.h"
20 
21 MathOperation::MathOperation(int id) : ControlElement(id)
22 {
23  m_width = m_height = 36.0;
24  Node* nodeIn1 = new Node(m_position + wxPoint2DDouble(-18, -9), Node::NODE_IN, m_borderSize);
25  nodeIn1->StartMove(m_position);
26  Node* nodeIn2 = new Node(m_position + wxPoint2DDouble(-18, 9), Node::NODE_IN, m_borderSize);
27  nodeIn2->StartMove(m_position);
28  Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
29  nodeOut->SetAngle(180.0);
30  nodeOut->StartMove(m_position);
31  m_nodeList.push_back(nodeIn1);
32  m_nodeList.push_back(nodeIn2);
33  m_nodeList.push_back(nodeOut);
34 }
35 
36 MathOperation::~MathOperation() {}
37 void MathOperation::Draw(wxPoint2DDouble translation, double scale) const
38 {
39  glLineWidth(1.0);
40  if(m_selected) {
41  glColor4dv(m_selectionColour.GetRGBA());
42  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
43  DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
44  }
45  glColor4d(1.0, 1.0, 1.0, 1.0);
46  DrawRectangle(m_position, m_width, m_height);
47  glColor4d(0.0, 0.0, 0.0, 1.0);
48  DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
49 
50  // Draw personalized element symbol.
51  DrawSymbol();
52 
53  glColor4d(0.0, 0.0, 0.0, 1.0);
54  DrawNodes();
55 }
56 
57 void MathOperation::Rotate(bool clockwise)
58 {
59  if(clockwise)
60  m_angle += 90.0;
61  else
62  m_angle -= 90.0;
63  if(m_angle >= 360.0)
64  m_angle = 0.0;
65  else if(m_angle < 0)
66  m_angle = 270.0;
67 
68  UpdatePoints();
69 
70  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
71  Node* node = *it;
72  node->Rotate(clockwise);
73  }
74 }
75 
76 void MathOperation::UpdatePoints()
77 {
78  if(m_angle == 0.0) {
79  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, -9));
80  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 9));
81  m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(18, 0));
82  } else if(m_angle == 90.0) {
83  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(9, -18));
84  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-9, -18));
85  m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(0, 18));
86  } else if(m_angle == 180.0) {
87  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 9));
88  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, -9));
89  m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
90  } else if(m_angle == 270.0) {
91  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-9, 18));
92  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(9, 18));
93  m_nodeList[2]->SetPosition(m_position + wxPoint2DDouble(0, -18));
94  }
95 }
Node of a control element. This class manages the user interaction with the connection and control el...
- - -
virtual void Rotate(bool clockwise=true)
Rotate the element.
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
- -
-
- - - - diff --git a/docs/doxygen/html/_math_operation_8h.html b/docs/doxygen/html/_math_operation_8h.html index 3ebeefc..bd4fd30 100644 --- a/docs/doxygen/html/_math_operation_8h.html +++ b/docs/doxygen/html/_math_operation_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_math_operation_8h.html','');});
MathOperation.h File Reference
-
#include "ControlElement.h"
-
-

Go to the source code of this file.

- +
#include "ControlElement.h"
+
diff --git a/docs/doxygen/html/_math_operation_8h_source.html b/docs/doxygen/html/_math_operation_8h_source.html deleted file mode 100644 index 28b3981..0000000 --- a/docs/doxygen/html/_math_operation_8h_source.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - -Project/MathOperation.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  MathOperation
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
MathOperation.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef MATHOPERATION_H
19 #define MATHOPERATION_H
20 
21 #include "ControlElement.h"
22 
23 class ConnectionLine;
24 
33 {
34  public:
35  MathOperation(int id);
36  ~MathOperation();
37 
38  virtual void Draw(wxPoint2DDouble translation, double scale) const;
39  virtual void DrawSymbol() const {}
40  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
41  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
42  virtual bool ShowForm(wxWindow* parent, Element* element) { return false; }
43  virtual void Rotate(bool clockwise = true);
44 
45  virtual void UpdatePoints();
46 };
47 
48 #endif // MATHOPERATION_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: MathOperation.h:41
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: MathOperation.h:40
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
-
Abstract class that define the general behavior of math operation control block.
Definition: MathOperation.h:32
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
-
Connection between two control elements or other connection line and an element.
-
Base class of a control element. Provide general methods to other control classes.
- -
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: MathOperation.h:42
-
-
- - - - diff --git a/docs/doxygen/html/_multiplier_8cpp_source.html b/docs/doxygen/html/_multiplier_8cpp_source.html deleted file mode 100644 index cb88e21..0000000 --- a/docs/doxygen/html/_multiplier_8cpp_source.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - -Project/Multiplier.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Multiplier.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Multiplier.h"
19 #include "ConnectionLine.h"
20 
21 Multiplier::Multiplier(int id) : MathOperation(id) {}
22 Multiplier::~Multiplier() {}
23 void Multiplier::DrawSymbol() const
24 {
25  // Plot x.
26  glLineWidth(2.0);
27  std::vector<wxPoint2DDouble> xSymbol;
28  xSymbol.push_back(m_position + wxPoint2DDouble(-5, -5));
29  xSymbol.push_back(m_position + wxPoint2DDouble(5, 5));
30  xSymbol.push_back(m_position + wxPoint2DDouble(-5, 5));
31  xSymbol.push_back(m_position + wxPoint2DDouble(5, -5));
32  glColor4d(0.0, 0.3, 1.0, 1.0);
33  DrawLine(xSymbol, GL_LINES);
34 }
35 
36 bool Multiplier::Solve(double input, double timeStep)
37 {
38  std::vector<double> inputVector;
39  for(auto itN = m_nodeList.begin(), itNEnd = m_nodeList.end(); itN != itNEnd; ++itN) {
40  Node* node = *itN;
41  if(node->GetNodeType() != Node::NODE_OUT) {
42  if(!node->IsConnected()) {
43  inputVector.push_back(1.0);
44  } else {
45  for(auto itC = m_childList.begin(), itCEnd = m_childList.end(); itC != itCEnd; ++itC) {
46  ConnectionLine* cLine = static_cast<ConnectionLine*>(*itC);
47  auto nodeList = cLine->GetNodeList();
48  for(auto itCN = nodeList.begin(), itCNEnd = nodeList.end(); itCN != itCNEnd; ++itCN) {
49  Node* childNode = *itCN;
50  if(childNode == node) {
51  inputVector.push_back(cLine->GetValue());
52  break;
53  }
54  }
55  }
56  }
57  }
58  }
59 
60  m_output = 1.0;
61  for(unsigned int i = 0; i < inputVector.size(); ++i) {
62  m_output *= inputVector[i];
63  }
64 
65  return true;
66 }
67 
69 {
70  Multiplier* copy = new Multiplier(m_elementID);
71  *copy = *this;
72  return copy;
73 }
Multiplies two inputs.
Definition: Multiplier.h:32
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void DrawLine(std::vector< wxPoint2DDouble > points, GLenum mode=GL_LINE_STRIP) const
Draw line.
Definition: Element.cpp:89
-
Node of a control element. This class manages the user interaction with the connection and control el...
- - -
Abstract class that define the general behavior of math operation control block.
Definition: MathOperation.h:32
-
Connection between two control elements or other connection line and an element.
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Multiplier.cpp:68
-
-
- - - - diff --git a/docs/doxygen/html/_multiplier_8h.html b/docs/doxygen/html/_multiplier_8h.html index 1d34e78..47a035e 100644 --- a/docs/doxygen/html/_multiplier_8h.html +++ b/docs/doxygen/html/_multiplier_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_multiplier_8h.html','');});
Multiplier.h File Reference
-
#include "MathOperation.h"
-
-

Go to the source code of this file.

- +
#include "MathOperation.h"
+
diff --git a/docs/doxygen/html/_multiplier_8h_source.html b/docs/doxygen/html/_multiplier_8h_source.html deleted file mode 100644 index c2ad57d..0000000 --- a/docs/doxygen/html/_multiplier_8h_source.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - -Project/Multiplier.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Multiplier
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Multiplier.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef MULTIPLIER_H
19 #define MULTIPLIER_H
20 
21 #include "MathOperation.h"
22 
23 class ConnectionLine;
24 
32 class Multiplier : public MathOperation
33 {
34  public:
35  Multiplier(int id);
36  ~Multiplier();
37 
38  virtual void DrawSymbol() const;
39  virtual bool Solve(double input, double timeStep);
40  virtual Element* GetCopy();
41 };
42 
43 #endif // MULTIPLIER_H
Multiplies two inputs.
Definition: Multiplier.h:32
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
Abstract class that define the general behavior of math operation control block.
Definition: MathOperation.h:32
-
Connection between two control elements or other connection line and an element.
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Multiplier.cpp:68
-
-
- - - - diff --git a/docs/doxygen/html/_open_g_l_text_8cpp_source.html b/docs/doxygen/html/_open_g_l_text_8cpp_source.html deleted file mode 100644 index 0d57066..0000000 --- a/docs/doxygen/html/_open_g_l_text_8cpp_source.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - -Project/OpenGLText.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
OpenGLText.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "OpenGLText.h"
19 #include <wx/log.h>
20 
21 OpenGLText::OpenGLText() { Init(); }
22 OpenGLText::OpenGLText(wxString text)
23 {
24  Init();
25  SetText(text);
26 }
27 
28 OpenGLText::~OpenGLText()
29 {
30  if(m_textureID) {
31  glDeleteTextures(1, &m_textureID[0]);
32  }
33 }
34 
35 void OpenGLText::Init()
36 {
37  m_textCoord = new wxPoint2DDouble[2];
38  m_textCoord[0] = wxPoint2DDouble(0, 1);
39  m_textCoord[1] = wxPoint2DDouble(1, 0);
40 }
41 
42 void OpenGLText::Draw(wxPoint2DDouble position) const
43 {
44  if(m_textureID) {
45  glPushMatrix();
46 
47  glTranslated(position.m_x - m_bitmapSize.GetWidth() / 2, position.m_y - m_bitmapSize.GetHeight() / 2, 0);
48 
49  glEnable(GL_TEXTURE_2D);
50  glBindTexture(GL_TEXTURE_2D, m_textureID[0]);
51 
52  glBegin(GL_QUADS);
53 
54  glTexCoord2f(m_textCoord[0].m_x, m_textCoord[0].m_y);
55  glVertex2f(0, 0);
56 
57  glTexCoord2f(m_textCoord[1].m_x, m_textCoord[0].m_y);
58  glVertex2f(m_bitmapSize.GetWidth(), 0);
59 
60  glTexCoord2f(m_textCoord[1].m_x, m_textCoord[1].m_y);
61  glVertex2f(m_bitmapSize.GetWidth(), m_bitmapSize.GetHeight());
62 
63  glTexCoord2f(m_textCoord[0].m_x, m_textCoord[1].m_y);
64  glVertex2f(0, m_bitmapSize.GetHeight());
65  glEnd();
66 
67  glDisable(GL_TEXTURE_2D);
68 
69  glPopMatrix();
70  }
71 }
72 
73 void OpenGLText::SetText(wxString text)
74 {
75  m_text = text;
76  TextToBitmap();
77  LoadTextTexture();
78 }
79 
80 int OpenGLText::RoundToPowerOfTwo(int value, int min)
81 {
82  //[Ref] https://stackoverflow.com/questions/466204/rounding-up-to-next-power-of-2
83  double baseOfTwo = std::log(static_cast<double>(value)) / std::log(2.0);
84  int powerOfTwo = static_cast<int>(std::pow(2.0, static_cast<int>(std::ceil(baseOfTwo))));
85  return std::max(min, powerOfTwo);
86 }
87 
88 void OpenGLText::TextToBitmap()
89 {
90  wxFont font = wxFont(m_fontSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
91 
92  wxMemoryDC memDC;
93  memDC.SetFont(font);
94  m_bitmapSize = memDC.GetTextExtent(m_text);
95 
96  int p2w = RoundToPowerOfTwo(m_bitmapSize.GetWidth());
97  int p2h = RoundToPowerOfTwo(m_bitmapSize.GetHeight());
98 
99  m_bitmap = wxBitmap(p2w, p2h);
100 
101  memDC.SelectObject(m_bitmap);
102  memDC.SetBackground(*wxWHITE_BRUSH);
103  memDC.Clear();
104  memDC.DrawText(m_text, 0, 0);
105 
106  m_textCoord[1].m_x = static_cast<double>(m_bitmapSize.GetWidth()) / static_cast<double>(p2w);
107  m_textCoord[1].m_y = 1.0 - static_cast<double>(m_bitmapSize.GetHeight()) / static_cast<double>(p2h);
108 }
109 
110 void OpenGLText::LoadTextTexture()
111 {
112  if(m_textureID) glDeleteTextures(1, &m_textureID[0]);
113  m_textureID = new GLuint[1];
114  glGenTextures(1, &m_textureID[0]);
115 
116  glBindTexture(GL_TEXTURE_2D, *m_textureID);
117 
118  wxImage img = m_bitmap.ConvertToImage();
119 
120  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
121 
122  const int w = img.GetWidth(), h = img.GetHeight();
123  int bytesPerPixel = 4;
124  GLubyte* bitmapData = img.GetData();
125  int imageSize = w * h * bytesPerPixel;
126  GLubyte* imageData = new GLubyte[imageSize];
127  int revVal = h - 1;
128 
129  for(int y = 0; y < h; y++) {
130  for(int x = 0; x < w; x++) {
131  imageData[(x + y * w) * bytesPerPixel + 0] = 255;
132  imageData[(x + y * w) * bytesPerPixel + 1] = 255;
133  imageData[(x + y * w) * bytesPerPixel + 2] = 255;
134 
135  // alpha
136  imageData[(x + y * w) * bytesPerPixel + 3] = 255 - bitmapData[(x + (revVal - y) * w) * 3];
137  }
138  }
139 
140  glTexImage2D(GL_TEXTURE_2D, 0, bytesPerPixel, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, imageData);
141  delete imageData;
142 
143  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
144  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
145 
146  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
147  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
148 }
149 
150 OpenGLText* OpenGLText::GetCopy()
151 {
152  OpenGLText* copy = new OpenGLText();
153  *copy = *this;
154  copy->m_textureID = NULL;
155  copy->m_bitmapSize = wxSize(0, 0);
156  copy->m_bitmap = wxNullBitmap;
157  copy->SetText(copy->m_text);
158  return copy;
159 }
160 
161 bool OpenGLText::IsTextureOK()
162 {
163  if(m_textureID) {
164  if(glIsTexture(m_textureID[0]) == GL_TRUE) return true;
165  }
166  return false;
167 }
-
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_open_g_l_text_8h.html b/docs/doxygen/html/_open_g_l_text_8h.html index bfb5807..f67de2b 100644 --- a/docs/doxygen/html/_open_g_l_text_8h.html +++ b/docs/doxygen/html/_open_g_l_text_8h.html @@ -92,9 +92,7 @@ $(document).ready(function(){initNavTree('_open_g_l_text_8h.html','');});
#include <GL/gl.h>
#include <wx/dcmemory.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_open_g_l_text_8h_source.html b/docs/doxygen/html/_open_g_l_text_8h_source.html deleted file mode 100644 index 5a066e2..0000000 --- a/docs/doxygen/html/_open_g_l_text_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/OpenGLText.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  OpenGLText
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
OpenGLText.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef OPENGLTEXT_H
19 #define OPENGLTEXT_H
20 
21 #include <GL/gl.h>
22 #include <wx/dcmemory.h>
23 
32 {
33  public:
34  OpenGLText();
35  OpenGLText(wxString text);
36  virtual ~OpenGLText();
37 
38  virtual void Draw(wxPoint2DDouble position) const;
39  virtual OpenGLText* GetCopy();
40 
41  virtual void SetText(wxString text);
42  virtual wxString GetText() const { return m_text; }
43  virtual int GetWidth() const { return m_bitmapSize.GetWidth(); }
44  virtual int GetHeight() const { return m_bitmapSize.GetHeight(); }
45  virtual bool IsTextureOK();
46  protected:
47  void Init();
48  int RoundToPowerOfTwo(int value, int min = 32);
49  void TextToBitmap();
50  void LoadTextTexture();
51 
52  wxString m_text = _("Text");
53  int m_fontSize = 10;
54 
55  wxBitmap m_bitmap = wxNullBitmap;
56  wxSize m_bitmapSize = wxSize(0, 0);
57  wxPoint2DDouble* m_textCoord = NULL;
58  GLuint* m_textureID = NULL;
59 };
60 
61 #endif // OPENGLTEXT_H
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_power_element_8cpp_source.html b/docs/doxygen/html/_power_element_8cpp_source.html deleted file mode 100644 index bc7ca72..0000000 --- a/docs/doxygen/html/_power_element_8cpp_source.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - -Project/PowerElement.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PowerElement.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "PowerElement.h"
19 #ifdef USING_WX_3_0_X
20 #include "DegreesAndRadians.h"
21 #endif
22 
24 {
25  m_busColour.SetRGBA(0.0, 0.3, 1.0, 1.0);
26  m_onlineElementColour.SetRGBA(0.2, 0.2, 0.2, 1.0);
27  m_offlineElementColour.SetRGBA(0.5, 0.5, 0.5, 1.0);
28  m_closedSwitchColour.SetRGBA(0.0, 0.4, 0.0, 1.0);
29  m_openedSwitchColour.SetRGBA(1.0, 0.1, 0.1, 1.0);
30  m_powerFlowArrowColour.SetRGBA(1.0, 0.51, 0.0, 1.0);
31  m_dynamicEventColour.SetRGBA(1.0, 0.51, 0.0, 1.0);
32 }
33 
35 void PowerElement::SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit)
36 {
37 }
38 
39 wxPoint2DDouble PowerElement::GetSwitchPoint(Element* parent,
40  wxPoint2DDouble parentPoint,
41  wxPoint2DDouble secondPoint) const
42 {
43  double swLineSize = 25.0;
44  wxPoint2DDouble swPoint = wxPoint2DDouble(parentPoint.m_x, parentPoint.m_y - swLineSize);
45 
46  // Rotate the second point (to compare).
47  double angle = parent->GetAngle();
48 
49  secondPoint =
50  wxPoint2DDouble(std::cos(wxDegToRad(-angle)) * (secondPoint.m_x - parentPoint.m_x) -
51  std::sin(wxDegToRad(-angle)) * (secondPoint.m_y - parentPoint.m_y) + parentPoint.m_x,
52  std::sin(wxDegToRad(-angle)) * (secondPoint.m_x - parentPoint.m_x) +
53  std::cos(wxDegToRad(-angle)) * (secondPoint.m_y - parentPoint.m_y) + parentPoint.m_y);
54 
55  // Rotate
56  if(secondPoint.m_y > parentPoint.m_y) angle -= 180.0;
57  return wxPoint2DDouble(std::cos(wxDegToRad(angle)) * (swPoint.m_x - parentPoint.m_x) -
58  std::sin(wxDegToRad(angle)) * (swPoint.m_y - parentPoint.m_y) + parentPoint.m_x,
59  std::sin(wxDegToRad(angle)) * (swPoint.m_x - parentPoint.m_x) +
60  std::cos(wxDegToRad(angle)) * (swPoint.m_y - parentPoint.m_y) + parentPoint.m_y);
61 }
62 
63 bool PowerElement::SwitchesContains(wxPoint2DDouble position) const
64 {
65  for(int i = 0; i < (int)m_switchRect.size(); i++) {
66  if(m_parentList[i]) {
67  if(m_switchRect[i].Contains(position)) return true;
68  }
69  }
70  return false;
71 }
72 
74 {
75  // General method, to one switch only.
76  wxPoint2DDouble swCenter = wxPoint2DDouble((m_pointList[0].m_x + m_pointList[1].m_x) / 2.0,
77  (m_pointList[0].m_y + m_pointList[1].m_y) / 2.0);
78  m_switchRect[0] = wxRect2DDouble(swCenter.m_x - m_switchSize / 2.0, swCenter.m_y - m_switchSize / 2.0, m_switchSize,
79  m_switchSize);
80 }
81 
83 {
84  int i = 0;
85  for(auto it = m_parentList.begin(); it != m_parentList.end(); it++) {
86  Element* parent = *it;
87  if(parent) {
88  if(m_online) {
89  glColor4dv(m_closedSwitchColour.GetRGBA());
90  } else {
91  glColor4dv(m_openedSwitchColour.GetRGBA());
92  }
93 
94  glPushMatrix();
95  glTranslated(m_switchRect[i].GetPosition().m_x + m_switchSize / 2.0,
96  m_switchRect[i].GetPosition().m_y + m_switchSize / 2.0, 0.0);
97  glRotated(parent->GetAngle(), 0.0, 0.0, 1.0);
98  glTranslated(-m_switchRect[i].GetPosition().m_x - m_switchSize / 2.0,
99  -m_switchRect[i].GetPosition().m_y - m_switchSize / 2.0, 0.0);
100 
101  DrawRectangle(m_switchRect[i].GetPosition() + wxPoint2DDouble(m_switchSize / 2.0, m_switchSize / 2.0),
102  m_switchSize, m_switchSize);
103 
104  glPopMatrix();
105  }
106  i++;
107  }
108 }
109 
110 void PowerElement::CalculatePowerFlowPts(std::vector<wxPoint2DDouble> edges)
111 {
112  double arrowRate = 100.0; // One arrow to each "arrowRate" distance in pixels.
113 
114  if(edges.size() < 2) return;
115 
116  // Clear all power flow points
117  for(int i = 0; i < (int)m_powerFlowArrow.size(); i++) m_powerFlowArrow[i].clear();
118  m_powerFlowArrow.clear();
119 
120  for(int i = 1; i < (int)edges.size(); i++) {
121  wxPoint2DDouble pt1 = edges[i - 1];
122  wxPoint2DDouble pt2 = edges[i];
123 
124  double angle = std::atan2(pt2.m_y - pt1.m_y, pt2.m_x - pt1.m_x);
125 
126  wxPoint2DDouble rotPt2(
127  std::cos(-angle) * (pt2.m_x - pt1.m_x) - std::sin(-angle) * (pt2.m_y - pt1.m_y) + pt1.m_x,
128  std::sin(-angle) * (pt2.m_x - pt1.m_x) + std::cos(-angle) * (pt2.m_y - pt1.m_y) + pt1.m_y);
129 
130  int numArrows = std::abs(pt1.m_x - rotPt2.m_x) / arrowRate;
131  if(numArrows == 0) numArrows = 1;
132 
133  for(int i = 0; i < numArrows; i++) {
134  wxPoint2DDouble arrowCenter(pt1.m_x + ((rotPt2.m_x - pt1.m_x) / double(numArrows + 1)) * double(i + 1),
135  pt1.m_y + ((rotPt2.m_y - pt1.m_y) / double(numArrows + 1)) * double(i + 1));
136 
137  std::vector<wxPoint2DDouble> triPts;
138  triPts.push_back(arrowCenter + wxPoint2DDouble(5.0, 0.0));
139  triPts.push_back(arrowCenter + wxPoint2DDouble(-5.0, 5.0));
140  triPts.push_back(arrowCenter + wxPoint2DDouble(-5.0, -5.0));
141 
142  // Rotate back.
143  for(int i = 0; i < 3; i++) {
144  triPts[i] = wxPoint2DDouble(
145  std::cos(angle) * (triPts[i].m_x - pt1.m_x) - std::sin(angle) * (triPts[i].m_y - pt1.m_y) + pt1.m_x,
146  std::sin(angle) * (triPts[i].m_x - pt1.m_x) + std::cos(angle) * (triPts[i].m_y - pt1.m_y) +
147  pt1.m_y);
148  }
149  m_powerFlowArrow.push_back(triPts);
150  }
151  }
152 }
153 
155 {
156  if(m_online) {
157  glColor4dv(m_powerFlowArrowColour.GetRGBA());
158  for(int i = 0; i < (int)m_powerFlowArrow.size(); i++) {
159  DrawTriangle(m_powerFlowArrow[i]);
160  }
161  }
162 }
163 
164 double PowerElement::GetValueFromUnit(double value, ElectricalUnit valueUnit)
165 {
166  switch(valueUnit) {
167  case UNIT_kV:
168  case UNIT_kA:
169  case UNIT_kW:
170  case UNIT_kVA:
171  case UNIT_kVAr: {
172  return value * 1e3;
173  } break;
174  case UNIT_MW:
175  case UNIT_MVA:
176  case UNIT_MVAr: {
177  return value * 1e6;
178  }
179  default:
180  break;
181  }
182  return value;
183 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void DrawTriangle(std::vector< wxPoint2DDouble > points, GLenum mode=GL_TRIANGLES) const
Draw a triangle.
Definition: Element.cpp:60
-
virtual void UpdateSwitches()
Update the switch position.
-
virtual void SetNominalVoltage(std::vector< double > nominalVoltage, std::vector< ElectricalUnit > nominalVoltageUnit)
Set nominal voltage of the element.
-
void SetRGBA(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
Set the colour in RGBA. The colour values must be between 0.0 and 1.0.
Definition: Element.cpp:369
- - -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
-
virtual void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode=GL_QUADS) const
Draw rectangle.
Definition: Element.cpp:69
- - - - -
virtual void CalculatePowerFlowPts(std::vector< wxPoint2DDouble > edges)
Calculate the points of the power flow arrows.
- -
virtual void DrawPowerFlowPts() const
Draw power flow arrows.
- -
PowerElement()
Constructor.
-
~PowerElement()
Destructor.
-
virtual void DrawSwitches() const
Draw switch.
-
virtual bool SwitchesContains(wxPoint2DDouble position) const
Check if switch contains position.
-
virtual bool Contains(wxPoint2DDouble position) const =0
Checks if the element contains a position.
-
virtual wxPoint2DDouble GetSwitchPoint(Element *parent, wxPoint2DDouble parentPoint, wxPoint2DDouble secondPoint) const
Get the correct switch position.
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
- -
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
-
- - - - diff --git a/docs/doxygen/html/_power_element_8h.html b/docs/doxygen/html/_power_element_8h.html index 5ad31ce..0f33f31 100644 --- a/docs/doxygen/html/_power_element_8h.html +++ b/docs/doxygen/html/_power_element_8h.html @@ -91,11 +91,9 @@ $(document).ready(function(){initNavTree('_power_element_8h.html','');});
PowerElement.h File Reference
-
#include "Element.h"
-#include "ElementPlotData.h"
-
-

Go to the source code of this file.

- +
#include "Element.h"
+#include "ElementPlotData.h"
+
@@ -226,8 +224,6 @@ Enumerations

Classes

class  SwitchingData
-

Definition at line 28 of file PowerElement.h.

-
@@ -260,8 +256,6 @@ Enumerations -

Definition at line 55 of file PowerElement.h.

- @@ -290,8 +284,6 @@ Enumerations -

Definition at line 78 of file PowerElement.h.

- @@ -314,8 +306,6 @@ Enumerations -

Definition at line 69 of file PowerElement.h.

- diff --git a/docs/doxygen/html/_power_element_8h_source.html b/docs/doxygen/html/_power_element_8h_source.html deleted file mode 100644 index 2dd1720..0000000 --- a/docs/doxygen/html/_power_element_8h_source.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - -Project/PowerElement.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PowerElement.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef POWERELEMENT_H
19 #define POWERELEMENT_H
20 
21 #include "Element.h"
22 #include "ElementPlotData.h"
23 
29  UNIT_PU = 0,
49 };
50 
55 enum FaultData {
63 };
64 
70  SW_INSERT = 0,
72 };
73 
79  PF_NONE = 0,
84 };
85 
93 struct SwitchingData {
94  std::vector<SwitchingType> swType;
95  std::vector<double> swTime;
96 };
97 
106  double c;
107  double m;
108 };
109 
117 class PowerElement : public Element
118 {
119  public:
123  PowerElement();
127  ~PowerElement();
128 
135  virtual wxPoint2DDouble GetSwitchPoint(Element* parent,
136  wxPoint2DDouble parentPoint,
137  wxPoint2DDouble secondPoint) const;
138 
143  virtual bool SwitchesContains(wxPoint2DDouble position) const;
144 
148  virtual void UpdateSwitches();
149 
153  virtual void DrawSwitches() const;
154 
159  virtual void CalculatePowerFlowPts(std::vector<wxPoint2DDouble> edges);
160 
164  virtual void DrawPowerFlowPts() const;
165 
171  virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit);
172 
177  virtual void SetSwitchingData(SwitchingData data) { m_swData = data; }
182  virtual SwitchingData GetSwitchingData() { return m_swData; }
187  virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection) { m_pfDirection = pfDirection; }
192  virtual PowerFlowDirection GetPowerFlowDirection() const { return m_pfDirection; }
198  virtual bool GetPlotData(ElementPlotData& plotData) { return false; }
203  virtual bool HaveDynamicEvent() const { return m_dynEvent; }
208  virtual void SetDynamicEvent(bool dynEvent = true) { m_dynEvent = dynEvent; }
209  virtual double GetValueFromUnit(double value, ElectricalUnit valueUnit);
210 
211  protected:
212  SwitchingData m_swData;
213  std::vector<std::vector<wxPoint2DDouble> > m_powerFlowArrow;
214  PowerFlowDirection m_pfDirection = PF_NONE;
215 
216  OpenGLColour m_busColour;
217  OpenGLColour m_onlineElementColour;
218  OpenGLColour m_offlineElementColour;
219  OpenGLColour m_closedSwitchColour;
220  OpenGLColour m_openedSwitchColour;
221  OpenGLColour m_powerFlowArrowColour;
222  OpenGLColour m_dynamicEventColour;
223 
224  bool m_dynEvent = false;
225 };
226 
227 #endif // POWERELEMENT_H
- -
std::vector< double > swTime
Definition: PowerElement.h:95
- -
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- - - -
FaultData
Information about fault (type and location).
Definition: PowerElement.h:55
-
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
Definition: PowerElement.h:187
-
virtual bool HaveDynamicEvent() const
Check if the power element have dynamic event.
Definition: PowerElement.h:203
- - -
std::vector< SwitchingType > swType
Definition: PowerElement.h:94
-
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- -
Integration constants to calculate dynamic elements through trapezoidal integration method...
Definition: PowerElement.h:105
-
virtual void SetDynamicEvent(bool dynEvent=true)
Set if the power element have dynamic event.
Definition: PowerElement.h:208
- - - - - -
virtual bool GetPlotData(ElementPlotData &plotData)
Fill the plot data.
Definition: PowerElement.h:198
-
Switching data of power elements.
Definition: PowerElement.h:93
- - - - - - - - - - - - - -
virtual PowerFlowDirection GetPowerFlowDirection() const
Return the direction of the power flow.
Definition: PowerElement.h:192
- -
virtual SwitchingData GetSwitchingData()
Returns the switching data of the element.
Definition: PowerElement.h:182
- -
SwitchingType
Type of switching.
Definition: PowerElement.h:69
- - -
Class to manage color of OpenGL.
Definition: Element.h:67
-
PowerFlowDirection
Direction of power flow arrows.
Definition: PowerElement.h:78
-
Abstract class of power elements.
Definition: PowerElement.h:117
- - - - - -
virtual void SetSwitchingData(SwitchingData data)
Set the switching data of the element.
Definition: PowerElement.h:177
- - - -
-
- - - - diff --git a/docs/doxygen/html/_power_flow_8cpp_source.html b/docs/doxygen/html/_power_flow_8cpp_source.html deleted file mode 100644 index 7c25975..0000000 --- a/docs/doxygen/html/_power_flow_8cpp_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -Project/PowerFlow.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PowerFlow.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "PowerFlow.h"
19 
20 PowerFlow::PowerFlow() : ElectricCalculation() {}
21 PowerFlow::PowerFlow(std::vector<Element*> elementList) : ElectricCalculation() { GetElementsFromList(elementList); }
22 PowerFlow::~PowerFlow() {}
23 bool PowerFlow::RunGaussSeidel(double systemPowerBase,
24  int maxIteration,
25  double error,
26  double initAngle,
27  double accFactor)
28 {
29  // Calculate the Ybus.
30  if(!GetYBus(m_yBus, systemPowerBase)) {
31  m_errorMsg = _("No buses found on the system.");
32  return false;
33  }
34 
35  // Number of buses on the system.
36  int numberOfBuses = static_cast<int>(m_busList.size());
37 
38  std::vector<BusType> busType; // Bus type
39  std::vector<std::complex<double> > voltage; // Voltage of buses
40  std::vector<std::complex<double> > power; // Injected power
41  std::vector<std::complex<double> > loadPower; // Only the load power
42  std::vector<ReactiveLimits> reactiveLimit; // Limit of reactive power on PV buses
43 
44  reactiveLimit.resize(numberOfBuses);
45 
46  int busNumber = 0;
47  for(auto itb = m_busList.begin(); itb != m_busList.end(); itb++) {
48  Bus* bus = *itb;
49  BusElectricalData data = bus->GetElectricalData();
50 
51  // Fill the bus type
52  if(data.slackBus) busType.push_back(BUS_SLACK);
53  // If the bus have controlled voltage, check if at least one synchronous machine is connected, then set the
54  // bus type.
55  else if(data.isVoltageControlled) {
56  bool hasSyncMachine = false;
57  // Synchronous generator
58  for(auto itsg = m_syncGeneratorList.begin(); itsg != m_syncGeneratorList.end(); itsg++) {
59  SyncGenerator* syncGenerator = *itsg;
60  if(bus == syncGenerator->GetParentList()[0] && syncGenerator->IsOnline()) hasSyncMachine = true;
61  }
62  // Synchronous motor
63  for(auto itsm = m_syncMotorList.begin(); itsm != m_syncMotorList.end(); itsm++) {
64  SyncMotor* syncMotor = *itsm;
65  if(bus == syncMotor->GetParentList()[0] && syncMotor->IsOnline()) hasSyncMachine = true;
66  }
67  if(hasSyncMachine)
68  busType.push_back(BUS_PV);
69  else
70  busType.push_back(BUS_PQ);
71  } else
72  busType.push_back(BUS_PQ);
73 
74  // Fill the voltages array
75  if(data.isVoltageControlled && busType[busNumber] != BUS_PQ) {
76  voltage.push_back(std::complex<double>(data.controlledVoltage, 0.0));
77  } else {
78  voltage.push_back(std::complex<double>(1.0, 0.0));
79  }
80 
81  // Fill the power array
82  power.push_back(std::complex<double>(0.0, 0.0)); // Initial value
83  loadPower.push_back(std::complex<double>(0.0, 0.0));
84 
85  // Synchronous generator
86  for(auto itsg = m_syncGeneratorList.begin(); itsg != m_syncGeneratorList.end(); itsg++) {
87  SyncGenerator* syncGenerator = *itsg;
88  if(syncGenerator->IsOnline()) {
89  if(bus == syncGenerator->GetParentList()[0]) {
90  SyncGeneratorElectricalData childData = syncGenerator->GetPUElectricalData(systemPowerBase);
91  power[busNumber] += std::complex<double>(childData.activePower, childData.reactivePower);
92 
93  if(busType[busNumber] == BUS_PV) {
94  if(childData.haveMaxReactive && reactiveLimit[busNumber].maxLimitType != RL_UNLIMITED_SOURCE) {
95  reactiveLimit[busNumber].maxLimitType = RL_LIMITED;
96  reactiveLimit[busNumber].maxLimit += childData.maxReactive;
97  } else if(!childData.haveMaxReactive)
98  reactiveLimit[busNumber].maxLimitType = RL_UNLIMITED_SOURCE;
99 
100  if(childData.haveMinReactive && reactiveLimit[busNumber].minLimitType != RL_UNLIMITED_SOURCE) {
101  reactiveLimit[busNumber].minLimitType = RL_LIMITED;
102  reactiveLimit[busNumber].minLimit += childData.minReactive;
103  } else if(!childData.haveMinReactive)
104  reactiveLimit[busNumber].minLimitType = RL_UNLIMITED_SOURCE;
105  }
106  }
107  }
108  }
109  // Synchronous motor
110  for(auto itsm = m_syncMotorList.begin(); itsm != m_syncMotorList.end(); itsm++) {
111  SyncMotor* syncMotor = *itsm;
112  if(syncMotor->IsOnline()) {
113  if(bus == syncMotor->GetParentList()[0]) {
114  SyncMotorElectricalData childData = syncMotor->GetPUElectricalData(systemPowerBase);
115  power[busNumber] += std::complex<double>(-childData.activePower, childData.reactivePower);
116  loadPower[busNumber] += std::complex<double>(-childData.activePower, 0.0);
117 
118  if(busType[busNumber] == BUS_PV) {
119  if(childData.haveMaxReactive && reactiveLimit[busNumber].maxLimitType != RL_UNLIMITED_SOURCE) {
120  reactiveLimit[busNumber].maxLimitType = RL_LIMITED;
121  reactiveLimit[busNumber].maxLimit += childData.maxReactive;
122  } else if(!childData.haveMaxReactive)
123  reactiveLimit[busNumber].maxLimitType = RL_UNLIMITED_SOURCE;
124 
125  if(childData.haveMinReactive && reactiveLimit[busNumber].minLimitType != RL_UNLIMITED_SOURCE) {
126  reactiveLimit[busNumber].minLimitType = RL_LIMITED;
127  reactiveLimit[busNumber].minLimit += childData.minReactive;
128  } else if(!childData.haveMinReactive)
129  reactiveLimit[busNumber].minLimitType = RL_UNLIMITED_SOURCE;
130  }
131  }
132  }
133  }
134  // Load
135  for(auto itl = m_loadList.begin(); itl != m_loadList.end(); itl++) {
136  Load* load = *itl;
137  if(load->IsOnline()) {
138  if(bus == load->GetParentList()[0]) {
139  LoadElectricalData childData = load->GetPUElectricalData(systemPowerBase);
140  if(childData.loadType == CONST_POWER) {
141  power[busNumber] += std::complex<double>(-childData.activePower, -childData.reactivePower);
142  loadPower[busNumber] += std::complex<double>(-childData.activePower, -childData.reactivePower);
143  }
144  }
145  }
146  }
147 
148  // Induction motor
149  for(auto itim = m_indMotorList.begin(); itim != m_indMotorList.end(); itim++) {
150  IndMotor* indMotor = *itim;
151  if(indMotor->IsOnline()) {
152  if(bus == indMotor->GetParentList()[0]) {
153  IndMotorElectricalData childData = indMotor->GetPUElectricalData(systemPowerBase);
154  power[busNumber] += std::complex<double>(-childData.activePower, -childData.reactivePower);
155  loadPower[busNumber] += std::complex<double>(-childData.activePower, -childData.reactivePower);
156  }
157  }
158  }
159 
160  busNumber++;
161  }
162 
163  // Check if have slack bus and if have generation on the slack bus
164  bool haveSlackBus = false;
165  bool slackBusHaveGeneration = false;
166  for(int i = 0; i < (int)busType.size(); i++) {
167  if(busType[i] == BUS_SLACK) {
168  auto itb = m_busList.begin();
169  std::advance(itb, i);
170  Bus* bus = *itb;
171 
172  for(auto itsg = m_syncGeneratorList.begin(); itsg != m_syncGeneratorList.end(); itsg++) {
173  SyncGenerator* syncGenerator = *itsg;
174  if(syncGenerator->IsOnline() && bus == syncGenerator->GetParentList()[0]) slackBusHaveGeneration = true;
175  }
176  haveSlackBus = true;
177  }
178  }
179  if(!haveSlackBus) {
180  m_errorMsg = _("There is no slack bus on the system.");
181  return false;
182  }
183  if(!slackBusHaveGeneration) {
184  m_errorMsg = _("The slack bus don't have generation.");
185  return false;
186  }
187 
188  // Gauss-Seidel method
189  std::vector<std::complex<double> > oldVoltage; // Old voltage array.
190  oldVoltage.resize(voltage.size());
191 
192  auto oldBusType = busType;
193 
194  int iteration = 0; // Current itaration number.
195 
196  while(true) {
197  // Reach the max number of iterations.
198  if(iteration >= maxIteration) {
199  m_errorMsg = _("The maximum number of iterations was reached.");
200  return false;
201  }
202 
203  // Update the old voltage array to current iteration values.
204  for(int i = 0; i < numberOfBuses; i++) oldVoltage[i] = voltage[i];
205 
206  double iterationError = 0.0;
207 
208  for(int i = 0; i < numberOfBuses; i++) {
209  if(busType[i] == BUS_PQ) {
210  std::complex<double> yeSum(0.0, 0.0);
211  for(int k = 0; k < numberOfBuses; k++) {
212  if(i != k) {
213  // Sum { Y[i,k] * E[k] } | k = 1->n; k diff i
214  yeSum += m_yBus[i][k] * voltage[k];
215  }
216  }
217 
218  // E[i] = (1/Y[i,i])*((P[i]-jQ[i])/E*[i] - Sum { Y[i,k] * E[k] (k diff i) })
219  std::complex<double> newVolt =
220  (1.0 / m_yBus[i][i]) * (std::conj(power[i]) / std::conj(voltage[i]) - yeSum);
221 
222  // Apply the acceleration factor.
223  newVolt = std::complex<double>(accFactor * (newVolt.real() - voltage[i].real()) + voltage[i].real(),
224  accFactor * (newVolt.imag() - voltage[i].imag()) + voltage[i].imag());
225 
226  voltage[i] = newVolt;
227  }
228  if(busType[i] == BUS_PV) {
229  std::complex<double> yeSum(0.0, 0.0);
230  for(int k = 0; k < numberOfBuses; k++) {
231  if(i != k) {
232  // Sum { Y[i,k] * E[k] } | k = 1->n; k diff i
233  yeSum += m_yBus[i][k] * voltage[k];
234  }
235  }
236  std::complex<double> yeSumT = yeSum + (m_yBus[i][i] * voltage[i]);
237 
238  // Q[i] = - Im( E*[i] * Sum { Y[i,k] * E[k] } )
239  std::complex<double> qCalc = std::conj(voltage[i]) * yeSumT;
240  power[i] = std::complex<double>(power[i].real(), -qCalc.imag());
241 
242  // E[i] = (1/Y[i,i])*((P[i]-jQ[i])/E*[i] - Sum { Y[i,k] * E[k] (k diff i) })
243  std::complex<double> newVolt =
244  (1.0 / m_yBus[i][i]) * (std::conj(power[i]) / std::conj(voltage[i]) - yeSum);
245 
246  // Apply the acceleration factor.
247  newVolt = std::complex<double>(accFactor * (newVolt.real() - voltage[i].real()) + voltage[i].real(),
248  accFactor * (newVolt.imag() - voltage[i].imag()) + voltage[i].imag());
249 
250  // Keep the same voltage magnitude.
251  voltage[i] = std::complex<double>(std::abs(voltage[i]) * std::cos(std::arg(newVolt)),
252  std::abs(voltage[i]) * std::sin(std::arg(newVolt)));
253  }
254 
255  double busError = std::max(std::abs(voltage[i].real() - oldVoltage[i].real()),
256  std::abs(voltage[i].imag() - oldVoltage[i].imag()));
257 
258  if(busError > iterationError) iterationError = busError;
259  }
260 
261  if(iterationError < error) {
262  bool limitReach = false;
263  for(int i = 0; i < numberOfBuses; i++) {
264  if(busType[i] == BUS_PV) {
265  if(reactiveLimit[i].maxLimitType == RL_LIMITED) {
266  if(power[i].imag() - loadPower[i].imag() > reactiveLimit[i].maxLimit) {
267  power[i] =
268  std::complex<double>(power[i].real(), reactiveLimit[i].maxLimit + loadPower[i].imag());
269  busType[i] = BUS_PQ;
270  reactiveLimit[i].limitReached = RL_MAX_REACHED;
271  limitReach = true;
272  }
273  }
274  if(reactiveLimit[i].minLimitType == RL_LIMITED) {
275  if(power[i].imag() - loadPower[i].imag() < reactiveLimit[i].minLimit) {
276  power[i] =
277  std::complex<double>(power[i].real(), reactiveLimit[i].minLimit + loadPower[i].imag());
278  busType[i] = BUS_PQ;
279  reactiveLimit[i].limitReached = RL_MIN_REACHED;
280  limitReach = true;
281  }
282  }
283  }
284  }
285  if(!limitReach) break;
286  }
287 
288  iteration++;
289  }
290 
291  // Adjust the power array.
292  // TODO: Only the slack bus??
293  for(int i = 0; i < numberOfBuses; i++) {
294  std::complex<double> sBus = std::complex<double>(0.0, 0.0);
295  for(int j = 0; j < numberOfBuses; j++) sBus += voltage[i] * std::conj(voltage[j]) * std::conj(m_yBus[i][j]);
296  power[i] = sBus;
297  }
298 
299  UpdateElementsPowerFlow(voltage, power, oldBusType, reactiveLimit, systemPowerBase);
300 
301  return true;
302 }
- -
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
-
Synchronous generator power element.
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
-
Loas shunt power element.
Definition: Load.h:73
- -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
- -
Induction motor power element.
Definition: IndMotor.h:40
-
Base class of electric calculations, with general methods.
- -
-
- - - - diff --git a/docs/doxygen/html/_power_flow_8h.html b/docs/doxygen/html/_power_flow_8h.html index 25a2ff6..dd46945 100644 --- a/docs/doxygen/html/_power_flow_8h.html +++ b/docs/doxygen/html/_power_flow_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_power_flow_8h.html','');});
PowerFlow.h File Reference
-
#include "ElectricCalculation.h"
+
#include "ElectricCalculation.h"
#include <wx/string.h>
#include <wx/intl.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_power_flow_8h_source.html b/docs/doxygen/html/_power_flow_8h_source.html deleted file mode 100644 index 1828677..0000000 --- a/docs/doxygen/html/_power_flow_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/PowerFlow.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  PowerFlow
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PowerFlow.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef POWERFLOW_H
19 #define POWERFLOW_H
20 
21 #include "ElectricCalculation.h"
22 
23 #include <wx/string.h>
24 #include <wx/intl.h> //_()
25 
34 {
35  public:
36  PowerFlow();
37  PowerFlow(std::vector<Element*> elementList);
38  ~PowerFlow();
39  virtual bool RunGaussSeidel(double systemPowerBase = 100e6,
40  int maxIteration = 5000,
41  double error = 1e-6,
42  double initAngle = 0.0,
43  double accFactor = 1.0);
44 
45  virtual wxString GetErrorMessage() { return m_errorMsg; }
46  protected:
47  std::vector<std::vector<std::complex<double> > > m_yBus;
48  wxString m_errorMsg = "";
49 };
50 
51 #endif // POWERFLOW_H
Calculate the power flow.
Definition: PowerFlow.h:33
- -
Base class of electric calculations, with general methods.
-
-
- - - - diff --git a/docs/doxygen/html/_properties_data_8cpp_source.html b/docs/doxygen/html/_properties_data_8cpp_source.html deleted file mode 100644 index 9894007..0000000 --- a/docs/doxygen/html/_properties_data_8cpp_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/PropertiesData.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PropertiesData.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "PropertiesData.h"
19 
20 PropertiesData::PropertiesData() {}
21 PropertiesData::~PropertiesData() {}
-
-
- - - - diff --git a/docs/doxygen/html/_properties_data_8h.html b/docs/doxygen/html/_properties_data_8h.html index da24e36..42a2cea 100644 --- a/docs/doxygen/html/_properties_data_8h.html +++ b/docs/doxygen/html/_properties_data_8h.html @@ -92,11 +92,9 @@ $(document).ready(function(){initNavTree('_properties_data_8h.html','');});
#include "wx/language.h"
-#include "Element.h"
-#include "PowerElement.h"
-
-

Go to the source code of this file.

- +#include "Element.h"
+#include "PowerElement.h"
+
diff --git a/docs/doxygen/html/_properties_data_8h_source.html b/docs/doxygen/html/_properties_data_8h_source.html deleted file mode 100644 index 29c37b7..0000000 --- a/docs/doxygen/html/_properties_data_8h_source.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - -Project/PropertiesData.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  SimulationData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PropertiesData.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef PROPERTIESDATA_H
19 #define PROPERTIESDATA_H
20 
21 #include "wx/language.h"
22 #include "Element.h"
23 #include "PowerElement.h"
24 
25 enum PowerFlowMethod { GAUSS_SEIDEL = 0, NEWTON_RAPHSON };
26 enum GUITheme { THEME_LIGHT = 0, THEME_DARK };
27 
29  // General simulation data
30  double basePower = 100.0;
31  ElectricalUnit basePowerUnit = UNIT_MVA;
32  bool faultAfterPowerFlow = false;
33  bool scPowerAfterPowerFlow = false;
34 
35  // Power flow
36  PowerFlowMethod powerFlowMethod = GAUSS_SEIDEL;
37  double accFator = 1.0;
38  double powerFlowTolerance = 1e-7;
39  int powerFlowMaxIterations = 5000;
40 
41  // Stability
42  double stabilityFrequency = 60.0;
43  double timeStep = 1e-2;
44  double stabilitySimulationTime = 10.0;
45  double stabilityTolerance = 1e-8;
46  int stabilityMaxIterations = 100;
47  int controlTimeStepRatio = 10;
48  double plotTime = 1e-2;
49  bool useCOI = true;
50 
51  // ZIP load
52  bool useCompLoads = false;
53  double constImpedanceActive = 100.0;
54  double constCurrentActive = 0.0;
55  double constPowerActive = 0.0;
56  double constImpedanceReactive = 100.0;
57  double constCurrentReactive = 0.0;
58  double constPowerReactive = 0.0;
59  double underVoltageConstCurrent = 70.0;
60  double underVoltageConstPower = 70.0;
61 };
62 
63 struct GeneralData {
64  wxLanguage language = wxLANGUAGE_ENGLISH;
65  GUITheme theme = THEME_LIGHT;
66 };
67 
76 {
77  public:
79  ~PropertiesData();
80 
81  SimulationData GetSimulationPropertiesData() const { return m_simulData; }
82  void SetSimulationPropertiesData(SimulationData simulationData) { m_simulData = simulationData; }
83  GeneralData GetGeneralPropertiesData() const { return m_genData; }
84  void SetGeneralPropertiesData(GeneralData generalData) { m_genData = generalData; }
85  protected:
86  SimulationData m_simulData;
87  GeneralData m_genData;
88 };
89 
90 #endif // PROPERTIESDATA_H
General and simulation data manager.
-
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- - - - - -
-
- - - - diff --git a/docs/doxygen/html/_properties_form_8cpp_source.html b/docs/doxygen/html/_properties_form_8cpp_source.html deleted file mode 100644 index 2214af0..0000000 --- a/docs/doxygen/html/_properties_form_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/PropertiesForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PropertiesForm.cpp
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: PropertiesForm.wxcp
4 // Do not modify this file by hand!
6 
7 #include "PropertiesForm.h"
8 
9 
10 // Declare the bitmap loading function
11 extern void wxCDAD0InitBitmapResources();
12 
13 static bool bBitmapLoaded = false;
14 
15 
16 GeneralPropertiesFormBase::GeneralPropertiesFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
17  : wxDialog(parent, id, title, pos, size, style)
18 {
19  if ( !bBitmapLoaded ) {
20  // We need to initialise the default bitmap handler
21  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
22  wxCDAD0InitBitmapResources();
23  bBitmapLoaded = true;
24  }
25 
26  wxBoxSizer* boxSizer_lvl1_1 = new wxBoxSizer(wxVERTICAL);
27  this->SetSizer(boxSizer_lvl1_1);
28 
29  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
30  m_notebook->SetName(wxT("m_notebook"));
31 
32  boxSizer_lvl1_1->Add(m_notebook, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
33 
34  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
35  m_notebook->AddPage(m_panelGeneral, _("General"), false);
36 
37  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
38  m_panelGeneral->SetSizer(boxSizerLvl2_1);
39 
40  wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL);
41 
42  boxSizerLvl2_1->Add(boxSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
43 
44  m_staticTextLanguage = new wxStaticText(m_panelGeneral, wxID_ANY, _("Language"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
45 
46  boxSizerLvl3_1->Add(m_staticTextLanguage, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
47 
48  wxArrayString m_choiceLanguageArr;
49  m_choiceLanguageArr.Add(wxT("English"));
50  m_choiceLanguageArr.Add(wxT("Portuguese"));
51  m_choiceLanguage = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceLanguageArr, 0);
52  m_choiceLanguage->SetSelection(0);
53 
54  boxSizerLvl3_1->Add(m_choiceLanguage, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
55 
56  wxBoxSizer* boxSizerLvl3_2 = new wxBoxSizer(wxVERTICAL);
57 
58  boxSizerLvl2_1->Add(boxSizerLvl3_2, 0, wxEXPAND, WXC_FROM_DIP(5));
59 
60  m_staticTextTheme = new wxStaticText(m_panelGeneral, wxID_ANY, _("Theme"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
61 
62  boxSizerLvl3_2->Add(m_staticTextTheme, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
63 
64  wxArrayString m_choiceThemeArr;
65  m_choiceThemeArr.Add(wxT("Light"));
66  m_choiceThemeArr.Add(wxT("Dark"));
67  m_choiceTheme = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceThemeArr, 0);
68  m_choiceTheme->SetSelection(0);
69 
70  boxSizerLvl3_2->Add(m_choiceTheme, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
71 
72  wxBoxSizer* boxSizer_bottonButtons = new wxBoxSizer(wxHORIZONTAL);
73 
74  boxSizer_lvl1_1->Add(boxSizer_bottonButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
75 
76  boxSizer_bottonButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
77 
78  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
79 
80  boxSizer_bottonButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
81 
82  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
83 
84  boxSizer_bottonButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
85 
86 
87  #if wxVERSION_NUMBER >= 2900
88  if(!wxPersistenceManager::Get().Find(m_notebook)){
89  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
90  } else {
91  wxPersistenceManager::Get().Restore(m_notebook);
92  }
93  #endif
94 
95  SetName(wxT("GeneralPropertiesFormBase"));
96  SetSize(-1,-1);
97  if (GetSizer()) {
98  GetSizer()->Fit(this);
99  }
100  if(GetParent()) {
101  CentreOnParent(wxBOTH);
102  } else {
103  CentreOnScreen(wxBOTH);
104  }
105 #if wxVERSION_NUMBER >= 2900
106  if(!wxPersistenceManager::Get().Find(this)) {
107  wxPersistenceManager::Get().RegisterAndRestore(this);
108  } else {
109  wxPersistenceManager::Get().Restore(this);
110  }
111 #endif
112  // Connect events
113  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneralPropertiesFormBase::OnButtonOKClick), NULL, this);
114  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneralPropertiesFormBase::OnButtonCancelClick), NULL, this);
115 
116 }
117 
118 GeneralPropertiesFormBase::~GeneralPropertiesFormBase()
119 {
120  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneralPropertiesFormBase::OnButtonOKClick), NULL, this);
121  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GeneralPropertiesFormBase::OnButtonCancelClick), NULL, this);
122 
123 }
124 
125 SimulationsSettingsFormBase::SimulationsSettingsFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
126  : wxDialog(parent, id, title, pos, size, style)
127 {
128  if ( !bBitmapLoaded ) {
129  // We need to initialise the default bitmap handler
130  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
131  wxCDAD0InitBitmapResources();
132  bBitmapLoaded = true;
133  }
134 
135  wxBoxSizer* boxSizer_lvl1_1 = new wxBoxSizer(wxVERTICAL);
136  this->SetSizer(boxSizer_lvl1_1);
137 
138  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
139  m_notebook->SetName(wxT("m_notebook"));
140 
141  boxSizer_lvl1_1->Add(m_notebook, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
142 
143  m_panelGeneral = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
144  m_notebook->AddPage(m_panelGeneral, _("General"), false);
145 
146  wxBoxSizer* boxSizerLvl2_1 = new wxBoxSizer(wxVERTICAL);
147  m_panelGeneral->SetSizer(boxSizerLvl2_1);
148 
149  wxBoxSizer* boxSizerLvl3_1 = new wxBoxSizer(wxVERTICAL);
150 
151  boxSizerLvl2_1->Add(boxSizerLvl3_1, 0, wxEXPAND, WXC_FROM_DIP(5));
152 
153  m_staticTextBasePower = new wxStaticText(m_panelGeneral, wxID_ANY, _("Base power"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
154 
155  boxSizerLvl3_1->Add(m_staticTextBasePower, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
156 
157  wxBoxSizer* boxSizerLvl4_1 = new wxBoxSizer(wxHORIZONTAL);
158 
159  boxSizerLvl3_1->Add(boxSizerLvl4_1, 0, wxEXPAND, WXC_FROM_DIP(5));
160 
161  m_textCtrlbasePower = new wxTextCtrl(m_panelGeneral, wxID_ANY, wxT("100,0"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
162  #if wxVERSION_NUMBER >= 3000
163  m_textCtrlbasePower->SetHint(wxT(""));
164  #endif
165 
166  boxSizerLvl4_1->Add(m_textCtrlbasePower, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
167 
168  wxArrayString m_choiceBasePowerArr;
169  m_choiceBasePowerArr.Add(wxT("VA"));
170  m_choiceBasePowerArr.Add(wxT("kVA"));
171  m_choiceBasePowerArr.Add(wxT("MVA"));
172  m_choiceBasePower = new wxChoice(m_panelGeneral, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), m_choiceBasePowerArr, 0);
173  m_choiceBasePower->SetSelection(2);
174 
175  boxSizerLvl4_1->Add(m_choiceBasePower, 0, wxLEFT|wxRIGHT|wxBOTTOM, WXC_FROM_DIP(5));
176 
177  wxStaticBoxSizer* staticBoxSizerLvl3_2 = new wxStaticBoxSizer( new wxStaticBox(m_panelGeneral, wxID_ANY, _("Continuous calculation")), wxVERTICAL);
178 
179  boxSizerLvl2_1->Add(staticBoxSizerLvl3_2, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
180 
181  m_checkBoxFaultAfterPF = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Calculate fault after power flow"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
182  m_checkBoxFaultAfterPF->SetValue(true);
183 
184  staticBoxSizerLvl3_2->Add(m_checkBoxFaultAfterPF, 0, wxALL, WXC_FROM_DIP(5));
185 
186  m_checkBoxSCPowerAfterPF = new wxCheckBox(m_panelGeneral, wxID_ANY, _("Calculate short-circuit power after power flow"), wxDefaultPosition, wxDLG_UNIT(m_panelGeneral, wxSize(-1,-1)), 0);
187  m_checkBoxSCPowerAfterPF->SetValue(true);
188 
189  staticBoxSizerLvl3_2->Add(m_checkBoxSCPowerAfterPF, 0, wxALL, WXC_FROM_DIP(5));
190 
191  m_panelPF = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
192  m_notebook->AddPage(m_panelPF, _("Power flow"), false);
193 
194  wxBoxSizer* boxSizerLvl2_2 = new wxBoxSizer(wxVERTICAL);
195  m_panelPF->SetSizer(boxSizerLvl2_2);
196 
197  wxBoxSizer* boxSizerLvl3_3 = new wxBoxSizer(wxVERTICAL);
198 
199  boxSizerLvl2_2->Add(boxSizerLvl3_3, 0, wxEXPAND, WXC_FROM_DIP(5));
200 
201  m_staticTextPFMethod = new wxStaticText(m_panelPF, wxID_ANY, _("Solution method"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0);
202 
203  boxSizerLvl3_3->Add(m_staticTextPFMethod, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
204 
205  wxArrayString m_choicePFMethodArr;
206  m_choicePFMethodArr.Add(wxT("Gauss-Seidel"));
207  m_choicePFMethodArr.Add(wxT("Newton-Raphson"));
208  m_choicePFMethod = new wxChoice(m_panelPF, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), m_choicePFMethodArr, 0);
209  m_choicePFMethod->SetSelection(0);
210 
211  boxSizerLvl3_3->Add(m_choicePFMethod, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
212 
213  wxGridSizer* gridSizerLvl_3_4 = new wxGridSizer(0, 2, 0, 0);
214 
215  boxSizerLvl2_2->Add(gridSizerLvl_3_4, 0, wxEXPAND, WXC_FROM_DIP(5));
216 
217  wxBoxSizer* boxSizerLvl4_2 = new wxBoxSizer(wxVERTICAL);
218 
219  gridSizerLvl_3_4->Add(boxSizerLvl4_2, 0, wxEXPAND, WXC_FROM_DIP(5));
220 
221  m_staticTextAccFactor = new wxStaticText(m_panelPF, wxID_ANY, _("Acceleration factor"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0);
222 
223  boxSizerLvl4_2->Add(m_staticTextAccFactor, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
224 
225  m_textCtrlAccFactor = new wxTextCtrl(m_panelPF, wxID_ANY, wxT("1,0"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0);
226  #if wxVERSION_NUMBER >= 3000
227  m_textCtrlAccFactor->SetHint(wxT(""));
228  #endif
229 
230  boxSizerLvl4_2->Add(m_textCtrlAccFactor, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
231 
232  wxBoxSizer* boxSizerLvl4_3 = new wxBoxSizer(wxVERTICAL);
233 
234  gridSizerLvl_3_4->Add(boxSizerLvl4_3, 0, wxEXPAND, WXC_FROM_DIP(5));
235 
236  m_staticTextPFTolerance = new wxStaticText(m_panelPF, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0);
237 
238  boxSizerLvl4_3->Add(m_staticTextPFTolerance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
239 
240  m_textCtrlPFTolerance = new wxTextCtrl(m_panelPF, wxID_ANY, wxT("1e-7"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0);
241  #if wxVERSION_NUMBER >= 3000
242  m_textCtrlPFTolerance->SetHint(wxT(""));
243  #endif
244 
245  boxSizerLvl4_3->Add(m_textCtrlPFTolerance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
246 
247  wxBoxSizer* boxSizerLvl4_4 = new wxBoxSizer(wxVERTICAL);
248 
249  gridSizerLvl_3_4->Add(boxSizerLvl4_4, 0, wxEXPAND, WXC_FROM_DIP(5));
250 
251  m_staticTextPFMaxIterations = new wxStaticText(m_panelPF, wxID_ANY, _("Max. iterations"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0);
252 
253  boxSizerLvl4_4->Add(m_staticTextPFMaxIterations, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
254 
255  m_textCtrlPFMaxIterations = new wxTextCtrl(m_panelPF, wxID_ANY, wxT("5000"), wxDefaultPosition, wxDLG_UNIT(m_panelPF, wxSize(-1,-1)), 0);
256  #if wxVERSION_NUMBER >= 3000
257  m_textCtrlPFMaxIterations->SetHint(wxT(""));
258  #endif
259 
260  boxSizerLvl4_4->Add(m_textCtrlPFMaxIterations, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
261 
262  m_panelStability = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
263  m_notebook->AddPage(m_panelStability, _("Stability"), false);
264 
265  wxBoxSizer* boxSizerLvl2_3 = new wxBoxSizer(wxVERTICAL);
266  m_panelStability->SetSizer(boxSizerLvl2_3);
267 
268  wxGridSizer* gridSizerLvl_2_3 = new wxGridSizer(0, 2, 0, 0);
269 
270  boxSizerLvl2_3->Add(gridSizerLvl_2_3, 0, wxEXPAND, WXC_FROM_DIP(5));
271 
272  wxBoxSizer* boxSizerLvl3_6 = new wxBoxSizer(wxVERTICAL);
273 
274  gridSizerLvl_2_3->Add(boxSizerLvl3_6, 0, wxEXPAND, WXC_FROM_DIP(5));
275 
276  m_staticTextTimeStep = new wxStaticText(m_panelStability, wxID_ANY, _("Time step"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
277 
278  boxSizerLvl3_6->Add(m_staticTextTimeStep, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
279 
280  wxBoxSizer* boxSizerLvl4_6 = new wxBoxSizer(wxHORIZONTAL);
281 
282  boxSizerLvl3_6->Add(boxSizerLvl4_6, 0, wxEXPAND, WXC_FROM_DIP(5));
283 
284  m_textCtrlTimeStep = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("0,01"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
285  #if wxVERSION_NUMBER >= 3000
286  m_textCtrlTimeStep->SetHint(wxT(""));
287  #endif
288 
289  boxSizerLvl4_6->Add(m_textCtrlTimeStep, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
290 
291  m_staticTextSec_1 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
292 
293  boxSizerLvl4_6->Add(m_staticTextSec_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
294 
295  wxBoxSizer* boxSizerLvl3_7 = new wxBoxSizer(wxVERTICAL);
296 
297  gridSizerLvl_2_3->Add(boxSizerLvl3_7, 0, wxEXPAND, WXC_FROM_DIP(5));
298 
299  m_staticTextTSimTime = new wxStaticText(m_panelStability, wxID_ANY, _("Simulation time"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
300 
301  boxSizerLvl3_7->Add(m_staticTextTSimTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
302 
303  wxBoxSizer* boxSizerLvl4_7 = new wxBoxSizer(wxHORIZONTAL);
304 
305  boxSizerLvl3_7->Add(boxSizerLvl4_7, 0, wxEXPAND, WXC_FROM_DIP(5));
306 
307  m_textCtrlSimTime = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("10"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
308  #if wxVERSION_NUMBER >= 3000
309  m_textCtrlSimTime->SetHint(wxT(""));
310  #endif
311 
312  boxSizerLvl4_7->Add(m_textCtrlSimTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
313 
314  m_staticTextSec_2 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
315 
316  boxSizerLvl4_7->Add(m_staticTextSec_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
317 
318  wxBoxSizer* boxSizerLvl3_5 = new wxBoxSizer(wxVERTICAL);
319 
320  gridSizerLvl_2_3->Add(boxSizerLvl3_5, 0, wxEXPAND, WXC_FROM_DIP(5));
321 
322  m_staticTextFreq = new wxStaticText(m_panelStability, wxID_ANY, _("System frequency"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
323 
324  boxSizerLvl3_5->Add(m_staticTextFreq, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
325 
326  wxBoxSizer* boxSizerLvl4_5 = new wxBoxSizer(wxHORIZONTAL);
327 
328  boxSizerLvl3_5->Add(boxSizerLvl4_5, 0, wxEXPAND, WXC_FROM_DIP(5));
329 
330  m_textCtrlFreq = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("60,0"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
331  #if wxVERSION_NUMBER >= 3000
332  m_textCtrlFreq->SetHint(wxT(""));
333  #endif
334 
335  boxSizerLvl4_5->Add(m_textCtrlFreq, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
336 
337  m_staticTextFreqUnit = new wxStaticText(m_panelStability, wxID_ANY, _("Hz"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
338 
339  boxSizerLvl4_5->Add(m_staticTextFreqUnit, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
340 
341  wxBoxSizer* boxSizerLvl3_8 = new wxBoxSizer(wxVERTICAL);
342 
343  gridSizerLvl_2_3->Add(boxSizerLvl3_8, 0, wxEXPAND, WXC_FROM_DIP(5));
344 
345  m_staticTextTStabTolerance = new wxStaticText(m_panelStability, wxID_ANY, _("Tolerance"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
346 
347  boxSizerLvl3_8->Add(m_staticTextTStabTolerance, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
348 
349  m_textCtrlStabTolerance = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("1e-8"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
350  #if wxVERSION_NUMBER >= 3000
351  m_textCtrlStabTolerance->SetHint(wxT(""));
352  #endif
353 
354  boxSizerLvl3_8->Add(m_textCtrlStabTolerance, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
355 
356  wxBoxSizer* boxSizerLvl3_9 = new wxBoxSizer(wxVERTICAL);
357 
358  gridSizerLvl_2_3->Add(boxSizerLvl3_9, 0, wxEXPAND, WXC_FROM_DIP(5));
359 
360  m_staticTextTStabMaxIterations = new wxStaticText(m_panelStability, wxID_ANY, _("Max. Iterations"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
361 
362  boxSizerLvl3_9->Add(m_staticTextTStabMaxIterations, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
363 
364  m_textCtrlStabMaxIterations = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("100"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
365  #if wxVERSION_NUMBER >= 3000
366  m_textCtrlStabMaxIterations->SetHint(wxT(""));
367  #endif
368 
369  boxSizerLvl3_9->Add(m_textCtrlStabMaxIterations, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
370 
371  wxBoxSizer* boxSizerLvl3_10 = new wxBoxSizer(wxVERTICAL);
372 
373  gridSizerLvl_2_3->Add(boxSizerLvl3_10, 0, wxEXPAND, WXC_FROM_DIP(5));
374 
375  m_staticTextCtrlStepRation = new wxStaticText(m_panelStability, wxID_ANY, _("Controls step ratio"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
376 
377  boxSizerLvl3_10->Add(m_staticTextCtrlStepRation, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
378 
379  m_textCtrlCtrlStepRatio = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("10"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
380  #if wxVERSION_NUMBER >= 3000
381  m_textCtrlCtrlStepRatio->SetHint(wxT(""));
382  #endif
383 
384  boxSizerLvl3_10->Add(m_textCtrlCtrlStepRatio, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
385 
386  wxBoxSizer* boxSizerLvl3_11 = new wxBoxSizer(wxVERTICAL);
387 
388  gridSizerLvl_2_3->Add(boxSizerLvl3_11, 0, wxEXPAND, WXC_FROM_DIP(5));
389 
390  m_staticTextPrintTime = new wxStaticText(m_panelStability, wxID_ANY, _("Plot time"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
391 
392  boxSizerLvl3_11->Add(m_staticTextPrintTime, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
393 
394  wxBoxSizer* boxSizerLvl4_8 = new wxBoxSizer(wxHORIZONTAL);
395 
396  boxSizerLvl3_11->Add(boxSizerLvl4_8, 0, wxEXPAND, WXC_FROM_DIP(5));
397 
398  m_textCtrlPrintTime = new wxTextCtrl(m_panelStability, wxID_ANY, wxT("0,01"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
399  #if wxVERSION_NUMBER >= 3000
400  m_textCtrlPrintTime->SetHint(wxT(""));
401  #endif
402 
403  boxSizerLvl4_8->Add(m_textCtrlPrintTime, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
404 
405  m_staticTextSec_4 = new wxStaticText(m_panelStability, wxID_ANY, _("s"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
406 
407  boxSizerLvl4_8->Add(m_staticTextSec_4, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
408 
409  m_checkBoxUseCOI = new wxCheckBox(m_panelStability, wxID_ANY, _("Use center of inertia as reference"), wxDefaultPosition, wxDLG_UNIT(m_panelStability, wxSize(-1,-1)), 0);
410  m_checkBoxUseCOI->SetValue(true);
411 
412  boxSizerLvl2_3->Add(m_checkBoxUseCOI, 0, wxALL, WXC_FROM_DIP(5));
413 
414  m_panelLoadComp = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
415  m_notebook->AddPage(m_panelLoadComp, _("ZIP Load"), false);
416 
417  wxBoxSizer* boxSizerLvl2_4 = new wxBoxSizer(wxVERTICAL);
418  m_panelLoadComp->SetSizer(boxSizerLvl2_4);
419 
420  m_checkBoxUseCompLoads = new wxCheckBox(m_panelLoadComp, wxID_ANY, _("Use general composition to all system loads"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
421  m_checkBoxUseCompLoads->SetValue(false);
422 
423  boxSizerLvl2_4->Add(m_checkBoxUseCompLoads, 0, wxALL, WXC_FROM_DIP(5));
424 
425  wxGridSizer* gridSizerLvl2_4 = new wxGridSizer(0, 2, 0, 0);
426 
427  boxSizerLvl2_4->Add(gridSizerLvl2_4, 1, wxEXPAND, WXC_FROM_DIP(5));
428 
429  wxStaticBoxSizer* staticBoxSizerLvl3_4 = new wxStaticBoxSizer( new wxStaticBox(m_panelLoadComp, wxID_ANY, _("Active power")), wxVERTICAL);
430 
431  gridSizerLvl2_4->Add(staticBoxSizerLvl3_4, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
432 
433  wxBoxSizer* boxSizerLvl4_12 = new wxBoxSizer(wxVERTICAL);
434 
435  staticBoxSizerLvl3_4->Add(boxSizerLvl4_12, 0, wxEXPAND, WXC_FROM_DIP(5));
436 
437  m_staticTextActivePowerImp = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Constant impedance"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
438 
439  boxSizerLvl4_12->Add(m_staticTextActivePowerImp, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
440 
441  wxBoxSizer* boxSizerLvl5_9 = new wxBoxSizer(wxHORIZONTAL);
442 
443  boxSizerLvl4_12->Add(boxSizerLvl5_9, 0, wxEXPAND, WXC_FROM_DIP(5));
444 
445  m_textCtrlActivePowerImp = new wxTextCtrl(m_panelLoadComp, wxID_ANY, wxT("100"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
446  #if wxVERSION_NUMBER >= 3000
447  m_textCtrlActivePowerImp->SetHint(wxT(""));
448  #endif
449 
450  boxSizerLvl5_9->Add(m_textCtrlActivePowerImp, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
451 
452  m_staticTextPerc_1 = new wxStaticText(m_panelLoadComp, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
453 
454  boxSizerLvl5_9->Add(m_staticTextPerc_1, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
455 
456  wxBoxSizer* boxSizerLvl4_13 = new wxBoxSizer(wxVERTICAL);
457 
458  staticBoxSizerLvl3_4->Add(boxSizerLvl4_13, 0, wxEXPAND, WXC_FROM_DIP(5));
459 
460  m_staticTextActivePowerCur = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Constant current"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
461 
462  boxSizerLvl4_13->Add(m_staticTextActivePowerCur, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
463 
464  wxBoxSizer* boxSizerLvl5_10 = new wxBoxSizer(wxHORIZONTAL);
465 
466  boxSizerLvl4_13->Add(boxSizerLvl5_10, 0, wxEXPAND, WXC_FROM_DIP(5));
467 
468  m_textCtrlActivePowerCur = new wxTextCtrl(m_panelLoadComp, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
469  #if wxVERSION_NUMBER >= 3000
470  m_textCtrlActivePowerCur->SetHint(wxT(""));
471  #endif
472 
473  boxSizerLvl5_10->Add(m_textCtrlActivePowerCur, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
474 
475  m_staticTextPerc_2 = new wxStaticText(m_panelLoadComp, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
476 
477  boxSizerLvl5_10->Add(m_staticTextPerc_2, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
478 
479  wxBoxSizer* boxSizerLvl4_14 = new wxBoxSizer(wxVERTICAL);
480 
481  staticBoxSizerLvl3_4->Add(boxSizerLvl4_14, 0, wxEXPAND, WXC_FROM_DIP(5));
482 
483  m_staticTextActivePowerPow = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Constant power"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
484 
485  boxSizerLvl4_14->Add(m_staticTextActivePowerPow, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
486 
487  wxBoxSizer* boxSizerLvl5_11 = new wxBoxSizer(wxHORIZONTAL);
488 
489  boxSizerLvl4_14->Add(boxSizerLvl5_11, 0, wxEXPAND, WXC_FROM_DIP(5));
490 
491  m_textCtrlActivePowerPow = new wxTextCtrl(m_panelLoadComp, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
492  #if wxVERSION_NUMBER >= 3000
493  m_textCtrlActivePowerPow->SetHint(wxT(""));
494  #endif
495 
496  boxSizerLvl5_11->Add(m_textCtrlActivePowerPow, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
497 
498  m_staticTextPerc_3 = new wxStaticText(m_panelLoadComp, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
499 
500  boxSizerLvl5_11->Add(m_staticTextPerc_3, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
501 
502  wxStaticBoxSizer* staticBoxSizerLvl3_5 = new wxStaticBoxSizer( new wxStaticBox(m_panelLoadComp, wxID_ANY, _("Reactive power")), wxVERTICAL);
503 
504  gridSizerLvl2_4->Add(staticBoxSizerLvl3_5, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
505 
506  wxBoxSizer* boxSizerLvl4_15 = new wxBoxSizer(wxVERTICAL);
507 
508  staticBoxSizerLvl3_5->Add(boxSizerLvl4_15, 0, wxEXPAND, WXC_FROM_DIP(5));
509 
510  m_staticTextReactivePowerImp = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Constant impedance"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
511 
512  boxSizerLvl4_15->Add(m_staticTextReactivePowerImp, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
513 
514  wxBoxSizer* boxSizerLvl5_12 = new wxBoxSizer(wxHORIZONTAL);
515 
516  boxSizerLvl4_15->Add(boxSizerLvl5_12, 0, wxEXPAND, WXC_FROM_DIP(5));
517 
518  m_textCtrlReactivePowerImp = new wxTextCtrl(m_panelLoadComp, wxID_ANY, wxT("100"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
519  #if wxVERSION_NUMBER >= 3000
520  m_textCtrlReactivePowerImp->SetHint(wxT(""));
521  #endif
522 
523  boxSizerLvl5_12->Add(m_textCtrlReactivePowerImp, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
524 
525  m_staticTextPerc_4 = new wxStaticText(m_panelLoadComp, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
526 
527  boxSizerLvl5_12->Add(m_staticTextPerc_4, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
528 
529  wxBoxSizer* boxSizerLvl4_16 = new wxBoxSizer(wxVERTICAL);
530 
531  staticBoxSizerLvl3_5->Add(boxSizerLvl4_16, 0, wxEXPAND, WXC_FROM_DIP(5));
532 
533  m_staticTextReactivePowerCur = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Constant current"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
534 
535  boxSizerLvl4_16->Add(m_staticTextReactivePowerCur, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
536 
537  wxBoxSizer* boxSizerLvl5_13 = new wxBoxSizer(wxHORIZONTAL);
538 
539  boxSizerLvl4_16->Add(boxSizerLvl5_13, 0, wxEXPAND, WXC_FROM_DIP(5));
540 
541  m_textCtrlReactivePowerCur = new wxTextCtrl(m_panelLoadComp, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
542  #if wxVERSION_NUMBER >= 3000
543  m_textCtrlReactivePowerCur->SetHint(wxT(""));
544  #endif
545 
546  boxSizerLvl5_13->Add(m_textCtrlReactivePowerCur, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
547 
548  m_staticTextPerc_5 = new wxStaticText(m_panelLoadComp, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
549 
550  boxSizerLvl5_13->Add(m_staticTextPerc_5, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
551 
552  wxBoxSizer* boxSizerLvl4_17 = new wxBoxSizer(wxVERTICAL);
553 
554  staticBoxSizerLvl3_5->Add(boxSizerLvl4_17, 0, wxEXPAND, WXC_FROM_DIP(5));
555 
556  m_staticTextReactivePowerPow = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Constant power"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
557 
558  boxSizerLvl4_17->Add(m_staticTextReactivePowerPow, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
559 
560  wxBoxSizer* boxSizerLvl5_14 = new wxBoxSizer(wxHORIZONTAL);
561 
562  boxSizerLvl4_17->Add(boxSizerLvl5_14, 0, wxEXPAND, WXC_FROM_DIP(5));
563 
564  m_textCtrlReactivePowerPow = new wxTextCtrl(m_panelLoadComp, wxID_ANY, wxT("0"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
565  #if wxVERSION_NUMBER >= 3000
566  m_textCtrlReactivePowerPow->SetHint(wxT(""));
567  #endif
568 
569  boxSizerLvl5_14->Add(m_textCtrlReactivePowerPow, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
570 
571  m_staticTextPerc_6 = new wxStaticText(m_panelLoadComp, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
572 
573  boxSizerLvl5_14->Add(m_staticTextPerc_6, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
574 
575  m_staticTextUV = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Undervoltage limit which the loads will be modelled by\nconstant impedance:"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
576 
577  boxSizerLvl2_4->Add(m_staticTextUV, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
578 
579  wxBoxSizer* boxSizerLvl2_5 = new wxBoxSizer(wxHORIZONTAL);
580 
581  boxSizerLvl2_4->Add(boxSizerLvl2_5, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, WXC_FROM_DIP(5));
582 
583  wxBoxSizer* boxSizerLvl4_18 = new wxBoxSizer(wxVERTICAL);
584 
585  boxSizerLvl2_5->Add(boxSizerLvl4_18, 1, 0, WXC_FROM_DIP(5));
586 
587  m_staticTextUVCur = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Constant current"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
588 
589  boxSizerLvl4_18->Add(m_staticTextUVCur, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
590 
591  wxBoxSizer* boxSizerLvl5_15 = new wxBoxSizer(wxHORIZONTAL);
592 
593  boxSizerLvl4_18->Add(boxSizerLvl5_15, 0, wxEXPAND, WXC_FROM_DIP(5));
594 
595  m_textCtrlUVCur = new wxTextCtrl(m_panelLoadComp, wxID_ANY, wxT("70"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
596  #if wxVERSION_NUMBER >= 3000
597  m_textCtrlUVCur->SetHint(wxT(""));
598  #endif
599 
600  boxSizerLvl5_15->Add(m_textCtrlUVCur, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
601 
602  m_staticTextPerc_7 = new wxStaticText(m_panelLoadComp, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
603 
604  boxSizerLvl5_15->Add(m_staticTextPerc_7, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
605 
606  wxBoxSizer* boxSizerLvl4_19 = new wxBoxSizer(wxVERTICAL);
607 
608  boxSizerLvl2_5->Add(boxSizerLvl4_19, 1, 0, WXC_FROM_DIP(5));
609 
610  m_staticTextUVPow = new wxStaticText(m_panelLoadComp, wxID_ANY, _("Constant power"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
611 
612  boxSizerLvl4_19->Add(m_staticTextUVPow, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
613 
614  wxBoxSizer* boxSizerLvl5_16 = new wxBoxSizer(wxHORIZONTAL);
615 
616  boxSizerLvl4_19->Add(boxSizerLvl5_16, 0, wxEXPAND, WXC_FROM_DIP(5));
617 
618  m_textCtrlUVPow = new wxTextCtrl(m_panelLoadComp, wxID_ANY, wxT("70"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
619  #if wxVERSION_NUMBER >= 3000
620  m_textCtrlUVPow->SetHint(wxT(""));
621  #endif
622 
623  boxSizerLvl5_16->Add(m_textCtrlUVPow, 1, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
624 
625  m_staticTextPerc_8 = new wxStaticText(m_panelLoadComp, wxID_ANY, _("%"), wxDefaultPosition, wxDLG_UNIT(m_panelLoadComp, wxSize(-1,-1)), 0);
626 
627  boxSizerLvl5_16->Add(m_staticTextPerc_8, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_CENTER_VERTICAL, WXC_FROM_DIP(5));
628 
629  wxBoxSizer* boxSizer_bottonButtons = new wxBoxSizer(wxHORIZONTAL);
630 
631  boxSizer_lvl1_1->Add(boxSizer_bottonButtons, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
632 
633  boxSizer_bottonButtons->Add(0, 0, 1, wxALL, WXC_FROM_DIP(5));
634 
635  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
636 
637  boxSizer_bottonButtons->Add(m_buttonOK, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
638 
639  m_buttonCancel = new wxButton(this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
640 
641  boxSizer_bottonButtons->Add(m_buttonCancel, 0, wxALL|wxALIGN_RIGHT, WXC_FROM_DIP(5));
642 
643 
644  #if wxVERSION_NUMBER >= 2900
645  if(!wxPersistenceManager::Get().Find(m_notebook)){
646  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
647  } else {
648  wxPersistenceManager::Get().Restore(m_notebook);
649  }
650  #endif
651 
652  SetName(wxT("SimulationsSettingsFormBase"));
653  SetSize(-1,-1);
654  if (GetSizer()) {
655  GetSizer()->Fit(this);
656  }
657  if(GetParent()) {
658  CentreOnParent(wxBOTH);
659  } else {
660  CentreOnScreen(wxBOTH);
661  }
662 #if wxVERSION_NUMBER >= 2900
663  if(!wxPersistenceManager::Get().Find(this)) {
664  wxPersistenceManager::Get().RegisterAndRestore(this);
665  } else {
666  wxPersistenceManager::Get().Restore(this);
667  }
668 #endif
669  // Connect events
670  m_choicePFMethod->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SimulationsSettingsFormBase::OnPFMethodChoiceSelected), NULL, this);
671  m_checkBoxUseCompLoads->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnCheckboxUseCompLoadClick), NULL, this);
672  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnButtonOKClick), NULL, this);
673  m_buttonCancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnButtonCancelClick), NULL, this);
674 
675 }
676 
677 SimulationsSettingsFormBase::~SimulationsSettingsFormBase()
678 {
679  m_choicePFMethod->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SimulationsSettingsFormBase::OnPFMethodChoiceSelected), NULL, this);
680  m_checkBoxUseCompLoads->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnCheckboxUseCompLoadClick), NULL, this);
681  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnButtonOKClick), NULL, this);
682  m_buttonCancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SimulationsSettingsFormBase::OnButtonCancelClick), NULL, this);
683 
684 }
685 
686 AboutFormBase::AboutFormBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
687  : wxDialog(parent, id, title, pos, size, style)
688 {
689  if ( !bBitmapLoaded ) {
690  // We need to initialise the default bitmap handler
691  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
692  wxCDAD0InitBitmapResources();
693  bBitmapLoaded = true;
694  }
695 
696  wxBoxSizer* boxSizerMain = new wxBoxSizer(wxVERTICAL);
697  this->SetSizer(boxSizerMain);
698 
699  m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxBK_DEFAULT);
700  m_notebook->SetName(wxT("m_notebook"));
701 
702  boxSizerMain->Add(m_notebook, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
703 
704  m_panelLogo = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
705  m_notebook->AddPage(m_panelLogo, _("About"), false);
706 
707  wxBoxSizer* boxSizerLvl1_1 = new wxBoxSizer(wxVERTICAL);
708  m_panelLogo->SetSizer(boxSizerLvl1_1);
709 
710  m_staticBitmapLogo = new wxStaticBitmap(m_panelLogo, wxID_ANY, wxXmlResource::Get()->LoadBitmap(wxT("About2017")), wxDefaultPosition, wxDLG_UNIT(m_panelLogo, wxSize(-1,-1)), 0 );
711 
712  boxSizerLvl1_1->Add(m_staticBitmapLogo, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));
713 
714  m_panelCredits = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
715  m_notebook->AddPage(m_panelCredits, _("Credits"), false);
716 
717  wxBoxSizer* boxSizerLvl1_2 = new wxBoxSizer(wxVERTICAL);
718  m_panelCredits->SetSizer(boxSizerLvl1_2);
719 
720  m_gridCredits = new wxGrid(m_panelCredits, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_panelCredits, wxSize(-1,-1)), wxWANTS_CHARS);
721  m_gridCredits->CreateGrid(0, 0);
722  m_gridCredits->SetRowLabelAlignment(wxALIGN_RIGHT, wxALIGN_CENTRE);
723  m_gridCredits->SetColLabelAlignment(wxALIGN_CENTRE, wxALIGN_CENTRE);
724  #if wxVERSION_NUMBER >= 2904
725  m_gridCredits->UseNativeColHeader(true);
726  #endif
727  m_gridCredits->EnableEditing(false);
728 
729  boxSizerLvl1_2->Add(m_gridCredits, 1, wxEXPAND, WXC_FROM_DIP(5));
730 
731  m_panelLicense = new wxPanel(m_notebook, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(m_notebook, wxSize(-1,-1)), wxTAB_TRAVERSAL);
732  m_notebook->AddPage(m_panelLicense, _("License"), false);
733 
734  wxBoxSizer* boxSizerLvl1_3 = new wxBoxSizer(wxVERTICAL);
735  m_panelLicense->SetSizer(boxSizerLvl1_3);
736 
737  m_richTextCtrlLicense = new wxRichTextCtrl(m_panelLicense, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(m_panelLicense, wxSize(-1,-1)), wxTE_MULTILINE|wxTE_PROCESS_TAB|wxTE_PROCESS_ENTER|wxWANTS_CHARS);
738 
739  boxSizerLvl1_3->Add(m_richTextCtrlLicense, 1, wxALL|wxEXPAND, WXC_FROM_DIP(5));
740 
741  wxFlexGridSizer* flexGridSizer247 = new wxFlexGridSizer(2, 2, 0, 0);
742  flexGridSizer247->SetFlexibleDirection( wxBOTH );
743  flexGridSizer247->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
744  flexGridSizer247->AddGrowableCol(1);
745 
746  boxSizerMain->Add(flexGridSizer247, 0, wxALL|wxEXPAND, WXC_FROM_DIP(5));
747 
748  m_staticTextVersionLabel = new wxStaticText(this, wxID_ANY, _("Version:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
749 
750  flexGridSizer247->Add(m_staticTextVersionLabel, 0, wxALL, WXC_FROM_DIP(5));
751 
752  m_staticTextVersion = new wxStaticText(this, wxID_ANY, _("Alpha 2017w45a"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
753 
754  flexGridSizer247->Add(m_staticTextVersion, 0, wxALL, WXC_FROM_DIP(5));
755 
756  m_staticTextHome = new wxStaticText(this, wxID_ANY, _("Home page:"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
757 
758  flexGridSizer247->Add(m_staticTextHome, 0, wxALL, WXC_FROM_DIP(5));
759 
760  m_hyperLinkPSP = new wxHyperlinkCtrl(this, wxID_ANY, _("https://thales1330.github.io/PSP/"), wxT("https://thales1330.github.io/PSP/"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), wxHL_DEFAULT_STYLE);
761  m_hyperLinkPSP->SetNormalColour(wxColour(wxT("#0000FF")));
762  m_hyperLinkPSP->SetHoverColour(wxColour(wxT("#0000FF")));
763  m_hyperLinkPSP->SetVisitedColour(wxColour(wxT("#FF0000")));
764 
765  flexGridSizer247->Add(m_hyperLinkPSP, 0, wxALL, WXC_FROM_DIP(5));
766 
767  m_buttonOK = new wxButton(this, wxID_ANY, _("OK"), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
768 
769  boxSizerMain->Add(m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, WXC_FROM_DIP(5));
770 
771 
772  #if wxVERSION_NUMBER >= 2900
773  if(!wxPersistenceManager::Get().Find(m_notebook)){
774  wxPersistenceManager::Get().RegisterAndRestore(m_notebook);
775  } else {
776  wxPersistenceManager::Get().Restore(m_notebook);
777  }
778  #endif
779 
780  SetName(wxT("AboutFormBase"));
781  SetSize(-1,-1);
782  if (GetSizer()) {
783  GetSizer()->Fit(this);
784  }
785  if(GetParent()) {
786  CentreOnParent(wxBOTH);
787  } else {
788  CentreOnScreen(wxBOTH);
789  }
790 #if wxVERSION_NUMBER >= 2900
791  if(!wxPersistenceManager::Get().Find(this)) {
792  wxPersistenceManager::Get().RegisterAndRestore(this);
793  } else {
794  wxPersistenceManager::Get().Restore(this);
795  }
796 #endif
797  // Connect events
798  m_buttonOK->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AboutFormBase::OnOKButtonClick), NULL, this);
799 
800 }
801 
802 AboutFormBase::~AboutFormBase()
803 {
804  m_buttonOK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(AboutFormBase::OnOKButtonClick), NULL, this);
805 
806 }
-
- - - - diff --git a/docs/doxygen/html/_properties_form_8h_source.html b/docs/doxygen/html/_properties_form_8h_source.html deleted file mode 100644 index 7fce9a7..0000000 --- a/docs/doxygen/html/_properties_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/PropertiesForm.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PropertiesForm.h
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: PropertiesForm.wxcp
4 // Do not modify this file by hand!
6 
7 #ifndef _PSP_PROJECT_PROPERTIESFORM_BASE_CLASSES_H
8 #define _PSP_PROJECT_PROPERTIESFORM_BASE_CLASSES_H
9 
10 #include <wx/settings.h>
11 #include <wx/xrc/xmlres.h>
12 #include <wx/xrc/xh_bmp.h>
13 #include <wx/dialog.h>
14 #include <wx/iconbndl.h>
15 #include <wx/artprov.h>
16 #include <wx/sizer.h>
17 #include <wx/notebook.h>
18 #include <wx/panel.h>
19 #include <wx/imaglist.h>
20 #include <wx/stattext.h>
21 #include <wx/choice.h>
22 #include <wx/arrstr.h>
23 #include <wx/button.h>
24 #include <wx/textctrl.h>
25 #include <wx/statbox.h>
26 #include <wx/checkbox.h>
27 #include <wx/statbmp.h>
28 #include <wx/grid.h>
29 #include <wx/richtext/richtextctrl.h>
30 #include <wx/hyperlink.h>
31 #if wxVERSION_NUMBER >= 2900
32 #include <wx/persist.h>
33 #include <wx/persist/toplevel.h>
34 #include <wx/persist/bookctrl.h>
35 #include <wx/persist/treebook.h>
36 #endif
37 
38 #ifdef WXC_FROM_DIP
39 #undef WXC_FROM_DIP
40 #endif
41 #if wxVERSION_NUMBER >= 3100
42 #define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
43 #else
44 #define WXC_FROM_DIP(x) x
45 #endif
46 
47 
48 class GeneralPropertiesFormBase : public wxDialog
49 {
50 protected:
51  wxNotebook* m_notebook;
52  wxPanel* m_panelGeneral;
53  wxStaticText* m_staticTextLanguage;
54  wxChoice* m_choiceLanguage;
55  wxStaticText* m_staticTextTheme;
56  wxChoice* m_choiceTheme;
57  wxButton* m_buttonOK;
58  wxButton* m_buttonCancel;
59 
60 protected:
61  virtual void OnButtonOKClick(wxCommandEvent& event) { event.Skip(); }
62  virtual void OnButtonCancelClick(wxCommandEvent& event) { event.Skip(); }
63 
64 public:
65  wxStaticText* GetStaticTextLanguage() { return m_staticTextLanguage; }
66  wxChoice* GetChoiceLanguage() { return m_choiceLanguage; }
67  wxStaticText* GetStaticTextTheme() { return m_staticTextTheme; }
68  wxChoice* GetChoiceTheme() { return m_choiceTheme; }
69  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
70  wxNotebook* GetNotebook() { return m_notebook; }
71  wxButton* GetButtonOK() { return m_buttonOK; }
72  wxButton* GetButtonCancel() { return m_buttonCancel; }
73  GeneralPropertiesFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
74  virtual ~GeneralPropertiesFormBase();
75 };
76 
77 
78 class SimulationsSettingsFormBase : public wxDialog
79 {
80 protected:
81  wxNotebook* m_notebook;
82  wxPanel* m_panelGeneral;
83  wxStaticText* m_staticTextBasePower;
84  wxTextCtrl* m_textCtrlbasePower;
85  wxChoice* m_choiceBasePower;
86  wxCheckBox* m_checkBoxFaultAfterPF;
87  wxCheckBox* m_checkBoxSCPowerAfterPF;
88  wxPanel* m_panelPF;
89  wxStaticText* m_staticTextPFMethod;
90  wxChoice* m_choicePFMethod;
91  wxStaticText* m_staticTextAccFactor;
92  wxTextCtrl* m_textCtrlAccFactor;
93  wxStaticText* m_staticTextPFTolerance;
94  wxTextCtrl* m_textCtrlPFTolerance;
95  wxStaticText* m_staticTextPFMaxIterations;
96  wxTextCtrl* m_textCtrlPFMaxIterations;
97  wxPanel* m_panelStability;
98  wxStaticText* m_staticTextTimeStep;
99  wxTextCtrl* m_textCtrlTimeStep;
100  wxStaticText* m_staticTextSec_1;
101  wxStaticText* m_staticTextTSimTime;
102  wxTextCtrl* m_textCtrlSimTime;
103  wxStaticText* m_staticTextSec_2;
104  wxStaticText* m_staticTextFreq;
105  wxTextCtrl* m_textCtrlFreq;
106  wxStaticText* m_staticTextFreqUnit;
107  wxStaticText* m_staticTextTStabTolerance;
108  wxTextCtrl* m_textCtrlStabTolerance;
109  wxStaticText* m_staticTextTStabMaxIterations;
110  wxTextCtrl* m_textCtrlStabMaxIterations;
111  wxStaticText* m_staticTextCtrlStepRation;
112  wxTextCtrl* m_textCtrlCtrlStepRatio;
113  wxStaticText* m_staticTextPrintTime;
114  wxTextCtrl* m_textCtrlPrintTime;
115  wxStaticText* m_staticTextSec_4;
116  wxCheckBox* m_checkBoxUseCOI;
117  wxPanel* m_panelLoadComp;
118  wxCheckBox* m_checkBoxUseCompLoads;
119  wxStaticText* m_staticTextActivePowerImp;
120  wxTextCtrl* m_textCtrlActivePowerImp;
121  wxStaticText* m_staticTextPerc_1;
122  wxStaticText* m_staticTextActivePowerCur;
123  wxTextCtrl* m_textCtrlActivePowerCur;
124  wxStaticText* m_staticTextPerc_2;
125  wxStaticText* m_staticTextActivePowerPow;
126  wxTextCtrl* m_textCtrlActivePowerPow;
127  wxStaticText* m_staticTextPerc_3;
128  wxStaticText* m_staticTextReactivePowerImp;
129  wxTextCtrl* m_textCtrlReactivePowerImp;
130  wxStaticText* m_staticTextPerc_4;
131  wxStaticText* m_staticTextReactivePowerCur;
132  wxTextCtrl* m_textCtrlReactivePowerCur;
133  wxStaticText* m_staticTextPerc_5;
134  wxStaticText* m_staticTextReactivePowerPow;
135  wxTextCtrl* m_textCtrlReactivePowerPow;
136  wxStaticText* m_staticTextPerc_6;
137  wxStaticText* m_staticTextUV;
138  wxStaticText* m_staticTextUVCur;
139  wxTextCtrl* m_textCtrlUVCur;
140  wxStaticText* m_staticTextPerc_7;
141  wxStaticText* m_staticTextUVPow;
142  wxTextCtrl* m_textCtrlUVPow;
143  wxStaticText* m_staticTextPerc_8;
144  wxButton* m_buttonOK;
145  wxButton* m_buttonCancel;
146 
147 protected:
148  virtual void OnPFMethodChoiceSelected(wxCommandEvent& event) { event.Skip(); }
149  virtual void OnCheckboxUseCompLoadClick(wxCommandEvent& event) { event.Skip(); }
150  virtual void OnButtonOKClick(wxCommandEvent& event) { event.Skip(); }
151  virtual void OnButtonCancelClick(wxCommandEvent& event) { event.Skip(); }
152 
153 public:
154  wxStaticText* GetStaticTextBasePower() { return m_staticTextBasePower; }
155  wxTextCtrl* GetTextCtrlbasePower() { return m_textCtrlbasePower; }
156  wxChoice* GetChoiceBasePower() { return m_choiceBasePower; }
157  wxCheckBox* GetCheckBoxFaultAfterPF() { return m_checkBoxFaultAfterPF; }
158  wxCheckBox* GetCheckBoxSCPowerAfterPF() { return m_checkBoxSCPowerAfterPF; }
159  wxPanel* GetPanelGeneral() { return m_panelGeneral; }
160  wxStaticText* GetStaticTextPFMethod() { return m_staticTextPFMethod; }
161  wxChoice* GetChoicePFMethod() { return m_choicePFMethod; }
162  wxStaticText* GetStaticTextAccFactor() { return m_staticTextAccFactor; }
163  wxTextCtrl* GetTextCtrlAccFactor() { return m_textCtrlAccFactor; }
164  wxStaticText* GetStaticTextPFTolerance() { return m_staticTextPFTolerance; }
165  wxTextCtrl* GetTextCtrlPFTolerance() { return m_textCtrlPFTolerance; }
166  wxStaticText* GetStaticTextPFMaxIterations() { return m_staticTextPFMaxIterations; }
167  wxTextCtrl* GetTextCtrlPFMaxIterations() { return m_textCtrlPFMaxIterations; }
168  wxPanel* GetPanelPF() { return m_panelPF; }
169  wxStaticText* GetStaticTextTimeStep() { return m_staticTextTimeStep; }
170  wxTextCtrl* GetTextCtrlTimeStep() { return m_textCtrlTimeStep; }
171  wxStaticText* GetStaticTextSec_1() { return m_staticTextSec_1; }
172  wxStaticText* GetStaticTextTSimTime() { return m_staticTextTSimTime; }
173  wxTextCtrl* GetTextCtrlSimTime() { return m_textCtrlSimTime; }
174  wxStaticText* GetStaticTextSec_2() { return m_staticTextSec_2; }
175  wxStaticText* GetStaticTextFreq() { return m_staticTextFreq; }
176  wxTextCtrl* GetTextCtrlFreq() { return m_textCtrlFreq; }
177  wxStaticText* GetStaticTextFreqUnit() { return m_staticTextFreqUnit; }
178  wxStaticText* GetStaticTextTStabTolerance() { return m_staticTextTStabTolerance; }
179  wxTextCtrl* GetTextCtrlStabTolerance() { return m_textCtrlStabTolerance; }
180  wxStaticText* GetStaticTextTStabMaxIterations() { return m_staticTextTStabMaxIterations; }
181  wxTextCtrl* GetTextCtrlStabMaxIterations() { return m_textCtrlStabMaxIterations; }
182  wxStaticText* GetStaticTextCtrlStepRation() { return m_staticTextCtrlStepRation; }
183  wxTextCtrl* GetTextCtrlCtrlStepRatio() { return m_textCtrlCtrlStepRatio; }
184  wxStaticText* GetStaticTextPrintTime() { return m_staticTextPrintTime; }
185  wxTextCtrl* GetTextCtrlPrintTime() { return m_textCtrlPrintTime; }
186  wxStaticText* GetStaticTextSec_4() { return m_staticTextSec_4; }
187  wxCheckBox* GetCheckBoxUseCOI() { return m_checkBoxUseCOI; }
188  wxPanel* GetPanelStability() { return m_panelStability; }
189  wxCheckBox* GetCheckBoxUseCompLoads() { return m_checkBoxUseCompLoads; }
190  wxStaticText* GetStaticTextActivePowerImp() { return m_staticTextActivePowerImp; }
191  wxTextCtrl* GetTextCtrlActivePowerImp() { return m_textCtrlActivePowerImp; }
192  wxStaticText* GetStaticTextPerc_1() { return m_staticTextPerc_1; }
193  wxStaticText* GetStaticTextActivePowerCur() { return m_staticTextActivePowerCur; }
194  wxTextCtrl* GetTextCtrlActivePowerCur() { return m_textCtrlActivePowerCur; }
195  wxStaticText* GetStaticTextPerc_2() { return m_staticTextPerc_2; }
196  wxStaticText* GetStaticTextActivePowerPow() { return m_staticTextActivePowerPow; }
197  wxTextCtrl* GetTextCtrlActivePowerPow() { return m_textCtrlActivePowerPow; }
198  wxStaticText* GetStaticTextPerc_3() { return m_staticTextPerc_3; }
199  wxStaticText* GetStaticTextReactivePowerImp() { return m_staticTextReactivePowerImp; }
200  wxTextCtrl* GetTextCtrlReactivePowerImp() { return m_textCtrlReactivePowerImp; }
201  wxStaticText* GetStaticTextPerc_4() { return m_staticTextPerc_4; }
202  wxStaticText* GetStaticTextReactivePowerCur() { return m_staticTextReactivePowerCur; }
203  wxTextCtrl* GetTextCtrlReactivePowerCur() { return m_textCtrlReactivePowerCur; }
204  wxStaticText* GetStaticTextPerc_5() { return m_staticTextPerc_5; }
205  wxStaticText* GetStaticTextReactivePowerPow() { return m_staticTextReactivePowerPow; }
206  wxTextCtrl* GetTextCtrlReactivePowerPow() { return m_textCtrlReactivePowerPow; }
207  wxStaticText* GetStaticTextPerc_6() { return m_staticTextPerc_6; }
208  wxStaticText* GetStaticTextUV() { return m_staticTextUV; }
209  wxStaticText* GetStaticTextUVCur() { return m_staticTextUVCur; }
210  wxTextCtrl* GetTextCtrlUVCur() { return m_textCtrlUVCur; }
211  wxStaticText* GetStaticTextPerc_7() { return m_staticTextPerc_7; }
212  wxStaticText* GetStaticTextUVPow() { return m_staticTextUVPow; }
213  wxTextCtrl* GetTextCtrlUVPow() { return m_textCtrlUVPow; }
214  wxStaticText* GetStaticTextPerc_8() { return m_staticTextPerc_8; }
215  wxPanel* GetPanelLoadComp() { return m_panelLoadComp; }
216  wxNotebook* GetNotebook() { return m_notebook; }
217  wxButton* GetButtonOK() { return m_buttonOK; }
218  wxButton* GetButtonCancel() { return m_buttonCancel; }
219  SimulationsSettingsFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Simulation settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
220  virtual ~SimulationsSettingsFormBase();
221 };
222 
223 
224 class AboutFormBase : public wxDialog
225 {
226 protected:
227  wxNotebook* m_notebook;
228  wxPanel* m_panelLogo;
229  wxStaticBitmap* m_staticBitmapLogo;
230  wxPanel* m_panelCredits;
231  wxGrid* m_gridCredits;
232  wxPanel* m_panelLicense;
233  wxRichTextCtrl* m_richTextCtrlLicense;
234  wxStaticText* m_staticTextVersionLabel;
235  wxStaticText* m_staticTextVersion;
236  wxStaticText* m_staticTextHome;
237  wxHyperlinkCtrl* m_hyperLinkPSP;
238  wxButton* m_buttonOK;
239 
240 protected:
241  virtual void OnOKButtonClick(wxCommandEvent& event) { event.Skip(); }
242 
243 public:
244  wxStaticBitmap* GetStaticBitmapLogo() { return m_staticBitmapLogo; }
245  wxPanel* GetPanelLogo() { return m_panelLogo; }
246  wxGrid* GetGridCredits() { return m_gridCredits; }
247  wxPanel* GetPanelCredits() { return m_panelCredits; }
248  wxRichTextCtrl* GetRichTextCtrlLicense() { return m_richTextCtrlLicense; }
249  wxPanel* GetPanelLicense() { return m_panelLicense; }
250  wxNotebook* GetNotebook() { return m_notebook; }
251  wxStaticText* GetStaticTextVersionLabel() { return m_staticTextVersionLabel; }
252  wxStaticText* GetStaticTextVersion() { return m_staticTextVersion; }
253  wxStaticText* GetStaticTextHome() { return m_staticTextHome; }
254  wxHyperlinkCtrl* GetHyperLinkPSP() { return m_hyperLinkPSP; }
255  wxButton* GetButtonOK() { return m_buttonOK; }
256  AboutFormBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About PSP-UFU"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(-1,-1), long style = wxDEFAULT_DIALOG_STYLE);
257  virtual ~AboutFormBase();
258 };
259 
260 #endif
- - -
-
- - - - diff --git a/docs/doxygen/html/_properties_form_bitmaps_8cpp_source.html b/docs/doxygen/html/_properties_form_bitmaps_8cpp_source.html deleted file mode 100644 index e43af91..0000000 --- a/docs/doxygen/html/_properties_form_bitmaps_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/PropertiesFormBitmaps.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
PropertiesFormBitmaps.cpp
-
-
-
1 //
2 // This file was automatically generated by wxrc, do not edit by hand.
3 //
4 
5 #include <wx/wxprec.h>
6 
7 #ifdef __BORLANDC__
8  #pragma hdrstop
9 #endif
10 
11 #include <wx/filesys.h>
12 #include <wx/fs_mem.h>
13 #include <wx/xrc/xmlres.h>
14 #include <wx/xrc/xh_all.h>
15 
16 #if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
17  #define XRC_ADD_FILE(name, data, size, mime) \
18  wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
19 #else
20  #define XRC_ADD_FILE(name, data, size, mime) \
21  wxMemoryFSHandler::AddFile(name, data, size)
22 #endif
23 
24 static size_t xml_res_size_0 = 52890;
25 static unsigned char xml_res_file_0[] = {
26 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,2,88,0,0,1,138,8,2,0,
27 0,0,95,26,168,50,0,0,0,1,115,82,71,66,0,174,206,28,233,0,0,0,4,103,65,77,
28 65,0,0,177,143,11,252,97,5,0,0,0,9,112,72,89,115,0,0,14,195,0,0,14,195,
29 1,199,111,168,100,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,
30 0,112,97,105,110,116,46,110,101,116,32,52,46,48,46,49,55,51,110,159,99,
31 0,0,206,10,73,68,65,84,120,94,236,157,7,152,27,197,253,247,99,12,24,3,54,
32 152,222,59,9,157,80,67,239,161,5,18,146,208,33,148,208,75,32,188,127,106,
33 32,128,68,53,216,96,211,139,193,52,3,38,128,43,24,247,118,189,247,234,235,
34 189,247,94,244,126,78,51,90,214,187,146,78,39,223,233,86,210,124,159,121,
35 238,180,179,51,187,59,237,247,153,223,214,223,56,148,148,148,148,148,148,
36 194,88,10,132,193,167,238,30,25,148,148,148,44,165,30,215,216,84,195,51,
37 184,164,64,24,124,250,37,209,177,36,118,40,180,119,202,24,37,37,37,43,168,
38 190,81,142,205,159,226,100,140,210,24,105,112,80,134,81,145,255,32,108,
39 110,149,161,191,95,198,40,5,70,140,177,5,81,67,161,173,67,198,40,5,181,
40 58,58,135,198,81,75,171,163,183,87,198,40,5,169,234,27,228,216,92,28,35,
41 99,148,198,66,237,29,142,172,34,71,90,129,163,162,118,116,88,232,63,8,151,
42 39,56,126,137,31,10,12,96,165,64,74,129,48,196,180,169,108,104,28,173,76,
43 116,212,54,200,24,165,32,149,2,97,96,84,215,40,205,96,122,129,99,96,64,
44 70,110,137,252,7,225,66,103,123,19,154,154,101,140,82,96,164,64,24,98,202,
45 43,25,106,77,76,103,117,157,140,81,10,82,41,16,6,70,10,132,74,10,132,161,
46 38,5,194,144,145,2,97,96,164,64,168,164,64,24,106,82,32,12,25,41,16,6,70,
47 10,132,74,10,132,161,38,5,194,144,145,2,97,96,164,64,168,164,64,24,106,
48 82,32,12,25,41,16,6,70,10,132,74,10,132,161,38,5,194,144,145,2,97,96,164,
49 64,168,164,64,24,106,82,32,12,25,41,16,6,70,10,132,74,10,132,161,38,5,194,
50 144,145,2,97,96,164,64,168,164,64,24,106,82,32,12,25,41,16,6,70,10,132,
51 74,10,132,161,38,5,194,144,145,2,97,96,164,64,168,164,64,24,106,82,32,12,
52 25,41,16,6,70,10,132,74,10,132,161,38,5,194,144,145,2,97,96,164,64,168,
53 164,64,24,106,82,32,12,25,41,16,6,70,10,132,142,158,158,158,198,198,198,
54 134,134,134,254,112,253,254,147,2,97,136,73,129,48,100,164,64,24,24,133,
55 59,8,123,123,123,55,109,218,180,110,221,186,181,107,215,242,99,96,84,234,
56 32,216,164,64,24,98,82,32,12,25,41,16,6,70,225,14,194,214,214,214,168,168,
57 40,40,40,212,210,210,34,87,184,4,26,113,25,73,86,235,20,176,108,106,106,
58 98,177,175,175,79,166,240,44,210,136,140,5,5,5,249,249,249,252,96,251,237,
59 237,237,86,115,61,21,8,67,76,10,132,33,35,107,130,16,147,216,217,217,89,
60 87,87,87,85,85,149,155,155,203,95,12,93,87,87,151,92,237,89,56,30,36,171,
61 175,175,175,174,174,38,99,101,101,37,25,209,184,123,32,10,132,155,129,176,
62 177,177,81,174,112,170,163,163,35,51,51,51,50,50,146,52,144,140,102,43,
63 47,47,79,76,76,140,136,136,136,143,143,167,45,7,61,124,204,152,198,166,
64 153,201,40,82,242,187,162,162,162,180,180,52,38,38,134,24,226,201,43,147,
65 90,64,10,132,33,38,5,194,144,145,213,64,200,36,30,83,134,61,196,142,101,
66 101,101,49,197,103,17,247,128,69,68,60,22,85,38,221,92,160,14,94,70,71,
67 71,147,12,163,74,22,50,146,29,219,72,12,38,17,58,118,119,119,203,212,1,
68 87,184,131,144,169,77,122,122,58,237,135,104,21,25,235,68,96,81,81,81,114,
69 114,50,179,30,183,205,195,132,40,47,47,15,200,209,156,250,169,16,241,180,
70 49,192,99,179,248,127,102,82,146,128,29,145,145,62,65,2,43,120,135,10,132,
71 33,38,5,194,144,145,69,64,136,29,195,12,50,125,207,206,206,46,44,44,196,
72 226,153,79,137,225,237,53,53,53,37,37,37,193,54,126,104,150,141,31,181,
73 181,181,105,105,105,184,16,13,13,13,36,19,241,154,216,84,115,115,51,25,
74 217,56,86,215,151,147,109,163,46,117,179,204,80,251,181,59,165,53,64,77,
75 77,13,205,166,111,75,79,162,115,224,38,166,164,164,136,115,170,109,109,
76 109,52,39,156,27,214,217,7,192,204,143,216,75,106,106,234,184,52,188,94,
77 10,132,33,38,5,194,144,145,69,64,136,49,132,82,229,229,229,204,227,61,157,
78 6,19,194,238,145,24,103,0,97,63,49,110,57,57,57,248,12,141,141,141,222,
79 77,34,155,5,135,80,54,35,35,35,240,174,161,2,161,81,80,16,239,16,143,80,
80 46,251,32,218,56,54,54,150,140,113,113,113,56,248,222,59,138,94,244,170,
81 200,200,72,124,199,241,245,11,21,8,67,76,10,132,33,35,43,128,16,39,1,251,
82 230,246,252,150,39,97,208,240,11,75,75,75,161,32,4,245,125,174,207,46,192,
83 109,102,102,102,128,77,162,2,225,102,98,74,130,151,54,34,10,10,225,23,174,
84 93,187,182,172,172,76,46,251,172,174,174,174,132,132,132,146,146,18,223,
85 59,217,168,75,129,48,196,164,64,24,50,26,119,16,226,222,97,160,26,26,26,
86 228,178,207,98,150,31,19,19,51,82,167,2,225,56,226,23,226,30,232,47,57,
87 141,181,20,8,127,85,107,107,107,82,82,146,56,201,57,82,37,38,38,22,23,23,
88 243,215,15,167,158,30,195,126,43,42,42,228,114,192,165,64,24,98,82,32,12,
89 25,141,47,8,113,203,112,206,96,161,92,246,89,76,235,139,138,138,242,243,
90 243,225,25,78,130,140,245,89,226,206,154,188,188,60,239,103,83,71,81,10,
91 132,82,180,92,92,92,156,225,174,81,31,85,95,95,207,164,137,45,192,51,154,
92 95,198,142,68,226,70,172,192,159,25,23,82,32,12,49,41,16,134,140,198,23,
93 132,109,109,109,57,57,57,126,156,165,236,235,235,203,206,206,38,59,22,213,
94 191,243,156,100,129,163,126,156,156,243,79,10,132,82,117,117,117,25,25,
95 25,114,97,36,162,201,161,96,123,123,59,191,241,237,162,163,163,249,43,86,
96 249,46,54,2,68,75,75,75,199,229,4,169,2,97,136,73,129,48,100,52,142,32,
97 236,234,234,130,97,24,70,185,60,18,149,148,148,100,101,101,225,207,97,217,
98 210,210,210,252,115,48,112,10,113,40,3,99,18,21,8,135,68,131,49,127,241,
99 244,4,140,119,137,167,236,181,214,42,44,44,244,227,84,0,18,119,156,246,
100 244,244,200,229,0,74,129,48,196,164,64,24,50,26,71,16,138,123,0,253,56,
101 57,137,33,141,137,137,209,78,168,86,87,87,179,40,126,143,72,24,67,14,32,
102 48,87,10,3,10,194,161,9,66,127,159,33,104,171,22,71,118,45,142,108,35,52,
103 52,74,63,186,163,187,163,186,169,90,31,26,90,26,6,6,61,31,230,96,191,163,
104 215,159,90,235,237,237,205,203,203,243,3,66,240,15,255,189,166,166,70,46,
105 59,121,6,83,253,59,153,192,49,248,116,118,20,232,246,25,159,197,241,174,
106 182,206,182,162,234,34,125,168,109,170,21,240,230,80,87,199,212,255,18,
107 81,71,104,109,147,205,65,187,52,119,54,235,67,123,119,251,184,120,171,163,
108 35,142,220,213,211,66,67,189,125,189,45,157,45,134,54,146,235,134,64,216,
109 191,40,178,123,105,116,79,117,157,28,44,140,175,238,222,238,238,158,205,
110 130,88,165,52,238,162,117,12,146,43,134,64,136,97,28,178,138,75,162,101,
111 7,102,24,214,183,212,27,12,99,103,183,207,103,161,24,11,189,221,190,24,
112 251,132,132,132,250,250,122,185,48,18,53,55,55,199,199,199,203,5,167,117,
113 141,142,142,246,143,103,165,165,165,197,197,197,114,193,71,1,136,1,247,
114 230,215,208,255,25,17,90,85,215,53,14,46,139,237,89,20,217,147,81,48,168,
115 213,141,121,200,248,110,216,189,129,176,160,166,32,58,63,90,31,242,202,
116 243,104,87,113,58,120,205,186,24,241,122,151,204,204,60,168,64,124,94,85,
117 222,130,228,5,250,16,147,23,163,177,211,141,186,154,29,5,171,29,85,201,
118 142,238,145,185,54,52,82,70,70,134,31,244,26,58,200,188,60,26,94,46,59,
119 207,142,102,101,101,113,252,114,217,103,209,36,226,65,84,185,236,69,244,
120 227,210,228,161,98,118,182,250,104,223,169,121,67,77,166,20,167,244,15,
121 80,226,126,220,89,241,170,85,148,158,158,14,200,73,95,211,92,99,72,191,
122 33,119,67,79,239,56,120,171,163,163,254,94,71,101,186,163,42,197,225,187,
123 189,176,182,202,107,203,23,165,44,50,180,145,88,213,222,222,158,144,144,
124 182,102,93,252,218,245,241,121,249,133,162,87,55,181,54,69,230,70,174,203,
125 90,167,15,125,3,161,50,57,232,108,115,180,143,199,5,149,209,16,6,45,187,
126 34,59,161,40,65,31,90,58,134,110,217,99,90,156,153,153,43,198,230,154,245,
127 41,229,229,229,88,9,210,71,229,70,25,154,158,1,238,211,60,181,171,221,81,
128 149,238,40,140,28,170,49,175,162,219,196,197,197,249,119,146,12,199,192,
129 112,86,12,143,208,191,83,172,108,10,163,36,23,134,21,53,208,214,228,168,
130 72,118,52,253,234,153,232,181,62,123,189,190,255,111,204,217,88,223,60,
131 68,122,106,181,176,176,108,221,134,132,53,235,18,98,227,179,154,92,246,
132 60,34,55,66,159,158,80,89,231,235,217,62,111,32,76,42,77,50,180,95,74,65,
133 10,237,215,209,209,17,165,123,207,25,118,185,170,170,202,79,16,102,47,24,
134 10,121,63,59,106,243,135,234,197,55,65,50,255,64,72,13,130,112,253,69,65,
135 250,46,51,41,63,110,123,161,188,48,201,167,41,24,32,44,88,239,44,230,79,
136 142,154,92,71,203,240,89,60,129,176,165,165,101,253,250,245,178,222,157,
137 42,44,44,36,125,8,130,176,56,66,118,140,186,2,223,59,134,101,229,5,132,
138 177,177,177,178,45,215,174,165,113,133,1,98,192,255,148,246,147,33,189,
139 183,161,228,69,61,173,142,186,44,71,109,134,37,66,105,172,35,233,19,71,
140 252,7,142,156,101,142,26,211,90,115,104,200,119,12,140,236,108,202,88,11,
141 231,126,99,238,70,67,211,224,228,177,138,193,168,77,82,17,45,139,169,241,
142 19,132,12,222,234,194,161,254,159,189,208,145,187,116,88,16,178,35,232,
143 165,57,76,35,18,232,170,173,173,149,11,78,21,20,20,248,241,104,25,18,135,
144 225,147,95,209,211,229,40,207,116,228,254,52,84,192,250,114,25,185,185,
145 12,149,182,56,101,113,117,195,80,61,131,27,189,25,140,136,136,16,103,7,
146 151,164,45,49,100,41,174,242,213,61,253,13,62,141,39,197,108,138,49,108,
147 55,54,55,182,177,169,49,59,59,91,30,130,75,73,73,73,0,38,46,39,206,144,
148 126,73,226,146,236,220,108,86,25,68,69,23,21,21,85,20,102,73,16,138,144,
149 179,184,189,178,160,164,152,53,195,40,45,45,13,199,206,167,41,213,230,130,
150 157,201,201,201,250,151,6,209,102,169,169,169,122,52,250,174,146,146,146,
151 148,148,20,121,76,158,85,86,144,211,151,185,88,87,204,69,125,101,185,37,
152 67,175,245,150,202,201,201,193,43,133,199,204,233,132,214,38,173,53,212,
153 228,242,164,229,177,113,177,209,209,209,178,198,93,162,230,153,205,101,
154 23,102,27,210,175,72,91,81,90,94,90,29,156,170,171,170,24,40,88,247,107,
155 141,229,46,233,171,43,170,173,169,146,171,131,80,217,69,52,208,162,121,
156 241,11,231,68,45,126,123,227,146,153,235,150,190,182,230,167,149,185,181,
157 75,210,43,94,95,24,249,236,119,27,31,253,122,227,3,95,69,60,244,85,196,
158 75,63,165,206,75,170,250,38,177,112,250,154,21,175,174,254,233,245,181,
159 63,189,177,110,233,123,17,75,230,198,44,42,40,175,168,26,97,29,52,231,71,
160 245,127,122,150,195,62,193,97,255,77,176,133,9,189,111,29,222,153,248,85,
161 103,123,27,195,115,11,213,213,213,197,168,31,21,117,116,118,172,207,89,
162 111,24,110,149,13,149,236,5,107,32,135,165,75,152,202,252,130,124,204,160,
163 33,125,82,254,208,253,234,158,212,81,158,231,200,91,161,245,255,193,156,
164 197,181,133,57,114,157,7,97,15,225,174,31,38,17,118,98,67,12,19,122,40,
165 136,141,149,11,35,17,64,138,140,140,148,199,228,65,45,181,149,142,234,28,
166 71,206,82,173,128,61,229,67,167,214,204,50,84,26,83,201,130,178,2,226,177,
167 153,178,126,93,42,45,29,178,117,144,210,144,37,179,48,83,12,132,97,245,
168 155,161,87,235,120,208,250,12,99,123,47,77,88,154,191,41,159,214,221,176,
169 97,131,60,4,167,152,83,224,149,103,150,102,26,210,111,200,218,208,220,210,
170 220,102,18,133,97,230,219,88,85,164,213,133,163,96,163,163,190,176,167,
171 185,186,161,174,150,85,222,85,92,92,76,93,248,7,194,248,248,120,189,255,
172 39,64,232,223,93,191,128,144,170,96,50,37,15,203,131,26,107,171,6,133,71,
173 56,84,204,13,20,115,160,179,173,163,93,86,5,106,111,111,231,144,244,202,
174 175,204,55,212,100,98,65,34,35,141,173,201,26,119,137,177,87,94,94,158,
175 177,41,195,144,126,117,230,234,146,178,18,86,5,163,170,74,139,122,115,87,
176 254,218,55,74,18,250,234,139,171,42,202,228,234,32,81,105,89,89,108,118,
177 209,188,168,92,251,207,233,55,204,139,57,253,163,13,199,188,19,113,208,
178 155,81,187,189,22,179,227,203,177,219,189,20,183,141,61,110,130,45,254,
179 55,30,194,86,246,184,109,94,136,155,252,82,236,148,87,98,247,124,61,250,
180 176,217,145,39,189,21,125,201,135,177,247,125,151,244,250,242,204,5,241,
181 249,89,5,94,219,183,172,172,106,253,71,237,51,14,52,1,38,8,194,224,75,219,
182 53,205,191,189,56,105,149,115,162,56,10,202,205,205,77,28,37,197,39,198,
183 255,156,252,179,97,184,69,165,68,49,145,221,184,113,163,28,150,46,97,247,
184 171,107,170,215,101,174,51,164,79,45,76,245,98,55,122,155,171,29,117,155,
185 112,12,68,255,31,204,89,210,90,85,34,215,121,16,13,206,1,248,97,18,17,54,
186 4,43,36,23,156,106,104,104,240,207,35,100,162,16,21,21,133,199,38,15,203,
187 164,138,138,138,166,170,18,71,85,150,211,23,148,3,188,49,107,189,68,206,
188 230,50,84,218,194,228,133,81,105,81,196,155,39,28,248,226,212,128,25,132,
189 105,155,210,156,131,97,120,253,134,186,243,164,164,18,227,169,209,164,77,
190 73,204,32,168,38,188,81,121,8,206,83,163,148,144,244,126,157,26,93,56,212,
191 222,53,133,142,190,30,223,207,128,193,81,122,182,31,231,1,200,66,70,136,
192 34,151,93,32,132,61,114,217,103,81,94,154,132,130,203,101,47,162,6,74,98,
193 112,4,29,133,107,135,174,134,250,80,76,79,167,70,153,216,14,249,139,46,
194 81,243,248,214,28,73,77,147,251,83,163,67,173,24,140,162,51,20,69,12,213,
195 216,166,53,142,150,218,161,107,233,114,133,165,53,48,56,216,211,63,208,
196 222,211,159,90,221,241,242,198,202,51,62,201,218,233,213,196,237,95,78,
197 156,244,98,194,68,187,145,115,254,5,192,185,245,11,9,108,112,135,151,19,
198 119,153,158,120,229,215,121,115,147,235,42,90,122,58,123,7,122,251,229,
199 97,12,105,160,111,48,109,158,99,198,238,6,192,4,67,152,224,120,117,71,71,
200 236,91,3,61,29,140,214,209,18,51,96,70,250,168,168,179,171,115,67,206,6,
201 195,112,171,168,175,192,25,202,202,202,146,35,211,169,152,152,24,102,216,
202 126,158,26,101,109,127,239,16,48,48,143,48,99,184,83,163,16,72,156,137,
203 149,203,35,17,6,80,92,97,209,132,167,225,223,19,20,88,102,14,67,46,184,
204 147,232,158,67,165,107,174,117,228,46,25,178,255,217,11,7,91,27,68,188,
205 65,134,74,131,115,85,245,67,215,224,0,144,254,20,244,250,245,235,49,140,
206 196,47,73,117,115,106,212,185,165,225,229,207,53,66,122,21,147,172,213,
207 235,18,196,113,228,228,228,211,63,136,47,173,43,141,200,139,208,135,236,
208 178,108,204,183,220,156,89,189,29,142,154,188,161,147,197,35,148,232,115,
209 236,84,46,251,44,14,50,35,35,67,127,179,12,53,152,151,151,231,223,229,70,
210 142,65,60,143,56,140,0,118,253,38,71,219,8,94,122,84,221,92,29,83,16,163,
211 15,5,213,5,236,145,85,244,245,245,17,169,171,215,37,173,90,159,90,81,81,
212 35,142,188,190,165,126,77,230,26,125,72,40,72,8,230,107,132,125,142,234,
213 44,71,67,57,243,20,25,99,97,13,12,58,74,91,122,86,21,182,188,19,87,115,
214 243,143,5,135,191,157,182,213,40,97,207,199,0,26,79,250,40,243,223,191,
215 148,124,153,90,31,83,222,222,218,214,226,136,123,199,241,250,46,38,198,
216 88,62,188,180,141,227,203,63,58,74,35,100,205,90,82,94,174,17,182,182,182,
217 38,38,166,9,171,136,132,97,65,233,197,233,6,195,88,217,232,243,35,91,93,
218 29,206,187,198,134,57,101,197,94,152,34,251,119,179,12,94,90,102,102,166,
219 92,112,90,182,232,232,104,255,64,40,62,91,33,23,134,21,104,168,203,115,
220 20,71,58,218,221,223,114,104,168,100,64,40,174,17,82,88,160,179,206,121,
221 153,48,54,54,190,177,81,102,223,162,107,132,242,191,59,53,181,55,149,55,
222 148,235,131,184,105,71,104,113,100,247,146,136,102,66,83,179,244,204,56,
223 62,122,137,62,12,127,121,223,7,247,200,44,118,84,82,82,226,223,227,19,76,
224 118,244,87,134,219,156,239,98,16,140,25,145,192,112,81,81,17,19,49,185,
225 60,170,226,56,57,36,131,228,58,135,99,89,92,239,162,200,222,69,81,253,218,
226 115,132,84,72,103,119,167,62,116,245,12,77,145,228,234,224,211,224,208,
227 236,193,242,194,7,139,42,109,187,255,167,226,163,223,203,152,54,61,41,192,
228 252,51,135,137,47,36,28,61,115,125,194,7,215,58,94,222,206,200,24,235,135,
229 23,182,114,172,253,175,163,99,179,187,54,44,40,198,90,126,69,126,114,65,
230 178,62,52,182,72,108,212,212,246,173,220,80,188,130,16,89,77,74,98,112,
231 127,12,86,145,224,237,161,50,183,242,97,44,87,58,63,191,42,23,70,34,108,
232 96,84,84,148,230,87,224,197,70,70,70,250,119,181,8,231,82,255,112,154,79,
233 194,241,245,128,9,3,125,42,26,42,58,152,22,56,85,223,216,255,75,76,11,244,
234 201,220,212,173,153,138,134,246,134,250,246,122,125,232,246,249,161,35,
235 111,32,244,174,113,124,160,30,19,95,80,80,224,211,105,73,147,160,32,78,
236 161,198,21,184,232,223,3,245,85,85,85,129,127,231,186,144,122,160,126,28,
237 133,65,234,236,29,168,110,235,253,34,181,254,228,143,50,39,189,152,48,238,
238 252,211,194,110,182,149,159,219,254,212,111,223,202,200,24,139,7,16,248,
239 246,97,67,247,84,123,57,123,100,37,97,127,12,146,43,228,3,245,131,132,192,
240 63,80,223,220,220,28,27,27,235,135,123,64,22,64,168,1,108,211,166,77,27,
241 55,110,20,191,71,164,246,246,246,248,120,252,51,127,92,201,145,74,189,89,
242 70,138,74,199,7,247,227,236,40,8,20,119,184,240,187,171,171,139,174,227,
243 135,87,71,198,172,172,172,234,113,250,108,189,2,225,120,169,177,171,127,
244 126,70,195,205,63,22,236,243,70,138,1,66,227,27,38,216,226,254,96,155,187,
245 210,126,170,145,49,214,15,47,110,227,88,112,243,208,3,30,67,115,140,160,
246 215,248,190,107,52,221,249,202,108,61,152,125,84,69,69,5,206,28,230,20,
247 40,98,18,253,248,120,5,59,45,44,44,44,41,41,145,203,99,44,5,66,41,234,29,
248 167,208,191,79,64,136,153,11,173,158,146,146,226,31,204,154,154,154,162,
249 163,163,245,167,43,3,41,5,194,192,171,127,96,240,127,153,13,184,128,83,
250 94,77,50,64,200,10,225,20,219,231,57,246,3,7,131,238,49,137,25,187,59,82,
251 62,115,116,251,243,1,25,107,106,124,65,216,218,218,42,120,38,151,125,22,
252 206,64,82,82,18,252,171,114,126,126,220,191,45,144,209,191,187,117,252,
253 144,2,225,175,234,238,238,78,76,76,244,239,51,76,120,132,184,116,204,125,
254 252,152,61,181,57,223,50,26,152,51,0,110,165,64,24,72,53,116,246,45,201,
255 109,58,103,110,182,117,78,129,234,195,182,182,168,243,109,239,87,217,119,
256 53,50,198,226,225,197,173,29,31,28,239,40,222,224,203,213,175,32,210,248,
257 130,176,127,232,46,146,161,39,14,71,122,201,6,51,136,51,135,67,185,126,
258 253,122,63,46,21,177,187,178,178,161,167,155,252,32,168,127,82,32,220,76,
259 80,48,35,35,3,255,76,46,251,172,210,210,210,181,107,215,230,231,231,203,
260 101,159,197,156,139,238,226,199,30,71,81,10,132,129,81,125,103,223,59,113,
261 53,231,125,150,179,221,75,137,6,252,88,36,108,111,219,248,180,237,190,38,
262 251,20,35,102,44,30,94,155,230,88,243,140,163,213,159,59,59,44,174,241,
263 5,33,194,51,219,180,105,83,110,110,238,72,153,84,81,81,1,5,35,35,35,13,
264 207,20,14,43,118,148,231,212,24,221,57,232,86,10,132,70,137,179,148,35,
265 242,11,113,255,201,130,83,24,23,23,55,162,147,171,80,48,38,38,166,161,97,
266 232,169,23,25,53,30,82,32,12,128,178,235,58,207,254,52,219,178,8,20,225,
267 101,219,109,93,246,73,70,204,88,60,188,58,213,145,245,157,163,63,104,159,
268 237,241,170,113,7,33,26,112,126,50,30,249,126,237,6,203,182,113,227,70,
269 140,97,113,113,241,72,79,141,146,5,244,6,248,182,65,5,66,55,130,130,201,
270 201,201,180,71,119,183,183,215,141,211,45,58,157,175,216,142,143,143,23,
271 143,18,246,244,244,20,21,21,17,211,216,216,232,165,237,193,94,87,87,151,
272 184,158,236,199,101,228,81,151,2,225,216,105,96,208,81,220,212,253,226,
273 134,202,41,175,88,241,90,160,8,19,108,241,251,218,126,250,194,126,249,160,
274 129,49,22,15,47,77,114,124,125,153,163,62,71,214,117,40,202,10,32,68,88,
275 179,236,236,108,88,88,93,93,237,221,81,195,178,149,151,151,227,18,212,215,
276 215,99,33,17,84,99,177,172,172,204,251,5,63,118,129,49,36,49,134,81,24,
277 79,242,178,145,146,146,18,156,147,177,118,21,20,8,221,171,163,163,3,16,
278 38,37,37,9,170,49,193,17,68,164,61,160,35,139,120,129,57,57,57,249,206,
279 111,48,233,123,6,9,232,43,52,39,40,229,7,76,213,136,200,22,200,75,163,226,
280 245,199,198,198,150,150,150,250,113,107,242,88,72,129,112,140,212,221,55,
281 240,118,108,205,209,239,165,79,180,39,24,216,99,169,240,91,219,15,235,236,
282 39,246,219,39,26,73,99,229,240,234,20,71,204,155,142,174,113,187,178,30,
283 24,89,4,132,8,59,86,87,87,7,14,19,19,19,177,126,88,54,152,39,86,97,199,
284 248,93,91,91,155,153,153,137,221,195,25,208,191,24,4,158,145,0,147,136,
285 107,152,145,145,65,70,141,136,88,78,97,18,217,96,122,122,58,38,23,211,74,
286 122,86,97,72,177,144,226,213,155,17,17,17,254,61,219,230,187,20,8,61,138,
287 150,160,157,196,236,38,210,169,168,168,40,241,3,17,73,219,184,245,23,201,
288 136,160,96,74,74,138,76,173,19,8,100,114,68,207,32,141,204,48,222,82,32,
289 28,117,209,180,185,245,93,23,124,158,51,233,69,75,35,112,130,45,238,247,
290 182,121,5,246,125,131,233,6,209,23,38,56,62,56,206,81,17,239,8,153,207,
291 72,121,150,117,64,40,4,165,196,189,160,210,156,233,4,228,112,12,112,33,
292 220,90,54,34,155,155,155,221,102,132,115,185,185,185,176,83,159,145,29,
293 225,105,12,189,80,199,41,126,203,21,99,35,5,66,159,68,11,209,192,204,122,
294 218,218,218,152,194,140,136,97,76,127,152,4,225,56,178,5,242,202,88,43,
295 73,129,112,116,213,217,55,240,99,118,227,145,239,166,27,168,99,181,48,209,
296 22,251,87,219,107,165,246,61,141,164,177,114,120,117,7,199,194,91,29,205,
297 35,252,88,107,208,202,106,32,212,11,63,1,203,134,48,107,222,207,151,26,
298 68,98,60,63,50,98,81,61,157,21,195,198,230,229,229,73,12,174,93,139,67,
299 41,87,140,141,20,8,149,20,8,71,83,13,157,125,119,45,41,154,106,201,167,
300 3,245,97,43,91,236,99,246,135,106,237,59,27,73,99,229,240,206,225,67,159,
301 23,232,13,163,110,106,101,16,142,181,240,32,179,178,178,54,110,220,8,17,
302 199,250,129,66,5,66,37,247,32,100,70,102,144,92,161,228,65,3,131,131,229,
303 45,61,151,205,203,181,230,3,130,250,176,163,109,195,76,251,141,221,246,
304 109,140,164,177,108,120,113,27,199,156,83,29,53,233,244,75,89,221,225,161,
305 112,6,33,194,236,128,192,0,24,31,5,194,112,87,127,127,255,138,152,166,159,
306 55,150,16,154,154,37,9,219,187,218,51,202,51,244,161,168,182,200,219,119,
307 63,194,94,93,125,3,159,37,215,29,246,86,154,1,57,22,12,123,216,86,124,104,
308 255,107,48,81,112,230,94,142,245,118,71,215,120,62,107,59,94,10,115,16,
309 6,76,10,132,97,173,190,190,190,204,204,204,181,235,228,199,32,227,226,226,
310 196,41,136,154,102,247,223,35,20,185,148,204,154,21,83,109,253,211,161,
311 132,35,108,255,139,180,31,23,76,239,209,126,235,96,71,209,154,161,79,10,
312 132,165,20,8,3,35,5,194,176,86,71,71,71,116,116,180,160,160,80,126,254,
313 208,199,32,43,235,43,13,32,92,159,179,190,179,171,147,85,66,94,30,175,12,
314 55,181,116,247,63,183,174,220,250,167,67,9,191,183,205,75,182,255,206,72,
315 26,203,134,151,39,59,126,188,209,250,223,81,218,66,13,14,14,118,116,119,
316 180,116,181,232,131,246,189,185,250,134,129,69,145,61,132,37,209,161,127,
317 139,236,56,74,129,48,172,85,95,95,47,1,232,18,92,76,77,77,141,76,142,52,
318 128,112,89,202,178,228,180,100,86,9,101,103,103,143,232,62,177,80,85,99,
319 87,223,29,139,139,44,254,140,4,97,107,91,204,141,182,23,242,236,251,27,
320 97,99,217,240,230,126,142,196,15,29,61,35,123,59,87,48,170,215,243,135,
321 121,187,187,187,179,178,242,214,172,139,31,10,27,210,2,240,92,121,216,74,
322 129,48,172,101,246,8,115,115,115,135,222,13,81,87,110,24,153,235,178,215,
323 181,182,183,178,74,136,100,250,239,242,135,167,58,123,7,174,154,159,191,
324 205,11,86,167,224,68,91,204,253,182,39,26,236,83,141,176,177,108,248,252,
325 60,71,93,118,176,124,77,112,11,229,5,132,133,133,133,235,214,173,147,35,
326 115,237,218,248,248,248,177,190,121,50,108,165,64,24,214,234,235,235,203,
327 202,202,210,6,91,98,98,162,143,215,8,55,109,218,196,252,84,46,132,165,138,
328 154,186,255,248,101,238,4,19,117,172,22,166,218,214,253,219,246,255,58,
329 236,65,242,137,249,215,118,118,44,185,203,209,49,182,175,17,25,95,49,232,
330 202,203,203,139,93,42,40,44,88,153,190,210,48,220,178,10,179,160,96,76,
331 76,140,24,152,66,81,81,81,250,55,182,40,141,162,20,8,195,93,189,189,189,
332 203,163,107,151,111,44,35,180,180,202,231,253,155,219,154,179,202,178,244,
333 161,168,186,72,187,110,129,194,28,132,245,29,125,23,127,153,59,209,242,
334 215,5,247,179,45,253,198,126,113,175,125,107,35,111,172,24,38,56,230,156,
335 226,200,255,41,228,239,139,169,172,172,204,201,201,169,169,169,169,117,
336 170,178,170,114,117,230,106,3,8,115,75,114,171,171,171,147,147,147,37,3,
337 157,138,28,249,151,28,148,124,148,2,161,210,80,15,88,24,53,72,208,158,35,
338 28,28,28,28,24,28,208,7,195,197,137,112,6,97,103,239,192,159,191,201,183,
339 254,221,49,211,108,171,151,218,207,26,8,138,27,68,95,156,232,248,242,34,
340 71,83,113,56,60,38,88,234,148,92,240,122,106,148,81,166,63,53,154,148,148,
341 164,46,204,143,145,20,8,149,100,15,32,248,254,102,153,176,5,97,115,87,255,
342 237,139,138,44,254,18,237,173,108,177,167,217,62,141,177,31,109,228,141,
343 37,67,153,125,143,232,239,158,29,232,179,226,219,7,199,66,6,16,246,245,
344 245,37,22,38,226,20,234,67,93,243,208,201,97,86,149,149,213,172,94,151,
345 68,88,179,49,112,159,107,15,67,41,16,42,41,16,250,42,220,149,167,86,149,
346 77,122,201,234,119,199,92,106,155,93,104,223,39,40,222,163,29,105,63,238,
347 84,219,103,123,189,150,48,47,173,94,214,114,168,203,0,194,193,193,193,238,
348 158,238,142,174,14,125,208,61,62,225,88,28,217,75,88,18,163,30,88,26,67,
349 41,16,42,41,16,250,164,222,254,193,183,98,170,39,90,251,30,209,73,182,168,
350 171,108,175,183,216,119,48,240,198,130,161,195,190,221,44,219,13,83,108,
351 235,196,13,71,187,189,158,188,166,168,53,28,158,14,48,128,208,187,124,121,
352 160,126,96,96,0,223,81,72,124,195,200,15,137,141,132,237,243,193,10,132,
353 74,10,132,195,171,111,96,240,189,248,154,237,173,253,125,121,160,242,130,
354 237,142,206,96,248,196,124,166,253,224,219,109,207,110,103,139,212,31,255,
355 9,31,100,102,215,201,79,220,133,176,70,29,132,218,183,81,81,113,113,177,
356 31,215,17,161,96,121,121,57,217,139,138,138,44,242,145,212,0,75,129,80,
357 73,129,112,120,101,212,118,30,48,43,85,111,181,173,22,182,181,69,125,102,
358 191,162,203,190,173,1,57,86,11,253,246,173,190,178,95,122,184,237,199,9,
359 182,56,67,17,112,13,207,255,60,167,187,127,52,236,144,133,53,234,32,44,
360 41,41,129,133,221,221,221,93,93,93,89,89,89,13,13,13,114,133,207,34,99,
361 118,118,118,91,91,91,101,101,229,88,127,2,215,63,225,173,82,64,33,126,203,
362 216,17,106,232,44,180,243,139,81,230,247,18,88,26,132,29,29,29,5,46,209,
363 117,104,45,185,98,36,98,130,195,44,137,153,78,120,222,220,225,139,20,8,
364 189,171,181,167,255,226,175,114,13,86,219,58,1,162,28,100,91,188,220,126,
365 154,245,47,10,214,219,119,122,213,126,235,14,182,13,134,34,104,1,22,62,
366 186,162,180,167,63,148,207,144,142,58,8,177,111,108,176,165,165,133,33,
367 153,146,146,130,197,171,169,169,137,142,142,142,140,140,196,238,53,54,54,
368 38,37,37,49,96,89,149,150,150,6,50,49,167,17,17,17,171,87,175,214,44,106,
369 103,103,39,238,32,132,128,130,21,21,21,102,78,140,187,0,60,197,73,112,42,
370 35,35,195,191,251,134,202,202,202,98,99,99,19,19,19,235,235,141,23,164,
371 45,13,66,90,5,151,159,214,69,52,36,19,31,63,206,128,179,5,58,10,173,75,
372 85,250,125,2,125,188,196,1,211,120,148,29,21,22,22,250,215,252,76,244,196,
373 22,16,163,69,198,234,164,64,232,69,237,189,3,247,44,41,50,216,107,75,133,
374 83,108,159,71,217,143,181,248,99,18,28,222,106,251,41,23,218,222,51,59,
375 130,134,176,211,171,73,223,103,53,14,132,46,10,71,29,132,88,6,8,199,144,
376 4,102,201,201,201,140,113,224,199,223,230,230,230,244,244,116,160,200,95,
377 232,8,0,202,203,203,161,29,49,237,237,237,169,169,169,24,70,177,133,254,
378 254,126,232,136,133,204,204,204,36,210,154,32,172,173,149,111,157,165,188,
379 24,31,108,99,181,83,226,99,233,148,23,94,136,178,19,195,15,86,145,69,239,
380 62,82,33,44,98,81,153,31,24,202,104,117,16,2,63,113,196,20,30,183,157,223,
381 113,113,113,76,103,192,27,69,162,237,227,227,227,137,167,165,233,4,20,62,
382 38,38,134,181,148,83,108,1,137,194,211,240,164,9,186,75,193,244,90,102,
383 115,52,167,104,102,255,138,192,70,200,142,214,172,89,227,150,94,10,132,
384 158,68,215,251,40,177,118,135,151,173,123,105,240,34,219,187,229,246,61,
385 172,239,11,206,181,95,177,167,109,249,176,20,20,225,168,247,210,43,91,67,
386 246,74,213,168,131,144,173,225,226,96,27,97,67,94,94,30,147,126,44,6,118,
387 3,99,8,237,192,30,145,216,64,64,200,152,197,128,96,84,49,155,107,215,174,
388 213,64,136,136,199,65,36,49,46,163,53,65,136,51,231,124,207,113,42,176,
389 199,37,192,236,243,59,59,59,27,79,151,34,243,23,194,177,72,74,76,37,94,
390 35,200,32,1,201,228,38,156,167,70,153,10,80,15,36,144,81,46,89,29,132,235,
391 215,175,223,232,212,134,13,27,4,225,105,84,168,70,177,27,26,26,168,145,
392 214,214,86,166,0,76,100,48,247,84,4,29,130,233,0,205,172,191,228,75,27,
393 211,87,168,23,11,54,176,119,9,16,82,70,250,49,109,15,254,137,161,248,20,
394 83,76,118,40,44,164,39,1,156,163,151,83,106,170,133,181,44,234,11,203,111,
395 102,124,204,21,228,242,230,42,175,118,148,86,14,133,46,159,31,229,10,19,
396 16,102,213,118,254,238,157,116,131,153,182,72,216,218,22,115,189,253,197,
397 58,107,127,98,30,66,23,217,247,254,167,237,191,91,217,98,13,199,239,61,
398 92,54,47,183,165,59,52,239,96,116,114,208,87,16,118,247,200,177,89,246,
399 171,61,55,10,176,97,223,49,11,216,1,44,33,246,16,30,8,164,193,3,126,48,
400 240,177,129,2,132,152,11,76,10,38,2,72,104,14,3,107,177,39,100,39,198,143,
401 75,140,1,16,120,3,219,206,249,124,11,8,224,248,193,54,128,160,224,120,195,
402 212,0,9,40,69,110,110,46,228,99,66,64,49,41,8,102,202,224,224,146,11,75,
403 104,246,122,131,198,35,20,119,70,137,115,217,148,60,33,33,129,114,82,120,
404 156,98,90,23,200,81,120,168,64,15,16,83,6,226,197,70,168,29,0,73,221,233,
405 209,24,44,2,123,98,90,71,73,113,7,105,102,74,65,97,41,81,84,84,20,117,66,
406 121,169,22,166,8,204,12,232,1,84,5,105,68,231,232,232,248,213,191,163,54,
407 216,130,127,103,86,221,42,28,64,216,221,55,112,225,23,57,6,3,109,145,176,
408 189,109,227,75,246,219,45,254,30,109,40,248,189,253,130,223,219,230,77,
409 28,33,5,69,120,124,101,89,127,176,205,92,125,209,136,64,232,139,160,2,198,
410 29,134,33,120,134,197,3,126,88,9,246,130,101,0,111,24,82,113,145,5,11,128,
411 1,33,158,148,88,9,18,139,45,96,99,201,66,36,105,152,94,139,72,75,9,243,
412 37,142,150,67,229,248,41,17,38,8,22,80,112,1,66,129,0,98,4,35,49,131,148,
413 69,92,23,211,152,71,205,240,151,188,102,16,182,180,58,178,139,29,153,133,
414 142,202,186,161,243,64,91,46,255,65,216,220,38,131,230,151,136,35,166,120,
415 72,52,30,5,163,252,76,10,152,233,0,66,48,64,187,98,145,89,69,26,106,132,
416 90,64,144,67,3,33,120,0,18,84,141,161,228,65,33,131,71,72,1,5,248,105,254,
417 216,216,88,234,68,80,144,25,0,63,168,10,90,154,254,13,245,41,50,145,114,
418 43,14,7,147,68,106,82,244,131,81,81,200,131,144,190,50,43,166,122,107,75,
419 62,53,56,197,182,126,174,253,202,30,107,127,98,190,221,190,221,147,182,
420 7,57,84,195,193,251,30,14,156,149,154,86,19,130,239,82,97,216,34,185,48,
421 26,194,178,9,35,137,132,149,19,49,252,213,36,34,157,201,55,91,43,98,144,
422 22,41,151,45,38,64,8,234,176,57,152,119,126,99,220,240,16,64,29,134,8,79,
423 23,16,10,4,0,66,184,128,193,4,16,224,3,231,129,92,90,161,176,153,208,148,
424 196,218,12,64,19,73,112,4,9,163,85,1,254,131,208,44,138,77,73,48,235,224,
425 29,67,79,225,241,129,68,12,139,130,127,160,130,120,225,14,83,102,208,200,
426 90,106,71,248,127,240,3,40,34,34,41,63,105,196,150,131,69,148,14,239,86,
427 248,118,176,60,51,51,83,76,2,232,1,241,241,241,148,136,154,161,225,169,
428 1,138,76,98,166,117,98,42,68,145,245,32,164,222,208,40,246,242,144,7,97,
429 86,109,231,33,179,173,248,188,196,126,182,159,62,177,255,185,223,62,209,
430 0,30,235,132,1,251,86,169,246,195,110,176,189,184,181,45,198,112,240,35,
431 10,19,108,241,15,254,92,210,19,114,79,83,140,58,8,195,65,88,57,32,39,4,
432 11,49,101,205,205,205,252,102,222,207,44,159,223,136,72,140,18,118,146,
433 25,127,69,69,5,54,10,39,129,120,185,9,231,109,131,100,97,213,40,186,4,158,
434 52,154,32,132,91,56,64,136,178,97,229,41,167,136,1,114,16,142,223,252,37,
435 18,137,130,241,87,172,229,7,145,196,240,151,69,178,35,129,198,224,18,165,
436 142,140,140,100,238,3,246,152,206,192,123,252,66,126,196,197,197,225,41,
437 226,23,26,64,8,237,72,207,20,9,143,16,100,138,141,80,9,160,145,100,98,113,
438 84,20,218,32,236,233,31,124,120,89,137,5,95,40,122,166,109,78,156,253,40,
439 43,223,26,211,109,223,246,77,251,13,7,219,22,25,142,220,191,176,253,203,
440 137,63,102,53,202,86,9,21,41,16,134,131,70,19,132,74,8,222,195,117,33,65,
441 119,17,195,95,22,133,136,212,254,138,85,98,237,80,126,167,134,18,233,22,
442 183,92,161,13,194,212,234,142,41,175,88,235,78,209,9,182,184,83,108,159,
443 91,249,19,243,224,185,201,62,229,33,251,163,219,218,162,12,7,191,37,225,
444 192,89,169,117,29,86,188,106,229,183,20,8,195,65,10,132,97,161,16,6,97,
445 67,103,223,153,159,102,27,204,241,248,134,237,108,17,183,216,158,47,179,
446 239,97,96,143,117,66,159,125,226,82,251,89,167,218,62,51,28,249,150,7,252,
447 242,39,86,149,133,210,35,246,10,132,225,32,5,194,176,80,8,131,208,190,190,
448 194,82,247,200,76,178,69,61,107,187,199,202,239,209,238,179,111,253,156,
449 237,174,93,109,171,124,124,76,112,164,225,128,55,83,179,66,232,29,164,91,
450 8,194,126,231,109,240,237,186,79,213,247,246,246,102,103,103,111,216,176,
451 65,92,39,99,237,250,245,235,51,51,51,251,156,175,37,75,78,78,142,136,136,
452 16,119,81,144,184,173,173,173,160,160,128,44,34,175,210,24,73,129,48,44,
453 20,170,32,172,104,237,57,254,131,12,131,33,30,199,176,179,109,141,221,118,
454 7,164,49,176,199,34,97,208,62,33,199,126,224,101,182,89,254,61,32,225,123,
455 120,110,109,121,200,60,74,177,37,32,4,96,133,133,133,113,113,113,218,29,
456 0,168,166,166,166,184,184,184,177,177,49,49,49,177,179,179,147,4,93,93,
457 93,169,169,169,21,21,21,37,37,37,112,177,163,163,35,61,61,157,72,32,154,
458 155,155,155,148,148,164,191,97,2,64,18,47,238,183,144,81,206,72,254,18,
459 35,126,4,94,148,212,176,107,98,40,130,136,228,104,41,41,152,31,186,228,
460 227,188,17,68,44,178,138,69,113,167,136,51,211,184,105,139,64,88,95,95,
461 175,191,201,7,177,200,212,134,150,22,165,205,203,203,203,200,200,16,38,
462 152,72,86,177,72,60,245,66,147,231,228,228,136,186,80,26,107,133,42,8,191,
463 74,171,223,206,50,159,27,60,220,246,195,15,246,243,7,172,122,107,76,183,
464 125,219,79,108,127,62,218,54,127,140,28,65,125,216,253,245,228,252,134,
465 16,113,10,183,4,132,152,251,242,242,114,12,93,107,107,171,140,114,190,66,
466 83,60,41,40,104,135,169,196,108,2,66,208,136,255,7,63,200,69,22,86,145,
467 11,223,81,216,76,145,23,4,194,75,214,138,231,13,68,36,155,34,146,52,152,
468 211,170,170,170,192,179,16,127,23,168,235,203,200,145,80,58,142,19,204,
469 99,237,249,139,9,202,114,190,68,134,2,66,119,220,92,106,134,226,112,192,
470 196,147,120,124,89,232,39,8,105,60,138,29,25,25,73,163,202,40,231,3,3,81,
471 81,81,52,39,5,19,51,29,154,135,54,142,143,143,103,85,90,90,26,181,192,100,
472 71,52,91,126,126,62,44,244,187,135,89,68,148,133,18,81,27,114,217,25,67,
473 205,208,161,69,119,228,7,21,34,186,59,173,14,141,196,162,126,149,51,223,
474 216,42,36,65,56,48,56,120,150,101,174,14,238,101,251,37,210,126,92,191,
475 85,223,32,218,108,223,241,118,219,179,59,110,193,99,130,35,13,247,44,249,
476 245,125,96,65,173,45,1,161,24,245,88,66,61,36,216,26,46,4,246,1,199,64,
477 88,134,218,218,218,132,132,4,225,84,16,143,191,72,26,225,45,8,255,65,131,
478 4,20,1,141,36,192,150,110,220,184,81,68,146,18,115,138,201,197,22,1,24,
479 97,121,2,38,14,27,179,47,206,244,202,40,103,25,41,53,199,3,224,41,29,30,
480 17,71,46,158,169,192,57,102,21,139,20,28,94,82,28,76,19,9,32,162,204,60,
481 30,242,19,132,20,131,26,103,22,0,213,101,148,243,217,17,34,105,120,218,
482 143,150,22,147,20,26,9,46,138,199,42,169,41,22,105,39,18,144,152,150,163,
483 252,164,23,217,153,86,80,23,172,210,79,106,168,35,226,73,3,51,200,43,34,
484 45,34,42,129,246,214,159,184,160,105,57,120,218,94,188,76,142,38,7,255,
485 180,180,152,25,80,100,18,51,27,162,44,84,5,201,136,39,65,0,88,24,146,32,
486 92,146,219,100,48,190,227,18,182,182,197,156,105,155,99,217,27,68,123,237,
487 91,167,217,15,251,163,237,157,0,56,130,250,128,83,152,89,27,10,207,215,
488 51,198,145,92,24,185,220,130,80,120,132,120,117,218,216,103,132,18,47,224,
489 135,197,128,16,164,33,1,6,86,188,163,3,219,66,50,108,14,44,193,146,176,
490 217,149,43,87,178,72,228,248,130,144,99,64,88,51,61,8,41,2,252,195,48,98,
491 226,196,105,97,142,159,178,20,21,21,81,46,14,18,192,99,216,57,96,12,32,
492 71,206,42,34,69,94,81,99,192,21,145,94,20,28,197,198,198,226,60,128,18,
493 168,49,234,44,240,223,35,164,186,57,116,104,39,163,92,175,88,35,158,82,
494 137,119,1,240,155,34,209,72,172,74,73,73,161,0,44,82,108,138,135,93,166,
495 19,64,5,173,72,32,132,74,33,35,205,79,75,139,72,242,86,87,87,211,45,248,
496 17,24,231,201,71,81,3,180,37,199,79,185,52,16,82,22,14,158,162,137,57,29,
497 109,198,111,34,41,56,63,136,209,202,37,124,98,58,16,200,164,117,69,36,41,
498 73,64,21,81,129,218,252,128,178,3,78,106,146,58,244,187,6,66,15,132,245,
499 157,125,199,190,111,137,171,131,55,218,94,40,183,239,110,192,143,69,66,
500 155,125,251,231,237,119,237,109,91,102,56,230,0,132,137,47,36,60,179,166,
501 188,55,248,63,75,193,176,69,114,97,228,210,131,80,216,116,236,6,246,1,108,
502 224,72,0,3,172,40,118,64,24,73,204,2,182,2,123,66,74,178,176,200,218,184,
503 184,56,44,128,200,75,74,44,140,240,52,0,3,145,136,93,96,136,48,35,88,143,
504 156,156,28,108,133,72,28,72,121,7,33,135,132,121,23,30,48,197,164,248,84,
505 2,135,138,81,114,11,66,42,129,2,146,61,61,61,29,3,40,226,173,8,66,33,26,
506 216,45,8,203,202,202,168,5,126,96,127,169,32,202,67,97,40,51,173,72,25,
507 200,226,9,132,84,16,185,72,64,207,19,109,105,89,16,34,142,92,204,104,52,
508 16,10,176,17,73,89,104,87,90,148,82,176,72,183,224,47,61,152,57,14,224,
509 228,183,40,81,116,116,52,37,213,152,71,135,136,143,143,167,86,233,61,98,
510 38,129,168,40,81,75,212,36,227,65,68,142,84,161,7,194,143,18,107,183,27,
511 239,15,208,79,180,197,222,107,123,178,195,190,157,1,63,86,8,226,49,193,
512 191,219,166,111,107,139,54,28,118,192,194,113,239,103,148,183,140,231,133,
513 159,81,145,147,131,254,131,80,216,67,113,90,139,97,136,173,64,24,141,245,
514 235,215,51,156,69,36,191,5,255,24,227,107,215,174,101,17,70,10,115,135,
515 233,39,1,134,69,108,77,152,208,200,200,72,76,7,219,196,98,104,190,199,198,
516 141,27,177,45,24,79,17,169,101,9,140,12,32,196,184,113,36,88,57,72,6,209,
517 43,43,43,41,178,152,241,115,180,136,31,216,67,144,193,95,10,130,229,231,
518 152,157,89,135,64,136,241,36,23,70,143,181,20,71,196,3,66,34,131,0,132,
519 226,76,32,13,64,203,81,41,192,128,234,160,117,89,69,163,82,6,168,0,18,0,
520 27,29,139,181,164,161,192,162,82,144,72,47,106,129,223,34,146,223,36,166,
521 46,196,213,99,17,105,29,209,210,94,64,72,209,56,114,230,65,76,127,40,59,
522 49,52,57,179,54,74,68,171,211,69,88,164,199,139,83,7,136,196,130,121,164,
523 39,129,152,10,0,48,202,78,36,189,92,115,40,71,170,16,3,97,107,119,255,37,
524 227,253,233,221,157,109,107,94,183,223,108,205,55,136,114,84,11,236,231,
525 30,97,251,222,112,204,1,14,19,108,241,159,167,212,5,218,55,25,109,13,97,
526 112,52,110,101,96,56,99,247,183,208,130,99,97,48,146,126,219,129,177,147,
527 0,33,101,196,136,81,70,126,99,217,112,120,32,25,191,19,18,18,64,29,197,
528 199,226,49,197,231,55,127,197,5,35,76,19,96,211,159,24,3,1,96,130,120,224,
529 66,97,41,50,22,85,176,131,148,196,243,3,147,171,153,205,81,209,22,129,144,
530 242,96,241,57,68,74,5,168,177,251,148,13,71,30,107,78,129,113,110,112,128,
531 248,75,36,86,24,96,176,74,160,142,50,80,114,225,242,203,109,57,65,40,222,
532 70,70,57,97,30,211,40,129,79,166,63,73,73,73,2,132,64,148,186,147,25,44,
533 32,3,8,233,1,96,143,66,209,3,24,60,180,31,253,3,170,9,216,115,228,212,21,
534 85,193,4,2,40,130,58,210,83,57,90,37,144,128,69,26,94,204,21,72,76,164,
535 0,33,187,160,99,41,16,10,101,214,118,238,49,35,217,96,118,3,25,118,181,
536 173,90,96,63,175,219,190,173,129,64,86,8,141,246,169,247,217,158,216,197,
537 182,218,112,204,227,18,78,250,40,51,216,79,142,58,57,56,10,32,68,152,62,
538 49,168,253,22,150,4,174,88,208,37,224,168,48,92,148,14,115,7,210,248,129,
539 89,131,11,28,42,70,146,72,196,34,171,48,101,192,66,172,34,35,107,1,36,214,
540 73,243,136,132,47,36,78,43,146,134,69,12,41,107,197,118,176,129,192,69,
541 176,86,164,31,21,109,17,8,41,45,226,7,199,36,108,52,139,28,183,40,18,127,
542 249,45,22,137,23,139,34,189,182,86,252,22,2,132,144,149,18,106,217,69,188,
543 115,27,114,155,67,251,219,178,158,52,186,162,109,152,242,208,180,116,2,
544 209,150,204,98,64,35,222,27,176,167,57,65,56,163,136,162,145,18,23,16,4,
545 34,26,24,192,179,138,223,164,212,186,53,32,100,222,64,46,102,18,84,41,139,
546 52,57,127,217,5,41,163,163,163,169,100,18,147,87,164,247,93,33,6,194,15,
547 18,106,241,54,12,54,55,48,97,130,45,238,183,182,31,226,236,71,89,240,49,
548 9,14,41,213,126,248,169,182,207,198,250,49,65,223,195,4,123,124,92,197,
549 175,207,146,7,163,70,17,132,33,47,12,32,252,195,214,201,101,191,132,181,
550 199,145,208,28,196,192,104,139,64,168,73,144,64,46,248,43,44,53,83,3,185,
551 16,36,162,225,193,18,127,169,1,88,5,164,1,185,152,224,208,156,176,16,4,
552 34,98,72,0,195,248,13,204,88,69,94,210,224,249,49,217,17,155,66,194,35,
553 172,116,126,167,144,109,210,159,196,57,1,182,195,84,136,72,42,153,72,232,
554 40,51,248,172,80,2,33,179,170,83,62,206,52,24,220,128,133,243,108,31,36,
555 216,143,176,224,123,180,155,237,59,126,96,255,219,33,182,133,134,3,30,247,
556 112,231,226,34,43,205,93,71,44,5,194,0,11,139,135,221,195,144,202,229,128,
557 104,116,64,56,42,26,242,245,130,118,196,192,45,61,210,252,19,32,204,211,
558 61,79,50,138,10,37,16,70,149,182,77,28,143,119,170,225,11,222,102,127,174,
559 194,146,55,136,86,218,119,187,202,246,250,100,91,132,225,152,173,16,14,
560 127,59,45,168,111,153,81,32,12,7,89,8,132,74,104,140,166,2,33,3,194,129,
561 65,199,109,11,11,13,166,54,0,97,146,45,242,30,219,83,120,93,6,2,89,36,212,
562 216,167,37,217,127,151,104,63,34,192,97,189,253,196,231,237,119,121,255,
563 156,239,148,87,146,22,229,6,113,223,11,0,8,153,70,27,6,62,179,97,225,18,
564 17,207,15,33,34,197,34,233,69,50,165,209,146,2,97,88,40,100,64,184,169,
565 177,123,191,55,3,253,1,222,93,109,171,94,183,255,163,213,190,189,1,63,225,
566 28,6,236,91,69,218,143,187,214,246,10,83,4,67,117,153,195,191,127,41,237,
567 238,11,86,219,61,214,32,236,238,238,102,251,157,186,123,0,219,156,143,76,
568 228,58,223,188,209,213,213,197,239,252,252,252,196,196,68,146,53,59,63,
569 111,27,116,151,144,172,47,5,194,176,80,200,128,240,139,212,250,29,2,251,
570 233,65,40,248,163,253,188,94,171,190,71,123,92,194,160,125,194,91,246,107,
571 247,178,45,219,202,183,183,213,252,254,195,140,250,206,128,94,242,25,69,
572 57,57,56,86,32,236,112,222,88,30,31,31,175,191,55,164,164,164,164,162,162,
573 130,24,241,52,90,79,79,79,107,107,43,105,160,32,241,13,13,13,85,206,123,
574 245,101,106,165,209,208,88,129,16,231,189,182,182,150,14,164,191,197,81,
575 68,150,149,149,213,212,212,224,224,51,21,162,93,73,67,147,211,222,213,213,
576 213,172,85,13,60,22,10,13,16,246,15,14,254,223,138,210,9,118,163,157,29,
577 187,112,128,109,201,247,182,11,44,120,107,204,120,133,126,251,86,9,246,
578 35,47,181,189,229,35,2,69,216,230,133,132,224,125,221,154,147,131,99,8,
579 66,140,33,206,159,30,132,197,197,197,245,245,245,88,72,113,75,57,38,177,
580 188,188,156,72,236,39,241,233,233,233,252,149,73,131,68,152,247,184,205,
581 63,193,1,221,41,93,84,84,84,102,102,38,107,169,225,232,232,104,210,0,123,
582 74,23,27,27,11,236,101,210,128,104,172,64,136,243,46,30,36,79,78,78,214,
583 30,15,192,211,207,201,201,161,156,52,60,127,197,195,34,176,48,43,43,139,
584 148,162,177,183,240,214,91,75,9,246,20,22,22,210,162,218,253,47,116,110,
585 202,72,36,18,159,28,3,255,69,69,69,52,63,221,157,191,116,136,177,184,0,
586 16,26,32,108,238,10,220,115,244,19,108,113,151,219,102,37,217,127,103,32,
587 65,56,135,74,251,110,143,219,254,181,191,109,169,161,174,124,9,175,70,84,
588 202,86,12,54,57,57,56,86,32,100,212,99,28,176,132,122,16,50,84,147,146,
589 146,196,83,88,237,206,87,210,96,46,132,71,65,122,108,72,112,121,11,28,45,
590 62,238,198,141,27,245,32,196,232,229,231,231,83,22,202,69,217,197,179,227,
591 24,127,113,107,61,70,18,52,200,164,1,209,88,129,16,170,81,84,154,144,249,
592 139,118,70,187,211,249,90,88,12,61,245,2,6,104,126,220,124,98,104,114,24,
593 73,74,236,181,198,140,96,23,109,204,84,128,70,205,203,203,3,243,162,239,
594 138,57,29,142,111,66,66,2,253,128,226,147,134,170,200,200,200,160,30,40,
595 62,53,163,247,161,71,75,161,1,194,178,150,158,3,103,5,226,2,33,20,60,219,
596 246,113,153,125,207,65,19,12,194,51,224,19,167,218,15,63,209,246,229,214,
597 182,24,67,93,249,24,206,250,52,91,182,98,176,105,76,65,136,204,32,196,86,
598 136,7,165,48,11,128,1,179,137,231,64,140,92,29,108,130,229,152,184,248,
599 248,120,61,8,197,37,79,108,32,150,31,139,71,1,177,147,226,29,35,88,66,126,
600 232,47,154,6,64,99,5,66,204,46,38,30,28,26,62,213,132,104,114,252,66,106,
601 7,36,128,64,230,62,84,19,189,129,134,15,222,198,118,43,10,5,249,112,121,
602 41,160,126,18,71,195,227,4,211,197,1,36,94,32,109,79,135,160,151,16,73,
603 231,208,15,137,209,82,104,128,112,99,73,219,86,99,127,94,116,71,219,134,
604 91,108,207,55,218,167,24,96,16,158,1,4,22,217,247,121,217,126,219,206,182,
605 181,134,138,26,81,216,250,133,132,186,142,160,188,76,232,228,96,32,64,40,
606 248,199,95,126,131,7,204,99,106,106,42,107,49,17,194,169,144,25,130,74,
607 20,167,186,186,26,139,135,157,215,131,48,42,42,10,248,97,27,147,147,147,
608 249,11,23,73,134,25,12,176,35,168,105,12,111,150,161,240,120,60,76,106,
609 48,247,50,202,73,65,156,33,218,152,10,194,238,99,157,225,63,200,236,113,
610 189,165,44,148,68,25,233,226,244,0,186,178,140,114,70,194,69,237,114,55,
611 127,89,75,159,16,83,63,126,139,248,209,85,104,128,240,169,213,101,6,243,
612 58,234,97,7,219,134,55,108,55,182,91,242,61,218,227,18,230,219,47,58,222,
613 246,245,168,188,170,102,126,134,229,222,144,233,139,198,26,132,204,149,
614 107,107,107,113,3,196,164,25,22,98,7,176,27,216,4,49,39,198,144,194,197,
615 177,48,11,1,16,197,137,137,137,1,123,191,252,242,11,204,211,236,60,191,
616 197,107,70,40,38,213,43,78,147,194,11,10,62,46,37,29,43,16,82,66,124,62,
617 90,55,58,58,26,212,81,54,196,15,42,133,210,50,187,97,145,42,160,129,105,
618 236,80,5,33,162,115,211,204,120,198,148,87,196,136,9,32,157,155,223,68,
619 82,124,230,10,244,9,45,193,88,40,4,64,72,237,156,248,225,216,190,80,102,
620 138,109,221,199,246,191,244,219,39,26,96,16,134,1,71,176,220,190,199,237,
621 182,255,78,178,69,25,106,201,239,112,239,210,160,252,84,175,147,131,99,
622 8,66,36,198,190,32,34,60,16,49,44,58,87,14,105,76,141,195,88,11,139,135,
623 240,249,48,65,20,4,52,82,52,102,252,105,105,105,120,68,248,69,216,192,28,
624 231,39,153,48,140,56,9,50,91,96,53,86,32,196,191,201,203,203,203,206,206,
625 198,169,167,240,0,15,191,24,55,136,137,0,70,153,72,10,79,201,97,33,130,
626 19,250,86,15,13,81,34,104,71,217,233,220,154,255,135,168,25,166,63,76,17,
627 248,77,37,136,27,133,198,186,248,33,0,194,138,214,158,109,95,28,195,23,
628 202,108,103,139,124,192,246,248,66,251,185,139,236,231,140,105,88,108,63,
629 59,215,126,160,149,239,68,109,181,239,240,133,253,114,28,193,209,253,150,
630 239,233,159,100,181,247,6,223,48,15,0,8,53,1,12,249,43,228,132,149,195,
631 219,161,128,101,206,143,82,17,195,236,95,179,75,194,9,166,158,197,60,32,
632 240,26,195,83,163,20,27,163,143,137,135,1,120,129,20,152,66,18,131,192,
633 0,53,66,60,63,80,232,81,16,81,64,60,221,164,164,36,80,71,195,211,210,21,
634 206,79,86,65,71,154,92,92,12,96,30,180,110,221,58,145,102,76,47,14,135,
635 0,8,127,202,107,26,211,55,171,77,180,197,78,177,173,159,106,91,55,214,225,
636 47,182,153,101,246,61,44,11,194,108,251,65,151,217,102,239,96,219,96,168,
637 159,45,15,71,190,155,94,218,28,124,39,126,2,9,194,144,23,70,143,217,63,
638 214,79,46,91,70,99,8,66,189,160,2,146,11,97,35,166,2,224,13,210,211,252,
639 76,2,10,11,11,137,132,250,218,172,135,4,29,29,29,164,17,51,6,17,57,22,10,
640 1,16,206,136,170,10,192,157,50,99,26,118,180,109,248,151,237,209,78,251,
641 36,3,123,44,18,154,237,59,206,183,95,180,175,237,167,209,117,4,181,176,
642 223,155,41,169,213,91,250,62,222,192,75,129,48,28,20,32,16,42,1,63,113,
643 66,96,92,20,2,32,188,109,97,97,32,31,165,31,245,112,128,109,201,103,246,
644 63,117,89,149,130,17,246,227,175,180,189,225,247,211,17,190,132,169,175,
645 38,173,45,26,253,71,131,198,90,10,132,225,32,5,194,144,214,224,160,163,
646 187,147,80,93,148,223,209,80,59,244,187,55,40,223,87,48,48,56,120,250,156,
647 44,131,97,13,162,112,166,237,147,44,251,193,253,246,173,12,248,177,66,192,
648 67,181,219,238,216,205,182,114,140,28,65,45,224,208,255,144,245,235,135,
649 184,131,69,10,132,225,32,5,194,144,86,127,183,35,239,103,71,246,130,95,
650 67,121,188,92,21,84,170,237,232,61,242,221,116,131,97,13,138,48,201,22,
651 121,141,237,149,106,251,174,6,252,88,33,244,218,183,142,181,31,125,190,
652 237,131,173,2,245,33,223,153,81,85,253,193,246,197,250,198,198,198,252,
653 252,124,185,160,20,162,82,32,12,105,225,17,214,102,111,6,194,222,160,124,
654 76,37,189,166,243,128,128,188,83,102,116,195,65,182,197,31,217,175,178,
655 230,103,43,138,236,251,252,203,246,216,94,182,95,12,199,60,166,225,238,
656 37,69,221,253,65,2,194,129,1,71,75,157,163,177,170,179,44,187,62,43,194,
657 209,88,201,111,199,64,216,221,232,16,38,82,32,12,117,117,181,57,242,151,
658 75,10,214,14,221,173,19,140,90,93,216,178,219,235,201,6,171,106,241,112,
659 160,109,113,148,253,56,11,158,14,29,180,79,136,179,31,117,220,208,99,242,
660 99,120,69,208,109,184,232,139,156,142,32,122,130,162,174,204,145,187,212,
661 145,189,104,48,123,161,35,103,137,163,34,85,129,48,84,165,64,24,6,42,79,
662 24,162,32,56,236,147,111,63,15,58,125,159,213,184,99,96,191,190,180,37,
663 97,123,219,198,43,109,51,11,236,251,26,8,52,238,1,4,22,218,247,125,204,
664 254,144,47,31,17,28,139,112,196,187,233,173,61,193,195,146,190,94,199,166,
665 85,114,18,153,179,216,209,82,46,227,149,66,78,10,132,97,32,198,115,206,
666 66,71,93,206,208,153,210,224,212,87,105,245,219,189,20,28,32,156,98,91,
667 255,150,237,186,86,251,14,6,8,141,123,232,179,79,156,99,251,203,81,182,
668 249,163,242,190,52,255,194,190,111,164,180,116,7,149,83,213,84,37,65,88,
669 176,82,185,131,33,44,5,194,176,80,123,73,110,111,107,240,221,176,167,233,
670 147,164,186,109,198,242,105,250,81,9,91,217,226,246,181,253,180,220,126,
671 154,213,78,135,226,8,150,218,247,188,198,183,175,201,143,105,216,233,213,
672 164,230,224,2,97,127,159,163,40,106,8,132,173,234,163,240,161,44,5,194,
673 176,80,176,63,71,248,110,92,205,4,147,85,181,84,192,205,250,171,237,245,
674 108,251,65,6,8,141,123,168,179,239,252,169,253,202,99,108,223,26,14,120,
675 92,194,214,47,36,52,118,5,215,55,40,6,29,13,69,253,155,214,15,253,80,10,
676 93,41,16,134,133,130,26,132,88,160,25,81,85,6,147,106,169,176,173,45,234,
677 69,251,63,235,237,59,25,32,52,238,33,211,126,240,31,109,239,108,103,139,
678 48,28,240,56,134,242,214,32,187,111,185,171,165,177,172,64,61,62,17,226,
679 82,32,12,11,5,53,8,7,6,7,95,88,95,97,176,167,214,9,251,219,150,254,104,
680 63,191,207,74,223,172,24,180,255,166,201,62,229,125,251,223,118,182,173,
681 25,235,199,228,71,26,50,107,3,250,193,213,45,23,3,71,61,71,24,242,82,32,
682 12,11,5,53,8,251,6,6,159,92,53,230,95,34,244,35,108,101,139,189,204,54,
683 59,210,126,220,128,149,222,160,61,104,159,176,194,254,135,75,108,111,111,
684 99,139,54,28,176,21,66,100,233,232,127,119,122,76,165,64,24,14,82,32,12,
685 11,5,53,8,123,251,7,31,94,86,98,176,167,227,30,192,204,227,246,127,213,
686 218,167,25,56,52,190,161,217,190,227,195,182,255,219,213,182,202,106,142,
687 160,22,150,229,253,250,145,234,160,144,2,97,56,72,129,48,44,164,64,56,186,
688 97,47,219,47,175,217,254,209,99,223,198,192,161,113,12,157,246,73,49,246,
689 99,206,177,125,100,89,4,138,176,44,95,129,80,201,114,82,32,12,11,5,251,
690 169,209,167,86,91,229,212,232,86,182,216,63,218,222,137,176,31,63,104,66,
691 209,56,134,18,251,94,119,218,158,158,102,91,109,56,90,11,134,232,50,117,
692 106,84,201,114,82,32,12,11,169,155,101,70,37,224,108,93,105,155,89,101,
693 223,205,58,159,213,229,72,214,217,79,252,173,237,135,113,124,76,126,68,
694 33,75,221,44,163,100,61,41,16,134,133,130,26,132,131,14,199,204,232,106,
695 131,61,13,124,216,211,182,252,37,219,237,189,246,173,13,40,26,199,144,103,
696 223,255,1,219,227,219,218,162,12,135,106,229,80,17,108,143,79,40,16,134,
697 131,20,8,195,66,65,13,66,244,94,124,205,248,126,149,247,40,219,119,107,
698 236,39,91,135,130,237,246,201,51,109,55,253,206,246,125,192,190,160,52,
699 42,97,155,224,123,160,94,129,48,44,164,64,24,22,10,118,16,142,227,43,214,
700 182,182,197,252,197,54,163,218,190,139,69,78,135,14,216,183,42,181,239,
701 249,87,219,235,193,229,8,138,176,243,244,96,123,197,154,2,97,120,72,129,
702 48,44,20,236,32,156,55,78,47,221,158,106,91,247,148,253,129,38,251,20,3,
703 141,198,43,212,216,167,205,182,95,119,144,109,177,225,56,131,37,236,247,
704 102,176,189,116,91,129,48,60,164,64,24,22,10,118,16,142,203,103,152,142,
705 180,253,111,133,253,15,221,150,121,70,34,201,254,187,115,109,31,142,251,
706 139,179,183,36,28,25,92,159,97,114,74,129,48,28,164,64,24,22,10,118,16,
707 174,41,10,232,135,121,39,218,98,78,183,125,146,109,63,200,34,207,72,52,
708 216,167,190,100,187,125,7,219,6,139,191,121,124,216,240,199,47,115,131,
709 233,195,188,78,41,16,134,131,20,8,195,66,193,14,194,204,218,206,3,103,165,
710 26,172,234,24,133,93,109,171,158,178,61,80,109,223,197,64,163,113,9,61,
711 246,109,150,216,207,254,163,237,29,107,190,47,109,164,225,254,159,138,123,
712 250,131,236,51,14,10,132,225,32,5,194,176,80,176,131,176,190,163,239,168,
713 247,210,13,86,117,44,194,52,219,234,249,182,139,44,114,58,180,217,190,227,
714 61,182,167,118,9,134,199,228,125,12,111,68,87,245,7,219,215,161,21,8,195,
715 65,10,132,97,161,96,7,225,192,224,224,153,159,100,25,172,234,232,6,92,174,
716 147,108,95,198,219,143,50,208,104,92,66,187,125,242,90,251,73,28,143,225,
717 32,131,58,76,180,199,255,152,21,124,95,135,86,32,12,7,41,16,134,133,130,
718 29,132,232,174,37,69,99,247,40,33,20,252,183,237,255,85,218,119,51,0,105,
719 92,66,190,125,255,91,109,207,77,177,173,55,28,100,176,135,157,166,39,173,
720 47,110,149,205,25,60,82,32,12,7,41,16,134,133,66,0,132,51,163,170,182,26,
721 27,16,78,182,69,124,104,255,107,151,125,146,1,72,129,15,3,246,9,223,216,
722 47,222,215,246,83,176,188,47,109,68,97,191,55,83,83,171,131,236,253,106,
723 72,129,48,28,164,64,24,22,10,1,16,254,146,223,60,113,12,158,169,63,206,
724 246,245,26,251,73,227,254,176,60,8,204,178,31,116,175,237,169,160,126,58,
725 194,123,56,242,221,244,178,150,32,123,191,26,82,32,12,7,41,16,134,133,66,
726 0,132,181,237,189,147,94,28,77,16,78,180,197,220,105,127,122,147,125,191,
727 113,167,96,155,125,123,187,253,206,67,109,11,130,253,233,8,239,225,204,
728 79,179,58,251,130,236,217,9,164,64,24,14,82,32,12,11,133,0,8,7,29,142,83,
729 62,206,52,216,86,191,195,84,219,186,153,246,155,58,236,219,25,152,20,224,
730 208,111,159,88,102,223,227,10,219,27,91,219,98,12,71,24,122,225,129,159,
731 138,101,91,6,149,20,8,195,65,10,132,97,161,16,0,33,122,126,221,40,124,140,
732 9,175,235,120,219,215,223,218,47,238,179,79,52,96,41,192,161,198,62,237,
733 85,251,173,123,218,150,27,142,48,84,195,130,236,224,187,101,20,41,16,134,
734 131,20,8,195,66,161,1,194,152,178,246,137,91,118,191,204,68,91,236,245,
735 182,151,242,236,251,27,152,20,248,176,202,126,202,169,182,207,38,5,225,
736 139,179,253,11,219,188,144,208,212,25,100,47,87,19,82,32,12,7,41,16,134,
737 133,66,3,132,101,45,61,7,207,246,255,253,50,83,108,235,239,183,61,209,106,
738 223,222,192,164,0,7,28,193,255,218,238,217,49,228,158,142,240,30,206,253,
739 44,91,182,98,176,73,129,48,28,164,64,24,22,10,13,16,182,116,247,95,241,
740 117,158,193,194,250,18,38,216,226,142,182,205,255,214,254,199,126,251,86,
741 6,44,5,50,116,216,183,251,198,126,241,217,182,143,130,235,35,130,163,18,
742 102,199,84,203,86,12,54,41,16,134,131,20,8,195,66,161,1,194,129,193,193,
743 199,86,150,250,241,88,253,201,182,207,51,237,135,12,140,43,5,91,236,59,
744 220,97,123,102,170,109,157,225,216,194,33,108,243,66,66,78,93,240,61,65,
745 40,164,64,24,14,82,32,12,11,133,6,8,209,188,180,250,17,125,143,105,7,219,
746 134,123,109,79,182,141,235,233,80,28,193,133,246,115,15,179,253,104,56,
747 182,240,9,39,125,148,89,223,25,100,31,166,215,164,64,24,14,82,32,12,11,
748 133,12,8,203,90,122,124,255,12,197,158,182,229,159,218,175,28,223,103,36,
749 50,236,135,220,100,179,135,219,21,65,125,152,96,139,127,106,85,89,208,125,
750 116,66,147,2,97,56,72,129,48,44,20,50,32,196,154,254,115,113,145,193,212,
751 186,13,39,216,190,74,183,31,54,142,23,5,251,236,19,63,180,253,117,111,219,
752 178,173,108,113,134,99,11,171,48,245,213,164,37,185,65,220,247,20,8,195,
753 65,10,132,97,161,144,1,33,138,43,111,223,218,235,187,214,38,217,162,254,
754 102,123,173,196,190,151,129,76,129,12,61,246,109,222,180,223,112,178,237,
755 139,227,109,95,7,32,28,109,155,111,217,151,116,255,238,157,244,202,214,
756 94,217,120,65,40,5,194,112,144,2,97,88,40,148,64,56,48,56,120,238,220,108,
757 131,181,213,194,62,182,159,63,177,255,185,213,190,131,129,76,1,14,128,176,
758 202,190,107,0,66,165,125,183,165,246,51,255,98,155,177,147,109,173,161,
759 42,44,18,30,90,86,18,172,103,69,157,82,32,12,7,41,16,134,133,66,9,132,104,
760 78,82,173,249,181,156,19,108,113,7,216,150,172,177,159,60,190,207,72,4,
761 38,12,218,39,116,219,183,205,180,31,124,181,237,213,41,182,117,150,125,
762 30,99,43,123,124,82,85,135,108,182,224,148,2,97,56,72,129,48,44,20,98,32,
763 204,169,239,218,247,141,20,189,193,157,108,139,184,198,246,74,174,253,0,
764 3,48,66,50,224,8,126,99,191,24,4,82,106,125,37,88,48,156,61,55,123,32,168,
765 253,65,5,194,240,144,2,97,88,40,196,64,216,214,51,240,167,121,191,62,89,
766 63,201,22,249,154,237,31,45,227,125,58,52,0,161,218,190,235,115,182,187,
767 143,177,125,187,131,109,131,86,124,203,6,188,246,111,211,27,130,156,131,
768 10,132,97,33,5,194,176,80,136,129,16,125,146,84,55,249,165,196,173,156,
769 167,67,23,219,207,25,223,135,229,199,58,116,219,183,41,182,239,253,178,
770 253,246,125,109,63,7,209,91,105,78,248,48,179,162,53,248,62,64,104,144,
771 2,97,56,72,129,48,44,20,122,32,108,233,238,63,125,78,214,149,182,55,210,
772 237,135,142,251,7,5,199,46,180,218,183,255,217,126,198,189,182,39,247,177,
773 253,28,92,95,43,220,230,133,132,151,54,84,246,5,251,137,81,5,194,240,144,
774 2,97,88,40,244,64,232,24,232,203,90,240,76,131,125,170,129,28,161,20,22,
775 217,207,57,211,54,103,154,109,245,132,32,124,18,113,247,25,201,121,245,
776 93,178,177,130,89,10,132,225,32,5,194,176,80,168,129,176,165,204,241,227,
777 205,142,23,183,54,144,35,4,66,191,125,171,114,251,30,95,219,47,57,217,246,
778 69,48,242,79,11,15,45,43,145,141,21,228,82,32,12,7,41,16,134,133,66,7,132,
779 131,131,142,252,159,29,159,156,230,120,33,212,46,10,14,216,39,36,218,127,
780 247,136,237,145,223,219,230,109,99,139,54,112,37,184,194,126,111,166,150,
781 183,4,253,213,65,33,5,194,112,144,2,97,88,40,68,64,56,208,239,136,127,207,
782 49,99,119,3,66,66,32,100,219,15,186,205,246,220,46,182,85,19,67,226,11,
783 77,47,110,168,232,103,202,18,18,82,32,12,7,41,16,134,133,66,1,132,189,29,
784 142,152,89,142,55,247,115,204,216,77,31,250,95,219,173,206,190,179,31,97,
785 124,95,198,77,24,180,79,224,48,54,218,127,127,135,253,153,160,120,28,194,
786 199,112,200,236,180,156,144,184,58,40,164,64,24,14,82,32,12,11,133,2,8,
787 123,218,28,21,241,142,242,88,67,232,43,141,121,230,203,31,79,181,125,54,
788 162,112,133,237,13,156,48,3,153,2,25,64,224,12,219,77,167,219,62,217,49,
789 132,16,72,216,250,133,132,23,214,87,132,192,205,162,154,20,8,195,65,225,
790 5,194,193,205,37,99,71,174,45,204,30,120,133,218,205,50,155,43,171,182,
791 115,167,87,147,12,22,217,83,152,96,139,159,102,91,179,220,126,218,184,60,
792 122,216,103,159,88,111,223,105,186,237,150,125,108,63,7,251,133,64,183,
793 225,208,183,82,155,186,250,101,195,132,132,20,8,195,65,225,5,194,250,250,
794 250,194,194,194,162,162,162,226,226,226,234,234,234,190,62,127,62,22,218,
795 214,214,198,22,74,74,74,248,33,163,44,175,208,6,97,111,255,224,83,171,202,
796 188,127,146,66,132,173,108,177,167,217,62,141,179,31,101,224,83,0,66,183,
797 125,219,141,246,223,63,105,127,240,64,219,98,195,81,133,76,152,250,106,
798 210,242,77,205,178,85,66,69,10,132,225,160,240,2,97,65,65,1,8,4,96,173,
799 173,173,176,161,161,161,65,174,24,137,64,96,101,101,101,123,123,187,127,
800 28,29,23,133,54,8,209,166,198,238,195,223,78,51,216,101,115,56,215,246,
801 193,38,251,126,1,126,0,191,199,190,205,247,182,11,254,104,123,103,15,219,
802 242,16,254,54,33,174,246,19,43,203,152,148,200,38,9,21,41,16,134,131,194,
803 14,132,101,101,101,157,157,157,29,29,29,176,1,34,242,35,45,45,45,57,57,
804 25,79,177,185,185,153,30,79,26,254,162,170,170,170,210,210,82,86,197,199,
805 199,147,69,108,97,112,112,144,4,141,141,141,61,61,61,65,116,118,52,228,
806 65,72,75,188,23,95,179,141,103,167,112,91,91,244,223,108,175,5,242,125,
807 164,3,246,173,26,236,59,45,179,159,126,142,237,195,109,108,209,193,245,
808 94,24,63,194,193,179,211,50,106,229,48,9,37,5,17,8,153,154,167,167,167,
809 71,56,21,29,29,93,94,94,238,135,141,34,11,70,114,227,198,141,169,169,169,
810 65,52,215,223,66,133,29,8,83,82,82,4,231,232,49,45,45,45,32,13,191,16,7,
811 49,41,41,137,230,103,45,116,228,47,41,129,31,44,100,85,102,102,38,126,164,
812 216,194,192,192,0,224,204,205,205,21,104,9,22,22,134,60,8,81,79,255,224,
813 181,255,219,164,55,205,90,216,214,22,245,168,237,225,38,251,20,3,171,198,
814 40,244,219,183,74,181,31,246,138,253,182,83,108,159,135,198,227,16,190,
815 132,87,54,86,134,208,45,50,191,42,136,64,216,219,219,203,72,103,114,143,
816 93,234,234,234,74,76,76,228,119,127,127,63,241,136,72,204,23,108,35,134,
817 191,136,24,254,138,181,114,19,14,7,254,64,66,66,2,19,253,186,186,186,238,
818 238,110,25,27,234,10,59,16,194,54,122,3,93,1,182,85,84,84,180,183,183,199,
819 198,198,174,93,187,54,38,38,6,16,230,229,229,209,51,152,10,209,9,232,37,
820 76,169,152,25,173,88,177,130,238,37,55,225,112,208,195,216,2,195,131,236,
821 10,132,150,210,166,134,238,163,222,77,55,24,104,188,177,89,246,235,219,
822 237,147,13,184,26,163,80,96,223,247,118,219,179,251,219,150,134,228,189,
823 48,158,194,85,223,230,119,244,14,200,102,8,45,5,23,8,115,114,114,176,75,
824 76,238,43,43,43,147,147,147,177,102,216,180,184,184,56,236,27,147,126,86,
825 17,201,42,24,201,252,158,152,140,140,140,248,248,248,245,235,215,147,82,
826 108,132,52,133,133,133,108,1,151,32,88,236,219,150,43,236,64,8,219,152,
827 236,0,179,162,162,34,26,155,126,80,91,91,203,36,8,63,175,180,180,148,30,
828 47,64,200,42,34,133,215,136,255,71,70,177,5,122,6,171,152,40,213,215,215,
829 211,159,44,222,81,134,38,128,76,254,250,251,178,114,179,26,26,27,196,239,
830 16,238,220,148,108,110,114,221,212,87,19,53,3,189,187,109,197,151,246,203,
831 2,240,169,222,102,251,142,209,246,99,110,183,253,119,59,91,100,200,159,
832 5,53,132,19,62,204,168,12,254,175,76,120,82,112,129,16,147,133,77,3,135,
833 112,78,156,223,98,234,207,95,216,134,74,156,194,44,192,197,214,214,86,113,
834 210,11,103,32,50,50,18,131,38,54,130,97,196,24,178,5,204,32,14,165,136,
835 12,121,133,23,8,65,87,86,86,22,83,36,4,246,232,55,120,129,52,57,14,19,205,
836 15,17,153,13,225,44,210,99,232,37,192,146,1,64,74,254,146,76,108,1,138,
837 144,17,52,146,222,250,189,164,174,169,46,58,63,154,240,115,210,207,17,185,
838 17,252,72,45,73,165,128,114,117,40,170,171,111,224,153,53,229,194,64,139,
839 47,52,245,217,39,26,160,53,186,161,206,190,243,219,246,107,47,179,205,222,
840 217,182,70,99,67,248,132,221,94,79,94,190,169,57,36,79,138,10,5,227,169,
841 81,126,51,221,7,138,117,117,117,197,197,197,204,227,249,141,201,194,142,
842 65,62,140,24,94,32,246,13,16,178,10,69,71,71,107,32,196,190,177,17,96,73,
843 70,220,0,17,25,242,10,47,16,14,121,72,46,241,91,139,129,13,252,16,34,146,
844 69,225,54,241,67,91,59,148,223,41,126,139,72,185,108,97,149,215,149,47,
845 72,94,160,15,107,115,214,6,197,145,111,137,96,225,229,243,242,142,182,205,
846 79,183,31,58,48,150,55,136,182,217,183,127,215,118,205,225,182,31,240,2,
847 13,120,8,159,240,212,170,178,80,122,124,94,19,195,164,177,165,145,169,100,
848 86,97,86,102,126,38,63,8,29,157,150,158,251,234,65,8,195,18,18,18,152,220,
849 51,245,7,120,217,217,217,0,15,16,86,87,87,99,220,88,5,8,153,247,51,167,
850 111,110,110,94,183,110,157,6,66,50,226,11,82,124,178,224,74,138,200,144,
851 87,120,129,48,220,20,158,32,68,85,89,235,54,189,116,168,129,91,163,21,58,
852 237,147,50,237,135,188,97,191,225,32,219,162,112,59,11,170,15,19,236,241,
853 87,124,157,215,211,31,154,151,6,187,123,186,215,100,175,49,12,159,134,22,
854 127,30,184,10,152,152,160,67,175,40,167,226,226,226,240,101,241,11,1,33,
855 14,31,192,43,47,47,135,139,141,141,141,128,144,69,86,129,204,228,228,228,
856 196,196,196,146,146,18,13,132,136,100,108,33,47,47,47,28,108,133,144,2,
857 97,40,43,28,65,56,216,239,72,154,227,152,117,128,129,94,163,18,250,237,
858 19,151,218,207,186,218,246,234,126,182,159,12,84,8,195,112,214,167,217,
859 69,77,33,123,87,97,48,130,80,201,111,41,16,134,178,194,14,132,253,189,142,
860 152,217,142,233,59,25,0,182,133,97,208,62,1,47,112,149,253,148,51,108,159,
861 108,111,219,24,212,159,9,28,173,176,231,140,148,136,210,182,208,189,50,
862 168,64,24,94,82,32,12,101,133,23,8,187,155,29,27,95,118,188,186,163,1,99,
863 91,24,54,217,247,253,200,126,213,5,182,247,182,182,197,24,96,16,182,97,
864 191,55,83,23,231,134,248,211,56,10,132,97,165,144,5,97,95,95,95,81,81,81,
865 74,74,74,123,123,187,140,114,222,243,153,151,151,39,238,152,98,177,161,
866 161,33,41,41,73,188,127,129,244,249,249,249,172,202,205,205,5,21,36,200,
867 204,204,12,246,27,136,187,123,187,43,26,42,8,169,121,169,155,202,55,241,
868 163,182,165,86,220,7,20,106,106,171,118,124,127,173,227,165,109,13,24,243,
869 59,12,218,127,147,110,63,244,1,219,227,191,181,253,176,173,45,202,64,130,
870 112,14,248,130,75,243,154,66,247,25,28,41,5,194,176,82,104,130,16,91,95,
871 93,93,157,157,157,93,89,89,9,14,53,211,47,30,150,104,107,107,139,138,138,
872 2,144,201,201,201,245,245,245,208,142,223,144,15,70,246,246,246,14,12,12,
873 144,94,60,80,81,82,82,82,92,92,172,191,101,148,85,218,214,132,180,69,67,
874 252,22,202,185,159,209,217,32,219,201,223,148,223,216,216,40,151,67,79,
875 237,213,142,255,93,61,42,223,172,135,127,237,246,201,185,246,3,238,183,
876 63,190,147,109,109,8,191,26,212,191,48,249,165,196,25,81,85,33,243,209,
877 93,47,98,18,25,145,31,177,44,99,217,207,105,63,47,77,93,202,15,66,83,155,
878 229,252,96,131,149,96,17,123,165,63,235,51,100,71,156,105,248,75,60,18,
879 49,226,55,226,183,72,25,206,10,89,16,150,150,150,214,213,213,129,55,252,
880 60,188,61,17,95,88,88,8,26,233,40,192,175,162,162,2,40,146,0,218,129,189,
881 230,230,102,214,194,72,241,104,4,140,132,28,172,213,40,200,15,60,72,210,
882 192,75,18,139,72,84,85,85,213,227,84,77,77,141,30,153,126,11,24,179,23,
883 14,155,191,252,150,177,254,138,45,192,114,28,95,28,220,214,214,86,25,27,
884 58,26,116,148,69,57,62,63,207,192,51,255,66,141,125,218,215,246,75,174,
885 181,189,50,213,182,206,0,0,21,8,59,188,156,248,210,134,202,208,123,173,
886 182,39,245,245,15,189,126,140,185,50,243,200,158,222,30,126,91,141,25,216,
887 43,236,152,102,223,80,75,75,139,176,81,226,245,200,88,36,102,255,20,129,
888 35,199,106,97,85,80,83,83,19,150,13,163,135,48,11,44,138,188,225,172,208,
889 4,33,205,143,245,23,175,128,161,79,104,29,5,52,226,38,210,51,162,163,163,
890 33,98,110,110,46,157,6,40,166,167,167,131,49,224,199,15,214,210,227,215,
891 172,89,147,149,149,69,140,120,215,26,121,217,8,224,164,27,145,50,33,33,
892 65,99,94,90,90,26,14,37,98,203,250,30,105,22,57,186,186,135,9,45,45,109,
893 113,113,113,107,157,90,183,110,29,27,111,107,235,53,164,241,61,116,118,
894 13,208,215,217,142,216,96,100,100,100,101,101,181,33,205,136,130,229,230,
895 142,101,209,142,119,127,235,216,226,135,5,187,237,219,190,101,191,238,88,
896 219,55,83,108,235,13,214,95,5,17,182,127,57,241,237,216,234,238,190,208,
897 124,88,194,147,0,70,109,109,45,163,94,46,143,150,250,122,29,221,93,142,
898 94,255,95,199,35,192,150,152,152,136,201,98,22,46,34,153,193,99,208,48,
899 80,229,229,229,120,2,44,242,119,227,198,141,252,197,52,137,231,235,197,
900 75,69,88,133,109,4,129,68,98,187,68,246,112,86,200,130,80,60,25,99,0,33,
901 189,135,94,66,87,96,30,68,55,162,7,128,61,18,32,38,80,76,175,232,31,116,
902 122,226,215,175,95,47,102,91,226,146,33,121,217,72,65,65,1,93,135,141,71,
903 69,69,105,157,207,119,16,150,215,57,22,70,13,19,150,69,212,175,93,187,65,
904 112,75,232,151,136,58,67,26,223,195,146,200,14,185,21,151,86,175,79,88,
905 28,213,111,72,230,99,136,206,112,244,122,43,95,96,213,223,235,40,94,231,
906 120,115,95,3,210,70,20,122,237,91,23,218,247,125,195,126,227,129,182,197,
907 234,94,80,47,97,202,43,73,47,108,168,232,13,230,7,231,153,134,142,40,244,
908 15,12,217,10,236,128,24,56,76,34,177,24,134,52,126,4,71,127,159,163,177,
909 204,145,191,210,145,189,208,81,184,214,209,94,63,48,48,104,72,227,54,24,
910 132,41,107,109,109,5,120,216,46,205,22,49,131,199,70,117,116,116,96,142,
911 152,1,19,223,216,216,8,246,176,99,164,199,160,97,187,96,97,70,70,6,63,16,
912 222,66,81,81,17,63,68,118,168,15,71,153,253,227,39,240,91,68,178,53,178,
913 147,70,60,131,40,34,67,79,33,123,106,20,218,209,204,112,139,158,161,181,
914 52,93,7,193,188,152,152,24,26,88,184,140,116,11,144,217,210,210,194,42,
915 82,10,40,10,82,130,73,250,147,200,14,228,240,8,217,44,25,241,8,5,29,145,
916 56,183,64,23,97,110,53,44,8,23,68,13,19,86,172,207,16,3,79,211,242,141,
917 149,134,52,190,135,95,134,176,186,153,86,175,139,91,28,217,99,72,230,99,
918 136,74,183,12,8,251,58,29,145,175,57,94,219,197,0,54,223,67,143,125,155,
919 101,246,211,239,178,61,125,152,237,71,117,33,208,123,56,244,173,180,111,
920 211,27,6,130,249,74,82,103,143,35,33,111,100,33,41,187,9,95,74,14,27,167,
921 98,99,99,19,115,123,12,201,70,26,26,54,213,59,178,23,232,67,89,65,151,33,
922 141,219,208,97,122,98,19,43,167,1,79,196,0,66,22,5,8,153,208,99,163,72,
923 131,1,132,100,34,1,120,99,190,142,185,19,191,97,36,116,20,171,16,25,49,
924 98,88,197,170,170,42,10,43,34,177,138,208,145,77,1,93,102,6,34,50,244,20,
925 154,32,68,116,5,218,114,205,154,53,226,220,38,72,163,201,233,49,17,17,17,
926 203,151,47,167,43,128,55,58,205,138,21,43,104,123,154,25,16,210,239,87,
927 175,94,45,102,79,80,16,183,143,24,126,176,200,6,129,28,233,215,173,91,199,
928 54,153,28,209,141,196,9,7,58,205,202,149,43,153,67,177,150,93,208,183,60,
929 225,208,23,16,254,178,177,98,237,90,57,9,21,90,18,209,106,72,227,123,88,
930 20,217,45,183,226,210,170,245,137,11,162,6,13,201,124,12,22,2,33,20,124,
931 121,123,3,219,124,14,19,74,103,157,122,137,237,237,157,108,107,149,23,56,
932 108,216,253,245,228,21,5,45,193,254,14,181,150,14,99,103,30,46,12,174,216,
933 80,32,199,140,78,63,71,52,153,82,142,44,180,101,172,53,128,176,62,173,208,
934 144,198,109,104,118,119,254,210,12,66,189,71,40,102,240,26,8,89,11,5,197,
935 75,183,89,4,120,169,169,169,194,184,9,145,49,55,55,23,55,0,123,136,161,
936 19,115,125,5,194,144,18,60,19,87,143,253,22,120,163,75,109,201,133,101,
937 186,159,225,146,155,57,180,182,245,38,37,37,139,81,71,95,100,90,215,217,
938 213,111,72,51,130,208,53,64,39,214,78,239,224,7,183,180,180,25,211,140,
939 36,140,191,87,208,94,235,88,254,136,137,109,62,132,23,38,14,157,71,253,
940 230,10,71,193,74,199,64,223,7,9,181,187,189,150,108,48,250,42,232,195,4,
941 123,252,225,111,167,173,42,12,133,215,46,143,28,132,76,73,203,197,168,209,
942 235,231,136,22,67,178,145,6,176,103,0,97,73,82,157,33,141,219,224,29,132,
943 240,12,206,129,43,113,141,16,242,49,77,23,144,19,32,100,85,94,94,94,102,
944 102,38,89,68,122,102,240,172,18,219,17,18,30,161,184,142,152,146,146,66,
945 22,140,30,233,115,114,114,248,75,98,182,12,68,5,32,67,76,225,2,66,90,84,
946 204,131,252,22,217,113,4,233,43,114,121,204,196,161,210,137,241,92,153,
947 130,121,114,46,125,23,189,150,169,159,184,15,104,11,167,2,227,175,214,138,
948 33,146,189,184,181,17,114,195,134,183,15,115,68,78,119,84,37,59,250,93,
949 115,231,254,193,159,243,155,143,125,63,195,96,253,85,16,97,235,23,18,110,
950 252,161,32,167,78,94,40,10,118,245,245,59,42,26,70,22,74,171,134,30,178,
951 146,0,116,138,65,84,94,215,103,72,54,210,208,83,223,184,25,8,11,35,90,27,
952 123,13,105,220,6,183,39,99,186,187,187,129,19,86,2,182,137,231,196,152,
953 241,67,172,161,9,180,107,176,139,107,123,164,132,103,8,112,194,57,172,89,
954 125,125,189,97,90,47,64,136,215,72,246,174,174,46,224,199,214,48,32,197,
955 197,197,228,226,111,75,75,11,241,248,136,122,63,50,52,20,46,32,28,21,5,
956 160,249,217,5,162,183,197,198,197,210,191,135,22,28,91,180,83,231,246,134,
957 30,38,17,51,68,36,87,4,153,6,29,45,229,142,57,167,140,236,97,65,144,57,
958 235,0,71,252,187,142,174,38,188,64,185,37,151,168,137,250,142,190,191,124,
959 147,55,209,158,96,192,64,152,135,109,95,76,120,108,101,89,91,79,8,78,252,
960 71,36,248,177,113,227,198,117,235,214,109,216,176,1,79,75,59,3,185,101,
961 26,116,244,116,56,138,35,134,40,88,188,209,209,179,165,83,13,49,162,113,
962 7,153,55,139,1,14,228,144,88,139,68,36,63,68,188,144,62,94,147,56,53,10,
963 255,12,9,68,22,36,98,144,51,121,72,73,129,208,66,162,135,149,212,149,100,
964 148,102,164,22,165,174,76,90,153,94,146,206,239,250,230,95,223,10,63,82,
965 117,247,116,179,5,66,116,118,116,116,78,52,63,114,202,115,58,186,130,237,
966 93,57,131,3,142,226,245,142,247,143,54,114,206,75,152,190,147,99,222,165,
967 142,132,247,28,29,195,212,94,115,87,255,147,171,202,118,123,93,157,38,29,
968 10,19,108,241,199,188,151,254,67,86,99,8,127,95,112,68,194,145,194,73,218,
969 242,19,51,70,117,180,56,242,126,150,191,71,67,152,142,45,63,99,9,233,197,
970 83,209,114,57,156,164,64,104,33,49,231,138,222,20,109,120,171,83,81,117,
971 145,92,61,114,53,181,53,25,182,182,60,125,121,107,71,176,61,86,159,179,
972 200,249,53,9,223,30,22,124,109,154,227,167,251,134,158,47,236,254,245,165,
973 7,222,213,211,63,184,161,184,245,247,31,168,211,164,241,127,159,159,159,
974 91,223,165,40,136,218,59,219,27,91,26,107,26,106,226,211,227,235,154,234,
975 248,221,214,209,182,229,206,80,115,91,51,155,106,172,41,107,204,90,58,244,
976 163,165,145,24,185,78,105,252,20,238,32,28,242,243,157,146,203,78,25,98,
977 244,139,250,223,163,46,5,66,163,250,123,29,137,31,58,94,241,225,6,209,23,
978 183,113,204,216,221,177,248,14,71,125,174,249,44,232,176,162,69,55,53,118,
979 95,62,47,111,135,87,18,13,108,8,147,176,251,235,201,211,35,42,59,195,236,
980 121,121,79,98,140,103,149,101,45,74,89,68,88,152,188,80,252,200,174,200,
981 222,242,177,191,50,107,165,216,218,162,228,5,226,71,126,121,112,124,254,
982 62,180,21,214,32,20,183,165,20,20,20,84,85,85,1,33,17,201,143,242,242,242,
983 194,194,194,122,231,123,137,58,59,59,139,156,234,234,234,234,233,233,97,
984 85,101,101,229,24,177,80,129,112,51,245,119,59,54,190,52,252,55,149,94,
985 218,214,49,247,76,71,196,171,142,250,60,153,209,95,225,26,206,207,104,56,
986 103,110,246,214,47,132,209,85,195,157,167,39,221,252,99,65,68,105,155,114,
987 4,53,49,192,51,203,50,13,99,103,84,64,184,60,115,185,97,179,249,101,10,
988 132,227,175,176,6,97,83,83,147,120,190,208,249,92,129,188,77,188,185,185,
989 57,37,37,133,191,155,54,109,106,111,111,207,203,203,19,15,208,228,230,230,
990 214,214,214,86,87,87,147,5,40,138,196,163,43,5,194,95,213,211,234,88,120,
991 171,227,229,201,70,236,25,194,167,167,59,242,151,13,189,116,123,112,116,
992 238,236,192,208,213,180,247,206,138,169,158,250,106,146,1,24,33,25,14,127,
993 59,109,89,126,115,123,143,114,4,55,147,2,97,184,73,157,26,29,122,59,67,
994 108,108,172,246,134,133,186,186,58,252,63,113,211,48,228,203,116,190,171,
995 26,242,241,131,85,224,144,248,209,191,120,238,148,2,161,84,91,165,227,187,
996 191,15,61,249,103,192,158,12,19,28,51,118,115,204,187,204,145,183,212,49,
997 48,38,119,54,98,237,114,234,186,46,253,42,119,74,136,158,41,157,96,143,
998 223,115,70,242,191,127,41,109,234,10,247,91,67,221,42,100,64,200,252,158,
999 105,125,82,82,18,166,76,59,120,140,27,243,251,196,196,68,97,232,74,74,74,
1000 72,192,188,159,223,164,79,77,77,13,225,87,169,121,82,184,131,16,164,225,
1001 225,225,17,106,78,94,103,103,103,90,90,26,192,163,67,84,58,5,2,233,55,44,
1002 118,116,116,136,19,164,34,229,168,139,158,90,214,80,150,93,153,157,86,146,
1003 182,50,97,101,86,121,22,191,235,154,235,228,234,145,171,171,167,139,45,
1004 16,162,50,163,98,115,99,249,177,169,106,19,145,114,181,53,85,147,238,248,
1005 242,143,238,41,248,194,4,199,187,191,115,172,121,218,81,178,209,209,55,
1006 230,165,104,233,238,95,148,211,116,253,247,5,59,188,28,82,56,220,247,141,
1007 148,71,126,41,141,41,111,239,83,39,67,61,40,100,64,200,36,158,137,190,120,
1008 64,176,215,245,41,155,138,138,10,108,26,134,142,153,125,115,115,115,86,
1009 86,22,191,49,131,192,146,85,213,213,213,204,245,69,202,240,81,56,130,176,
1010 187,187,123,205,154,53,120,129,252,96,17,63,12,200,137,247,239,9,65,59,
1011 58,16,211,37,58,10,179,36,241,96,105,78,78,142,72,63,166,98,164,33,14,32,
1012 54,46,150,93,139,69,185,206,47,137,45,4,205,115,132,101,209,142,119,60,
1013 124,77,98,230,158,67,15,197,183,150,15,221,65,19,64,181,245,12,172,45,106,
1014 57,255,179,28,3,78,130,49,108,253,66,194,189,75,139,243,27,186,194,237,
1015 35,18,35,21,195,36,100,78,141,194,191,154,154,26,38,247,24,58,17,195,111,
1016 104,7,29,89,213,214,214,134,47,136,63,80,85,85,133,107,216,208,208,144,
1017 144,144,176,37,239,207,10,82,133,181,71,72,87,160,31,208,27,152,46,209,
1018 246,116,20,58,58,125,2,10,50,69,42,40,40,224,135,240,2,89,43,190,93,34,
1019 115,142,177,32,110,92,92,156,214,113,183,92,76,247,144,92,176,166,6,7,28,
1020 69,107,29,239,28,110,228,223,244,157,28,31,159,52,244,114,209,54,255,61,
1021 227,45,87,255,192,224,226,156,166,11,191,200,217,53,56,95,204,182,255,155,
1022 169,119,46,46,202,168,9,242,87,11,5,80,253,3,253,93,221,93,45,109,45,169,
1023 153,169,29,157,29,252,30,149,225,223,221,211,205,166,186,234,43,187,114,
1024 126,26,250,193,82,207,232,79,175,57,84,237,220,21,108,203,200,200,192,154,
1025 105,246,36,50,50,146,105,61,179,127,226,197,109,16,184,128,226,188,151,
1026 213,39,202,99,166,176,6,33,156,203,206,206,134,112,64,130,174,131,255,7,
1027 240,0,33,145,116,11,17,73,12,221,5,82,226,20,202,108,99,175,176,3,97,127,
1028 143,35,106,230,144,207,167,71,224,203,219,57,22,221,230,216,244,139,163,
1029 54,207,81,26,229,168,47,145,137,199,79,237,61,3,27,74,90,31,91,81,118,200,
1030 236,52,3,105,172,25,182,121,33,225,156,185,217,111,70,87,167,213,116,142,
1031 255,71,148,154,170,3,236,205,111,185,24,137,65,241,64,189,65,224,45,63,
1032 63,191,178,178,82,44,50,215,199,136,105,167,70,177,45,248,136,20,13,211,
1033 135,125,227,7,198,173,180,180,180,188,188,92,36,8,67,133,251,53,66,80,71,
1034 47,103,30,132,26,27,27,233,22,34,18,9,14,17,47,22,157,201,3,164,177,0,161,
1035 118,106,212,114,234,235,113,68,207,116,188,186,163,228,223,11,91,13,253,
1036 6,129,117,57,142,142,70,71,209,6,71,238,146,161,247,81,213,22,208,24,178,
1037 60,227,170,158,254,193,150,238,254,255,101,54,156,54,39,107,242,75,137,
1038 91,217,141,248,25,247,176,245,11,9,211,166,39,221,252,67,65,100,105,27,
1039 240,198,157,149,135,62,190,42,73,113,228,46,117,52,86,14,121,255,65,162,
1040 32,5,33,163,74,88,176,138,138,10,241,130,80,92,64,98,136,103,45,145,185,
1041 185,185,109,109,109,201,201,201,24,189,170,170,42,138,137,59,40,172,95,
1042 120,42,220,65,168,23,221,61,192,192,243,164,81,7,97,125,125,61,62,46,147,
1043 68,171,169,56,43,190,109,201,35,131,47,109,11,2,7,95,152,216,54,243,176,
1044 234,47,111,170,76,92,218,94,93,48,88,149,249,235,187,137,179,23,180,231,
1045 197,12,193,124,203,196,132,128,185,240,104,169,178,186,250,151,148,162,
1046 123,231,39,31,55,43,102,151,87,226,182,50,1,41,192,97,107,123,252,1,51,
1047 19,47,156,147,242,202,234,77,89,229,245,173,173,173,24,59,191,69,39,28,
1048 93,245,111,138,148,173,89,176,218,209,84,236,232,25,58,217,56,138,146,125,
1049 125,84,197,97,7,35,8,53,137,19,90,140,125,26,148,82,224,243,117,116,116,
1050 96,88,74,74,74,136,199,101,20,191,211,210,210,196,29,164,50,91,248,73,129,
1051 208,138,98,248,141,46,8,153,9,178,205,206,45,19,134,149,113,53,154,42,205,
1052 108,251,248,124,248,55,116,143,232,231,231,13,102,124,219,90,158,89,93,
1053 85,89,83,93,213,94,95,49,88,147,175,81,144,208,87,158,81,93,93,85,189,101,
1054 98,228,51,224,71,87,133,69,69,41,121,197,171,51,74,62,141,46,186,227,135,
1055 156,223,189,157,18,96,31,17,255,239,247,111,197,63,178,32,253,139,141,89,
1056 43,18,115,211,115,242,228,44,99,11,132,199,64,15,28,93,117,101,44,213,55,
1057 232,96,193,154,210,140,216,132,209,19,254,205,168,43,49,49,49,168,65,136,
1058 134,78,186,56,29,65,236,9,19,98,188,67,45,18,25,126,135,173,20,8,173,168,
1059 81,7,161,245,52,232,232,168,117,124,253,167,161,123,97,230,156,234,200,
1060 93,236,232,237,100,68,202,149,66,44,246,116,57,74,34,29,185,63,13,153,206,
1061 81,58,53,42,7,253,24,104,96,112,176,111,96,176,171,111,32,171,182,243,145,
1062 239,226,207,153,147,190,215,140,148,105,211,147,118,120,37,113,155,23,19,
1063 38,152,0,230,71,0,177,147,94,74,152,242,74,210,174,175,37,239,247,70,202,
1064 181,255,219,244,117,122,125,73,93,107,76,124,98,119,47,59,31,77,209,253,
1065 70,87,142,226,36,73,65,26,180,60,125,176,179,205,249,5,217,81,19,86,190,
1066 110,180,197,54,199,228,113,169,0,130,80,47,154,85,254,82,218,92,10,132,
1067 86,84,136,131,112,232,6,209,53,67,143,204,47,189,199,81,176,66,251,70,160,
1068 71,117,182,56,42,83,28,245,214,190,235,117,115,197,198,198,54,52,52,214,
1069 180,247,38,84,182,47,200,110,156,29,83,253,248,202,210,155,127,44,184,240,
1070 139,156,163,223,75,223,231,141,148,93,166,39,121,191,190,136,159,183,227,
1071 43,137,187,189,158,188,255,155,41,39,126,152,121,197,215,121,119,46,46,
1072 122,118,109,249,199,137,181,203,242,155,51,106,59,181,215,193,224,172,227,
1073 184,4,193,121,173,146,100,71,254,170,161,166,108,111,30,149,57,77,16,107,
1074 156,64,168,228,73,10,132,86,84,136,131,176,46,219,145,245,131,163,97,147,
1075 163,207,231,187,249,97,103,255,152,188,205,103,140,4,8,13,175,231,192,242,
1076 119,244,14,212,117,244,149,182,244,108,106,232,206,169,239,202,172,237,
1077 76,173,238,136,46,107,91,190,169,249,187,204,134,79,146,106,63,75,169,131,
1078 154,171,11,91,226,43,218,211,107,58,179,234,186,114,235,187,10,26,187,43,
1079 90,123,155,186,250,187,61,60,0,31,52,32,108,172,114,116,181,57,66,249,60,
1080 135,207,82,32,180,152,20,8,173,168,16,7,225,208,123,209,66,211,33,24,28,
1081 28,236,235,239,35,68,199,70,215,213,215,137,223,190,156,143,34,133,22,124,
1082 23,61,132,237,183,180,182,36,36,37,244,244,244,240,59,100,251,76,136,73,
1083 129,208,98,82,32,180,162,194,224,26,97,104,170,174,169,46,118,83,108,204,
1084 166,152,159,147,126,222,152,189,145,31,4,90,83,174,30,109,21,87,21,179,
1085 253,13,217,27,150,167,44,23,251,42,168,41,144,235,148,172,44,5,66,139,73,
1086 129,208,138,82,32,12,82,149,84,149,44,76,94,104,120,135,214,216,129,48,
1087 181,48,213,176,175,164,146,36,185,78,201,202,82,32,180,152,20,8,173,40,
1088 5,194,32,149,2,161,146,79,82,32,180,152,20,8,173,40,5,194,32,149,2,161,
1089 146,79,82,32,180,152,20,8,173,40,5,194,32,149,2,161,146,79,82,32,180,152,
1090 20,8,173,40,5,194,32,149,2,161,146,79,82,32,180,152,20,8,173,40,5,194,32,
1091 85,107,123,107,89,125,25,97,109,194,218,77,21,155,196,239,177,107,199,250,
1092 230,122,182,207,142,54,36,109,40,169,45,225,119,99,91,216,125,91,60,40,
1093 165,64,104,49,41,16,90,81,10,132,65,173,193,193,193,152,152,152,134,134,
1094 6,185,236,179,200,40,36,151,125,83,71,71,71,98,98,226,232,191,15,83,105,
1095 236,164,64,104,49,41,16,90,76,3,253,142,190,222,222,206,142,204,196,216,
1096 129,158,110,126,135,251,203,168,130,77,96,172,166,166,102,227,198,141,105,
1097 105,105,141,141,141,190,83,173,189,189,189,192,169,226,226,98,237,211,113,
1098 195,10,10,230,230,230,70,70,70,22,22,22,142,201,91,49,149,198,66,10,132,
1099 22,147,2,161,197,212,84,227,40,92,51,184,105,101,111,214,82,71,193,74,71,
1100 193,42,71,99,248,126,45,115,88,85,87,87,131,156,69,139,22,125,245,213,87,
1101 115,231,206,253,238,187,239,126,254,249,231,212,212,84,240,32,83,140,182,
1102 186,186,135,9,133,133,69,28,210,90,167,34,34,34,106,235,90,13,9,220,134,
1103 150,150,182,216,216,88,145,107,221,186,117,206,79,135,247,25,210,152,67,
1104 99,83,71,116,116,52,233,69,198,248,248,248,150,214,94,67,26,67,240,153,
1105 176,74,99,41,5,66,139,73,129,208,98,234,237,113,228,175,144,47,233,39,148,
1106 198,90,237,29,155,184,56,101,101,101,153,155,43,203,169,108,167,114,156,
1107 194,77,17,202,203,27,250,42,208,166,77,155,112,116,202,203,203,241,150,
1108 90,90,90,252,62,143,215,214,214,86,84,84,244,201,39,159,92,115,205,53,187,
1109 237,182,219,196,137,19,183,50,137,200,73,147,38,29,123,236,177,247,220,
1110 115,207,252,249,243,217,175,47,92,196,9,227,56,101,121,156,114,91,168,117,
1111 17,185,239,205,31,10,239,127,151,247,193,255,54,125,240,125,193,199,11,
1112 74,62,93,92,241,197,178,186,111,215,180,253,20,209,190,118,237,122,129,
1113 37,161,213,235,51,23,70,59,134,13,203,55,150,65,64,153,199,169,37,145,237,
1114 134,52,34,252,24,57,240,206,55,89,111,127,157,73,152,243,229,106,240,175,
1115 211,231,31,126,185,65,172,18,225,147,69,101,90,198,207,127,174,37,102,222,
1116 162,204,212,84,89,64,47,50,52,16,213,46,87,108,177,180,182,168,171,171,
1117 147,81,195,137,106,23,31,15,18,162,33,228,138,225,132,123,45,243,88,71,
1118 29,173,142,214,90,71,67,217,208,55,138,249,65,8,170,151,232,134,170,20,
1119 8,173,167,166,106,73,193,156,197,142,134,18,171,125,206,27,19,249,247,191,
1120 255,253,55,46,77,152,48,65,176,103,155,109,182,217,118,219,109,33,208,228,
1121 201,147,183,223,126,251,29,118,216,97,71,167,166,78,157,58,109,218,52,160,
1122 181,255,254,251,31,121,228,145,127,248,195,31,174,184,226,138,123,239,189,
1123 119,214,172,89,81,81,81,35,186,163,114,201,146,37,87,95,125,245,62,251,
1124 236,35,247,237,131,56,188,67,14,57,228,134,27,110,88,186,116,169,247,125,
1125 149,150,150,254,238,119,191,147,217,60,151,107,251,237,119,220,110,242,
1126 80,216,126,135,157,118,156,186,203,212,105,187,239,190,247,65,7,28,124,
1127 244,145,199,157,117,218,185,127,251,235,117,247,63,246,216,227,95,124,241,
1128 197,234,213,171,37,208,214,174,93,16,229,24,54,172,88,159,38,83,187,180,
1129 124,99,181,33,141,8,95,173,104,222,122,155,109,229,81,14,167,51,47,188,
1130 78,203,120,237,237,207,78,156,184,181,92,49,156,106,107,107,101,189,56,
1131 69,237,201,21,91,44,188,100,177,205,151,95,126,89,70,13,167,189,246,218,
1132 43,49,49,81,228,66,116,39,185,98,56,157,124,242,201,50,143,117,212,82,247,
1133 235,52,151,80,18,237,232,30,171,179,23,74,190,75,129,208,122,26,232,119,
1134 20,69,15,13,146,220,159,28,157,109,50,210,50,50,128,208,111,129,150,93,
1135 119,221,245,226,139,47,198,200,202,77,123,22,126,228,29,119,220,177,243,
1136 206,59,195,39,153,127,36,34,215,78,59,237,116,235,173,183,226,217,200,45,
1137 154,100,0,161,127,98,71,148,11,75,125,225,133,23,126,244,209,71,240,108,
1138 197,134,18,13,69,94,194,47,27,140,30,225,226,200,54,67,26,17,70,6,194,139,
1139 174,215,50,142,8,132,184,107,178,94,156,10,82,16,158,114,202,41,50,143,
1140 117,52,56,232,40,142,255,21,132,53,121,234,38,0,43,72,129,208,146,106,44,
1141 117,228,44,114,52,215,200,69,43,105,180,64,168,9,151,235,182,219,110,43,
1142 42,42,146,59,48,169,176,176,240,220,115,207,149,169,183,76,71,31,125,244,
1143 134,13,27,220,222,142,59,42,32,212,11,159,24,199,183,162,162,66,238,192,
1144 171,122,122,123,177,245,226,226,226,250,245,235,11,10,10,250,251,221,159,
1145 9,104,110,110,198,67,149,251,24,78,184,194,50,155,195,241,236,179,207,110,
1146 189,117,80,130,112,239,189,247,78,74,250,245,249,72,223,65,120,234,169,
1147 167,202,60,150,82,107,205,208,201,30,40,88,180,193,209,167,238,111,178,
1148 132,20,8,173,168,129,238,206,182,236,245,131,61,62,127,174,47,128,26,117,
1149 16,34,28,169,51,207,60,211,96,124,133,160,224,31,254,240,7,153,110,52,116,
1150 212,81,71,165,167,167,203,173,235,52,234,32,68,120,135,56,178,114,7,195,
1151 137,138,197,241,141,140,140,172,173,173,245,242,228,140,2,161,239,32,164,
1152 231,200,60,150,82,127,175,163,56,194,145,189,208,209,80,108,181,11,31,97,
1153 43,5,66,43,170,187,187,187,40,53,102,208,146,207,17,142,5,8,17,44,124,232,
1154 161,135,12,0,24,28,28,124,240,193,7,183,218,106,43,153,104,52,196,142,174,
1155 186,234,42,51,105,198,2,132,8,246,124,242,201,39,190,60,68,65,154,206,206,
1156 206,152,216,24,142,205,75,250,17,129,240,198,27,111,148,217,130,28,132,
1157 201,201,201,34,23,242,29,132,167,157,118,154,204,99,53,53,148,15,221,44,
1158 211,209,34,23,149,198,91,10,132,86,148,149,31,168,31,35,16,162,157,119,
1159 222,121,229,202,149,114,55,78,165,165,165,237,191,255,254,114,245,168,106,
1160 209,162,69,114,31,46,141,17,8,209,17,71,28,225,229,196,47,2,123,37,117,
1161 37,89,101,89,105,197,105,43,147,86,102,150,101,242,187,161,197,253,243,
1162 248,35,2,225,77,55,221,36,179,133,37,8,79,63,253,116,153,199,106,82,143,
1163 79,88,76,10,132,86,84,120,130,16,207,239,241,199,31,215,158,10,7,15,111,
1164 189,245,214,196,137,19,229,234,81,213,223,254,246,55,177,23,77,99,7,66,
1165 184,181,112,225,66,47,78,94,255,64,127,68,126,132,225,173,161,197,213,197,
1166 114,245,230,26,17,8,111,190,249,102,153,45,44,65,120,198,25,103,200,60,
1167 86,147,2,161,197,164,64,104,69,133,39,8,17,83,120,205,4,83,252,171,175,
1168 190,90,174,24,78,152,248,41,83,166,76,158,60,121,130,111,183,149,30,115,
1169 204,49,141,141,155,189,150,115,236,64,136,238,189,247,94,47,175,125,25,
1170 59,16,254,227,31,255,144,217,130,25,132,251,236,179,79,74,74,138,200,133,
1171 124,7,225,153,103,158,41,243,88,77,10,132,22,147,2,161,21,21,182,32,220,
1172 121,231,157,75,74,74,180,29,249,248,200,224,164,73,147,30,123,236,177,53,
1173 107,214,204,155,55,239,184,227,142,147,177,94,117,192,1,7,100,102,102,138,
1174 29,9,141,41,8,79,62,249,100,47,15,245,143,29,8,111,185,229,22,153,45,44,
1175 65,120,214,89,103,201,60,86,147,2,161,197,164,64,104,69,133,18,8,191,255,
1176 254,251,185,115,231,222,116,211,77,190,248,106,164,73,72,72,16,59,170,174,
1177 174,246,209,189,187,241,198,27,197,155,71,6,7,7,223,126,251,237,237,182,
1178 219,78,174,240,172,221,119,223,61,50,50,82,236,72,104,68,32,60,251,236,
1179 179,23,46,92,200,190,46,189,244,82,25,229,85,187,238,186,171,151,71,24,
1180 199,14,132,183,222,122,171,204,22,228,32,76,77,77,21,185,144,239,32,164,
1181 153,100,30,171,73,129,208,98,82,32,180,162,66,6,132,7,29,116,16,158,16,
1182 124,162,44,159,125,246,217,14,59,236,32,87,120,214,130,5,11,196,142,162,
1183 163,163,101,212,112,90,190,124,185,200,130,86,172,88,177,203,46,187,200,
1184 21,158,53,117,234,84,125,46,52,34,16,82,3,20,10,245,247,247,191,246,218,
1185 107,190,92,200,172,169,241,248,84,104,40,129,144,185,11,160,2,93,158,164,
1186 77,116,2,0,194,115,206,57,71,230,177,154,20,8,45,38,5,66,43,42,100,64,120,
1187 240,193,7,119,118,202,167,33,27,27,27,47,188,240,66,185,194,179,62,248,
1188 224,3,145,126,254,252,249,50,106,56,193,48,145,5,197,196,196,224,237,201,
1189 21,158,53,121,242,100,92,58,153,199,41,63,64,40,50,102,102,102,30,112,192,
1190 1,114,133,103,185,125,120,81,136,77,13,221,53,90,145,149,82,148,178,34,
1191 97,69,102,121,38,191,235,155,235,229,234,205,53,34,16,222,118,219,109,50,
1192 91,160,64,184,205,54,219,48,51,16,175,105,117,43,166,14,98,155,35,2,97,
1193 90,90,154,200,133,124,7,225,185,231,158,43,243,88,77,10,132,22,147,2,161,
1194 21,21,146,32,164,80,216,101,185,194,179,94,125,245,85,145,254,227,143,63,
1195 150,81,94,133,55,214,218,218,42,178,160,216,216,216,61,246,216,67,174,243,
1196 172,73,147,38,125,255,253,247,50,143,83,126,131,176,170,170,234,132,19,
1197 78,144,43,60,107,195,134,13,34,189,91,13,121,151,131,131,120,207,49,177,
1198 49,160,66,44,202,117,155,107,68,32,188,253,246,219,101,54,135,227,185,231,
1199 158,11,0,8,57,182,175,190,250,74,102,243,170,0,128,240,188,243,206,147,
1200 121,172,38,5,66,139,73,129,208,138,10,73,16,146,241,254,251,239,151,43,
1201 60,235,249,231,159,23,233,223,124,243,77,25,53,156,244,30,161,143,32,196,
1202 113,193,227,148,121,156,242,27,132,245,245,245,190,188,251,102,197,138,
1203 21,34,189,23,117,117,117,225,209,122,111,119,191,65,72,197,6,41,8,247,221,
1204 119,95,189,63,237,59,8,207,63,255,124,153,199,106,82,32,180,152,20,8,173,
1205 168,144,4,33,197,249,215,191,254,37,87,120,150,6,66,92,67,25,53,156,22,
1206 47,94,44,178,32,31,65,8,18,190,254,250,107,153,199,41,191,65,216,216,216,
1207 120,250,233,167,203,21,158,53,46,32,212,191,224,45,12,65,120,193,5,23,200,
1208 60,86,147,2,161,197,164,64,104,69,133,12,8,15,57,228,16,191,65,232,187,
1209 71,248,223,255,254,87,100,65,209,209,209,190,92,35,68,159,125,246,153,204,
1210 227,84,72,130,240,206,59,239,148,217,28,14,155,205,22,110,32,188,240,194,
1211 11,101,30,171,73,129,208,98,82,32,180,162,20,8,209,156,57,115,100,212,112,
1212 58,242,200,35,53,195,157,153,153,121,253,245,215,95,230,131,12,175,115,
1213 179,2,8,123,123,123,135,109,119,191,65,104,183,219,131,23,132,25,25,25,
1214 50,219,72,64,120,209,69,23,201,60,86,147,2,161,197,164,64,104,69,41,16,
1215 162,245,235,215,203,168,225,52,113,226,196,123,238,185,71,187,101,6,156,
1216 244,248,32,67,245,142,8,132,87,95,125,117,80,120,132,119,221,117,151,204,
1217 22,150,32,252,227,31,255,40,243,88,77,10,132,22,147,2,161,21,21,146,32,
1218 236,239,239,31,17,8,171,170,170,124,255,238,4,44,188,247,222,123,155,154,
1219 154,252,174,52,43,128,144,186,45,77,31,230,171,35,35,2,225,221,119,223,
1220 45,179,57,28,47,188,240,66,184,129,240,226,139,47,150,121,172,38,5,66,139,
1221 73,129,208,138,10,73,16,226,168,97,151,229,10,207,210,64,8,56,127,251,219,
1222 223,202,88,223,116,234,169,167,206,155,55,143,218,19,91,24,145,252,6,97,
1223 109,109,237,201,39,159,44,87,120,150,47,32,116,244,246,56,10,86,59,154,
1224 107,229,162,59,249,13,194,23,95,124,113,155,109,182,145,43,134,83,0,64,
1225 248,202,43,175,200,60,195,201,0,66,95,94,152,32,116,201,37,151,200,60,86,
1226 147,2,161,197,164,64,104,69,133,36,8,249,113,227,141,55,202,21,158,133,
1227 227,34,210,83,252,187,238,186,75,198,250,172,169,83,167,94,117,213,85,250,
1228 143,21,248,40,191,65,88,86,86,118,236,177,199,202,21,158,181,106,213,42,
1229 145,222,155,90,202,29,57,139,28,133,107,29,253,125,50,198,164,17,129,240,
1230 158,123,238,145,217,172,7,66,223,239,10,54,128,112,215,93,119,149,43,134,
1231 211,165,151,94,42,243,88,77,10,132,22,147,2,161,21,21,146,32,108,104,104,
1232 56,247,220,115,229,10,207,154,62,125,186,72,143,22,45,90,228,187,237,214,
1233 52,97,194,132,221,118,219,237,227,143,63,102,143,114,67,62,200,111,16,166,
1234 167,167,239,183,223,126,114,133,103,105,239,216,244,40,54,88,153,230,200,
1235 94,48,20,106,179,88,150,241,155,107,68,32,188,239,190,251,100,54,135,227,
1236 165,151,94,10,0,8,39,78,156,248,143,127,252,99,150,59,189,245,214,91,250,
1237 239,50,210,208,50,207,112,50,128,144,198,149,43,134,211,101,151,93,38,243,
1238 88,77,10,132,22,147,2,161,21,21,122,32,164,44,31,125,244,209,78,59,237,
1239 36,87,120,22,230,82,236,8,85,87,87,159,120,226,137,114,197,8,133,209,191,
1240 232,162,139,150,47,95,206,1,203,205,121,149,127,32,4,75,79,61,245,148,47,
1241 215,222,180,119,108,122,212,64,223,144,47,40,64,88,176,202,209,245,235,
1242 235,114,244,178,56,8,189,104,231,157,119,214,191,94,199,111,16,250,248,
1243 120,12,186,252,242,203,101,30,171,73,129,208,98,82,32,180,162,66,6,132,
1244 144,239,233,167,159,198,28,159,125,246,217,83,166,76,145,177,94,53,111,
1245 222,60,185,39,231,139,199,102,207,158,237,135,83,168,105,143,61,246,152,
1246 49,99,134,47,44,28,17,8,15,59,236,176,255,254,247,191,184,62,199,28,115,
1247 140,47,31,187,64,222,63,82,63,164,230,26,73,65,17,202,113,10,221,104,68,
1248 32,188,255,254,251,101,54,231,205,41,150,2,225,107,175,189,38,87,12,39,
1249 3,8,125,121,97,130,208,159,254,244,39,153,199,106,82,32,180,152,20,8,173,
1250 168,144,1,161,31,90,179,102,141,220,147,83,56,148,87,94,121,165,143,223,
1251 99,242,164,107,174,185,38,63,63,95,123,221,179,91,141,8,132,35,213,164,
1252 73,147,244,47,68,117,175,226,13,142,194,53,61,185,43,218,50,151,59,106,
1253 75,134,66,175,155,111,249,142,8,132,15,60,240,128,204,230,188,57,197,82,
1254 32,100,130,34,87,12,39,3,8,247,220,115,79,185,98,56,93,113,197,21,50,143,
1255 213,164,64,104,49,41,16,142,191,240,123,42,42,42,228,203,249,157,74,79,
1256 79,223,184,113,99,102,102,166,92,118,170,113,243,47,170,143,151,198,20,
1257 132,120,141,16,75,238,201,37,16,117,206,57,231,200,20,126,9,142,30,126,
1258 248,225,223,124,243,141,118,97,207,172,49,5,225,177,199,30,235,229,195,
1259 188,82,112,186,191,175,182,182,54,38,38,70,198,184,211,136,64,248,224,131,
1260 15,202,108,206,155,83,44,5,194,153,51,103,202,21,195,201,111,16,50,133,
1261 146,121,172,38,5,66,139,73,129,208,18,170,169,169,193,70,172,245,42,96,
1262 41,83,143,171,198,20,132,199,29,119,92,117,117,181,220,147,75,208,43,53,
1263 53,21,146,109,161,95,184,253,246,219,191,247,222,123,158,88,56,166,32,188,
1264 233,166,155,240,242,229,158,188,170,169,169,41,54,54,86,46,184,147,2,225,
1265 94,123,237,37,87,12,167,63,255,249,207,50,207,184,139,94,167,15,237,77,
1266 67,32,52,68,18,148,198,73,10,132,150,16,116,73,76,76,148,196,115,167,236,
1267 236,108,239,103,246,2,166,177,3,33,156,195,112,139,111,205,155,85,82,82,
1268 114,247,221,119,251,114,187,141,23,237,176,195,14,239,190,251,110,79,143,
1269 155,83,142,99,7,66,240,243,229,151,95,138,19,221,56,124,81,81,81,145,158,
1270 245,203,47,191,124,252,241,199,114,193,37,124,196,150,150,22,113,156,35,
1271 2,225,191,254,245,47,145,11,77,159,62,221,82,32,124,227,141,55,228,138,
1272 225,100,0,225,222,123,239,45,87,12,167,191,252,229,47,50,207,248,138,145,
1273 91,18,189,217,5,96,183,161,44,78,166,87,10,184,20,8,173,34,12,156,132,158,
1274 73,17,17,17,13,13,13,94,78,235,5,82,99,7,194,93,118,217,133,194,202,221,
1275 184,19,0,251,226,139,47,246,217,103,31,153,193,47,77,155,54,109,206,156,
1276 57,114,139,58,141,29,8,143,58,234,40,54,46,246,178,98,197,138,221,119,223,
1277 157,146,122,18,180,152,58,117,170,92,112,233,176,195,14,211,110,58,29,17,
1278 8,31,122,232,33,145,11,89,13,132,179,102,205,146,43,134,147,1,132,190,119,
1279 128,171,174,186,74,230,25,119,181,183,56,178,23,26,201,103,8,125,110,230,
1280 103,74,129,145,2,161,133,148,153,153,41,200,103,80,108,108,172,39,63,41,
1281 240,26,35,16,98,220,159,121,230,153,97,239,15,34,65,97,97,225,101,151,93,
1282 230,187,77,55,139,125,197,197,25,103,223,99,4,194,201,147,39,207,155,55,
1283 79,155,196,0,66,223,223,115,166,9,118,198,199,199,139,45,140,8,132,15,63,
1284 252,176,200,133,94,123,237,53,75,129,112,246,236,217,114,197,112,10,5,16,
1285 162,178,116,35,249,244,161,174,64,38,83,26,15,41,16,90,72,141,141,141,27,
1286 55,110,148,244,211,105,68,15,134,143,181,198,2,132,123,238,185,231,171,
1287 175,190,234,251,93,178,173,173,173,47,190,248,226,72,95,192,166,215,223,
1288 254,246,183,246,246,118,185,57,167,70,29,132,19,38,76,192,23,196,133,149,
1289 59,112,106,203,65,216,210,210,226,31,8,95,127,253,245,208,0,33,139,114,
1290 197,112,178,22,8,59,155,29,185,203,140,252,19,97,211,10,71,207,112,247,
1291 82,41,141,165,20,8,45,36,24,147,156,156,44,233,231,82,126,126,62,241,50,
1292 133,5,52,186,32,156,52,105,210,117,215,93,23,29,29,221,219,219,43,119,224,
1293 155,72,191,105,211,166,107,174,185,198,191,59,104,118,221,117,87,189,81,
1294 70,163,11,194,93,118,217,229,241,199,31,231,8,13,116,223,114,16,50,9,8,
1295 13,16,190,245,214,91,114,197,112,50,128,208,151,247,248,8,89,11,132,3,253,
1296 142,178,120,35,2,69,168,74,85,119,202,140,175,20,8,173,165,154,154,154,
1297 245,235,215,75,6,174,93,139,225,168,172,172,148,235,172,161,17,129,16,203,
1298 59,205,41,192,179,219,110,187,237,177,199,30,123,239,189,247,254,251,239,
1299 127,232,161,135,94,122,233,165,211,167,79,47,43,43,219,146,155,128,218,
1300 218,218,94,121,229,21,223,239,167,215,235,157,119,222,209,83,106,68,32,
1301 4,69,20,10,218,137,114,113,0,251,236,179,207,129,7,30,120,248,225,135,95,
1302 127,253,245,159,126,250,41,126,155,91,7,119,203,65,72,145,253,3,225,140,
1303 25,51,2,0,66,118,49,107,214,172,34,15,210,63,67,242,246,219,111,203,60,
1304 195,201,0,66,250,143,92,49,156,172,5,66,212,82,239,200,253,201,72,65,98,
1305 186,54,59,57,161,20,120,41,16,90,75,80,33,53,53,85,98,112,237,218,244,244,
1306 116,75,185,131,104,68,32,60,228,144,67,126,249,229,23,10,2,209,163,162,
1307 162,146,146,146,178,178,178,202,203,203,71,247,146,103,100,100,36,88,245,
1308 221,202,11,225,137,234,237,242,136,64,120,206,57,231,172,94,189,154,114,
1309 109,220,184,49,38,38,38,37,37,37,39,39,167,186,186,122,216,198,10,121,16,
1310 114,108,62,190,116,219,111,16,30,112,192,1,114,197,112,178,28,8,113,10,
1311 75,19,140,32,172,76,149,107,149,198,79,10,132,150,19,206,132,19,130,67,
1312 70,182,169,169,201,34,55,139,106,26,41,8,181,151,110,143,157,168,162,198,
1313 198,198,7,31,124,208,247,239,23,34,188,55,253,197,215,17,129,80,255,210,
1314 237,17,105,28,65,56,115,230,76,5,194,241,87,103,155,17,132,234,102,81,11,
1315 72,129,208,114,194,194,138,219,71,19,18,18,2,64,145,145,42,96,32,28,24,
1316 24,248,194,55,225,55,139,44,175,188,242,202,212,169,83,229,190,135,211,
1317 118,219,109,167,127,71,129,149,65,184,219,110,187,225,79,139,45,40,16,30,
1318 120,224,129,114,197,112,178,34,8,81,121,198,175,20,172,43,80,87,7,173,32,
1319 5,66,43,10,79,5,119,208,96,140,44,162,128,129,144,29,249,232,225,189,248,
1320 226,139,34,75,79,79,207,11,47,188,224,227,91,176,145,254,189,166,86,6,225,
1321 46,187,236,50,111,222,60,241,206,29,191,65,248,198,27,111,132,6,8,15,58,
1322 232,32,185,98,56,89,20,132,29,205,142,188,95,134,40,184,105,165,163,71,
1323 93,29,180,132,20,8,173,40,24,80,91,91,235,251,227,4,129,84,32,65,56,121,
1324 242,100,185,33,175,154,174,251,132,97,101,101,165,239,167,206,222,123,239,
1325 61,153,45,80,32,220,180,105,211,243,207,63,255,228,147,79,222,126,251,237,
1326 80,234,89,223,4,221,33,65,116,116,52,189,130,250,244,15,132,111,190,249,
1327 166,239,25,3,0,194,247,223,127,95,230,25,78,6,16,30,124,240,193,114,197,
1328 112,178,40,8,135,174,20,58,95,52,83,30,235,240,240,213,73,165,0,75,129,
1329 208,162,26,233,227,4,1,83,32,65,184,243,206,59,203,13,121,21,190,142,204,
1330 227,212,157,119,222,41,87,12,167,151,94,122,73,230,9,20,8,81,119,119,119,
1331 90,90,90,73,73,137,92,246,89,212,100,74,74,10,136,154,52,105,146,60,142,
1332 225,164,7,225,172,89,179,44,5,194,207,63,255,92,230,25,78,6,16,210,169,
1333 228,138,225,100,81,16,162,150,58,117,179,168,165,164,64,168,52,50,5,18,
1334 132,62,62,23,129,137,151,121,156,154,51,103,142,143,15,23,62,254,248,227,
1335 50,79,0,65,8,204,202,203,203,253,115,247,219,218,218,146,146,146,124,63,
1336 247,171,7,225,236,217,179,45,5,66,146,201,60,195,201,0,194,67,15,61,84,
1337 174,24,78,214,5,225,224,128,163,185,92,254,86,178,128,20,8,149,70,166,64,
1338 130,208,199,71,167,13,32,92,187,118,173,143,32,212,127,192,61,48,32,108,
1339 104,104,136,141,141,29,254,147,76,158,85,86,86,22,0,16,54,53,53,201,108,
1340 78,141,5,8,231,205,155,39,243,12,39,3,8,15,59,236,48,185,98,56,209,81,101,
1341 30,37,37,175,82,32,84,26,153,2,9,66,31,175,6,25,64,24,23,23,231,35,8,111,
1342 191,253,118,153,39,32,32,236,239,239,143,143,143,111,110,110,150,203,126,
1343 169,183,183,119,151,93,118,145,199,49,156,244,32,244,253,57,66,106,207,
1344 128,234,177,0,225,194,133,11,101,158,225,100,0,161,239,15,212,223,120,227,
1345 141,50,143,146,146,87,41,16,42,141,76,1,3,33,216,56,238,184,227,228,134,
1346 188,202,0,194,180,180,52,31,65,168,255,74,81,0,64,88,83,83,99,126,233,154,
1347 31,242,253,110,17,61,8,95,124,241,69,31,65,56,121,242,100,195,215,19,199,
1348 2,132,171,87,175,150,121,134,147,1,132,187,237,182,155,92,49,156,238,190,
1349 251,110,153,71,73,201,171,20,8,149,70,166,64,130,240,130,11,46,144,27,242,
1350 42,195,205,50,235,214,173,243,17,132,79,63,253,180,204,51,246,32,36,125,
1351 81,81,81,109,109,173,92,222,2,157,112,194,9,242,56,134,147,254,195,188,
1352 207,60,243,140,143,79,110,28,112,192,1,134,79,54,142,5,8,113,142,101,158,
1353 225,4,8,181,71,69,33,244,180,105,211,228,138,225,244,223,255,254,87,228,
1354 82,82,242,46,5,66,165,145,41,96,32,196,115,186,241,198,27,229,134,188,234,
1355 201,39,159,148,121,156,154,59,119,174,143,32,156,61,123,182,204,19,16,16,
1356 230,230,230,106,223,215,221,18,93,118,217,101,242,56,134,211,205,55,223,
1357 44,243,56,28,184,191,19,39,78,148,43,188,234,180,211,78,51,220,180,60,22,
1358 32,44,40,40,240,209,67,221,115,207,61,181,207,102,49,147,240,253,227,204,
1359 31,125,244,145,200,165,164,228,93,10,132,74,35,83,192,64,8,57,158,123,238,
1360 57,185,33,175,186,252,242,203,101,30,167,174,188,242,74,185,98,56,45,88,
1361 176,64,230,25,123,16,194,245,252,252,124,191,107,67,175,71,30,121,68,30,
1362 199,112,58,239,188,243,68,22,246,126,213,85,87,201,216,225,116,237,181,
1363 215,210,202,34,163,208,88,128,176,186,186,26,87,79,102,243,42,92,192,149,
1364 43,87,138,92,137,137,137,59,238,184,163,92,49,156,86,173,90,37,114,41,41,
1365 121,151,2,161,210,200,20,48,16,162,249,243,231,251,242,114,25,44,227,178,
1366 101,203,234,234,234,106,106,106,190,248,226,11,31,61,6,220,163,228,228,
1367 100,185,167,177,7,33,245,150,146,146,50,42,143,135,126,249,229,151,242,
1368 56,134,211,62,251,236,179,110,221,186,202,202,202,168,168,40,223,111,182,
1369 124,233,165,151,12,23,50,199,2,132,141,141,141,103,156,113,134,204,230,
1370 85,180,20,78,127,69,69,5,236,124,226,137,39,124,244,35,39,77,154,68,127,
1371 144,59,83,82,242,42,5,66,165,145,41,144,32,140,139,139,219,99,143,61,228,
1372 182,188,106,215,93,119,61,243,204,51,79,59,237,52,223,47,32,5,248,165,219,
1373 253,253,253,217,217,217,134,155,80,252,83,97,97,161,239,95,158,58,224,128,
1374 3,78,62,249,100,223,95,75,54,117,234,212,141,27,55,202,61,185,52,22,32,
1375 100,78,240,239,127,255,91,102,27,78,83,166,76,57,229,148,83,254,240,135,
1376 63,248,238,14,94,126,249,229,150,125,43,133,146,213,164,64,168,52,50,5,
1377 18,132,56,1,199,31,127,188,220,214,104,107,75,62,195,228,247,169,209,81,
1378 249,254,84,91,91,219,95,255,250,87,121,40,163,45,96,99,254,4,230,88,128,
1379 16,177,89,223,39,46,35,21,135,49,210,54,82,10,91,41,16,42,141,76,129,4,
1380 33,122,226,137,39,124,188,197,99,68,218,102,155,109,230,206,157,171,55,
1381 148,1,0,97,70,70,198,168,220,44,131,115,249,225,135,31,238,176,195,14,242,
1382 104,70,79,84,139,254,253,171,154,198,8,132,16,253,226,139,47,150,57,71,
1383 85,103,156,113,134,213,190,104,173,100,101,41,16,42,141,76,1,6,97,77,77,
1384 205,201,39,159,44,55,55,122,58,246,216,99,245,223,96,66,99,13,66,210,23,
1385 23,23,215,215,215,203,229,45,16,32,204,201,201,185,239,190,251,124,188,
1386 57,214,119,93,121,229,149,110,81,61,70,32,68,84,251,17,71,28,33,51,143,
1387 146,192,249,252,249,243,149,59,168,228,187,20,8,149,70,166,0,131,16,37,
1388 39,39,251,126,73,204,23,77,158,60,121,193,130,5,6,67,57,214,32,68,85,85,
1389 85,153,153,153,91,110,160,169,210,172,172,44,254,254,229,47,127,25,209,
1390 183,136,189,8,166,158,122,234,169,158,238,46,25,59,16,162,85,171,86,249,
1391 254,174,156,97,197,1,60,245,212,83,204,21,228,214,149,148,124,144,2,161,
1392 210,200,20,120,16,98,212,190,255,254,251,195,15,63,92,110,116,203,116,208,
1393 65,7,125,251,237,183,114,211,58,5,0,132,189,189,189,113,113,113,94,156,
1394 194,129,129,1,170,183,171,171,139,191,94,182,159,155,155,43,190,77,200,
1395 223,107,174,185,198,143,15,28,154,117,210,73,39,1,105,177,125,179,198,20,
1396 132,61,61,61,31,125,244,145,239,183,243,120,209,14,59,236,96,183,219,13,
1397 111,3,80,82,26,86,10,132,74,35,83,224,65,136,196,201,64,28,32,185,93,127,
1398 117,238,185,231,70,69,69,185,117,23,2,0,66,132,83,152,144,144,64,29,202,
1399 101,167,88,172,172,172,76,74,74,98,21,164,140,141,141,229,47,191,43,42,
1400 42,26,27,27,13,79,50,180,182,182,198,196,196,104,145,96,245,173,183,222,
1401 218,66,143,249,236,179,207,78,79,79,247,82,162,49,5,33,162,6,160,187,239,
1402 79,58,122,210,243,207,63,191,37,47,52,87,10,91,41,16,42,141,76,227,2,66,
1403 161,246,246,246,89,179,102,225,26,142,244,62,17,210,31,121,228,145,239,
1404 190,251,46,190,130,39,115,31,24,16,162,194,194,194,154,154,26,178,163,238,
1405 238,110,16,24,25,25,9,6,138,139,139,155,155,155,177,227,112,154,31,16,46,
1406 63,63,63,58,58,58,43,43,171,174,174,78,192,27,103,177,168,168,8,58,138,
1407 77,9,1,69,242,226,26,238,177,199,30,62,62,99,39,68,226,131,15,62,120,246,
1408 236,217,195,194,99,172,65,40,68,251,226,26,30,118,216,97,59,238,184,227,
1409 136,46,127,146,254,138,43,174,72,73,73,49,76,26,148,148,124,148,2,161,210,
1410 200,132,173,153,63,127,254,115,190,9,110,141,250,179,92,181,181,181,255,
1411 251,223,255,30,124,240,193,211,79,63,125,202,148,41,210,22,186,19,107,73,
1412 115,223,125,247,125,251,237,183,184,98,50,191,7,181,180,180,188,253,246,
1413 219,242,184,135,211,55,223,124,35,179,141,92,80,39,53,53,181,186,186,154,
1414 67,194,118,231,229,229,177,107,79,88,133,220,16,58,51,51,83,220,113,202,
1415 15,79,55,67,178,133,248,248,248,215,94,123,13,36,28,116,208,65,94,174,29,
1416 178,234,232,163,143,190,229,150,91,40,47,148,149,249,189,10,36,203,146,
1417 15,39,187,221,158,150,150,38,179,249,165,134,134,134,31,127,252,241,222,
1418 123,239,253,195,31,254,48,117,234,84,121,208,238,52,109,218,180,139,46,
1419 186,232,177,199,30,251,225,135,31,70,229,118,92,165,176,149,2,161,210,136,
1420 229,116,102,124,149,204,51,218,194,151,130,136,24,232,21,43,86,188,249,
1421 230,155,79,61,245,212,191,254,245,175,59,238,184,227,161,135,30,122,250,
1422 233,167,49,241,235,214,173,219,180,105,19,105,124,127,116,79,30,177,111,
1423 146,121,252,82,83,83,83,76,76,76,66,66,2,80,244,197,137,97,50,129,207,23,
1424 21,21,5,183,188,239,26,199,145,141,195,78,182,63,119,238,220,103,158,121,
1425 230,158,123,238,185,225,134,27,110,188,241,198,71,31,125,116,198,140,25,
1426 184,107,73,73,73,21,21,21,184,95,35,42,133,179,208,62,73,102,216,50,117,
1427 118,118,226,55,83,222,37,75,150,188,241,198,27,15,63,252,240,237,183,223,
1428 126,221,117,215,81,28,112,251,254,251,239,47,90,180,168,160,160,0,106,26,
1429 206,51,43,41,249,33,5,66,165,80,144,180,193,46,201,88,75,138,195,195,171,
1430 131,130,128,13,63,175,185,185,217,237,53,75,77,24,122,112,30,23,23,87,84,
1431 84,132,179,53,162,107,96,162,54,52,201,216,32,148,44,128,75,50,86,73,105,
1432 148,164,64,168,164,20,80,181,181,181,101,102,102,226,167,226,147,193,182,
1433 13,27,54,128,55,80,103,184,215,17,47,16,175,168,176,176,48,37,37,5,94,214,
1434 215,215,3,0,254,146,88,221,21,169,164,52,186,82,32,84,82,10,156,240,255,
1435 240,237,90,91,91,197,34,108,19,87,1,137,140,136,136,16,119,205,0,63,104,
1436 199,34,130,130,141,141,141,154,203,72,250,146,146,18,210,139,69,37,37,165,
1437 81,145,2,161,146,82,128,52,48,48,80,94,94,238,233,94,146,238,238,110,48,
1438 89,85,85,85,81,81,129,131,136,59,232,214,243,35,50,49,49,113,84,222,89,
1439 170,164,164,36,164,64,168,164,20,32,225,8,70,69,69,109,249,7,40,106,106,
1440 106,138,139,139,213,165,50,37,165,209,146,2,161,146,82,32,4,183,160,215,
1441 168,0,172,183,183,55,47,47,79,93,41,84,82,26,45,41,16,42,41,5,66,240,47,
1442 55,55,215,203,251,213,124,87,127,127,127,90,90,154,118,161,81,73,73,105,
1443 11,165,64,168,164,20,8,1,194,210,210,210,81,121,207,14,155,194,35,212,127,
1444 85,88,73,73,105,75,164,64,168,164,20,8,225,198,21,21,21,141,214,123,118,
1445 216,84,93,93,157,92,80,82,82,218,50,41,16,42,41,5,66,125,125,125,41,41,
1446 41,163,8,194,178,178,50,185,160,164,164,180,101,82,32,84,82,10,132,240,
1447 8,115,115,115,183,252,150,81,33,5,66,37,165,81,148,2,161,146,82,32,52,48,
1448 48,144,159,159,63,42,215,8,217,20,76,53,124,131,66,73,73,201,111,41,16,
1449 42,41,5,66,131,131,131,5,5,5,163,117,215,104,70,70,198,136,94,58,170,164,
1450 164,228,69,10,132,74,74,129,16,32,44,46,46,30,149,183,163,117,117,117,101,
1451 102,102,170,175,46,40,41,141,150,20,8,149,148,2,164,182,182,182,232,232,
1452 232,45,127,16,30,207,18,249,242,253,38,37,37,37,95,164,64,168,164,20,32,
1453 225,20,110,218,180,41,61,61,93,46,251,165,246,246,246,168,168,40,117,94,
1454 84,73,105,20,165,64,168,164,20,56,117,118,118,198,198,198,226,26,202,229,
1455 17,10,148,166,164,164,212,214,214,242,67,70,41,41,41,109,177,20,8,149,148,
1456 2,42,241,61,66,63,94,144,6,252,202,203,203,11,10,10,212,91,70,149,148,70,
1457 87,10,132,74,74,1,21,60,107,104,104,72,72,72,24,41,11,203,202,202,112,7,
1458 213,73,81,37,165,81,151,2,161,146,210,152,11,248,245,247,247,247,246,246,
1459 106,119,184,52,54,54,194,194,230,230,102,226,69,140,39,145,183,171,171,
1460 75,124,188,215,239,115,170,74,74,74,94,164,64,168,164,52,230,106,106,106,
1461 202,204,204,76,76,76,204,206,206,214,92,58,88,152,145,145,65,124,69,69,
1462 133,91,28,130,64,188,198,77,155,54,37,39,39,87,86,86,142,214,235,217,148,
1463 148,148,12,82,32,84,82,26,91,1,176,148,148,148,181,46,149,148,148,136,120,
1464 225,38,66,184,252,252,252,152,152,152,248,248,120,126,55,52,52,64,202,170,
1465 170,42,146,197,198,198,70,70,70,22,23,23,227,17,146,88,228,82,82,82,26,
1466 117,41,16,42,41,141,173,122,122,122,18,18,18,36,6,215,174,45,42,42,146,
1467 43,92,26,24,24,104,110,110,6,129,185,185,185,16,113,253,250,245,56,142,
1468 165,165,165,248,145,234,169,121,37,165,0,72,129,80,73,105,108,37,222,50,
1469 186,110,221,58,40,8,17,189,127,71,16,248,225,8,202,5,37,37,165,128,72,129,
1470 80,73,105,204,37,78,129,22,20,20,224,249,121,63,201,169,64,168,164,20,120,
1471 41,16,42,41,89,72,10,132,74,110,85,92,92,76,199,136,113,41,45,45,109,216,
1472 251,141,149,124,151,2,161,82,56,42,58,58,250,243,207,63,159,49,99,198,139,
1473 47,190,248,241,199,31,47,90,180,168,186,186,90,174,27,87,41,16,42,153,149,
1474 157,157,125,198,25,103,76,157,58,117,138,75,123,239,189,247,71,31,125,36,
1475 87,43,109,177,198,13,132,221,221,221,211,166,77,219,201,165,157,119,222,
1476 121,247,221,119,223,103,159,125,14,62,248,224,99,143,61,246,204,51,207,
1477 252,231,63,255,137,133,42,43,43,211,38,62,252,120,254,249,231,101,6,157,
1478 254,241,143,127,136,4,150,82,79,79,207,198,141,27,239,189,247,222,63,252,
1479 225,15,135,31,126,248,126,251,237,39,142,182,182,182,86,166,80,114,170,
1480 190,190,126,223,125,247,21,149,163,233,176,195,14,243,126,45,205,63,181,
1481 180,180,204,156,57,147,62,182,195,14,59,76,154,52,105,27,167,248,49,121,
1482 242,100,44,203,237,183,223,158,153,153,169,159,104,115,12,242,128,116,250,
1483 237,111,127,59,42,31,145,112,43,5,66,79,58,250,232,163,101,3,184,180,199,
1484 30,123,124,250,233,167,114,245,40,233,164,147,78,146,91,119,106,215,93,
1485 119,165,99,28,112,192,1,71,29,117,212,105,167,157,118,253,245,215,211,127,
1486 242,243,243,3,249,114,159,230,230,230,191,255,253,239,19,38,76,248,205,
1487 230,218,126,251,237,127,252,241,199,241,186,157,184,174,174,238,143,127,
1488 252,163,172,38,157,222,125,247,93,153,34,168,52,110,32,236,234,234,218,
1489 106,171,173,100,147,122,214,254,251,239,255,244,211,79,87,86,86,146,5,11,
1490 245,228,147,79,202,21,58,209,75,196,54,253,16,219,172,169,169,1,183,6,109,
1491 97,247,162,116,15,63,252,48,230,85,30,162,78,236,78,38,82,114,138,17,101,
1492 174,40,108,220,168,124,186,79,47,236,215,165,151,94,42,119,224,65,59,238,
1493 184,227,91,111,189,69,243,137,44,28,131,92,161,211,94,123,237,165,61,2,
1494 49,82,185,237,108,250,185,145,2,161,39,97,10,100,3,184,196,12,230,131,15,
1495 62,144,171,71,73,204,114,228,214,61,107,151,93,118,185,245,214,91,243,242,
1496 242,100,30,191,132,133,145,205,191,185,12,247,9,51,58,112,9,228,142,127,
1497 243,27,144,204,196,90,46,252,230,55,135,28,114,72,66,66,194,184,176,144,
1498 78,139,147,42,143,67,167,55,222,120,67,166,8,42,89,29,132,136,169,16,221,
1499 174,179,179,115,44,64,136,165,187,246,218,107,153,238,25,36,208,235,183,
1500 150,44,89,194,40,149,199,183,185,20,8,13,98,68,109,189,245,214,178,118,
1501 92,26,117,16,86,87,87,95,112,193,5,230,105,181,89,83,167,78,157,59,119,
1502 174,200,53,234,32,196,165,144,61,76,167,23,95,124,81,174,86,32,244,44,235,
1503 128,16,209,145,46,191,252,242,45,57,187,131,79,41,155,95,39,124,44,253,
1504 54,91,90,90,174,187,238,58,205,78,238,188,243,206,223,127,255,61,166,233,
1505 146,75,46,17,49,232,176,195,14,107,111,111,151,25,2,40,5,194,209,145,239,
1506 32,68,140,1,113,113,120,212,65,136,125,60,229,148,83,228,134,116,42,46,
1507 46,150,41,252,210,244,233,211,39,78,156,40,183,229,20,179,200,227,142,59,
1508 238,152,99,142,25,117,71,39,216,197,204,64,214,145,78,163,14,194,165,75,
1509 151,238,180,211,78,114,235,195,233,172,179,206,18,179,236,198,198,70,230,
1510 224,6,157,124,242,201,229,229,229,98,179,35,149,126,58,175,233,223,255,
1511 254,183,92,173,64,232,89,150,2,33,218,113,199,29,55,108,216,32,179,141,
1512 92,221,221,221,114,67,58,29,122,232,161,85,85,85,34,1,61,240,211,79,63,
1513 61,232,160,131,14,60,240,64,104,119,194,9,39,204,154,53,75,188,162,111,
1514 211,166,77,87,92,113,5,198,132,85,8,124,138,44,129,20,195,243,175,127,253,
1515 171,28,18,58,205,153,51,71,166,8,42,89,11,132,204,179,68,211,202,101,151,
1516 182,217,102,27,12,89,95,95,159,239,32,108,110,110,78,79,79,95,191,126,253,
1517 34,167,86,173,90,149,151,151,103,254,150,233,72,65,88,88,88,24,23,23,183,
1518 108,217,178,5,11,22,252,252,243,207,9,9,9,110,237,245,99,143,61,102,40,
1519 29,137,229,58,147,196,253,96,36,192,143,228,128,221,30,39,106,109,109,197,
1520 74,26,132,163,204,170,222,222,222,152,152,152,200,200,72,50,186,77,38,182,
1521 80,86,86,182,102,205,154,159,126,250,137,221,49,14,69,164,16,229,90,190,
1522 124,57,229,74,77,77,53,172,210,139,29,101,101,101,109,220,184,113,241,226,
1523 197,162,86,51,51,51,181,19,137,190,136,196,28,42,133,101,95,217,217,217,
1524 180,169,239,32,164,116,184,98,81,81,81,20,225,151,95,126,161,20,44,186,
1525 173,43,131,72,131,215,37,55,173,211,249,231,159,255,248,227,143,155,45,
1526 236,182,219,110,203,100,92,228,109,115,39,243,78,169,91,170,133,3,163,99,
1527 80,147,116,12,183,239,212,30,17,8,217,81,124,124,252,138,21,43,22,46,92,
1528 24,17,17,65,205,123,122,227,182,104,101,189,68,163,48,119,36,23,117,69,
1529 109,231,231,231,235,207,161,209,202,73,73,73,52,196,234,213,171,105,8,25,
1530 235,78,117,117,117,76,67,215,174,93,203,97,208,238,235,214,173,43,42,42,
1531 242,126,58,142,54,165,153,216,47,181,193,174,105,241,17,93,241,165,155,
1532 49,120,87,174,92,73,125,82,3,162,147,251,14,66,138,79,253,211,10,28,45,
1533 245,70,233,124,127,59,157,91,16,238,187,239,190,102,163,132,152,239,82,
1534 195,50,167,75,184,74,137,137,137,162,213,24,110,84,157,219,1,50,44,8,245,
1535 162,191,49,66,197,192,161,92,252,192,104,184,237,249,212,149,232,0,122,
1536 137,131,100,85,116,116,52,134,84,180,160,72,239,86,88,197,228,228,100,234,
1537 159,49,78,175,206,205,205,117,187,47,202,37,134,131,94,114,221,230,194,
1538 139,101,131,152,11,250,3,86,142,70,25,187,171,236,254,201,90,32,196,139,
1539 162,247,100,100,100,48,37,151,81,46,189,255,254,251,61,61,61,190,128,144,
1540 89,252,59,239,188,131,197,161,251,238,190,251,238,59,59,181,235,174,187,
1541 50,144,46,190,248,98,134,189,76,231,112,48,216,72,121,200,33,135,200,13,
1542 233,132,131,255,229,151,95,210,135,100,82,231,125,134,215,95,127,61,19,
1543 180,189,246,218,11,247,14,247,98,218,180,105,252,62,234,168,163,94,122,
1544 233,37,205,66,97,217,231,207,159,127,229,149,87,26,74,55,123,246,108,226,
1545 145,118,153,29,83,130,201,251,199,63,254,33,182,201,214,56,78,14,152,227,
1546 196,64,99,62,12,157,239,254,251,239,63,252,240,195,153,27,106,250,221,239,
1547 126,247,246,219,111,83,222,59,239,188,115,207,61,247,252,207,127,254,131,
1548 57,166,140,114,181,78,28,222,140,25,51,200,190,219,110,187,137,195,190,
1549 236,178,203,68,95,164,239,2,3,198,57,133,66,251,236,179,207,45,183,220,
1550 98,54,184,140,162,185,115,231,158,122,234,169,251,237,183,31,148,210,106,
1551 149,197,115,206,57,199,199,139,246,204,160,79,63,253,116,14,149,99,96,95,
1552 228,125,232,161,135,240,174,100,29,233,100,6,33,163,247,214,91,111,165,
1553 174,180,236,148,130,69,142,150,85,50,145,7,81,231,212,158,220,180,75,59,
1554 236,176,131,24,225,127,251,219,223,204,167,76,1,60,25,233,0,88,70,131,206,
1555 60,243,204,138,138,10,177,101,68,74,166,198,7,31,124,48,199,204,129,209,
1556 49,56,182,189,247,222,251,184,227,142,123,253,245,215,53,35,200,49,124,
1557 241,197,23,88,58,185,3,157,46,185,228,18,86,9,84,12,217,173,236,13,52,141,
1558 205,102,163,107,81,70,42,153,109,178,113,170,235,236,179,207,254,236,179,
1559 207,12,29,3,255,64,54,179,78,140,20,118,253,224,131,15,146,107,168,93,119,
1560 217,133,217,58,149,32,0,207,52,241,186,235,174,227,32,57,96,186,4,105,158,
1561 121,230,25,141,253,154,48,202,175,188,242,202,241,199,31,79,175,32,25,135,
1562 33,186,40,189,133,65,7,71,101,58,157,64,224,221,119,223,77,45,209,76,236,
1563 84,212,6,191,57,36,218,218,151,43,14,84,20,253,153,193,75,193,69,95,165,
1564 194,193,137,47,32,4,66,79,61,245,212,17,71,28,65,46,246,203,209,138,122,
1565 163,215,205,155,55,207,203,12,79,19,71,46,183,174,19,123,161,171,48,168,
1566 229,178,75,119,220,113,135,30,177,24,174,71,30,121,132,38,166,98,69,171,
1567 81,105,84,29,199,207,216,209,15,16,6,194,39,159,124,34,183,162,19,71,203,
1568 136,6,255,250,43,133,152,130,171,174,186,138,58,215,122,62,63,88,188,237,
1569 182,219,152,37,200,68,78,81,192,71,31,125,84,116,0,189,56,126,26,235,140,
1570 51,206,16,91,160,5,41,38,6,65,179,69,154,176,6,88,179,35,143,60,146,195,
1571 166,8,162,2,169,121,28,80,208,174,47,44,221,21,123,56,52,30,54,215,231,
1572 159,127,46,83,56,69,79,166,107,105,27,20,93,136,109,138,145,91,80,80,32,
1573 211,141,183,44,7,66,38,146,204,95,48,205,50,202,165,153,51,103,210,204,
1574 222,65,40,208,114,226,137,39,154,183,172,105,202,148,41,140,109,49,199,
1575 124,247,221,119,61,165,196,50,98,56,152,133,145,12,210,188,252,242,203,
1576 94,182,73,98,220,74,198,42,137,41,23,189,193,108,88,137,17,18,215,8,5,87,
1577 24,39,196,200,20,155,139,248,155,110,186,137,93,147,88,136,98,202,117,46,
1578 109,189,245,214,255,247,127,255,71,31,21,27,193,4,112,192,208,81,172,213,
1579 235,217,103,159,53,31,63,21,133,187,240,240,195,15,227,112,203,40,167,216,
1580 26,36,214,59,52,240,149,189,123,58,84,196,42,140,172,91,31,72,19,19,115,
1581 72,44,51,184,68,70,179,129,67,12,21,13,132,24,133,143,63,254,152,1,236,
1582 246,0,136,220,110,187,237,152,155,123,154,141,34,122,14,163,78,102,112,
1583 9,83,34,216,131,65,49,87,14,238,53,171,56,6,185,172,19,70,86,92,35,164,
1584 173,103,205,154,53,117,234,84,185,194,36,142,237,152,99,142,193,90,209,
1585 51,105,74,183,199,143,136,71,24,154,161,99,109,170,72,93,252,206,201,39,
1586 158,232,37,49,224,164,50,53,28,66,98,185,78,39,140,148,249,154,40,197,132,
1587 250,228,61,247,220,115,101,148,75,244,1,208,171,89,58,198,32,254,28,67,
1588 192,211,97,32,218,8,107,174,101,161,153,152,59,98,100,189,28,57,67,3,63,
1589 195,173,123,33,68,23,210,250,179,94,160,197,208,75,145,30,132,212,112,92,
1590 92,28,195,208,203,222,193,9,179,46,239,51,54,142,80,102,208,233,127,255,
1591 251,31,185,64,20,61,77,70,57,197,100,66,43,62,29,6,4,122,217,251,69,23,
1592 93,148,147,147,35,246,126,195,13,55,120,73,201,20,10,47,156,100,204,71,
1593 159,123,238,57,115,193,133,72,137,1,193,140,104,227,142,14,201,196,90,174,
1594 214,233,158,123,238,49,155,5,178,235,167,17,20,132,185,254,239,127,255,
1595 123,79,7,198,97,252,191,255,247,255,180,75,152,195,94,35,132,178,223,126,
1596 251,173,167,97,139,136,103,12,254,240,195,15,102,175,58,240,178,22,8,177,
1597 236,52,6,107,237,118,187,140,114,9,20,13,11,194,188,188,60,166,63,50,214,
1598 179,182,221,118,91,236,23,233,1,161,167,70,66,24,104,184,66,95,252,215,
1599 191,254,229,169,47,234,197,188,143,97,70,185,204,230,94,47,1,66,60,81,195,
1600 160,50,139,105,193,63,255,249,79,38,239,206,194,185,7,33,229,197,28,136,
1601 197,167,159,126,218,19,8,61,9,63,70,203,174,23,77,243,230,155,111,138,253,
1602 226,112,156,118,218,105,114,133,103,81,171,180,154,151,73,183,254,230,183,
1603 97,165,7,225,87,95,125,181,227,142,59,202,21,30,52,121,242,228,39,158,120,
1604 194,147,133,165,81,110,188,241,70,153,212,165,237,183,223,94,56,118,215,
1605 92,115,141,185,27,48,43,103,149,119,16,226,156,185,189,49,216,32,236,26,
1606 237,2,8,229,178,7,13,129,176,175,55,117,217,167,135,29,176,183,140,242,
1607 32,142,22,23,71,59,135,230,22,132,248,187,134,171,212,66,244,228,67,14,
1608 57,196,109,183,167,206,181,25,122,68,68,4,236,145,43,60,139,189,204,159,
1609 63,95,100,97,82,229,118,78,99,16,182,123,205,154,53,34,139,89,179,103,207,
1610 166,35,201,164,195,73,15,66,236,6,216,150,43,60,139,65,234,253,242,191,
1611 23,16,226,235,80,94,25,229,20,100,21,78,21,30,30,189,66,198,122,16,99,10,
1612 22,138,185,23,211,20,25,235,78,199,30,123,44,32,164,51,227,180,13,219,193,
1613 72,128,85,116,30,187,71,16,226,138,201,95,155,11,183,91,123,124,118,221,
1614 186,117,190,84,224,95,254,242,23,97,145,134,5,225,194,133,11,113,94,101,
1615 172,103,225,32,46,95,190,92,100,25,71,89,20,132,47,188,240,130,140,114,
1616 137,152,97,65,232,189,123,233,133,99,78,87,243,5,132,76,226,112,231,101,
1617 148,87,49,44,151,46,93,234,11,8,139,138,138,232,235,114,217,171,48,10,204,
1618 152,196,44,210,12,66,164,175,195,103,158,121,198,19,8,169,88,236,190,92,
1619 216,92,48,198,45,230,255,250,215,191,50,83,67,56,10,230,150,114,171,163,
1620 143,62,90,27,87,102,185,53,172,12,81,183,123,215,64,88,89,89,137,147,33,
1621 99,189,138,250,95,182,108,153,216,151,65,244,156,59,238,184,67,166,211,
1622 233,195,15,63,100,45,238,242,229,38,225,15,177,202,11,8,241,233,175,190,
1623 250,106,25,165,211,62,251,236,35,127,185,68,237,225,42,185,221,148,94,67,
1624 32,108,46,253,219,31,79,247,210,39,53,177,205,199,30,123,76,116,12,183,
1625 32,68,123,238,185,167,252,101,146,167,137,157,118,94,203,124,109,194,147,
1626 78,62,249,100,113,126,5,38,153,143,28,83,43,127,233,116,243,205,55,235,
1627 79,253,105,162,56,76,74,100,34,157,24,5,83,166,76,145,11,58,105,32,228,
1628 0,216,166,47,245,198,228,0,75,162,63,197,103,144,23,16,126,241,197,23,6,
1629 16,254,249,207,127,6,132,45,45,45,84,130,140,242,42,246,254,223,255,254,
1630 151,189,248,2,66,182,140,59,37,163,188,10,222,172,95,191,158,205,122,2,
1631 33,189,197,237,240,231,120,196,132,143,233,62,80,247,165,2,105,136,5,11,
1632 22,144,101,88,16,98,13,100,212,112,186,242,202,43,221,246,135,64,202,162,
1633 32,196,248,202,40,151,134,5,33,131,193,108,49,201,197,76,220,220,185,153,
1634 134,108,220,184,113,229,202,149,255,254,247,191,221,26,232,71,30,121,4,
1635 255,134,238,136,9,147,81,46,225,132,225,122,46,94,188,216,220,111,158,123,
1636 238,57,14,131,174,64,23,49,175,61,241,196,19,95,121,229,149,182,182,182,
1637 85,171,86,153,225,138,223,147,155,155,123,160,233,154,252,5,23,92,32,28,
1638 29,183,32,212,203,19,8,169,85,140,44,131,217,108,77,166,78,157,202,100,
1639 150,25,153,217,123,184,248,226,139,25,30,8,34,202,40,151,24,204,180,133,
1640 249,170,27,18,231,135,205,162,212,28,134,76,228,18,254,104,118,118,118,
1641 70,70,134,217,46,107,32,252,244,211,79,205,46,2,245,140,159,106,54,19,76,
1642 87,197,238,12,98,152,129,13,153,72,39,218,232,189,247,222,243,114,70,215,
1643 11,8,65,190,249,206,23,14,140,146,154,189,207,255,252,231,63,236,133,191,
1644 110,193,112,234,169,167,178,42,41,49,97,83,196,162,195,15,52,246,70,97,
1645 109,49,22,134,30,69,107,138,179,193,110,65,120,217,101,151,209,243,33,189,
1646 92,214,233,156,115,206,161,151,178,71,115,163,211,63,217,32,190,166,185,
1647 206,197,21,104,243,16,195,141,96,178,72,174,59,239,188,83,70,185,4,213,
1648 128,196,235,175,191,46,151,93,186,240,194,11,245,231,252,53,113,84,244,
1649 58,153,72,167,247,223,127,159,233,227,126,251,237,39,151,93,210,64,88,94,
1650 94,126,212,81,71,201,88,151,216,59,117,126,219,109,183,201,101,151,126,
1651 255,251,223,123,105,113,47,32,156,59,119,174,1,39,52,10,77,19,23,23,103,
1652 182,33,15,63,252,48,158,19,45,43,151,93,98,224,183,183,183,127,251,237,
1653 183,79,60,241,132,140,210,9,164,145,241,205,55,223,36,47,220,149,177,46,
1654 49,90,225,22,85,97,56,153,132,33,125,252,241,199,177,18,158,64,136,149,
1655 163,200,216,31,185,236,18,25,197,92,144,206,140,167,46,99,93,98,52,145,
1656 235,186,235,174,147,203,46,221,123,239,189,236,200,59,8,49,68,134,238,74,
1657 99,125,252,241,199,249,249,249,102,36,211,34,91,248,184,218,150,203,138,
1658 32,196,200,222,125,247,221,50,202,165,97,79,141,38,37,37,153,79,160,189,
1659 244,210,75,172,50,95,31,34,37,36,99,21,61,192,237,93,163,140,249,161,163,
1660 116,56,32,162,140,114,233,204,51,207,164,19,208,114,230,139,67,247,221,
1661 119,31,7,73,46,102,124,102,16,10,51,205,136,154,61,123,182,121,45,150,189,
1662 161,161,225,236,179,207,150,203,46,209,129,196,115,66,126,131,240,152,99,
1663 142,193,177,75,73,73,49,91,49,120,195,144,131,118,102,74,225,19,112,60,
1664 77,77,77,199,29,119,156,140,114,9,191,129,82,208,173,229,178,78,158,110,
1665 142,165,198,204,187,56,225,132,19,42,42,42,216,139,217,198,105,32,4,42,
1666 230,186,18,119,18,153,125,47,28,125,183,22,22,125,243,205,55,110,39,197,
1667 147,39,79,134,52,158,110,183,241,2,194,210,210,82,195,156,151,254,140,77,
1668 36,23,46,166,225,152,177,110,194,11,113,123,146,249,255,254,239,255,134,
1669 118,214,214,240,203,199,207,238,60,117,51,159,3,209,169,88,137,45,51,115,
1670 75,92,86,116,11,66,113,162,56,53,53,213,140,180,167,158,122,138,254,64,
1671 133,152,199,203,131,15,62,200,6,241,134,205,83,19,236,50,171,206,59,239,
1672 60,185,236,18,181,33,110,217,48,220,75,66,109,136,231,35,89,43,163,92,162,
1673 147,139,107,96,6,193,117,24,41,19,233,36,158,82,48,123,93,26,8,25,251,230,
1674 98,206,152,49,131,58,103,210,38,151,93,162,31,98,142,157,59,116,35,47,32,
1675 132,79,236,81,70,57,37,78,141,50,87,54,119,45,241,202,27,253,3,127,154,
1676 214,174,93,203,42,12,133,92,214,137,189,107,103,188,205,19,208,93,119,221,
1677 85,84,133,249,156,211,21,87,92,193,80,245,4,66,142,144,92,87,95,125,181,
1678 161,91,210,70,76,83,88,133,87,32,163,116,154,57,115,38,253,4,252,203,101,
1679 151,206,63,255,124,198,172,119,16,206,159,63,223,176,47,156,105,113,163,
1680 34,230,72,70,185,132,201,26,247,187,102,172,5,66,134,31,189,132,249,157,
1681 249,204,12,240,160,207,121,1,33,238,157,185,59,138,11,24,230,201,23,41,
1682 191,254,250,107,86,13,11,66,243,236,158,206,205,68,137,121,153,249,138,
1683 200,13,55,220,64,185,200,229,5,132,244,45,243,241,80,112,12,43,76,162,147,
1684 201,40,157,196,189,206,126,131,144,254,202,78,233,106,230,203,24,56,40,
1685 67,133,116,56,112,145,101,148,75,228,2,3,200,224,164,82,46,81,117,63,254,
1686 248,163,140,210,201,112,207,152,38,183,32,60,233,164,147,24,246,160,11,
1687 128,201,40,151,4,8,49,229,127,252,227,31,101,148,78,140,91,182,105,190,
1688 30,76,1,161,130,216,163,65,204,51,220,218,56,68,137,40,254,107,175,189,
1689 102,118,20,56,6,153,72,39,1,66,26,197,188,65,38,236,88,204,231,159,127,
1690 158,190,205,102,53,49,137,166,247,178,65,183,182,131,233,252,208,206,170,
1691 139,254,247,217,71,147,77,87,142,233,45,172,196,33,51,87,160,184,142,235,
1692 22,132,164,167,246,112,208,205,151,162,95,125,245,85,86,45,90,180,200,124,
1693 90,130,227,100,131,95,125,245,149,121,95,226,228,27,61,92,46,187,132,117,
1694 22,171,46,184,224,2,25,229,18,94,56,59,98,6,38,107,193,37,42,193,237,41,
1695 116,79,32,20,103,137,152,128,202,101,151,52,16,174,90,181,74,70,233,196,
1696 42,246,206,4,90,46,235,180,112,225,66,231,14,221,200,109,39,161,66,56,96,
1697 198,175,92,118,233,166,155,110,130,181,180,130,217,148,125,247,221,119,
1698 108,13,152,81,94,25,229,210,188,121,243,88,229,22,132,71,28,113,132,86,
1699 51,102,187,196,160,16,51,45,92,40,25,229,18,137,153,83,122,2,161,48,131,
1700 56,199,134,131,225,176,167,79,159,206,42,183,99,249,157,119,222,161,2,127,
1701 248,225,7,185,236,210,177,199,30,203,176,245,14,194,183,222,122,203,176,
1702 47,220,134,244,244,116,86,153,155,152,225,159,149,149,197,170,113,148,181,
1703 64,136,48,205,230,137,42,41,105,203,62,175,207,17,126,255,253,247,230,49,
1704 255,165,115,42,196,124,92,46,187,36,252,116,86,13,11,194,203,46,187,76,
1705 70,185,132,105,134,88,100,52,115,229,242,203,47,199,187,34,151,23,16,82,
1706 10,230,248,50,202,37,1,194,150,150,22,183,32,204,118,62,230,229,5,132,7,
1707 31,124,48,174,198,71,31,125,228,22,132,167,159,126,186,39,16,210,5,135,
1708 10,233,112,152,157,69,122,57,211,118,186,187,153,145,98,36,227,82,200,101,
1709 157,180,43,4,6,249,7,194,206,206,206,115,206,57,71,70,233,180,124,249,114,
1710 236,136,217,35,220,101,151,93,196,148,217,173,222,125,247,93,47,119,120,
1711 226,111,49,193,55,220,143,238,5,132,149,149,149,230,115,77,244,13,188,141,
1712 5,11,22,220,185,185,240,15,196,85,16,179,199,143,112,209,196,238,240,186,
1713 204,181,244,192,3,15,80,88,188,70,179,71,40,30,64,116,11,66,182,233,9,132,
1714 204,244,89,181,116,233,82,115,203,222,125,247,221,108,240,237,183,223,54,
1715 239,235,219,111,191,165,111,83,69,114,217,37,104,42,110,118,48,51,18,139,
1716 9,195,232,216,212,192,45,183,220,114,221,117,215,221,113,199,29,252,126,
1717 233,165,151,24,65,67,5,222,92,158,64,24,19,19,195,90,47,32,196,56,200,40,
1718 157,152,58,211,127,204,119,27,32,106,192,185,67,55,114,11,194,61,157,143,
1719 130,200,5,157,48,71,128,208,237,35,170,56,145,108,205,45,8,63,249,228,19,
1720 86,209,166,230,74,62,234,168,163,52,16,154,31,235,218,109,183,221,232,222,
1721 116,164,35,143,60,82,70,185,196,164,144,177,239,9,132,226,66,224,237,183,
1722 223,110,6,33,179,34,86,49,127,149,81,58,121,2,33,227,14,243,232,29,132,
1723 207,61,247,156,92,118,137,161,151,156,156,204,42,179,147,195,6,153,45,177,
1724 106,28,101,57,16,186,213,180,105,211,34,34,34,176,230,94,64,136,17,49,156,
1725 184,64,248,245,212,190,217,117,0,60,140,19,114,13,11,66,243,89,126,1,66,
1726 183,179,102,204,156,56,141,233,5,132,140,28,179,151,233,29,132,226,194,
1727 155,91,16,82,51,204,121,33,37,68,97,215,110,65,248,135,63,252,193,19,8,
1728 241,246,134,10,233,14,132,224,19,16,82,63,230,102,2,132,108,208,237,237,
1729 39,226,94,0,179,252,3,33,150,209,108,254,16,246,2,240,83,105,114,217,37,
1730 44,251,202,149,43,229,46,77,162,230,63,251,236,51,115,73,245,58,244,208,
1731 67,33,4,227,95,100,241,2,66,26,203,237,137,175,227,142,59,14,143,89,248,
1732 127,102,153,159,91,64,79,63,253,180,88,139,137,52,119,27,172,48,133,221,
1733 123,239,189,205,171,104,2,114,141,20,132,51,102,204,240,4,66,40,197,6,177,
1734 236,102,27,77,161,126,254,249,103,243,13,56,76,91,133,131,229,22,57,116,
1735 48,124,14,90,57,53,53,149,89,63,221,102,168,156,30,228,55,8,153,103,200,
1736 40,157,152,29,210,243,221,222,9,137,153,118,238,208,141,60,157,54,112,43,
1737 38,7,116,42,183,70,201,11,8,197,101,57,64,104,30,17,199,28,115,140,184,
1738 171,28,49,4,100,172,75,164,39,1,248,49,183,233,126,251,237,151,151,151,
1739 231,9,132,226,130,133,91,16,98,61,88,229,246,50,135,0,225,138,21,43,152,
1740 208,8,177,119,132,63,58,44,8,31,122,232,33,185,236,210,148,41,83,146,146,
1741 146,18,19,19,205,231,33,0,188,240,116,199,81,193,1,66,58,52,99,201,59,8,
1742 89,203,54,53,181,182,182,130,150,57,115,230,28,113,196,17,230,190,72,151,
1743 194,28,144,107,88,16,98,209,228,22,187,186,152,96,210,252,76,114,153,222,
1744 154,161,139,56,78,6,51,185,188,131,208,124,253,217,59,8,49,34,100,116,11,
1745 66,34,245,147,107,183,32,164,128,158,64,184,255,254,251,139,140,102,60,
1746 96,124,41,236,224,224,160,44,188,83,148,174,162,162,130,9,56,99,192,108,
1747 43,209,99,143,61,38,54,104,144,127,32,164,17,221,130,208,147,152,117,98,
1748 223,229,46,221,73,0,128,221,121,233,123,76,155,180,19,53,94,64,200,90,122,
1749 163,219,74,160,164,120,78,244,19,58,140,216,142,38,243,249,67,164,205,30,
1750 220,130,208,139,232,102,228,26,41,8,95,123,237,53,79,32,252,231,63,255,
1751 201,6,241,57,100,123,119,117,37,36,36,48,22,138,139,139,241,162,204,46,
1752 56,154,60,121,50,19,35,42,138,13,154,247,133,168,162,227,143,63,254,173,
1753 183,222,98,74,42,220,98,79,26,93,16,122,145,188,40,235,78,190,131,16,195,
1754 130,247,79,137,204,15,61,35,47,32,20,199,12,8,205,54,132,89,148,23,16,122,
1755 17,137,115,114,114,104,47,183,32,20,131,194,45,8,197,93,20,94,64,136,176,
1756 129,6,97,22,188,131,16,43,39,250,143,16,99,156,186,122,254,249,231,221,
1757 78,67,241,182,69,19,143,163,172,14,66,134,25,243,110,241,116,179,119,16,
1758 106,98,56,253,242,203,47,143,60,242,8,61,85,166,48,201,119,16,106,162,159,
1759 209,198,151,95,126,185,151,211,107,1,6,33,21,248,204,51,207,12,29,156,75,
1760 110,65,8,111,60,129,80,187,70,104,62,243,35,64,40,214,34,122,255,154,53,
1761 107,48,175,108,205,140,52,77,227,11,66,188,147,31,127,252,81,238,210,179,
1762 168,207,123,239,189,215,203,189,233,116,9,218,130,148,222,65,200,28,220,
1763 173,225,22,218,97,135,29,152,48,25,78,213,186,189,228,137,129,16,107,71,
1764 10,194,43,175,188,146,92,94,64,72,73,205,214,86,92,35,116,11,194,219,110,
1765 187,77,28,137,16,77,67,159,191,230,154,107,204,119,51,105,98,132,126,241,
1766 197,23,204,232,217,215,141,55,222,232,118,102,32,68,223,94,180,104,17,93,
1767 81,110,221,164,128,129,80,92,10,117,43,95,64,200,184,99,164,47,88,176,0,
1768 30,108,9,8,169,58,25,229,18,206,150,54,232,70,4,66,58,51,221,0,163,234,
1769 22,132,226,198,64,51,8,89,196,143,103,149,23,16,58,143,197,141,188,131,
1770 80,19,201,240,155,57,42,183,179,40,33,5,66,35,8,177,149,135,31,126,56,38,
1771 24,248,93,123,237,181,143,62,250,40,8,20,143,160,162,97,65,72,191,140,141,
1772 141,61,251,236,179,169,89,239,148,213,64,200,252,139,62,45,99,117,210,131,
1773 144,182,164,187,224,60,153,207,197,25,116,234,169,167,6,18,132,24,29,113,
1774 102,67,147,91,16,158,112,194,9,158,64,184,247,222,123,139,140,102,155,72,
1775 181,104,147,83,14,224,134,27,110,216,109,183,221,134,157,187,140,47,8,97,
1776 143,48,64,195,10,95,237,235,175,191,118,123,225,71,72,156,77,242,14,66,
1777 68,21,185,125,154,80,136,62,64,65,244,175,33,118,123,54,85,24,35,52,82,
1778 16,94,116,209,69,228,242,14,66,243,237,148,244,25,79,32,196,96,137,35,161,
1779 195,252,244,211,79,52,16,115,11,239,135,180,253,246,219,99,233,146,146,
1780 146,104,44,134,170,151,215,38,176,29,42,220,211,201,115,20,48,16,222,117,
1781 215,93,206,29,186,145,91,16,30,124,240,193,204,141,168,109,198,224,3,15,
1782 60,176,106,213,42,250,173,72,191,37,32,52,60,149,136,78,60,241,68,255,64,
1783 72,51,165,167,167,123,2,161,56,119,125,235,173,183,26,14,134,69,155,205,
1784 198,170,177,0,33,83,231,175,190,250,234,232,163,143,118,251,12,168,94,10,
1785 132,70,171,10,15,162,162,162,168,125,33,192,38,83,59,53,44,8,233,124,134,
1786 27,109,216,5,0,51,179,1,163,252,218,107,175,145,5,67,6,119,101,172,78,26,
1787 8,113,25,207,58,235,44,67,7,162,105,233,4,230,46,206,104,9,36,8,41,133,
1788 184,214,173,201,45,8,143,63,254,120,79,32,36,70,100,52,119,86,160,78,229,
1789 208,4,32,129,49,105,40,14,25,177,11,114,65,39,79,39,157,70,23,132,107,215,
1790 174,165,68,8,51,100,144,161,207,104,98,47,212,128,65,155,54,109,250,243,
1791 159,255,236,118,126,35,238,228,28,22,132,136,86,19,243,36,79,206,16,19,
1792 136,117,235,214,137,3,187,236,178,203,204,29,67,156,158,66,110,65,248,175,
1793 127,253,203,83,97,137,36,151,23,16,166,164,164,152,75,199,238,88,229,22,
1794 132,55,223,124,179,56,146,55,223,124,211,80,28,22,15,60,240,64,243,211,
1795 102,184,53,76,41,216,81,123,123,123,101,101,37,7,243,225,135,31,30,114,
1796 200,33,230,230,22,226,120,94,127,253,117,14,64,236,72,175,209,5,225,251,
1797 239,191,47,170,72,212,149,94,162,222,220,202,45,8,191,251,238,59,178,12,
1798 153,36,147,81,98,107,126,131,208,60,232,24,17,94,64,72,229,111,220,184,
1799 145,35,113,43,14,204,19,8,197,105,18,243,59,7,88,20,103,35,198,2,132,255,
1800 249,207,127,12,187,99,78,118,220,113,199,153,207,168,225,206,138,27,131,
1801 199,81,150,3,161,151,26,161,177,189,128,144,65,200,196,77,70,185,180,223,
1802 126,251,49,87,165,59,202,101,151,24,213,2,33,158,154,83,3,33,189,214,112,
1803 156,12,191,183,222,122,11,110,153,79,58,49,161,11,36,8,201,101,56,17,225,
1804 22,132,199,30,123,44,85,135,221,247,2,66,243,228,84,128,16,235,118,249,
1805 229,151,203,40,151,14,56,224,0,44,251,130,5,11,228,178,78,250,15,41,232,
1806 53,186,32,100,182,196,54,151,45,91,118,207,230,122,232,161,135,196,157,
1807 105,6,49,158,103,205,154,5,171,12,162,207,224,196,92,105,122,67,58,18,103,
1808 29,125,1,161,80,90,90,26,54,197,211,187,172,232,15,24,62,146,185,125,145,
1809 166,0,97,122,69,250,243,51,158,55,175,21,72,46,46,46,134,136,178,156,46,
1810 137,27,190,188,131,208,92,237,96,155,85,110,65,136,223,207,6,243,242,242,
1811 204,190,242,225,135,31,206,216,52,223,40,43,174,17,82,252,142,142,14,90,
1812 51,33,33,33,35,35,131,201,19,123,49,119,69,161,19,78,56,193,124,233,1,141,
1813 46,8,49,238,20,19,63,233,145,71,30,145,245,229,146,120,254,199,173,220,
1814 130,16,170,121,154,96,109,9,8,205,183,141,120,7,225,238,187,239,46,190,
1815 76,178,124,249,242,251,55,215,255,251,127,255,143,206,236,29,132,230,71,
1816 114,89,124,246,217,103,89,229,5,132,216,37,187,221,254,196,19,79,80,76,
1817 77,140,11,239,32,164,63,24,30,102,99,95,140,169,186,186,58,243,96,167,31,
1818 138,17,61,142,10,29,16,174,95,191,222,252,28,33,93,132,182,188,245,214,
1819 91,229,178,75,128,80,188,68,131,230,116,107,106,181,129,106,62,213,115,
1820 212,81,71,193,27,186,157,121,106,163,189,180,34,96,32,20,47,77,213,228,
1821 22,132,71,31,125,244,176,32,52,223,230,32,64,8,39,204,247,220,62,252,240,
1822 195,12,99,183,32,196,88,139,13,26,52,186,32,20,157,196,124,219,58,150,197,
1823 237,91,214,232,3,110,239,113,47,119,126,86,240,243,207,63,55,159,63,196,
1824 185,39,151,239,32,68,180,44,224,113,251,17,124,134,186,152,33,225,128,154,
1825 59,134,0,225,146,180,37,15,62,247,160,121,45,51,107,214,98,1,205,221,251,
1826 218,107,175,101,149,23,16,50,45,48,143,50,1,194,37,75,150,152,65,72,191,
1827 101,131,56,64,230,198,162,2,233,69,230,7,234,233,57,226,230,73,80,193,102,
1828 233,24,8,60,16,3,80,111,185,229,22,115,137,240,132,12,143,169,8,141,5,8,
1829 127,250,233,39,243,197,96,204,136,115,135,110,20,72,16,154,15,204,59,8,
1830 137,17,245,102,126,56,146,85,217,217,217,222,65,104,54,74,44,138,155,12,
1831 230,204,153,35,163,116,18,32,76,76,76,220,119,223,125,233,69,154,176,123,
1832 69,69,69,222,65,248,225,135,31,26,246,69,63,249,234,171,175,88,117,140,
1833 233,129,122,134,173,184,11,100,28,21,58,32,92,184,112,161,249,226,243,103,
1834 159,125,198,170,7,30,120,64,46,187,196,174,133,245,97,134,226,246,181,138,
1835 26,8,13,239,203,64,23,92,112,1,182,27,11,110,238,169,56,254,190,128,144,
1836 181,50,202,37,239,32,196,210,145,209,111,143,240,200,35,143,28,22,132,102,
1837 18,8,16,82,63,230,27,189,24,54,216,5,183,32,100,230,33,54,104,144,127,32,
1838 244,244,28,161,232,36,211,167,79,151,203,46,97,217,221,62,62,193,120,54,
1839 219,14,36,64,200,32,116,123,219,2,46,142,23,16,82,57,230,171,203,17,17,
1840 17,228,98,242,100,238,219,180,47,251,114,107,25,53,16,62,252,226,195,230,
1841 243,171,226,225,138,184,184,56,51,8,135,125,124,34,41,41,201,188,59,1,194,
1842 197,139,23,155,65,120,205,53,215,176,193,247,222,123,207,124,24,226,229,
1843 171,120,180,114,217,37,12,220,55,223,124,195,42,243,227,52,226,200,217,
1844 26,29,85,70,185,164,255,26,154,38,191,65,232,246,57,66,1,194,21,43,86,152,
1845 221,244,145,62,62,49,186,32,228,192,88,5,8,205,7,166,7,161,249,57,66,13,
1846 132,76,226,101,148,75,251,239,191,191,151,199,39,4,8,153,54,25,14,134,69,
1847 209,70,110,159,9,22,32,100,22,110,184,85,10,46,98,30,189,131,144,62,38,
1848 151,93,98,246,147,144,144,192,42,243,165,40,200,202,192,97,213,56,42,116,
1849 64,200,96,48,187,53,68,178,10,163,32,151,93,98,215,52,21,171,240,120,204,
1850 147,92,164,129,208,124,155,223,197,23,95,12,177,176,131,230,71,148,152,
1851 236,12,11,66,70,142,249,5,114,222,65,8,45,200,104,6,33,104,17,183,252,104,
1852 114,11,66,98,134,5,161,153,82,2,132,116,119,179,185,20,51,59,102,30,230,
1853 50,222,115,207,61,98,131,6,249,7,66,14,219,237,149,72,209,73,102,207,158,
1854 45,151,93,194,178,184,61,199,130,21,99,124,202,68,58,81,39,172,101,168,
1855 251,1,66,86,153,31,10,20,247,136,82,63,134,107,213,40,35,35,131,85,110,
1856 59,134,6,194,199,94,123,108,219,73,198,25,137,48,85,32,205,12,66,76,48,
1857 171,188,131,80,46,235,36,64,72,243,153,79,205,93,125,245,213,108,208,124,
1858 129,16,137,215,199,152,31,129,133,70,226,76,227,255,251,127,255,79,70,185,
1859 36,188,13,42,217,124,211,41,24,54,163,197,111,16,46,95,190,92,70,233,36,
1860 64,184,102,205,26,243,117,77,76,188,115,135,110,52,82,16,178,11,243,139,
1861 145,145,23,16,126,255,253,247,172,234,233,233,49,223,72,169,7,161,249,149,
1862 114,26,8,25,245,50,202,37,198,56,94,154,119,16,98,64,12,7,195,34,253,132,
1863 85,76,23,100,148,78,2,132,233,233,233,6,67,71,21,85,86,86,122,7,33,157,
1864 86,46,187,4,237,196,155,101,204,22,21,70,138,119,69,141,163,66,28,132,226,
1865 5,137,143,62,250,168,92,118,137,93,139,219,165,154,154,154,220,222,209,
1866 46,230,239,200,188,150,177,74,46,32,97,30,222,71,29,117,212,176,32,164,
1867 20,230,247,31,34,24,198,102,205,14,16,54,26,118,146,209,45,8,197,27,146,
1868 52,185,5,225,225,135,31,62,186,32,252,244,211,79,177,11,230,87,78,32,241,
1869 68,182,89,110,65,8,108,42,42,42,0,33,243,89,25,229,146,0,33,25,111,112,
1870 247,229,54,241,106,208,87,95,125,85,46,187,68,113,4,111,204,114,123,254,
1871 83,204,67,113,34,205,61,7,51,68,165,121,1,97,115,115,179,185,111,8,183,
1872 9,75,103,56,109,78,17,240,173,89,101,190,133,29,105,32,124,246,221,103,
1873 119,152,98,188,88,11,96,88,203,184,48,131,80,24,29,255,64,136,67,111,6,
1874 225,223,254,246,55,54,56,107,214,44,51,8,197,123,77,241,42,228,178,75,212,
1875 170,120,211,144,249,101,34,79,60,241,4,253,4,3,109,112,110,24,125,110,13,
1876 159,39,16,138,230,54,251,223,26,8,211,210,210,204,198,68,216,113,24,105,
1877 190,222,41,192,224,86,35,5,33,98,71,230,190,45,222,53,248,167,63,253,201,
1878 220,220,98,174,6,8,205,247,52,232,65,104,30,239,16,93,228,53,159,231,167,
1879 187,122,121,197,154,40,175,153,202,44,138,23,248,101,101,101,153,143,243,
1880 229,151,95,198,242,36,39,39,227,2,202,40,167,56,72,97,25,188,128,144,57,
1881 144,92,118,9,218,209,27,89,101,158,235,51,107,244,242,66,168,192,40,116,
1882 64,184,100,201,18,243,188,158,246,96,94,111,30,189,180,186,56,61,2,123,
1883 220,190,240,158,173,177,59,18,208,123,100,148,75,39,156,112,2,152,164,235,
1884 152,175,17,2,33,188,58,114,121,1,33,35,138,185,170,121,45,123,100,158,69,
1885 39,147,203,46,129,70,198,51,25,221,130,80,92,233,212,228,22,132,135,30,
1886 122,168,223,32,196,124,155,115,49,221,99,24,207,156,57,83,46,235,228,9,
1887 132,96,195,188,11,6,54,51,92,106,210,108,226,53,16,2,9,115,70,124,65,240,
1888 105,190,212,122,228,145,71,106,15,219,24,228,214,32,222,122,235,173,107,
1889 215,174,189,233,166,155,204,118,159,118,39,151,23,16,118,119,119,155,31,
1890 156,160,78,176,29,120,84,6,178,146,69,92,35,188,227,142,59,204,77,47,222,
1891 68,186,56,117,241,27,223,190,177,219,158,70,247,5,56,209,135,231,204,153,
1892 131,221,151,81,46,137,19,140,254,129,144,121,140,185,3,139,82,211,63,205,
1893 117,254,222,123,239,209,183,205,231,181,0,225,151,206,23,25,126,98,250,
1894 228,250,205,55,223,220,222,222,142,63,103,168,249,105,211,166,37,38,38,
1895 146,197,32,138,233,118,86,250,216,99,143,209,220,230,19,48,26,8,233,246,
1896 230,89,41,185,104,35,186,138,161,119,97,118,197,231,50,220,202,15,16,50,
1897 5,55,159,0,184,239,190,251,40,142,25,21,76,62,68,23,165,197,25,152,50,214,
1898 37,208,152,157,45,63,185,108,62,243,143,125,99,102,79,161,232,177,50,202,
1899 37,108,11,173,227,29,132,164,49,244,61,22,197,73,5,183,147,209,107,174,
1900 185,6,243,200,44,199,80,129,140,26,154,213,59,8,205,147,84,54,178,104,209,
1901 34,118,100,174,225,29,118,216,65,156,111,24,71,133,14,8,99,99,99,205,183,
1902 62,98,79,25,186,230,110,74,15,16,207,51,225,192,153,175,2,34,186,197,89,
1903 103,157,133,123,97,190,190,136,141,99,254,101,190,228,139,240,189,134,5,
1904 33,98,90,199,129,201,88,151,24,3,116,44,51,203,177,47,98,16,154,65,136,
1905 249,22,206,132,38,183,32,100,203,126,131,144,142,107,254,174,216,238,187,
1906 239,206,180,206,48,79,20,242,4,66,198,182,249,12,21,29,224,148,83,78,113,
1907 251,221,50,13,132,28,182,25,147,108,234,196,19,79,52,55,183,151,107,63,
1908 212,140,249,174,31,132,141,54,151,29,189,253,246,219,228,242,2,66,214,62,
1909 255,252,243,244,88,25,235,212,222,123,239,125,222,121,231,153,63,202,67,
1910 219,97,191,200,130,123,103,238,246,28,3,77,127,203,61,183,196,101,197,157,
1911 119,225,121,134,158,67,49,113,134,48,244,134,120,178,136,109,250,7,66,179,
1912 219,138,174,186,234,42,58,48,6,203,92,39,28,0,141,101,40,47,34,70,120,63,
1913 216,50,195,64,219,121,231,157,169,13,243,123,45,142,63,254,120,81,129,6,
1914 113,84,230,121,39,18,163,216,188,107,13,132,76,50,204,47,65,165,147,80,
1915 69,123,238,185,167,161,222,152,190,152,223,248,163,201,15,16,82,255,102,
1916 72,51,144,105,53,115,23,213,30,97,236,237,237,253,189,233,221,217,84,251,
1917 177,199,30,123,249,229,151,167,164,164,84,87,87,27,46,34,210,115,56,188,
1918 211,79,63,29,239,74,70,57,69,61,188,255,254,251,28,161,119,16,98,232,12,
1919 85,193,226,163,143,62,202,42,42,4,236,201,88,151,68,199,51,156,191,165,
1920 137,191,251,238,59,246,229,29,132,95,125,245,149,97,95,28,60,3,144,97,107,
1921 136,71,12,112,79,159,127,9,152,66,7,132,152,108,51,93,132,204,67,8,137,
1922 11,24,108,243,254,251,239,55,183,141,16,7,195,236,216,124,156,66,230,120,
1923 166,120,190,128,16,247,8,144,120,218,169,38,18,92,122,233,165,94,78,149,
1924 0,66,113,165,83,147,91,16,30,116,208,65,20,115,211,166,77,126,128,144,169,
1925 159,249,254,8,47,242,4,66,132,103,35,19,249,32,13,132,12,57,220,44,243,
1926 89,77,131,168,43,156,105,1,6,183,98,59,76,125,204,78,149,91,81,99,226,186,
1927 172,119,16,226,235,184,157,13,24,68,221,126,244,209,71,98,154,255,245,215,
1928 95,187,229,46,194,148,115,144,224,196,96,230,220,138,52,218,36,218,63,16,
1929 98,206,204,59,186,248,226,139,241,213,114,115,115,205,115,71,33,243,80,
1930 162,19,50,87,195,15,102,176,156,112,194,9,190,244,234,27,111,188,145,225,
1931 47,14,222,160,23,95,124,209,237,104,117,43,13,132,104,217,178,101,94,62,
1932 68,172,137,52,222,47,71,249,1,66,86,61,252,240,195,190,20,156,250,169,116,
1933 125,120,143,33,233,22,90,136,137,17,141,75,27,209,99,205,231,42,204,98,
1934 82,46,222,179,232,29,132,230,243,180,44,10,16,162,149,43,87,122,178,159,
1935 122,157,115,206,57,226,234,143,119,16,186,253,200,168,144,185,255,51,105,
1936 16,159,166,26,71,133,14,8,209,140,25,51,204,23,123,112,95,204,8,65,226,
1937 174,116,148,144,144,96,126,58,74,136,131,41,43,43,115,235,178,224,20,154,
1938 207,198,28,114,200,33,190,128,16,165,165,165,185,189,28,162,23,211,49,241,
1939 224,132,144,185,20,84,160,246,118,46,33,47,32,204,203,203,243,3,132,140,
1940 198,79,63,253,212,108,22,217,53,254,129,185,5,189,128,48,50,50,210,45,54,
1941 220,62,32,161,129,16,129,55,218,221,60,185,214,196,97,48,38,105,71,47,214,
1942 10,245,244,244,192,0,179,99,170,23,118,135,130,107,182,210,59,8,209,234,
1943 213,171,241,111,228,10,15,186,253,246,219,181,19,182,76,215,152,88,184,
1944 181,110,128,16,156,212,213,213,113,144,7,30,120,160,23,195,138,163,48,123,
1945 246,108,141,250,254,129,112,254,252,249,102,16,210,39,241,69,168,168,71,
1946 30,121,196,124,144,248,61,230,11,60,36,155,53,107,22,221,30,124,82,111,
1947 248,43,114,133,7,177,5,38,16,28,0,115,172,142,142,14,67,147,81,177,110,
1948 251,3,99,208,60,180,245,32,68,248,184,230,147,141,122,209,112,120,78,148,
1949 78,102,112,39,63,64,136,232,39,120,84,230,35,212,11,127,104,249,242,229,
1950 20,92,100,97,131,63,255,252,179,121,72,34,1,66,210,224,20,222,118,219,109,
1951 94,88,200,170,179,206,58,139,38,19,219,244,14,66,243,131,61,122,16,210,
1952 157,222,126,251,109,47,19,59,38,163,248,247,204,167,69,122,239,32,68,110,
1953 159,156,57,252,240,195,205,185,168,183,53,107,214,136,92,227,165,144,2,
1954 33,67,139,129,161,191,221,127,167,157,118,98,14,238,246,59,221,26,8,17,
1955 180,163,67,48,95,195,226,235,187,29,7,195,78,177,224,250,171,65,28,54,139,
1956 233,233,233,230,51,27,190,131,16,225,115,188,254,250,235,102,154,34,138,
1957 128,181,210,238,92,21,114,11,66,195,201,64,47,32,204,201,201,49,79,153,
1958 135,5,33,171,58,59,59,191,252,242,75,189,185,167,86,153,185,187,253,238,
1959 149,23,16,98,229,241,66,244,166,10,67,252,244,211,79,99,199,205,39,132,
1960 245,32,68,88,76,144,115,229,149,87,154,79,147,82,168,39,158,120,130,137,
1961 182,102,98,188,168,183,183,23,215,129,134,144,153,55,23,21,5,63,104,23,
1962 109,83,195,130,16,97,26,30,123,236,49,179,9,166,117,112,82,191,248,226,
1963 139,166,166,38,153,212,41,106,245,205,55,223,60,251,236,179,41,163,190,
1964 179,253,249,207,127,206,206,206,142,136,136,192,40,124,245,213,87,119,223,
1965 125,183,249,174,66,42,156,100,224,77,239,251,250,7,66,183,31,230,165,134,
1966 217,26,168,128,220,36,211,159,59,229,104,23,47,94,124,215,93,119,201,101,
1967 151,40,2,221,152,244,128,80,248,133,76,206,142,61,246,88,115,255,135,238,
1968 240,187,162,162,130,233,29,13,193,15,90,205,12,152,210,210,82,124,23,125,
1969 205,92,114,201,37,20,196,108,163,13,32,68,89,89,89,15,62,248,160,249,129,
1970 31,140,248,117,215,93,39,246,43,147,122,144,127,32,68,12,252,207,63,255,
1971 220,252,161,124,180,243,206,59,115,84,140,77,134,161,76,237,20,7,195,212,
1972 129,42,61,242,200,35,245,243,60,13,132,8,87,143,30,203,236,193,236,96,77,
1973 155,54,13,151,145,106,212,142,205,59,8,205,55,67,232,65,136,104,190,228,
1974 228,100,38,100,230,19,48,180,29,132,19,6,65,104,88,16,114,96,255,247,127,
1975 255,167,63,7,67,49,99,99,99,205,143,217,132,53,8,17,221,194,44,239,29,142,
1976 1,44,211,233,164,183,128,100,103,76,174,88,177,226,221,119,223,157,55,111,
1977 30,83,42,98,16,134,195,32,90,93,230,113,138,52,98,227,196,211,159,176,254,
1978 72,219,50,63,24,69,115,231,206,125,231,157,119,24,234,164,33,61,246,66,
1979 110,75,39,45,189,56,54,189,244,199,41,196,70,136,103,66,135,185,196,70,
1980 188,246,218,107,88,64,230,203,140,16,86,201,68,46,185,221,157,161,20,136,
1981 188,114,157,78,98,149,121,11,218,236,88,46,235,164,55,25,28,12,181,177,
1982 118,237,90,14,242,179,207,62,131,208,162,186,100,82,157,204,101,212,75,
1983 228,194,158,50,49,199,16,99,242,68,49,69,253,24,36,178,232,69,94,134,226,
1984 79,63,253,244,241,199,31,51,222,112,85,161,99,91,91,155,185,174,188,139,
1985 237,48,45,120,235,173,183,152,12,97,134,30,126,248,225,233,211,167,179,
1986 89,179,131,130,228,209,184,212,211,211,159,95,220,159,150,231,208,135,212,
1987 220,193,164,172,190,255,45,78,123,253,173,31,30,123,230,237,255,123,114,
1988 214,203,51,190,254,250,199,196,148,156,129,212,188,65,67,98,2,233,89,149,
1989 156,211,159,156,221,31,159,222,29,155,214,73,72,76,46,166,134,53,97,26,
1990 18,83,235,62,251,38,242,133,215,190,124,228,201,55,159,122,238,253,153,
1991 111,255,248,203,218,18,50,26,182,70,96,35,134,144,156,221,71,60,59,50,196,
1992 19,234,26,134,218,136,178,200,54,211,137,86,22,32,36,1,85,129,45,163,195,
1993 207,156,57,147,153,80,92,92,28,248,103,150,80,84,84,4,243,168,118,176,205,
1994 68,1,204,243,67,3,97,94,94,30,131,142,26,230,7,243,30,38,106,175,190,250,
1995 234,71,31,125,196,100,84,140,26,246,75,135,167,119,149,151,151,187,5,33,
1996 34,37,19,130,57,115,230,208,196,105,105,105,162,83,57,171,223,40,115,118,
1997 98,200,30,21,21,5,150,102,204,152,65,79,3,3,236,75,108,100,88,145,76,110,
1998 90,39,183,7,105,22,201,200,206,196,232,219,111,191,165,222,216,59,131,133,
1999 46,218,218,218,234,101,11,100,17,59,229,176,157,86,103,72,44,202,213,78,
2000 145,128,202,167,32,212,9,91,198,92,172,91,183,142,246,50,111,150,141,136,
2001 166,212,75,36,115,107,25,72,47,50,106,98,95,140,142,165,75,151,210,106,
2002 88,36,140,222,134,13,27,200,107,222,151,56,108,131,244,201,248,93,92,92,
2003 188,96,193,2,124,205,69,139,22,137,251,197,200,37,247,173,19,145,34,203,
2004 120,105,60,65,168,164,20,116,194,64,197,231,56,22,68,141,126,88,177,161,
2005 68,50,208,165,149,235,51,13,105,70,37,84,12,61,199,225,94,24,50,13,132,
2006 66,224,13,200,65,187,140,140,12,216,134,203,133,115,150,144,144,208,216,
2007 216,8,17,197,170,252,252,124,108,61,214,19,11,142,75,33,174,87,161,246,
2008 246,118,166,143,76,43,73,67,188,48,118,236,2,16,98,251,176,236,122,111,
2009 70,73,105,28,165,64,168,164,52,2,141,29,8,87,174,207,151,0,116,233,151,
2010 141,181,134,52,163,18,124,1,33,30,0,168,3,93,117,117,117,48,12,248,1,45,
2011 188,7,225,201,137,179,124,120,135,184,107,172,194,77,103,21,200,36,37,98,
2012 149,216,26,32,76,76,76,36,13,34,13,14,55,188,100,155,208,20,172,194,72,
2013 60,66,216,41,238,75,82,82,26,71,41,16,42,41,141,64,56,48,109,237,142,198,
2014 230,209,15,245,13,29,145,145,145,146,129,107,215,198,197,197,85,84,245,
2015 24,210,140,74,232,115,115,214,89,10,255,76,156,31,6,120,240,9,188,193,45,
2016 252,57,164,225,77,156,97,227,7,49,56,127,240,82,172,34,18,7,17,176,57,83,
2017 13,9,16,194,188,218,218,90,146,137,109,138,140,164,33,37,80,36,134,93,136,
2018 51,102,74,74,227,40,5,66,37,37,171,8,54,20,21,21,109,216,176,33,63,63,95,
2019 48,99,188,4,255,56,128,45,60,111,41,64,104,190,10,165,164,100,53,41,16,
2020 42,41,89,72,93,93,93,209,209,209,250,171,116,193,43,56,170,249,145,74,74,
2021 86,150,2,161,146,146,37,84,209,84,81,222,84,94,88,83,184,54,110,109,113,
2022 93,49,191,219,187,218,229,58,37,37,165,177,148,2,161,146,146,37,180,36,
2023 109,201,130,228,5,250,80,92,85,44,215,41,41,41,141,165,20,8,149,148,44,
2024 33,5,66,37,165,241,146,2,161,146,146,37,100,125,16,246,244,244,148,151,
2025 151,235,223,188,131,250,251,251,43,43,43,137,23,55,197,180,181,181,21,23,
2026 23,139,71,200,91,90,90,248,173,46,19,110,161,178,178,178,62,217,92,93,30,
2027 222,212,170,228,183,20,8,149,148,44,33,139,131,16,248,229,230,230,150,150,
2028 150,166,167,167,55,233,94,26,87,81,81,65,124,78,78,14,204,235,236,236,140,
2029 142,142,174,174,174,78,76,76,132,139,252,16,224,148,73,149,70,174,188,188,
2030 188,195,14,59,108,187,205,37,190,213,172,52,138,26,127,16,166,165,165,77,
2031 52,233,128,3,14,40,42,42,98,166,121,210,73,39,201,40,157,222,127,255,125,
2032 153,217,47,157,123,238,185,114,67,58,93,121,229,149,114,117,208,234,201,
2033 39,159,148,133,209,233,154,107,174,97,122,46,83,184,19,118,237,160,131,
2034 14,146,169,93,154,60,121,50,35,80,166,24,61,21,20,20,236,191,255,254,114,
2035 31,46,77,155,54,77,124,119,123,180,196,124,121,235,173,183,150,91,247,160,
2036 41,83,166,44,89,178,68,102,24,61,61,248,224,131,219,108,179,141,220,135,
2037 75,151,94,122,169,92,237,85,129,7,225,137,39,158,40,15,81,167,127,254,243,
2038 159,114,245,230,194,29,220,180,105,83,71,71,71,109,109,109,73,73,137,246,
2039 100,69,102,102,38,67,120,175,189,246,18,217,183,218,106,43,241,99,215,93,
2040 119,93,186,116,41,224,36,189,72,185,133,162,67,138,45,235,181,247,222,123,
2041 231,231,231,215,212,212,156,126,250,233,50,74,167,153,51,103,146,177,187,
2042 187,123,219,109,183,149,81,46,29,127,252,241,144,91,108,57,240,90,182,108,
2043 217,212,169,83,229,161,184,180,207,62,251,36,36,36,200,20,78,149,149,149,
2044 157,112,194,9,242,141,156,206,87,131,138,31,228,253,246,219,111,245,126,
2045 249,88,232,214,91,111,149,71,166,211,237,183,223,46,214,154,135,216,78,
2046 59,237,148,170,251,72,64,112,105,252,65,72,221,137,214,213,107,191,253,
2047 246,19,32,212,247,3,77,91,8,194,179,207,62,91,110,72,167,63,253,233,79,
2048 114,117,208,234,241,199,31,151,133,209,233,239,127,255,187,119,16,98,197,
2049 204,223,228,196,154,143,17,8,205,47,146,102,84,199,197,197,201,20,163,33,
2050 64,104,126,227,179,65,219,111,191,253,226,197,139,101,134,209,211,253,247,
2051 223,111,126,149,252,31,255,248,71,185,218,171,226,242,227,162,115,163,9,
2052 63,39,255,44,126,84,215,87,203,117,99,35,183,223,205,184,237,182,219,228,
2053 234,205,69,173,2,66,254,54,52,52,20,22,22,106,32,76,73,73,129,133,230,47,
2054 248,236,178,203,46,235,214,173,171,171,171,27,45,123,77,135,148,155,214,
2055 105,207,61,247,20,32,252,131,233,251,245,72,188,0,26,16,98,166,101,148,
2056 75,71,29,117,20,165,16,91,14,188,126,254,249,103,243,215,84,40,139,30,132,
2057 28,246,101,151,93,38,215,57,223,8,175,255,216,19,51,0,88,40,147,142,141,
2058 220,190,191,27,58,138,181,230,33,182,227,142,59,42,16,250,47,183,32,196,
2059 52,123,1,225,71,31,125,36,51,251,37,5,66,189,20,8,71,81,119,223,125,183,
2060 121,215,62,130,176,175,191,175,183,175,183,189,163,61,42,38,170,179,171,
2061 147,223,99,61,229,31,107,16,142,110,179,186,5,33,158,40,71,229,9,132,179,
2062 102,205,34,163,91,16,30,113,196,17,100,20,91,14,188,124,1,225,121,231,253,
2063 250,137,102,86,69,69,69,81,243,122,52,78,155,54,205,251,183,21,183,80,10,
2064 132,1,149,91,16,30,120,224,129,197,197,197,158,64,56,103,206,28,153,217,
2065 47,221,119,223,125,103,154,164,255,28,73,144,234,221,119,223,149,133,209,
2066 233,63,255,249,79,71,71,135,76,225,78,10,132,163,40,40,226,55,8,133,56,
2067 248,232,232,232,222,225,190,22,52,42,26,17,8,123,122,122,232,18,109,109,
2068 109,140,74,241,249,17,17,159,157,157,157,148,148,52,94,32,196,49,242,2,
2069 194,217,179,103,147,209,45,8,127,251,219,223,226,74,138,45,7,94,195,130,
2070 144,35,63,231,156,115,206,58,235,44,112,120,197,21,87,204,157,59,87,204,
2071 138,50,50,50,110,185,229,150,75,47,189,148,217,60,107,31,120,224,129,177,
2072 123,65,157,119,16,74,251,162,211,69,23,93,52,142,85,186,133,178,40,8,15,
2073 58,232,32,47,32,252,244,211,79,69,222,90,119,194,136,48,74,115,115,115,
2074 191,254,250,235,247,223,127,127,249,242,229,140,4,145,94,168,189,189,189,
2075 217,36,34,91,90,90,234,76,146,121,28,14,185,172,19,89,228,58,167,250,251,
2076 251,41,203,194,133,11,113,88,63,251,236,179,95,126,249,133,110,225,246,
2077 150,57,142,71,30,171,78,34,37,219,196,64,139,239,135,105,194,56,174,93,
2078 187,118,222,188,121,160,142,141,127,243,205,55,89,89,89,230,45,51,36,100,
2079 97,116,34,175,92,237,20,222,225,178,101,203,196,189,103,177,177,177,140,
2080 46,102,244,230,111,34,186,5,33,123,132,154,140,97,38,34,111,191,253,54,
2081 173,176,106,213,42,142,92,174,54,137,250,164,242,73,198,190,48,238,52,202,
2082 136,64,200,1,44,93,186,244,227,143,63,102,119,63,253,244,19,214,86,51,190,
2083 222,229,55,8,203,203,203,57,96,218,238,195,15,63,92,176,96,1,245,227,253,
2084 245,96,88,165,239,190,251,238,131,15,62,248,254,251,239,201,75,140,219,
2085 239,80,186,5,33,125,96,221,186,117,52,37,38,143,191,27,54,108,192,154,19,
2086 111,6,97,125,125,189,232,33,154,240,12,196,42,126,179,119,179,41,196,69,
2087 19,5,97,227,116,24,106,175,168,168,72,174,211,105,68,32,164,242,75,75,75,
2088 227,227,227,87,175,94,77,229,208,46,239,188,243,78,100,100,36,7,195,34,
2089 222,137,204,239,146,39,16,210,172,75,150,44,209,55,171,92,49,156,220,130,
2090 144,238,228,5,132,28,33,25,221,130,240,176,195,14,99,131,116,233,228,228,
2091 100,70,22,45,206,200,21,77,224,86,180,8,135,202,192,36,229,151,95,126,185,
2092 114,229,74,79,103,86,69,27,25,36,58,18,63,230,207,159,191,98,197,10,95,
2093 60,66,77,49,49,49,212,24,44,196,154,125,241,197,23,152,2,183,199,217,216,
2094 216,40,246,165,23,22,128,85,88,21,74,135,245,224,248,13,95,57,21,194,14,
2095 164,167,167,127,251,237,183,148,110,209,162,69,226,83,160,222,65,40,204,
2096 139,65,110,205,93,78,78,14,198,144,222,248,214,91,111,209,27,177,63,213,
2097 213,99,123,206,223,15,5,37,8,169,83,50,82,239,12,182,157,55,23,233,169,
2098 247,23,94,120,129,145,57,121,242,228,73,147,38,209,225,126,247,187,223,
2099 97,170,52,51,122,249,229,151,179,214,160,235,174,187,14,231,105,215,93,
2100 119,149,203,78,145,81,59,61,245,251,223,255,94,198,58,181,219,110,187,137,
2101 19,47,136,230,167,247,92,114,201,37,216,116,44,172,184,179,139,253,238,
2102 180,211,78,87,93,117,21,253,94,223,63,248,253,228,147,79,202,195,213,41,
2103 34,34,2,107,197,196,138,140,247,222,123,175,72,76,143,121,228,145,71,246,
2104 218,107,175,29,119,220,81,20,135,45,243,131,29,93,112,193,5,12,39,253,150,
2105 159,123,238,57,42,68,30,159,75,116,92,97,40,41,8,35,234,244,211,79,103,
2106 251,226,8,167,76,153,242,215,191,254,245,171,175,190,50,195,201,0,66,134,
2107 49,76,58,247,220,115,41,145,200,46,142,132,223,187,239,190,251,227,143,
2108 63,174,255,136,46,162,170,177,197,76,105,245,251,250,211,159,254,68,45,
2109 49,133,151,251,112,201,0,66,142,19,204,83,111,148,69,95,153,108,129,13,
2110 98,115,13,104,55,203,45,8,41,209,73,39,157,196,60,90,232,252,243,207,215,
2111 190,5,202,209,210,151,238,191,255,126,142,77,43,29,187,102,143,71,30,121,
2112 36,163,23,19,35,82,106,162,66,158,125,246,89,220,32,209,40,36,230,55,76,
2113 162,140,195,130,144,249,193,107,175,189,118,224,129,7,106,109,202,95,126,
2114 83,147,143,61,246,24,125,64,15,66,172,237,161,135,30,42,187,136,75,116,
2115 75,226,63,255,252,115,92,121,178,51,76,68,98,142,10,50,253,229,47,127,49,
2116 55,19,135,71,167,194,50,234,39,19,35,2,33,162,179,129,13,144,163,109,156,
2117 195,166,200,152,105,243,183,112,13,32,212,154,149,62,105,104,86,250,21,
2118 102,122,216,102,117,11,194,125,247,221,151,217,149,39,16,190,247,222,123,
2119 100,244,4,66,136,206,232,224,0,180,70,164,110,153,180,105,67,94,136,90,
2120 101,140,208,247,72,73,26,209,94,28,57,22,0,231,140,10,55,164,103,76,137,
2121 102,210,68,145,193,12,199,201,65,146,247,245,215,95,247,5,132,244,129,255,
2122 253,239,127,167,158,122,170,216,175,168,112,254,82,231,148,154,238,39,158,
2123 81,209,18,227,32,202,253,185,68,19,48,19,250,225,135,31,232,39,226,200,
2124 249,75,222,231,159,127,94,111,55,40,32,70,134,97,168,213,3,173,9,119,111,
2125 188,241,70,121,100,58,105,32,52,155,26,230,211,76,13,197,90,196,46,96,54,
2126 181,193,150,181,14,35,26,157,146,222,115,207,61,250,243,10,227,46,139,130,
2127 240,144,67,14,41,41,41,241,4,66,166,69,100,108,106,106,50,223,152,64,147,
2128 95,122,233,165,230,120,236,14,166,89,236,17,59,40,99,117,98,60,51,27,162,
2129 169,228,178,75,90,143,161,127,200,40,167,88,100,34,79,60,152,1,108,52,176,
2130 92,97,18,41,233,121,120,144,98,59,108,240,161,135,30,146,235,116,218,184,
2131 113,35,131,141,31,88,82,122,9,41,153,129,30,119,220,113,98,173,91,109,187,
2132 237,182,79,61,245,148,230,152,122,191,70,136,139,64,103,149,177,58,49,158,
2133 25,0,114,193,37,61,8,43,42,42,56,30,239,62,214,41,167,156,130,137,20,233,
2134 17,140,49,195,21,17,105,254,248,181,30,132,0,233,149,87,94,97,140,201,117,
2135 38,209,178,12,69,239,103,96,60,129,48,49,49,81,166,208,169,167,167,135,
2136 121,149,249,251,242,122,93,124,241,197,250,251,90,59,59,59,129,138,92,167,
2137 211,214,91,111,77,89,228,130,78,122,16,226,82,211,63,229,10,119,194,64,
2138 191,252,242,203,212,131,72,143,187,195,228,76,174,115,9,96,51,9,131,118,
2139 98,145,6,34,101,85,85,213,51,207,60,131,209,20,145,110,69,253,99,91,49,
2140 124,98,227,35,5,161,167,102,197,2,82,189,114,193,37,61,8,41,206,171,175,
2141 190,106,46,136,94,64,197,251,69,59,183,32,100,215,94,64,40,190,95,239,22,
2142 132,28,12,230,88,46,232,196,24,193,79,213,12,52,91,190,227,142,59,188,140,
2143 110,198,206,244,233,211,245,87,31,104,110,185,206,37,58,237,119,223,125,
2144 119,244,209,71,139,197,153,51,103,14,11,66,220,128,7,30,120,64,174,240,
2145 32,154,15,12,139,67,5,132,230,214,100,191,151,93,118,25,3,92,46,235,36,
2146 124,101,132,245,160,197,205,6,147,34,187,237,75,26,8,205,67,12,66,99,204,
2147 197,90,204,221,211,79,63,237,118,56,104,162,47,225,41,234,145,60,142,178,
2148 40,8,49,76,94,64,248,229,151,95,146,209,45,8,25,144,230,78,143,72,137,133,
2149 21,38,192,19,8,233,85,230,222,169,157,0,145,203,46,49,96,98,99,99,137,103,
2150 179,102,124,26,68,130,187,238,186,75,108,199,19,8,127,251,219,223,138,31,
2151 244,48,236,44,29,20,119,68,196,120,17,253,21,187,41,6,131,23,16,98,187,
2152 233,193,222,97,166,151,6,66,50,222,126,251,237,152,120,185,194,179,240,
2153 152,197,253,232,216,157,155,111,190,217,220,52,158,164,129,144,153,53,19,
2154 88,51,149,205,186,240,194,11,181,137,133,89,35,2,33,179,13,28,110,153,200,
2155 179,14,63,252,112,109,182,187,110,221,58,183,198,197,147,52,16,226,237,
2156 49,193,31,182,21,152,203,127,255,253,247,34,139,91,16,210,157,244,64,2,
2157 132,20,153,102,242,165,206,245,55,137,140,8,132,204,24,174,189,246,90,223,
2158 187,144,6,66,154,245,141,55,222,240,194,18,77,76,56,188,52,171,91,16,50,
2159 241,245,2,66,113,87,157,91,16,122,209,245,215,95,79,183,23,59,101,36,14,
2160 91,100,102,186,184,248,26,59,205,32,100,242,167,111,47,106,195,59,8,91,
2161 90,90,174,187,238,58,95,90,243,180,211,78,19,167,58,221,130,16,121,170,
2162 118,70,171,120,190,51,42,42,202,251,4,197,32,95,64,72,139,223,121,231,157,
2163 190,28,63,38,206,124,186,101,92,100,81,16,50,47,46,45,45,245,3,132,196,
2164 48,54,232,82,230,118,186,242,202,43,69,255,246,4,194,134,134,6,109,150,
2165 173,105,233,210,165,100,161,211,200,101,151,216,5,145,244,66,179,139,131,
2166 33,219,125,247,221,13,7,192,80,20,87,254,60,129,80,19,25,239,191,255,126,
2167 246,107,222,242,65,7,29,132,213,54,108,153,73,177,56,147,230,5,132,216,
2168 151,51,206,56,67,70,233,196,248,196,249,54,87,163,6,66,108,153,193,136,
2169 0,197,61,246,216,195,92,81,0,108,222,188,121,100,169,173,173,117,187,47,
2170 114,225,151,155,219,69,3,33,230,236,164,147,78,146,177,46,177,150,170,54,
2171 28,33,251,210,159,235,54,200,119,16,178,5,236,190,33,49,182,131,74,54,240,
2172 152,3,160,81,128,1,185,222,127,255,125,179,125,33,134,81,109,56,109,32,
2173 36,64,200,190,62,252,240,67,67,101,114,84,236,139,14,35,151,93,58,255,252,
2174 243,5,18,220,130,208,32,64,200,32,50,224,92,52,19,52,50,148,142,69,142,
2175 95,156,205,27,17,8,105,29,252,126,153,72,39,90,135,17,103,174,112,13,132,
2176 110,71,177,167,102,93,176,96,129,167,102,117,11,194,3,14,56,128,169,170,
2177 31,32,36,134,201,141,219,9,13,213,162,157,68,49,55,52,61,223,92,171,212,
2178 182,230,12,153,65,104,16,222,188,119,16,50,195,54,172,229,104,221,14,58,
2179 226,241,95,201,226,9,132,100,161,138,204,197,167,183,136,214,249,230,155,
2180 111,100,148,78,236,29,82,154,237,15,242,5,132,203,150,45,163,138,100,172,
2181 83,28,0,123,196,121,48,247,70,237,2,211,248,202,162,32,164,143,250,7,194,
2182 131,15,62,56,39,39,135,177,97,54,31,39,159,124,178,184,90,230,9,132,172,
2183 50,88,19,52,125,250,116,226,153,55,201,101,151,192,15,35,118,198,140,25,
2184 134,166,197,180,253,240,195,15,28,185,217,179,249,219,223,254,134,1,242,
2185 5,132,15,60,240,128,221,110,55,116,95,70,2,38,207,237,16,18,183,66,120,
2186 1,33,25,181,51,51,154,166,76,153,130,157,165,104,230,82,107,32,124,241,
2187 197,23,101,148,75,199,28,115,12,54,122,209,162,69,114,89,167,255,254,247,
2188 191,148,142,201,193,177,199,30,43,163,92,162,165,240,189,126,249,229,23,
2189 243,233,89,13,132,209,209,209,134,74,163,6,104,107,26,218,60,200,111,186,
2190 233,38,79,119,195,250,14,66,166,222,230,178,223,115,207,61,108,225,193,
2191 7,31,148,203,46,97,26,232,147,228,122,233,165,151,204,150,133,227,161,63,
2192 184,117,187,5,8,217,230,53,215,92,35,163,92,58,239,188,243,154,155,155,
2193 177,254,6,159,27,251,43,234,196,71,16,46,94,188,216,176,5,6,14,157,16,147,
2194 106,182,158,183,220,114,139,56,53,50,34,16,150,148,148,28,117,212,81,50,
2195 145,78,216,110,241,120,184,92,118,73,3,97,68,68,132,97,126,64,103,96,206,
2196 68,47,50,159,249,191,249,230,155,169,40,177,71,131,220,130,144,169,149,
2197 127,32,20,134,34,61,61,29,243,45,163,92,98,66,67,199,32,35,238,160,217,
2198 194,64,199,13,27,54,152,115,105,183,157,15,11,194,217,179,103,123,7,225,
2199 59,239,188,35,163,92,194,118,137,177,111,104,101,100,179,217,24,116,158,
2200 78,141,98,190,104,107,186,174,140,114,137,185,215,234,213,171,233,177,112,
2201 72,70,233,196,54,25,92,127,254,243,159,229,178,78,190,128,16,171,200,112,
2202 147,177,78,29,113,196,17,108,144,126,98,30,254,194,240,142,187,44,10,194,
2203 223,254,246,183,254,129,240,196,19,79,196,16,227,148,104,103,26,53,209,
2204 24,98,162,231,5,132,24,38,185,236,146,176,11,243,231,207,151,203,46,49,
2205 59,38,254,226,139,47,150,203,46,49,141,90,181,106,21,171,232,214,50,202,
2206 37,186,35,78,167,47,32,252,215,191,254,69,26,67,233,40,26,155,197,30,153,
2207 77,91,86,86,22,171,188,128,176,188,188,252,119,191,251,157,140,114,137,
2208 217,6,70,135,188,88,19,25,229,146,6,194,107,175,189,86,70,185,116,234,169,
2209 167,50,234,168,97,185,172,19,135,141,209,225,8,205,208,197,80,50,32,1,182,
2210 249,34,147,6,194,153,51,103,202,40,151,168,204,53,107,214,224,199,155,15,
2211 3,30,211,1,200,101,150,39,16,2,111,184,34,36,78,40,97,209,228,106,157,176,
2212 2,24,136,215,95,127,93,46,187,196,24,78,75,75,35,23,9,204,29,239,249,231,
2213 159,103,213,51,207,60,99,94,37,64,136,109,53,95,137,196,214,48,57,99,46,
2214 98,190,30,131,53,228,48,56,84,239,32,164,164,12,147,55,223,124,83,46,187,
2215 68,19,208,232,84,248,97,135,29,38,163,92,186,228,146,75,252,0,33,188,97,
2216 4,201,68,46,1,108,230,118,197,197,197,204,210,100,148,75,26,8,223,120,227,
2217 13,25,229,18,214,60,50,50,178,189,189,157,169,161,140,114,9,8,137,65,106,
2218 150,91,16,30,116,208,65,254,129,144,254,195,97,211,141,205,157,31,70,50,
2219 59,161,93,78,63,253,116,25,165,19,118,137,61,154,199,32,227,66,28,231,150,
2220 131,208,124,117,240,234,171,175,230,120,10,10,10,12,158,22,34,49,227,209,
2221 45,8,41,181,120,232,254,170,171,174,146,81,46,1,45,142,129,14,246,218,107,
2222 175,201,40,157,196,221,15,247,221,119,159,185,51,15,11,66,236,219,195,15,
2223 63,44,163,92,58,228,144,67,0,33,51,209,125,247,221,87,70,185,132,85,20,
2224 27,28,95,89,20,132,88,109,76,21,35,28,235,47,163,116,242,2,66,166,78,140,
2225 127,38,155,116,116,25,229,18,219,28,22,132,79,60,241,132,92,118,233,140,
2226 51,206,32,158,190,43,151,93,194,111,160,27,153,167,90,147,38,77,194,174,
2227 145,133,225,36,163,92,194,14,138,7,42,134,5,33,9,238,190,251,110,67,233,
2228 246,222,123,111,144,80,85,85,197,96,96,149,94,226,70,149,145,130,16,163,
2229 3,51,114,115,115,177,38,50,202,37,13,132,231,158,123,174,140,114,233,180,
2230 211,78,195,246,245,244,244,152,207,156,48,72,176,110,110,65,200,49,99,124,
2231 49,34,230,145,160,129,208,124,252,120,18,176,138,131,196,137,145,81,46,
2232 97,71,60,221,132,237,22,132,136,138,194,52,8,81,10,82,154,231,55,100,20,
2233 231,0,222,123,239,61,25,165,211,218,181,107,89,229,22,132,184,206,172,2,
2234 135,230,85,2,132,216,86,243,116,248,186,235,174,163,198,40,190,249,236,
2235 168,232,96,195,130,144,178,48,76,158,126,250,105,185,236,18,83,52,102,93,
2236 180,187,217,235,98,140,96,55,57,164,45,7,33,182,143,206,192,94,204,211,
2237 62,13,132,230,49,133,223,31,19,19,131,101,188,225,134,27,100,148,75,12,
2238 31,195,29,200,154,220,130,144,81,6,236,1,33,13,42,163,116,242,2,66,12,11,
2239 135,205,190,204,51,102,1,66,24,233,118,22,142,217,97,12,154,219,139,209,
2240 45,142,124,203,65,72,175,144,81,46,49,17,4,132,140,172,253,77,143,252,94,
2241 127,253,245,12,70,79,32,252,225,135,31,216,224,77,55,221,36,163,92,98,239,
2242 94,64,248,191,255,253,143,92,204,107,205,157,121,88,16,82,219,255,252,231,
2243 63,101,148,75,204,189,24,149,217,217,217,102,171,200,204,88,108,112,124,
2244 101,81,16,50,228,252,3,33,147,56,236,35,32,52,159,157,195,1,26,22,132,11,
2245 23,46,148,203,46,97,71,136,127,234,169,167,228,178,75,159,124,242,9,35,
2246 25,150,200,101,151,192,195,242,229,203,177,110,230,203,15,48,0,98,121,1,
2247 33,121,153,191,51,251,251,244,211,79,49,169,230,209,251,232,163,143,82,
2248 39,12,239,183,55,23,131,150,131,28,11,16,154,11,40,64,216,216,216,104,174,
2249 124,142,156,125,249,13,66,243,248,161,66,24,174,24,116,179,197,68,250,123,
2250 181,245,242,4,66,189,196,252,221,124,14,10,81,243,52,159,219,83,70,116,
2251 60,108,135,127,32,164,20,230,243,90,87,94,121,37,70,28,190,154,61,194,75,
2252 47,189,212,59,8,169,210,203,47,191,28,27,199,64,48,159,200,101,6,195,40,
2253 160,194,205,45,72,31,19,23,59,183,28,132,28,246,176,32,188,243,206,59,101,
2254 148,75,212,195,234,213,171,57,60,243,185,98,148,158,158,46,246,104,144,
2255 91,16,226,106,248,7,194,147,78,58,169,162,162,2,116,153,11,37,64,72,213,
2256 153,187,49,34,23,85,97,6,33,136,162,177,216,157,39,16,210,153,207,57,231,
2257 28,184,181,100,201,18,239,32,52,223,87,140,235,204,200,162,164,230,122,
2258 190,236,178,203,40,160,39,16,178,35,54,232,22,132,226,230,216,81,7,33,86,
2259 145,50,202,40,151,206,60,243,76,70,37,107,15,56,224,0,25,229,18,83,31,14,
2260 67,108,115,28,101,81,16,50,122,1,33,51,47,243,221,19,200,63,16,50,254,135,
2261 5,33,152,145,203,46,29,117,212,81,52,161,217,70,211,101,91,90,90,204,116,
2262 161,127,236,177,199,30,180,183,249,216,232,196,152,6,47,32,252,240,195,
2263 15,41,50,7,73,207,166,47,26,206,179,35,198,18,115,67,113,115,166,89,99,
2264 1,66,243,41,32,1,66,179,139,140,176,203,52,138,223,32,52,15,87,68,101,98,
2265 98,204,86,3,225,85,56,203,109,148,239,32,52,159,255,68,226,254,2,179,247,
2266 134,62,248,224,3,191,65,232,246,100,50,190,209,126,251,237,71,199,48,31,
2267 48,182,195,11,8,207,56,227,140,180,180,52,113,6,143,100,230,254,73,39,103,
2268 143,52,147,249,118,143,221,119,223,61,144,32,116,251,92,54,233,41,184,219,
2269 123,139,196,9,21,179,220,130,16,63,76,156,225,116,123,26,115,75,64,8,117,
2270 204,171,16,135,77,31,54,183,50,145,226,10,133,91,16,82,222,31,127,252,145,
2271 201,16,237,69,229,123,7,33,157,83,70,185,36,64,136,125,48,239,151,126,226,
2272 5,132,203,150,45,99,131,230,145,69,205,47,93,186,116,44,64,200,36,210,124,
2273 33,227,148,83,78,17,147,75,179,77,99,23,172,18,219,28,71,141,63,8,153,215,
2274 203,42,209,9,252,8,16,158,124,242,201,50,74,39,47,32,196,76,147,203,45,
2275 8,153,60,14,11,66,154,4,216,200,40,167,176,137,140,64,102,238,114,217,37,
2276 38,62,110,65,232,69,248,136,12,114,79,32,52,24,32,138,192,144,147,235,54,
2277 23,166,237,153,103,158,201,206,206,198,6,201,212,78,141,5,8,245,98,176,
2278 209,40,191,252,242,203,37,151,92,98,118,110,16,38,0,79,113,116,65,232,69,
2279 120,21,226,192,12,218,66,16,122,209,204,153,51,169,243,81,4,161,23,253,
2280 254,247,191,247,4,66,108,232,119,223,125,55,84,84,15,98,8,96,1,111,188,
2281 241,70,183,245,0,233,199,29,132,94,180,114,229,74,177,71,131,242,243,243,
2282 101,10,157,152,221,10,16,50,51,144,81,58,141,5,8,61,105,239,189,247,78,
2283 73,73,97,119,110,65,72,79,163,53,157,229,24,146,119,16,234,197,160,99,212,
2284 44,92,184,240,226,139,47,118,219,154,244,100,58,188,39,16,138,123,74,221,
2285 130,16,199,116,44,64,40,214,106,98,23,244,70,160,139,155,104,222,26,34,
2286 18,75,46,83,143,159,198,31,132,153,153,153,178,74,116,18,32,196,183,115,
2287 123,199,182,23,16,254,225,15,127,192,171,115,11,66,204,253,176,32,236,236,
2288 236,52,92,92,196,51,88,181,106,149,225,48,152,83,211,249,70,10,194,157,
2289 119,222,121,253,250,245,158,64,40,94,151,163,23,22,193,140,13,33,122,33,
2290 92,127,244,209,71,161,142,76,61,198,32,220,184,113,227,125,247,221,199,
2291 96,51,76,20,244,10,48,8,197,77,73,102,141,29,8,177,26,1,3,33,38,222,19,
2292 8,153,81,185,125,38,146,244,184,137,116,3,74,231,214,135,22,178,56,8,87,
2293 172,88,33,246,104,80,65,65,129,76,161,147,6,66,28,35,25,165,83,32,65,72,
2294 13,136,70,113,11,66,195,217,11,95,64,72,107,146,235,206,59,239,60,238,184,
2295 227,204,183,160,107,242,14,66,104,199,166,204,35,139,13,46,94,188,120,76,
2296 65,200,198,41,206,19,79,60,129,51,99,62,45,161,73,129,80,10,207,70,86,137,
2297 78,126,131,144,110,225,9,132,7,30,120,224,176,32,196,64,24,238,176,162,
2298 9,231,205,155,103,56,181,125,222,121,231,145,210,19,8,161,200,36,119,218,
2299 99,143,61,188,128,208,240,126,81,68,79,162,31,51,60,60,153,117,220,178,
2300 11,46,184,128,241,44,210,143,17,8,49,52,247,222,123,47,184,210,91,19,115,
2301 205,163,177,0,161,167,202,68,218,59,210,12,114,11,66,182,195,200,199,152,
2302 10,81,33,164,116,11,66,106,85,238,192,164,81,247,8,73,44,55,173,215,182,
2303 67,69,62,244,208,67,233,0,110,65,72,71,210,94,147,164,137,222,200,222,129,
2304 156,193,89,55,87,133,21,64,232,165,89,61,205,111,32,147,204,172,147,0,33,
2305 227,61,96,32,148,71,105,18,38,66,188,55,213,12,66,90,196,224,42,121,7,33,
2306 237,206,72,185,251,238,187,169,94,183,3,77,47,239,32,20,47,212,13,60,8,
2307 57,158,103,158,121,6,135,65,223,27,221,218,49,118,161,64,56,164,156,156,
2308 28,89,37,58,105,32,164,153,101,148,78,222,65,72,255,102,96,152,239,26,165,
2309 167,98,44,200,232,5,132,80,202,112,95,12,141,247,194,11,47,24,222,144,249,
2310 224,131,15,98,214,221,130,144,33,17,17,17,49,84,48,231,27,22,12,162,231,
2311 121,2,225,162,69,139,68,46,131,152,227,255,243,159,255,244,116,199,4,186,
2312 248,226,139,25,234,164,28,11,16,98,14,204,151,105,247,217,103,159,71,30,
2313 121,68,46,232,116,209,69,23,141,46,8,25,201,226,68,25,245,38,107,80,39,
2314 226,221,202,19,8,205,94,148,91,16,190,244,210,75,98,173,220,141,78,34,126,
2315 20,65,248,183,191,253,173,205,245,38,88,169,230,250,129,220,101,3,157,237,
2316 252,36,222,45,8,177,152,76,31,89,171,169,170,170,234,220,115,207,53,148,
2317 26,224,93,120,225,133,80,83,46,187,132,121,21,29,102,28,65,40,190,31,52,
2318 162,102,245,14,194,179,206,58,75,70,233,52,22,32,20,147,105,121,172,155,
2319 203,121,152,110,64,72,223,19,15,222,104,242,14,66,170,154,177,41,99,93,
2320 162,29,177,81,110,11,226,5,132,11,23,46,100,131,230,145,197,252,30,131,
2321 51,70,32,164,234,204,54,150,174,114,217,101,151,209,43,228,178,75,236,162,
2322 193,245,18,249,113,148,165,65,232,233,241,32,47,32,20,79,158,50,48,204,
2323 182,120,191,253,246,27,22,132,232,211,79,63,149,81,46,193,45,131,53,249,
2324 240,195,15,233,247,158,64,40,78,131,204,157,59,247,252,205,117,229,149,
2325 87,210,81,60,129,208,211,68,24,49,127,199,149,116,235,48,33,122,164,232,
2326 184,99,1,194,39,159,124,82,70,185,68,119,255,226,139,47,58,59,59,229,178,
2327 78,184,167,244,233,81,4,225,182,206,231,8,89,181,96,193,2,89,137,58,25,
2328 140,139,166,81,1,97,126,126,254,165,151,94,42,247,228,18,94,59,182,99,20,
2329 65,40,30,159,96,246,192,244,95,238,227,156,179,207,63,237,248,243,207,57,
2330 235,134,27,110,96,95,110,65,184,215,94,123,225,212,14,21,192,165,121,243,
2331 230,81,64,185,218,165,233,211,167,227,56,154,159,147,219,126,251,237,199,
2332 23,132,24,104,49,89,252,250,235,175,233,51,178,224,46,25,156,39,77,0,79,
2333 230,215,73,3,161,219,65,61,118,32,100,172,201,195,117,233,234,171,175,166,
2334 177,88,101,6,33,204,51,220,225,236,29,132,51,102,204,48,244,34,154,108,
2335 254,252,249,152,74,243,237,69,39,156,112,130,23,16,138,243,76,230,155,174,
2336 1,33,140,28,11,16,178,77,60,7,195,105,9,68,36,70,204,60,252,217,5,173,32,
2337 182,57,142,26,127,16,98,55,101,149,232,164,129,208,237,93,209,222,65,200,
2338 176,196,232,152,167,84,248,49,190,128,144,78,96,176,41,24,104,195,68,102,
2339 221,186,117,164,244,4,66,241,14,210,103,159,125,86,70,185,4,77,97,164,39,
2340 16,26,78,244,225,40,224,16,51,211,215,68,133,96,56,14,57,228,16,115,23,
2341 196,101,36,203,88,128,208,60,170,177,14,28,9,108,150,203,58,157,119,222,
2342 121,91,2,194,155,111,190,89,70,185,196,112,21,85,253,222,123,239,153,75,
2343 237,233,171,164,190,131,16,139,35,87,235,36,64,200,144,102,96,203,40,151,
2344 222,126,251,109,236,254,40,130,16,11,5,8,105,104,243,99,66,39,157,120,162,
2345 39,16,238,189,247,222,152,233,161,2,184,196,33,201,117,46,9,66,144,140,
2346 31,50,202,37,106,53,144,32,52,63,3,202,252,70,220,26,106,182,248,8,115,
2347 233,220,161,81,212,146,76,161,147,40,38,150,52,192,32,196,92,200,101,151,
2348 48,47,130,118,230,33,67,71,26,17,8,205,53,38,110,125,160,51,152,31,219,
2349 56,238,184,227,188,128,80,188,180,214,252,96,34,102,74,188,205,110,212,
2350 65,136,101,184,235,174,187,100,148,75,20,13,107,73,233,20,8,61,138,90,144,
2351 85,162,147,119,16,50,57,34,163,119,16,154,59,49,230,195,23,16,98,121,13,
2352 166,135,94,168,239,181,216,17,49,140,25,96,28,167,140,117,73,3,33,51,32,
2353 25,229,18,19,121,186,130,39,16,26,110,150,51,191,199,11,142,18,143,27,100,
2354 126,66,145,105,53,171,198,2,132,230,55,6,156,114,202,41,20,156,238,110,
2355 30,9,231,156,115,14,173,233,55,8,205,159,116,96,254,187,97,195,6,86,205,
2356 153,51,199,60,199,20,86,195,44,223,65,136,161,148,171,93,34,227,171,175,
2357 190,202,42,44,151,249,9,138,143,63,254,24,219,225,31,8,113,251,232,27,50,
2358 202,37,47,32,60,239,204,51,60,129,208,236,17,154,223,229,193,164,4,63,137,
2359 10,55,119,81,170,34,144,32,188,255,254,251,101,148,75,226,129,122,86,49,
2360 177,224,96,100,172,75,250,15,125,232,197,212,80,166,208,73,3,161,248,114,
2361 139,65,226,6,52,255,64,72,161,204,151,87,144,0,161,25,45,251,237,183,31,
2362 30,27,171,204,32,164,27,143,8,132,102,202,94,117,213,85,216,46,216,108,
2363 174,103,14,114,88,16,226,173,202,40,151,232,138,226,244,198,168,131,176,
2364 179,179,211,252,253,38,90,135,131,196,118,25,110,182,64,10,132,82,110,125,
2365 11,241,174,81,79,167,70,197,195,49,222,65,104,126,97,132,152,149,144,209,
2366 59,8,179,178,178,240,186,100,172,83,244,99,253,142,246,223,127,127,113,
2367 171,2,221,200,252,238,9,13,132,211,167,79,151,81,46,145,49,61,61,221,71,
2368 16,226,3,25,76,63,117,34,86,153,123,252,153,103,158,73,252,88,128,208,108,
2369 70,105,17,138,64,171,49,33,144,81,46,157,117,214,89,91,2,66,243,43,72,24,
2370 90,194,237,155,59,119,174,249,110,85,44,32,171,204,242,29,132,223,125,247,
2371 157,92,237,18,13,253,250,235,175,179,138,38,54,79,56,126,248,225,7,191,
2372 65,136,109,165,18,100,148,75,2,132,116,87,250,173,140,114,233,239,151,156,
2373 57,216,211,229,9,132,134,15,81,153,97,195,78,241,206,177,245,230,169,12,
2374 71,24,72,16,154,207,174,195,0,177,138,78,110,110,86,118,228,220,161,81,
2375 212,188,153,103,116,93,240,64,175,115,59,168,113,122,200,232,9,132,28,182,
2376 91,16,50,252,105,44,26,197,237,155,101,4,8,205,231,123,15,60,240,64,186,
2377 55,171,204,32,100,164,24,222,18,224,29,132,230,23,55,94,115,205,53,204,
2378 3,24,89,230,55,203,136,81,236,29,132,230,87,217,81,237,162,51,143,58,8,
2379 59,58,58,204,179,4,234,132,131,100,162,192,36,67,70,185,196,46,20,8,165,
2380 24,78,178,86,92,194,92,210,191,113,10,205,38,21,9,210,120,1,33,4,5,27,50,
2381 202,37,60,42,95,64,200,60,218,108,59,244,98,120,112,96,34,177,249,37,126,
2382 128,80,56,49,207,60,243,140,140,114,9,54,51,200,125,4,225,87,95,125,101,
2383 152,44,227,209,138,85,102,47,25,218,17,63,82,16,50,224,233,157,88,124,243,
2384 52,77,3,161,185,254,169,97,114,33,179,139,118,198,25,103,120,2,33,195,30,
2385 16,226,199,120,121,215,168,249,173,102,218,169,209,15,62,248,192,96,203,
2386 118,218,105,39,90,138,85,102,113,108,62,130,16,187,35,87,235,244,242,203,
2387 47,179,138,217,43,187,144,81,78,209,217,196,149,45,183,32,20,239,92,254,
2388 207,127,254,99,94,37,64,72,43,152,79,215,211,58,24,184,202,202,74,115,151,
2389 123,248,174,219,7,219,155,125,4,161,249,237,148,226,205,50,116,84,183,110,
2390 141,31,32,116,123,170,16,123,74,127,102,21,131,75,70,185,164,129,208,220,
2391 172,140,145,232,232,104,86,189,249,230,155,134,94,68,63,97,92,59,119,232,
2392 70,230,170,0,30,116,84,42,208,45,180,196,89,86,183,32,60,238,184,227,232,
2393 168,116,87,243,140,153,26,195,80,224,217,184,189,19,21,219,194,54,205,3,
2394 31,131,3,62,89,101,6,33,181,52,162,155,101,46,185,228,18,25,229,210,95,
2395 254,242,23,14,137,153,159,121,248,48,174,57,84,239,32,36,187,140,114,73,
2396 3,161,219,203,228,226,218,147,219,119,142,251,7,66,166,200,140,74,214,42,
2397 143,208,155,46,184,224,2,89,43,46,209,132,255,253,239,127,177,56,84,174,
2398 140,114,137,121,58,147,53,114,121,7,161,249,210,8,25,69,79,245,14,66,6,
2399 182,219,59,208,52,209,209,5,80,209,171,175,190,106,232,16,28,249,204,153,
2400 51,57,6,243,120,56,231,156,115,152,254,251,8,194,200,200,72,195,153,52,
2401 182,204,152,135,91,134,91,88,17,190,20,89,188,128,16,207,192,45,156,112,
2402 7,87,175,94,189,187,233,243,226,26,8,97,155,140,114,137,1,207,128,196,198,
2403 201,101,157,78,63,253,116,97,124,205,239,183,164,150,50,50,50,160,154,217,
2404 43,210,64,200,252,198,224,101,210,190,31,125,244,17,67,200,236,241,208,
2405 136,90,43,24,228,59,8,129,144,217,130,223,117,215,93,88,150,207,62,251,
2406 204,96,61,153,140,139,115,95,175,188,242,138,97,21,194,104,210,187,176,
2407 143,230,93,11,16,114,84,230,137,185,184,201,57,38,38,198,252,242,4,113,
2408 254,223,71,16,154,189,46,154,41,43,43,11,211,99,118,193,145,31,32,116,59,
2409 191,65,152,248,53,107,214,152,175,93,105,32,164,39,27,30,131,163,89,63,
2410 253,244,83,42,217,252,246,53,134,30,99,68,236,209,172,203,46,187,76,166,
2411 115,137,218,166,236,184,227,244,34,25,229,210,180,105,211,168,91,114,185,
2412 5,33,214,128,106,231,216,204,179,112,154,146,142,65,70,122,130,217,194,
2413 172,90,181,138,30,110,56,105,132,254,252,231,63,195,21,114,153,7,62,176,
2414 167,33,134,10,224,146,119,16,50,102,101,148,75,167,156,114,10,245,31,21,
2415 21,101,190,89,134,134,30,22,132,230,247,129,48,28,88,197,1,191,245,214,
2416 91,50,74,167,155,111,190,153,86,48,159,161,69,195,130,144,126,78,26,25,
2417 229,18,38,11,195,69,169,205,151,27,20,8,127,21,243,125,89,43,58,129,1,3,
2418 9,132,254,249,207,127,226,91,144,203,59,8,205,61,149,145,233,11,8,209,181,
2419 94,63,64,122,253,245,215,139,30,143,176,251,230,174,201,152,196,250,208,
2420 213,228,178,75,204,127,201,226,35,8,123,122,122,24,24,114,157,75,108,150,
2421 41,161,249,216,196,51,200,94,64,200,113,186,157,222,210,65,217,139,185,
2422 26,53,16,154,223,6,201,168,62,240,192,3,205,199,134,4,8,189,236,139,131,
2423 55,239,75,3,33,243,27,243,153,112,44,44,187,51,84,50,53,192,76,150,154,
2424 28,170,41,147,124,7,33,237,120,247,221,119,203,20,46,177,47,246,104,182,
2425 236,88,58,113,90,236,195,15,63,52,159,22,38,134,217,174,57,30,9,16,178,
2426 47,172,191,225,76,32,71,5,2,1,155,161,90,112,74,196,89,7,31,65,104,254,
2427 194,3,70,144,218,166,206,205,21,142,252,0,33,173,227,246,89,38,79,205,170,
2428 129,176,202,221,251,161,220,54,43,98,18,233,169,89,17,179,19,153,78,39,
2429 170,212,173,161,192,154,131,7,114,185,5,33,61,132,106,52,79,131,16,195,
2430 31,180,144,145,121,155,161,189,16,179,70,183,229,21,79,236,33,51,8,73,60,
2431 34,16,154,253,123,209,79,220,14,58,12,221,176,32,52,35,141,81,44,206,127,
2432 154,175,14,32,74,205,164,199,109,103,30,22,132,110,237,155,168,109,183,
2433 166,134,24,5,66,41,198,60,166,211,92,179,102,225,231,137,89,57,242,14,66,
2434 243,201,104,198,158,143,32,52,127,11,80,19,7,137,233,148,233,156,122,231,
2435 157,119,204,227,217,32,142,243,252,243,207,23,233,125,4,33,154,62,125,186,
2436 151,55,74,104,58,225,132,19,132,237,240,2,66,216,224,227,55,163,133,52,
2437 16,186,125,247,180,39,9,16,50,38,49,166,190,239,75,3,33,250,252,243,207,
2438 13,39,36,221,10,139,92,180,249,109,147,122,249,14,66,148,158,158,110,254,
2439 58,146,89,76,65,196,73,90,132,27,97,246,161,133,220,246,97,1,66,132,131,
2440 114,206,57,231,12,219,207,49,235,179,103,207,22,109,234,35,8,153,9,153,
2441 77,54,162,21,40,184,92,208,201,15,16,210,172,158,222,217,230,86,26,8,209,
2442 156,57,115,124,105,214,211,78,59,13,191,71,100,113,43,42,240,188,243,206,
2443 243,229,24,160,172,118,127,138,39,16,186,221,14,41,241,47,5,65,17,99,202,
2444 45,101,245,162,230,239,191,255,254,1,207,207,17,178,35,241,246,53,77,222,
2445 65,8,239,205,215,29,16,219,49,199,31,116,208,65,195,130,208,252,22,111,
2446 182,35,222,210,23,27,27,235,118,54,224,73,195,130,144,85,111,191,253,182,
2447 219,74,99,167,102,179,64,140,2,225,175,202,206,206,118,251,29,72,189,246,
2448 223,127,255,69,139,22,9,119,16,121,1,97,117,117,53,35,65,70,185,196,80,
2449 244,17,132,76,238,220,154,15,68,223,98,210,42,211,57,213,209,209,1,56,189,
2450 16,139,230,103,142,169,221,2,224,59,8,25,192,47,191,252,178,249,212,141,
2451 38,250,226,41,167,156,162,217,119,47,32,100,109,84,84,148,217,75,230,216,
2452 206,58,235,44,179,145,210,64,136,233,57,201,221,123,207,111,184,225,6,51,
2453 254,5,8,201,197,33,153,79,163,177,175,11,46,184,192,92,28,61,8,219,218,
2454 218,62,254,248,99,183,103,243,52,177,23,195,61,120,6,141,8,132,88,144,101,
2455 203,150,153,223,67,164,215,145,71,30,41,62,192,36,132,179,238,182,170,233,
2456 114,191,251,221,239,204,187,214,64,136,114,115,115,255,250,215,191,122,
2457 153,37,80,63,204,180,180,71,140,125,4,33,238,154,219,119,81,130,22,243,
2458 105,106,228,7,8,81,82,82,146,249,230,41,154,149,93,155,205,186,30,132,52,
2459 43,222,176,247,102,229,80,189,55,171,16,221,210,124,134,217,32,156,84,220,
2460 29,13,102,110,65,136,207,125,225,133,23,154,27,130,195,208,223,132,213,
2461 210,210,242,212,83,79,121,25,221,244,43,28,56,253,35,225,102,16,162,17,
2462 129,176,180,180,212,109,135,228,128,205,215,216,232,117,195,130,208,124,
2463 247,13,171,196,185,119,204,23,230,200,92,63,28,140,249,234,41,242,5,132,
2464 149,149,149,230,171,93,84,245,229,151,95,174,174,17,14,47,236,245,220,185,
2465 115,49,214,98,226,128,168,107,254,210,72,84,49,214,1,188,137,105,178,16,
2466 32,196,121,103,58,166,23,253,24,219,77,74,166,249,50,202,37,237,26,33,206,
2467 153,140,210,233,47,127,249,139,216,44,42,40,40,96,143,114,197,230,162,251,
2468 154,95,1,131,101,164,7,92,115,205,53,216,116,14,158,3,22,226,55,221,244,
2469 205,55,223,164,183,105,103,83,41,194,35,143,60,34,55,167,147,219,7,234,
2470 217,242,234,213,171,129,25,238,172,97,203,140,118,122,112,85,85,149,182,
2471 101,70,172,220,150,78,48,88,128,144,25,43,134,12,207,91,219,14,181,247,
2472 236,179,207,70,71,71,227,61,203,212,46,81,76,1,66,54,142,207,116,221,117,
2473 215,49,224,69,46,140,194,131,15,62,136,229,101,42,42,83,187,132,187,35,
2474 250,52,251,162,14,207,61,247,92,109,95,100,231,240,226,227,227,153,205,
2475 200,212,46,97,232,197,248,23,162,126,200,139,57,6,180,34,187,232,3,252,
2476 6,216,207,61,247,156,184,66,236,69,128,144,9,169,220,186,75,148,72,188,
2477 1,203,44,142,22,126,83,21,76,141,181,3,70,252,38,227,77,55,221,4,141,180,
2478 74,22,194,182,50,251,161,71,105,41,129,229,154,53,107,232,165,230,93,95,
2479 118,217,101,50,155,83,52,199,151,95,126,137,31,175,85,169,16,41,169,49,
2480 220,205,141,27,55,106,70,156,93,211,208,98,59,154,168,67,226,69,2,33,14,
2481 15,243,253,175,127,253,139,189,139,173,113,72,204,237,136,196,46,203,108,
2482 58,9,16,50,107,148,203,58,221,113,199,29,98,155,102,177,23,154,134,153,
2483 147,86,75,20,225,63,255,249,15,51,140,125,246,217,71,230,119,9,75,170,127,
2484 16,130,102,5,222,183,220,114,139,185,89,233,219,84,166,152,66,249,34,176,
2485 250,213,87,95,97,166,201,59,100,38,116,134,130,86,190,253,246,219,49,196,
2486 122,67,65,97,233,180,242,176,92,98,38,199,118,158,124,242,73,142,103,168,
2487 36,206,35,161,165,152,145,155,219,154,49,8,132,180,35,23,226,55,141,142,
2488 201,18,231,81,53,177,17,185,15,157,12,167,70,153,123,81,106,185,206,165,
2489 253,246,219,79,204,213,56,0,126,92,127,253,245,218,238,248,65,213,81,129,
2490 39,158,120,162,76,237,210,97,135,29,38,64,104,110,77,6,184,120,160,30,143,
2491 80,70,185,68,133,136,83,163,136,236,143,61,246,24,85,167,237,235,140,51,
2492 206,192,44,252,227,31,255,144,169,117,210,186,135,185,159,79,115,125,185,
2493 26,53,54,54,222,119,223,125,88,81,109,155,80,144,186,253,253,239,127,47,
2494 83,187,196,65,234,167,17,227,37,11,129,80,83,76,76,204,7,31,124,128,51,
2495 196,24,131,34,223,126,251,173,184,232,109,22,221,221,32,237,4,133,92,222,
2496 92,98,149,47,194,239,244,36,153,194,157,192,192,250,245,235,233,97,159,
2497 127,254,57,188,196,242,106,22,77,47,58,186,60,32,157,228,58,15,98,203,177,
2498 177,177,108,147,45,51,203,139,136,136,0,174,114,221,72,68,174,13,27,54,
2499 124,253,245,215,191,252,242,203,136,250,95,78,78,206,130,5,11,190,251,238,
2500 59,109,110,43,143,123,115,137,85,66,236,11,179,78,243,49,255,29,150,94,
2501 102,49,9,192,139,253,225,135,31,230,204,153,195,120,166,200,194,124,143,
2502 157,104,151,228,228,100,42,25,247,133,146,2,54,198,179,92,231,78,80,97,
2503 233,210,165,20,16,179,165,117,60,223,85,84,84,132,65,196,166,35,154,67,
2504 176,13,138,99,131,244,221,70,214,236,230,146,235,54,23,199,95,86,86,198,
2505 33,177,65,10,34,250,42,7,38,243,232,36,210,251,167,246,246,118,154,21,127,
2506 194,191,102,165,17,245,205,10,245,41,178,92,55,66,225,113,98,40,94,121,
2507 229,21,12,197,27,111,188,65,175,22,23,86,71,36,230,10,11,23,46,100,204,
2508 178,53,183,163,85,19,211,235,181,107,215,82,240,47,190,248,98,201,146,37,
2509 12,4,183,233,101,21,111,46,3,92,125,17,89,178,178,178,104,77,198,59,128,
2510 97,35,114,133,7,137,29,25,228,101,149,254,144,248,77,61,208,243,169,7,202,
2511 229,221,202,249,174,146,146,146,159,126,250,137,105,31,219,20,3,68,238,
2512 123,115,137,196,227,43,43,130,80,73,41,108,101,6,161,146,146,210,88,75,
2513 129,80,73,201,66,82,32,84,82,10,188,20,8,149,148,44,36,5,66,37,165,192,
2514 75,129,80,73,201,66,82,32,84,82,10,188,20,8,149,148,44,36,5,66,37,165,192,
2515 75,129,80,73,201,66,82,32,84,82,10,188,20,8,149,148,44,36,5,66,37,165,192,
2516 75,129,80,73,201,66,82,32,84,82,10,188,20,8,149,148,172,162,254,254,254,
2517 230,230,230,168,168,168,182,182,54,63,30,193,86,82,82,242,79,10,132,74,
2518 74,227,41,128,215,218,218,90,90,90,186,105,211,166,200,200,200,136,136,
2519 136,245,235,215,243,151,223,133,133,133,149,149,149,117,117,117,10,138,
2520 74,74,99,42,5,66,37,165,241,81,111,111,47,144,131,127,41,41,41,197,197,
2521 197,48,15,71,176,187,187,27,236,181,183,183,227,26,54,54,54,230,229,229,
2522 37,36,36,68,71,71,87,85,85,141,245,27,230,148,148,194,86,10,132,74,74,129,
2523 86,95,95,95,117,117,117,106,106,42,142,32,204,243,254,158,82,120,89,83,
2524 83,19,19,19,19,31,31,95,80,80,96,145,119,51,42,41,133,146,20,8,149,148,
2525 2,42,192,150,149,149,133,171,167,255,38,201,176,2,150,176,51,34,34,2,223,
2526 209,143,23,124,43,41,41,121,145,2,161,146,82,224,212,221,221,157,147,147,
2527 131,35,232,31,204,128,104,110,110,238,166,77,155,70,235,251,0,74,74,74,
2528 72,129,80,73,41,64,130,130,41,41,41,229,229,229,91,226,210,245,247,247,
2529 23,21,21,229,231,231,143,244,28,105,93,93,93,161,83,248,148,237,237,237,
2530 34,178,182,182,86,191,29,14,172,170,170,170,164,164,68,124,228,139,181,
2531 164,175,168,168,208,184,11,137,89,212,190,192,215,208,208,64,250,198,198,
2532 198,150,150,22,22,113,112,197,201,94,126,179,133,166,166,38,103,42,165,
2533 255,223,222,185,54,165,145,132,97,244,255,255,165,88,101,188,113,21,48,
2534 32,32,72,68,238,33,10,137,128,17,48,169,202,158,226,237,237,154,29,98,228,
2535 146,65,118,247,57,31,168,238,153,183,123,154,79,167,158,161,103,16,251,
2536 142,68,40,196,46,192,37,216,11,11,110,191,5,20,117,145,11,209,225,90,83,
2537 61,60,60,32,45,70,165,82,41,188,133,210,16,94,60,30,15,238,193,233,247,
2538 251,133,66,129,117,114,138,5,159,158,158,246,122,189,193,96,224,101,137,
2539 222,56,216,110,183,185,52,48,60,147,201,144,80,1,137,50,109,50,153,228,
2540 18,84,82,131,113,109,148,16,123,142,68,40,196,46,248,252,249,179,217,194,
2541 245,183,3,141,37,18,9,20,229,250,171,129,186,240,19,32,54,210,30,162,66,
2542 99,65,17,18,88,137,119,156,197,130,147,201,196,255,225,184,7,17,102,179,
2543 89,219,179,131,89,175,174,174,24,130,95,75,165,210,124,62,231,11,98,122,
2544 36,202,217,98,177,168,68,40,254,45,72,132,66,68,206,120,60,38,135,253,89,
2545 49,144,222,112,146,207,106,171,64,49,105,207,110,108,162,100,188,200,12,
2546 65,17,30,28,28,32,63,114,30,58,196,148,196,187,163,163,163,122,189,238,
2547 175,130,8,49,28,34,124,124,124,68,123,152,56,159,207,19,4,47,47,47,249,
2548 142,156,98,114,68,72,59,157,78,163,70,27,37,196,158,35,17,10,17,45,248,
2549 198,164,229,250,1,16,12,30,66,36,248,99,131,176,120,126,126,62,28,14,93,
2550 103,5,184,74,185,92,14,186,51,36,194,119,239,222,145,92,73,120,136,141,
2551 53,211,160,184,213,106,17,254,172,0,17,86,42,149,219,219,219,94,175,135,
2552 32,209,33,34,68,120,76,75,49,106,164,30,17,146,53,131,250,20,98,207,145,
2553 8,133,136,22,60,145,201,100,80,136,235,255,13,158,192,28,36,167,247,239,
2554 223,19,194,186,221,174,59,177,50,4,178,144,216,126,15,174,194,79,174,179,
2555 32,36,194,92,46,71,108,69,174,216,142,6,226,100,114,180,231,179,44,223,
2556 162,90,173,34,75,76,201,226,25,107,34,228,8,113,16,59,98,125,139,137,28,
2557 161,109,163,132,216,115,36,66,33,162,133,104,133,51,150,173,128,48,142,
2558 143,143,219,237,54,34,225,51,22,139,221,223,223,187,115,171,241,252,252,
2559 140,165,38,147,137,235,191,6,122,195,79,174,179,192,68,104,38,35,146,34,
2560 60,12,199,193,78,167,131,14,105,208,197,157,92,200,234,77,132,211,233,52,
2561 149,74,145,20,25,104,34,132,100,50,105,190,36,224,18,85,125,136,20,98,255,
2562 145,8,133,136,22,68,178,188,171,197,28,214,104,52,188,32,241,10,254,88,
2563 14,142,191,129,177,165,82,105,245,187,163,8,44,244,0,34,153,143,73,56,104,
2564 59,104,104,179,128,241,120,108,109,26,88,13,201,185,234,197,47,139,136,
2565 147,83,12,100,148,53,248,228,20,3,237,238,46,99,105,175,158,83,133,120,
2566 115,36,66,33,162,133,56,136,81,92,231,111,72,90,137,68,34,168,61,212,136,
2567 8,107,181,154,121,101,69,8,121,204,239,58,155,130,192,176,221,90,215,21,
2568 226,191,132,68,40,68,180,160,183,96,168,130,201,100,18,139,197,66,49,17,
2569 15,53,155,205,227,227,99,255,180,251,42,244,251,253,106,181,234,58,66,136,
2570 141,144,8,133,136,144,239,223,191,135,68,136,240,174,175,175,115,185,220,
2571 242,93,80,66,97,58,157,46,149,74,171,239,32,29,14,135,39,39,39,174,35,132,
2572 216,8,137,80,136,8,121,122,122,202,102,179,193,95,230,16,225,151,47,95,
2573 66,155,86,60,36,188,179,179,179,95,238,52,177,200,200,88,215,95,48,30,143,
2574 79,79,79,67,137,83,8,177,22,18,161,16,209,18,18,225,171,196,227,241,106,
2575 181,186,28,10,103,179,25,225,47,244,115,35,221,68,34,225,58,66,136,141,
2576 144,8,133,136,150,124,62,191,214,207,126,100,62,92,184,252,80,68,169,84,
2577 42,22,139,33,65,82,220,110,183,93,231,5,200,139,181,90,173,94,175,163,82,
2578 123,47,26,224,218,160,83,105,95,95,95,91,220,164,254,230,230,134,154,225,
2579 112,232,119,208,220,223,223,247,122,61,219,11,74,65,171,213,178,183,120,
2580 251,245,176,96,38,167,158,154,78,167,67,20,182,227,66,236,63,18,161,16,
2581 209,178,214,19,14,64,124,196,157,104,201,245,23,32,170,179,179,179,208,
2582 125,81,192,112,248,201,117,126,5,90,42,151,203,200,18,243,85,42,21,28,134,
2583 149,153,167,80,40,140,22,127,25,1,207,139,191,72,164,6,1,115,117,124,102,
2584 242,246,143,15,2,235,73,165,82,166,55,190,206,225,225,33,182,35,140,250,
2585 103,31,27,141,70,191,223,71,132,12,79,167,211,219,239,101,21,98,103,72,
2586 132,66,68,11,134,88,247,73,121,156,116,116,116,100,47,106,161,139,126,144,
2587 80,232,165,48,64,26,179,119,161,185,254,175,160,6,89,162,183,193,96,128,
2588 146,241,34,115,118,187,93,86,229,195,156,197,65,106,72,156,148,97,56,123,
2589 136,222,199,65,224,72,46,151,67,114,140,34,14,218,187,182,169,228,32,101,
2590 166,82,230,161,205,226,111,111,111,145,174,89,147,50,190,126,208,169,66,
2591 236,27,18,161,16,209,130,60,16,67,80,42,175,130,147,16,143,253,11,18,118,
2592 65,54,4,184,229,155,141,148,33,164,229,221,167,203,224,33,84,135,255,76,
2593 90,88,138,85,185,115,139,21,146,23,113,36,53,120,139,179,40,243,230,230,
2594 230,235,215,175,126,217,124,5,142,144,243,200,148,87,87,87,116,169,100,
2595 42,66,33,11,35,35,114,138,245,48,137,189,122,155,98,123,203,154,189,61,
2596 142,227,54,143,16,123,136,68,40,68,180,96,142,108,54,187,214,207,132,64,
2597 240,34,111,101,50,25,116,136,99,150,45,8,20,32,45,31,236,94,130,130,102,
2598 179,201,36,22,203,70,163,81,62,159,15,154,41,36,66,172,198,106,249,68,198,
2599 190,12,243,17,236,80,50,199,201,124,132,66,42,241,28,51,227,57,206,178,
2600 24,186,119,119,119,7,7,7,23,23,23,177,88,204,2,40,89,118,21,85,11,241,134,
2601 72,132,66,68,14,130,41,151,203,175,26,43,4,94,177,29,40,174,255,79,176,
2602 90,173,86,67,60,174,255,2,76,130,183,236,215,65,59,130,192,88,143,181,13,
2603 180,135,8,113,45,194,70,147,64,182,35,14,146,234,130,34,228,8,3,201,160,
2604 131,193,128,57,77,132,172,144,180,106,129,213,180,199,146,72,177,20,19,
2605 28,153,57,157,78,79,167,83,155,68,136,253,68,34,20,34,114,240,10,9,105,
2606 121,171,203,54,144,204,206,207,207,95,149,43,162,58,60,60,36,86,162,40,
2607 52,134,171,80,154,255,89,17,165,177,42,38,193,121,241,120,220,254,203,130,
2608 180,71,155,84,135,131,81,157,85,146,252,112,27,217,238,228,228,4,177,145,
2609 2,109,107,12,245,168,17,143,82,131,2,139,197,162,213,115,138,121,240,37,
2610 161,86,34,20,123,142,68,40,196,46,64,27,118,171,208,245,183,3,189,33,54,
2611 92,232,250,47,131,144,208,176,97,87,71,123,94,111,118,11,212,14,82,96,90,
2612 181,33,20,251,50,240,163,108,18,218,254,44,167,252,64,107,24,214,253,83,
2613 95,89,136,232,144,8,133,216,5,40,129,188,85,169,84,112,140,59,180,41,179,
2614 217,12,167,146,201,92,127,11,230,11,92,71,136,255,43,18,161,16,59,226,219,
2615 183,111,201,100,242,195,135,15,219,184,16,111,101,179,89,255,100,133,16,
2616 98,123,36,66,33,118,199,116,58,77,36,18,228,66,219,192,185,46,100,65,44,
2617 216,126,237,85,50,66,136,181,144,8,133,216,41,79,79,79,197,98,241,242,242,
2618 242,241,241,113,245,104,72,165,61,17,255,251,247,200,8,33,54,64,34,20,98,
2619 215,252,248,241,227,211,167,79,241,120,188,94,175,175,178,225,101,52,26,
2620 93,92,92,212,106,53,123,117,139,59,42,132,248,67,72,132,66,188,13,132,188,
2621 106,181,154,76,38,155,205,102,191,223,71,114,100,196,231,5,179,217,108,
2622 50,153,220,221,221,117,187,221,143,31,63,230,243,121,92,40,5,10,17,17,18,
2623 161,16,111,9,206,235,245,122,173,86,235,122,65,163,209,40,20,10,132,63,
2624 107,119,58,157,135,135,7,61,129,32,68,164,72,132,66,188,61,254,145,59,152,
2625 207,231,124,210,85,4,20,98,23,252,252,249,23,247,22,197,121,219,202,139,
2626 117,0,0,0,0,73,69,78,68,174,66,96,130};
2627 
2628 static size_t xml_res_size_1 = 242;
2629 static unsigned char xml_res_file_1[] = {
2630 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
2631 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
2632 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
2633 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
2634 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
2635 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
2636 45,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,
2637 120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,65,98,111,117,116,
2638 50,48,49,55,34,62,80,114,111,112,101,114,116,105,101,115,70,111,114,109,
2639 66,105,116,109,97,112,115,46,99,112,112,36,100,97,116,97,95,105,109,97,
2640 103,101,115,95,65,98,111,117,116,50,48,49,55,46,112,110,103,60,47,111,98,
2641 106,101,99,116,62,10,60,47,114,101,115,111,117,114,99,101,62,10};
2642 
2643 void wxCDAD0InitBitmapResources()
2644 {
2645 
2646  // Check for memory FS. If not present, load the handler:
2647  {
2648  wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
2649  wxFileSystem fsys;
2650  wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
2651  wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
2652  if (f) delete f;
2653  else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
2654  }
2655 
2656  XRC_ADD_FILE(wxT("XRC_resource/PropertiesFormBitmaps.cpp$data_images_About2017.png"), xml_res_file_0, xml_res_size_0, wxT("image/png"));
2657  XRC_ADD_FILE(wxT("XRC_resource/PropertiesFormBitmaps.cpp$_home_thales_Documentos_GitHub_PSP_Project_PropertiesFormBitmaps.xrc"), xml_res_file_1, xml_res_size_1, wxT("text/xml"));
2658  wxXmlResource::Get()->Load(wxT("memory:XRC_resource/PropertiesFormBitmaps.cpp$_home_thales_Documentos_GitHub_PSP_Project_PropertiesFormBitmaps.xrc"));
2659 }
-
- - - - diff --git a/docs/doxygen/html/_rate_limiter_8cpp_source.html b/docs/doxygen/html/_rate_limiter_8cpp_source.html deleted file mode 100644 index f44a803..0000000 --- a/docs/doxygen/html/_rate_limiter_8cpp_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/RateLimiter.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
RateLimiter.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "RateLimiter.h"
19 #include "RateLimiterForm.h"
20 
21 RateLimiter::RateLimiter(int id) : ControlElement(id)
22 {
23  m_width = m_height = 36.0;
24  Node* nodeIn = new Node(m_position + wxPoint2DDouble(-18, 0), Node::NODE_IN, m_borderSize);
25  nodeIn->StartMove(m_position);
26  Node* nodeOut = new Node(m_position + wxPoint2DDouble(18, 0), Node::NODE_OUT, m_borderSize);
27  nodeOut->SetAngle(180.0);
28  nodeOut->StartMove(m_position);
29  m_nodeList.push_back(nodeIn);
30  m_nodeList.push_back(nodeOut);
31 }
32 
33 RateLimiter::~RateLimiter() {}
34 void RateLimiter::Draw(wxPoint2DDouble translation, double scale) const
35 {
36  glLineWidth(1.0);
37  if(m_selected) {
38  glColor4dv(m_selectionColour.GetRGBA());
39  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
40  DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
41  }
42  glColor4d(1.0, 1.0, 1.0, 1.0);
43  DrawRectangle(m_position, m_width, m_height);
44  glColor4d(0.0, 0.0, 0.0, 1.0);
45  DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
46 
47  // Plot symbol.
48  std::vector<wxPoint2DDouble> axis;
49  axis.push_back(m_position + wxPoint2DDouble(-13, 0));
50  axis.push_back(m_position + wxPoint2DDouble(13, 0));
51  axis.push_back(m_position + wxPoint2DDouble(0, -13));
52  axis.push_back(m_position + wxPoint2DDouble(0, 13));
53  DrawLine(axis, GL_LINES);
54 
55  glLineWidth(2.0);
56  std::vector<wxPoint2DDouble> limSymbol;
57  limSymbol.push_back(m_position + wxPoint2DDouble(10, -10));
58  limSymbol.push_back(m_position + wxPoint2DDouble(-10, 10));
59  glColor4d(0.0, 0.3, 1.0, 1.0);
60  DrawLine(limSymbol);
61 
62  glColor4d(0.0, 0.0, 0.0, 1.0);
63  DrawNodes();
64 }
65 
66 bool RateLimiter::ShowForm(wxWindow* parent, Element* element)
67 {
68  RateLimiterForm* form = new RateLimiterForm(parent, this);
69  if(form->ShowModal() == wxID_OK) {
70  form->Destroy();
71  return true;
72  }
73  form->Destroy();
74  return false;
75 }
76 
77 void RateLimiter::Rotate(bool clockwise)
78 {
79  if(clockwise)
80  m_angle += 90.0;
81  else
82  m_angle -= 90.0;
83  if(m_angle >= 360.0)
84  m_angle = 0.0;
85  else if(m_angle < 0)
86  m_angle = 270.0;
87 
88  UpdatePoints();
89 
90  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
91  Node* node = *it;
92  node->Rotate(clockwise);
93  }
94 }
95 
96 void RateLimiter::UpdatePoints()
97 {
98  if(m_angle == 0.0) {
99  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
100  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(18, 0));
101  } else if(m_angle == 90.0) {
102  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -18));
103  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, 18));
104  } else if(m_angle == 180.0) {
105  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(18, 0));
106  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-18, 0));
107  } else if(m_angle == 270.0) {
108  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, 18));
109  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -18));
110  }
111 }
112 
113 bool RateLimiter::Solve(double input, double timeStep)
114 {
115  double rate = (input - m_output) / timeStep;
116 
117  bool reachLimit = false;
118  if(rate > m_upLimit) {
119  rate = m_upLimit;
120  reachLimit = true;
121  } else if(rate < m_lowLimit) {
122  rate = m_lowLimit;
123  reachLimit = true;
124  }
125 
126  if(reachLimit)
127  m_output += rate * timeStep;
128  else
129  m_output = input;
130  return true;
131 }
132 
134 {
135  RateLimiter* copy = new RateLimiter(m_elementID);
136  *copy = *this;
137  return copy;
138 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: RateLimiter.cpp:66
-
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
-
virtual bool Solve(double input, double timeStep)
Calculate the rate and limits it if exceeds.
- -
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: RateLimiter.cpp:77
- - -
virtual Element * GetCopy()
Get a the element copy.
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: RateLimiter.cpp:34
-
Form to edit the rate limit control data.
-
-
- - - - diff --git a/docs/doxygen/html/_rate_limiter_8h.html b/docs/doxygen/html/_rate_limiter_8h.html index 1721183..bf3b205 100644 --- a/docs/doxygen/html/_rate_limiter_8h.html +++ b/docs/doxygen/html/_rate_limiter_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_rate_limiter_8h.html','');});
RateLimiter.h File Reference
-
#include "ControlElement.h"
-
-

Go to the source code of this file.

- +
#include "ControlElement.h"
+
diff --git a/docs/doxygen/html/_rate_limiter_8h_source.html b/docs/doxygen/html/_rate_limiter_8h_source.html deleted file mode 100644 index 3374e92..0000000 --- a/docs/doxygen/html/_rate_limiter_8h_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/RateLimiter.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  RateLimiter
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
RateLimiter.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef RATELIMITER_H
19 #define RATELIMITER_H
20 
21 #include "ControlElement.h"
22 
23 class RateLimiterForm;
24 
33 {
34  public:
35  RateLimiter(int id);
36  ~RateLimiter();
37 
38  virtual void Draw(wxPoint2DDouble translation, double scale) const;
39  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
40  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
41  virtual bool ShowForm(wxWindow* parent, Element* element);
42  virtual void Rotate(bool clockwise = true);
43 
44  virtual void UpdatePoints();
45 
46  double GetUpLimit() const { return m_upLimit; }
47  double GetLowLimit() const { return m_lowLimit; }
48  void SetUpLimit(double upLimit) { m_upLimit = upLimit; }
49  void SetLowLimit(double lowLimit) { m_lowLimit = lowLimit; }
66  virtual bool Solve(double input, double timeStep);
67 
68  virtual Element* GetCopy();
69 
70  protected:
71  double m_upLimit = 5.0;
72  double m_lowLimit = -5.0;
73 };
74 
75 #endif // RATELIMITER_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: RateLimiter.cpp:66
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: RateLimiter.h:40
-
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
-
virtual bool Solve(double input, double timeStep)
Calculate the rate and limits it if exceeds.
-
Base class of a control element. Provide general methods to other control classes.
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: RateLimiter.cpp:77
- -
virtual Element * GetCopy()
Get a the element copy.
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: RateLimiter.h:39
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: RateLimiter.cpp:34
-
Form to edit the rate limit control data.
-
-
- - - - diff --git a/docs/doxygen/html/_rate_limiter_form_8cpp_source.html b/docs/doxygen/html/_rate_limiter_form_8cpp_source.html deleted file mode 100644 index b23f724..0000000 --- a/docs/doxygen/html/_rate_limiter_form_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/RateLimiterForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
RateLimiterForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "RateLimiterForm.h"
19 #include "RateLimiter.h"
20 
21 RateLimiterForm::RateLimiterForm(wxWindow* parent, RateLimiter* rateLimiter) : RateLimiterFormBase(parent)
22 {
23  SetSize(GetBestSize());
24 
25  m_rateLimiter = rateLimiter;
26  m_parent = parent;
27 
28  m_textCtrlUpLimit->SetValue(m_rateLimiter->StringFromDouble(m_rateLimiter->GetUpLimit()));
29  m_textCtrlLowLimit->SetValue(m_rateLimiter->StringFromDouble(m_rateLimiter->GetLowLimit()));
30 }
31 
32 RateLimiterForm::~RateLimiterForm() {}
33 bool RateLimiterForm::ValidateData()
34 {
35  double upLimit;
36  double lowLimit;
37 
38  if(!m_rateLimiter->DoubleFromString(this, m_textCtrlUpLimit->GetValue(), upLimit,
39  _("Value entered incorrectly in the field \"Upper limit\".")))
40  return false;
41  if(!m_rateLimiter->DoubleFromString(this, m_textCtrlLowLimit->GetValue(), lowLimit,
42  _("Value entered incorrectly in the field \"Lower limit\".")))
43  return false;
44 
45  m_rateLimiter->SetUpLimit(upLimit);
46  m_rateLimiter->SetLowLimit(lowLimit);
47 
48  return true;
49 }
50 
51 void RateLimiterForm::OnOKButtonClick(wxCommandEvent& event)
52 {
53  if(ValidateData()) EndModal(wxID_OK);
54 }
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
- - - -
-
- - - - diff --git a/docs/doxygen/html/_rate_limiter_form_8h.html b/docs/doxygen/html/_rate_limiter_form_8h.html index a2da6a5..0a8b2cd 100644 --- a/docs/doxygen/html/_rate_limiter_form_8h.html +++ b/docs/doxygen/html/_rate_limiter_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_rate_limiter_form_8h.html','');});
RateLimiterForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_rate_limiter_form_8h_source.html b/docs/doxygen/html/_rate_limiter_form_8h_source.html deleted file mode 100644 index 8973a65..0000000 --- a/docs/doxygen/html/_rate_limiter_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/RateLimiterForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  RateLimiterForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
RateLimiterForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef RATELIMITERFORM_H
19 #define RATELIMITERFORM_H
20 #include "ElementForm.h"
21 
22 class RateLimiter;
23 
32 {
33  public:
34  RateLimiterForm(wxWindow* parent, RateLimiter* rateLimiter);
35  virtual ~RateLimiterForm();
36  bool ValidateData();
37 
38  protected:
39  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_OK); }
40  virtual void OnOKButtonClick(wxCommandEvent& event);
41 
42  wxWindow* m_parent = NULL;
43  RateLimiter* m_rateLimiter = NULL;
44 };
45 #endif // RATELIMITERFORM_H
Limits the rising and/or falling rate.
Definition: RateLimiter.h:32
- -
Form to edit the rate limit control data.
-
-
- - - - diff --git a/docs/doxygen/html/_reactive_shunt_element_form_8cpp_source.html b/docs/doxygen/html/_reactive_shunt_element_form_8cpp_source.html deleted file mode 100644 index 7d13283..0000000 --- a/docs/doxygen/html/_reactive_shunt_element_form_8cpp_source.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - -Project/ReactiveShuntElementForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ReactiveShuntElementForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
19 #include "SwitchingForm.h"
20 #include "Capacitor.h"
21 #include "Inductor.h"
22 
23 ReactiveShuntElementForm::ReactiveShuntElementForm(wxWindow* parent, Capacitor* capacitor)
25 {
26  SetSize(GetBestSize());
27  CapacitorElectricalData data = capacitor->GetElectricalData();
28 
29  m_textCtrlName->SetValue(data.name);
30 
31  m_textCtrlReactivePower->SetValue(Capacitor::StringFromDouble(data.reactivePower));
32  switch(data.reactivePowerUnit) {
33  case UNIT_PU: {
34  m_choiceReactivePower->SetSelection(0);
35  } break;
36  case UNIT_VAr: {
37  m_choiceReactivePower->SetSelection(1);
38  } break;
39  case UNIT_kVAr: {
40  m_choiceReactivePower->SetSelection(2);
41  } break;
42  case UNIT_MVAr: {
43  m_choiceReactivePower->SetSelection(3);
44  } break;
45  default:
46  break;
47  }
48 
49  m_parent = parent;
50  m_capacitor = capacitor;
51 }
52 
53 ReactiveShuntElementForm::ReactiveShuntElementForm(wxWindow* parent, Inductor* inductor)
55 {
56  InductorElectricalData data = inductor->GetElectricalData();
57 
58  m_textCtrlName->SetValue(data.name);
59 
60  m_textCtrlReactivePower->SetValue(Inductor::StringFromDouble(data.reactivePower));
61  switch(data.reactivePowerUnit) {
62  case UNIT_PU: {
63  m_choiceReactivePower->SetSelection(0);
64  } break;
65  case UNIT_VAr: {
66  m_choiceReactivePower->SetSelection(1);
67  } break;
68  case UNIT_kVAr: {
69  m_choiceReactivePower->SetSelection(2);
70  } break;
71  case UNIT_MVAr: {
72  m_choiceReactivePower->SetSelection(3);
73  } break;
74  default:
75  break;
76  }
77 
78  m_parent = parent;
79  m_inductor = inductor;
80 }
81 
82 ReactiveShuntElementForm::~ReactiveShuntElementForm() {}
83 void ReactiveShuntElementForm::OnOKButtonClick(wxCommandEvent& event)
84 {
85  if(ValidateData()) EndModal(wxID_OK);
86 }
87 
88 void ReactiveShuntElementForm::OnStabilityButtonClick(wxCommandEvent& event)
89 {
90  if(ValidateData()) {
91  if(m_capacitor) {
92  SwitchingForm swForm(m_parent, m_capacitor);
93  swForm.SetTitle(_("Capacitor: Switching"));
94  swForm.ShowModal();
95  } else if(m_inductor) {
96  SwitchingForm swForm(m_parent, m_inductor);
97  swForm.SetTitle(_("Inductor: Switching"));
98  swForm.ShowModal();
99  }
100 
101  EndModal(wxID_OK);
102  }
103 }
104 
105 bool ReactiveShuntElementForm::ValidateData()
106 {
107  if(m_capacitor) {
109 
110  data.name = m_textCtrlName->GetValue();
111 
112  if(!m_capacitor->DoubleFromString(m_parent, m_textCtrlReactivePower->GetValue(), data.reactivePower,
113  _("Value entered incorrectly in the field \"Reactive power\".")))
114  return false;
115  switch(m_choiceReactivePower->GetSelection()) {
116  case 0: {
117  data.reactivePowerUnit = UNIT_PU;
118  } break;
119  case 1: {
120  data.reactivePowerUnit = UNIT_VAr;
121  } break;
122  case 2: {
123  data.reactivePowerUnit = UNIT_kVAr;
124  } break;
125  case 3: {
126  data.reactivePowerUnit = UNIT_MVAr;
127  } break;
128  }
129 
130  m_capacitor->SetElectricalData(data);
131  } else if(m_inductor) {
133 
134  data.name = m_textCtrlName->GetValue();
135 
136  if(!m_inductor->DoubleFromString(m_parent, m_textCtrlReactivePower->GetValue(), data.reactivePower,
137  _("Value entered incorrectly in the field \"Reactive power\".")))
138  return false;
139  switch(m_choiceReactivePower->GetSelection()) {
140  case 0: {
141  data.reactivePowerUnit = UNIT_PU;
142  } break;
143  case 1: {
144  data.reactivePowerUnit = UNIT_VAr;
145  } break;
146  case 2: {
147  data.reactivePowerUnit = UNIT_kVAr;
148  } break;
149  case 3: {
150  data.reactivePowerUnit = UNIT_MVAr;
151  } break;
152  }
153 
154  m_inductor->SetElectricalData(data);
155  }
156  return true;
157 }
-
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
- - - - - - - - -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
-
Shunt capactior power element.
Definition: Capacitor.h:38
-
Inductor shunt power element.
Definition: Inductor.h:38
- - -
-
- - - - diff --git a/docs/doxygen/html/_reactive_shunt_element_form_8h.html b/docs/doxygen/html/_reactive_shunt_element_form_8h.html index 970bb11..cd1b8fd 100644 --- a/docs/doxygen/html/_reactive_shunt_element_form_8h.html +++ b/docs/doxygen/html/_reactive_shunt_element_form_8h.html @@ -90,11 +90,9 @@ $(document).ready(function(){initNavTree('_reactive_shunt_element_form_8h.html',
ReactiveShuntElementForm.h File Reference
-
#include "ElementForm.h"
+
#include "base/ElementFormBase.h"
#include <wx/log.h>
-
-

Go to the source code of this file.

- +
diff --git a/docs/doxygen/html/_reactive_shunt_element_form_8h_source.html b/docs/doxygen/html/_reactive_shunt_element_form_8h_source.html deleted file mode 100644 index 06693ba..0000000 --- a/docs/doxygen/html/_reactive_shunt_element_form_8h_source.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - -Project/ReactiveShuntElementForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  ReactiveShuntElementForm
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ReactiveShuntElementForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef REACTIVESHUNTELEMENTFORM_H
19 #define REACTIVESHUNTELEMENTFORM_H
20 #include "ElementForm.h"
21 #include <wx/log.h>
22 
23 class Capacitor;
24 class Inductor;
25 class SwitchingForm;
26 
35 {
36  public:
37  ReactiveShuntElementForm(wxWindow* parent, Capacitor* capacitor);
38  ReactiveShuntElementForm(wxWindow* parent, Inductor* inductor);
39  virtual ~ReactiveShuntElementForm();
40  virtual bool ValidateData();
41 
42  protected:
43  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
44  virtual void OnOKButtonClick(wxCommandEvent& event);
45  virtual void OnStabilityButtonClick(wxCommandEvent& event);
46 
47  wxWindow* m_parent;
48  Capacitor* m_capacitor = NULL;
49  Inductor* m_inductor = NULL;
50 };
51 #endif // REACTIVESHUNTELEMENTFORM_H
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
- -
Shunt capactior power element.
Definition: Capacitor.h:38
-
Inductor shunt power element.
Definition: Inductor.h:38
-
Form to edit the reactive shunt element power data.
-
-
- - - - diff --git a/docs/doxygen/html/_shunt_8cpp_source.html b/docs/doxygen/html/_shunt_8cpp_source.html deleted file mode 100644 index 5823fd9..0000000 --- a/docs/doxygen/html/_shunt_8cpp_source.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - -Project/Shunt.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Shunt.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Shunt.h"
19 
20 Shunt::Shunt() : PowerElement() {}
21 Shunt::~Shunt() {}
22 void Shunt::UpdateSwitchesPosition()
23 {
24  if(m_parentList[0]) {
25  m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], m_pointList[2]);
26  } else {
27  m_pointList[1] = m_pointList[0];
28  }
29  UpdateSwitches();
30 }
31 
32 void Shunt::Move(wxPoint2DDouble position)
33 {
34  SetPosition(m_movePos + position - m_moveStartPt);
35  for(int i = 2; i < (int)m_pointList.size(); i++) {
36  m_pointList[i] = m_movePts[i] + position - m_moveStartPt;
37  }
38  if(!m_parentList[0]) {
39  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
40  }
41  UpdateSwitchesPosition();
42  UpdatePowerFlowArrowsPosition();
43 }
44 
45 void Shunt::MoveNode(Element* element, wxPoint2DDouble position)
46 {
47  if(element) {
48  if(element == m_parentList[0]) {
49  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
50  }
51  } else {
52  if(m_activeNodeID == 1) {
53  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
54  if(m_parentList[0]) {
55  m_parentList[0]->RemoveChild(this);
56  m_parentList[0] = NULL;
57  m_online = false;
58  }
59  }
60  }
61 
62  // Recalculate switches positions
63  UpdateSwitchesPosition();
64  UpdatePowerFlowArrowsPosition();
65 }
66 
67 void Shunt::StartMove(wxPoint2DDouble position)
68 {
69  m_moveStartPt = position;
70  m_movePts = m_pointList;
71  m_movePos = m_position;
72 }
73 
75 {
76  if(parent == m_parentList[0]) {
77  m_parentList[0] = NULL;
78  m_online = false;
79  UpdateSwitchesPosition();
80  UpdatePowerFlowArrowsPosition();
81  }
82 }
83 
84 bool Shunt::NodeContains(wxPoint2DDouble position)
85 {
86  wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
87  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
88 
89  if(nodeRect.Contains(position)) {
90  m_activeNodeID = 1;
91  return true;
92  }
93 
94  m_activeNodeID = 0;
95  return false;
96 }
97 
99 {
100  if(parent && m_activeNodeID != 0) {
101  wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
102  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
103 
104  if(parent->Intersects(nodeRect)) {
105  m_parentList[0] = parent;
106 
107  // Centralize the node on bus.
108  wxPoint2DDouble parentPt =
109  parent->RotateAtPosition(m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position.
110  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
111  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle());
112  m_pointList[0] = parentPt;
113 
114  UpdateSwitchesPosition();
115  UpdatePowerFlowArrowsPosition();
116  return true;
117  } else {
118  m_parentList[0] = NULL;
119  m_online = false;
120  }
121  }
122  return false;
123 }
124 
126 {
127  if(m_parentList[0]) {
128  wxRect2DDouble nodeRect(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
129  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
130 
131  if(!m_parentList[0]->Intersects(nodeRect)) {
132  m_parentList[0]->RemoveChild(this);
133  m_parentList[0] = NULL;
134  m_online = false;
135  UpdateSwitchesPosition();
136  UpdatePowerFlowArrowsPosition();
137  }
138  }
139 }
140 
141 void Shunt::RotateNode(Element* parent, bool clockwise)
142 {
143  double rotAngle = m_rotationAngle;
144  if(!clockwise) rotAngle = -m_rotationAngle;
145 
146  if(parent == m_parentList[0]) {
147  m_pointList[0] = parent->RotateAtPosition(m_pointList[0], rotAngle);
148  UpdateSwitchesPosition();
149  UpdatePowerFlowArrowsPosition();
150  }
151 }
152 
153 void Shunt::DrawGround(wxPoint2DDouble position) const
154 {
155  std::vector<wxPoint2DDouble> groundPts;
156  groundPts.push_back(position);
157  groundPts.push_back(position + wxPoint2DDouble(0, 10));
158  groundPts.push_back(position + wxPoint2DDouble(-10, 10));
159  groundPts.push_back(position + wxPoint2DDouble(10, 10));
160  groundPts.push_back(position + wxPoint2DDouble(-6, 15));
161  groundPts.push_back(position + wxPoint2DDouble(6, 15));
162  groundPts.push_back(position + wxPoint2DDouble(-3, 20));
163  groundPts.push_back(position + wxPoint2DDouble(3, 20));
164 
165  DrawLine(groundPts, GL_LINES);
166 }
167 
168 void Shunt::UpdatePowerFlowArrowsPosition()
169 {
170  std::vector<wxPoint2DDouble> edges;
171  switch(m_pfDirection) {
172  case PF_NONE: {
173  m_powerFlowArrow.clear();
174  } break;
175  case PF_TO_BUS: {
176  edges.push_back(m_pointList[2]);
177  edges.push_back(m_pointList[1]);
178  } break;
179  case PF_TO_ELEMENT: {
180  edges.push_back(m_pointList[1]);
181  edges.push_back(m_pointList[2]);
182  } break;
183  default:
184  break;
185  }
186  CalculatePowerFlowPts(edges);
187 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
virtual void MoveNode(Element *element, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
Definition: Shunt.cpp:45
-
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
Definition: Shunt.cpp:125
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Shunt.cpp:74
-
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
-
virtual bool Intersects(wxRect2DDouble rect) const =0
Check if the element&#39;s rect intersects other rect.
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Shunt.cpp:141
- -
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Shunt.cpp:32
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Shunt.cpp:67
- - -
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Shunt.cpp:98
-
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement...
Definition: Shunt.cpp:84
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
-
-
- - - - diff --git a/docs/doxygen/html/_shunt_8h.html b/docs/doxygen/html/_shunt_8h.html index 6562b7d..e1311a9 100644 --- a/docs/doxygen/html/_shunt_8h.html +++ b/docs/doxygen/html/_shunt_8h.html @@ -90,11 +90,9 @@ $(document).ready(function(){initNavTree('_shunt_8h.html','');});
Shunt.h File Reference
-
#include "PowerElement.h"
-#include "Bus.h"
-
-

Go to the source code of this file.

- +
#include "PowerElement.h"
+#include "Bus.h"
+
diff --git a/docs/doxygen/html/_shunt_8h_source.html b/docs/doxygen/html/_shunt_8h_source.html deleted file mode 100644 index 193f8f3..0000000 --- a/docs/doxygen/html/_shunt_8h_source.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - -Project/Shunt.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Shunt
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Shunt.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef SHUNT_H
19 #define SHUNT_H
20 
21 #include "PowerElement.h"
22 #include "Bus.h"
23 
31 class Shunt : public PowerElement
32 {
33  public:
34  Shunt();
35  ~Shunt();
36 
37  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
38  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
39  virtual void Move(wxPoint2DDouble position);
40  virtual void MoveNode(Element* element, wxPoint2DDouble position);
41  virtual void StartMove(wxPoint2DDouble position);
42  virtual void RotateNode(Element* parent, bool clockwise = true);
43  virtual void RemoveParent(Element* parent);
44  virtual bool NodeContains(wxPoint2DDouble position);
45  virtual bool SetNodeParent(Element* parent);
46  virtual void UpdateNodes();
47 
48  protected:
49  void UpdateSwitchesPosition();
50  void UpdatePowerFlowArrowsPosition();
51  void DrawGround(wxPoint2DDouble position) const;
52  bool m_inserted = false;
53 };
54 
55 #endif // SHUNT_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void MoveNode(Element *element, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
Definition: Shunt.cpp:45
-
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
Definition: Shunt.cpp:125
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Shunt.cpp:74
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Shunt.cpp:141
- -
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Shunt.cpp:32
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Shunt.h:37
- -
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Shunt.cpp:67
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Shunt.cpp:98
-
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement...
Definition: Shunt.cpp:84
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
Abstract class for shunt power elements.
Definition: Shunt.h:31
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Shunt.h:38
-
-
- - - - diff --git a/docs/doxygen/html/_simulations_settings_form_8cpp_source.html b/docs/doxygen/html/_simulations_settings_form_8cpp_source.html deleted file mode 100644 index 38f5b6c..0000000 --- a/docs/doxygen/html/_simulations_settings_form_8cpp_source.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - -Project/SimulationsSettingsForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SimulationsSettingsForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
19 #include "PropertiesData.h"
20 
21 SimulationsSettingsForm::SimulationsSettingsForm(wxWindow* parent, PropertiesData* properties)
23 {
24  m_properties = properties;
25  auto data = m_properties->GetSimulationPropertiesData();
26 
27  m_textCtrlbasePower->SetValue(Element::StringFromDouble(data.basePower));
28  switch(data.basePowerUnit) {
29  case UNIT_VA: {
30  m_choiceBasePower->SetSelection(0);
31  } break;
32  case UNIT_kVA: {
33  m_choiceBasePower->SetSelection(1);
34  } break;
35  case UNIT_MVA: {
36  m_choiceBasePower->SetSelection(2);
37  } break;
38  default: {
39  m_choiceBasePower->SetSelection(wxNOT_FOUND);
40  } break;
41  }
42  m_checkBoxFaultAfterPF->SetValue(data.faultAfterPowerFlow);
43  m_checkBoxSCPowerAfterPF->SetValue(data.scPowerAfterPowerFlow);
44  switch(data.powerFlowMethod) {
45  case GAUSS_SEIDEL: {
46  m_choicePFMethod->SetSelection(0);
47  } break;
48  case NEWTON_RAPHSON: {
49  m_choicePFMethod->SetSelection(1);
50  m_textCtrlAccFactor->Enable(false);
51  } break;
52  default: {
53  m_choicePFMethod->SetSelection(wxNOT_FOUND);
54  } break;
55  }
56  m_textCtrlAccFactor->SetValue(Element::StringFromDouble(data.accFator));
57  m_textCtrlPFTolerance->SetValue(wxString::Format("%g", data.powerFlowTolerance));
58  m_textCtrlPFMaxIterations->SetValue(wxString::Format("%d", data.powerFlowMaxIterations));
59  m_textCtrlTimeStep->SetValue(wxString::Format("%g", data.timeStep));
60  m_textCtrlSimTime->SetValue(Element::StringFromDouble(data.stabilitySimulationTime));
61  m_textCtrlFreq->SetValue(Element::StringFromDouble(data.stabilityFrequency));
62  m_textCtrlStabTolerance->SetValue(wxString::Format("%g", data.stabilityTolerance));
63  m_textCtrlStabMaxIterations->SetValue(wxString::Format("%d", data.stabilityMaxIterations));
64  m_textCtrlCtrlStepRatio->SetValue(wxString::Format("%d", data.controlTimeStepRatio));
65  m_textCtrlPrintTime->SetValue(wxString::Format("%g", data.plotTime));
66 
67  m_checkBoxUseCOI->SetValue(data.useCOI);
68 
69  m_checkBoxUseCompLoads->SetValue(data.useCompLoads);
70 
71  m_textCtrlActivePowerImp->SetValue(Element::StringFromDouble(data.constImpedanceActive));
72  m_textCtrlActivePowerCur->SetValue(Element::StringFromDouble(data.constCurrentActive));
73  m_textCtrlActivePowerPow->SetValue(Element::StringFromDouble(data.constPowerActive));
74  m_textCtrlReactivePowerImp->SetValue(Element::StringFromDouble(data.constImpedanceReactive));
75  m_textCtrlReactivePowerCur->SetValue(Element::StringFromDouble(data.constCurrentReactive));
76  m_textCtrlReactivePowerPow->SetValue(Element::StringFromDouble(data.constPowerReactive));
77 
78  m_textCtrlUVCur->SetValue(Element::StringFromDouble(data.underVoltageConstCurrent));
79  m_textCtrlUVPow->SetValue(Element::StringFromDouble(data.underVoltageConstPower));
80 
81  UpdateZIPLoadFieldStatus();
82 }
83 
84 SimulationsSettingsForm::~SimulationsSettingsForm() {}
85 void SimulationsSettingsForm::OnButtonOKClick(wxCommandEvent& event)
86 {
87  if(ValidateData()) EndModal(wxID_OK);
88 }
89 
90 bool SimulationsSettingsForm::ValidateData()
91 {
92  auto data = m_properties->GetSimulationPropertiesData();
93  if(!Element::DoubleFromString(this, m_textCtrlbasePower->GetValue(), data.basePower,
94  _("Value entered incorrectly in the field \"Base power\".")))
95  return false;
96  switch(m_choiceBasePower->GetSelection()) {
97  case 0: {
98  data.basePowerUnit = UNIT_VA;
99  } break;
100  case 1: {
101  data.basePowerUnit = UNIT_kVA;
102  } break;
103  default: {
104  data.basePowerUnit = UNIT_MVA;
105  } break;
106  }
107  data.faultAfterPowerFlow = m_checkBoxFaultAfterPF->GetValue();
108  data.scPowerAfterPowerFlow = m_checkBoxSCPowerAfterPF->GetValue();
109  switch(m_choicePFMethod->GetSelection()) {
110  case 0: {
111  data.powerFlowMethod = GAUSS_SEIDEL;
112  } break;
113  case 1: {
114  data.powerFlowMethod = NEWTON_RAPHSON;
115  } break;
116  }
117  if(!Element::DoubleFromString(this, m_textCtrlAccFactor->GetValue(), data.accFator,
118  _("Value entered incorrectly in the field \"Acceleration factor\".")))
119  return false;
120  if(!Element::DoubleFromString(this, m_textCtrlPFTolerance->GetValue(), data.powerFlowTolerance,
121  _("Value entered incorrectly in the field \"Tolerance (Power flow)\".")))
122  return false;
123  if(!Element::IntFromString(this, m_textCtrlPFMaxIterations->GetValue(), data.powerFlowMaxIterations,
124  _("Value entered incorrectly in the field \"Max. iterations (Power flow)\".")))
125  return false;
126  if(!Element::DoubleFromString(this, m_textCtrlTimeStep->GetValue(), data.timeStep,
127  _("Value entered incorrectly in the field \"Time step\".")))
128  return false;
129  if(!Element::DoubleFromString(this, m_textCtrlSimTime->GetValue(), data.stabilitySimulationTime,
130  _("Value entered incorrectly in the field \"Simulation time\".")))
131  return false;
132  if(!Element::DoubleFromString(this, m_textCtrlFreq->GetValue(), data.stabilityFrequency,
133  _("Value entered incorrectly in the field \"System frequency\".")))
134  return false;
135  if(!Element::DoubleFromString(this, m_textCtrlStabTolerance->GetValue(), data.stabilityTolerance,
136  _("Value entered incorrectly in the field \"Tolerance (Stability)\".")))
137  return false;
138  if(!Element::IntFromString(this, m_textCtrlStabMaxIterations->GetValue(), data.stabilityMaxIterations,
139  _("Value entered incorrectly in the field \"Max. iterations (Stability)\".")))
140  return false;
141  if(!Element::IntFromString(this, m_textCtrlCtrlStepRatio->GetValue(), data.controlTimeStepRatio,
142  _("Value entered incorrectly in the field \"Controls step ratio\".")))
143  return false;
144  if(!Element::DoubleFromString(this, m_textCtrlPrintTime->GetValue(), data.plotTime,
145  _("Value entered incorrectly in the field \"Plot time\".")))
146  return false;
147  data.useCOI = m_checkBoxUseCOI->GetValue();
148 
149  data.useCompLoads = m_checkBoxUseCompLoads->GetValue();
150 
152  this, m_textCtrlActivePowerImp->GetValue(), data.constImpedanceActive,
153  _("Value entered incorrectly in the field \"Constant impedance portion of active power (ZIP load)\".")))
154  return false;
156  this, m_textCtrlActivePowerCur->GetValue(), data.constCurrentActive,
157  _("Value entered incorrectly in the field \"Constant current portion of active power (ZIP load)\".")))
158  return false;
160  this, m_textCtrlActivePowerPow->GetValue(), data.constPowerActive,
161  _("Value entered incorrectly in the field \"Constant power portion of active power (ZIP load)\".")))
162  return false;
164  this, m_textCtrlReactivePowerImp->GetValue(), data.constImpedanceReactive,
165  _("Value entered incorrectly in the field \"Constant impedance portion of reactive power (ZIP load)\".")))
166  return false;
168  this, m_textCtrlReactivePowerCur->GetValue(), data.constCurrentReactive,
169  _("Value entered incorrectly in the field \"Constant current portion of reactive power (ZIP load)\".")))
170  return false;
172  this, m_textCtrlReactivePowerPow->GetValue(), data.constPowerReactive,
173  _("Value entered incorrectly in the field \"Constant power portion of reactive power (ZIP load)\".")))
174  return false;
175 
177  this, m_textCtrlUVCur->GetValue(), data.underVoltageConstCurrent,
178  _("Value entered incorrectly in the field \"Constant current undervoltage limit (ZIP load)\".")))
179  return false;
180 
182  this, m_textCtrlUVPow->GetValue(), data.underVoltageConstPower,
183  _("Value entered incorrectly in the field \"Constant power undervoltage limit (ZIP load)\".")))
184  return false;
185 
186  double sum = data.constImpedanceActive + data.constCurrentActive + data.constPowerActive;
187  if(sum > 100.01 || sum < 99.99) {
188  wxMessageDialog msgDialog(this, _("The sum of active power load composition must be 100%."), _("Error"),
189  wxOK | wxCENTRE | wxICON_ERROR);
190  msgDialog.ShowModal();
191  return false;
192  }
193  sum = data.constImpedanceReactive + data.constCurrentReactive + data.constPowerReactive;
194  if(sum > 100.01 || sum < 99.99) {
195  wxMessageDialog msgDialog(this, _("The sum of reactive power load composition must be 100%."), _("Error"),
196  wxOK | wxCENTRE | wxICON_ERROR);
197  msgDialog.ShowModal();
198  return false;
199  }
200 
201  m_properties->SetSimulationPropertiesData(data);
202  return true;
203 }
204 
205 void SimulationsSettingsForm::OnPFMethodChoiceSelected(wxCommandEvent& event)
206 {
207  if(m_choicePFMethod->GetSelection() == 0)
208  m_textCtrlAccFactor->Enable();
209  else
210  m_textCtrlAccFactor->Enable(false);
211 }
212 
213 void SimulationsSettingsForm::UpdateZIPLoadFieldStatus()
214 {
215  m_textCtrlActivePowerImp->Enable(m_checkBoxUseCompLoads->GetValue());
216  m_textCtrlActivePowerCur->Enable(m_checkBoxUseCompLoads->GetValue());
217  m_textCtrlActivePowerPow->Enable(m_checkBoxUseCompLoads->GetValue());
218  m_textCtrlReactivePowerImp->Enable(m_checkBoxUseCompLoads->GetValue());
219  m_textCtrlReactivePowerCur->Enable(m_checkBoxUseCompLoads->GetValue());
220  m_textCtrlReactivePowerPow->Enable(m_checkBoxUseCompLoads->GetValue());
221 }
General and simulation data manager.
- - -
static bool DoubleFromString(wxWindow *parent, wxString strValue, double &value, wxString errorMsg)
Get a double value from a string. Show a error message if the conversion fail.
Definition: Element.cpp:292
- -
static bool IntFromString(wxWindow *parent, wxString strValue, int &value, wxString errorMsg)
Convert a string to int. Show a error message if the conversion fail.
Definition: Element.cpp:306
- -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- - -
-
- - - - diff --git a/docs/doxygen/html/_simulations_settings_form_8h.html b/docs/doxygen/html/_simulations_settings_form_8h.html index 71fac47..a81b907 100644 --- a/docs/doxygen/html/_simulations_settings_form_8h.html +++ b/docs/doxygen/html/_simulations_settings_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_simulations_settings_form_8h.html',''
SimulationsSettingsForm.h File Reference
-
#include "PropertiesForm.h"
-
-

Go to the source code of this file.

- +
#include "base/PropertiesFormBase.h"
+
diff --git a/docs/doxygen/html/_simulations_settings_form_8h_source.html b/docs/doxygen/html/_simulations_settings_form_8h_source.html deleted file mode 100644 index 84f24c1..0000000 --- a/docs/doxygen/html/_simulations_settings_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/SimulationsSettingsForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  SimulationsSettingsForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SimulationsSettingsForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef SIMULATIONSSETTINGSFORM_H
19 #define SIMULATIONSSETTINGSFORM_H
20 
21 #include "PropertiesForm.h"
22 
23 class PropertiesData;
24 
33 {
34  public:
35  SimulationsSettingsForm(wxWindow* parent, PropertiesData* properties);
36  virtual ~SimulationsSettingsForm();
37 
38  protected:
39  virtual void OnCheckboxUseCompLoadClick(wxCommandEvent& event) { UpdateZIPLoadFieldStatus(); }
40  virtual void OnPFMethodChoiceSelected(wxCommandEvent& event);
41  virtual void OnButtonCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
42  virtual void OnButtonOKClick(wxCommandEvent& event);
43  virtual bool ValidateData();
44  virtual void UpdateZIPLoadFieldStatus();
45 
46  PropertiesData* m_properties;
47 };
48 #endif // SIMULATIONSSETTINGSFORM_H
General and simulation data manager.
- -
Form to edit the simulation data.
-
-
- - - - diff --git a/docs/doxygen/html/_sum_8cpp_source.html b/docs/doxygen/html/_sum_8cpp_source.html deleted file mode 100644 index 953673a..0000000 --- a/docs/doxygen/html/_sum_8cpp_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -Project/Sum.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Sum.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Sum.h"
19 #include "SumForm.h"
20 #include "ConnectionLine.h"
21 
22 Sum::Sum(int id) : ControlElement(id)
23 {
24  m_width = m_height = 36.0;
25  Node* nodeIn1 = new Node(m_position + wxPoint2DDouble(-m_width / 2, 9 - m_height / 2), Node::NODE_IN, m_borderSize);
26  nodeIn1->StartMove(m_position);
27  Node* nodeIn2 =
28  new Node(m_position + wxPoint2DDouble(-m_width / 2, 27 - m_height / 2), Node::NODE_IN, m_borderSize);
29  nodeIn2->StartMove(m_position);
30  Node* nodeOut = new Node(m_position + wxPoint2DDouble(m_width / 2, 0), Node::NODE_OUT, m_borderSize);
31  nodeOut->SetAngle(180.0);
32  nodeOut->StartMove(m_position);
33  m_nodeList.push_back(nodeIn1);
34  m_nodeList.push_back(nodeIn2);
35  m_nodeList.push_back(nodeOut);
36  m_signalList.push_back(SIGNAL_POSITIVE);
37  m_signalList.push_back(SIGNAL_NEGATIVE);
38 
39  UpdatePoints();
40 }
41 
42 Sum::~Sum() {}
43 void Sum::Draw(wxPoint2DDouble translation, double scale) const
44 {
45  glLineWidth(1.0);
46  if(m_selected) {
47  glColor4dv(m_selectionColour.GetRGBA());
48  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
49  DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
50  }
51  glColor4d(1.0, 1.0, 1.0, 1.0);
52  DrawRectangle(m_position, m_width, m_height);
53  glColor4d(0.0, 0.0, 0.0, 1.0);
54  DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
55 
56  // Plot signals.
57  glLineWidth(2.0);
58  wxPoint2DDouble signalOffset[4];
59  wxPoint2DDouble sigmaOffset;
60  if(m_angle == 0.0) {
61  signalOffset[0] = wxPoint2DDouble(6, 0);
62  signalOffset[1] = wxPoint2DDouble(12, 0);
63  signalOffset[2] = wxPoint2DDouble(9, -3);
64  signalOffset[3] = wxPoint2DDouble(9, 3);
65  sigmaOffset = wxPoint2DDouble(6, 0);
66  } else if(m_angle == 90.0) {
67  signalOffset[0] = wxPoint2DDouble(-3, 9);
68  signalOffset[1] = wxPoint2DDouble(3, 9);
69  signalOffset[2] = wxPoint2DDouble(0, 6);
70  signalOffset[3] = wxPoint2DDouble(0, 12);
71  sigmaOffset = wxPoint2DDouble(0, 6);
72  } else if(m_angle == 180.0) {
73  signalOffset[0] = wxPoint2DDouble(-6, 0);
74  signalOffset[1] = wxPoint2DDouble(-12, 0);
75  signalOffset[2] = wxPoint2DDouble(-9, -3);
76  signalOffset[3] = wxPoint2DDouble(-9, 3);
77  sigmaOffset = wxPoint2DDouble(-6, 0);
78  } else if(m_angle == 270.0) {
79  signalOffset[0] = wxPoint2DDouble(-3, -9);
80  signalOffset[1] = wxPoint2DDouble(3, -9);
81  signalOffset[2] = wxPoint2DDouble(0, -6);
82  signalOffset[3] = wxPoint2DDouble(0, -12);
83  sigmaOffset = wxPoint2DDouble(0, -6);
84  }
85  for(int i = 0; i < (int)m_nodeList.size() - 1; ++i) {
86  std::vector<wxPoint2DDouble> hLine;
87  hLine.push_back(m_nodeList[i]->GetPosition() + signalOffset[0]);
88  hLine.push_back(m_nodeList[i]->GetPosition() + signalOffset[1]);
89  DrawLine(hLine);
90  if(m_signalList[i] == SIGNAL_POSITIVE) {
91  std::vector<wxPoint2DDouble> vLine;
92  vLine.push_back(m_nodeList[i]->GetPosition() + signalOffset[2]);
93  vLine.push_back(m_nodeList[i]->GetPosition() + signalOffset[3]);
94  DrawLine(vLine);
95  }
96  }
97 
98  // Plot sigma.
99  std::vector<wxPoint2DDouble> sigma;
100  sigma.push_back(m_position + wxPoint2DDouble(4, 9) + sigmaOffset);
101  sigma.push_back(m_position + wxPoint2DDouble(-6, 9) + sigmaOffset);
102  sigma.push_back(m_position + wxPoint2DDouble(0, 0) + sigmaOffset);
103  sigma.push_back(m_position + wxPoint2DDouble(-6, -9) + sigmaOffset);
104  sigma.push_back(m_position + wxPoint2DDouble(4, -9) + sigmaOffset);
105  glColor4d(0.0, 0.3, 1.0, 1.0);
106  DrawLine(sigma);
107 
108  glColor4d(0.0, 0.0, 0.0, 1.0);
109  DrawNodes();
110 }
111 
112 bool Sum::ShowForm(wxWindow* parent, Element* element)
113 {
114  SumForm* sumForm = new SumForm(parent, this);
115  if(sumForm->ShowModal() == wxID_OK) {
116  sumForm->Destroy();
117  return true;
118  }
119  sumForm->Destroy();
120  return false;
121 }
122 
123 void Sum::UpdatePoints()
124 {
125  if(m_angle == 0.0 || m_angle == 180.0) {
126  m_height = 18.0 * (m_nodeList.size() - 1);
127  m_width = 36.0;
128  } else {
129  m_width = 18.0 * (m_nodeList.size() - 1);
130  m_height = 42.0;
131  }
132 
133  for(int i = 0; i < (int)m_nodeList.size() - 1; ++i) {
134  if(m_angle == 0.0)
135  m_nodeList[i]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 9 + 18 * i - m_height / 2));
136  else if(m_angle == 90.0)
137  m_nodeList[i]->SetPosition(m_position + wxPoint2DDouble(m_width / 2 - 9 - 18 * i, -m_height / 2));
138  else if(m_angle == 180.0)
139  m_nodeList[i]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, m_height / 2 - 9 - 18 * i));
140  else if(m_angle == 270.0)
141  m_nodeList[i]->SetPosition(m_position + wxPoint2DDouble(9 + 18 * i - m_width / 2, m_height / 2));
142  }
143  if(m_angle == 0.0)
144  m_nodeList[m_nodeList.size() - 1]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
145  else if(m_angle == 90.0)
146  m_nodeList[m_nodeList.size() - 1]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
147  else if(m_angle == 180.0)
148  m_nodeList[m_nodeList.size() - 1]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
149  else if(m_angle == 270.0)
150  m_nodeList[m_nodeList.size() - 1]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
151 
152  SetPosition(m_position); // Update rect.
153 }
154 
155 void Sum::AddInNode()
156 {
157  Node* newNode = new Node(wxPoint2DDouble(0, 0), Node::NODE_IN, m_borderSize);
158  newNode->SetAngle(m_angle);
159  m_nodeList.insert(m_nodeList.end() - 1, newNode);
160 }
161 
162 void Sum::RemoveInNode()
163 {
164  Node* nodeToRemove = *(m_nodeList.end() - 2);
165  bool foundChild = false;
166  for(auto it = m_childList.begin(), itEnd = m_childList.end(); it != itEnd; ++it) {
167  ControlElement* child = static_cast<ControlElement*>(*it);
168  auto childNodeList = child->GetNodeList();
169  for(auto itN = childNodeList.begin(), itEndN = childNodeList.end(); itN != itEndN; ++itN) {
170  Node* node = *itN;
171  if(node == nodeToRemove) {
172  child->RemoveParent(this);
173  RemoveChild(child);
174  foundChild = true;
175  break;
176  }
177  }
178  if(foundChild) break;
179  }
180  m_nodeList.erase(m_nodeList.end() - 2);
181 }
182 
183 void Sum::Rotate(bool clockwise)
184 {
185  if(clockwise)
186  m_angle += 90.0;
187  else
188  m_angle -= 90.0;
189  if(m_angle >= 360.0)
190  m_angle = 0.0;
191  else if(m_angle < 0)
192  m_angle = 270.0;
193 
194  UpdatePoints();
195 
196  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
197  Node* node = *it;
198  node->Rotate(clockwise);
199  }
200 }
201 
202 bool Sum::Solve(double input, double timeStep)
203 {
204  std::vector<double> inputVector;
205  for(auto itN = m_nodeList.begin(), itNEnd = m_nodeList.end(); itN != itNEnd; ++itN) {
206  Node* node = *itN;
207  if(node->GetNodeType() != Node::NODE_OUT) {
208  if(!node->IsConnected()) {
209  inputVector.push_back(0.0);
210  } else {
211  for(auto itC = m_childList.begin(), itCEnd = m_childList.end(); itC != itCEnd; ++itC) {
212  ConnectionLine* cLine = static_cast<ConnectionLine*>(*itC);
213  auto nodeList = cLine->GetNodeList();
214  for(auto itCN = nodeList.begin(), itCNEnd = nodeList.end(); itCN != itCNEnd; ++itCN) {
215  Node* childNode = *itCN;
216  if(childNode == node) {
217  inputVector.push_back(cLine->GetValue());
218  break;
219  }
220  }
221  }
222  }
223  }
224  }
225 
226  if(m_signalList.size() != inputVector.size()) return false;
227 
228  m_output = 0.0;
229  for(unsigned int i = 0; i < m_signalList.size(); ++i) {
230  if(m_signalList[i] == SIGNAL_POSITIVE)
231  m_output += inputVector[i];
232  else if(m_signalList[i] == SIGNAL_NEGATIVE)
233  m_output -= inputVector[i];
234  }
235  return true;
236 }
237 
239 {
240  Sum* copy = new Sum(m_elementID);
241  *copy = *this;
242  return copy;
243 }
Form to edit the sum control data.
Definition: SumForm.h:32
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Sum.cpp:112
-
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Sum.cpp:183
- - -
virtual Element * GetCopy()
Get a the element copy.
Definition: Sum.cpp:238
- -
Connection between two control elements or other connection line and an element.
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Element.h:359
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Sum.cpp:43
- -
-
- - - - diff --git a/docs/doxygen/html/_sum_8h.html b/docs/doxygen/html/_sum_8h.html index 5747052..ece4c83 100644 --- a/docs/doxygen/html/_sum_8h.html +++ b/docs/doxygen/html/_sum_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_sum_8h.html','');});
Sum.h File Reference
-
#include "ControlElement.h"
-
-

Go to the source code of this file.

- +
#include "ControlElement.h"
+
diff --git a/docs/doxygen/html/_sum_8h_source.html b/docs/doxygen/html/_sum_8h_source.html deleted file mode 100644 index 7bcc3be..0000000 --- a/docs/doxygen/html/_sum_8h_source.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - -Project/Sum.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Sum
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Sum.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef SUM_H
19 #define SUM_H
20 
21 #include "ControlElement.h"
22 
23 class SumForm;
24 class ConnectionLine;
25 
33 class Sum : public ControlElement
34 {
35  public:
36  enum Signal { SIGNAL_POSITIVE = 0, SIGNAL_NEGATIVE };
37  Sum(int id);
38  ~Sum();
39 
40  virtual void Draw(wxPoint2DDouble translation, double scale) const;
41  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
42  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
43  virtual bool ShowForm(wxWindow* parent, Element* element);
44  virtual void Rotate(bool clockwise = true);
45 
46  virtual std::vector<Signal> GetSignalList() const { return m_signalList; }
47  virtual void SetSignalList(std::vector<Signal> signalList) { m_signalList = signalList; }
48  virtual bool Solve(double input, double timeStep);
49 
50  virtual void UpdatePoints();
51  void AddInNode();
52  void RemoveInNode();
53 
54  virtual Element* GetCopy();
55 
56  protected:
57  std::vector<Signal> m_signalList;
58 };
59 
60 #endif // SUM_H
Form to edit the sum control data.
Definition: SumForm.h:32
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Sum.cpp:112
-
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Sum.cpp:183
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Sum.h:41
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Sum.cpp:238
-
Connection between two control elements or other connection line and an element.
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Sum.h:42
-
Base class of a control element. Provide general methods to other control classes.
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Sum.cpp:43
- -
-
- - - - diff --git a/docs/doxygen/html/_sum_form_8cpp_source.html b/docs/doxygen/html/_sum_form_8cpp_source.html deleted file mode 100644 index e6f7b01..0000000 --- a/docs/doxygen/html/_sum_form_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/SumForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SumForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "SumForm.h"
19 #include "Sum.h"
20 
21 SumForm::SumForm(wxWindow* parent, Sum* sum) : SumFormBase(parent)
22 {
23  SetSize(GetBestSize());
24 
25  m_parent = parent;
26  m_sum = sum;
27 
28  wxString signalStr = "";
29  auto signalList = m_sum->GetSignalList();
30  for(auto it = signalList.begin(), itEnd = signalList.end(); it != itEnd; ++it) {
31  Sum::Signal signal = *it;
32  switch(signal) {
33  case Sum::SIGNAL_POSITIVE: {
34  signalStr += "+";
35  } break;
36  case Sum::SIGNAL_NEGATIVE: {
37  signalStr += "-";
38  } break;
39  }
40  if(it != itEnd - 1) signalStr += " ";
41  }
42  m_textCtrlSigns->SetValue(signalStr);
43 }
44 
45 SumForm::~SumForm() {}
46 void SumForm::OnOKClick(wxCommandEvent& event)
47 {
48  if(ValidateData()) EndModal(wxID_OK);
49 }
50 
51 bool SumForm::ValidateData()
52 {
53  wxString signalStr = "";
54  for(int i = 0; i < (int)m_textCtrlSigns->GetValue().length(); ++i) {
55  if(m_textCtrlSigns->GetValue()[i] != ' ') signalStr += m_textCtrlSigns->GetValue()[i];
56  }
57  if(signalStr.size() < 2) {
58  wxMessageDialog msg(this, _("You must assign at least two signals."), _("Error"),
59  wxOK | wxCENTRE | wxICON_ERROR);
60  msg.ShowModal();
61  return false;
62  }
63 
64  std::vector<Sum::Signal> signalList;
65  for(int i = 0; i < (int)signalStr.length(); ++i) {
66  switch(signalStr[i].GetValue()) {
67  case '+': {
68  signalList.push_back(Sum::SIGNAL_POSITIVE);
69  } break;
70  case '-': {
71  signalList.push_back(Sum::SIGNAL_NEGATIVE);
72  } break;
73  default: {
74  wxMessageDialog msg(this, _("Value entered incorrectly in the field \"Signs\"."), _("Error"),
75  wxOK | wxCENTRE | wxICON_ERROR);
76  msg.ShowModal();
77  return false;
78  }
79  }
80  }
81 
82  int diff = (int)signalList.size() - (int)m_sum->GetSignalList().size();
83 
84  if(diff < 0) {
85  diff = std::abs(diff);
86  for(int i = 0; i < diff; ++i) {
87  m_sum->RemoveInNode();
88  }
89  } else if(diff > 0) {
90  for(int i = 0; i < diff; ++i) {
91  m_sum->AddInNode();
92  }
93  }
94  m_sum->SetSignalList(signalList);
95  m_sum->UpdatePoints();
96  return true;
97 }
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
- - - -
-
- - - - diff --git a/docs/doxygen/html/_sum_form_8h.html b/docs/doxygen/html/_sum_form_8h.html index cd6a738..54ec904 100644 --- a/docs/doxygen/html/_sum_form_8h.html +++ b/docs/doxygen/html/_sum_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_sum_form_8h.html','');});
SumForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_sum_form_8h_source.html b/docs/doxygen/html/_sum_form_8h_source.html deleted file mode 100644 index 63580bd..0000000 --- a/docs/doxygen/html/_sum_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/SumForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  SumForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SumForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef SUMFORM_H
19 #define SUMFORM_H
20 
21 #include "ElementForm.h"
22 
23 class Sum;
24 
32 class SumForm : public SumFormBase
33 {
34  public:
35  SumForm(wxWindow* parent, Sum* sum);
36  virtual ~SumForm();
37 
38  bool ValidateData();
39 
40  protected:
41  virtual void OnCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
42  virtual void OnOKClick(wxCommandEvent& event);
43  wxWindow* m_parent = NULL;
44  Sum* m_sum = NULL;
45 };
46 #endif // SUMFORM_H
Form to edit the sum control data.
Definition: SumForm.h:32
-
Sum the all inputs (can choose the input signal).
Definition: Sum.h:33
- -
-
- - - - diff --git a/docs/doxygen/html/_switching_form_8cpp_source.html b/docs/doxygen/html/_switching_form_8cpp_source.html deleted file mode 100644 index 2ce41ad..0000000 --- a/docs/doxygen/html/_switching_form_8cpp_source.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - -Project/SwitchingForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SwitchingForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "SwitchingForm.h"
19 #include "PowerElement.h"
20 
21 SwitchingForm::SwitchingForm(wxWindow* parent) : SwitchingFormBase(parent)
22 {
23  m_listCtrlSwitchings->AppendColumn(_("Type"));
24  m_listCtrlSwitchings->AppendColumn(_("Time (s)"));
25 
26  SetSize(GetBestSize());
27  Layout();
28 }
29 
30 SwitchingForm::SwitchingForm(wxWindow* parent, PowerElement* element) : SwitchingFormBase(parent)
31 {
32  m_listCtrlSwitchings->AppendColumn(_("Type"));
33  m_listCtrlSwitchings->AppendColumn(_("Time (s)"));
34 
35  SetSize(GetBestSize());
36  Layout();
37 
38  SwitchingData data = element->GetSwitchingData();
39  for(int i = 0; i < (int)data.swType.size(); i++) {
40  long index = m_listCtrlSwitchings->InsertItem(m_maxID, data.swType[i] == SW_INSERT ? _("Insert") : _("Remove"));
41  m_listCtrlSwitchings->SetItem(index, 1, wxString::FromDouble(data.swTime[i]));
42  m_maxID++;
43  }
44 
45  m_element = element;
46 }
47 
48 SwitchingForm::~SwitchingForm() {}
49 void SwitchingForm::OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
50 void SwitchingForm::OnInsertButtonClick(wxCommandEvent& event)
51 {
52  long index = m_listCtrlSwitchings->InsertItem(
53  m_maxID, m_pgPropType->GetValue().GetInteger() == 0 ? _("Insert") : _("Remove"));
54  m_listCtrlSwitchings->SetItem(index, 1, m_pgPropTime->GetValue().GetString());
55  m_maxID++;
56 }
57 void SwitchingForm::OnOKButtonClick(wxCommandEvent& event)
58 {
59  std::vector<long> itemList;
60  long item = -1;
61  while(true) {
62  item = m_listCtrlSwitchings->GetNextItem(item);
63  if(item == -1) break;
64  itemList.push_back(item);
65  }
66 
67  SwitchingData data;
68  for(int i = 0; i < (int)itemList.size(); i++) {
69  if(m_listCtrlSwitchings->GetItemText(itemList[i], 0) == _("Insert"))
70  data.swType.push_back(SW_INSERT);
71  else
72  data.swType.push_back(SW_REMOVE);
73 
74  double swTime;
75  m_listCtrlSwitchings->GetItemText(itemList[i], 1).ToDouble(&swTime);
76  data.swTime.push_back(swTime);
77  }
78  m_element->SetSwitchingData(data);
79 
80  if(data.swTime.size() != 0)
81  m_element->SetDynamicEvent(true);
82  else
83  m_element->SetDynamicEvent(false);
84 
85  EndModal(wxID_OK);
86 }
87 
88 void SwitchingForm::OnRemoveButtonClick(wxCommandEvent& event)
89 {
90  std::vector<long> itemList;
91  long item = -1;
92  while(true) {
93  item = m_listCtrlSwitchings->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
94  if(item == -1) break;
95  itemList.push_back(item);
96  }
97  for(int i = (int)itemList.size() - 1; i >= 0; i--) {
98  m_listCtrlSwitchings->DeleteItem(itemList[i]);
99  }
100 }
101 void SwitchingForm::OnChangeProperties(wxPropertyGridEvent& event) {}
102 void SwitchingForm::OnSelectItem(wxListEvent& event) {}
103 void SwitchingForm::OnDownButtonClick(wxCommandEvent& event)
104 {
105  std::vector<long> selectedList;
106  std::vector<long> itemList;
107  long item = -1;
108  while(true) {
109  item = m_listCtrlSwitchings->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
110  if(item == -1) break;
111  selectedList.push_back(item);
112  }
113  while(true) {
114  item = m_listCtrlSwitchings->GetNextItem(item);
115  if(item == -1) break;
116  itemList.push_back(item);
117  }
118 
119  for(int i = 1; i < (int)itemList.size(); i++) {
120  for(int j = 0; j < (int)selectedList.size(); j++) {
121  if(itemList[i - 1] == selectedList[j]) {
122  wxString col1Str[2];
123  wxString col2Str[2];
124 
125  col1Str[0] = m_listCtrlSwitchings->GetItemText(itemList[i], 0);
126  col1Str[1] = m_listCtrlSwitchings->GetItemText(selectedList[j], 0);
127  col2Str[0] = m_listCtrlSwitchings->GetItemText(itemList[i], 1);
128  col2Str[1] = m_listCtrlSwitchings->GetItemText(selectedList[j], 1);
129 
130  m_listCtrlSwitchings->SetItem(itemList[i], 0, col1Str[1]);
131  m_listCtrlSwitchings->SetItem(selectedList[j], 0, col1Str[0]);
132  m_listCtrlSwitchings->SetItem(itemList[i], 1, col2Str[1]);
133  m_listCtrlSwitchings->SetItem(selectedList[j], 1, col2Str[0]);
134 
135  m_listCtrlSwitchings->SetItemState(itemList[i], wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
136  m_listCtrlSwitchings->SetItemState(selectedList[j], 0, wxLIST_STATE_SELECTED);
137 
138  i++;
139  break;
140  }
141  }
142  }
143 }
144 void SwitchingForm::OnUpButtonClick(wxCommandEvent& event)
145 {
146  std::vector<long> selectedList;
147  std::vector<long> itemList;
148  long item = -1;
149  while(true) {
150  item = m_listCtrlSwitchings->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
151  if(item == -1) break;
152  selectedList.push_back(item);
153  }
154  while(true) {
155  item = m_listCtrlSwitchings->GetNextItem(item);
156  if(item == -1) break;
157  itemList.push_back(item);
158  }
159 
160  for(int i = 0; i < (int)itemList.size(); i++) {
161  for(int j = 0; j < (int)selectedList.size(); j++) {
162  if(i + 1 < (int)itemList.size()) {
163  if(itemList[i + 1] == selectedList[j]) {
164  wxString col1Str[2];
165  wxString col2Str[2];
166 
167  col1Str[0] = m_listCtrlSwitchings->GetItemText(itemList[i], 0);
168  col1Str[1] = m_listCtrlSwitchings->GetItemText(selectedList[j], 0);
169  col2Str[0] = m_listCtrlSwitchings->GetItemText(itemList[i], 1);
170  col2Str[1] = m_listCtrlSwitchings->GetItemText(selectedList[j], 1);
171 
172  m_listCtrlSwitchings->SetItem(itemList[i], 0, col1Str[1]);
173  m_listCtrlSwitchings->SetItem(selectedList[j], 0, col1Str[0]);
174  m_listCtrlSwitchings->SetItem(itemList[i], 1, col2Str[1]);
175  m_listCtrlSwitchings->SetItem(selectedList[j], 1, col2Str[0]);
176 
177  m_listCtrlSwitchings->SetItemState(itemList[i], wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
178  m_listCtrlSwitchings->SetItemState(selectedList[j], 0, wxLIST_STATE_SELECTED);
179 
180  i++;
181  break;
182  }
183  }
184  }
185  }
186 }
std::vector< double > swTime
Definition: PowerElement.h:95
-
std::vector< SwitchingType > swType
Definition: PowerElement.h:94
- - -
Switching data of power elements.
Definition: PowerElement.h:93
- - -
virtual SwitchingData GetSwitchingData()
Returns the switching data of the element.
Definition: PowerElement.h:182
-
Abstract class of power elements.
Definition: PowerElement.h:117
- -
-
- - - - diff --git a/docs/doxygen/html/_switching_form_8h.html b/docs/doxygen/html/_switching_form_8h.html index 473756f..bd1dbbd 100644 --- a/docs/doxygen/html/_switching_form_8h.html +++ b/docs/doxygen/html/_switching_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_switching_form_8h.html','');});
SwitchingForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_switching_form_8h_source.html b/docs/doxygen/html/_switching_form_8h_source.html deleted file mode 100644 index f168f71..0000000 --- a/docs/doxygen/html/_switching_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/SwitchingForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  SwitchingForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SwitchingForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef SWITCHINGFORM_H
19 #define SWITCHINGFORM_H
20 
21 #include "ElementForm.h"
22 
23 class PowerElement;
24 
33 {
34  public:
35  SwitchingForm(wxWindow* parent);
36  SwitchingForm(wxWindow* parent, PowerElement* element);
37  virtual ~SwitchingForm();
38 
39  protected:
40  virtual void OnDownButtonClick(wxCommandEvent& event);
41  virtual void OnUpButtonClick(wxCommandEvent& event);
42  virtual void OnChangeProperties(wxPropertyGridEvent& event);
43  virtual void OnSelectItem(wxListEvent& event);
44  virtual void OnCancelButtonClick(wxCommandEvent& event);
45  virtual void OnInsertButtonClick(wxCommandEvent& event);
46  virtual void OnOKButtonClick(wxCommandEvent& event);
47  virtual void OnRemoveButtonClick(wxCommandEvent& event);
48 
49  int m_maxID = 0;
50 
51  PowerElement* m_element = NULL;
52 };
53 #endif // SWITCHINGFORM_H
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
- -
Abstract class of power elements.
Definition: PowerElement.h:117
-
-
- - - - diff --git a/docs/doxygen/html/_sync_generator_8cpp_source.html b/docs/doxygen/html/_sync_generator_8cpp_source.html deleted file mode 100644 index 662946a..0000000 --- a/docs/doxygen/html/_sync_generator_8cpp_source.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - -Project/SyncGenerator.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SyncGenerator.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "SyncMachineForm.h"
19 #include "SyncGenerator.h"
21 
22 SyncGenerator::SyncGenerator() : Machines() { Init(); }
23 SyncGenerator::SyncGenerator(wxString name) : Machines()
24 {
25  Init();
26  m_electricalData.name = name;
27 }
28 
29 SyncGenerator::~SyncGenerator() {}
30 void SyncGenerator::Init()
31 {
32  int numPtsSine = 10;
33  double mx = 15.0;
34  double my = 10.0;
35  double pi = 3.14159265359;
36 
37  for(int i = 0; i <= numPtsSine; i++) {
38  double x = (2.0 * pi / double(numPtsSine)) * double(i) - pi;
39  double y = std::sin(x);
40  m_sinePts.push_back(wxPoint2DDouble((x / pi) * mx, y * my));
41  }
42 
43  m_electricalData.avr = new ControlElementContainer();
44  m_electricalData.speedGov = new ControlElementContainer();
45 }
46 
47 void SyncGenerator::DrawSymbol() const
48 {
49  // Draw sine.
50  std::vector<wxPoint2DDouble> sinePts;
51  for(int i = 0; i < (int)m_sinePts.size(); i++) {
52  sinePts.push_back(m_sinePts[i] + m_position);
53  }
54  DrawLine(sinePts);
55 }
57 {
58  menu.Append(ID_EDIT_ELEMENT, _("Edit Generator"));
59  GeneralMenuItens(menu);
60  return true;
61 }
62 
63 bool SyncGenerator::ShowForm(wxWindow* parent, Element* element)
64 {
65  SyncMachineForm* generatorForm = new SyncMachineForm(parent, this);
66  generatorForm->SetTitle(_("Generator"));
67  if(generatorForm->ShowModal() == wxID_OK) {
68  generatorForm->Destroy();
69  return true;
70  }
71 
72  generatorForm->Destroy();
73  return false;
74 }
75 
76 SyncGeneratorElectricalData SyncGenerator::GetPUElectricalData(double systemPowerBase)
77 {
78  SyncGeneratorElectricalData data = m_electricalData;
79  double machineBasePower = 1.0;
80  if(data.useMachineBase) {
81  machineBasePower = GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
82  }
83 
84  // Active power
85  double activePower = GetValueFromUnit(data.activePower, data.activePowerUnit);
86  if(!m_online) activePower = 0.0;
87  if(data.activePowerUnit == UNIT_PU) {
88  if(data.useMachineBase) data.activePower = (activePower * machineBasePower) / systemPowerBase;
89  } else {
90  data.activePower = activePower / systemPowerBase;
91  }
92  data.activePowerUnit = UNIT_PU;
93 
94  // Reactive power
95  double reactivePower = GetValueFromUnit(data.reactivePower, data.reactivePowerUnit);
96  if(!m_online) reactivePower = 0.0;
97  if(data.reactivePowerUnit == UNIT_PU) {
98  if(data.useMachineBase) data.reactivePower = (reactivePower * machineBasePower) / systemPowerBase;
99  } else {
100  data.reactivePower = reactivePower / systemPowerBase;
101  }
102  data.reactivePowerUnit = UNIT_PU;
103 
104  // Max reactive power
105  double maxReactive = GetValueFromUnit(data.maxReactive, data.maxReactiveUnit);
106  if(data.maxReactiveUnit == UNIT_PU) {
107  if(data.useMachineBase) data.maxReactive = (maxReactive * machineBasePower) / systemPowerBase;
108  } else {
109  data.maxReactive = maxReactive / systemPowerBase;
110  }
111  data.maxReactiveUnit = UNIT_PU;
112 
113  // Min reactive power
114  double minReactive = GetValueFromUnit(data.minReactive, data.minReactiveUnit);
115  if(data.minReactiveUnit == UNIT_PU) {
116  if(data.useMachineBase) data.minReactive = (minReactive * machineBasePower) / systemPowerBase;
117  } else {
118  data.minReactive = minReactive / systemPowerBase;
119  }
120  data.minReactiveUnit = UNIT_PU;
121 
122  double baseVoltage = GetValueFromUnit(data.nominalVoltage, data.nominalVoltageUnit);
123  double systemBaseImpedance = (baseVoltage * baseVoltage) / systemPowerBase;
124  double machineBaseImpedance = (baseVoltage * baseVoltage) / machineBasePower;
125 
126  // Fault data
127  if(data.useMachineBase) {
128  data.positiveResistance = (data.positiveResistance * machineBaseImpedance) / systemBaseImpedance;
129  data.positiveReactance = (data.positiveReactance * machineBaseImpedance) / systemBaseImpedance;
130  data.negativeResistance = (data.negativeResistance * machineBaseImpedance) / systemBaseImpedance;
131  data.negativeReactance = (data.negativeReactance * machineBaseImpedance) / systemBaseImpedance;
132  data.zeroResistance = (data.zeroResistance * machineBaseImpedance) / systemBaseImpedance;
133  data.zeroReactance = (data.zeroReactance * machineBaseImpedance) / systemBaseImpedance;
134  data.groundResistance = (data.groundResistance * machineBaseImpedance) / systemBaseImpedance;
135  data.groundReactance = (data.groundReactance * machineBaseImpedance) / systemBaseImpedance;
136  }
137 
138  if(!m_online) {
139  data.faultCurrent[0] = std::complex<double>(0, 0);
140  data.faultCurrent[1] = std::complex<double>(0, 0);
141  data.faultCurrent[2] = std::complex<double>(0, 0);
142  }
143 
144  return data;
145 }
146 
147 void SyncGenerator::SetNominalVoltage(std::vector<double> nominalVoltage,
148  std::vector<ElectricalUnit> nominalVoltageUnit)
149 {
150  if(nominalVoltage.size() > 0) {
151  m_electricalData.nominalVoltage = nominalVoltage[0];
152  m_electricalData.nominalVoltageUnit = nominalVoltageUnit[0];
153  }
154 }
155 
157 {
158  SyncGenerator* copy = new SyncGenerator();
159  *copy = *this;
160  auto data = copy->GetElectricalData();
161 
162  // Copy AVR
163  std::vector<ConnectionLine*> cLineList;
164  std::vector<ControlElement*> elementList;
165  m_electricalData.avr->GetContainerCopy(elementList, cLineList);
166 
168  avrCopy->FillContainer(elementList, cLineList);
169  data.avr = avrCopy;
170 
171  // Copy Speed Governor
172  cLineList.clear();
173  elementList.clear();
174  m_electricalData.speedGov->GetContainerCopy(elementList, cLineList);
175 
176  ControlElementContainer* speedGovCopy = new ControlElementContainer();
177  speedGovCopy->FillContainer(elementList, cLineList);
178  data.speedGov = speedGovCopy;
179 
180  copy->SetElectricalData(data);
181  return copy;
182 }
183 
185 {
186  wxString tipText = m_electricalData.name;
187  tipText += "\n";
188  double activePower = m_electricalData.activePower;
189  if(!m_online) activePower = 0.0;
190  tipText += _("\nP = ") + wxString::FromDouble(activePower, 5);
191  switch(m_electricalData.activePowerUnit) {
192  case UNIT_PU: {
193  tipText += _(" p.u.");
194  } break;
195  case UNIT_W: {
196  tipText += _(" W");
197  } break;
198  case UNIT_kW: {
199  tipText += _(" kW");
200  } break;
201  case UNIT_MW: {
202  tipText += _(" MW");
203  } break;
204  default:
205  break;
206  }
207  double reactivePower = m_electricalData.reactivePower;
208  if(!m_online) reactivePower = 0.0;
209  tipText += _("\nQ = ") + wxString::FromDouble(reactivePower, 5);
210  switch(m_electricalData.reactivePowerUnit) {
211  case UNIT_PU: {
212  tipText += _(" p.u.");
213  } break;
214  case UNIT_VAr: {
215  tipText += _(" VAr");
216  } break;
217  case UNIT_kVAr: {
218  tipText += _(" kVAr");
219  } break;
220  case UNIT_MVAr: {
221  tipText += _(" MVAr");
222  } break;
223  default:
224  break;
225  }
226 
227  return tipText;
228 }
229 
231 {
232  if(!m_electricalData.plotSyncMachine) return false;
233  plotData.SetName(m_electricalData.name);
234  plotData.SetCurveType(ElementPlotData::CT_SYNC_GENERATOR);
235 
236  std::vector<double> absTerminalVoltage, activePower, reactivePower;
237  for(unsigned int i = 0; i < m_electricalData.terminalVoltageVector.size(); ++i) {
238  absTerminalVoltage.push_back(std::abs(m_electricalData.terminalVoltageVector[i]));
239  activePower.push_back(std::real(m_electricalData.electricalPowerVector[i]));
240  reactivePower.push_back(std::imag(m_electricalData.electricalPowerVector[i]));
241  }
242  plotData.AddData(absTerminalVoltage, _("Terminal voltage"));
243  plotData.AddData(activePower, _("Active power"));
244  plotData.AddData(reactivePower, _("Reactive power"));
245  plotData.AddData(m_electricalData.mechanicalPowerVector, _("Mechanical power"));
246  plotData.AddData(m_electricalData.freqVector, _("Frequency"));
247  plotData.AddData(m_electricalData.fieldVoltageVector, _("Field voltage"));
248  plotData.AddData(m_electricalData.deltaVector, _("Delta"));
249  return true;
250 }
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- - -
virtual bool GetPlotData(ElementPlotData &plotData)
Fill the plot data.
- - -
Synchronous generator power element.
- - -
Form to edit the synchronous machine power data.
-
virtual Element * GetCopy()
Get a the element copy.
- - -
virtual wxString GetTipText() const
Get the tip text.
- -
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
-
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
- -
virtual void SetNominalVoltage(std::vector< double > nominalVoltage, std::vector< ElectricalUnit > nominalVoltageUnit)
Set nominal voltage of the element.
- -
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
-
Abstract class for rotary machines power elements.
Definition: Machines.h:33
- -
-
- - - - diff --git a/docs/doxygen/html/_sync_generator_8h.html b/docs/doxygen/html/_sync_generator_8h.html index 3385685..b1ce898 100644 --- a/docs/doxygen/html/_sync_generator_8h.html +++ b/docs/doxygen/html/_sync_generator_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_sync_generator_8h.html','');});
SyncGenerator.h File Reference
-
#include "Machines.h"
-
-

Go to the source code of this file.

- +
#include "Machines.h"
+
diff --git a/docs/doxygen/html/_sync_generator_8h_source.html b/docs/doxygen/html/_sync_generator_8h_source.html deleted file mode 100644 index a1126c6..0000000 --- a/docs/doxygen/html/_sync_generator_8h_source.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - -Project/SyncGenerator.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  SyncGeneratorElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SyncGenerator.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef SYNCGENERATOR_H
19 #define SYNCGENERATOR_H
20 
21 #include "Machines.h"
22 
23 class SyncMachineForm;
24 
26  // General
27  wxString name = "";
28  double nominalPower = 100.0;
29  ElectricalUnit nominalPowerUnit = UNIT_MVA;
30  double nominalVoltage = 13.8;
31  ElectricalUnit nominalVoltageUnit = UNIT_kV;
32  double activePower = 100.0;
33  ElectricalUnit activePowerUnit = UNIT_MW;
34  double reactivePower = 0.0;
35  ElectricalUnit reactivePowerUnit = UNIT_MVAr;
36  bool haveMaxReactive = false;
37  double maxReactive = 9999.0;
38  ElectricalUnit maxReactiveUnit = UNIT_MVAr;
39  bool haveMinReactive = false;
40  double minReactive = -9999.0;
41  ElectricalUnit minReactiveUnit = UNIT_MVAr;
42  bool useMachineBase = true;
43 
44  // Fault
45  double positiveResistance = 0.0;
46  double positiveReactance = 1.0;
47  double negativeResistance = 0.0;
48  double negativeReactance = 1.0;
49  double zeroResistance = 0.0;
50  double zeroReactance = 1.0;
51  double groundResistance = 0.0;
52  double groundReactance = 0.0;
53  bool groundNeutral = true;
54  // p.u. fault data
55  std::complex<double> faultCurrent[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0),
56  std::complex<double>(0.0, 0.0)};
57 
58  // Stability
59  bool plotSyncMachine = false;
60  double inertia = 1.0;
61  double damping = 0.0;
62  bool useAVR = false;
63  bool useSpeedGovernor = false;
64 
65  double armResistance = 0.0;
66  double potierReactance = 0.0;
67  double satFactor = 0.0;
68 
69  double syncXd = 0.0;
70  double syncXq = 0.0;
71  double transXd = 1.0;
72  double transXq = 0.0;
73  double transTd0 = 0.0;
74  double transTq0 = 0.0;
75  double subXd = 0.0;
76  double subXq = 0.0;
77  double subTd0 = 0.0;
78  double subTq0 = 0.0;
79 
80  // Machine state variables
81  std::complex<double> terminalVoltage;
82  std::vector<std::complex<double> > terminalVoltageVector;
83  std::complex<double> electricalPower;
84  std::vector<std::complex<double> > electricalPowerVector;
85  double pm;
86  std::vector<double> mechanicalPowerVector;
87  double speed;
88  std::vector<double> freqVector;
89  double fieldVoltage;
90  std::vector<double> fieldVoltageVector;
91  double delta;
92  std::vector<double> deltaVector;
93 
94  double initialFieldVoltage;
95 
96  // Internal machine variables
97  double tranEq;
98  double tranEd;
99  double subEq;
100  double subEd;
101  double pe;
102  double id;
103  double iq;
104  double sd;
105  double sq;
106 
107  // Variables to extrapolate
108  double oldId;
109  double oldIq;
110  double oldPe;
111  double oldSd;
112  double oldSq;
113 
114  // Integration constants
115  IntegrationConstant icSpeed;
116  IntegrationConstant icDelta;
117  IntegrationConstant icTranEq;
118  IntegrationConstant icTranEd;
119  IntegrationConstant icSubEq;
120  IntegrationConstant icSubEd;
121 
122  // Control
123  ControlElementContainer* avr = NULL;
124  ControlElementContainer* speedGov = NULL;
125 
126  // Control solvers
127  ControlElementSolver* avrSolver = NULL;
128  ControlElementSolver* speedGovSolver = NULL;
129 
130  Machines::SyncMachineModel model = Machines::SM_MODEL_1;
131 };
132 
140 class SyncGenerator : public Machines
141 {
142  public:
143  SyncGenerator();
144  SyncGenerator(wxString name);
145  ~SyncGenerator();
146 
147  virtual Element* GetCopy();
148  virtual void Init();
149  virtual void DrawSymbol() const;
150  virtual bool GetContextMenu(wxMenu& menu);
151  virtual bool ShowForm(wxWindow* parent, Element* element);
152  virtual wxString GetTipText() const;
153  virtual SyncGeneratorElectricalData GetElectricalData() { return m_electricalData; }
154  virtual SyncGeneratorElectricalData GetPUElectricalData(double systemPowerBase);
155  virtual void SetElectricalData(SyncGeneratorElectricalData electricalData) { m_electricalData = electricalData; }
156  virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit);
157  virtual bool GetPlotData(ElementPlotData& plotData);
158 
159  protected:
160  std::vector<wxPoint2DDouble> m_sinePts;
161 
162  SyncGeneratorElectricalData m_electricalData;
163 };
164 
165 #endif // SYNCGENERATOR_H
- -
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
-
Synchronous generator power element.
- - -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
-
Integration constants to calculate dynamic elements through trapezoidal integration method...
Definition: PowerElement.h:105
-
Form to edit the synchronous machine power data.
- - - -
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
-
Abstract class for rotary machines power elements.
Definition: Machines.h:33
-
-
- - - - diff --git a/docs/doxygen/html/_sync_machine_form_8cpp_source.html b/docs/doxygen/html/_sync_machine_form_8cpp_source.html deleted file mode 100644 index 00ffe1f..0000000 --- a/docs/doxygen/html/_sync_machine_form_8cpp_source.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - -Project/SyncMachineForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SyncMachineForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "GeneratorStabForm.h"
19 #include "SyncMachineForm.h"
20 #include "SyncGenerator.h"
21 #include "SyncMotor.h"
22 
23 SyncMachineForm::SyncMachineForm(wxWindow* parent, SyncGenerator* syncGenerator) : SyncMachineFormBase(parent)
24 {
25  SetSize(GetBestSize());
26  ReplaceStaticTextLabelChar(m_staticTextPosResistance, L'\u2081');
27  ReplaceStaticTextLabelChar(m_staticTextPosReactance, L'\u2081');
28  ReplaceStaticTextLabelChar(m_staticTextNegResistance, L'\u2082');
29  ReplaceStaticTextLabelChar(m_staticTextNegReactance, L'\u2082');
30  ReplaceStaticTextLabelChar(m_staticTextZeroResistance, L'\u2080');
31  ReplaceStaticTextLabelChar(m_staticTextZeroReactance, L'\u2080');
32  Layout();
33  m_syncGenerator = syncGenerator;
34  m_parent = parent;
35 
36  SyncGeneratorElectricalData data = syncGenerator->GetElectricalData();
37 
38  m_textCtrlName->SetValue(data.name);
39 
40  m_textCtrlnominalPower->SetValue(SyncGenerator::StringFromDouble(data.nominalPower));
41  switch(data.nominalPowerUnit) {
42  case UNIT_VA:
43  m_choiceNominalPower->SetSelection(0);
44  break;
45  case UNIT_kVA:
46  m_choiceNominalPower->SetSelection(1);
47  break;
48  case UNIT_MVA:
49  m_choiceNominalPower->SetSelection(2);
50  break;
51  default:
52  break;
53  }
54 
55  m_textCtrlActivePower->SetValue(SyncGenerator::StringFromDouble(data.activePower));
56  switch(data.activePowerUnit) {
57  case UNIT_PU:
58  m_choiceActivePower->SetSelection(0);
59  break;
60  case UNIT_W:
61  m_choiceActivePower->SetSelection(1);
62  break;
63  case UNIT_kW:
64  m_choiceActivePower->SetSelection(2);
65  break;
66  case UNIT_MW:
67  m_choiceActivePower->SetSelection(3);
68  break;
69  default:
70  break;
71  }
72 
73  m_textCtrlReactivePower->SetValue(SyncGenerator::StringFromDouble(data.reactivePower));
74  switch(data.reactivePowerUnit) {
75  case UNIT_PU:
76  m_choiceReactivePower->SetSelection(0);
77  break;
78  case UNIT_VAr:
79  m_choiceReactivePower->SetSelection(1);
80  break;
81  case UNIT_kVAr:
82  m_choiceReactivePower->SetSelection(2);
83  break;
84  case UNIT_MVAr:
85  m_choiceReactivePower->SetSelection(3);
86  break;
87  default:
88  break;
89  }
90  m_checkBoxMaxReactive->SetValue(data.haveMaxReactive);
91 
92  m_textCtrlMaxRectivePower->SetValue(SyncGenerator::StringFromDouble(data.maxReactive));
93  switch(data.maxReactiveUnit) {
94  case UNIT_PU:
95  m_choiceMaxRectivePower->SetSelection(0);
96  break;
97  case UNIT_VAr:
98  m_choiceMaxRectivePower->SetSelection(1);
99  break;
100  case UNIT_kVAr:
101  m_choiceMaxRectivePower->SetSelection(2);
102  break;
103  case UNIT_MVAr:
104  m_choiceMaxRectivePower->SetSelection(3);
105  break;
106  default:
107  break;
108  }
109  m_textCtrlMaxRectivePower->Enable(data.haveMaxReactive);
110  m_choiceMaxRectivePower->Enable(data.haveMaxReactive);
111 
112  m_checkBoxMinReactive->SetValue(data.haveMinReactive);
113  m_textCtrlMinRectivePower->SetValue(SyncGenerator::StringFromDouble(data.minReactive));
114  switch(data.minReactiveUnit) {
115  case UNIT_PU:
116  m_choiceMinRectivePower->SetSelection(0);
117  break;
118  case UNIT_VAr:
119  m_choiceMinRectivePower->SetSelection(1);
120  break;
121  case UNIT_kVAr:
122  m_choiceMinRectivePower->SetSelection(2);
123  break;
124  case UNIT_MVAr:
125  m_choiceMinRectivePower->SetSelection(3);
126  break;
127  default:
128  break;
129  }
130  m_textCtrlMinRectivePower->Enable(data.haveMinReactive);
131  m_choiceMinRectivePower->Enable(data.haveMinReactive);
132 
133  m_checkBoxUseMachinePower->SetValue(data.useMachineBase);
134 
135  m_textCtrlPosResistance->SetValue(SyncGenerator::StringFromDouble(data.positiveResistance));
136  m_textCtrlPosReactance->SetValue(SyncGenerator::StringFromDouble(data.positiveReactance));
137  m_textCtrlNegResistance->SetValue(SyncGenerator::StringFromDouble(data.negativeResistance));
138  m_textCtrlNegReactance->SetValue(SyncGenerator::StringFromDouble(data.negativeReactance));
139  m_textCtrlZeroResistance->SetValue(SyncGenerator::StringFromDouble(data.zeroResistance));
140  m_textCtrlZeroReactance->SetValue(SyncGenerator::StringFromDouble(data.zeroReactance));
141  m_textCtrlGrdResistance->SetValue(SyncGenerator::StringFromDouble(data.groundResistance));
142  m_textCtrlGrdReactance->SetValue(SyncGenerator::StringFromDouble(data.groundReactance));
143  m_checkBoxGroundNeutral->SetValue(data.groundNeutral);
144 }
145 
146 SyncMachineForm::SyncMachineForm(wxWindow* parent, SyncMotor* syncMotor) : SyncMachineFormBase(parent)
147 {
148  m_buttonStab->Enable(false);
149  SetSize(GetBestSize());
150  ReplaceStaticTextLabelChar(m_staticTextPosResistance, L'\u2081');
151  ReplaceStaticTextLabelChar(m_staticTextPosReactance, L'\u2081');
152  ReplaceStaticTextLabelChar(m_staticTextNegResistance, L'\u2082');
153  ReplaceStaticTextLabelChar(m_staticTextNegReactance, L'\u2082');
154  ReplaceStaticTextLabelChar(m_staticTextZeroResistance, L'\u2080');
155  ReplaceStaticTextLabelChar(m_staticTextZeroReactance, L'\u2080');
156  Layout();
157  m_syncMotor = syncMotor;
158  m_parent = parent;
159 
160  SyncMotorElectricalData data = syncMotor->GetElectricalData();
161 
162  m_textCtrlName->SetValue(data.name);
163 
164  m_textCtrlnominalPower->SetValue(SyncMotor::StringFromDouble(data.nominalPower));
165  switch(data.nominalPowerUnit) {
166  case UNIT_VA:
167  m_choiceNominalPower->SetSelection(0);
168  break;
169  case UNIT_kVA:
170  m_choiceNominalPower->SetSelection(1);
171  break;
172  case UNIT_MVA:
173  m_choiceNominalPower->SetSelection(2);
174  break;
175  default:
176  break;
177  }
178 
179  m_textCtrlActivePower->SetValue(SyncMotor::StringFromDouble(data.activePower));
180  switch(data.activePowerUnit) {
181  case UNIT_PU:
182  m_choiceActivePower->SetSelection(0);
183  break;
184  case UNIT_W:
185  m_choiceActivePower->SetSelection(1);
186  break;
187  case UNIT_kW:
188  m_choiceActivePower->SetSelection(2);
189  break;
190  case UNIT_MW:
191  m_choiceActivePower->SetSelection(3);
192  break;
193  default:
194  break;
195  }
196 
197  m_textCtrlReactivePower->SetValue(SyncMotor::StringFromDouble(data.reactivePower));
198  switch(data.reactivePowerUnit) {
199  case UNIT_PU:
200  m_choiceReactivePower->SetSelection(0);
201  break;
202  case UNIT_VAr:
203  m_choiceReactivePower->SetSelection(1);
204  break;
205  case UNIT_kVAr:
206  m_choiceReactivePower->SetSelection(2);
207  break;
208  case UNIT_MVAr:
209  m_choiceReactivePower->SetSelection(3);
210  break;
211  default:
212  break;
213  }
214  m_checkBoxMaxReactive->SetValue(data.haveMaxReactive);
215 
216  m_textCtrlMaxRectivePower->SetValue(SyncMotor::StringFromDouble(data.maxReactive));
217  switch(data.maxReactiveUnit) {
218  case UNIT_PU:
219  m_choiceMaxRectivePower->SetSelection(0);
220  break;
221  case UNIT_VAr:
222  m_choiceMaxRectivePower->SetSelection(1);
223  break;
224  case UNIT_kVAr:
225  m_choiceMaxRectivePower->SetSelection(2);
226  break;
227  case UNIT_MVAr:
228  m_choiceMaxRectivePower->SetSelection(3);
229  break;
230  default:
231  break;
232  }
233  m_textCtrlMaxRectivePower->Enable(data.haveMaxReactive);
234  m_choiceMaxRectivePower->Enable(data.haveMaxReactive);
235 
236  m_checkBoxMinReactive->SetValue(data.haveMinReactive);
237  m_textCtrlMinRectivePower->SetValue(SyncMotor::StringFromDouble(data.minReactive));
238  switch(data.minReactiveUnit) {
239  case UNIT_PU:
240  m_choiceMinRectivePower->SetSelection(0);
241  break;
242  case UNIT_VAr:
243  m_choiceMinRectivePower->SetSelection(1);
244  break;
245  case UNIT_kVAr:
246  m_choiceMinRectivePower->SetSelection(2);
247  break;
248  case UNIT_MVAr:
249  m_choiceMinRectivePower->SetSelection(3);
250  break;
251  default:
252  break;
253  }
254  m_textCtrlMinRectivePower->Enable(data.haveMinReactive);
255  m_choiceMinRectivePower->Enable(data.haveMinReactive);
256 
257  m_checkBoxUseMachinePower->SetValue(data.useMachineBase);
258 
259  m_textCtrlPosResistance->SetValue(SyncMotor::StringFromDouble(data.positiveResistance));
260  m_textCtrlPosReactance->SetValue(SyncMotor::StringFromDouble(data.positiveReactance));
261  m_textCtrlNegResistance->SetValue(SyncMotor::StringFromDouble(data.negativeResistance));
262  m_textCtrlNegReactance->SetValue(SyncMotor::StringFromDouble(data.negativeReactance));
263  m_textCtrlZeroResistance->SetValue(SyncMotor::StringFromDouble(data.zeroResistance));
264  m_textCtrlZeroReactance->SetValue(SyncMotor::StringFromDouble(data.zeroReactance));
265  m_textCtrlGrdResistance->SetValue(SyncMotor::StringFromDouble(data.groundResistance));
266  m_textCtrlGrdReactance->SetValue(SyncMotor::StringFromDouble(data.groundReactance));
267  m_checkBoxGroundNeutral->SetValue(data.groundNeutral);
268 }
269 
270 SyncMachineForm::~SyncMachineForm() {}
271 void SyncMachineForm::OnCheckMaxReactive(wxCommandEvent& event)
272 {
273  m_textCtrlMaxRectivePower->Enable(m_checkBoxMaxReactive->GetValue());
274  m_choiceMaxRectivePower->Enable(m_checkBoxMaxReactive->GetValue());
275 }
276 void SyncMachineForm::OnCheckMinReactive(wxCommandEvent& event)
277 {
278  m_textCtrlMinRectivePower->Enable(m_checkBoxMinReactive->GetValue());
279  m_choiceMinRectivePower->Enable(m_checkBoxMinReactive->GetValue());
280 }
281 void SyncMachineForm::OnOKButtonClick(wxCommandEvent& event)
282 {
283  if(ValidateData()) EndModal(wxID_OK);
284 }
285 void SyncMachineForm::OnStabilityButtonClick(wxCommandEvent& event)
286 {
287  if(ValidateData()) {
288  if(m_syncGenerator) {
289  GeneratorStabForm* stabForm = new GeneratorStabForm(m_parent, m_syncGenerator);
290  if(stabForm->ShowModal() == wxID_OK) {
291  stabForm->Destroy();
292  EndModal(wxID_OK);
293  }
294 
295  stabForm->Destroy();
296  EndModal(wxID_CANCEL);
297  }
298  }
299 }
300 
301 bool SyncMachineForm::ValidateData()
302 {
303  if(m_syncGenerator) {
304  SyncGeneratorElectricalData data = m_syncGenerator->GetElectricalData();
305  data.name = m_textCtrlName->GetValue();
306 
307  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlnominalPower->GetValue(), data.nominalPower,
308  _("Value entered incorrectly in the field \"Nominal power\".")))
309  return false;
310  switch(m_choiceNominalPower->GetSelection()) {
311  case 0:
312  data.nominalPowerUnit = UNIT_VA;
313  break;
314  case 1:
315  data.nominalPowerUnit = UNIT_kVA;
316  break;
317  case 2:
318  data.nominalPowerUnit = UNIT_MVA;
319  break;
320  }
321 
322  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlActivePower->GetValue(), data.activePower,
323  _("Value entered incorrectly in the field \"Active power\".")))
324  return false;
325  switch(m_choiceActivePower->GetSelection()) {
326  case 0:
327  data.activePowerUnit = UNIT_PU;
328  break;
329  case 1:
330  data.activePowerUnit = UNIT_W;
331  break;
332  case 2:
333  data.activePowerUnit = UNIT_kW;
334  break;
335  case 3:
336  data.activePowerUnit = UNIT_MW;
337  break;
338  }
339 
340  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlReactivePower->GetValue(), data.reactivePower,
341  _("Value entered incorrectly in the field \"Reactive power\".")))
342  return false;
343  switch(m_choiceReactivePower->GetSelection()) {
344  case 0:
345  data.reactivePowerUnit = UNIT_PU;
346  break;
347  case 1:
348  data.reactivePowerUnit = UNIT_VAr;
349  break;
350  case 2:
351  data.reactivePowerUnit = UNIT_kVAr;
352  break;
353  case 3:
354  data.reactivePowerUnit = UNIT_MVAr;
355  break;
356  }
357 
358  data.haveMaxReactive = m_checkBoxMaxReactive->GetValue();
359  if(data.haveMaxReactive) {
360  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlMaxRectivePower->GetValue(), data.maxReactive,
361  _("Value entered incorrectly in the field \"Max reactive power\".")))
362  return false;
363  switch(m_choiceMaxRectivePower->GetSelection()) {
364  case 0:
365  data.maxReactiveUnit = UNIT_PU;
366  break;
367  case 1:
368  data.maxReactiveUnit = UNIT_VAr;
369  break;
370  case 2:
371  data.maxReactiveUnit = UNIT_kVAr;
372  break;
373  case 3:
374  data.maxReactiveUnit = UNIT_MVAr;
375  break;
376  }
377  }
378 
379  data.haveMinReactive = m_checkBoxMinReactive->GetValue();
380  if(data.haveMinReactive) {
381  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlMinRectivePower->GetValue(), data.minReactive,
382  _("Value entered incorrectly in the field \"Min reactive power\".")))
383  return false;
384  switch(m_choiceMinRectivePower->GetSelection()) {
385  case 0:
386  data.minReactiveUnit = UNIT_PU;
387  break;
388  case 1:
389  data.minReactiveUnit = UNIT_VAr;
390  break;
391  case 2:
392  data.minReactiveUnit = UNIT_kVAr;
393  break;
394  case 3:
395  data.minReactiveUnit = UNIT_MVAr;
396  break;
397  }
398  }
399 
400  data.useMachineBase = m_checkBoxUseMachinePower->GetValue();
401 
402  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlPosResistance->GetValue(), data.positiveResistance,
403  _("Value entered incorrectly in the field \"Positive resistance\".")))
404  return false;
405 
406  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlPosReactance->GetValue(), data.positiveReactance,
407  _("Value entered incorrectly in the field \"Positive reactance\".")))
408  return false;
409 
410  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlNegResistance->GetValue(), data.negativeResistance,
411  _("Value entered incorrectly in the field \"Negative resistance\".")))
412  return false;
413 
414  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlNegReactance->GetValue(), data.negativeReactance,
415  _("Value entered incorrectly in the field \"Negative reactance\".")))
416  return false;
417 
418  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlZeroResistance->GetValue(), data.zeroResistance,
419  _("Value entered incorrectly in the field \"Zero resistance\".")))
420  return false;
421 
422  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlZeroReactance->GetValue(), data.zeroReactance,
423  _("Value entered incorrectly in the field \"Zero reactance\".")))
424  return false;
425 
426  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlGrdResistance->GetValue(), data.groundResistance,
427  _("Value entered incorrectly in the field \"Ground resistance\".")))
428  return false;
429 
430  if(!m_syncGenerator->DoubleFromString(m_parent, m_textCtrlGrdReactance->GetValue(), data.groundReactance,
431  _("Value entered incorrectly in the field \"Ground reactance\".")))
432  return false;
433 
434  data.groundNeutral = m_checkBoxGroundNeutral->GetValue();
435 
436  m_syncGenerator->SetElectricalData(data);
437  } else if(m_syncMotor) {
438  SyncMotorElectricalData data = m_syncMotor->GetElectricalData();
439  data.name = m_textCtrlName->GetValue();
440 
441  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlnominalPower->GetValue(), data.nominalPower,
442  _("Value entered incorrectly in the field \"Nominal power\".")))
443  return false;
444  switch(m_choiceNominalPower->GetSelection()) {
445  case 0:
446  data.nominalPowerUnit = UNIT_VA;
447  break;
448  case 1:
449  data.nominalPowerUnit = UNIT_kVA;
450  break;
451  case 2:
452  data.nominalPowerUnit = UNIT_MVA;
453  break;
454  }
455 
456  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlActivePower->GetValue(), data.activePower,
457  _("Value entered incorrectly in the field \"Active power\".")))
458  return false;
459  switch(m_choiceActivePower->GetSelection()) {
460  case 0:
461  data.activePowerUnit = UNIT_PU;
462  break;
463  case 1:
464  data.activePowerUnit = UNIT_W;
465  break;
466  case 2:
467  data.activePowerUnit = UNIT_kW;
468  break;
469  case 3:
470  data.activePowerUnit = UNIT_MW;
471  break;
472  }
473 
474  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlReactivePower->GetValue(), data.reactivePower,
475  _("Value entered incorrectly in the field \"Reactive power\".")))
476  return false;
477  switch(m_choiceReactivePower->GetSelection()) {
478  case 0:
479  data.reactivePowerUnit = UNIT_PU;
480  break;
481  case 1:
482  data.reactivePowerUnit = UNIT_VAr;
483  break;
484  case 2:
485  data.reactivePowerUnit = UNIT_kVAr;
486  break;
487  case 3:
488  data.reactivePowerUnit = UNIT_MVAr;
489  break;
490  }
491 
492  data.haveMaxReactive = m_checkBoxMaxReactive->GetValue();
493  if(data.haveMaxReactive) {
494  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlMaxRectivePower->GetValue(), data.maxReactive,
495  _("Value entered incorrectly in the field \"Max reactive power\".")))
496  return false;
497  switch(m_choiceMaxRectivePower->GetSelection()) {
498  case 0:
499  data.maxReactiveUnit = UNIT_PU;
500  break;
501  case 1:
502  data.maxReactiveUnit = UNIT_VAr;
503  break;
504  case 2:
505  data.maxReactiveUnit = UNIT_kVAr;
506  break;
507  case 3:
508  data.maxReactiveUnit = UNIT_MVAr;
509  break;
510  }
511  }
512 
513  data.haveMinReactive = m_checkBoxMinReactive->GetValue();
514  if(data.haveMinReactive) {
515  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlMinRectivePower->GetValue(), data.minReactive,
516  _("Value entered incorrectly in the field \"Min reactive power\".")))
517  return false;
518  switch(m_choiceMinRectivePower->GetSelection()) {
519  case 0:
520  data.minReactiveUnit = UNIT_PU;
521  break;
522  case 1:
523  data.minReactiveUnit = UNIT_VAr;
524  break;
525  case 2:
526  data.minReactiveUnit = UNIT_kVAr;
527  break;
528  case 3:
529  data.minReactiveUnit = UNIT_MVAr;
530  break;
531  }
532  }
533 
534  data.useMachineBase = m_checkBoxUseMachinePower->GetValue();
535 
536  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlPosResistance->GetValue(), data.positiveResistance,
537  _("Value entered incorrectly in the field \"Positive resistance\".")))
538  return false;
539 
540  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlPosReactance->GetValue(), data.positiveReactance,
541  _("Value entered incorrectly in the field \"Positive reactance\".")))
542  return false;
543 
544  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlNegResistance->GetValue(), data.negativeResistance,
545  _("Value entered incorrectly in the field \"Negative resistance\".")))
546  return false;
547 
548  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlNegReactance->GetValue(), data.negativeReactance,
549  _("Value entered incorrectly in the field \"Negative reactance\".")))
550  return false;
551 
552  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlZeroResistance->GetValue(), data.zeroResistance,
553  _("Value entered incorrectly in the field \"Zero resistance\".")))
554  return false;
555 
556  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlZeroReactance->GetValue(), data.zeroReactance,
557  _("Value entered incorrectly in the field \"Zero reactance\".")))
558  return false;
559 
560  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlGrdResistance->GetValue(), data.groundResistance,
561  _("Value entered incorrectly in the field \"Ground resistance\".")))
562  return false;
563 
564  if(!m_syncMotor->DoubleFromString(m_parent, m_textCtrlGrdReactance->GetValue(), data.groundReactance,
565  _("Value entered incorrectly in the field \"Ground reactance\".")))
566  return false;
567 
568  data.groundNeutral = m_checkBoxGroundNeutral->GetValue();
569 
570  m_syncMotor->SetElectricalData(data);
571  }
572  return true;
573 }
574 
575 void SyncMachineForm::ReplaceStaticTextLabelChar(wxStaticText* staticText, wchar_t newChar)
576 {
577  wxString label = staticText->GetLabel();
578  label[label.length() - 2] = newChar;
579  staticText->SetLabel(label);
580 }
- - - -
Synchronous generator power element.
- - - - - - -
Form to edit the synchronous generator data for electromechanical studies.
- - -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
- -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- - - - -
-
- - - - diff --git a/docs/doxygen/html/_sync_machine_form_8h.html b/docs/doxygen/html/_sync_machine_form_8h.html index 30ad9aa..8889bb4 100644 --- a/docs/doxygen/html/_sync_machine_form_8h.html +++ b/docs/doxygen/html/_sync_machine_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_sync_machine_form_8h.html','');});
SyncMachineForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_sync_machine_form_8h_source.html b/docs/doxygen/html/_sync_machine_form_8h_source.html deleted file mode 100644 index 15aa6ca..0000000 --- a/docs/doxygen/html/_sync_machine_form_8h_source.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - -Project/SyncMachineForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  SyncMachineForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SyncMachineForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef SYNCMACHINEFORM_H
19 #define SYNCMACHINEFORM_H
20 
21 #include "ElementForm.h"
22 
23 class GeneratorStabForm;
24 class SyncGenerator;
25 class SyncMotor;
26 
35 {
36  public:
37  SyncMachineForm(wxWindow* parent, SyncGenerator* syncGenerator);
38  SyncMachineForm(wxWindow* parent, SyncMotor* syncMotor);
39  virtual ~SyncMachineForm();
40 
41  protected:
42  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); };
43  virtual void OnCheckMaxReactive(wxCommandEvent& event);
44  virtual void OnCheckMinReactive(wxCommandEvent& event);
45  virtual void OnOKButtonClick(wxCommandEvent& event);
46  virtual void OnStabilityButtonClick(wxCommandEvent& event);
47 
48  virtual bool ValidateData();
49  virtual void ReplaceStaticTextLabelChar(wxStaticText* staticText, wchar_t newChar);
50 
51  SyncGenerator* m_syncGenerator = NULL;
52  SyncMotor* m_syncMotor = NULL;
53  wxWindow* m_parent = NULL;
54 };
55 #endif // SYNCMACHINEFORM_H
Synchronous generator power element.
- -
Form to edit the synchronous machine power data.
-
Form to edit the synchronous generator data for electromechanical studies.
-
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
-
-
- - - - diff --git a/docs/doxygen/html/_sync_motor_8cpp_source.html b/docs/doxygen/html/_sync_motor_8cpp_source.html deleted file mode 100644 index 7c4589b..0000000 --- a/docs/doxygen/html/_sync_motor_8cpp_source.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - -Project/SyncMotor.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SyncMotor.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "SyncMachineForm.h"
19 #include "SyncMotor.h"
20 
21 SyncMotor::SyncMotor() : Machines() {}
22 SyncMotor::SyncMotor(wxString name) : Machines() { m_electricalData.name = name; }
23 SyncMotor::~SyncMotor() {}
24 void SyncMotor::DrawSymbol() const { DrawArc(m_position, 12, 30, 330, 10, GL_LINE_STRIP); }
25 bool SyncMotor::GetContextMenu(wxMenu& menu)
26 {
27  menu.Append(ID_EDIT_ELEMENT, _("Edit Synchronous Condenser"));
28  GeneralMenuItens(menu);
29 
30  return true;
31 }
32 
33 bool SyncMotor::ShowForm(wxWindow* parent, Element* element)
34 {
35  SyncMachineForm* syncMotorForm = new SyncMachineForm(parent, this);
36  syncMotorForm->SetTitle(_("Synchronous Condenser"));
37  if(syncMotorForm->ShowModal() == wxID_OK) {
38  syncMotorForm->Destroy();
39  return true;
40  }
41 
42  syncMotorForm->Destroy();
43  return false;
44 }
45 
46 SyncMotorElectricalData SyncMotor::GetPUElectricalData(double systemPowerBase)
47 {
48  SyncMotorElectricalData data = m_electricalData;
49  double machineBasePower = 1.0;
50  if(data.useMachineBase) {
51  machineBasePower = GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
52  }
53 
54  // Active power
55  double activePower = GetValueFromUnit(data.activePower, data.activePowerUnit);
56  if(!m_online) activePower = 0.0;
57  if(data.activePowerUnit == UNIT_PU) {
58  if(data.useMachineBase) data.activePower = (activePower * machineBasePower) / systemPowerBase;
59  } else {
60  data.activePower = activePower / systemPowerBase;
61  }
62  data.activePowerUnit = UNIT_PU;
63 
64  // Reactive power
65  double reactivePower = GetValueFromUnit(data.reactivePower, data.reactivePowerUnit);
66  if(!m_online) reactivePower = 0.0;
67  if(data.reactivePowerUnit == UNIT_PU) {
68  if(data.useMachineBase) data.reactivePower = (reactivePower * machineBasePower) / systemPowerBase;
69  } else {
70  data.reactivePower = reactivePower / systemPowerBase;
71  }
72  data.reactivePowerUnit = UNIT_PU;
73 
74  // Max reactive power
75  double maxReactive = GetValueFromUnit(data.maxReactive, data.maxReactiveUnit);
76  if(data.maxReactiveUnit == UNIT_PU) {
77  if(data.useMachineBase) data.maxReactive = (maxReactive * machineBasePower) / systemPowerBase;
78  } else {
79  data.maxReactive = maxReactive / systemPowerBase;
80  }
81  data.maxReactiveUnit = UNIT_PU;
82 
83  // Min reactive power
84  double minReactive = GetValueFromUnit(data.minReactive, data.minReactiveUnit);
85  if(data.minReactiveUnit == UNIT_PU) {
86  if(data.useMachineBase) data.minReactive = (minReactive * machineBasePower) / systemPowerBase;
87  } else {
88  data.minReactive = minReactive / systemPowerBase;
89  }
90  data.minReactiveUnit = UNIT_PU;
91 
92  double baseVoltage = GetValueFromUnit(data.nominalVoltage, data.nominalVoltageUnit);
93  double systemBaseImpedance = (baseVoltage * baseVoltage) / systemPowerBase;
94  double machineBaseImpedance = (baseVoltage * baseVoltage) / machineBasePower;
95 
96  // Fault data
97  if(data.useMachineBase) {
98  data.positiveResistance = (data.positiveResistance * machineBaseImpedance) / systemBaseImpedance;
99  data.positiveReactance = (data.positiveReactance * machineBaseImpedance) / systemBaseImpedance;
100  data.negativeResistance = (data.negativeResistance * machineBaseImpedance) / systemBaseImpedance;
101  data.negativeReactance = (data.negativeReactance * machineBaseImpedance) / systemBaseImpedance;
102  data.zeroResistance = (data.zeroResistance * machineBaseImpedance) / systemBaseImpedance;
103  data.zeroReactance = (data.zeroReactance * machineBaseImpedance) / systemBaseImpedance;
104  data.groundResistance = (data.groundResistance * machineBaseImpedance) / systemBaseImpedance;
105  data.groundReactance = (data.groundReactance * machineBaseImpedance) / systemBaseImpedance;
106  }
107 
108  if(!m_online) {
109  data.faultCurrent[0] = std::complex<double>(0, 0);
110  data.faultCurrent[1] = std::complex<double>(0, 0);
111  data.faultCurrent[2] = std::complex<double>(0, 0);
112  }
113 
114  return data;
115 }
116 
117 void SyncMotor::SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit)
118 {
119  if(nominalVoltage.size() > 0) {
120  m_electricalData.nominalVoltage = nominalVoltage[0];
121  m_electricalData.nominalVoltageUnit = nominalVoltageUnit[0];
122  }
123 }
124 
126 {
127  SyncMotor* copy = new SyncMotor();
128  *copy = *this;
129  return copy;
130 }
131 
132 wxString SyncMotor::GetTipText() const
133 {
134  wxString tipText = m_electricalData.name;
135  tipText += "\n";
136  double activePower = m_electricalData.activePower;
137  if(!m_online) activePower = 0.0;
138  tipText += _("\nP = ") + wxString::FromDouble(activePower, 5);
139  switch(m_electricalData.activePowerUnit) {
140  case UNIT_PU: {
141  tipText += _(" p.u.");
142  } break;
143  case UNIT_W: {
144  tipText += _(" W");
145  } break;
146  case UNIT_kW: {
147  tipText += _(" kW");
148  } break;
149  case UNIT_MW: {
150  tipText += _(" MW");
151  } break;
152  default:
153  break;
154  }
155  double reactivePower = m_electricalData.reactivePower;
156  if(!m_online) reactivePower = 0.0;
157  tipText += _("\nQ = ") + wxString::FromDouble(reactivePower, 5);
158  switch(m_electricalData.reactivePowerUnit) {
159  case UNIT_PU: {
160  tipText += _(" p.u.");
161  } break;
162  case UNIT_VAr: {
163  tipText += _(" VAr");
164  } break;
165  case UNIT_kVAr: {
166  tipText += _(" kVAr");
167  } break;
168  case UNIT_MVAr: {
169  tipText += _(" MVAr");
170  } break;
171  default:
172  break;
173  }
174 
175  return tipText;
176 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual Element * GetCopy()
Get a the element copy.
Definition: SyncMotor.cpp:125
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: SyncMotor.cpp:25
-
virtual wxString GetTipText() const
Get the tip text.
Definition: SyncMotor.cpp:132
- - - - - - -
Form to edit the synchronous machine power data.
- - -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
- -
virtual void SetNominalVoltage(std::vector< double > nominalVoltage, std::vector< ElectricalUnit > nominalVoltageUnit)
Set nominal voltage of the element.
Definition: SyncMotor.cpp:117
-
Abstract class for rotary machines power elements.
Definition: Machines.h:33
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: SyncMotor.cpp:33
- - -
-
- - - - diff --git a/docs/doxygen/html/_sync_motor_8h.html b/docs/doxygen/html/_sync_motor_8h.html index 4de597b..e444a80 100644 --- a/docs/doxygen/html/_sync_motor_8h.html +++ b/docs/doxygen/html/_sync_motor_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_sync_motor_8h.html','');});
SyncMotor.h File Reference
-
#include "Machines.h"
-
-

Go to the source code of this file.

- +
#include "Machines.h"
+
diff --git a/docs/doxygen/html/_sync_motor_8h_source.html b/docs/doxygen/html/_sync_motor_8h_source.html deleted file mode 100644 index ecccd02..0000000 --- a/docs/doxygen/html/_sync_motor_8h_source.html +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - -Project/SyncMotor.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  SyncMotorElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
SyncMotor.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef SYNCMOTOR_H
19 #define SYNCMOTOR_H
20 
21 #include "Machines.h"
22 
23 class SyncMachineForm;
24 
26  // General
27  wxString name = "";
28  double nominalPower = 100.0;
29  ElectricalUnit nominalPowerUnit = UNIT_MVA;
30  double nominalVoltage = 13.8;
31  ElectricalUnit nominalVoltageUnit = UNIT_kV;
32  double activePower = 100.0;
33  ElectricalUnit activePowerUnit = UNIT_MW;
34  double reactivePower = 0.0;
35  ElectricalUnit reactivePowerUnit = UNIT_MVAr;
36  bool haveMaxReactive = false;
37  double maxReactive = 9999.0;
38  ElectricalUnit maxReactiveUnit = UNIT_MVAr;
39  bool haveMinReactive = false;
40  double minReactive = -9999.0;
41  ElectricalUnit minReactiveUnit = UNIT_MVAr;
42  bool useMachineBase = true;
43 
44  // Fault
45  double positiveResistance = 0.0;
46  double positiveReactance = 1.0;
47  double negativeResistance = 0.0;
48  double negativeReactance = 1.0;
49  double zeroResistance = 0.0;
50  double zeroReactance = 1.0;
51  double groundResistance = 0.0;
52  double groundReactance = 0.0;
53  bool groundNeutral = true;
54  // p.u. fault data
55  std::complex<double> faultCurrent[3] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0),
56  std::complex<double>(0.0, 0.0)};
57 
58  // Stability
59  bool plotSyncMachine = false;
60  double inertia = 1.0;
61  double damping = 0.0;
62  bool useAVR = false;
63  bool useSpeedGovernor = false;
64 
65  double armResistance = 0.0;
66  double potierReactance = 0.0;
67  double satFactor = 0.0;
68 
69  double syncXd = 0.0;
70  double syncXq = 0.0;
71  double transXd = 1.0;
72  double transXq = 0.0;
73  double transTd0 = 0.0;
74  double transTq0 = 0.0;
75  double subXd = 0.0;
76  double subXq = 0.0;
77  double subTd0 = 0.0;
78  double subTq0 = 0.0;
79 
80  // Machine state variables
81  std::complex<double> terminalVoltage;
82  std::vector<std::complex<double> > terminalVoltageVector;
83  std::complex<double> electricalPower;
84  std::vector<std::complex<double> > electricalPowerVector;
85  double pm;
86  std::vector<double> mechanicalPowerVector;
87  double speed;
88  std::vector<double> freqVector;
89  double fieldVoltage;
90  std::vector<double> fieldVoltageVector;
91  double delta;
92  std::vector<double> deltaVector;
93 
94  double initialFieldVoltage;
95 
96  // Internal machine variables
97  double tranEq;
98  double tranEd;
99  double subEq;
100  double subEd;
101  double pe;
102 
103  // Variables to extrapolate
104  double oldId;
105  double oldIq;
106  double oldPe;
107 
108  // Integration constants
109  IntegrationConstant icSpeed;
110  IntegrationConstant icDelta;
111  IntegrationConstant icTranEq;
112  IntegrationConstant icTranEd;
113  IntegrationConstant icSubEq;
114  IntegrationConstant icSubEd;
115 
116  // Control
117  ControlElementContainer* avr = NULL;
118  ControlElementContainer* speedGov = NULL;
119 
120  // Control solvers
121  ControlElementSolver* avrSolver = NULL;
122  ControlElementSolver* speedGovSolver = NULL;
123 
124  Machines::SyncMachineModel model = Machines::SM_MODEL_1;
125 };
126 
134 class SyncMotor : public Machines
135 {
136  public:
137  SyncMotor();
138  SyncMotor(wxString name);
139  ~SyncMotor();
140 
141  virtual Element* GetCopy();
142  virtual void DrawSymbol() const;
143  virtual bool GetContextMenu(wxMenu& menu);
144  virtual wxString GetTipText() const;
145  virtual SyncMotorElectricalData GetElectricalData() { return m_electricalData; }
146  virtual SyncMotorElectricalData GetPUElectricalData(double systemPowerBase);
147  virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit);
148  virtual void SetElectricalData(SyncMotorElectricalData electricalData) { m_electricalData = electricalData; }
149  virtual bool ShowForm(wxWindow* parent, Element* element);
150 
151  protected:
152  SyncMotorElectricalData m_electricalData;
153 };
154 
155 #endif // SYNCMOTOR_H
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Solves in the time the control system. Can solve the control system directly from a ControlEditor or ...
- - -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
-
Integration constants to calculate dynamic elements through trapezoidal integration method...
Definition: PowerElement.h:105
-
Form to edit the synchronous machine power data.
- - -
Class that can contain all control elements. Can identify (using RTTI) the elements from a generic li...
-
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
-
Abstract class for rotary machines power elements.
Definition: Machines.h:33
- -
-
- - - - diff --git a/docs/doxygen/html/_text_8cpp_source.html b/docs/doxygen/html/_text_8cpp_source.html deleted file mode 100644 index a1482c9..0000000 --- a/docs/doxygen/html/_text_8cpp_source.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - -Project/Text.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Text.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "TextForm.h"
19 #include "Text.h"
20 
21 #ifdef USING_WX_3_0_X
22 #include "DegreesAndRadians.h"
23 #endif
24 #include "ElectricCalculation.h"
25 #include "Bus.h"
26 #include "Line.h"
27 #include "Transformer.h"
28 #include "SyncGenerator.h"
29 #include "IndMotor.h"
30 #include "SyncMotor.h"
31 #include "Load.h"
32 #include "Inductor.h"
33 #include "Capacitor.h"
34 
35 Text::Text() : GraphicalElement() { SetText(m_text); }
36 Text::Text(wxPoint2DDouble position) : GraphicalElement()
37 {
38  m_position = position;
39  SetText(m_text);
40 }
41 
42 Text::~Text() {}
43 bool Text::Contains(wxPoint2DDouble position) const
44 {
45  wxPoint2DDouble ptR = RotateAtPosition(position, -m_angle);
46  return m_rect.Contains(ptR);
47 }
48 
49 void Text::Draw(wxPoint2DDouble translation, double scale)
50 {
51  // Draw selection rectangle
52 
53  // Push the current matrix on stack.
54  glPushMatrix();
55  // Rotate the matrix around the object position.
56  glTranslated(m_position.m_x, m_position.m_y, 0.0);
57  glRotated(m_angle, 0.0, 0.0, 1.0);
58  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
59 
60  if(m_selected) {
61  glColor4d(0.0, 0.5, 1.0, 0.5);
62  DrawRectangle(m_position + wxPoint2DDouble(m_borderSize / 2.0, m_borderSize / 2.0), m_rect.m_width,
63  m_rect.m_height);
64  }
65 
66  // Draw text (layer 2)
67  glColor4d(0.0, 0.0, 0.0, 1.0);
68  if(m_isMultlineText) {
69  for(unsigned int i = 0; i < m_openGLTextList.size(); ++i) {
70  m_openGLTextList[i]->Draw(
71  m_position +
72  wxPoint2DDouble(0.0, (m_height * static_cast<double>(i) / static_cast<double>(m_numberOfLines)) -
73  (m_height * static_cast<double>(m_numberOfLines - 1) /
74  static_cast<double>(2 * m_numberOfLines))));
75  }
76  } else if(m_openGLTextList.size() > 0) {
77  m_openGLTextList[0]->Draw(m_position);
78  }
79  glPopMatrix();
80 }
81 
82 bool Text::Intersects(wxRect2DDouble rect) const
83 {
84  if(m_angle == 0.0 || m_angle == 180.0) return m_rect.Intersects(rect);
85  return RotatedRectanglesIntersects(m_rect, rect, m_angle, 0.0);
86 }
87 
88 void Text::SetText(wxString text)
89 {
90  m_text = text;
91 
92  // Clear OpenGL text list
93  for(auto it = m_openGLTextList.begin(), itEnd = m_openGLTextList.end(); it != itEnd; ++it) {
94  delete *it;
95  }
96  m_openGLTextList.clear();
97 
98  m_numberOfLines = m_text.Freq('\n') + 1;
99  if(m_numberOfLines > 1) m_isMultlineText = true;
100  m_width = 0.0;
101  m_height = 0.0;
102  wxString multText = m_text;
103  for(int i = 0; i < m_numberOfLines; ++i) {
104  wxString nextLine;
105  wxString currentLine = multText.BeforeFirst('\n', &nextLine);
106  multText = nextLine;
107  m_openGLTextList.push_back(new OpenGLText(currentLine));
108  if(m_openGLTextList[i]->GetWidth() > m_width) m_width = m_openGLTextList[i]->GetWidth();
109  m_height += m_openGLTextList[i]->GetHeight();
110  }
111  SetPosition(m_position); // Update element rectangle.
112 }
113 
114 void Text::Rotate(bool clockwise)
115 {
116  double rotAngle = m_rotationAngle;
117  if(!clockwise) rotAngle = -m_rotationAngle;
118 
119  m_angle += rotAngle;
120  if(m_angle >= 360 || m_angle <= -360) m_angle = 0.0;
121 }
122 
123 bool Text::ShowForm(wxWindow* parent, std::vector<Element*> elementList)
124 {
125  TextForm* textForm = new TextForm(parent, this, elementList);
126  if(textForm->ShowModal() == wxID_OK) {
127  textForm->Destroy();
128  return true;
129  }
130  textForm->Destroy();
131  return false;
132 }
133 
134 void Text::UpdateText(double systemPowerBase)
135 {
136  switch(m_elementType) {
137  case TYPE_NONE:
138  SetText(m_text);
139  break;
140  case TYPE_BUS: {
141  Bus* bus = static_cast<Bus*>(m_element);
142  if(bus) {
143  BusElectricalData data = bus->GetElectricalData();
144  double baseVoltage = data.nominalVoltage;
145  if(data.nominalVoltageUnit == UNIT_kV) baseVoltage *= 1e3;
146  double baseCurrent = systemPowerBase / (std::sqrt(3.0) * baseVoltage);
147 
148  switch(m_dataType) {
149  case DATA_NAME: {
150  SetText(bus->GetElectricalData().name);
151  } break;
152  case DATA_VOLTAGE: {
153  double voltage = std::abs(data.voltage);
154  switch(m_unit) {
155  case UNIT_PU: {
156  SetText(wxString::FromDouble(voltage, m_decimalPlaces) + " p.u.");
157  } break;
158  case UNIT_V: {
159  SetText(wxString::FromDouble(voltage * baseVoltage, m_decimalPlaces) + " V");
160  } break;
161  case UNIT_kV: {
162  SetText(wxString::FromDouble(voltage * baseVoltage / 1e3, m_decimalPlaces) + " kV");
163  } break;
164  default:
165  break;
166  }
167  } break;
168  case DATA_ANGLE: {
169  double angle = std::arg(data.voltage);
170  switch(m_unit) {
171  case UNIT_RADIAN: {
172  SetText(wxString::FromDouble(angle, m_decimalPlaces) + " rad");
173  } break;
174  case UNIT_DEGREE: {
175  SetText(wxString::FromDouble(wxRadToDeg(angle), m_decimalPlaces) + (wxString)L'\u00B0');
176  } break;
177  default:
178  break;
179  }
180  } break;
181  case DATA_SC_CURRENT: {
182  double faultCurrent[3] = {std::abs(data.faultCurrent[0]), std::abs(data.faultCurrent[1]),
183  std::abs(data.faultCurrent[2])};
184  switch(m_unit) {
185  case UNIT_PU: {
186  wxString str =
187  "Ia = " + wxString::FromDouble(faultCurrent[0], m_decimalPlaces) + " p.u.";
188  str += "\nIb = " + wxString::FromDouble(faultCurrent[1], m_decimalPlaces) + " p.u.";
189  str += "\nIc = " + wxString::FromDouble(faultCurrent[2], m_decimalPlaces) + " p.u.";
190  SetText(str);
191  } break;
192  case UNIT_A: {
193  wxString str = "Ia = " +
194  wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) +
195  " A";
196  str += "\nIb = " +
197  wxString::FromDouble(faultCurrent[1] * baseCurrent, m_decimalPlaces) + " A";
198  str += "\nIc = " +
199  wxString::FromDouble(faultCurrent[2] * baseCurrent, m_decimalPlaces) + " A";
200  SetText(str);
201  } break;
202  case UNIT_kA: {
203  wxString str =
204  "Ia = " +
205  wxString::FromDouble(faultCurrent[0] * baseCurrent / 1e3, m_decimalPlaces) + " kA";
206  str += "\nIb = " +
207  wxString::FromDouble(faultCurrent[1] * baseCurrent / 1e3, m_decimalPlaces) +
208  " kA";
209  str += "\nIc = " +
210  wxString::FromDouble(faultCurrent[2] * baseCurrent / 1e3, m_decimalPlaces) +
211  " kA";
212  SetText(str);
213  } break;
214  default:
215  break;
216  }
217  } break;
218  case DATA_SC_VOLTAGE: {
219  double faultVoltage[3] = {std::abs(data.faultVoltage[0]), std::abs(data.faultVoltage[1]),
220  std::abs(data.faultVoltage[2])};
221  switch(m_unit) {
222  case UNIT_PU: {
223  wxString str =
224  "Va = " + wxString::FromDouble(faultVoltage[0], m_decimalPlaces) + " p.u.";
225  str += "\nVb = " + wxString::FromDouble(faultVoltage[1], m_decimalPlaces) + " p.u.";
226  str += "\nVc = " + wxString::FromDouble(faultVoltage[2], m_decimalPlaces) + " p.u.";
227  SetText(str);
228  } break;
229  case UNIT_V: {
230  wxString str = "Va = " +
231  wxString::FromDouble(faultVoltage[0] * baseVoltage, m_decimalPlaces) +
232  " V";
233  str += "\nVb = " +
234  wxString::FromDouble(faultVoltage[1] * baseVoltage, m_decimalPlaces) + " V";
235  str += "\nVc = " +
236  wxString::FromDouble(faultVoltage[2] * baseVoltage, m_decimalPlaces) + " V";
237  SetText(str);
238  } break;
239  case UNIT_kV: {
240  wxString str =
241  "Va = " +
242  wxString::FromDouble(faultVoltage[0] * baseVoltage / 1e3, m_decimalPlaces) + " kV";
243  str += "\nVb = " +
244  wxString::FromDouble(faultVoltage[1] * baseVoltage / 1e3, m_decimalPlaces) +
245  " kV";
246  str += "\nVc = " +
247  wxString::FromDouble(faultVoltage[2] * baseVoltage / 1e3, m_decimalPlaces) +
248  " kV";
249  SetText(str);
250  } break;
251  default:
252  break;
253  }
254  } break;
255  case DATA_SC_POWER: {
256  switch(m_unit) {
257  case UNIT_PU: {
258  SetText(wxString::FromDouble(data.scPower, m_decimalPlaces) + " p.u.");
259  } break;
260  case UNIT_VA: {
261  SetText(wxString::FromDouble(data.scPower * systemPowerBase, m_decimalPlaces) + " VA");
262  } break;
263  case UNIT_kVA: {
264  SetText(wxString::FromDouble(data.scPower * systemPowerBase / 1e3, m_decimalPlaces) +
265  " kVA");
266  } break;
267  case UNIT_MVA: {
268  SetText(wxString::FromDouble(data.scPower * systemPowerBase / 1e6, m_decimalPlaces) +
269  " MVA");
270  } break;
271  default:
272  break;
273  }
274  } break;
275  default:
276  break;
277  }
278  }
279  } break;
280  case TYPE_SYNC_GENERATOR: {
281  SyncGenerator* syncGenerator = static_cast<SyncGenerator*>(m_element);
282  if(syncGenerator) {
283  SyncGeneratorElectricalData data = syncGenerator->GetPUElectricalData(systemPowerBase);
284  double baseVoltage = syncGenerator->GetValueFromUnit(data.nominalVoltage, data.nominalVoltageUnit);
285  double baseCurrent = systemPowerBase / (std::sqrt(3.0) * baseVoltage);
286  switch(m_dataType) {
287  case DATA_NAME: {
288  SetText(data.name);
289  } break;
290  case DATA_ACTIVE_POWER: {
291  double activePower = data.activePower;
292  if(!syncGenerator->IsOnline()) activePower = 0.0;
293  switch(m_unit) {
294  case UNIT_PU: {
295  SetText(wxString::FromDouble(activePower, m_decimalPlaces) + " p.u.");
296  } break;
297  case UNIT_W: {
298  SetText(wxString::FromDouble(activePower * systemPowerBase, m_decimalPlaces) + " W");
299  } break;
300  case UNIT_kW: {
301  SetText(wxString::FromDouble(activePower * systemPowerBase / 1e3, m_decimalPlaces) +
302  " kW");
303  } break;
304  case UNIT_MW: {
305  SetText(wxString::FromDouble(activePower * systemPowerBase / 1e6, m_decimalPlaces) +
306  " MW");
307  } break;
308  default:
309  break;
310  }
311  } break;
312  case DATA_REACTIVE_POWER: {
313  double reactivePower = data.reactivePower;
314  if(!syncGenerator->IsOnline()) reactivePower = 0.0;
315  switch(m_unit) {
316  case UNIT_PU: {
317  SetText(wxString::FromDouble(reactivePower, m_decimalPlaces) + " p.u.");
318  } break;
319  case UNIT_VAr: {
320  SetText(wxString::FromDouble(reactivePower * systemPowerBase, m_decimalPlaces) +
321  " VAr");
322  } break;
323  case UNIT_kVAr: {
324  SetText(wxString::FromDouble(reactivePower * systemPowerBase / 1e3, m_decimalPlaces) +
325  " kVAr");
326  } break;
327  case UNIT_MVAr: {
328  SetText(wxString::FromDouble(reactivePower * systemPowerBase / 1e6, m_decimalPlaces) +
329  " MVAr");
330  } break;
331  default:
332  break;
333  }
334  } break;
335  case DATA_SC_CURRENT: {
336  double faultCurrent[3] = {std::abs(data.faultCurrent[0]), std::abs(data.faultCurrent[1]),
337  std::abs(data.faultCurrent[2])};
338  switch(m_unit) {
339  case UNIT_PU: {
340  wxString str =
341  "Ia = " + wxString::FromDouble(faultCurrent[0], m_decimalPlaces) + " p.u.";
342  str += "\nIb = " + wxString::FromDouble(faultCurrent[1], m_decimalPlaces) + " p.u.";
343  str += "\nIc = " + wxString::FromDouble(faultCurrent[2], m_decimalPlaces) + " p.u.";
344  SetText(str);
345  } break;
346  case UNIT_A: {
347  wxString str = "Ia = " +
348  wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) +
349  " A";
350  str += "\nIb = " +
351  wxString::FromDouble(faultCurrent[1] * baseCurrent, m_decimalPlaces) + " A";
352  str += "\nIc = " +
353  wxString::FromDouble(faultCurrent[2] * baseCurrent, m_decimalPlaces) + " A";
354  SetText(str);
355  } break;
356  case UNIT_kA: {
357  wxString str =
358  "Ia = " +
359  wxString::FromDouble(faultCurrent[0] * baseCurrent / 1e3, m_decimalPlaces) + " kA";
360  str += "\nIb = " +
361  wxString::FromDouble(faultCurrent[1] * baseCurrent / 1e3, m_decimalPlaces) +
362  " kA";
363  str += "\nIc = " +
364  wxString::FromDouble(faultCurrent[2] * baseCurrent / 1e3, m_decimalPlaces) +
365  " kA";
366  SetText(str);
367  } break;
368  default:
369  break;
370  }
371  } break;
372  default:
373  break;
374  }
375  }
376  } break;
377  case TYPE_LINE: {
378  Line* line = static_cast<Line*>(m_element);
379  if(line) {
380  LineElectricalData data = line->GetElectricalData();
381  double baseVoltage = data.nominalVoltage;
382  if(data.nominalVoltageUnit == UNIT_kV) baseVoltage *= 1e3;
383  double baseCurrent = systemPowerBase / (std::sqrt(3.0) * baseVoltage);
384  switch(m_dataType) {
385  case DATA_NAME: {
386  SetText(data.name);
387  } break;
388  case DATA_PF_ACTIVE: {
389  double activePF = std::real(data.powerFlow[m_direction]);
390  if(!line->IsOnline()) activePF = 0.0;
391  switch(m_unit) {
392  case UNIT_PU: {
393  SetText(wxString::FromDouble(activePF, m_decimalPlaces) + " p.u.");
394  } break;
395  case UNIT_W: {
396  SetText(wxString::FromDouble(activePF * systemPowerBase, m_decimalPlaces) + " W");
397  } break;
398  case UNIT_kW: {
399  SetText(wxString::FromDouble(activePF * systemPowerBase / 1e3, m_decimalPlaces) +
400  " kW");
401  } break;
402  case UNIT_MW: {
403  SetText(wxString::FromDouble(activePF * systemPowerBase / 1e6, m_decimalPlaces) +
404  " MW");
405  } break;
406  default:
407  break;
408  }
409  } break;
410  case DATA_PF_REACTIVE: {
411  double reactivePF = std::imag(data.powerFlow[m_direction]);
412  if(!line->IsOnline()) reactivePF = 0.0;
413  switch(m_unit) {
414  case UNIT_PU: {
415  SetText(wxString::FromDouble(reactivePF, m_decimalPlaces) + " p.u.");
416  } break;
417  case UNIT_VAr: {
418  SetText(wxString::FromDouble(reactivePF * systemPowerBase, m_decimalPlaces) + " VAr");
419  } break;
420  case UNIT_kVAr: {
421  SetText(wxString::FromDouble(reactivePF * systemPowerBase / 1e3, m_decimalPlaces) +
422  " kVAr");
423  } break;
424  case UNIT_MVAr: {
425  SetText(wxString::FromDouble(reactivePF * systemPowerBase / 1e6, m_decimalPlaces) +
426  " MVAr");
427  } break;
428  default:
429  break;
430  }
431  } break;
432  case DATA_PF_LOSSES: {
433  double losses = std::abs(std::real(data.powerFlow[0]) + std::real(data.powerFlow[1]));
434  if(!line->IsOnline()) losses = 0.0;
435  switch(m_unit) {
436  case UNIT_PU: {
437  SetText(wxString::FromDouble(losses, m_decimalPlaces) + " p.u.");
438  } break;
439  case UNIT_W: {
440  SetText(wxString::FromDouble(losses * systemPowerBase, m_decimalPlaces) + " W");
441  } break;
442  case UNIT_kW: {
443  SetText(wxString::FromDouble(losses * systemPowerBase / 1e3, m_decimalPlaces) + " kW");
444  } break;
445  case UNIT_MW: {
446  SetText(wxString::FromDouble(losses * systemPowerBase / 1e6, m_decimalPlaces) + " MW");
447  } break;
448  default:
449  break;
450  }
451  } break;
452  case DATA_PF_CURRENT: {
453  double current = std::abs(data.current[m_direction]);
454  if(!line->IsOnline()) current = 0.0;
455  switch(m_unit) {
456  case UNIT_PU: {
457  SetText(wxString::FromDouble(current, m_decimalPlaces) + " p.u.");
458  } break;
459  case UNIT_A: {
460  SetText(wxString::FromDouble(current * baseCurrent, m_decimalPlaces) + " A");
461  } break;
462  case UNIT_kA: {
463  SetText(wxString::FromDouble(current * baseCurrent / 1e3, m_decimalPlaces) + " kA");
464  } break;
465  default:
466  break;
467  }
468  } break;
469  case DATA_SC_CURRENT: {
470  double faultCurrent[3] = {std::abs(data.faultCurrent[m_direction][0]),
471  std::abs(data.faultCurrent[m_direction][1]),
472  std::abs(data.faultCurrent[m_direction][2])};
473  if(!line->IsOnline()) faultCurrent[0] = faultCurrent[1] = faultCurrent[2] = 0.0;
474  switch(m_unit) {
475  case UNIT_PU: {
476  wxString str =
477  "Ia = " + wxString::FromDouble(faultCurrent[0], m_decimalPlaces) + " p.u.";
478  str += "\nIb = " + wxString::FromDouble(faultCurrent[1], m_decimalPlaces) + " p.u.";
479  str += "\nIc = " + wxString::FromDouble(faultCurrent[2], m_decimalPlaces) + " p.u.";
480  SetText(str);
481  } break;
482  case UNIT_A: {
483  wxString str = "Ia = " +
484  wxString::FromDouble(faultCurrent[0] * baseCurrent, m_decimalPlaces) +
485  " A";
486  str += "\nIb = " +
487  wxString::FromDouble(faultCurrent[1] * baseCurrent, m_decimalPlaces) + " A";
488  str += "\nIc = " +
489  wxString::FromDouble(faultCurrent[2] * baseCurrent, m_decimalPlaces) + " A";
490  SetText(str);
491  } break;
492  case UNIT_kA: {
493  wxString str =
494  "Ia = " +
495  wxString::FromDouble(faultCurrent[0] * baseCurrent / 1e3, m_decimalPlaces) + " kA";
496  str += "\nIb = " +
497  wxString::FromDouble(faultCurrent[1] * baseCurrent / 1e3, m_decimalPlaces) +
498  " kA";
499  str += "\nIc = " +
500  wxString::FromDouble(faultCurrent[2] * baseCurrent / 1e3, m_decimalPlaces) +
501  " kA";
502  SetText(str);
503  } break;
504  default:
505  break;
506  }
507  } break;
508  default:
509  break;
510  }
511  }
512  } break;
513  case TYPE_TRANSFORMER: {
514  Transformer* transformer = static_cast<Transformer*>(m_element);
515  if(transformer) {
516  TransformerElectricalData data = transformer->GetElectricalData();
517  double baseVoltage[2] = {data.primaryNominalVoltage, data.secondaryNominalVoltage};
518 
519  if(data.primaryNominalVoltageUnit == UNIT_kV) baseVoltage[0] *= 1e3;
520  if(data.secondaryNominalVoltageUnit == UNIT_kV) baseVoltage[1] *= 1e3;
521 
522  double baseCurrent[2] = {systemPowerBase / (std::sqrt(3.0) * baseVoltage[0]),
523  systemPowerBase / (std::sqrt(3.0) * baseVoltage[1])};
524  switch(m_dataType) {
525  case DATA_NAME: {
526  SetText(data.name);
527  } break;
528  case DATA_PF_ACTIVE: {
529  double activePF = std::real(data.powerFlow[m_direction]);
530  if(!transformer->IsOnline()) activePF = 0.0;
531  switch(m_unit) {
532  case UNIT_PU: {
533  SetText(wxString::FromDouble(activePF, m_decimalPlaces) + " p.u.");
534  } break;
535  case UNIT_W: {
536  SetText(wxString::FromDouble(activePF * systemPowerBase, m_decimalPlaces) + " W");
537  } break;
538  case UNIT_kW: {
539  SetText(wxString::FromDouble(activePF * systemPowerBase / 1e3, m_decimalPlaces) +
540  " kW");
541  } break;
542  case UNIT_MW: {
543  SetText(wxString::FromDouble(activePF * systemPowerBase / 1e6, m_decimalPlaces) +
544  " MW");
545  } break;
546  default:
547  break;
548  }
549  } break;
550  case DATA_PF_REACTIVE: {
551  double reactivePF = std::imag(data.powerFlow[m_direction]);
552  if(!transformer->IsOnline()) reactivePF = 0.0;
553  switch(m_unit) {
554  case UNIT_PU: {
555  SetText(wxString::FromDouble(reactivePF, m_decimalPlaces) + " p.u.");
556  } break;
557  case UNIT_VAr: {
558  SetText(wxString::FromDouble(reactivePF * systemPowerBase, m_decimalPlaces) + " VAr");
559  } break;
560  case UNIT_kVAr: {
561  SetText(wxString::FromDouble(reactivePF * systemPowerBase / 1e3, m_decimalPlaces) +
562  " kVAr");
563  } break;
564  case UNIT_MVAr: {
565  SetText(wxString::FromDouble(reactivePF * systemPowerBase / 1e6, m_decimalPlaces) +
566  " MVAr");
567  } break;
568  default:
569  break;
570  }
571  } break;
572  case DATA_PF_LOSSES: {
573  double losses = std::abs(std::real(data.powerFlow[0]) + std::real(data.powerFlow[1]));
574  if(!transformer->IsOnline()) losses = 0.0;
575  switch(m_unit) {
576  case UNIT_PU: {
577  SetText(wxString::FromDouble(losses, m_decimalPlaces) + " p.u.");
578  } break;
579  case UNIT_W: {
580  SetText(wxString::FromDouble(losses * systemPowerBase, m_decimalPlaces) + " W");
581  } break;
582  case UNIT_kW: {
583  SetText(wxString::FromDouble(losses * systemPowerBase / 1e3, m_decimalPlaces) + " kW");
584  } break;
585  case UNIT_MW: {
586  SetText(wxString::FromDouble(losses * systemPowerBase / 1e6, m_decimalPlaces) + " MW");
587  } break;
588  default:
589  break;
590  }
591  } break;
592  case DATA_PF_CURRENT: {
593  double current = std::abs(data.current[m_direction]);
594  if(!transformer->IsOnline()) current = 0.0;
595  switch(m_unit) {
596  case UNIT_PU: {
597  SetText(wxString::FromDouble(current, m_decimalPlaces) + " p.u.");
598  } break;
599  case UNIT_A: {
600  SetText(wxString::FromDouble(current * baseCurrent[m_direction], m_decimalPlaces) +
601  " A");
602  } break;
603  case UNIT_kA: {
604  SetText(
605  wxString::FromDouble(current * baseCurrent[m_direction] / 1e3, m_decimalPlaces) +
606  " kA");
607  } break;
608  default:
609  break;
610  }
611  } break;
612  case DATA_SC_CURRENT: {
613  double faultCurrent[3] = {std::abs(data.faultCurrent[m_direction][0]),
614  std::abs(data.faultCurrent[m_direction][1]),
615  std::abs(data.faultCurrent[m_direction][2])};
616  if(!transformer->IsOnline()) faultCurrent[0] = faultCurrent[1] = faultCurrent[2] = 0.0;
617  switch(m_unit) {
618  case UNIT_PU: {
619  wxString str =
620  "Ia = " + wxString::FromDouble(faultCurrent[0], m_decimalPlaces) + " p.u.";
621  str += "\nIb = " + wxString::FromDouble(faultCurrent[1], m_decimalPlaces) + " p.u.";
622  str += "\nIc = " + wxString::FromDouble(faultCurrent[2], m_decimalPlaces) + " p.u.";
623  SetText(str);
624  } break;
625  case UNIT_A: {
626  wxString str =
627  "Ia = " +
628  wxString::FromDouble(faultCurrent[0] * baseCurrent[m_direction], m_decimalPlaces) +
629  " A";
630  str += "\nIb = " + wxString::FromDouble(faultCurrent[1] * baseCurrent[m_direction],
631  m_decimalPlaces) +
632  " A";
633  str += "\nIc = " + wxString::FromDouble(faultCurrent[2] * baseCurrent[m_direction],
634  m_decimalPlaces) +
635  " A";
636  SetText(str);
637  } break;
638  case UNIT_kA: {
639  wxString str = "Ia = " +
640  wxString::FromDouble(faultCurrent[0] * baseCurrent[m_direction] / 1e3,
641  m_decimalPlaces) +
642  " kA";
643  str += "\nIb = " +
644  wxString::FromDouble(faultCurrent[1] * baseCurrent[m_direction] / 1e3,
645  m_decimalPlaces) +
646  " kA";
647  str += "\nIc = " +
648  wxString::FromDouble(faultCurrent[2] * baseCurrent[m_direction] / 1e3,
649  m_decimalPlaces) +
650  " kA";
651  SetText(str);
652  } break;
653  default:
654  break;
655  }
656  } break;
657  default:
658  break;
659  }
660  }
661  } break;
662  case TYPE_LOAD: {
663  Load* load = static_cast<Load*>(m_element);
664  if(load) {
665  LoadElectricalData data = load->GetPUElectricalData(systemPowerBase);
666  std::complex<double> sPower(data.activePower, data.reactivePower);
667  if(data.loadType == CONST_IMPEDANCE && load->IsOnline()) {
668  std::complex<double> v = static_cast<Bus*>(load->GetParentList()[0])->GetElectricalData().voltage;
669  sPower = std::pow(std::abs(v), 2) * sPower;
670  }
671  if(!load->IsOnline()) sPower = std::complex<double>(0.0, 0.0);
672  switch(m_dataType) {
673  case DATA_NAME: {
674  SetText(data.name);
675  } break;
676  case DATA_ACTIVE_POWER: {
677  switch(m_unit) {
678  case UNIT_PU: {
679  SetText(wxString::FromDouble(sPower.real(), m_decimalPlaces) + " p.u.");
680  }
681  case UNIT_W: {
682  SetText(wxString::FromDouble(sPower.real() * systemPowerBase, m_decimalPlaces) + " W");
683  }
684  case UNIT_kW: {
685  SetText(wxString::FromDouble(sPower.real() * systemPowerBase / 1e3, m_decimalPlaces) +
686  " kW");
687  }
688  case UNIT_MW: {
689  SetText(wxString::FromDouble(sPower.real() * systemPowerBase / 1e6, m_decimalPlaces) +
690  " MW");
691  }
692  default:
693  break;
694  }
695  } break;
696  case DATA_REACTIVE_POWER: {
697  switch(m_unit) {
698  case UNIT_PU: {
699  SetText(wxString::FromDouble(sPower.imag(), m_decimalPlaces) + " p.u.");
700  }
701  case UNIT_VAr: {
702  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase, m_decimalPlaces) +
703  " VAr");
704  }
705  case UNIT_kVAr: {
706  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase / 1e3, m_decimalPlaces) +
707  " kVAr");
708  }
709  case UNIT_MVAr: {
710  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase / 1e6, m_decimalPlaces) +
711  " MVAr");
712  }
713  default:
714  break;
715  }
716  } break;
717  default:
718  break;
719  }
720  }
721  } break;
722  case TYPE_SYNC_MOTOR: {
723  SyncMotor* syncMotor = static_cast<SyncMotor*>(m_element);
724  if(syncMotor) {
725  SyncMotorElectricalData data = syncMotor->GetPUElectricalData(systemPowerBase);
726  std::complex<double> sPower(data.activePower, data.reactivePower);
727  if(!syncMotor->IsOnline()) sPower = std::complex<double>(0.0, 0.0);
728  switch(m_dataType) {
729  case DATA_NAME: {
730  SetText(data.name);
731  } break;
732  case DATA_ACTIVE_POWER: {
733  switch(m_unit) {
734  case UNIT_PU: {
735  SetText(wxString::FromDouble(sPower.real(), m_decimalPlaces) + " p.u.");
736  }
737  case UNIT_W: {
738  SetText(wxString::FromDouble(sPower.real() * systemPowerBase, m_decimalPlaces) + " W");
739  }
740  case UNIT_kW: {
741  SetText(wxString::FromDouble(sPower.real() * systemPowerBase / 1e3, m_decimalPlaces) +
742  " kW");
743  }
744  case UNIT_MW: {
745  SetText(wxString::FromDouble(sPower.real() * systemPowerBase / 1e6, m_decimalPlaces) +
746  " MW");
747  }
748  default:
749  break;
750  }
751  } break;
752  case DATA_REACTIVE_POWER: {
753  switch(m_unit) {
754  case UNIT_PU: {
755  SetText(wxString::FromDouble(sPower.imag(), m_decimalPlaces) + " p.u.");
756  }
757  case UNIT_VAr: {
758  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase, m_decimalPlaces) +
759  " VAr");
760  }
761  case UNIT_kVAr: {
762  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase / 1e3, m_decimalPlaces) +
763  " kVAr");
764  }
765  case UNIT_MVAr: {
766  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase / 1e6, m_decimalPlaces) +
767  " MVAr");
768  }
769  default:
770  break;
771  }
772  } break;
773  default:
774  break;
775  }
776  }
777  } break;
778  case TYPE_IND_MOTOR: {
779  IndMotor* indMotor = static_cast<IndMotor*>(m_element);
780  if(indMotor) {
781  IndMotorElectricalData data = indMotor->GetPUElectricalData(systemPowerBase);
782  std::complex<double> sPower(data.activePower, data.reactivePower);
783  if(!indMotor->IsOnline()) sPower = std::complex<double>(0.0, 0.0);
784  switch(m_dataType) {
785  case DATA_NAME: {
786  SetText(data.name);
787  } break;
788  case DATA_ACTIVE_POWER: {
789  switch(m_unit) {
790  case UNIT_PU: {
791  SetText(wxString::FromDouble(sPower.real(), m_decimalPlaces) + " p.u.");
792  }
793  case UNIT_W: {
794  SetText(wxString::FromDouble(sPower.real() * systemPowerBase, m_decimalPlaces) + " W");
795  }
796  case UNIT_kW: {
797  SetText(wxString::FromDouble(sPower.real() * systemPowerBase / 1e3, m_decimalPlaces) +
798  " kW");
799  }
800  case UNIT_MW: {
801  SetText(wxString::FromDouble(sPower.real() * systemPowerBase / 1e6, m_decimalPlaces) +
802  " MW");
803  }
804  default:
805  break;
806  }
807  } break;
808  case DATA_REACTIVE_POWER: {
809  switch(m_unit) {
810  case UNIT_PU: {
811  SetText(wxString::FromDouble(sPower.imag(), m_decimalPlaces) + " p.u.");
812  }
813  case UNIT_VAr: {
814  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase, m_decimalPlaces) +
815  " VAr");
816  }
817  case UNIT_kVAr: {
818  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase / 1e3, m_decimalPlaces) +
819  " kVAr");
820  }
821  case UNIT_MVAr: {
822  SetText(wxString::FromDouble(sPower.imag() * systemPowerBase / 1e6, m_decimalPlaces) +
823  " MVAr");
824  }
825  default:
826  break;
827  }
828  } break;
829  default:
830  break;
831  }
832  }
833  } break;
834  case TYPE_CAPACITOR: {
835  Capacitor* capacitor = static_cast<Capacitor*>(m_element);
836  if(capacitor) {
837  CapacitorElectricalData data = capacitor->GetPUElectricalData(systemPowerBase);
838  double reativePower = data.reactivePower;
839  if(!capacitor->IsOnline())
840  reativePower = 0.0;
841  else {
842  std::complex<double> v =
843  static_cast<Bus*>(capacitor->GetParentList()[0])->GetElectricalData().voltage;
844  reativePower *= std::pow(std::abs(v), 2);
845  }
846  switch(m_dataType) {
847  case DATA_NAME: {
848  SetText(data.name);
849  } break;
850  case DATA_REACTIVE_POWER: {
851  switch(m_unit) {
852  case UNIT_PU: {
853  SetText(wxString::FromDouble(reativePower, m_decimalPlaces) + " p.u.");
854  }
855  case UNIT_VAr: {
856  SetText(wxString::FromDouble(reativePower * systemPowerBase, m_decimalPlaces) + " VAr");
857  }
858  case UNIT_kVAr: {
859  SetText(wxString::FromDouble(reativePower * systemPowerBase / 1e3, m_decimalPlaces) +
860  " kVAr");
861  }
862  case UNIT_MVAr: {
863  SetText(wxString::FromDouble(reativePower * systemPowerBase / 1e6, m_decimalPlaces) +
864  " MVAr");
865  }
866  default:
867  break;
868  }
869  } break;
870  default:
871  break;
872  }
873  }
874  } break;
875  case TYPE_INDUCTOR: {
876  Inductor* inductor = static_cast<Inductor*>(m_element);
877  if(inductor) {
878  InductorElectricalData data = inductor->GetPUElectricalData(systemPowerBase);
879  double reativePower = data.reactivePower;
880  if(!inductor->IsOnline())
881  reativePower = 0.0;
882  else {
883  std::complex<double> v =
884  static_cast<Bus*>(inductor->GetParentList()[0])->GetElectricalData().voltage;
885  reativePower *= std::pow(std::abs(v), 2);
886  }
887  switch(m_dataType) {
888  case DATA_NAME: {
889  SetText(data.name);
890  } break;
891  case DATA_REACTIVE_POWER: {
892  switch(m_unit) {
893  case UNIT_PU: {
894  SetText(wxString::FromDouble(reativePower, m_decimalPlaces) + " p.u.");
895  }
896  case UNIT_VAr: {
897  SetText(wxString::FromDouble(reativePower * systemPowerBase, m_decimalPlaces) + " VAr");
898  }
899  case UNIT_kVAr: {
900  SetText(wxString::FromDouble(reativePower * systemPowerBase / 1e3, m_decimalPlaces) +
901  " kVAr");
902  }
903  case UNIT_MVAr: {
904  SetText(wxString::FromDouble(reativePower * systemPowerBase / 1e6, m_decimalPlaces) +
905  " MVAr");
906  }
907  default:
908  break;
909  }
910  } break;
911  default:
912  break;
913  }
914  }
915  } break;
916  }
917 }
918 
920 {
921  Text* copy = new Text();
922  *copy = *this;
923  std::vector<OpenGLText*> copyList;
924  for(auto it = m_openGLTextList.begin(), itEnd = m_openGLTextList.end(); it != itEnd; ++it) {
925  copyList.push_back((*it)->GetCopy());
926  }
927  copy->m_openGLTextList = copyList;
928  return copy;
929 }
930 
931 bool Text::IsGLTextOK()
932 {
933  bool isOk = true;
934  for(auto it = m_openGLTextList.begin(), itEnd = m_openGLTextList.end(); it != itEnd; ++it) {
935  if(!(*it)->IsTextureOK()) isOk = false;
936  }
937  return isOk;
938 }
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Text.cpp:43
-
Element that shows power element informations in workspace.
Definition: Text.h:75
-
Abstract class for graphical elements shown with power elements in workspace.
- - - -
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Text.cpp:114
- -
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
- - - - - - -
Synchronous generator power element.
- -
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Text.cpp:82
- -
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
- - -
virtual void DrawRectangle(wxPoint2DDouble position, double width, double height, GLenum mode=GL_QUADS) const
Draw rectangle.
Definition: Element.cpp:69
- -
virtual Element * GetCopy()
Get a the element copy.
Definition: Text.cpp:919
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
- - - - -
double GetWidth() const
Get the element width.
Definition: Element.h:207
-
void SetPosition(const wxPoint2DDouble position)
Set the element position and update the rectangle.
Definition: Element.cpp:25
- - -
Form to edit the text graphical data.
Definition: TextForm.h:32
-
Power line element.
Definition: Line.h:59
-
Loas shunt power element.
Definition: Load.h:73
- - - - -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
-
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
Induction motor power element.
Definition: IndMotor.h:40
- - - -
Shunt capactior power element.
Definition: Capacitor.h:38
-
Inductor shunt power element.
Definition: Inductor.h:38
- - - -
virtual bool RotatedRectanglesIntersects(wxRect2DDouble rect1, wxRect2DDouble rect2, double angle1, double angle2) const
Check if two roteted rectangles intersect.
Definition: Element.cpp:147
- - -
Two-winding transformer power element.
Definition: Transformer.h:78
- - - -
-
- - - - diff --git a/docs/doxygen/html/_text_8h.html b/docs/doxygen/html/_text_8h.html index 14f5dc8..e52a80a 100644 --- a/docs/doxygen/html/_text_8h.html +++ b/docs/doxygen/html/_text_8h.html @@ -93,12 +93,10 @@ $(document).ready(function(){initNavTree('_text_8h.html','');});
#include <GL/gl.h>
#include <wx/dcmemory.h>
-#include "GraphicalElement.h"
-#include "PowerElement.h"
-#include "OpenGLText.h"
-
-

Go to the source code of this file.

- +#include "GraphicalElement.h"
+#include "PowerElement.h"
+#include "OpenGLText.h"
+
diff --git a/docs/doxygen/html/_text_8h_source.html b/docs/doxygen/html/_text_8h_source.html deleted file mode 100644 index a839af7..0000000 --- a/docs/doxygen/html/_text_8h_source.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - -Project/Text.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Text
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Text.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef TEXT_H
19 #define TEXT_H
20 
21 #include <GL/gl.h>
22 #include <wx/dcmemory.h>
23 
24 #include "GraphicalElement.h"
25 #include "PowerElement.h"
26 #include "OpenGLText.h"
27 
28 class TextForm;
29 
30 class Bus;
31 class Line;
32 class Transformer;
33 class SyncGenerator;
34 class IndMotor;
35 class SyncMotor;
36 class Load;
37 class Inductor;
38 class Capacitor;
39 
40 enum ElementType {
41  TYPE_NONE = 0,
42  TYPE_BUS,
43  TYPE_CAPACITOR,
44  TYPE_IND_MOTOR,
45  TYPE_INDUCTOR,
46  TYPE_LINE,
47  TYPE_LOAD,
48  TYPE_SYNC_GENERATOR,
49  TYPE_SYNC_MOTOR,
50  TYPE_TRANSFORMER
51 };
52 
53 enum DataType {
54  DATA_NAME,
55  DATA_VOLTAGE,
56  DATA_ANGLE,
57  DATA_SC_CURRENT,
58  DATA_SC_VOLTAGE,
59  DATA_SC_POWER,
60  DATA_ACTIVE_POWER,
61  DATA_REACTIVE_POWER,
62  DATA_PF_ACTIVE,
63  DATA_PF_REACTIVE,
64  DATA_PF_LOSSES,
65  DATA_PF_CURRENT
66 };
67 
75 class Text : public GraphicalElement
76 {
77  public:
78  Text();
79  Text(wxPoint2DDouble position);
80  ~Text();
81 
82  virtual Element* GetCopy();
83  virtual bool AddParent(Element* parent, wxPoint2DDouble position) { return true; };
84  virtual bool Contains(wxPoint2DDouble position) const;
85  virtual void Draw(wxPoint2DDouble translation, double scale);
86  virtual bool Intersects(wxRect2DDouble rect) const;
87  virtual void Rotate(bool clockwise = true);
88  virtual bool ShowForm(wxWindow* parent, std::vector<Element*> elementList);
89  virtual void UpdateText(double systemPowerBase);
90  virtual wxString GetText() const { return m_text; }
91  virtual void SetText(wxString text);
92  virtual bool IsGLTextOK();
93 
94  void SetDataType(const DataType& dataType) { m_dataType = dataType; }
95  void SetDirection(int direction) { m_direction = direction; }
96  void SetElement(Element* element) { m_element = element; }
97  void SetElementNumber(int elementNumber) { m_elementNumber = elementNumber; }
98  void SetElementType(const ElementType elementType) { m_elementType = elementType; }
99  void SetUnit(const ElectricalUnit unit) { m_unit = unit; }
100  void SetDecimalPlaces(int decimalPlaces) { m_decimalPlaces = decimalPlaces; }
101  const DataType GetDataType() const { return m_dataType; }
102  int GetDirection() const { return m_direction; }
103  Element* GetElement() { return m_element; }
104  int GetElementNumber() const { return m_elementNumber; }
105  const ElementType GetElementType() const { return m_elementType; }
106  const ElectricalUnit GetUnit() const { return m_unit; }
107  int GetDecimalPlaces() const { return m_decimalPlaces; }
108  protected:
109  wxString m_text = _("Text");
110  int m_numberOfLines = 0;
111  bool m_isMultlineText = false;
112 
113  std::vector<OpenGLText*> m_openGLTextList;
114 
115  Element* m_element = NULL;
116  ElementType m_elementType = TYPE_NONE;
117  int m_elementNumber;
118  DataType m_dataType;
119  ElectricalUnit m_unit;
120  int m_direction = 0;
121  int m_decimalPlaces = 2;
122 };
123 
124 #endif // TEXT_H
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Text.cpp:43
-
Element that shows power element informations in workspace.
Definition: Text.h:75
-
Abstract class for graphical elements shown with power elements in workspace.
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Text.cpp:114
-
Synchronous generator power element.
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Text.cpp:82
-
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
-
virtual Element * GetCopy()
Get a the element copy.
Definition: Text.cpp:919
-
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
- -
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Text.h:83
-
Form to edit the text graphical data.
Definition: TextForm.h:32
-
Power line element.
Definition: Line.h:59
-
Loas shunt power element.
Definition: Load.h:73
- -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
-
Induction motor power element.
Definition: IndMotor.h:40
-
Shunt capactior power element.
Definition: Capacitor.h:38
-
Inductor shunt power element.
Definition: Inductor.h:38
- -
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_text_form_8cpp_source.html b/docs/doxygen/html/_text_form_8cpp_source.html deleted file mode 100644 index 23f3381..0000000 --- a/docs/doxygen/html/_text_form_8cpp_source.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - -Project/TextForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
TextForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "TextForm.h"
19 
20 TextForm::TextForm(wxWindow* parent, Text* text, std::vector<Element*> elementList, double systemPowerBase)
21  : TextFormBase(parent)
22 {
23  SetSize(GetBestSize());
24  m_parent = parent;
25  m_textToEdit = text;
26  m_allElements.GetElementsFromList(elementList);
27  m_systemPowerBase = systemPowerBase;
28 
29  m_text = new Text();
30  m_text->SetElementType(text->GetElementType());
31  m_text->SetElementNumber(text->GetElementNumber());
32  m_text->SetElement(text->GetElement());
33  m_text->SetDataType(text->GetDataType());
34  m_text->SetDirection(text->GetDirection());
35  m_text->SetUnit(text->GetUnit());
36  m_text->SetDecimalPlaces(text->GetDecimalPlaces());
37 
38  if(!LoadChoices()) {
39  m_choiceName->Enable(false);
40  m_choiceTextType->Enable(false);
41  m_choiceTextFromBus->Enable(false);
42  m_choiceTextToBus->Enable(false);
43  m_choiceTextUnit->Enable(false);
44  }
45 }
46 
47 TextForm::~TextForm() {}
48 void TextForm::OnElementChoiceSelected(wxCommandEvent& event)
49 {
50  switch(m_choiceElement->GetSelection()) {
51  case 0: {
52  m_text->SetElementType(TYPE_BUS);
53  } break;
54  case 1: {
55  m_text->SetElementType(TYPE_SYNC_GENERATOR);
56  } break;
57  case 2: {
58  m_text->SetElementType(TYPE_LINE);
59  } break;
60  case 3: {
61  m_text->SetElementType(TYPE_TRANSFORMER);
62  } break;
63  case 4: {
64  m_text->SetElementType(TYPE_LOAD);
65  } break;
66  case 5: {
67  m_text->SetElementType(TYPE_CAPACITOR);
68  } break;
69  case 6: {
70  m_text->SetElementType(TYPE_INDUCTOR);
71  } break;
72  case 7: {
73  m_text->SetElementType(TYPE_SYNC_MOTOR);
74  } break;
75  case 8: {
76  m_text->SetElementType(TYPE_IND_MOTOR);
77  } break;
78 
79  default:
80  break;
81  }
82 
83  ElementTypeChoice();
84 }
85 
86 void TextForm::OnFromBusChoiceSelected(wxCommandEvent& event)
87 {
88  m_text->SetDirection(m_choiceTextFromBus->GetSelection());
89  m_choiceTextToBus->SetSelection(m_choiceTextFromBus->GetSelection());
90 }
91 
92 void TextForm::OnNameChoiceSelected(wxCommandEvent& event)
93 {
94  m_text->SetElementNumber(m_choiceName->GetSelection());
95  ElementNumberChoice();
96 }
97 
98 void TextForm::OnTextEnter(wxCommandEvent& event) { Preview(); }
99 void TextForm::OnToBusChoiceSelected(wxCommandEvent& event)
100 {
101  m_text->SetDirection(m_choiceTextToBus->GetSelection());
102  m_choiceTextFromBus->SetSelection(m_choiceTextToBus->GetSelection());
103 }
104 
105 void TextForm::OnUnitChoiceSelected(wxCommandEvent& event)
106 {
107  UnitChoice();
108  Preview();
109 }
110 
111 void TextForm::OnTypeChoiceSelected(wxCommandEvent& event)
112 {
113  switch(m_text->GetElementType()) {
114  case TYPE_BUS: {
115  switch(m_choiceTextType->GetSelection()) {
116  case 0: {
117  m_text->SetDataType(DATA_NAME);
118  } break;
119  case 1: {
120  m_text->SetDataType(DATA_VOLTAGE);
121  } break;
122  case 2: {
123  m_text->SetDataType(DATA_ANGLE);
124  } break;
125  case 3: {
126  m_text->SetDataType(DATA_SC_CURRENT);
127  } break;
128  case 4: {
129  m_text->SetDataType(DATA_SC_VOLTAGE);
130  } break;
131  case 5: {
132  m_text->SetDataType(DATA_SC_POWER);
133  } break;
134  }
135  } break;
136  case TYPE_SYNC_GENERATOR: {
137  switch(m_choiceTextType->GetSelection()) {
138  case 0: {
139  m_text->SetDataType(DATA_NAME);
140  } break;
141  case 1: {
142  m_text->SetDataType(DATA_ACTIVE_POWER);
143  } break;
144  case 2: {
145  m_text->SetDataType(DATA_REACTIVE_POWER);
146  } break;
147  case 3: {
148  m_text->SetDataType(DATA_SC_CURRENT);
149  } break;
150  }
151  } break;
152  case TYPE_LINE:
153  case TYPE_TRANSFORMER: {
154  switch(m_choiceTextType->GetSelection()) {
155  case 0: {
156  m_text->SetDataType(DATA_NAME);
157  } break;
158  case 1: {
159  m_text->SetDataType(DATA_PF_ACTIVE);
160  } break;
161  case 2: {
162  m_text->SetDataType(DATA_PF_REACTIVE);
163  } break;
164  case 3: {
165  m_text->SetDataType(DATA_PF_LOSSES);
166  } break;
167  case 4: {
168  m_text->SetDataType(DATA_PF_CURRENT);
169  } break;
170  case 5: {
171  m_text->SetDataType(DATA_SC_CURRENT);
172  } break;
173  }
174  } break;
175  case TYPE_LOAD:
176  case TYPE_SYNC_MOTOR:
177  case TYPE_IND_MOTOR: {
178  switch(m_choiceTextType->GetSelection()) {
179  case 0: {
180  m_text->SetDataType(DATA_NAME);
181  } break;
182  case 1: {
183  m_text->SetDataType(DATA_ACTIVE_POWER);
184  } break;
185  case 2: {
186  m_text->SetDataType(DATA_REACTIVE_POWER);
187  } break;
188  }
189  } break;
190  case TYPE_CAPACITOR:
191  case TYPE_INDUCTOR: {
192  switch(m_choiceTextType->GetSelection()) {
193  case 0: {
194  m_text->SetDataType(DATA_NAME);
195  } break;
196  case 1: {
197  m_text->SetDataType(DATA_REACTIVE_POWER);
198  } break;
199  }
200  } break;
201  default:
202  break;
203  }
204  DataTypeChoice();
205 
206  if(m_text->GetDataType() == DATA_NAME) Preview();
207 }
208 
209 bool TextForm::LoadChoices()
210 {
211  if(m_text->GetElementType() == TYPE_NONE) return false;
212 
213  // Fill the element possible choices.
214  ElementTypeChoice();
215  m_choiceName->SetSelection(m_text->GetElementNumber());
216  ElementNumberChoice();
217  DataTypeChoice();
218 
219  // Select the saved choices.
220  switch(m_text->GetElementType()) {
221  case TYPE_BUS: {
222  m_choiceElement->SetSelection(0);
223  switch(m_text->GetDataType()) {
224  case DATA_NAME: {
225  m_choiceTextType->SetSelection(0);
226  } break;
227  case DATA_VOLTAGE: {
228  m_choiceTextType->SetSelection(1);
229  switch(m_text->GetUnit()) {
230  case UNIT_PU: {
231  m_choiceTextUnit->SetSelection(0);
232  } break;
233  case UNIT_V: {
234  m_choiceTextUnit->SetSelection(1);
235  } break;
236  case UNIT_kV: {
237  m_choiceTextUnit->SetSelection(2);
238  } break;
239  default:
240  break;
241  }
242 
243  } break;
244  case DATA_ANGLE: {
245  m_choiceTextType->SetSelection(2);
246  switch(m_text->GetUnit()) {
247  case UNIT_DEGREE: {
248  m_choiceTextUnit->SetSelection(0);
249  } break;
250  case UNIT_RADIAN: {
251  m_choiceTextUnit->SetSelection(1);
252  } break;
253  default:
254  break;
255  }
256  } break;
257  case DATA_SC_CURRENT: {
258  m_choiceTextType->SetSelection(3);
259  switch(m_text->GetUnit()) {
260  case UNIT_PU: {
261  m_choiceTextUnit->SetSelection(0);
262  } break;
263  case UNIT_A: {
264  m_choiceTextUnit->SetSelection(1);
265  } break;
266  case UNIT_kA: {
267  m_choiceTextUnit->SetSelection(2);
268  } break;
269  default:
270  break;
271  }
272  } break;
273  case DATA_SC_VOLTAGE: {
274  m_choiceTextType->SetSelection(4);
275  switch(m_text->GetUnit()) {
276  case UNIT_PU: {
277  m_choiceTextUnit->SetSelection(0);
278  } break;
279  case UNIT_V: {
280  m_choiceTextUnit->SetSelection(1);
281  } break;
282  case UNIT_kV: {
283  m_choiceTextUnit->SetSelection(2);
284  } break;
285  default:
286  break;
287  }
288  } break;
289  case DATA_SC_POWER: {
290  m_choiceTextType->SetSelection(5);
291  switch(m_text->GetUnit()) {
292  case UNIT_PU: {
293  m_choiceTextUnit->SetSelection(0);
294  } break;
295  case UNIT_VA: {
296  m_choiceTextUnit->SetSelection(1);
297  } break;
298  case UNIT_kVA: {
299  m_choiceTextUnit->SetSelection(2);
300  } break;
301  case UNIT_MVA: {
302  m_choiceTextUnit->SetSelection(3);
303  } break;
304  default:
305  break;
306  }
307  } break;
308  default:
309  break;
310  }
311  } break;
312  case TYPE_SYNC_GENERATOR: {
313  m_choiceElement->SetSelection(1);
314  switch(m_text->GetDataType()) {
315  case DATA_NAME: {
316  m_choiceTextType->SetSelection(0);
317  } break;
318  case DATA_ACTIVE_POWER: {
319  m_choiceTextType->SetSelection(1);
320  switch(m_text->GetUnit()) {
321  case UNIT_PU: {
322  m_choiceTextUnit->SetSelection(0);
323  } break;
324  case UNIT_W: {
325  m_choiceTextUnit->SetSelection(1);
326  } break;
327  case UNIT_kW: {
328  m_choiceTextUnit->SetSelection(2);
329  } break;
330  case UNIT_MW: {
331  m_choiceTextUnit->SetSelection(3);
332  } break;
333  default:
334  break;
335  }
336  } break;
337  case DATA_REACTIVE_POWER: {
338  m_choiceTextType->SetSelection(2);
339  switch(m_text->GetUnit()) {
340  case UNIT_PU: {
341  m_choiceTextUnit->SetSelection(0);
342  } break;
343  case UNIT_VAr: {
344  m_choiceTextUnit->SetSelection(1);
345  } break;
346  case UNIT_kVAr: {
347  m_choiceTextUnit->SetSelection(2);
348  } break;
349  case UNIT_MVAr: {
350  m_choiceTextUnit->SetSelection(3);
351  } break;
352  default:
353  break;
354  }
355  } break;
356  case DATA_SC_CURRENT: {
357  m_choiceTextType->SetSelection(3);
358  switch(m_text->GetUnit()) {
359  case UNIT_PU: {
360  m_choiceTextUnit->SetSelection(0);
361  } break;
362  case UNIT_A: {
363  m_choiceTextUnit->SetSelection(1);
364  } break;
365  case UNIT_kA: {
366  m_choiceTextUnit->SetSelection(2);
367  } break;
368  default:
369  break;
370  }
371  } break;
372  default:
373  break;
374  }
375  } break;
376  case TYPE_LINE: {
377  m_choiceElement->SetSelection(2);
378  switch(m_text->GetDataType()) {
379  case DATA_NAME: {
380  m_choiceTextType->SetSelection(0);
381  } break;
382  case DATA_PF_ACTIVE: {
383  m_choiceTextType->SetSelection(1);
384  switch(m_text->GetUnit()) {
385  case UNIT_PU: {
386  m_choiceTextUnit->SetSelection(0);
387  } break;
388  case UNIT_W: {
389  m_choiceTextUnit->SetSelection(1);
390  } break;
391  case UNIT_kW: {
392  m_choiceTextUnit->SetSelection(2);
393  } break;
394  case UNIT_MW: {
395  m_choiceTextUnit->SetSelection(3);
396  } break;
397  default:
398  break;
399  }
400  } break;
401  case DATA_PF_REACTIVE: {
402  m_choiceTextType->SetSelection(2);
403  switch(m_text->GetUnit()) {
404  case UNIT_PU: {
405  m_choiceTextUnit->SetSelection(0);
406  } break;
407  case UNIT_VAr: {
408  m_choiceTextUnit->SetSelection(1);
409  } break;
410  case UNIT_kVAr: {
411  m_choiceTextUnit->SetSelection(2);
412  } break;
413  case UNIT_MVAr: {
414  m_choiceTextUnit->SetSelection(3);
415  } break;
416  default:
417  break;
418  }
419  } break;
420  case DATA_PF_LOSSES: {
421  m_choiceTextType->SetSelection(3);
422  switch(m_text->GetUnit()) {
423  case UNIT_PU: {
424  m_choiceTextUnit->SetSelection(0);
425  } break;
426  case UNIT_W: {
427  m_choiceTextUnit->SetSelection(1);
428  } break;
429  case UNIT_kW: {
430  m_choiceTextUnit->SetSelection(2);
431  } break;
432  case UNIT_MW: {
433  m_choiceTextUnit->SetSelection(3);
434  } break;
435  default:
436  break;
437  }
438  } break;
439  case DATA_PF_CURRENT: {
440  m_choiceTextType->SetSelection(4);
441  switch(m_text->GetUnit()) {
442  case UNIT_PU: {
443  m_choiceTextUnit->SetSelection(0);
444  } break;
445  case UNIT_A: {
446  m_choiceTextUnit->SetSelection(1);
447  } break;
448  case UNIT_kA: {
449  m_choiceTextUnit->SetSelection(2);
450  } break;
451  default:
452  break;
453  }
454  } break;
455  case DATA_SC_CURRENT: {
456  m_choiceTextType->SetSelection(5);
457  switch(m_text->GetUnit()) {
458  case UNIT_PU: {
459  m_choiceTextUnit->SetSelection(0);
460  } break;
461  case UNIT_A: {
462  m_choiceTextUnit->SetSelection(1);
463  } break;
464  case UNIT_kA: {
465  m_choiceTextUnit->SetSelection(2);
466  } break;
467  case UNIT_MW: {
468  m_choiceTextUnit->SetSelection(3);
469  } break;
470  default:
471  break;
472  }
473  } break;
474  default:
475  break;
476  }
477  } break;
478  case TYPE_TRANSFORMER: {
479  m_choiceElement->SetSelection(3);
480  switch(m_text->GetDataType()) {
481  case DATA_NAME: {
482  m_choiceTextType->SetSelection(0);
483  } break;
484  case DATA_PF_ACTIVE: {
485  m_choiceTextType->SetSelection(1);
486  switch(m_text->GetUnit()) {
487  case UNIT_PU: {
488  m_choiceTextUnit->SetSelection(0);
489  } break;
490  case UNIT_W: {
491  m_choiceTextUnit->SetSelection(1);
492  } break;
493  case UNIT_kW: {
494  m_choiceTextUnit->SetSelection(2);
495  } break;
496  case UNIT_MW: {
497  m_choiceTextUnit->SetSelection(3);
498  } break;
499  default:
500  break;
501  }
502  } break;
503  case DATA_PF_REACTIVE: {
504  m_choiceTextType->SetSelection(2);
505  switch(m_text->GetUnit()) {
506  case UNIT_PU: {
507  m_choiceTextUnit->SetSelection(0);
508  } break;
509  case UNIT_VAr: {
510  m_choiceTextUnit->SetSelection(1);
511  } break;
512  case UNIT_kVAr: {
513  m_choiceTextUnit->SetSelection(2);
514  } break;
515  case UNIT_MVAr: {
516  m_choiceTextUnit->SetSelection(3);
517  } break;
518  default:
519  break;
520  }
521  } break;
522  case DATA_PF_LOSSES: {
523  m_choiceTextType->SetSelection(3);
524  switch(m_text->GetUnit()) {
525  case UNIT_PU: {
526  m_choiceTextUnit->SetSelection(0);
527  } break;
528  case UNIT_W: {
529  m_choiceTextUnit->SetSelection(1);
530  } break;
531  case UNIT_kW: {
532  m_choiceTextUnit->SetSelection(2);
533  } break;
534  case UNIT_MW: {
535  m_choiceTextUnit->SetSelection(3);
536  } break;
537  default:
538  break;
539  }
540  } break;
541  case DATA_PF_CURRENT: {
542  m_choiceTextType->SetSelection(4);
543  switch(m_text->GetUnit()) {
544  case UNIT_PU: {
545  m_choiceTextUnit->SetSelection(0);
546  } break;
547  case UNIT_A: {
548  m_choiceTextUnit->SetSelection(1);
549  } break;
550  case UNIT_kA: {
551  m_choiceTextUnit->SetSelection(2);
552  } break;
553  default:
554  break;
555  }
556  } break;
557  case DATA_SC_CURRENT: {
558  m_choiceTextType->SetSelection(5);
559  switch(m_text->GetUnit()) {
560  case UNIT_PU: {
561  m_choiceTextUnit->SetSelection(0);
562  } break;
563  case UNIT_A: {
564  m_choiceTextUnit->SetSelection(1);
565  } break;
566  case UNIT_kA: {
567  m_choiceTextUnit->SetSelection(2);
568  } break;
569  default:
570  break;
571  }
572  } break;
573  default:
574  break;
575  }
576  } break;
577  case TYPE_LOAD: {
578  m_choiceElement->SetSelection(4);
579  switch(m_text->GetDataType()) {
580  case DATA_NAME: {
581  m_choiceTextType->SetSelection(0);
582  } break;
583  case DATA_ACTIVE_POWER: {
584  m_choiceTextType->SetSelection(1);
585  switch(m_text->GetUnit()) {
586  case UNIT_PU: {
587  m_choiceTextUnit->SetSelection(0);
588  } break;
589  case UNIT_W: {
590  m_choiceTextUnit->SetSelection(1);
591  } break;
592  case UNIT_kW: {
593  m_choiceTextUnit->SetSelection(2);
594  } break;
595  case UNIT_MW: {
596  m_choiceTextUnit->SetSelection(3);
597  } break;
598  default:
599  break;
600  }
601  } break;
602  case DATA_REACTIVE_POWER: {
603  m_choiceTextType->SetSelection(2);
604  switch(m_text->GetUnit()) {
605  case UNIT_PU: {
606  m_choiceTextUnit->SetSelection(0);
607  } break;
608  case UNIT_VAr: {
609  m_choiceTextUnit->SetSelection(1);
610  } break;
611  case UNIT_kVAr: {
612  m_choiceTextUnit->SetSelection(2);
613  } break;
614  case UNIT_MVAr: {
615  m_choiceTextUnit->SetSelection(3);
616  } break;
617  default:
618  break;
619  }
620  } break;
621  default:
622  break;
623  }
624  } break;
625  case TYPE_CAPACITOR: {
626  m_choiceElement->SetSelection(5);
627  switch(m_text->GetDataType()) {
628  case DATA_NAME: {
629  m_choiceTextType->SetSelection(0);
630  } break;
631  case DATA_REACTIVE_POWER: {
632  m_choiceTextType->SetSelection(1);
633 
634  } break;
635  default:
636  break;
637  }
638  } break;
639  case TYPE_INDUCTOR: {
640  m_choiceElement->SetSelection(6);
641  switch(m_text->GetDataType()) {
642  case DATA_NAME: {
643  m_choiceTextType->SetSelection(0);
644  } break;
645  case DATA_REACTIVE_POWER: {
646  m_choiceTextType->SetSelection(1);
647  switch(m_text->GetUnit()) {
648  case UNIT_PU: {
649  m_choiceTextUnit->SetSelection(0);
650  } break;
651  case UNIT_VAr: {
652  m_choiceTextUnit->SetSelection(1);
653  } break;
654  case UNIT_kVAr: {
655  m_choiceTextUnit->SetSelection(2);
656  } break;
657  case UNIT_MVAr: {
658  m_choiceTextUnit->SetSelection(3);
659  } break;
660  default:
661  break;
662  }
663  } break;
664  default:
665  break;
666  }
667  } break;
668  case TYPE_SYNC_MOTOR: {
669  m_choiceElement->SetSelection(7);
670  switch(m_text->GetDataType()) {
671  case DATA_NAME: {
672  m_choiceTextType->SetSelection(0);
673  } break;
674  case DATA_ACTIVE_POWER: {
675  m_choiceTextType->SetSelection(1);
676  switch(m_text->GetUnit()) {
677  case UNIT_PU: {
678  m_choiceTextUnit->SetSelection(0);
679  } break;
680  case UNIT_W: {
681  m_choiceTextUnit->SetSelection(1);
682  } break;
683  case UNIT_kW: {
684  m_choiceTextUnit->SetSelection(2);
685  } break;
686  case UNIT_MW: {
687  m_choiceTextUnit->SetSelection(3);
688  } break;
689  default:
690  break;
691  }
692  } break;
693  case DATA_REACTIVE_POWER: {
694  m_choiceTextType->SetSelection(2);
695  switch(m_text->GetUnit()) {
696  case UNIT_PU: {
697  m_choiceTextUnit->SetSelection(0);
698  } break;
699  case UNIT_VAr: {
700  m_choiceTextUnit->SetSelection(1);
701  } break;
702  case UNIT_kVAr: {
703  m_choiceTextUnit->SetSelection(2);
704  } break;
705  case UNIT_MVAr: {
706  m_choiceTextUnit->SetSelection(3);
707  } break;
708  default:
709  break;
710  }
711  } break;
712  default:
713  break;
714  }
715  } break;
716  case TYPE_IND_MOTOR: {
717  m_choiceElement->SetSelection(8);
718  switch(m_text->GetDataType()) {
719  case DATA_NAME: {
720  m_choiceTextType->SetSelection(0);
721  } break;
722  case DATA_ACTIVE_POWER: {
723  m_choiceTextType->SetSelection(1);
724  switch(m_text->GetUnit()) {
725  case UNIT_PU: {
726  m_choiceTextUnit->SetSelection(0);
727  } break;
728  case UNIT_W: {
729  m_choiceTextUnit->SetSelection(1);
730  } break;
731  case UNIT_kW: {
732  m_choiceTextUnit->SetSelection(2);
733  } break;
734  case UNIT_MW: {
735  m_choiceTextUnit->SetSelection(3);
736  } break;
737  default:
738  break;
739  }
740  } break;
741  case DATA_REACTIVE_POWER: {
742  m_choiceTextType->SetSelection(2);
743  switch(m_text->GetUnit()) {
744  case UNIT_PU: {
745  m_choiceTextUnit->SetSelection(0);
746  } break;
747  case UNIT_VAr: {
748  m_choiceTextUnit->SetSelection(1);
749  } break;
750  case UNIT_kVAr: {
751  m_choiceTextUnit->SetSelection(2);
752  } break;
753  case UNIT_MVAr: {
754  m_choiceTextUnit->SetSelection(3);
755  } break;
756  default:
757  break;
758  }
759  } break;
760  default:
761  break;
762  }
763  } break;
764  default:
765  break;
766  }
767 
768  if(m_choiceTextFromBus->IsEnabled()) m_choiceTextFromBus->SetSelection(m_text->GetDirection());
769  if(m_choiceTextToBus->IsEnabled()) m_choiceTextToBus->SetSelection(m_text->GetDirection());
770 
771  m_textCtrlDecimal->SetValue(wxString::Format("%d", m_text->GetDecimalPlaces()));
772  Preview();
773 
774  return true;
775 }
776 
777 void TextForm::ElementTypeChoice()
778 {
779  m_choiceTextType->Enable(false);
780  m_choiceTextFromBus->Enable(false);
781  m_choiceTextToBus->Enable(false);
782  m_choiceTextUnit->Enable(false);
783  m_choiceTextType->Clear();
784  m_choiceTextFromBus->Clear();
785  m_choiceTextToBus->Clear();
786  m_choiceTextUnit->Clear();
787 
788  m_choiceName->Clear();
789  wxArrayString arrayString;
790  switch(m_text->GetElementType()) {
791  case TYPE_BUS: {
792  for(int i = 0; i < (int)m_allElements.GetBusList().size(); i++) {
793  Bus* bus = m_allElements.GetBusList()[i];
794  arrayString.Add(bus->GetElectricalData().name);
795  }
796  } break;
797  case TYPE_SYNC_GENERATOR: {
798  for(int i = 0; i < (int)m_allElements.GetSyncGeneratorList().size(); i++) {
799  SyncGenerator* syncGenerator = m_allElements.GetSyncGeneratorList()[i];
800  arrayString.Add(syncGenerator->GetElectricalData().name);
801  }
802  } break;
803  case TYPE_LINE: {
804  for(int i = 0; i < (int)m_allElements.GetLineList().size(); i++) {
805  Line* line = m_allElements.GetLineList()[i];
806  arrayString.Add(line->GetElectricalData().name);
807  }
808  } break;
809  case TYPE_TRANSFORMER: {
810  for(int i = 0; i < (int)m_allElements.GetTransformerList().size(); i++) {
811  Transformer* transformer = m_allElements.GetTransformerList()[i];
812  arrayString.Add(transformer->GetElectricalData().name);
813  }
814  } break;
815  case TYPE_LOAD: {
816  for(int i = 0; i < (int)m_allElements.GetLoadList().size(); i++) {
817  Load* load = m_allElements.GetLoadList()[i];
818  arrayString.Add(load->GetElectricalData().name);
819  }
820  } break;
821  case TYPE_CAPACITOR: {
822  for(int i = 0; i < (int)m_allElements.GetCapacitorList().size(); i++) {
823  Capacitor* capacitor = m_allElements.GetCapacitorList()[i];
824  arrayString.Add(capacitor->GetElectricalData().name);
825  }
826  } break;
827  case TYPE_INDUCTOR: {
828  for(int i = 0; i < (int)m_allElements.GetInductorList().size(); i++) {
829  Inductor* inductor = m_allElements.GetInductorList()[i];
830  arrayString.Add(inductor->GetElectricalData().name);
831  }
832  } break;
833  case TYPE_SYNC_MOTOR: {
834  for(int i = 0; i < (int)m_allElements.GetSyncMotorList().size(); i++) {
835  SyncMotor* syncMotor = m_allElements.GetSyncMotorList()[i];
836  arrayString.Add(syncMotor->GetElectricalData().name);
837  }
838  } break;
839  case TYPE_IND_MOTOR: {
840  for(int i = 0; i < (int)m_allElements.GetIndMotorList().size(); i++) {
841  IndMotor* indMotor = m_allElements.GetIndMotorList()[i];
842  arrayString.Add(indMotor->GetElectricalData().name);
843  }
844  } break;
845 
846  default:
847  break;
848  }
849  m_choiceName->Append(arrayString);
850  m_choiceName->Enable();
851 }
852 
853 void TextForm::ElementNumberChoice()
854 {
855  m_choiceTextFromBus->Enable(false);
856  m_choiceTextToBus->Enable(false);
857  m_choiceTextUnit->Enable(false);
858  m_choiceTextFromBus->Clear();
859  m_choiceTextToBus->Clear();
860  m_choiceTextUnit->Clear();
861 
862  int index = m_choiceName->GetSelection();
863  m_text->SetElementNumber(index);
864 
865  m_choiceTextType->Clear();
866  wxArrayString arrayString;
867  switch(m_text->GetElementType()) {
868  case TYPE_BUS: {
869  Bus* bus = m_allElements.GetBusList()[index];
870  m_text->SetElement(bus);
871 
872  arrayString.Add(_("Name"));
873  arrayString.Add(_("Voltage"));
874  arrayString.Add(_("Angle"));
875  arrayString.Add(_("Fault current"));
876  arrayString.Add(_("Fault voltage"));
877  arrayString.Add(_("Short-circuit power"));
878  } break;
879  case TYPE_SYNC_GENERATOR: {
880  SyncGenerator* syncGenerator = m_allElements.GetSyncGeneratorList()[index];
881  m_text->SetElement(syncGenerator);
882 
883  arrayString.Add(_("Name"));
884  arrayString.Add(_("Active power"));
885  arrayString.Add(_("Reactive power"));
886  arrayString.Add(_("Fault current"));
887  } break;
888  case TYPE_LINE: {
889  Line* line = m_allElements.GetLineList()[index];
890  m_text->SetElement(line);
891 
892  arrayString.Add(_("Name"));
893  arrayString.Add(_("Active power flow"));
894  arrayString.Add(_("Reactive power flow"));
895  arrayString.Add(_("Losses"));
896  arrayString.Add(_("Current"));
897  arrayString.Add(_("Fault current"));
898  } break;
899  case TYPE_TRANSFORMER: {
900  Transformer* transformer = m_allElements.GetTransformerList()[index];
901  m_text->SetElement(transformer);
902 
903  arrayString.Add(_("Name"));
904  arrayString.Add(_("Active power flow"));
905  arrayString.Add(_("Reactive power flow"));
906  arrayString.Add(_("Losses"));
907  arrayString.Add(_("Current"));
908  arrayString.Add(_("Fault current"));
909  } break;
910  case TYPE_LOAD: {
911  Load* load = m_allElements.GetLoadList()[index];
912  m_text->SetElement(load);
913 
914  arrayString.Add(_("Name"));
915  arrayString.Add(_("Active power"));
916  arrayString.Add(_("Reactive power"));
917  } break;
918  case TYPE_CAPACITOR: {
919  Capacitor* capacitor = m_allElements.GetCapacitorList()[index];
920  m_text->SetElement(capacitor);
921 
922  arrayString.Add(_("Name"));
923  arrayString.Add(_("Reactive power"));
924  } break;
925  case TYPE_INDUCTOR: {
926  Inductor* inductor = m_allElements.GetInductorList()[index];
927  m_text->SetElement(inductor);
928 
929  arrayString.Add(_("Name"));
930  arrayString.Add(_("Reactive power"));
931  } break;
932  case TYPE_SYNC_MOTOR: {
933  SyncMotor* syncMotor = m_allElements.GetSyncMotorList()[index];
934  m_text->SetElement(syncMotor);
935 
936  arrayString.Add(_("Name"));
937  arrayString.Add(_("Active power"));
938  arrayString.Add(_("Reactive power"));
939  } break;
940  case TYPE_IND_MOTOR: {
941  IndMotor* indMotor = m_allElements.GetIndMotorList()[index];
942  m_text->SetElement(indMotor);
943 
944  arrayString.Add(_("Name"));
945  arrayString.Add(_("Active power"));
946  arrayString.Add(_("Reactive power"));
947  } break;
948 
949  default:
950  break;
951  }
952  m_choiceTextType->Append(arrayString);
953  m_choiceTextType->Enable();
954 }
955 
956 void TextForm::DataTypeChoice()
957 {
958  m_choiceTextFromBus->Enable(false);
959  m_choiceTextToBus->Enable(false);
960 
961  m_choiceTextToBus->Clear();
962  m_choiceTextFromBus->Clear();
963  m_choiceTextUnit->Clear();
964 
965  m_choiceTextUnit->Enable();
966 
967  wxArrayString arrayString;
968  switch(m_text->GetDataType()) {
969  case DATA_NAME: {
970  m_choiceTextUnit->Enable(false);
971  return;
972  } break;
973  case DATA_VOLTAGE:
974  case DATA_SC_VOLTAGE: {
975  arrayString.Add(_("p.u."));
976  arrayString.Add(_("V"));
977  arrayString.Add(_("kV"));
978  } break;
979  case DATA_ANGLE: {
980  arrayString.Add(_("Degrees"));
981  arrayString.Add(_("Radians"));
982  } break;
983  case DATA_SC_CURRENT:
984  case DATA_PF_CURRENT: {
985  arrayString.Add(_("p.u."));
986  arrayString.Add(_("A"));
987  arrayString.Add(_("kA"));
988  } break;
989  case DATA_SC_POWER: {
990  arrayString.Add(_("p.u."));
991  arrayString.Add(_("VA"));
992  arrayString.Add(_("kVA"));
993  arrayString.Add(_("MVA"));
994  } break;
995  case DATA_ACTIVE_POWER:
996  case DATA_PF_ACTIVE:
997  case DATA_PF_LOSSES: {
998  arrayString.Add(_("p.u."));
999  arrayString.Add(_("W"));
1000  arrayString.Add(_("kW"));
1001  arrayString.Add(_("MW"));
1002  m_choiceTextUnit->Enable();
1003  } break;
1004  case DATA_REACTIVE_POWER:
1005  case DATA_PF_REACTIVE: {
1006  arrayString.Add(_("p.u."));
1007  arrayString.Add(_("VAr"));
1008  arrayString.Add(_("kVAr"));
1009  arrayString.Add(_("MVAr"));
1010  } break;
1011  default:
1012  break;
1013  }
1014  m_choiceTextUnit->Append(arrayString);
1015 
1016  switch(m_text->GetElementType()) {
1017  case TYPE_LINE: {
1018  if(m_text->GetDataType() != DATA_PF_LOSSES) {
1019  auto it = m_allElements.GetLineList().begin();
1020  std::advance(it, m_text->GetElementNumber());
1021  Line* line = *it;
1022 
1023  Bus* bus1 = static_cast<Bus*>(line->GetParentList()[0]);
1024  Bus* bus2 = static_cast<Bus*>(line->GetParentList()[1]);
1025  wxString bus1Name = bus1->GetElectricalData().name;
1026  wxString bus2Name = bus2->GetElectricalData().name;
1027 
1028  m_choiceTextFromBus->Append(bus1Name);
1029  m_choiceTextFromBus->Append(bus2Name);
1030  m_choiceTextToBus->Append(bus2Name);
1031  m_choiceTextToBus->Append(bus1Name);
1032  m_choiceTextFromBus->SetSelection(0);
1033  m_choiceTextToBus->SetSelection(0);
1034 
1035  m_choiceTextFromBus->Enable();
1036  m_choiceTextToBus->Enable();
1037  }
1038  } break;
1039  case TYPE_TRANSFORMER: {
1040  if(m_text->GetDataType() != DATA_PF_LOSSES) {
1041  auto it = m_allElements.GetTransformerList().begin();
1042  std::advance(it, m_text->GetElementNumber());
1043  Transformer* transformer = *it;
1044 
1045  Bus* bus1 = static_cast<Bus*>(transformer->GetParentList()[0]);
1046  Bus* bus2 = static_cast<Bus*>(transformer->GetParentList()[1]);
1047  wxString bus1Name = bus1->GetElectricalData().name;
1048  wxString bus2Name = bus2->GetElectricalData().name;
1049 
1050  m_choiceTextFromBus->Append(bus1Name);
1051  m_choiceTextFromBus->Append(bus2Name);
1052  m_choiceTextToBus->Append(bus2Name);
1053  m_choiceTextToBus->Append(bus1Name);
1054  m_choiceTextFromBus->SetSelection(0);
1055  m_choiceTextToBus->SetSelection(0);
1056 
1057  m_choiceTextFromBus->Enable();
1058  m_choiceTextToBus->Enable();
1059  }
1060  } break;
1061  default:
1062  break;
1063  }
1064 }
1065 
1066 void TextForm::UnitChoice()
1067 {
1068  switch(m_text->GetDataType()) {
1069  case DATA_NAME: {
1070  m_choiceTextUnit->Enable(false);
1071  return;
1072  } break;
1073  case DATA_VOLTAGE:
1074  case DATA_SC_VOLTAGE: {
1075  switch(m_choiceTextUnit->GetSelection()) {
1076  case 0: {
1077  m_text->SetUnit(UNIT_PU);
1078  } break;
1079  case 1: {
1080  m_text->SetUnit(UNIT_V);
1081  } break;
1082  case 2: {
1083  m_text->SetUnit(UNIT_kV);
1084  } break;
1085  default:
1086  break;
1087  }
1088  } break;
1089  case DATA_ANGLE: {
1090  switch(m_choiceTextUnit->GetSelection()) {
1091  case 0: {
1092  m_text->SetUnit(UNIT_DEGREE);
1093  } break;
1094  case 1: {
1095  m_text->SetUnit(UNIT_RADIAN);
1096  } break;
1097  default:
1098  break;
1099  }
1100  } break;
1101  case DATA_SC_CURRENT:
1102  case DATA_PF_CURRENT: {
1103  switch(m_choiceTextUnit->GetSelection()) {
1104  case 0: {
1105  m_text->SetUnit(UNIT_PU);
1106  } break;
1107  case 1: {
1108  m_text->SetUnit(UNIT_A);
1109  } break;
1110  case 2: {
1111  m_text->SetUnit(UNIT_kA);
1112  } break;
1113  default:
1114  break;
1115  }
1116  } break;
1117  case DATA_SC_POWER: {
1118  switch(m_choiceTextUnit->GetSelection()) {
1119  case 0: {
1120  m_text->SetUnit(UNIT_PU);
1121  } break;
1122  case 1: {
1123  m_text->SetUnit(UNIT_VA);
1124  } break;
1125  case 2: {
1126  m_text->SetUnit(UNIT_kVA);
1127  } break;
1128  case 3: {
1129  m_text->SetUnit(UNIT_MVA);
1130  } break;
1131  default:
1132  break;
1133  }
1134  } break;
1135  case DATA_ACTIVE_POWER:
1136  case DATA_PF_ACTIVE:
1137  case DATA_PF_LOSSES: {
1138  switch(m_choiceTextUnit->GetSelection()) {
1139  case 0: {
1140  m_text->SetUnit(UNIT_PU);
1141  } break;
1142  case 1: {
1143  m_text->SetUnit(UNIT_W);
1144  } break;
1145  case 2: {
1146  m_text->SetUnit(UNIT_kW);
1147  } break;
1148  case 3: {
1149  m_text->SetUnit(UNIT_MW);
1150  } break;
1151  default:
1152  break;
1153  }
1154  } break;
1155  case DATA_REACTIVE_POWER:
1156  case DATA_PF_REACTIVE: {
1157  switch(m_choiceTextUnit->GetSelection()) {
1158  case 0: {
1159  m_text->SetUnit(UNIT_PU);
1160  } break;
1161  case 1: {
1162  m_text->SetUnit(UNIT_VAr);
1163  } break;
1164  case 2: {
1165  m_text->SetUnit(UNIT_kVAr);
1166  } break;
1167  case 3: {
1168  m_text->SetUnit(UNIT_MVAr);
1169  } break;
1170  default:
1171  break;
1172  }
1173  } break;
1174  default:
1175  break;
1176  }
1177 }
1178 
1179 void TextForm::Preview()
1180 {
1181  double decimalPlaces = m_text->GetDecimalPlaces();
1182  if(m_textCtrlDecimal->GetValue().ToDouble(&decimalPlaces)) m_text->SetDecimalPlaces(decimalPlaces);
1183 
1184  m_text->UpdateText(m_systemPowerBase);
1185 
1186  m_textCtrlPreview->SetValue(m_text->GetText());
1187 }
1188 
1189 bool TextForm::ValidateData()
1190 {
1191  if(m_choiceElement->GetSelection() == -1) return false;
1192  if(m_choiceName->GetSelection() == -1) return false;
1193  if(m_choiceTextType->GetSelection() == -1) return false;
1194  if(m_text->GetDataType() != DATA_NAME && m_choiceTextUnit->GetSelection() == -1) return false;
1195  if(m_text->GetElementType() == TYPE_LINE || m_text->GetElementType() == TYPE_TRANSFORMER) {
1196  if(m_text->GetDataType() != DATA_PF_LOSSES && m_text->GetDataType() != DATA_NAME) {
1197  if(m_choiceTextFromBus->GetSelection() == -1) return false;
1198  if(m_choiceTextToBus->GetSelection() == -1) return false;
1199  }
1200  }
1201 
1202  if(m_choiceTextFromBus->IsEnabled() && m_choiceTextToBus->IsEnabled())
1203  m_text->SetDirection(m_choiceTextFromBus->GetSelection());
1204  double decimalPlaces = m_text->GetDecimalPlaces();
1205  if(m_textCtrlDecimal->GetValue().ToDouble(&decimalPlaces)) m_text->SetDecimalPlaces(decimalPlaces);
1206 
1207  m_textToEdit->SetElementType(m_text->GetElementType());
1208  m_textToEdit->SetElementNumber(m_text->GetElementNumber());
1209  m_textToEdit->SetElement(m_text->GetElement());
1210  m_textToEdit->SetDataType(m_text->GetDataType());
1211  m_textToEdit->SetDirection(m_text->GetDirection());
1212  m_textToEdit->SetUnit(m_text->GetUnit());
1213  m_textToEdit->SetDecimalPlaces(decimalPlaces);
1214  m_textToEdit->UpdateText(m_systemPowerBase);
1215 
1216  return true;
1217 }
1218 
1219 void TextForm::OnOKButtonClick(wxCommandEvent& event)
1220 {
1221  if(ValidateData()) {
1222  EndModal(wxID_OK);
1223  } else {
1224  wxString errorMsg = _("There are blank fields.");
1225  wxMessageDialog msgDialog(this, errorMsg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
1226  msgDialog.ShowModal();
1227  }
1228 }
Element that shows power element informations in workspace.
Definition: Text.h:75
- - - -
Synchronous generator power element.
- - - - -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
- - - -
Power line element.
Definition: Line.h:59
-
Loas shunt power element.
Definition: Load.h:73
- -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
-
Induction motor power element.
Definition: IndMotor.h:40
- - -
Shunt capactior power element.
Definition: Capacitor.h:38
-
Inductor shunt power element.
Definition: Inductor.h:38
- - - -
Two-winding transformer power element.
Definition: Transformer.h:78
- - -
-
- - - - diff --git a/docs/doxygen/html/_text_form_8h.html b/docs/doxygen/html/_text_form_8h.html index b198318..d15dc96 100644 --- a/docs/doxygen/html/_text_form_8h.html +++ b/docs/doxygen/html/_text_form_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_text_form_8h.html','');});
TextForm.h File Reference
-
#include "ElementForm.h"
-#include "Text.h"
-#include "ElectricCalculation.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+#include "Text.h"
+#include "ElectricCalculation.h"
+
diff --git a/docs/doxygen/html/_text_form_8h_source.html b/docs/doxygen/html/_text_form_8h_source.html deleted file mode 100644 index 8b2b606..0000000 --- a/docs/doxygen/html/_text_form_8h_source.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - -Project/TextForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  TextForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
TextForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef TEXTFORM_H
19 #define TEXTFORM_H
20 #include "ElementForm.h"
21 
22 #include "Text.h"
23 #include "ElectricCalculation.h"
24 
32 class TextForm : public TextFormBase
33 {
34  public:
35  TextForm(wxWindow* parent, Text* text, std::vector<Element*> elementList, double systemPowerBase = 100e6);
36  virtual ~TextForm();
37 
38  virtual bool LoadChoices();
39 
40  virtual void ElementTypeChoice();
41  virtual void ElementNumberChoice();
42  virtual void DataTypeChoice();
43  virtual void UnitChoice();
44 
45  virtual void Preview();
46  virtual bool ValidateData();
47 
48  protected:
49  virtual void OnUnitChoiceSelected(wxCommandEvent& event);
50  virtual void OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
51  virtual void OnOKButtonClick(wxCommandEvent& event);
52  virtual void OnElementChoiceSelected(wxCommandEvent& event);
53  virtual void OnFromBusChoiceSelected(wxCommandEvent& event);
54  virtual void OnNameChoiceSelected(wxCommandEvent& event);
55  virtual void OnTextEnter(wxCommandEvent& event);
56  virtual void OnToBusChoiceSelected(wxCommandEvent& event);
57  virtual void OnTypeChoiceSelected(wxCommandEvent& event);
58 
59  Text* m_text = NULL;
60  Text* m_textToEdit = NULL;
61  wxWindow* m_parent = NULL;
62  ElectricCalculation m_allElements;
63  double m_systemPowerBase;
64 };
65 #endif // TEXTFORM_H
Element that shows power element informations in workspace.
Definition: Text.h:75
- -
Form to edit the text graphical data.
Definition: TextForm.h:32
- -
Base class of electric calculations, with general methods.
- -
-
- - - - diff --git a/docs/doxygen/html/_transfer_function_8cpp_source.html b/docs/doxygen/html/_transfer_function_8cpp_source.html deleted file mode 100644 index 778f269..0000000 --- a/docs/doxygen/html/_transfer_function_8cpp_source.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - -Project/TransferFunction.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
TransferFunction.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "TransferFunction.h"
19 #include "TransferFunctionForm.h"
20 
21 TransferFunction::TransferFunction(int id) : ControlElement(id)
22 {
23  // Superscript unicode numbers
24  m_supNumber[0] = L'\u2070';
25  m_supNumber[1] = L'\u00B9';
26  m_supNumber[2] = L'\u00B2';
27  m_supNumber[3] = L'\u00B3';
28  m_supNumber[4] = L'\u2074';
29  m_supNumber[5] = L'\u2075';
30  m_supNumber[6] = L'\u2076';
31  m_supNumber[7] = L'\u2077';
32  m_supNumber[8] = L'\u2078';
33  m_supNumber[9] = L'\u2079';
34 
35  m_numerator.clear();
36  m_numerator.push_back(1);
37  m_denominator.clear();
38  m_denominator.push_back(1);
39  m_denominator.push_back(1);
40  UpdateTFText();
41 
42  Node* node1 = new Node(m_position + wxPoint2DDouble(-m_width / 2, 0), Node::NODE_IN, m_borderSize);
43  node1->StartMove(m_position);
44  Node* node2 = new Node(m_position + wxPoint2DDouble(m_width / 2, 0), Node::NODE_OUT, m_borderSize);
45  node2->SetAngle(180.0);
46  node2->StartMove(m_position);
47  m_nodeList.push_back(node1);
48  m_nodeList.push_back(node2);
49 }
50 
51 TransferFunction::~TransferFunction()
52 {
53  if(m_glTextDen) delete m_glTextDen;
54  if(m_glTextNum) delete m_glTextNum;
55 }
56 void TransferFunction::Draw(wxPoint2DDouble translation, double scale) const
57 {
58  glLineWidth(1.0);
59  if(m_selected) {
60  glColor4dv(m_selectionColour.GetRGBA());
61  double borderSize = (m_borderSize * 2.0 + 1.0) / scale;
62  DrawRectangle(m_position, m_width + borderSize, m_height + borderSize);
63  }
64  glColor4d(1.0, 1.0, 1.0, 1.0);
65  DrawRectangle(m_position, m_width, m_height);
66  glColor4d(0.0, 0.0, 0.0, 1.0);
67  DrawRectangle(m_position, m_width, m_height, GL_LINE_LOOP);
68 
69  std::vector<wxPoint2DDouble> linePts;
70  linePts.push_back(wxPoint2DDouble(m_position.m_x - m_width / 2 + 5 + m_borderSize, m_position.m_y));
71  linePts.push_back(wxPoint2DDouble(m_position.m_x + m_width / 2 - 5 - m_borderSize, m_position.m_y));
72  DrawLine(linePts);
73 
74  DrawNodes();
75 
76  glColor4d(0.0, 0.0, 0.0, 1.0);
77  m_glTextNum->Draw(m_position + wxPoint2DDouble(0.0, -m_height / 4));
78  m_glTextDen->Draw(m_position + wxPoint2DDouble(0.0, m_height / 4));
79 }
80 
81 void TransferFunction::SetText(wxString numerator, wxString denominator)
82 {
83  if(m_glTextNum)
84  m_glTextNum->SetText(numerator);
85  else
86  m_glTextNum = new OpenGLText(numerator);
87 
88  if(m_glTextDen)
89  m_glTextDen->SetText(denominator);
90  else
91  m_glTextDen = new OpenGLText(denominator);
92 
93  double nWidth = m_glTextNum->GetWidth() + 5 + m_borderSize;
94  double dWidth = m_glTextDen->GetWidth() + 5 + m_borderSize;
95 
96  m_width = nWidth > dWidth ? nWidth : dWidth;
97  m_height = m_glTextNum->GetHeight() + m_glTextDen->GetHeight() + 2 * m_borderSize;
98  SetPosition(m_position); // Update rect properly.
99 }
100 
101 wxString TransferFunction::GetSuperscriptNumber(int number)
102 {
103  wxString strNumber = wxString::Format("%d", number);
104  wxString superscriptStr = "";
105  for(int i = 0; i < (int)strNumber.length(); ++i) {
106  wxString digitStr = strNumber[i];
107  long digit = 0;
108  digitStr.ToLong(&digit);
109  superscriptStr += wxString(m_supNumber[digit]);
110  }
111  return superscriptStr;
112 }
113 
114 void TransferFunction::GetTFString(wxString& numerator, wxString& denominator)
115 {
116  numerator = "";
117  denominator = "";
118  int index = static_cast<int>(m_numerator.size()) - 1;
119  for(auto it = m_numerator.begin(), itEnd = m_numerator.end(); it != itEnd; ++it) {
120  double value = *it;
121  if(value != 0.0) {
122  wxString signal;
123  if(index == static_cast<int>(m_numerator.size()) - 1) {
124  if(value >= 0.0)
125  signal += "";
126  else
127  signal += "-";
128  } else {
129  if(value >= 0.0)
130  signal += "+ ";
131  else
132  signal += "- ";
133  }
134 
135  if(index == 0) {
136  numerator += signal + StringFromDouble(std::abs(value), 0);
137  break;
138  } else if(index == 1) {
139  if(value == 1.0) {
140  numerator += signal + "s";
141  } else {
142  numerator += signal + StringFromDouble(std::abs(value), 0) + "s";
143  }
144  } else {
145  if(value == 1.0) {
146  numerator += signal + "s" + GetSuperscriptNumber(index);
147  } else {
148  numerator += signal + StringFromDouble(std::abs(value), 0) + "s" + GetSuperscriptNumber(index);
149  }
150  }
151  numerator += " ";
152  }
153  --index;
154  }
155 
156  index = static_cast<int>(m_denominator.size()) - 1;
157  for(auto it = m_denominator.begin(), itEnd = m_denominator.end(); it != itEnd; ++it) {
158  double value = *it;
159  if(value != 0.0) {
160  wxString signal;
161  if(index == static_cast<int>(m_denominator.size()) - 1) {
162  if(value >= 0.0)
163  signal += "";
164  else
165  signal += "-";
166  } else {
167  if(value >= 0.0)
168  signal += "+ ";
169  else
170  signal += "- ";
171  }
172 
173  if(index == 0) {
174  denominator += signal + StringFromDouble(std::abs(value), 0);
175  break;
176  } else if(index == 1) {
177  if(value == 1.0) {
178  denominator += signal + "s";
179  } else {
180  denominator += signal + StringFromDouble(std::abs(value), 0) + "s";
181  }
182  } else {
183  if(value == 1.0) {
184  denominator += signal + "s" + GetSuperscriptNumber(index);
185  } else {
186  denominator += signal + StringFromDouble(std::abs(value), 0) + "s" + GetSuperscriptNumber(index);
187  }
188  }
189  denominator += " ";
190  }
191  --index;
192  }
193 }
194 
195 void TransferFunction::UpdateTFText()
196 {
197  wxString num, den;
198  GetTFString(num, den);
199  SetText(num, den);
200  if(m_nodeList.size() == 2) {
201  if(m_angle == 0.0) {
202  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
203  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
204  } else if(m_angle == 90.0) {
205  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
206  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
207  } else if(m_angle == 180.0) {
208  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
209  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
210  } else if(m_angle == 270.0) {
211  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
212  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
213  }
214  }
215 }
216 
217 bool TransferFunction::ShowForm(wxWindow* parent, Element* element)
218 {
219  TransferFunctionForm* tfForm = new TransferFunctionForm(parent, this);
220  if(tfForm->ShowModal() == wxID_OK) {
221  tfForm->Destroy();
222  return true;
223  }
224  tfForm->Destroy();
225  return false;
226 }
227 
228 void TransferFunction::Rotate(bool clockwise)
229 {
230  if(clockwise)
231  m_angle += 90.0;
232  else
233  m_angle -= 90.0;
234  if(m_angle >= 360.0)
235  m_angle = 0.0;
236  else if(m_angle < 0)
237  m_angle = 270.0;
238 
239  if(m_angle == 0.0) {
240  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
241  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
242  } else if(m_angle == 90.0) {
243  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
244  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
245  } else if(m_angle == 180.0) {
246  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(m_width / 2, 0));
247  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(-m_width / 2, 0));
248  } else if(m_angle == 270.0) {
249  m_nodeList[0]->SetPosition(m_position + wxPoint2DDouble(0, m_height / 2));
250  m_nodeList[1]->SetPosition(m_position + wxPoint2DDouble(0, -m_height / 2));
251  }
252 
253  for(auto it = m_nodeList.begin(), itEnd = m_nodeList.end(); it != itEnd; ++it) {
254  Node* node = *it;
255  node->Rotate(clockwise);
256  }
257 }
258 
259 void TransferFunction::CalculateSpaceState(int maxIteration, double error)
260 {
261  m_maxIteration = maxIteration;
262  m_error = error;
263 
264  int order = static_cast<int>(m_denominator.size());
265  std::vector<double> denominator = m_denominator;
266  std::vector<double> numerator;
267 
268  //[Ref.] http://lpsa.swarthmore.edu/Representations/SysRepTransformations/TF2SS.html
269  int k = order;
270  for(int i = 0; i < order; i++) {
271  int numIndex = i - (order - static_cast<int>(m_numerator.size()));
272  if(numIndex < 0)
273  numerator.push_back(0.0);
274  else
275  numerator.push_back(m_numerator[numIndex]);
276  k--;
277  }
278 
279  SpaceState ss;
280  for(int i = 0; i < (order - 1); i++) {
281  std::vector<double> lineA;
282  for(int j = 0; j < (order - 1); j++) {
283  if(j == i + 1)
284  lineA.push_back(1.0);
285  else
286  lineA.push_back(0.0);
287  }
288  ss.A.push_back(lineA);
289  ss.B.push_back(0.0);
290  ss.C.push_back(0.0);
291  }
292  for(int i = 0; i < order - 1; i++) {
293  ss.A[order - 2][i] = -(denominator[order - 1 - i] / denominator[0]);
294  ss.C[i] = (numerator[order - 1 - i] - denominator[order - 1 - i] * numerator[0]) / denominator[0];
295  }
296  ss.B[order - 2] = 1.0;
297  ss.D = numerator[0];
298 
299  m_ss = ss;
300 
301  // Reset state
302  m_x.clear();
303  m_dx.clear();
304 
305  for(unsigned int i = 0; i < m_denominator.size(); ++i) {
306  m_x.push_back(0.0);
307  m_dx.push_back(0.0);
308  }
309 }
310 
311 bool TransferFunction::Solve(double input, double timeStep)
312 {
313  int order = static_cast<int>(m_ss.A.size());
314 
315  std::vector<double> x;
316  std::vector<double> oldx;
317  std::vector<double> dx;
318  std::vector<double> olddx;
319  for(int i = 0; i < order; i++) {
320  x.push_back(m_x[i]);
321  oldx.push_back(m_x[i]);
322 
323  dx.push_back(m_dx[i]);
324  olddx.push_back(m_dx[i]);
325  }
326 
327  bool exit = false;
328  int iter = 0;
329  while(!exit) {
330  double xError = 0.0;
331  double dxError = 0.0;
332  for(int i = 0; i < order; i++) {
333  // Trapezoidal method
334  x[i] = m_x[i] + 0.5 * timeStep * (m_dx[i] + dx[i]);
335 
336  if(std::abs(x[i] - oldx[i]) > xError) xError = std::abs(x[i] - oldx[i]);
337 
338  oldx[i] = x[i];
339  }
340  for(int i = 0; i < order; i++) {
341  // x' = Ax + Bu
342  dx[i] = 0.0;
343  for(int j = 0; j < order; j++) dx[i] += m_ss.A[i][j] * x[j];
344  dx[i] += m_ss.B[i] * input;
345 
346  if(std::abs(dx[i] - olddx[i]) > dxError) dxError = std::abs(dx[i] - olddx[i]);
347 
348  olddx[i] = dx[i];
349  }
350  if(std::max(xError, dxError) < m_error) exit = true;
351 
352  iter++;
353  if(iter >= m_maxIteration) return false;
354  }
355 
356  m_output = 0.0;
357  for(int i = 0; i < order; i++) {
358  m_output += m_ss.C[i] * x[i];
359  m_x[i] = x[i];
360  m_dx[i] = dx[i];
361  }
362 
363  m_output += m_ss.D * input;
364 
365  return true;
366 }
367 
369 {
370  TransferFunction* copy = new TransferFunction(m_elementID);
371  *copy = *this;
372  copy->m_glTextNum = m_glTextNum->GetCopy();
373  copy->m_glTextDen = m_glTextDen->GetCopy();
374  return copy;
375 }
376 
378 {
379  UpdateTFText();
380  if(!m_glTextDen->IsTextureOK()) return false;
381  if(!m_glTextNum->IsTextureOK()) return false;
382  return true;
383 }
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
-
Node of a control element. This class manages the user interaction with the connection and control el...
-
virtual Element * GetCopy()
Get a the element copy.
-
virtual void CalculateSpaceState(int maxIteration=100, double error=1e-3)
Convert the transfer function to space state on controllable canonical form (CCF).
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
-
Form to edit the transfer function control data.
- -
virtual void Rotate(bool clockwise=true)
Rotate the element.
- -
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
Calculates the time response by a frequency domain transfer function.
-
virtual bool Solve(double input, double timeStep)
Calculates the time response by the space state form of transfer function.
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
- - -
-
- - - - diff --git a/docs/doxygen/html/_transfer_function_8h.html b/docs/doxygen/html/_transfer_function_8h.html index 5fa8e5d..ab9423d 100644 --- a/docs/doxygen/html/_transfer_function_8h.html +++ b/docs/doxygen/html/_transfer_function_8h.html @@ -90,12 +90,10 @@ $(document).ready(function(){initNavTree('_transfer_function_8h.html','');});
TransferFunction.h File Reference
-
#include "ControlElement.h"
+
#include "ControlElement.h"
#include <wx/dcscreen.h>
-#include "OpenGLText.h"
-
-

Go to the source code of this file.

- +#include "OpenGLText.h"
+
diff --git a/docs/doxygen/html/_transfer_function_8h_source.html b/docs/doxygen/html/_transfer_function_8h_source.html deleted file mode 100644 index bc30f86..0000000 --- a/docs/doxygen/html/_transfer_function_8h_source.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - -Project/TransferFunction.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  TransferFunction
- - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
TransferFunction.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef TRANSFERFUNCTION_H
19 #define TRANSFERFUNCTION_H
20 
21 #include "ControlElement.h"
22 
23 #include <wx/dcscreen.h>
24 #include "OpenGLText.h"
25 
27 
36 {
37  public:
38  struct SpaceState {
39  std::vector<std::vector<double> > A;
40  std::vector<double> B;
41  std::vector<double> C;
42  double D;
43  };
44 
45  TransferFunction(int id);
47 
48  virtual void Draw(wxPoint2DDouble translation, double scale) const;
49  virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); }
50  virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); }
51  virtual bool ShowForm(wxWindow* parent, Element* element);
52  virtual void Rotate(bool clockwise = true);
53 
54  virtual std::vector<double> GetNumerator() const { return m_numerator; }
55  virtual std::vector<double> GetDenominator() const { return m_denominator; }
56  virtual void SetNumerator(std::vector<double> numerator) { m_numerator = numerator; }
57  virtual void SetDenominator(std::vector<double> denominator) { m_denominator = denominator; }
58  virtual void UpdateTFText();
59  virtual bool UpdateText();
60  virtual SpaceState GetSpaceState() { return m_ss; }
66  virtual void CalculateSpaceState(int maxIteration = 100, double error = 1e-3);
76  virtual bool Solve(double input, double timeStep);
77 
78  virtual Element* GetCopy();
79 
80  protected:
81  virtual void SetText(wxString numerator, wxString denominator);
82  virtual wxString GetSuperscriptNumber(int number);
83  virtual void GetTFString(wxString& numerator, wxString& denominator);
84 
85  wchar_t m_supNumber[10];
86 
87  OpenGLText* m_glTextNum = NULL;
88  OpenGLText* m_glTextDen = NULL;
89  int m_fontSize = 10;
90 
91  std::vector<double> m_numerator;
92  std::vector<double> m_denominator;
93  SpaceState m_ss;
94 
95  std::vector<double> m_x;
96  std::vector<double> m_dx;
97  double m_error = 1e-3;
98  int m_maxIteration = 100;
99 };
100 
101 #endif // TRANSFERFUNCTION_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
-
virtual Element * GetCopy()
Get a the element copy.
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
-
virtual void CalculateSpaceState(int maxIteration=100, double error=1e-3)
Convert the transfer function to space state on controllable canonical form (CCF).
-
virtual bool UpdateText()
Update the OpenGL text in the element (if present).
-
Form to edit the transfer function control data.
- - -
virtual void Rotate(bool clockwise=true)
Rotate the element.
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
-
Class to draw text on OpenGL using wxWidgets.
Definition: OpenGLText.h:31
-
Calculates the time response by a frequency domain transfer function.
-
virtual bool Solve(double input, double timeStep)
Calculates the time response by the space state form of transfer function.
-
Base class of a control element. Provide general methods to other control classes.
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
- -
-
- - - - diff --git a/docs/doxygen/html/_transfer_function_form_8cpp_source.html b/docs/doxygen/html/_transfer_function_form_8cpp_source.html deleted file mode 100644 index 1aea44c..0000000 --- a/docs/doxygen/html/_transfer_function_form_8cpp_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/TransferFunctionForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
TransferFunctionForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "TransferFunctionForm.h"
19 #include "TransferFunction.h"
20 
21 TransferFunctionForm::TransferFunctionForm(wxWindow* parent, TransferFunction* transferFunction)
22  : TransferFunctionFormBase(parent)
23 {
24  SetSize(GetBestSize());
25 
26  m_parent = parent;
27  m_tf = transferFunction;
28  LoadTFData();
29 }
30 
31 TransferFunctionForm::~TransferFunctionForm() {}
32 void TransferFunctionForm::OnCancelClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
33 void TransferFunctionForm::OnOKClick(wxCommandEvent& event)
34 {
35  if(ValidateData()) EndModal(wxID_OK);
36 }
37 
38 void TransferFunctionForm::LoadTFData()
39 {
40  auto num = m_tf->GetNumerator();
41  auto den = m_tf->GetDenominator();
42 
43  wxString numStr = "";
44  for(auto it = num.begin(), itEnd = num.end(); it != itEnd; ++it) {
45  double value = *it;
46  if(it == num.begin())
47  numStr = m_tf->StringFromDouble(value, 0);
48  else
49  numStr += " " + m_tf->StringFromDouble(value, 0);
50  }
51  m_textCtrlNumerator->SetValue(numStr);
52 
53  wxString denStr = "";
54  for(auto it = den.begin(), itEnd = den.end(); it != itEnd; ++it) {
55  double value = *it;
56  if(it == den.begin())
57  denStr = m_tf->StringFromDouble(value, 0);
58  else
59  denStr += " " + m_tf->StringFromDouble(value, 0);
60  }
61  m_textCtrlDenominator->SetValue(denStr);
62 }
63 
64 bool TransferFunctionForm::ValidateData()
65 {
66  wxString num = m_textCtrlNumerator->GetValue();
67  std::vector<double> numerator;
68  while(num != "") {
69  wxString rest;
70  wxString strValue = num.BeforeFirst(' ', &rest);
71  num = rest;
72  double value = 0;
73  if(!m_tf->DoubleFromString(this, strValue, value,
74  _("Value entered incorrectly in the field \"Numerator parameters\".")))
75  return false;
76  numerator.push_back(value);
77  }
78 
79  wxString den = m_textCtrlDenominator->GetValue();
80  std::vector<double> denominator;
81  while(den != "") {
82  wxString rest;
83  wxString strValue = den.BeforeFirst(' ', &rest);
84  den = rest;
85  double value = 0;
86  if(!m_tf->DoubleFromString(this, strValue, value,
87  _("Value entered incorrectly in the field \"Denominator parameters\".")))
88  return false;
89  denominator.push_back(value);
90  }
91  m_tf->SetNumerator(numerator);
92  m_tf->SetDenominator(denominator);
93  m_tf->UpdateTFText();
94  return true;
95 }
- -
Calculates the time response by a frequency domain transfer function.
- -
-
- - - - diff --git a/docs/doxygen/html/_transfer_function_form_8h.html b/docs/doxygen/html/_transfer_function_form_8h.html index 759ef39..9a5da23 100644 --- a/docs/doxygen/html/_transfer_function_form_8h.html +++ b/docs/doxygen/html/_transfer_function_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_transfer_function_form_8h.html','');}
TransferFunctionForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_transfer_function_form_8h_source.html b/docs/doxygen/html/_transfer_function_form_8h_source.html deleted file mode 100644 index e9187c9..0000000 --- a/docs/doxygen/html/_transfer_function_form_8h_source.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -Project/TransferFunctionForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  TransferFunctionForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
TransferFunctionForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef TRANSFERFUNCTIONFORM_H
19 #define TRANSFERFUNCTIONFORM_H
20 
21 #include "ElementForm.h"
22 
23 class TransferFunction;
24 
33 {
34  public:
35  TransferFunctionForm(wxWindow* parent, TransferFunction* transferFunction);
36  virtual ~TransferFunctionForm();
37  bool ValidateData();
38 
39  protected:
40  virtual void OnCancelClick(wxCommandEvent& event);
41  virtual void OnOKClick(wxCommandEvent& event);
42  void LoadTFData();
43 
44  wxWindow* m_parent = NULL;
45  TransferFunction* m_tf = NULL;
46 };
47 #endif // TRANSFERFUNCTIONFORM_H
Form to edit the transfer function control data.
- -
Calculates the time response by a frequency domain transfer function.
-
-
- - - - diff --git a/docs/doxygen/html/_transformer_8cpp_source.html b/docs/doxygen/html/_transformer_8cpp_source.html deleted file mode 100644 index 27810c6..0000000 --- a/docs/doxygen/html/_transformer_8cpp_source.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - -Project/Transformer.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Transformer.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "TransformerForm.h"
19 #include "Transformer.h"
20 
21 Transformer::Transformer() : Branch()
22 {
23  for(int i = 0; i < 2; i++) {
24  for(int j = 0; j < 3; j++) {
25  m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0);
26  }
27  }
28 }
29 Transformer::Transformer(wxString name) : Branch()
30 {
31  for(int i = 0; i < 2; i++) {
32  for(int j = 0; j < 3; j++) {
33  m_electricalData.faultCurrent[i][j] = std::complex<double>(0.0, 0.0);
34  }
35  }
36  m_electricalData.name = name;
37 }
38 Transformer::~Transformer() {}
39 bool Transformer::AddParent(Element* parent, wxPoint2DDouble position)
40 {
41  if(parent) {
42  // First bus.
43  if(m_parentList.size() == 0) {
44  m_position = position;
45  m_parentList.push_back(parent);
46  parent->AddChild(this);
47  wxPoint2DDouble parentPt =
48  parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position.
49  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
50  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back.
51  m_pointList.push_back(parentPt); // First point
52  m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_position));
53 
54  wxRect2DDouble genRect(0, 0, 0, 0);
55  m_switchRect.push_back(genRect);
56 
57  return false;
58  }
59  // Second bus.
60  else if(parent != m_parentList[0]) {
61  m_parentList.push_back(parent);
62  parent->AddChild(this);
63  wxPoint2DDouble parentPt =
64  parent->RotateAtPosition(position, -parent->GetAngle()); // Rotate click to horizontal position.
65  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
66  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle()); // Rotate back.
67 
68  // Get the average between the two bus points.
69  m_position =
70  wxPoint2DDouble((m_pointList[0].m_x + parentPt.m_x) / 2.0, (m_pointList[0].m_y + parentPt.m_y) / 2.0);
71  // Set the transformer rectangle.
72  m_width = 70.0;
73  m_height = 40.0;
74  SetPosition(m_position); // This method calculates the rectangle propely.
75  // Set the "side" points.
76  m_pointList.push_back(
77  wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(-10 - m_borderSize, m_height / 2.0)));
78  m_pointList.push_back(
79  wxPoint2DDouble(m_rect.GetPosition() + wxPoint2DDouble(m_width + 10 + m_borderSize, m_height / 2.0)));
80 
81  // Set first switch point.
82  wxPoint2DDouble secondPoint = parentPt;
83  if(m_pointList.size() > 2) {
84  secondPoint = m_pointList[2];
85  }
86  m_pointList[1] = GetSwitchPoint(m_parentList[0], m_pointList[0], secondPoint);
87 
88  // Set the second switch point.
89  m_pointList.push_back(GetSwitchPoint(parent, parentPt, m_pointList[m_pointList.size() - 1]));
90 
91  m_pointList.push_back(parentPt); // Last point.
92  m_inserted = true;
93 
94  wxRect2DDouble genRect(0, 0, 0, 0);
95  m_switchRect.push_back(genRect);
96  UpdateSwitches();
97  UpdatePowerFlowArrowsPosition();
98 
99  return true;
100  }
101  }
102  return false;
103 }
104 
105 bool Transformer::Contains(wxPoint2DDouble position) const
106 {
107  wxPoint2DDouble ptR = RotateAtPosition(position, -m_angle);
108  return m_rect.Contains(ptR);
109 }
110 
111 void Transformer::Draw(wxPoint2DDouble translation, double scale) const
112 {
113  OpenGLColour elementColour;
114  if(m_online) {
115  if(m_dynEvent)
116  elementColour = m_dynamicEventColour;
117  else
118  elementColour = m_onlineElementColour;
119  } else
120  elementColour = m_offlineElementColour;
121 
122  if(m_inserted) {
123  // Draw selection (layer 1).
124  if(m_selected) {
125  // Push the current matrix on stack.
126  glLineWidth(1.5 + m_borderSize * 2.0);
127  glColor4dv(m_selectionColour.GetRGBA());
128  DrawLine(m_pointList);
129  glPushMatrix();
130  // Rotate the matrix around the object position.
131  glTranslated(m_position.m_x, m_position.m_y, 0.0);
132  glRotated(m_angle, 0.0, 0.0, 1.0);
133  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
134 
135  DrawCircle(m_rect.GetPosition() + wxPoint2DDouble(20.0, 20.0), 20 + (m_borderSize + 1.5) / scale, 20,
136  GL_POLYGON);
137  DrawCircle(m_rect.GetPosition() + wxPoint2DDouble(50.0, 20.0), 20 + (m_borderSize + 1.5) / scale, 20,
138  GL_POLYGON);
139 
140  glPopMatrix();
141 
142  // Draw nodes selection.
143  if(m_pointList.size() > 0) {
144  DrawCircle(m_pointList[0], 5.0 + m_borderSize / scale, 10, GL_POLYGON);
145  if(m_inserted) {
146  DrawCircle(m_pointList[m_pointList.size() - 1], 5.0 + m_borderSize / scale, 10, GL_POLYGON);
147  }
148  }
149  }
150 
151  // Draw transformer (layer 2).
152  // Transformer line
153  glLineWidth(1.5);
154  glColor4dv(elementColour.GetRGBA());
155  DrawLine(m_pointList);
156 
157  // Draw nodes.
158  if(m_pointList.size() > 0) {
159  glColor4dv(elementColour.GetRGBA());
160  DrawCircle(m_pointList[0], 5.0, 10, GL_POLYGON);
161  if(m_inserted) {
162  DrawCircle(m_pointList[m_pointList.size() - 1], 5.0, 10, GL_POLYGON);
163  }
164  }
165 
166  DrawSwitches();
167  DrawPowerFlowPts();
168 
169  // Push the current matrix on stack.
170  glPushMatrix();
171  // Rotate the matrix around the object position.
172  glTranslated(m_position.m_x, m_position.m_y, 0.0);
173  glRotated(m_angle, 0.0, 0.0, 1.0);
174  glTranslated(-m_position.m_x, -m_position.m_y, 0.0);
175 
176  glColor4d(1.0, 1.0, 1.0, 1.0);
177  DrawCircle(m_rect.GetPosition() + wxPoint2DDouble(20.0, 20.0), 20, 20, GL_POLYGON);
178  DrawCircle(m_rect.GetPosition() + wxPoint2DDouble(50.0, 20.0), 20, 20, GL_POLYGON);
179 
180  glColor4dv(elementColour.GetRGBA());
181  DrawCircle(m_rect.GetPosition() + wxPoint2DDouble(20.0, 20.0), 20, 20);
182  DrawCircle(m_rect.GetPosition() + wxPoint2DDouble(50.0, 20.0), 20, 20);
183 
184  DrawPoint(m_rect.GetPosition(), 8.0 * scale);
185 
186  glPopMatrix();
187  }
188 }
189 
190 bool Transformer::Intersects(wxRect2DDouble rect) const
191 {
192  if(m_angle == 0.0 || m_angle == 180.0) return m_rect.Intersects(rect);
193  return RotatedRectanglesIntersects(m_rect, rect, m_angle, 0.0);
194 }
195 
196 void Transformer::Rotate(bool clockwise)
197 {
198  double rotAngle = m_rotationAngle;
199  if(!clockwise) rotAngle = -m_rotationAngle;
200 
201  m_angle += rotAngle;
202  if(m_angle >= 360 || m_angle <= -360) m_angle = 0.0;
203 
204  // Rotate all the points, except the switches and buses points.
205  for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
206  m_pointList[i] = RotateAtPosition(m_pointList[i], rotAngle);
207  }
208  UpdateSwitchesPosition();
209  UpdatePowerFlowArrowsPosition();
210 }
211 
212 void Transformer::Move(wxPoint2DDouble position)
213 {
214  SetPosition(m_movePos + position - m_moveStartPt);
215 
216  // Move all the points, except the switches and buses points.
217  for(int i = 2; i < (int)m_pointList.size() - 2; i++) {
218  m_pointList[i] = m_movePts[i] + position - m_moveStartPt;
219  }
220 
221  if(!m_parentList[0]) {
222  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
223  }
224  if(!m_parentList[1]) {
225  m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
226  }
227 
228  UpdateSwitchesPosition();
229  UpdatePowerFlowArrowsPosition();
230 }
231 
232 void Transformer::MoveNode(Element* parent, wxPoint2DDouble position)
233 {
234  if(parent) {
235  // First bus.
236  if(parent == m_parentList[0]) {
237  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
238  }
239  // Second bus.
240  else if(parent == m_parentList[1]) {
241  m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
242  }
243  } else {
244  if(m_activeNodeID == 1) {
245  m_pointList[0] = m_movePts[0] + position - m_moveStartPt;
246  if(m_parentList[0]) {
247  m_parentList[0]->RemoveChild(this);
248  m_parentList[0] = NULL;
249  m_online = false;
250  }
251  } else if(m_activeNodeID == 2) {
252  m_pointList[m_pointList.size() - 1] = m_movePts[m_pointList.size() - 1] + position - m_moveStartPt;
253  if(m_parentList[1]) {
254  m_parentList[1]->RemoveChild(this);
255  m_parentList[1] = NULL;
256  m_online = false;
257  }
258  }
259  }
260 
261  // Recalculate switches positions
262  UpdateSwitchesPosition();
263  UpdatePowerFlowArrowsPosition();
264 }
265 
266 void Transformer::StartMove(wxPoint2DDouble position)
267 {
268  m_moveStartPt = position;
269  m_movePts = m_pointList;
270  m_movePos = m_position;
271 }
272 
273 bool Transformer::GetContextMenu(wxMenu& menu)
274 {
275  menu.Append(ID_EDIT_ELEMENT, _("Edit tranformer"));
276  GeneralMenuItens(menu);
277  return true;
278 }
279 
280 bool Transformer::ShowForm(wxWindow* parent, Element* element)
281 {
282  TransformerForm* transfForm = new TransformerForm(parent, this);
283  if(transfForm->ShowModal() == wxID_OK) {
284  transfForm->Destroy();
285  return true;
286  }
287  transfForm->Destroy();
288  return false;
289 }
290 
291 void Transformer::SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit)
292 {
293  if(nominalVoltage.size() == 1) {
294  m_electricalData.primaryNominalVoltage = nominalVoltage[0];
295  m_electricalData.primaryNominalVoltageUnit = nominalVoltageUnit[0];
296  } else if(nominalVoltage.size() == 2) {
297  m_electricalData.primaryNominalVoltage = nominalVoltage[0];
298  m_electricalData.primaryNominalVoltageUnit = nominalVoltageUnit[0];
299  m_electricalData.secondaryNominalVoltage = nominalVoltage[1];
300  m_electricalData.secondaryNominalVoltageUnit = nominalVoltageUnit[1];
301  }
302 }
303 
304 void Transformer::UpdatePowerFlowArrowsPosition()
305 {
306  std::vector<wxPoint2DDouble> edges;
307  switch(m_pfDirection) {
308  case PF_NONE: {
309  m_powerFlowArrow.clear();
310  } break;
311  case PF_BUS1_TO_BUS2: {
312  for(int i = 1; i < (int)m_pointList.size() - 1; i++) {
313  edges.push_back(m_pointList[i]);
314  }
315  } break;
316  case PF_BUS2_TO_BUS1: {
317  for(int i = (int)m_pointList.size() - 2; i > 0; i--) {
318  edges.push_back(m_pointList[i]);
319  }
320  } break;
321  default:
322  break;
323  }
324  CalculatePowerFlowPts(edges);
325 }
326 
327 void Transformer::RotateNode(Element* parent, bool clockwise)
328 {
329  double rotAngle = m_rotationAngle;
330  if(!clockwise) rotAngle = -m_rotationAngle;
331 
332  if(parent == m_parentList[0]) {
333  m_pointList[0] = parent->RotateAtPosition(m_pointList[0], rotAngle);
334  } else if(parent == m_parentList[1]) {
335  m_pointList[m_pointList.size() - 1] = parent->RotateAtPosition(m_pointList[m_pointList.size() - 1], rotAngle);
336  }
337  UpdateSwitchesPosition();
338  UpdatePowerFlowArrowsPosition();
339 }
340 
342 {
343  if(m_activeNodeID == 1 && parent == m_parentList[0]) return false;
344  if(m_activeNodeID == 2 && parent == m_parentList[1]) return false;
345 
346  if(parent && m_activeNodeID != 0) {
347  wxRect2DDouble nodeRect(0, 0, 0, 0);
348  if(m_activeNodeID == 1) {
349  nodeRect = wxRect2DDouble(m_pointList[0].m_x - 5.0 - m_borderSize, m_pointList[0].m_y - 5.0 - m_borderSize,
350  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
351  }
352  if(m_activeNodeID == 2) {
353  nodeRect = wxRect2DDouble(m_pointList[m_pointList.size() - 1].m_x - 5.0 - m_borderSize,
354  m_pointList[m_pointList.size() - 1].m_y - 5.0 - m_borderSize,
355  10 + 2.0 * m_borderSize, 10 + 2.0 * m_borderSize);
356  }
357 
358  if(parent->Intersects(nodeRect)) {
359  if(m_activeNodeID == 1) {
360  // Check if the user is trying to connect the same bus.
361  if(m_parentList[1] == parent) {
362  m_activeNodeID = 0;
363  return false;
364  }
365 
366  m_parentList[0] = parent;
367 
368  // Centralize the node on bus.
369  wxPoint2DDouble parentPt = parent->RotateAtPosition(
370  m_pointList[0], -parent->GetAngle()); // Rotate click to horizontal position.
371  parentPt.m_y = parent->GetPosition().m_y; // Centralize on bus.
372  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle());
373  m_pointList[0] = parentPt;
374 
375  UpdateSwitchesPosition();
376  UpdatePowerFlowArrowsPosition();
377  return true;
378  }
379  if(m_activeNodeID == 2) {
380  if(m_parentList[0] == parent) {
381  m_activeNodeID = 0;
382  return false;
383  }
384 
385  m_parentList[1] = parent;
386 
387  wxPoint2DDouble parentPt =
388  parent->RotateAtPosition(m_pointList[m_pointList.size() - 1], -parent->GetAngle());
389  parentPt.m_y = parent->GetPosition().m_y;
390  parentPt = parent->RotateAtPosition(parentPt, parent->GetAngle());
391  m_pointList[m_pointList.size() - 1] = parentPt;
392 
393  UpdateSwitchesPosition();
394  UpdatePowerFlowArrowsPosition();
395  return true;
396  }
397  } else {
398  if(m_activeNodeID == 1) m_parentList[0] = NULL;
399  if(m_activeNodeID == 2) m_parentList[1] = NULL;
400  }
401  }
402  return false;
403 }
404 
406 {
407  m_pfDirection = pfDirection;
408  UpdatePowerFlowArrowsPosition();
409 }
410 
412 {
413  Transformer* copy = new Transformer();
414  *copy = *this;
415  return copy;
416 }
417 
418 wxString Transformer::GetTipText() const
419 {
420  wxString tipText = m_electricalData.name;
421  wxString primVoltage = StringFromDouble(m_electricalData.primaryNominalVoltage);
422  switch(m_electricalData.primaryNominalVoltageUnit) {
423  case UNIT_V: {
424  primVoltage += _(" V");
425  } break;
426  case UNIT_kV: {
427  primVoltage += _(" kV");
428  } break;
429  default:
430  break;
431  }
432  wxString secVoltage = StringFromDouble(m_electricalData.secondaryNominalVoltage);
433  switch(m_electricalData.secondaryNominalVoltageUnit) {
434  case UNIT_V: {
435  secVoltage += _(" V");
436  } break;
437  case UNIT_kV: {
438  secVoltage += _(" kV");
439  } break;
440  default:
441  break;
442  }
443 
444  tipText += "\n" + primVoltage + " / " + secVoltage;
445 
446  if(m_online) {
447  tipText += "\n";
448  int busNumber[2];
449  busNumber[0] = static_cast<Bus*>(m_parentList[0])->GetElectricalData().number + 1;
450  busNumber[1] = static_cast<Bus*>(m_parentList[1])->GetElectricalData().number + 1;
451 
452  tipText += _("\nP") + wxString::Format("(%d-%d) = ", busNumber[0], busNumber[1]) +
453  wxString::FromDouble(m_electricalData.powerFlow[0].real(), 5) + _(" p.u.");
454  tipText += _("\nQ") + wxString::Format("(%d-%d) = ", busNumber[0], busNumber[1]) +
455  wxString::FromDouble(m_electricalData.powerFlow[0].imag(), 5) + _(" p.u.");
456  tipText += _("\nP") + wxString::Format("(%d-%d) = ", busNumber[1], busNumber[0]) +
457  wxString::FromDouble(m_electricalData.powerFlow[1].real(), 5) + _(" p.u.");
458  tipText += _("\nQ") + wxString::Format("(%d-%d) = ", busNumber[1], busNumber[0]) +
459  wxString::FromDouble(m_electricalData.powerFlow[1].imag(), 5) + _(" p.u.");
460  }
461 
462  return tipText;
463 }
464 
465 TransformerElectricalData Transformer::GetPUElectricalData(double systemBasePower)
466 {
467  TransformerElectricalData data = m_electricalData;
468  double transformerBasePower = GetValueFromUnit(data.nominalPower, data.nominalPowerUnit);
469  double baseVoltage = 0.0;
470  if(data.baseVoltage == 0) {
471  baseVoltage = GetValueFromUnit(data.primaryNominalVoltage, data.primaryNominalVoltageUnit);
472  } else {
473  baseVoltage = GetValueFromUnit(data.secondaryNominalVoltage, data.secondaryNominalVoltageUnit);
474  }
475  double systemBaseImpedance = (baseVoltage * baseVoltage) / systemBasePower;
476  double transformerBaseImpedance = (baseVoltage * baseVoltage) / transformerBasePower;
477 
478  // Resistance
479  double r = data.resistance;
480  if(data.resistanceUnit == UNIT_PU) {
481  if(data.useTransformerPower) data.resistance = (r * transformerBaseImpedance) / systemBaseImpedance;
482  } else {
483  data.resistance = r / systemBaseImpedance;
484  }
485  data.resistanceUnit = UNIT_PU;
486 
487  // Indutive reactance
488  double x = data.indReactance;
489  if(data.indReactanceUnit == UNIT_PU) {
490  if(data.useTransformerPower) data.indReactance = (x * transformerBaseImpedance) / systemBaseImpedance;
491  } else {
492  data.indReactance = x / systemBaseImpedance;
493  }
494  data.indReactanceUnit = UNIT_PU;
495 
496  // Fault
497 
498  // Zero seq. resistance
499  double r0 = data.zeroResistance;
500  if(data.useTransformerPower) data.zeroResistance = (r0 * transformerBaseImpedance) / systemBaseImpedance;
501 
502  // Zero seq. ind. reactance
503  double x0 = data.zeroIndReactance;
504  if(data.useTransformerPower) data.zeroIndReactance = (x0 * transformerBaseImpedance) / systemBaseImpedance;
505 
506  // Primary ground resistance
507  double rgp = data.primaryGrndResistance;
508  if(data.useTransformerPower) data.primaryGrndResistance = (rgp * transformerBaseImpedance) / systemBaseImpedance;
509 
510  // Primary ground ind reactance
511  double xgp = data.primaryGrndReactance;
512  if(data.useTransformerPower) data.primaryGrndReactance = (xgp * transformerBaseImpedance) / systemBaseImpedance;
513 
514  // Secondary ground resistance
515  double rgs = data.secondaryGrndResistance;
516  if(data.useTransformerPower) data.secondaryGrndResistance = (rgs * transformerBaseImpedance) / systemBaseImpedance;
517 
518  // Secondary ground ind reactance
519  double xgs = data.secondaryGrndReactance;
520  if(data.useTransformerPower) data.secondaryGrndReactance = (xgs * transformerBaseImpedance) / systemBaseImpedance;
521 
522  if(!m_online) {
523  data.powerFlow[0] = std::complex<double>(0, 0);
524  data.powerFlow[1] = std::complex<double>(0, 0);
525  data.faultCurrent[0][0] = std::complex<double>(0, 0);
526  data.faultCurrent[0][1] = std::complex<double>(0, 0);
527  data.faultCurrent[0][2] = std::complex<double>(0, 0);
528  data.faultCurrent[1][0] = std::complex<double>(0, 0);
529  data.faultCurrent[1][1] = std::complex<double>(0, 0);
530  data.faultCurrent[1][2] = std::complex<double>(0, 0);
531  }
532 
533  return data;
534 }
double GetAngle() const
Get the element angle.
Definition: Element.h:212
-
virtual Element * GetCopy()
Get a the element copy.
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- - - -
virtual void Rotate(bool clockwise=true)
Rotate the element.
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
-
virtual wxString GetTipText() const
Get the tip text.
- -
virtual wxPoint2DDouble RotateAtPosition(wxPoint2DDouble pointToRotate, double angle, bool degrees=true) const
Rotate a point as element position being the origin.
Definition: Element.cpp:107
-
virtual bool Intersects(wxRect2DDouble rect) const =0
Check if the element&#39;s rect intersects other rect.
-
virtual void MoveNode(Element *parent, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
- -
Form to edit the transformer power data.
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection)
Set the direction of the power flow.
-
virtual void SetNominalVoltage(std::vector< double > nominalVoltage, std::vector< ElectricalUnit > nominalVoltageUnit)
Set nominal voltage of the element.
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
-
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
- -
virtual void RotateNode(Element *parent, bool clockwise)
Rotate a node.
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
-
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
- -
Class to manage color of OpenGL.
Definition: Element.h:67
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
-
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Transformer.cpp:39
-
PowerFlowDirection
Direction of power flow arrows.
Definition: PowerElement.h:78
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
-
wxPoint2DDouble GetPosition() const
Get the element position.
Definition: Element.h:187
- - -
Two-winding transformer power element.
Definition: Transformer.h:78
-
const GLdouble * GetRGBA() const
Get colour in RGBA.
Definition: Element.h:101
-
Abstract class for branch power elements.
Definition: Branch.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_transformer_8h.html b/docs/doxygen/html/_transformer_8h.html index 5b3917e..67525ca 100644 --- a/docs/doxygen/html/_transformer_8h.html +++ b/docs/doxygen/html/_transformer_8h.html @@ -91,10 +91,8 @@ $(document).ready(function(){initNavTree('_transformer_8h.html','');});
Transformer.h File Reference
-
#include "Branch.h"
-
-

Go to the source code of this file.

- +
#include "Branch.h"
+
diff --git a/docs/doxygen/html/_transformer_8h_source.html b/docs/doxygen/html/_transformer_8h_source.html deleted file mode 100644 index 7a44441..0000000 --- a/docs/doxygen/html/_transformer_8h_source.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - -Project/Transformer.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

struct  TransformerElectricalData
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Transformer.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef TRANSFORMER_H
19 #define TRANSFORMER_H
20 
21 #include "Branch.h"
22 
23 class TransformerForm;
24 
25 enum TransformerConnection {
26  GWYE_GWYE = 0,
27  WYE_GWYE,
28  GWYE_WYE,
29  WYE_WYE,
30  DELTA_GWYE,
31  DELTA_WYE,
32  GWYE_DELTA,
33  WYE_DELTA,
34  DELTA_DELTA
35 };
36 
38  // General
39  wxString name = "";
40  double primaryNominalVoltage = 138.0;
41  ElectricalUnit primaryNominalVoltageUnit = UNIT_kV;
42  double secondaryNominalVoltage = 138.0;
43  ElectricalUnit secondaryNominalVoltageUnit = UNIT_kV;
44  int baseVoltage = 0;
45  double nominalPower = 100.0;
46  ElectricalUnit nominalPowerUnit = UNIT_MVA;
47  double resistance = 0.0;
48  ElectricalUnit resistanceUnit = UNIT_PU;
49  double indReactance = 1.0;
50  ElectricalUnit indReactanceUnit = UNIT_PU;
51  TransformerConnection connection = GWYE_GWYE;
52  double turnsRatio = 1.0;
53  double phaseShift = 0.0;
54  bool useTransformerPower = false;
55 
56  // Power flow (p.u.)
57  std::complex<double> current[2] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0)};
58  std::complex<double> powerFlow[2] = {std::complex<double>(0.0, 0.0), std::complex<double>(0.0, 0.0)};
59 
60  // Fault
61  double zeroResistance = 0.0;
62  double zeroIndReactance = 1.0;
63  double primaryGrndResistance = 0.0;
64  double primaryGrndReactance = 0.0;
65  double secondaryGrndResistance = 0.0;
66  double secondaryGrndReactance = 0.0;
67  // p.u. fault data
68  std::complex<double> faultCurrent[2][3];
69 };
70 
78 class Transformer : public Branch
79 {
80  public:
81  Transformer();
82  Transformer(wxString name);
83  virtual ~Transformer();
84 
85  virtual Element* GetCopy();
86  virtual bool AddParent(Element* parent, wxPoint2DDouble position);
87  virtual bool Contains(wxPoint2DDouble position) const;
88  virtual void Draw(wxPoint2DDouble translation, double scale) const;
89  virtual bool Intersects(wxRect2DDouble rect) const;
90  virtual void Rotate(bool clockwise = true);
91  virtual void Move(wxPoint2DDouble position);
92  virtual void MoveNode(Element* parent, wxPoint2DDouble position);
93  virtual void StartMove(wxPoint2DDouble position);
94  virtual bool GetContextMenu(wxMenu& menu);
95  virtual wxString GetTipText() const;
96  virtual void RotateNode(Element* parent, bool clockwise);
97  virtual bool SetNodeParent(Element* parent);
98  virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection);
99  virtual bool ShowForm(wxWindow* parent, Element* element);
100  virtual TransformerElectricalData GetElectricalData() const { return m_electricalData; }
101  virtual TransformerElectricalData GetPUElectricalData(double systemBasePower);
102  virtual void SetElectricaData(TransformerElectricalData electricalData) { m_electricalData = electricalData; }
103  virtual void SetNominalVoltage(std::vector<double> nominalVoltage, std::vector<ElectricalUnit> nominalVoltageUnit);
104 
105  protected:
106  void UpdatePowerFlowArrowsPosition();
107  TransformerElectricalData m_electricalData;
108 };
109 
110 #endif // TRANSFORMER_H
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
- -
Form to edit the transformer power data.
- - -
PowerFlowDirection
Direction of power flow arrows.
Definition: PowerElement.h:78
- -
Two-winding transformer power element.
Definition: Transformer.h:78
-
Abstract class for branch power elements.
Definition: Branch.h:31
-
-
- - - - diff --git a/docs/doxygen/html/_transformer_form_8cpp_source.html b/docs/doxygen/html/_transformer_form_8cpp_source.html deleted file mode 100644 index 0ef5881..0000000 --- a/docs/doxygen/html/_transformer_form_8cpp_source.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - -Project/TransformerForm.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
TransformerForm.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "TransformerForm.h"
19 #include "SwitchingForm.h"
20 #include "Transformer.h"
21 
22 TransformerForm::TransformerForm(wxWindow* parent, Transformer* transformer) : TransformerFormBase(parent)
23 {
24  m_choiceResistance->SetString(1, L'\u03A9');
25  m_choiceReactance->SetString(1, L'\u03A9');
26 
27  // Reset connections choice labels (to be translated)
28  m_choiceConnection->SetString(0, _("Grounded Wye - Grounded Wye"));
29  m_choiceConnection->SetString(1, _("Wye - Grounded Wye"));
30  m_choiceConnection->SetString(2, _("Grounded Wye - Wye"));
31  m_choiceConnection->SetString(3, _("Wye - Wye"));
32  m_choiceConnection->SetString(4, _("Delta - Grounded Wye"));
33  m_choiceConnection->SetString(5, _("Delta - Wye"));
34  m_choiceConnection->SetString(6, _("Grounded Wye - Delta"));
35  m_choiceConnection->SetString(7, _("Wye - Delta"));
36  m_choiceConnection->SetString(8, _("Delta - Delta"));
37 
38  SetSize(GetBestSize());
39  Layout();
40 
41  m_parent = parent;
42  m_transformer = transformer;
43 
44  TransformerElectricalData data = transformer->GetElectricalData();
45 
46  m_textCtrlName->SetValue(data.name);
47 
48  wxString primVoltStr = Transformer::StringFromDouble(data.primaryNominalVoltage);
49  switch(data.primaryNominalVoltageUnit) {
50  case UNIT_V: {
51  primVoltStr += " V";
52  } break;
53  case UNIT_kV: {
54  primVoltStr += " kV";
55  } break;
56  default:
57  break;
58  }
59  wxString secVoltStr = Transformer::StringFromDouble(data.secondaryNominalVoltage);
60  switch(data.secondaryNominalVoltageUnit) {
61  case UNIT_V: {
62  secVoltStr += " V";
63  } break;
64  case UNIT_kV: {
65  secVoltStr += " kV";
66  } break;
67  default:
68  break;
69  }
70  m_staticTextNominalVoltageValue->SetLabel(wxString::Format("%s / %s", primVoltStr, secVoltStr));
71 
72  m_choiceBaseVoltage->SetString(0, primVoltStr);
73  m_choiceBaseVoltage->SetString(1, secVoltStr);
74  m_choiceBaseVoltage->SetSelection(data.baseVoltage);
75 
76  m_textCtrlNominalPower->SetValue(Transformer::StringFromDouble(data.nominalPower));
77  switch(data.nominalPowerUnit) {
78  case UNIT_VA: {
79  m_choiceNominalPower->SetSelection(0);
80  } break;
81  case UNIT_kVA: {
82  m_choiceNominalPower->SetSelection(1);
83  } break;
84  case UNIT_MVA: {
85  m_choiceNominalPower->SetSelection(2);
86  } break;
87  default:
88  break;
89  }
90 
91  m_textCtrlResistance->SetValue(Transformer::StringFromDouble(data.resistance));
92  switch(data.resistanceUnit) {
93  case UNIT_PU: {
94  m_choiceResistance->SetSelection(0);
95  } break;
96  case UNIT_OHM: {
97  m_choiceResistance->SetSelection(1);
98  } break;
99  default:
100  break;
101  }
102 
103  m_textCtrlReactance->SetValue(Transformer::StringFromDouble(data.indReactance));
104  switch(data.indReactanceUnit) {
105  case UNIT_PU: {
106  m_choiceReactance->SetSelection(0);
107  } break;
108  case UNIT_OHM: {
109  m_choiceReactance->SetSelection(1);
110  } break;
111  default:
112  break;
113  }
114 
115  m_choiceConnection->SetSelection(data.connection);
116 
117  m_textCtrlTurnRatio->SetValue(Transformer::StringFromDouble(data.turnsRatio));
118  m_textCtrlPhaseShift->SetValue(Transformer::StringFromDouble(data.phaseShift));
119 
120  m_checkUseTransformerPower->SetValue(data.useTransformerPower);
121 
122  m_textCtrlZeroResistance->SetValue(Transformer::StringFromDouble(data.zeroResistance));
123  m_textCtrlZeroReactance->SetValue(Transformer::StringFromDouble(data.zeroIndReactance));
124  m_textCtrlPrimResistance->SetValue(Transformer::StringFromDouble(data.primaryGrndResistance));
125  m_textCtrlPrimReactance->SetValue(Transformer::StringFromDouble(data.primaryGrndReactance));
126  m_textCtrlSecResistance->SetValue(Transformer::StringFromDouble(data.secondaryGrndResistance));
127  m_textCtrlSecReactance->SetValue(Transformer::StringFromDouble(data.secondaryGrndReactance));
128 }
129 
130 TransformerForm::~TransformerForm() {}
131 void TransformerForm::OnCancelButtonClick(wxCommandEvent& event) { EndModal(wxID_CANCEL); }
132 void TransformerForm::OnOKButtonClick(wxCommandEvent& event)
133 {
134  if(ValidateData()) EndModal(wxID_OK);
135 }
136 void TransformerForm::OnStabilityButtonClick(wxCommandEvent& event)
137 {
138  if(ValidateData()) {
139  SwitchingForm swForm(m_parent, m_transformer);
140  swForm.SetTitle(_("Transfomer: Switching"));
141  swForm.ShowModal();
142  EndModal(wxID_OK);
143  }
144 }
145 
146 bool TransformerForm::ValidateData()
147 {
148  TransformerElectricalData data = m_transformer->GetElectricalData();
149 
150  data.name = m_textCtrlName->GetValue();
151  data.baseVoltage = m_choiceBaseVoltage->GetSelection();
152 
153  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlNominalPower->GetValue(), data.nominalPower,
154  _("Value entered incorrectly in the field \"Nominal power\".")))
155  return false;
156  switch(m_choiceNominalPower->GetSelection()) {
157  case 0: {
158  data.nominalPowerUnit = UNIT_VA;
159  } break;
160  case 1: {
161  data.nominalPowerUnit = UNIT_kVA;
162  } break;
163  case 2: {
164  data.nominalPowerUnit = UNIT_MVA;
165  } break;
166  }
167 
168  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlResistance->GetValue(), data.resistance,
169  _("Value entered incorrectly in the field \"Resistance\".")))
170  return false;
171  switch(m_choiceResistance->GetSelection()) {
172  case 0: {
173  data.resistanceUnit = UNIT_PU;
174  } break;
175  case 1: {
176  data.resistanceUnit = UNIT_OHM;
177  } break;
178  }
179 
180  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlReactance->GetValue(), data.indReactance,
181  _("Value entered incorrectly in the field \"Indutive reactance\".")))
182  return false;
183  switch(m_choiceReactance->GetSelection()) {
184  case 0: {
185  data.indReactanceUnit = UNIT_PU;
186  } break;
187  case 1: {
188  data.indReactanceUnit = UNIT_OHM;
189  } break;
190  }
191 
192  switch(m_choiceConnection->GetSelection()) {
193  case 0: {
194  data.connection = GWYE_GWYE;
195  } break;
196  case 1: {
197  data.connection = WYE_GWYE;
198  } break;
199  case 2: {
200  data.connection = GWYE_WYE;
201  } break;
202  case 3: {
203  data.connection = WYE_WYE;
204  } break;
205  case 4: {
206  data.connection = DELTA_GWYE;
207  } break;
208  case 5: {
209  data.connection = DELTA_WYE;
210  } break;
211  case 6: {
212  data.connection = GWYE_DELTA;
213  } break;
214  case 7: {
215  data.connection = WYE_DELTA;
216  } break;
217  case 8: {
218  data.connection = DELTA_DELTA;
219  } break;
220  }
221 
222  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlTurnRatio->GetValue(), data.turnsRatio,
223  _("Value entered incorrectly in the field \"Turns ratio\".")))
224  return false;
225 
226  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlPhaseShift->GetValue(), data.phaseShift,
227  _("Value entered incorrectly in the field \"Phase shift\".")))
228  return false;
229 
230  data.useTransformerPower = m_checkUseTransformerPower->GetValue();
231 
232  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlZeroResistance->GetValue(), data.zeroResistance,
233  _("Value entered incorrectly in the field \"Zero sequence resistance\".")))
234  return false;
235 
236  if(!m_transformer->DoubleFromString(
237  m_parent, m_textCtrlZeroReactance->GetValue(), data.zeroIndReactance,
238  _("Value entered incorrectly in the field \"Zero sequence indutive reactance\".")))
239  return false;
240 
241  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlPrimResistance->GetValue(), data.primaryGrndResistance,
242  _("Value entered incorrectly in the field \"Primary ground resistance\".")))
243  return false;
244 
245  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlPrimReactance->GetValue(), data.primaryGrndReactance,
246  _("Value entered incorrectly in the field \"Primary ground reactance\".")))
247  return false;
248 
249  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlSecResistance->GetValue(), data.secondaryGrndResistance,
250  _("Value entered incorrectly in the field \"Secondary ground resistance\".")))
251  return false;
252 
253  if(!m_transformer->DoubleFromString(m_parent, m_textCtrlSecReactance->GetValue(), data.secondaryGrndReactance,
254  _("Value entered incorrectly in the field \"Secondary ground reactance\".")))
255  return false;
256 
257  m_transformer->SetElectricaData(data);
258  return true;
259 }
- - -
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
- - - - - - -
static wxString StringFromDouble(double value, int minDecimal=1)
Convert a double value to string.
Definition: Element.cpp:320
- - - -
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_transformer_form_8h.html b/docs/doxygen/html/_transformer_form_8h.html index a6734d9..96bd375 100644 --- a/docs/doxygen/html/_transformer_form_8h.html +++ b/docs/doxygen/html/_transformer_form_8h.html @@ -90,10 +90,8 @@ $(document).ready(function(){initNavTree('_transformer_form_8h.html','');});
TransformerForm.h File Reference
-
#include "ElementForm.h"
-
-

Go to the source code of this file.

- +
#include "base/ElementFormBase.h"
+
diff --git a/docs/doxygen/html/_transformer_form_8h_source.html b/docs/doxygen/html/_transformer_form_8h_source.html deleted file mode 100644 index 081ffc9..0000000 --- a/docs/doxygen/html/_transformer_form_8h_source.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - -Project/TransformerForm.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  TransformerForm
- - - - - -
-
- - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
TransformerForm.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef TRANSFORMERFORM_H
19 #define TRANSFORMERFORM_H
20 
21 #include "ElementForm.h"
22 
23 class SwitchingForm;
24 class Transformer;
25 
34 {
35  public:
36  TransformerForm(wxWindow* parent, Transformer* transformer);
37  virtual ~TransformerForm();
38  bool ValidateData();
39 
40  protected:
41  virtual void OnCancelButtonClick(wxCommandEvent& event);
42  virtual void OnOKButtonClick(wxCommandEvent& event);
43  virtual void OnStabilityButtonClick(wxCommandEvent& event);
44 
45  wxWindow* m_parent = NULL;
46  Transformer* m_transformer = NULL;
47 };
48 #endif // TRANSFORMERFORM_H
Form to edit the switching data of power elements for electromechanical transient studies...
Definition: SwitchingForm.h:32
-
Form to edit the transformer power data.
- -
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_workspace_8cpp_source.html b/docs/doxygen/html/_workspace_8cpp_source.html deleted file mode 100644 index 31adcfd..0000000 --- a/docs/doxygen/html/_workspace_8cpp_source.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - -Project/Workspace.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Workspace.cpp
-
-
-
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "Workspace.h"
19 #include "Camera.h"
20 #include "Element.h"
21 //#include "Bus.h"
22 #include "Line.h"
23 #include "Transformer.h"
24 #include "SyncGenerator.h"
25 #include "IndMotor.h"
26 #include "SyncMotor.h"
27 #include "Load.h"
28 #include "Inductor.h"
29 #include "Capacitor.h"
30 #include "ElementDataObject.h"
31 
32 #include "Text.h"
33 
34 #include "PowerFlow.h"
35 #include "Fault.h"
36 #include "Electromechanical.h"
37 
38 #include "ElementPlotData.h"
39 #include "ChartView.h"
40 
41 #include "PropertiesData.h"
42 
43 // Workspace
44 Workspace::Workspace() : WorkspaceBase(NULL) {}
45 Workspace::Workspace(wxWindow* parent, wxString name, wxStatusBar* statusBar, wxGLContext* sharedGLContext) : WorkspaceBase(parent)
46 {
47  m_timer->Start();
48  m_name = name;
49  m_statusBar = statusBar;
50  m_glContext = new wxGLContext(m_glCanvas, sharedGLContext);
51  m_camera = new Camera();
52  m_selectionRect = wxRect2DDouble(0, 0, 0, 0);
53 
54  for(int i = 0; i < NUM_ELEMENTS; ++i) {
55  m_elementNumber[i] = 1;
56  }
57 
58  const int widths[4] = {-3, -1, 100, 100};
59  m_statusBar->SetStatusWidths(4, widths);
60 
61  m_properties = new PropertiesData();
62 }
63 
64 Workspace::~Workspace()
65 {
66  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
67  if(*it) delete *it;
68  }
69  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; ++it) {
70  if(*it) delete *it;
71  }
72  if(m_camera) delete m_camera;
73  if(m_glContext) delete m_glContext;
74  if(m_tipWindow) delete m_tipWindow;
75  if(m_properties) delete m_properties;
76 }
77 
78 void Workspace::OnPaint(wxPaintEvent& event)
79 {
80  if(!m_glCanvas->IsShown()) return;
81 
82  wxPaintDC dc(m_glCanvas);
83  m_glContext->SetCurrent(*m_glCanvas);
84  SetViewport();
85 
86  // Set GLCanvas scale and translation.
87  glScaled(m_camera->GetScale(), m_camera->GetScale(), 0.0); // Scale
88  glTranslated(m_camera->GetTranslation().m_x, m_camera->GetTranslation().m_y, 0.0); // Translation
89 
90  // Draw
91 
92  // Elements
93  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
94  Element* element = *it;
95  element->Draw(m_camera->GetTranslation(), m_camera->GetScale());
96  }
97 
98  // Texts
99  for(auto it = m_textList.begin(); it != m_textList.end(); ++it) {
100  Text* text = *it;
101  text->Draw(m_camera->GetTranslation(), m_camera->GetScale());
102  }
103 
104  // Selection rectangle
105  glLineWidth(1.0);
106  glColor4d(0.0, 0.5, 1.0, 1.0);
107  glBegin(GL_LINE_LOOP);
108  glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y);
109  glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y + m_selectionRect.m_height);
110  glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y + m_selectionRect.m_height);
111  glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y);
112  glEnd();
113  glColor4d(0.0, 0.5, 1.0, 0.3);
114  glBegin(GL_QUADS);
115  glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y);
116  glVertex2d(m_selectionRect.m_x, m_selectionRect.m_y + m_selectionRect.m_height);
117  glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y + m_selectionRect.m_height);
118  glVertex2d(m_selectionRect.m_x + m_selectionRect.m_width, m_selectionRect.m_y);
119  glEnd();
120 
121  glFlush(); // Sends all pending information directly to the GPU.
122  m_glCanvas->SwapBuffers();
123  event.Skip();
124 }
125 
126 void Workspace::SetViewport()
127 {
128  glClearColor(1.0, 1.0, 1.0, 1.0); // White background.
129  glClear(GL_COLOR_BUFFER_BIT);
130  glDisable(GL_DEPTH_TEST);
131  glDisable(GL_TEXTURE_2D);
132  glEnable(GL_COLOR_MATERIAL);
133  glEnable(GL_BLEND);
134  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
135  glEnable(GL_LINE_SMOOTH);
136 
137  double width = m_glCanvas->GetSize().x - 1;
138  double height = m_glCanvas->GetSize().y - 1;
139 
140  // Viewport fit the screen.
141  glViewport(0, 0, width, height);
142 
143  glMatrixMode(GL_PROJECTION);
144  glLoadIdentity();
145  gluOrtho2D(0.0, width, height, 0.0);
146 
147  glMatrixMode(GL_MODELVIEW);
148  glLoadIdentity();
149 }
150 
151 void Workspace::OnLeftClickDown(wxMouseEvent& event)
152 {
153  wxPoint clickPoint = event.GetPosition();
154  bool foundElement = false;
155  Element* newElement = NULL;
156  bool showNewElementForm = false;
157  bool clickOnSwitch = false;
158  if(m_mode == MODE_INSERT_TEXT || m_mode == MODE_PASTE || m_mode == MODE_DRAG_PASTE) {
159  m_mode = MODE_EDIT;
160  } else if(m_mode == MODE_INSERT || m_mode == MODE_DRAG_INSERT || m_mode == MODE_DRAG_INSERT_TEXT) {
161  // Get the last element inserted on the list.
162  newElement = *(m_elementList.end() - 1);
163  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
164  Element* element = *it;
165  // Clicked in any element.
166  if(element->Contains(m_camera->ScreenToWorld(clickPoint))) {
167  // Click at a bus.
168  if(typeid(*element) == typeid(Bus)) {
169  // Select the bus.
170  element->SetSelected();
171  foundElement = true; // Element found.
172  // Add the new element's parent. If the element being inserted returns true, back to
173  // edit mode.
174  if(newElement->AddParent(element, m_camera->ScreenToWorld(clickPoint))) {
175  ValidateElementsVoltages();
176  m_timer->Stop();
177  showNewElementForm = true;
178  m_mode = MODE_EDIT;
179  }
180  }
181  }
182  }
183  // The line element can have an indefined number of points.
184  if(!foundElement) {
185  if(typeid(*newElement) == typeid(Line)) {
186  newElement->AddPoint(m_camera->ScreenToWorld(clickPoint));
187  }
188  }
189  foundElement = true;
190  } else {
191  bool clickPickbox = false;
192  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
193  PowerElement* element = *it;
194  element->ResetPickboxes(); // Reset pickbox state.
195 
196  // Set movement initial position (not necessarily will be moved).
197  element->StartMove(m_camera->ScreenToWorld(clickPoint));
198 
199  // Click in selected element node.
200  if(element->NodeContains(m_camera->ScreenToWorld(clickPoint)) != 0 && element->IsSelected()) {
201  m_mode = MODE_MOVE_NODE;
202  m_disconnectedElement = true;
203  foundElement = true;
204  }
205 
206  // Click in an element.
207  else if(element->Contains(m_camera->ScreenToWorld(clickPoint))) {
208  if(!foundElement) {
209  // Select and show pickbox.
210  element->SetSelected();
211  element->ShowPickbox();
212  foundElement = true;
213  }
214  // If pickbox contains the click, move the pickbox
215  if(element->PickboxContains(m_camera->ScreenToWorld(clickPoint))) {
216  m_mode = MODE_MOVE_PICKBOX;
217  clickPickbox = true;
218  }
219  // If didn't found a pickbox, move the element
220  if(!clickPickbox) {
221  m_mode = MODE_MOVE_ELEMENT;
222  }
223  }
224 
225  // Click in a switch.
226  else if(element->SwitchesContains(m_camera->ScreenToWorld(clickPoint))) {
227  element->SetOnline(element->IsOnline() ? false : true);
228  clickOnSwitch = true;
229  }
230  }
231 
232  // Text element
233  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; ++it) {
234  Text* text = *it;
235 
236  text->StartMove(m_camera->ScreenToWorld(clickPoint));
237 
238  if(text->Contains(m_camera->ScreenToWorld(clickPoint))) {
239  if(!foundElement) {
240  text->SetSelected();
241  m_mode = MODE_MOVE_ELEMENT;
242  foundElement = true;
243  }
244  }
245  }
246  }
247 
248  if(!foundElement) {
249  m_mode = MODE_SELECTION_RECT;
250  m_startSelRect = m_camera->ScreenToWorld(clickPoint);
251  }
252 
253  Redraw();
254  UpdateStatusBar();
255 
256  if(showNewElementForm) {
257  if(newElement) {
258  newElement->ShowForm(this, newElement);
259  if(m_continuousCalc) RunStaticStudies();
260  }
261  }
262  if(clickOnSwitch && m_continuousCalc) RunStaticStudies();
263 
264  event.Skip();
265 }
266 
267 void Workspace::OnLeftDoubleClick(wxMouseEvent& event)
268 {
269  bool elementEdited = false;
270  bool clickOnSwitch = false;
271  bool redraw = false;
272 
273  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
274  PowerElement* element = *it;
275 
276  // Click in an element.
277  if(element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
278  bool elementIsBus = false;
279  Bus oldBus;
280  Bus* currentBus = NULL;
281  if((currentBus = dynamic_cast<Bus*>(element))) {
282  elementIsBus = true;
283  oldBus = *currentBus;
284  }
285  m_timer->Stop();
286  element->ShowForm(this, element);
287  elementEdited = true;
288  redraw = true;
289 
290  // If the edited element is a bus and was changed the rated voltage, this voltage must be
291  // propagated through the lines
292  if(elementIsBus) {
293  // The voltage was changed
294  if(oldBus.GetElectricalData().nominalVoltage != currentBus->GetElectricalData().nominalVoltage ||
295  oldBus.GetElectricalData().nominalVoltageUnit !=
296  currentBus->GetElectricalData().nominalVoltageUnit) {
297  // Check if the bus has line as child.
298  std::vector<Element*> childList = element->GetChildList();
299  for(auto itc = childList.begin(), itcEnd = childList.end(); itc != itcEnd; ++itc) {
300  Element* child = *itc;
301  if(typeid(*child) == typeid(Line)) {
302  wxMessageDialog msgDialog(this, _("Do you want to change the rated voltage of the path?"),
303  _("Warning"), wxYES_NO | wxCENTRE | wxICON_WARNING);
304  if(msgDialog.ShowModal() == wxID_YES)
305  ValidateBusesVoltages(element);
306  else {
307  auto data = currentBus->GetElectricalData();
308  data.nominalVoltage = oldBus.GetElectricalData().nominalVoltage;
309  data.nominalVoltageUnit = oldBus.GetElectricalData().nominalVoltageUnit;
310  currentBus->SetElectricalData(data);
311  }
312  break;
313  }
314  }
315  }
316  ValidateElementsVoltages();
317  }
318  }
319 
320  // Click in a switch.
321  else if(element->SwitchesContains(m_camera->ScreenToWorld(event.GetPosition()))) {
322  element->SetOnline(element->IsOnline() ? false : true);
323  clickOnSwitch = true;
324  }
325  }
326 
327  // Text element
328  for(auto it = m_textList.begin(); it != m_textList.end(); ++it) {
329  Text* text = *it;
330  if(text->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
331  text->ShowForm(this, GetElementList());
332  redraw = true;
333  }
334  }
335  if(elementEdited) {
336  UpdateTextElements();
337  if(m_continuousCalc) RunStaticStudies();
338  }
339  if(clickOnSwitch && m_continuousCalc) RunStaticStudies();
340 
341  if(redraw) Redraw();
342  m_timer->Start();
343 }
344 
345 void Workspace::OnRightClickDown(wxMouseEvent& event)
346 {
347  bool redraw = false;
348  if(m_mode == MODE_EDIT) {
349  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
350  Element* element = *it;
351  if(element->IsSelected()) {
352  // Show context menu.
353  if(element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
354  element->ShowPickbox(false);
355  wxMenu menu;
356  if(element->GetContextMenu(menu)) {
357  m_timer->Stop();
358  menu.SetClientData(element);
359  menu.Bind(wxEVT_COMMAND_MENU_SELECTED, &Workspace::OnPopupClick, this);
360  PopupMenu(&menu);
361  redraw = true;
362 
363  if(!menu.GetClientData()) break;
364  }
365  element->ResetPickboxes();
366  }
367  }
368  }
369  }
370  if(redraw) Redraw();
371  m_timer->Start();
372 }
373 
374 void Workspace::OnLeftClickUp(wxMouseEvent& event)
375 {
376  // This event (under certain conditions) deselects the elements and back to edit mode or select the elements using
377  // the selection rectangle.
378  bool foundPickbox = false;
379  bool findNewParent = false;
380  bool updateVoltages = false;
381  auto itnp = m_elementList.begin();
382 
383  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
384  Element* element = *it;
385 
386  // The user was moving a pickbox.
387  if(m_mode == MODE_MOVE_PICKBOX) {
388  // Catch only the element that have the pickbox shown.
389  if(element->IsPickboxShown()) {
390  // If the element is a bus, check if a node is outside.
391  if(typeid(*element) == typeid(Bus)) {
392  // Get all the bus children.
393  for(int i = 0; i < (int)m_elementList.size(); i++) {
394  Element* child = m_elementList[i];
395  for(int j = 0; j < (int)child->GetParentList().size(); j++) {
396  Element* parent = child->GetParentList()[j];
397  // The child have a parent that is the element.
398  if(parent == element) {
399  child->UpdateNodes();
400  m_disconnectedElement = true;
401  }
402  }
403  }
404  }
405  }
406  }
407 
408  if(m_mode == MODE_SELECTION_RECT) {
409  if(element->Intersects(m_selectionRect)) {
410  element->SetSelected();
411  } else if(!event.ControlDown()) {
412  element->SetSelected(false);
413  }
414  } else if(m_mode == MODE_MOVE_NODE) {
415  if(element->IsSelected()) {
416  for(int i = 0; i < (int)m_elementList.size(); i++) {
417  Element* parent = m_elementList[i];
418  if(typeid(*parent) == typeid(Bus)) {
419  if(element->SetNodeParent(parent)) {
420  parent->AddChild(element);
421  findNewParent = true;
422  itnp = it;
423  element->ResetNodes();
424  break;
425  }
426  }
427  }
428  // element->ResetNodes();
429  }
430  } else {
431  // Deselect
432  if(!event.ControlDown()) {
433  if(!element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
434  element->SetSelected(false);
435  }
436  }
437 
438  if(element->PickboxContains(m_camera->ScreenToWorld(event.GetPosition()))) {
439  foundPickbox = true;
440  } else {
441  element->ShowPickbox(false);
442  element->ResetPickboxes();
443  }
444  }
445  }
446 
447  // Text element
448  for(auto it = m_textList.begin(); it != m_textList.end(); it++) {
449  Text* text = *it;
450  if(m_mode == MODE_SELECTION_RECT) {
451  if(text->Intersects(m_selectionRect)) {
452  text->SetSelected();
453  } else if(!event.ControlDown()) {
454  text->SetSelected(false);
455  }
456  } else if(!event.ControlDown()) {
457  if(!text->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
458  text->SetSelected(false);
459  }
460  }
461  }
462 
463  if(findNewParent) {
464  std::rotate(itnp, itnp + 1, m_elementList.end());
465  updateVoltages = true;
466  }
467  if(!foundPickbox) {
468  SetCursor(wxCURSOR_ARROW);
469  }
470 
471  if(m_mode != MODE_INSERT) {
472  m_mode = MODE_EDIT;
473  }
474 
475  if(updateVoltages) {
476  ValidateElementsVoltages();
477  }
478 
479  if(m_continuousCalc && m_disconnectedElement) {
480  m_disconnectedElement = false;
481  RunStaticStudies();
482  }
483 
484  m_selectionRect = wxRect2DDouble(0, 0, 0, 0);
485  Redraw();
486  UpdateStatusBar();
487 }
488 
489 void Workspace::OnMouseMotion(wxMouseEvent& event)
490 {
491  bool redraw = false;
492  switch(m_mode) {
493  case MODE_INSERT: {
494  Element* newElement = *(m_elementList.end() - 1); // Get the last element in the list.
495  newElement->SetPosition(m_camera->ScreenToWorld(event.GetPosition()));
496  redraw = true;
497  } break;
498 
499  case MODE_INSERT_TEXT: {
500  Text* newText = *(m_textList.end() - 1);
501  newText->SetPosition(m_camera->ScreenToWorld(event.GetPosition()));
502  redraw = true;
503  } break;
504 
505  case MODE_DRAG:
506  case MODE_DRAG_INSERT:
507  case MODE_DRAG_INSERT_TEXT:
508  case MODE_DRAG_PASTE: {
509  m_camera->SetTranslation(event.GetPosition());
510  redraw = true;
511  } break;
512 
513  case MODE_EDIT: {
514  bool foundPickbox = false;
515  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
516  Element* element = *it;
517  if(element->IsSelected()) {
518  // Show element pickbox (when it has) if the mouse is over the selected object.
519  if(element->Contains(m_camera->ScreenToWorld(event.GetPosition()))) {
520  element->ShowPickbox();
521  redraw = true;
522 
523  // If the mouse is over a pickbox set correct mouse cursor.
524  if(element->PickboxContains(m_camera->ScreenToWorld(event.GetPosition()))) {
525  foundPickbox = true;
526  SetCursor(element->GetBestPickboxCursor());
527  } else if(!foundPickbox) {
528  SetCursor(wxCURSOR_ARROW);
529  element->ResetPickboxes();
530  }
531  } else if(!foundPickbox) {
532  if(element->IsPickboxShown()) redraw = true;
533 
534  element->ShowPickbox(false);
535  element->ResetPickboxes();
536  SetCursor(wxCURSOR_ARROW);
537  }
538  }
539  }
540  } break;
541 
542  case MODE_MOVE_NODE: {
543  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
544  Element* element = *it;
545  if(element->IsSelected()) {
546  element->MoveNode(NULL, m_camera->ScreenToWorld(event.GetPosition()));
547  redraw = true;
548  }
549  }
550  } break;
551 
552  case MODE_MOVE_PICKBOX: {
553  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
554  Element* element = *it;
555  if(element->IsSelected()) {
556  element->MovePickbox(m_camera->ScreenToWorld(event.GetPosition()));
557  redraw = true;
558  }
559  }
560  } break;
561 
562  case MODE_MOVE_ELEMENT:
563  case MODE_PASTE: {
564  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
565  Element* element = *it;
566  if(element->IsSelected()) {
567  element->Move(m_camera->ScreenToWorld(event.GetPosition()));
568  // Move child nodes
569  std::vector<Element*> childList = element->GetChildList();
570  for(auto it = childList.begin(), itEnd = childList.end(); it != itEnd; ++it) {
571  (*it)->MoveNode(element, m_camera->ScreenToWorld(event.GetPosition()));
572  }
573  redraw = true;
574  }
575  }
576  // Text element motion
577  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; it++) {
578  Text* text = *it;
579  if(text->IsSelected()) {
580  text->Move(m_camera->ScreenToWorld(event.GetPosition()));
581  redraw = true;
582  }
583  }
584  } break;
585 
586  case MODE_SELECTION_RECT: {
587  wxPoint2DDouble currentPos = m_camera->ScreenToWorld(event.GetPosition());
588  double x, y, w, h;
589  if(currentPos.m_x < m_startSelRect.m_x) {
590  x = currentPos.m_x;
591  w = m_startSelRect.m_x - currentPos.m_x;
592  } else {
593  x = m_startSelRect.m_x;
594  w = currentPos.m_x - m_startSelRect.m_x;
595  }
596  if(currentPos.m_y < m_startSelRect.m_y) {
597  y = currentPos.m_y;
598  h = m_startSelRect.m_y - currentPos.m_y;
599  } else {
600  y = m_startSelRect.m_y;
601  h = currentPos.m_y - m_startSelRect.m_y;
602  }
603 
604  m_selectionRect = wxRect2DDouble(x, y, w, h);
605  redraw = true;
606  } break;
607  }
608 
609  if(redraw) Redraw();
610  m_camera->UpdateMousePosition(event.GetPosition());
611  UpdateStatusBar();
612  m_timer->Start(); // Restart the timer.
613  event.Skip();
614 }
615 
616 void Workspace::OnMiddleDown(wxMouseEvent& event)
617 {
618  // Set to drag mode.
619  switch(m_mode) {
620  case MODE_INSERT: {
621  m_mode = MODE_DRAG_INSERT;
622  } break;
623  case MODE_INSERT_TEXT: {
624  m_mode = MODE_DRAG_INSERT_TEXT;
625  } break;
626  case MODE_PASTE: {
627  m_mode = MODE_DRAG_PASTE;
628  } break;
629  default: {
630  m_mode = MODE_DRAG;
631  } break;
632  }
633  m_camera->StartTranslation(m_camera->ScreenToWorld(event.GetPosition()));
634  UpdateStatusBar();
635  event.Skip();
636 }
637 
638 void Workspace::OnMiddleUp(wxMouseEvent& event)
639 {
640  switch(m_mode) {
641  case MODE_DRAG_INSERT: {
642  m_mode = MODE_INSERT;
643  } break;
644  case MODE_DRAG_INSERT_TEXT: {
645  m_mode = MODE_INSERT_TEXT;
646  } break;
647  case MODE_DRAG_PASTE: {
648  m_mode = MODE_PASTE;
649  } break;
650  case MODE_INSERT:
651  case MODE_INSERT_TEXT:
652  case MODE_PASTE: {
653  // Does nothing.
654  } break;
655  default: {
656  m_mode = MODE_EDIT;
657  } break;
658  }
659  UpdateStatusBar();
660  event.Skip();
661 }
662 
663 void Workspace::OnScroll(wxMouseEvent& event)
664 {
665  if(event.GetWheelRotation() > 0)
666  m_camera->SetScale(event.GetPosition(), +0.05);
667  else
668  m_camera->SetScale(event.GetPosition(), -0.05);
669 
670  UpdateStatusBar();
671  Redraw();
672 }
673 
674 void Workspace::OnKeyDown(wxKeyEvent& event)
675 {
676  bool insertingElement = false;
677  if(m_mode == MODE_INSERT || m_mode == MODE_INSERT_TEXT) insertingElement = true;
678 
679  char key = event.GetUnicodeKey();
680  if(key != WXK_NONE) {
681  switch(key) {
682  case WXK_ESCAPE: // Cancel operations.
683  {
684  if(m_mode == MODE_INSERT) {
685  m_elementList.pop_back(); // Removes the last element being inserted.
686  m_mode = MODE_EDIT;
687  Redraw();
688  } else if(m_mode == MODE_INSERT_TEXT) {
689  m_textList.pop_back();
690  m_mode = MODE_EDIT;
691  Redraw();
692  }
693  } break;
694  case WXK_DELETE: // Delete selected elements
695  {
696  DeleteSelectedElements();
697  } break;
698  case 'A': {
699  if(!insertingElement) {
700  Text* newBus = new Text(m_camera->ScreenToWorld(event.GetPosition()));
701  m_textList.push_back(newBus);
702  m_mode = MODE_INSERT_TEXT;
703  m_statusBar->SetStatusText(_("Insert Text: Click to insert, ESC to cancel."));
704  Redraw();
705  }
706  } break;
707  case 'F': {
708  if(event.GetModifiers() == wxMOD_SHIFT) {
709  Fit();
710  }
711  } break;
712  case 'R': // Rotate the selected elements.
713  {
714  RotateSelectedElements(event.GetModifiers() != wxMOD_SHIFT);
715  } break;
716  case 'B': // Insert a bus.
717  {
718  if(!insertingElement) {
719  Bus* newBus = new Bus(m_camera->ScreenToWorld(event.GetPosition()),
720  wxString::Format(_("Bus %d"), GetElementNumber(ID_BUS)));
721  IncrementElementNumber(ID_BUS);
722  m_elementList.push_back(newBus);
723  m_mode = MODE_INSERT;
724  m_statusBar->SetStatusText(_("Insert Bus: Click to insert, ESC to cancel."));
725  Redraw();
726  }
727  } break;
728  case 'L': {
729  if(!insertingElement) {
730  if(!event.ControlDown() && event.ShiftDown()) { // Insert a load.
731  Load* newLoad = new Load(wxString::Format(_("Load %d"), GetElementNumber(ID_LOAD)));
732  IncrementElementNumber(ID_LOAD);
733  m_elementList.push_back(newLoad);
734  m_mode = MODE_INSERT;
735  m_statusBar->SetStatusText(_("Insert Load: Click on a buses, ESC to cancel."));
736  } else if(!event.ControlDown() && !event.ShiftDown()) { // Insert a power line.
737  Line* newLine = new Line(wxString::Format(_("Line %d"), GetElementNumber(ID_LINE)));
738  IncrementElementNumber(ID_LINE);
739  m_elementList.push_back(newLine);
740  m_mode = MODE_INSERT;
741  m_statusBar->SetStatusText(_("Insert Line: Click on two buses, ESC to cancel."));
742  }
743  Redraw();
744  }
745  // Tests - Ctrl + Shift + L
746  if(event.ControlDown() && event.ShiftDown()) {
747  // Nothing...
748  }
749  } break;
750  case 'T': // Insert a transformer.
751  {
752  if(!insertingElement) {
753  Transformer* newTransformer =
754  new Transformer(wxString::Format(_("Transformer %d"), GetElementNumber(ID_TRANSFORMER)));
755  IncrementElementNumber(ID_TRANSFORMER);
756  m_elementList.push_back(newTransformer);
757  m_mode = MODE_INSERT;
758  m_statusBar->SetStatusText(_("Insert Transformer: Click on two buses, ESC to cancel."));
759  Redraw();
760  }
761  } break;
762  case 'G': // Insert a generator.
763  {
764  if(!insertingElement) {
765  SyncGenerator* newGenerator =
766  new SyncGenerator(wxString::Format(_("Generator %d"), GetElementNumber(ID_SYNCGENERATOR)));
767  IncrementElementNumber(ID_SYNCGENERATOR);
768  m_elementList.push_back(newGenerator);
769  m_mode = MODE_INSERT;
770  m_statusBar->SetStatusText(_("Insert Generator: Click on a buses, ESC to cancel."));
771  Redraw();
772  }
773  } break;
774  case 'I': {
775  if(!insertingElement) {
776  if(event.GetModifiers() == wxMOD_SHIFT) { // Insert an inductor.
777  Inductor* newInductor =
778  new Inductor(wxString::Format(_("Inductor %d"), GetElementNumber(ID_INDUCTOR)));
779  IncrementElementNumber(ID_INDUCTOR);
780  m_elementList.push_back(newInductor);
781  m_mode = MODE_INSERT;
782  m_statusBar->SetStatusText(_("Insert Inductor: Click on a buses, ESC to cancel."));
783  } else // Insert an induction motor.
784  {
785  IndMotor* newIndMotor =
786  new IndMotor(wxString::Format(_("Induction motor %d"), GetElementNumber(ID_INDMOTOR)));
787  IncrementElementNumber(ID_INDMOTOR);
788  m_elementList.push_back(newIndMotor);
789  m_mode = MODE_INSERT;
790  m_statusBar->SetStatusText(_("Insert Induction Motor: Click on a buses, ESC to cancel."));
791  }
792  Redraw();
793  }
794  } break;
795  case 'K': // Insert a synchronous condenser.
796  {
797  if(!insertingElement) {
798  SyncMotor* newSyncCondenser =
799  new SyncMotor(wxString::Format(_("Synchronous condenser %d"), GetElementNumber(ID_SYNCMOTOR)));
800  IncrementElementNumber(ID_SYNCMOTOR);
801  m_elementList.push_back(newSyncCondenser);
802  m_mode = MODE_INSERT;
803  m_statusBar->SetStatusText(_("Insert Synchronous Condenser: Click on a buses, ESC to cancel."));
804  Redraw();
805  }
806  } break;
807  case 'C': {
808  if(!insertingElement) {
809  if(event.GetModifiers() == wxMOD_SHIFT) { // Insert a capacitor.
810  Capacitor* newCapacitor =
811  new Capacitor(wxString::Format(_("Capacitor %d"), GetElementNumber(ID_CAPACITOR)));
812  IncrementElementNumber(ID_CAPACITOR);
813  m_elementList.push_back(newCapacitor);
814  m_mode = MODE_INSERT;
815  m_statusBar->SetStatusText(_("Insert Capacitor: Click on a buses, ESC to cancel."));
816  Redraw();
817  } else if(event.GetModifiers() == wxMOD_CONTROL) { // Copy.
818  CopySelection();
819  }
820  }
821  } break;
822  case 'V': {
823  if(!insertingElement) {
824  if(event.GetModifiers() == wxMOD_CONTROL) {
825  Paste();
826  }
827  }
828  } break;
829  default:
830  break;
831  }
832  }
833 
834  UpdateStatusBar();
835  event.Skip();
836 }
837 
838 void Workspace::UpdateStatusBar()
839 {
840  switch(m_mode) {
841  case MODE_DRAG: {
842  m_statusBar->SetStatusText(_("MODE: DRAG"), 1);
843  } break;
844 
845  case MODE_PASTE:
846  case MODE_DRAG_PASTE: {
847  m_statusBar->SetStatusText(_("MODE: PASTE"), 1);
848  }
849 
850  case MODE_INSERT:
851  case MODE_INSERT_TEXT:
852  case MODE_DRAG_INSERT:
853  case MODE_DRAG_INSERT_TEXT: {
854  m_statusBar->SetStatusText(_("MODE: INSERT"), 1);
855  } break;
856 
857  case MODE_MOVE_ELEMENT:
858  case MODE_MOVE_PICKBOX:
859  case MODE_MOVE_NODE:
860  case MODE_SELECTION_RECT:
861  case MODE_EDIT: {
862  m_statusBar->SetStatusText(wxT(""));
863  m_statusBar->SetStatusText(_("MODE: EDIT"), 1);
864  } break;
865  }
866 
867  m_statusBar->SetStatusText(wxString::Format(_("ZOOM: %d%%"), (int)(m_camera->GetScale() * 100.0)), 2);
868  m_statusBar->SetStatusText(
869  wxString::Format(wxT("X: %.1f Y: %.1f"), m_camera->GetMousePosition().m_x, m_camera->GetMousePosition().m_y),
870  3);
871 }
872 
873 void Workspace::OnPopupClick(wxCommandEvent& event)
874 {
875  wxMenu* menu = static_cast<wxMenu*>(event.GetEventObject());
876  Element* element = static_cast<Element*>(menu->GetClientData());
877  switch(event.GetId()) {
878  case ID_EDIT_ELEMENT: {
879  if(element->ShowForm(this, element)) UpdateTextElements();
880  } break;
881  case ID_LINE_ADD_NODE: {
882  Line* line = static_cast<Line*>(element);
883  line->AddNode(m_camera->GetMousePosition());
884  Redraw();
885  } break;
886  case ID_LINE_REMOVE_NODE: {
887  Line* line = static_cast<Line*>(element);
888  line->RemoveNode(m_camera->GetMousePosition());
889  Redraw();
890  } break;
891  case ID_ROTATE_CLOCK: {
892  element->Rotate();
893  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
894  Element* iElement = *it;
895  // Parent's element rotating...
896  for(int i = 0; i < (int)iElement->GetParentList().size(); i++) {
897  Element* parent = iElement->GetParentList()[i];
898  if(parent == element) {
899  iElement->RotateNode(parent);
900  }
901  }
902  }
903  Redraw();
904  } break;
905  case ID_ROTATE_COUNTERCLOCK: {
906  element->Rotate(false);
907  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
908  Element* iElement = *it;
909  // Parent's element rotating...
910  for(int i = 0; i < (int)iElement->GetParentList().size(); i++) {
911  Element* parent = iElement->GetParentList()[i];
912  if(parent == element) {
913  iElement->RotateNode(parent, false);
914  }
915  }
916  }
917  Redraw();
918  } break;
919  case ID_DELETE: {
920  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
921  Element* iElement = *it;
922 
923  if(element == iElement) {
924  // Remove child/parent.
925  std::vector<Element*> childList = element->GetChildList();
926  for(auto itc = childList.begin(), itEnd = childList.end(); itc != itEnd; ++itc) {
927  Element* child = *itc;
928  if(child) {
929  child->RemoveParent(element);
930  element->RemoveChild(child);
931  }
932  }
933  std::vector<Element*> parentList = element->GetParentList();
934  for(auto itp = parentList.begin(), itEnd = parentList.end(); itp != itEnd; ++itp) {
935  Element* parent = *itp;
936  if(parent) {
937  parent->RemoveChild(element);
938  }
939  }
940 
941  for(auto itt = m_textList.begin(); itt != m_textList.end(); ++itt) {
942  Text* text = *itt;
943  if(text->GetElement() == element) {
944  m_textList.erase(itt--);
945  if(text) delete text;
946  }
947  }
948 
949  m_elementList.erase(it);
950  if(element) delete element;
951  menu->SetClientData(NULL);
952  break;
953  }
954  }
955  } break;
956  }
957 }
958 
959 void Workspace::RotateSelectedElements(bool clockwise)
960 {
961  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
962  Element* element = *it;
963  // Parent's element rotating...
964  for(int i = 0; i < (int)element->GetParentList().size(); i++) {
965  Element* parent = element->GetParentList()[i];
966  if(parent) { // Check if parent is not null
967  if(parent->IsSelected()) {
968  element->RotateNode(parent, clockwise);
969  // Update the positions used on motion action, the element will not be necessarily
970  // moved.
971  element->StartMove(m_camera->GetMousePosition());
972  }
973  }
974  }
975  if(element->IsSelected()) {
976  element->Rotate(clockwise);
977  element->StartMove(m_camera->GetMousePosition());
978  }
979  }
980 
981  // Rotate text element
982  for(auto it = m_textList.begin(); it != m_textList.end(); it++) {
983  Text* text = *it;
984  if(text->IsSelected()) {
985  text->Rotate(clockwise);
986  text->StartMove(m_camera->GetMousePosition());
987  }
988  }
989  Redraw();
990 }
991 
992 void Workspace::DeleteSelectedElements()
993 {
994  // Don't set the end of the list at the loop's begin.
995  for(auto it = m_elementList.begin(); it != m_elementList.end(); ++it) {
996  Element* element = *it;
997 
998  if(element->IsSelected()) {
999  // Remove child/parent.
1000  std::vector<Element*> childList = element->GetChildList();
1001  for(auto itc = childList.begin(), itEnd = childList.end(); itc != itEnd; ++itc) {
1002  Element* child = *itc;
1003  if(child) {
1004  child->RemoveParent(element);
1005  element->RemoveChild(child);
1006  }
1007  }
1008  std::vector<Element*> parentList = element->GetParentList();
1009  for(auto itp = parentList.begin(), itEnd = parentList.end(); itp != itEnd; ++itp) {
1010  Element* parent = *itp;
1011  if(parent) {
1012  parent->RemoveChild(element);
1013  }
1014  }
1015 
1016  for(auto itt = m_textList.begin(); itt != m_textList.end(); ++itt) {
1017  Text* text = *itt;
1018  if(text->GetElement() == element) {
1019  m_textList.erase(itt--);
1020  if(text) delete text;
1021  }
1022  }
1023 
1024  m_elementList.erase(it--);
1025  if(element) delete element;
1026  }
1027  }
1028 
1029  for(auto it = m_textList.begin(); it != m_textList.end(); ++it) {
1030  Text* text = *it;
1031  if(text->IsSelected()) {
1032  m_textList.erase(it--);
1033  if(text) delete text;
1034  }
1035  }
1036 
1037  Redraw();
1038 }
1039 
1040 bool Workspace::GetElementsCorners(wxPoint2DDouble& leftUpCorner,
1041  wxPoint2DDouble& rightDownCorner,
1042  std::vector<Element*> elementList)
1043 {
1044  if(elementList.size() == 0) return false;
1045 
1046  elementList[0]->CalculateBoundaries(leftUpCorner, rightDownCorner);
1047 
1048  for(auto it = elementList.begin() + 1, itEnd = elementList.end(); it != itEnd; it++) {
1049  Element* element = *it;
1050  wxPoint2DDouble leftUp;
1051  wxPoint2DDouble rightDown;
1052  element->CalculateBoundaries(leftUp, rightDown);
1053  if(leftUp.m_x < leftUpCorner.m_x) leftUpCorner.m_x = leftUp.m_x;
1054  if(leftUp.m_y < leftUpCorner.m_y) leftUpCorner.m_y = leftUp.m_y;
1055  if(rightDown.m_x > rightDownCorner.m_x) rightDownCorner.m_x = rightDown.m_x;
1056  if(rightDown.m_y > rightDownCorner.m_y) rightDownCorner.m_y = rightDown.m_y;
1057  }
1058  return true;
1059 }
1060 
1061 void Workspace::Fit()
1062 {
1063  wxPoint2DDouble leftUpCorner(0, 0);
1064  wxPoint2DDouble rightDownCorner(0, 0);
1065  std::vector<Element*> elementList = GetElementList();
1066  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; ++it) {
1067  elementList.push_back(*it);
1068  }
1069 
1070  if(!GetElementsCorners(leftUpCorner, rightDownCorner, elementList)) return;
1071  wxPoint2DDouble middleCoords = (leftUpCorner + rightDownCorner) / 2.0;
1072 
1073  int width = 0.0;
1074  int height = 0.0;
1075  GetSize(&width, &height);
1076 
1077  double scaleX = double(width) / (rightDownCorner.m_x - leftUpCorner.m_x);
1078  double scaleY = double(height) / (rightDownCorner.m_y - leftUpCorner.m_y);
1079 
1080  double scale = scaleX < scaleY ? scaleX : scaleY;
1081  if(scale > m_camera->GetZoomMax()) scale = m_camera->GetZoomMax();
1082  if(scale < m_camera->GetZoomMin()) scale = m_camera->GetZoomMin();
1083 
1084  m_camera->SetScale(scale);
1085 
1086  m_camera->StartTranslation(middleCoords);
1087  m_camera->SetTranslation(wxPoint2DDouble(width / 2, height / 2));
1088  Redraw();
1089 }
1090 
1091 void Workspace::ValidateBusesVoltages(Element* initialBus)
1092 {
1093  double nominalVoltage = static_cast<Bus*>(initialBus)->GetElectricalData().nominalVoltage;
1094  ElectricalUnit nominalVoltageUnit = static_cast<Bus*>(initialBus)->GetElectricalData().nominalVoltageUnit;
1095 
1096  for(auto it = m_elementList.begin(); it != m_elementList.end(); it++) {
1097  Element* child = *it;
1098 
1099  if(typeid(*child) == typeid(Line)) {
1100  if(child->GetParentList()[0] && child->GetParentList()[1]) {
1101  BusElectricalData data1 = static_cast<Bus*>(child->GetParentList()[0])->GetElectricalData();
1102  BusElectricalData data2 = static_cast<Bus*>(child->GetParentList()[1])->GetElectricalData();
1103 
1104  if(data1.nominalVoltage != data2.nominalVoltage ||
1105  data1.nominalVoltageUnit != data2.nominalVoltageUnit) {
1106  data1.nominalVoltage = nominalVoltage;
1107  data2.nominalVoltage = nominalVoltage;
1108  data1.nominalVoltageUnit = nominalVoltageUnit;
1109  data2.nominalVoltageUnit = nominalVoltageUnit;
1110 
1111  static_cast<Bus*>(child->GetParentList()[0])->SetElectricalData(data1);
1112  static_cast<Bus*>(child->GetParentList()[1])->SetElectricalData(data2);
1113 
1114  it = m_elementList.begin(); // Restart search.
1115  }
1116  }
1117  }
1118  }
1119 
1120  // ValidateElementsVoltages();
1121 }
1122 
1123 void Workspace::ValidateElementsVoltages()
1124 {
1125  for(auto it = m_elementList.begin(); it != m_elementList.end(); it++) {
1126  PowerElement* child = *it;
1127 
1128  std::vector<double> nominalVoltage;
1129  std::vector<ElectricalUnit> nominalVoltageUnit;
1130  for(int i = 0; i < (int)child->GetParentList().size(); i++) {
1131  Bus* parent = static_cast<Bus*>(child->GetParentList()[i]);
1132  if(parent) {
1133  nominalVoltage.push_back(parent->GetElectricalData().nominalVoltage);
1134  nominalVoltageUnit.push_back(parent->GetElectricalData().nominalVoltageUnit);
1135  }
1136  }
1137  child->SetNominalVoltage(nominalVoltage, nominalVoltageUnit);
1138  }
1139 }
1140 
1141 bool Workspace::RunPowerFlow()
1142 {
1143  PowerFlow pf(GetElementList());
1144  bool result = pf.RunGaussSeidel();
1145  if(!result) {
1146  wxMessageDialog msgDialog(this, pf.GetErrorMessage(), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
1147  msgDialog.ShowModal();
1148  }
1149 
1150  UpdateTextElements();
1151  Redraw();
1152 
1153  return result;
1154 }
1155 
1156 bool Workspace::UpdateTextElements()
1157 {
1158  bool isTexturesOK = true;
1159  double basePower = m_properties->GetSimulationPropertiesData().basePower;
1160  if(m_properties->GetSimulationPropertiesData().basePowerUnit == UNIT_kVA)
1161  basePower *= 1e3;
1162  else if(m_properties->GetSimulationPropertiesData().basePowerUnit == UNIT_MVA)
1163  basePower *= 1e6;
1164  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; ++it) {
1165  Text* text = *it;
1166  text->UpdateText(basePower);
1167  if(!text->IsGLTextOK()) isTexturesOK = false;
1168  }
1169  return isTexturesOK;
1170 }
1171 
1172 void Workspace::CopySelection()
1173 {
1174  UpdateElementsID();
1175  std::vector<Element*> selectedElements;
1176  // The buses need to be numerated to associate the child's parents to the copies.
1177  int busNumber = 0;
1178  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
1179  Element* element = *it;
1180  if(typeid(*element) == typeid(Bus)) {
1181  Bus* bus = static_cast<Bus*>(element);
1182  auto data = bus->GetElectricalData();
1183  data.number = busNumber;
1184  bus->SetElectricalData(data);
1185  busNumber++;
1186  }
1187  if(element->IsSelected()) {
1188  selectedElements.push_back(element);
1189  }
1190  }
1191  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; ++it) {
1192  Text* text = *it;
1193  if(text->IsSelected()) {
1194  selectedElements.push_back(text);
1195  }
1196  }
1197  ElementDataObject* dataObject = new ElementDataObject(selectedElements);
1198  if(wxTheClipboard->Open()) {
1199  wxTheClipboard->SetData(dataObject);
1200  wxTheClipboard->Close();
1201  }
1202 }
1203 
1204 bool Workspace::Paste()
1205 {
1206  if(wxTheClipboard->Open()) {
1207  ElementDataObject dataObject;
1208 
1209  if(wxTheClipboard->IsSupported(dataObject.GetFormat())) {
1210  if(!wxTheClipboard->GetData(dataObject)) {
1211  wxMessageDialog dialog(this, _("It was not possible to paste from clipboard."), _("Error"),
1212  wxOK | wxCENTER | wxICON_ERROR, wxDefaultPosition);
1213  dialog.ShowModal();
1214  wxTheClipboard->Close();
1215  return false;
1216  }
1217  } else {
1218  wxTheClipboard->Close();
1219  return false;
1220  }
1221  wxTheClipboard->Close();
1222 
1223  UnselectAll();
1224 
1225  std::vector<Element*> pastedElements;
1226  ElementsLists* elementsLists = dataObject.GetElementsLists();
1227 
1228  // Paste buses (parents).
1229  auto parentList = elementsLists->parentList;
1230  std::vector<Bus*> pastedBusList; // To set new parents;
1231  for(auto it = parentList.begin(), itEnd = parentList.end(); it != itEnd; ++it) {
1232  Element* copy = (*it)->GetCopy();
1233  if(copy) {
1234  pastedElements.push_back(copy);
1235  pastedBusList.push_back(static_cast<Bus*>(copy));
1236  m_elementList.push_back(static_cast<PowerElement*>(copy));
1237  }
1238  }
1239 
1240  // Paste other elements.
1241  auto elementLists = elementsLists->elementList;
1242  for(auto it = elementLists.begin(), itEnd = elementLists.end(); it != itEnd; ++it) {
1243  Element* copy = (*it)->GetCopy();
1244  if(copy) {
1245  // Check if is text element
1246  if(Text* text = dynamic_cast<Text*>(copy)) {
1247  // Check if element associated with the text exists.
1248  bool elementExist = false;
1249  for(int i = 0; i < (int)m_elementList.size(); i++) {
1250  if(text->GetElement() == m_elementList[i]) {
1251  elementExist = true;
1252  break;
1253  }
1254  }
1255  if(elementExist) {
1256  pastedElements.push_back(copy);
1257  m_textList.push_back(text);
1258  }
1259  } else {
1260  // Change the parent if copied, otherwise remove it.
1261  for(int j = 0; j < (int)copy->GetParentList().size(); j++) {
1262  Bus* currentParent = static_cast<Bus*>(copy->GetParentList()[j]);
1263  if(currentParent) {
1264  int parentID = currentParent->GetID();
1265  bool parentCopied = false;
1266  for(int k = 0; k < (int)pastedBusList.size(); k++) {
1267  Bus* newParent = pastedBusList[k];
1268  if(parentID == newParent->GetID()) {
1269  parentCopied = true;
1270  copy->ReplaceParent(currentParent, newParent);
1271  break;
1272  }
1273  }
1274  if(!parentCopied) copy->RemoveParent(currentParent);
1275  }
1276  }
1277 
1278  pastedElements.push_back(copy);
1279  m_elementList.push_back(static_cast<PowerElement*>(copy));
1280  }
1281  }
1282  }
1283 
1284  // Update buses childs
1285  for(auto it = pastedBusList.begin(), itEnd = pastedBusList.end(); it != itEnd; ++it) {
1286  Bus* bus = *it;
1287  std::vector<Element*> childList = bus->GetChildList();
1288  for(auto it = childList.begin(), itEnd = childList.end(); it != itEnd; ++it) {
1289  Element* currentChild = *it;
1290  int childID = currentChild->GetID();
1291  bool childCopied = false;
1292  for(int i = 0; i < (int)pastedElements.size(); i++) {
1293  Element* newChild = pastedElements[i];
1294  if(childID == newChild->GetID()) {
1295  childCopied = true;
1296  bus->ReplaceChild(currentChild, newChild);
1297  break;
1298  }
1299  }
1300  if(!childCopied) bus->RemoveChild(currentChild);
1301  }
1302  }
1303 
1304  // Move elements (and nodes) to the mouse position.
1305  // The start position it's the center of the pasted objects.
1306  wxPoint2DDouble leftUpCorner, rightDownCorner;
1307  GetElementsCorners(leftUpCorner, rightDownCorner, pastedElements);
1308  wxPoint2DDouble startPosition = (leftUpCorner + rightDownCorner) / 2.0;
1309  for(auto it = pastedElements.begin(), itEnd = pastedElements.end(); it != itEnd; ++it) {
1310  Element* element = *it;
1311  element->StartMove(startPosition);
1312  element->Move(m_camera->GetMousePosition());
1313  for(int i = 0; i < (int)element->GetParentList().size(); i++) {
1314  Element* parent = element->GetParentList()[i];
1315  element->MoveNode(parent, m_camera->GetMousePosition());
1316  }
1317  }
1318  } else {
1319  wxMessageDialog dialog(this, _("It was not possible to paste from clipboard."), _("Error"),
1320  wxOK | wxCENTER | wxICON_ERROR, wxDefaultPosition);
1321  dialog.ShowModal();
1322  return false;
1323  }
1324 
1325  UpdateElementsID();
1326  m_mode = MODE_PASTE;
1327  m_statusBar->SetStatusText(_("Click to paste."));
1328  UpdateStatusBar();
1329  Redraw();
1330  return true;
1331 }
1332 
1333 void Workspace::UnselectAll()
1334 {
1335  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; it++) {
1336  Element* element = *it;
1337  element->SetSelected(false);
1338  }
1339  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; it++) {
1340  Text* text = *it;
1341  text->SetSelected(false);
1342  }
1343 }
1344 
1345 void Workspace::UpdateElementsID()
1346 {
1347  int id = 0;
1348  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
1349  Element* element = *it;
1350  element->SetID(id);
1351  id++;
1352  }
1353  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; ++it) {
1354  Text* text = *it;
1355  text->SetID(id);
1356  id++;
1357  }
1358 }
1359 void Workspace::OnTimer(wxTimerEvent& event)
1360 {
1361  if(m_tipWindow) {
1362  m_tipWindow->Close();
1363  m_tipWindow = NULL;
1364  }
1365  if(m_mode == MODE_EDIT) {
1366  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
1367  Element* element = *it;
1368  if(element->Contains(m_camera->GetMousePosition())) {
1369  wxString tipText = element->GetTipText();
1370  if(!tipText.IsEmpty()) {
1371  m_tipWindow = new wxTipWindow(this, tipText, 10000, &m_tipWindow);
1372  // Creates a very tiny bounding rect to remove the tip on any mouse movement.
1373  m_tipWindow->SetBoundingRect(wxRect(wxGetMousePosition(), wxSize(1, 1)));
1374  break;
1375  }
1376  }
1377  }
1378  }
1379 
1380  m_timer->Stop();
1381 }
1382 
1383 void Workspace::SetTextList(std::vector<Text*> textList)
1384 {
1385  m_textList.clear();
1386  for(auto it = textList.begin(), itEnd = textList.end(); it != itEnd; ++it) m_textList.push_back(*it);
1387 
1388  UpdateTextElements();
1389 }
1390 
1391 void Workspace::SetElementList(std::vector<Element*> elementList)
1392 {
1393  m_elementList.clear();
1394  for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it)
1395  m_elementList.push_back(static_cast<PowerElement*>(*it));
1396 }
1397 
1398 void Workspace::OnIdle(wxIdleEvent& event)
1399 {
1400  // The OpenGL element (m_glCanvas) must be completely initialized (showed) to draw properly the textures.
1401  // TODO(?): Find other solution to text displayed wrong on opened file.
1402  if(m_justOpened) {
1403  if(UpdateTextElements()) m_justOpened = false;
1404  Redraw();
1405  }
1406 }
1407 
1408 std::vector<Element*> Workspace::GetAllElements() const
1409 {
1410  std::vector<Element*> allElements;
1411 
1412  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) allElements.push_back(*it);
1413  for(auto it = m_textList.begin(), itEnd = m_textList.end(); it != itEnd; ++it) allElements.push_back(*it);
1414 
1415  return allElements;
1416 }
1417 
1418 bool Workspace::RunFault()
1419 {
1420  Fault fault(GetElementList());
1421  bool result = fault.RunFaultCalculation(100e6);
1422  if(!result) {
1423  wxMessageDialog msgDialog(this, fault.GetErrorMessage(), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
1424  msgDialog.ShowModal();
1425  }
1426 
1427  UpdateTextElements();
1428  Redraw();
1429 
1430  return result;
1431 }
1432 
1433 std::vector<Element*> Workspace::GetElementList() const
1434 {
1435  std::vector<Element*> elementList;
1436  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) elementList.push_back(*it);
1437  return elementList;
1438 }
1439 
1440 bool Workspace::RunSCPower()
1441 {
1442  Fault fault(GetElementList());
1443  bool result = fault.RunSCPowerCalcutation(100e6);
1444  if(!result) {
1445  wxMessageDialog msgDialog(this, fault.GetErrorMessage(), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
1446  msgDialog.ShowModal();
1447  }
1448 
1449  UpdateTextElements();
1450  Redraw();
1451 
1452  return result;
1453 }
1454 
1455 bool Workspace::RunStability()
1456 {
1457  // Run power flow before stability.
1458  RunPowerFlow();
1459 
1460  Electromechanical stability(this, GetElementList(), m_properties->GetSimulationPropertiesData());
1461  bool result = stability.RunStabilityCalculation();
1462  if(!result) {
1463  wxMessageDialog msgDialog(this, stability.GetErrorMessage(), _("Error"), wxOK | wxCENTRE | wxICON_ERROR);
1464  msgDialog.ShowModal();
1465  }
1466  m_stabilityTimeVector.clear();
1467  m_stabilityTimeVector = stability.GetTimeVector();
1468 
1469  // Run power flow after stability.
1470  RunPowerFlow();
1471 
1472  wxMessageDialog msgDialog(this, _("Do you wish to open the stability graphics?"), _("Question"),
1473  wxYES_NO | wxCENTRE | wxICON_QUESTION);
1474  if(msgDialog.ShowModal() == wxID_YES) {
1475  std::vector<ElementPlotData> plotDataList;
1476  for(auto it = m_elementList.begin(), itEnd = m_elementList.end(); it != itEnd; ++it) {
1477  PowerElement* element = *it;
1478  ElementPlotData plotData;
1479  if(element->GetPlotData(plotData)) plotDataList.push_back(plotData);
1480  }
1481 
1482  ChartView* cView = new ChartView(this, plotDataList, m_stabilityTimeVector);
1483  cView->Show();
1484  }
1485 
1486  return result;
1487 }
1488 void Workspace::OnMiddleDoubleClick(wxMouseEvent& event)
1489 {
1490  Fit();
1491  event.Skip();
1492 }
1493 
1494 bool Workspace::RunStaticStudies()
1495 {
1496  bool pfStatus, faultStatus, scStatus;
1497  pfStatus = faultStatus = scStatus = false;
1498 
1499  pfStatus = RunPowerFlow();
1500 
1501  if(m_properties->GetSimulationPropertiesData().faultAfterPowerFlow) {
1502  if(pfStatus) faultStatus = RunFault();
1503  } else {
1504  faultStatus = true;
1505  }
1506 
1507  if(m_properties->GetSimulationPropertiesData().scPowerAfterPowerFlow) {
1508  if(pfStatus) scStatus = RunSCPower();
1509  } else {
1510  scStatus = true;
1511  }
1512 
1513  if(pfStatus && faultStatus && scStatus) return true;
1514 
1515  return false;
1516 }
virtual bool Contains(wxPoint2DDouble position) const
Checks if the element contains a position.
Definition: Text.cpp:43
-
Element that shows power element informations in workspace.
Definition: Text.h:75
-
void ShowPickbox(bool showPickbox=true)
Set if the pickbox is shown.
Definition: Element.h:161
-
General and simulation data manager.
-
virtual void Move(wxPoint2DDouble position)
Move the element other position.
Definition: Element.cpp:123
-
virtual void AddPoint(wxPoint2DDouble point)
Add point to the list of points that connect the element to the bus.
Definition: Element.h:318
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
- -
void SetSelected(bool selected=true)
Set element selection.
Definition: Element.h:146
-
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Text.cpp:114
- -
virtual std::vector< Element * > GetParentList() const
Get the parent list.
Definition: Element.h:506
-
Calculate the power flow.
Definition: PowerFlow.h:33
- - -
virtual std::vector< Element * > GetChildList() const
Get the Child list.
Definition: Element.h:511
-
virtual void ResetPickboxes()
Remove the pickboxes.
Definition: Element.h:393
- -
virtual bool NodeContains(wxPoint2DDouble position)
Check if a node contains a point. If contains, set the attributes related to node movement...
Definition: Element.h:343
-
bool SetOnline(bool online=true)
Set if the element is online or offline.
Definition: Element.cpp:235
-
virtual bool PickboxContains(wxPoint2DDouble position)
Check if a pickbox contains a point. If contains the attributes related to pickbox movement will be c...
Definition: Element.h:379
-
virtual void UpdateNodes()
Update the nodes according to the parents. If a parent is removed, use this method.
Definition: Element.h:347
-
virtual void SetNominalVoltage(std::vector< double > nominalVoltage, std::vector< ElectricalUnit > nominalVoltageUnit)
Set nominal voltage of the element.
- - - -
virtual void RemoveChild(Element *child)
Remove a child from the list.
Definition: Element.cpp:354
-
Synchronous generator power element.
-
virtual bool Intersects(wxRect2DDouble rect) const
Check if the element&#39;s rect intersects other rect.
Definition: Text.cpp:82
- -
virtual bool Intersects(wxRect2DDouble rect) const =0
Check if the element&#39;s rect intersects other rect.
-
virtual void MoveNode(Element *parent, wxPoint2DDouble position)
Move a node. StartMove(wxPoint2DDouble position) before start moving.
Definition: Element.h:337
-
Class responsible for the correct visualization of the elements on screen.
Definition: Camera.h:30
-
ElectricalUnit
Electrical units.
Definition: PowerElement.h:28
-
virtual void CalculateBoundaries(wxPoint2DDouble &leftUp, wxPoint2DDouble &rightBottom) const
Calculate the element boundaries.
Definition: Element.cpp:263
- -
virtual bool AddParent(Element *parent, wxPoint2DDouble position)
Add a parent to the element. This method must be used on power elements that connect to a bus...
Definition: Element.h:240
- - - -
virtual void ReplaceChild(Element *oldChild, Element *newChild)
Replace a child from the list.
Definition: Element.cpp:362
- -
Node for power elements. All others power elements are connected through this.
Definition: Bus.h:69
-
virtual void Draw(wxPoint2DDouble translation, double scale) const
Draw the element.
Definition: Element.h:302
-
virtual bool GetPlotData(ElementPlotData &plotData)
Fill the plot data.
Definition: PowerElement.h:198
-
bool IsPickboxShown() const
Checks if the pickbox is shown.
Definition: Element.h:222
-
bool IsOnline() const
Checks if the element is online or offline.
Definition: Element.h:227
- - - - - -
virtual wxString GetTipText() const
Get the tip text.
Definition: Element.h:296
-
Class to store the elements in the clipboard.
-
void SetPosition(const wxPoint2DDouble position)
Set the element position and update the rectangle.
Definition: Element.cpp:25
- -
virtual void Rotate(bool clockwise=true)
Rotate the element.
Definition: Element.h:307
- - -
virtual void AddChild(Element *child)
Add a child to the child list.
Definition: Element.cpp:353
-
Power line element.
Definition: Line.h:59
-
Calculates the electromechanical transient based on disturbances (e.g. system fault).
-
Loas shunt power element.
Definition: Load.h:73
-
virtual bool GetContextMenu(wxMenu &menu)
Get the element contex menu.
Definition: Element.h:313
-
This class is responsible to manage the charts generated in the transient electromechanical studies...
Definition: ChartView.h:40
-
virtual bool ShowForm(wxWindow *parent, Element *element)
Show element data form.
Definition: Element.h:534
-
virtual void MovePickbox(wxPoint2DDouble position)
Move the pickbox.
Definition: Element.h:384
- - - - -
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
- -
virtual wxCursor GetBestPickboxCursor() const
Get the best cursor to shown to the user when the mouse is above a pickbox.
Definition: Element.h:389
-
Calculate the fault of the system and update the elements data.
Definition: Fault.h:30
-
Induction motor power element.
Definition: IndMotor.h:40
-
bool IsSelected() const
Checks if the element is selected.
Definition: Element.h:202
-
virtual void RotateNode(Element *parent, bool clockwise=true)
Rotate a node.
Definition: Element.h:372
- -
virtual void SetID(int id)
Set the element ID.
Definition: Element.h:267
-
virtual bool SetNodeParent(Element *parent)
Set a perent to the node. If all conditions are met, a new parent are added to the element and the po...
Definition: Element.h:354
-
virtual bool SwitchesContains(wxPoint2DDouble position) const
Check if switch contains position.
- -
virtual int GetID() const
Get the element ID.
Definition: Element.h:272
-
virtual void ReplaceParent(Element *oldParent, Element *newParent)
Replace a parent.
Definition: Element.cpp:346
-
virtual void RemoveParent(Element *parent)
Remove a parent.
Definition: Element.h:359
-
Shunt capactior power element.
Definition: Capacitor.h:38
-
virtual bool Contains(wxPoint2DDouble position) const =0
Checks if the element contains a position.
-
virtual void StartMove(wxPoint2DDouble position)
Update the element attributes related to the movement.
Definition: Element.cpp:117
-
Abstract class of power elements.
Definition: PowerElement.h:117
-
Inductor shunt power element.
Definition: Inductor.h:38
-
virtual void ResetNodes()
Remove the active nodes.
Definition: Element.h:397
- -
virtual Element * GetCopy()
Get a the element copy.
Definition: Element.h:262
- -
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_workspace_8h.html b/docs/doxygen/html/_workspace_8h.html index 7d16e44..07a1483 100644 --- a/docs/doxygen/html/_workspace_8h.html +++ b/docs/doxygen/html/_workspace_8h.html @@ -98,12 +98,10 @@ $(document).ready(function(){initNavTree('_workspace_8h.html','');}); #include <wx/statusbr.h>
#include <wx/clipbrd.h>
#include <wx/tipwin.h>
-#include "WorkspaceBase.h"
-#include "Bus.h"
-#include "ControlEditor.h"
- -

Go to the source code of this file.

- +#include "base/WorkspaceBase.h"
+#include "Bus.h"
+#include "ControlEditor.h"
+
diff --git a/docs/doxygen/html/_workspace_8h_source.html b/docs/doxygen/html/_workspace_8h_source.html deleted file mode 100644 index d2ab715..0000000 --- a/docs/doxygen/html/_workspace_8h_source.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - -Project/Workspace.h Source File - - - - - - - - - - - - - - - -
-
-

Classes

class  Workspace
- - - - - -
- - - - - - - - - -
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
Workspace.h
-
-
-Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef WORKSPACE_H
19 #define WORKSPACE_H
20 
21 #include <GL/gl.h>
22 #include <GL/glu.h>
23 #include <wx/dcclient.h>
24 #include <wx/msgdlg.h>
25 #include <wx/statusbr.h>
26 #include <wx/clipbrd.h>
27 #include <wx/tipwin.h>
28 
29 #include "WorkspaceBase.h"
30 #include "Bus.h"
31 
32 #include "ControlEditor.h"
33 
34 class Camera;
35 class Element;
36 // class Bus;
37 class Line;
38 class Transformer;
39 class SyncGenerator;
40 class IndMotor;
41 class SyncMotor;
42 class Load;
43 class Inductor;
44 class Capacitor;
45 class ElementDataObject;
46 
47 class Text;
48 
49 class PowerFlow;
50 class Fault;
51 class Electromechanical;
52 
53 class ElementPlotData;
54 class ChartView;
55 
56 class PropertiesData;
57 
58 enum ElementID {
59  ID_BUS = 0,
60  ID_LINE,
61  ID_TRANSFORMER,
62  ID_SYNCGENERATOR,
63  ID_INDMOTOR,
64  ID_SYNCMOTOR,
65  ID_LOAD,
66  ID_CAPACITOR,
67  ID_INDUCTOR,
68  ID_TEXT,
69 
70  NUM_ELEMENTS
71 };
72 
81 class Workspace : public WorkspaceBase
82 {
83  public:
84  enum WorkspaceMode {
85  MODE_EDIT = 0,
86  MODE_MOVE_ELEMENT,
87  MODE_MOVE_PICKBOX,
88  MODE_MOVE_NODE,
89  MODE_DRAG,
90  MODE_DRAG_INSERT,
91  MODE_DRAG_INSERT_TEXT,
92  MODE_INSERT,
93  MODE_INSERT_TEXT,
94  MODE_SELECTION_RECT,
95  MODE_PASTE,
96  MODE_DRAG_PASTE
97  };
98 
99  Workspace();
100  Workspace(wxWindow* parent, wxString name = wxEmptyString, wxStatusBar* statusBar = NULL, wxGLContext* sharedGLContext = NULL);
101  ~Workspace();
102 
103  wxString GetName() const { return m_name; }
104  std::vector<Element*> GetElementList() const;
105  std::vector<Text*> GetTextList() const { return m_textList; }
106  std::vector<Element*> GetAllElements() const;
107  WorkspaceMode GetWorkspaceMode() const { return m_mode; }
108  Camera* GetCamera() const { return m_camera; }
109  void CopySelection();
110  bool Paste();
111 
112  wxFileName GetSavedPath() const { return m_savedPath; }
113  void SetName(wxString name) { m_name = name; }
114  void SetElementList(std::vector<Element*> elementList);
115  void SetTextList(std::vector<Text*> textList);
116  void SetStatusBarText(wxString text) { m_statusBar->SetStatusText(text); }
117  void SetWorkspaceMode(WorkspaceMode mode) { m_mode = mode; }
118  void SetSavedPath(wxFileName savedPath) { m_savedPath = savedPath; }
119  void SetJustOpened(bool justOpened) { m_justOpened = justOpened; }
120  void Redraw() { m_glCanvas->Refresh(); }
121  wxGLContext* GetOpenGLContext() { return m_glContext; }
122  void RotateSelectedElements(bool clockwise = true);
123  void DeleteSelectedElements();
124  bool GetElementsCorners(wxPoint2DDouble& leftUpCorner,
125  wxPoint2DDouble& rightDownCorner,
126  std::vector<Element*> elementList);
127  void Fit();
128  void UnselectAll();
129 
130  void ValidateBusesVoltages(Element* initialBus);
131  void ValidateElementsVoltages();
132 
133  void UpdateElementsID();
134  bool UpdateTextElements();
135 
136  int GetElementNumber(ElementID elementID) { return m_elementNumber[elementID]; }
137  void IncrementElementNumber(ElementID elementID) { m_elementNumber[elementID]++; }
138  PropertiesData* GetProperties() const { return m_properties; }
139  std::vector<double> GetStabilityTimeVector() const { return m_stabilityTimeVector; }
140  bool IsContinuousCalculationActive() const { return m_continuousCalc; }
141  void SetContinuousCalculationActive(bool value = true) { m_continuousCalc = value; }
142  bool RunPowerFlow();
143  bool RunFault();
144  bool RunSCPower();
145  bool RunStaticStudies();
146  bool RunStability();
147 
148  protected:
149  virtual void OnMiddleDoubleClick(wxMouseEvent& event);
150  virtual void OnIdle(wxIdleEvent& event);
151  virtual void OnTimer(wxTimerEvent& event);
152  virtual void OnLeftDoubleClick(wxMouseEvent& event);
153  virtual void OnRightClickDown(wxMouseEvent& event);
154  virtual void OnLeftClickUp(wxMouseEvent& event);
155  virtual void OnScroll(wxMouseEvent& event);
156  virtual void OnMiddleDown(wxMouseEvent& event);
157  virtual void OnMiddleUp(wxMouseEvent& event);
158  virtual void OnMouseMotion(wxMouseEvent& event);
159  virtual void OnKeyDown(wxKeyEvent& event);
160  virtual void OnLeftClickDown(wxMouseEvent& event);
161  virtual void OnPaint(wxPaintEvent& event);
162  virtual void OnPopupClick(wxCommandEvent& event);
163 
164  void SetViewport();
165  void UpdateStatusBar();
166 
167  wxGLContext* m_glContext = NULL;
168  wxStatusBar* m_statusBar = NULL;
169  Camera* m_camera = NULL;
170  wxTipWindow* m_tipWindow = NULL;
171  wxString m_name;
172 
173  WorkspaceMode m_mode = MODE_EDIT;
174 
175  std::vector<PowerElement*> m_elementList;
176  int m_elementNumber[NUM_ELEMENTS];
177 
178  std::vector<Text*> m_textList;
179 
180  wxFileName m_savedPath;
181 
182  wxRect2DDouble m_selectionRect;
183  wxPoint2DDouble m_startSelRect;
184 
185  PropertiesData* m_properties = NULL;
186 
187  std::vector<double> m_stabilityTimeVector;
188 
189  bool m_continuousCalc = false;
190  bool m_disconnectedElement = false;
191  bool m_justOpened = false;
192 };
193 
194 #endif // WORKSPACE_H
Element that shows power element informations in workspace.
Definition: Text.h:75
-
General and simulation data manager.
-
Base class of all elements of the program. This class is responsible for manage graphical and his dat...
Definition: Element.h:113
-
Calculate the power flow.
Definition: PowerFlow.h:33
-
Synchronous generator power element.
-
Class responsible for the correct visualization of the elements on screen.
Definition: Camera.h:30
- - - - -
Class to store the elements in the clipboard.
-
Power line element.
Definition: Line.h:59
-
Calculates the electromechanical transient based on disturbances (e.g. system fault).
-
Loas shunt power element.
Definition: Load.h:73
-
This class is responsible to manage the charts generated in the transient electromechanical studies...
Definition: ChartView.h:40
-
Synchronous motor (synchronous compensator) power element.
Definition: SyncMotor.h:134
-
Calculate the fault of the system and update the elements data.
Definition: Fault.h:30
-
Induction motor power element.
Definition: IndMotor.h:40
-
Shunt capactior power element.
Definition: Capacitor.h:38
-
Inductor shunt power element.
Definition: Inductor.h:38
-
This class manages the graphical and power elements. It is responsible for handling the user&#39;s intera...
Definition: Workspace.h:81
-
Two-winding transformer power element.
Definition: Transformer.h:78
-
-
- - - - diff --git a/docs/doxygen/html/_workspace_base_8cpp_source.html b/docs/doxygen/html/_workspace_base_8cpp_source.html deleted file mode 100644 index eeda509..0000000 --- a/docs/doxygen/html/_workspace_base_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/WorkspaceBase.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
WorkspaceBase.cpp
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: Workspace.wxcp
4 // Do not modify this file by hand!
6 
7 #include "WorkspaceBase.h"
8 
9 
10 // Declare the bitmap loading function
11 extern void wxC52C4InitBitmapResources();
12 
13 static bool bBitmapLoaded = false;
14 
15 
16 WorkspaceBase::WorkspaceBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
17  : wxPanel(parent, id, pos, size, style)
18 {
19  if ( !bBitmapLoaded ) {
20  // We need to initialise the default bitmap handler
21  wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
22  wxC52C4InitBitmapResources();
23  bBitmapLoaded = true;
24  }
25 
26  wxBoxSizer* boxSizer_lvl_1_1 = new wxBoxSizer(wxVERTICAL);
27  this->SetSizer(boxSizer_lvl_1_1);
28 
29  int *m_glCanvasAttr = new int[ 5 ];
30  m_glCanvasAttr[0] = WX_GL_SAMPLE_BUFFERS;
31  m_glCanvasAttr[1] = 1;
32  m_glCanvasAttr[2] = WX_GL_SAMPLES;
33  m_glCanvasAttr[3] = 4;
34  m_glCanvasAttr[4] = 0;
35  m_glCanvas = new wxGLCanvas(this, wxID_ANY, m_glCanvasAttr, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1,-1)), 0);
36  wxDELETEA( m_glCanvasAttr );
37 
38  boxSizer_lvl_1_1->Add(m_glCanvas, 1, wxEXPAND, WXC_FROM_DIP(5));
39 
40  m_timer = new wxTimer;
41  m_timer->Start(1500, false);
42 
43  SetName(wxT("WorkspaceBase"));
44  SetSize(500,300);
45  if (GetSizer()) {
46  GetSizer()->Fit(this);
47  }
48  // Connect events
49  m_glCanvas->Connect(wxEVT_PAINT, wxPaintEventHandler(WorkspaceBase::OnPaint), NULL, this);
50  m_glCanvas->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(WorkspaceBase::OnLeftClickDown), NULL, this);
51  m_glCanvas->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(WorkspaceBase::OnKeyDown), NULL, this);
52  m_glCanvas->Connect(wxEVT_MOTION, wxMouseEventHandler(WorkspaceBase::OnMouseMotion), NULL, this);
53  m_glCanvas->Connect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(WorkspaceBase::OnMiddleDown), NULL, this);
54  m_glCanvas->Connect(wxEVT_MIDDLE_UP, wxMouseEventHandler(WorkspaceBase::OnMiddleUp), NULL, this);
55  m_glCanvas->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(WorkspaceBase::OnLeftClickUp), NULL, this);
56  m_glCanvas->Connect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(WorkspaceBase::OnScroll), NULL, this);
57  m_glCanvas->Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(WorkspaceBase::OnRightClickDown), NULL, this);
58  m_glCanvas->Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(WorkspaceBase::OnLeftDoubleClick), NULL, this);
59  m_glCanvas->Connect(wxEVT_IDLE, wxIdleEventHandler(WorkspaceBase::OnIdle), NULL, this);
60  m_glCanvas->Connect(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(WorkspaceBase::OnMiddleDoubleClick), NULL, this);
61  m_timer->Connect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnTimer), NULL, this);
62 
63 }
64 
65 WorkspaceBase::~WorkspaceBase()
66 {
67  m_glCanvas->Disconnect(wxEVT_PAINT, wxPaintEventHandler(WorkspaceBase::OnPaint), NULL, this);
68  m_glCanvas->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(WorkspaceBase::OnLeftClickDown), NULL, this);
69  m_glCanvas->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(WorkspaceBase::OnKeyDown), NULL, this);
70  m_glCanvas->Disconnect(wxEVT_MOTION, wxMouseEventHandler(WorkspaceBase::OnMouseMotion), NULL, this);
71  m_glCanvas->Disconnect(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(WorkspaceBase::OnMiddleDown), NULL, this);
72  m_glCanvas->Disconnect(wxEVT_MIDDLE_UP, wxMouseEventHandler(WorkspaceBase::OnMiddleUp), NULL, this);
73  m_glCanvas->Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(WorkspaceBase::OnLeftClickUp), NULL, this);
74  m_glCanvas->Disconnect(wxEVT_MOUSEWHEEL, wxMouseEventHandler(WorkspaceBase::OnScroll), NULL, this);
75  m_glCanvas->Disconnect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(WorkspaceBase::OnRightClickDown), NULL, this);
76  m_glCanvas->Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(WorkspaceBase::OnLeftDoubleClick), NULL, this);
77  m_glCanvas->Disconnect(wxEVT_IDLE, wxIdleEventHandler(WorkspaceBase::OnIdle), NULL, this);
78  m_glCanvas->Disconnect(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(WorkspaceBase::OnMiddleDoubleClick), NULL, this);
79  m_timer->Disconnect(wxEVT_TIMER, wxTimerEventHandler(WorkspaceBase::OnTimer), NULL, this);
80 
81  m_timer->Stop();
82  wxDELETE( m_timer );
83 
84 }
-
- - - - diff --git a/docs/doxygen/html/_workspace_base_8h_source.html b/docs/doxygen/html/_workspace_base_8h_source.html deleted file mode 100644 index 427bf4e..0000000 --- a/docs/doxygen/html/_workspace_base_8h_source.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - -Project/WorkspaceBase.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
WorkspaceBase.h
-
-
-
1 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: Workspace.wxcp
4 // Do not modify this file by hand!
6 
7 #ifndef _PSP_PROJECT_WORKSPACE_BASE_CLASSES_H
8 #define _PSP_PROJECT_WORKSPACE_BASE_CLASSES_H
9 
10 #include <wx/settings.h>
11 #include <wx/xrc/xmlres.h>
12 #include <wx/xrc/xh_bmp.h>
13 #include <wx/panel.h>
14 #include <wx/artprov.h>
15 #include <wx/sizer.h>
16 #include <wx/glcanvas.h>
17 #include <wx/timer.h>
18 #if wxVERSION_NUMBER >= 2900
19 #include <wx/persist.h>
20 #include <wx/persist/toplevel.h>
21 #include <wx/persist/bookctrl.h>
22 #include <wx/persist/treebook.h>
23 #endif
24 
25 #ifdef WXC_FROM_DIP
26 #undef WXC_FROM_DIP
27 #endif
28 #if wxVERSION_NUMBER >= 3100
29 #define WXC_FROM_DIP(x) wxWindow::FromDIP(x, NULL)
30 #else
31 #define WXC_FROM_DIP(x) x
32 #endif
33 
34 
35 class WorkspaceBase : public wxPanel
36 {
37 protected:
38  wxGLCanvas* m_glCanvas;
39  wxTimer* m_timer;
40 
41 protected:
42  virtual void OnPaint(wxPaintEvent& event) { event.Skip(); }
43  virtual void OnLeftClickDown(wxMouseEvent& event) { event.Skip(); }
44  virtual void OnKeyDown(wxKeyEvent& event) { event.Skip(); }
45  virtual void OnMouseMotion(wxMouseEvent& event) { event.Skip(); }
46  virtual void OnMiddleDown(wxMouseEvent& event) { event.Skip(); }
47  virtual void OnMiddleUp(wxMouseEvent& event) { event.Skip(); }
48  virtual void OnLeftClickUp(wxMouseEvent& event) { event.Skip(); }
49  virtual void OnScroll(wxMouseEvent& event) { event.Skip(); }
50  virtual void OnRightClickDown(wxMouseEvent& event) { event.Skip(); }
51  virtual void OnLeftDoubleClick(wxMouseEvent& event) { event.Skip(); }
52  virtual void OnIdle(wxIdleEvent& event) { event.Skip(); }
53  virtual void OnMiddleDoubleClick(wxMouseEvent& event) { event.Skip(); }
54  virtual void OnTimer(wxTimerEvent& event) { event.Skip(); }
55 
56 public:
57  wxGLCanvas* GetGlCanvas() { return m_glCanvas; }
58  wxTimer* GetTimer() { return m_timer; }
59  WorkspaceBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(500,300), long style = wxTAB_TRAVERSAL);
60  virtual ~WorkspaceBase();
61 };
62 
63 #endif
-
-
- - - - diff --git a/docs/doxygen/html/_workspace_bitmaps_8cpp_source.html b/docs/doxygen/html/_workspace_bitmaps_8cpp_source.html deleted file mode 100644 index 5ff46f8..0000000 --- a/docs/doxygen/html/_workspace_bitmaps_8cpp_source.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - -Project/WorkspaceBitmaps.cpp Source File - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
WorkspaceBitmaps.cpp
-
-
-
1 //
2 // This file was automatically generated by wxrc, do not edit by hand.
3 //
4 
5 #include <wx/wxprec.h>
6 
7 #ifdef __BORLANDC__
8  #pragma hdrstop
9 #endif
10 
11 #include <wx/filesys.h>
12 #include <wx/fs_mem.h>
13 #include <wx/xrc/xmlres.h>
14 #include <wx/xrc/xh_all.h>
15 
16 #if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
17  #define XRC_ADD_FILE(name, data, size, mime) \
18  wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
19 #else
20  #define XRC_ADD_FILE(name, data, size, mime) \
21  wxMemoryFSHandler::AddFile(name, data, size)
22 #endif
23 
24 static size_t xml_res_size_0 = 137;
25 static unsigned char xml_res_file_0[] = {
26 60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
27 110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
28 115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
29 47,47,119,119,119,46,119,120,119,105,100,103,101,116,115,46,111,114,103,
30 47,119,120,120,114,99,34,62,10,32,32,60,33,45,45,32,72,97,110,100,108,101,
31 114,32,71,101,110,101,114,97,116,105,111,110,32,105,115,32,79,78,32,45,
32 45,62,10,60,47,114,101,115,111,117,114,99,101,62,10};
33 
34 void wxC52C4InitBitmapResources()
35 {
36 
37  // Check for memory FS. If not present, load the handler:
38  {
39  wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
40  wxFileSystem fsys;
41  wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
42  wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
43  if (f) delete f;
44  else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
45  }
46 
47  XRC_ADD_FILE(wxT("XRC_resource/WorkspaceBitmaps.cpp$_home_thales_Documentos_GitHub_PSP_Project_WorkspaceBitmaps.xrc"), xml_res_file_0, xml_res_size_0, wxT("text/xml"));
48  wxXmlResource::Get()->Load(wxT("memory:XRC_resource/WorkspaceBitmaps.cpp$_home_thales_Documentos_GitHub_PSP_Project_WorkspaceBitmaps.xrc"));
49 }
-
- - - - diff --git a/docs/doxygen/html/annotated.html b/docs/doxygen/html/annotated.html index 6ecc1fe..27a4449 100644 --- a/docs/doxygen/html/annotated.html +++ b/docs/doxygen/html/annotated.html @@ -91,124 +91,96 @@ $(document).ready(function(){initNavTree('annotated.html','');});
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
 CAboutFormForm to show some informations
 CAboutFormBase
 CBranchAbstract class for branch power elements
 CBusNode for power elements. All others power elements are connected through this
 CBusElectricalData
 CBusFormForm to edit the bus power data
 CBusFormBase
 CCameraClass responsible for the correct visualization of the elements on screen
 CCapacitorShunt capactior power element
 CCapacitorElectricalData
 CChartViewThis class is responsible to manage the charts generated in the transient electromechanical studies
 CChartViewBase
 CConnectionLineConnection between two control elements or other connection line and an element
 CConstantA control element that provides a constant value
 CConstantFormForm to edit the constant control data
 CConstantFormBase
 CControlEditor
 CControlEditorBase
 CControlElement
 CControlElementButtonThis class is responsible to handle the user interaction with control elements
 CControlElementContainerClass that can contain all control elements. Can identify (using RTTI) the elements from a generic list and store them separately
 CControlElementSolverSolves in the time the control system. Can solve the control system directly from a ControlEditor or from a ControlEditorElement
 CControlSystemTestForm to edit properties to test the control system created
 CControlSystemTestBase
 CDataReportForm that shows the results of power flow and fault calculations
 CDataReportBase
 CDividerControl element that divides two inputs
 CElectricCalculationBase class of electric calculations, with general methods
 CElectromechanicalCalculates the electromechanical transient based on disturbances (e.g. system fault)
 CElementBase class of all elements of the program. This class is responsible for manage graphical and his data
 CElementDataObjectClass to store the elements in the clipboard
 CElementPlotData
 CElementsLists
 CExponentialGenerates an output following an exponential function
 CExponentialFormForm to edit the exponential control data
 CExponentialFormBase
 CFaultCalculate the fault of the system and update the elements data
 CFileHandingSave and opens the projects created on disk
 CGainProvide an output multiplying the input by a constant
 CGainFormForm to edit the gain control data
 CGainFormBase
 CGeneralData
 CGeneralPropertiesFormForm to edit the software's general data
 CGeneralPropertiesFormBase
 CGeneratorStabFormForm to edit the synchronous generator data for electromechanical studies
 CGeneratorStabFormBase
 CGraphicalElementAbstract class for graphical elements shown with power elements in workspace
 CIndMotorInduction motor power element
 CIndMotorElectricalData
 CIndMotorFormForm to edit the induction motor power data
 CIndMotorFormBase
 CInductorInductor shunt power element
 CInductorElectricalData
 CIntegrationConstantIntegration constants to calculate dynamic elements through trapezoidal integration method
 CIOControlProvides the communication with the power element
 CIOControlFormForm to edit the input/output control data
 CIOControlFormBase
 CLimiterLimits the input value by superior and inferior values
 CLimiterFormForm to edit the limit control data
 CLimiterFormBase
 CLinePower line element
 CLineElectricalData
 CLineFormForm to edit the line power data
 CLineFormBase
 CLoadLoas shunt power element
 CLoadElectricalData
 CLoadFormForm to edit the load power data
 CLoadFormBase
 CMachinesAbstract class for rotary machines power elements
 CMainApp
 CMainFrameMain frame of the program. This class manage the ribbon menu and the notebook behavior
 CMainFrameBase
 CMathOperationAbstract class that define the general behavior of math operation control block
 CMultiplierMultiplies two inputs
 CNodeNode of a control element. This class manages the user interaction with the connection and control elements
 COpenGLColourClass to manage color of OpenGL
 COpenGLTextClass to draw text on OpenGL using wxWidgets
 CPlotDataThis class is responsible to manage the graphical data of electromechanical result to be plotted on chart viewer
 CPowerElementAbstract class of power elements
 CPowerFlowCalculate the power flow
 CPropertiesDataGeneral and simulation data manager
 CRateLimiterLimits the rising and/or falling rate.
+
 CBranchAbstract class for branch power elements
 CBusNode for power elements. All others power elements are connected through this
 CBusElectricalData
 CBusFormForm to edit the bus power data
 CCameraClass responsible for the correct visualization of the elements on screen
 CCapacitorShunt capactior power element
 CCapacitorElectricalData
 CChartViewThis class is responsible to manage the charts generated in the transient electromechanical studies
 CConnectionLineConnection between two control elements or other connection line and an element
 CConstantA control element that provides a constant value
 CConstantFormForm to edit the constant control data
 CControlEditor
 CControlElement
 CControlElementButtonThis class is responsible to handle the user interaction with control elements
 CControlElementContainerClass that can contain all control elements. Can identify (using RTTI) the elements from a generic list and store them separately
 CControlElementSolverSolves in the time the control system. Can solve the control system directly from a ControlEditor or from a ControlEditorElement
 CControlSystemTestForm to edit properties to test the control system created
 CDataReportForm that shows the results of power flow and fault calculations
 CDividerControl element that divides two inputs
 CElectricCalculationBase class of electric calculations, with general methods
 CElectromechanicalCalculates the electromechanical transient based on disturbances (e.g. system fault)
 CElementBase class of all elements of the program. This class is responsible for manage graphical and his data
 CElementDataObjectClass to store the elements in the clipboard
 CElementPlotData
 CElementsLists
 CExponentialGenerates an output following an exponential function
 CExponentialFormForm to edit the exponential control data
 CFaultCalculate the fault of the system and update the elements data
 CFileHandingSave and opens the projects created on disk
 CGainProvide an output multiplying the input by a constant
 CGainFormForm to edit the gain control data
 CGeneralData
 CGeneralPropertiesFormForm to edit the software's general data
 CGeneratorStabFormForm to edit the synchronous generator data for electromechanical studies
 CGraphicalElementAbstract class for graphical elements shown with power elements in workspace
 CIndMotorInduction motor power element
 CIndMotorElectricalData
 CIndMotorFormForm to edit the induction motor power data
 CInductorInductor shunt power element
 CInductorElectricalData
 CIntegrationConstantIntegration constants to calculate dynamic elements through trapezoidal integration method
 CIOControlProvides the communication with the power element
 CIOControlFormForm to edit the input/output control data
 CLimiterLimits the input value by superior and inferior values
 CLimiterFormForm to edit the limit control data
 CLinePower line element
 CLineElectricalData
 CLineFormForm to edit the line power data
 CLoadLoas shunt power element
 CLoadElectricalData
 CLoadFormForm to edit the load power data
 CMachinesAbstract class for rotary machines power elements
 CMainApp
 CMainFrameMain frame of the program. This class manage the ribbon menu and the notebook behavior
 CMathOperationAbstract class that define the general behavior of math operation control block
 CMultiplierMultiplies two inputs
 CNodeNode of a control element. This class manages the user interaction with the connection and control elements
 COpenGLColourClass to manage color of OpenGL
 COpenGLTextClass to draw text on OpenGL using wxWidgets
 CPlotDataThis class is responsible to manage the graphical data of electromechanical result to be plotted on chart viewer
 CPowerElementAbstract class of power elements
 CPowerFlowCalculate the power flow
 CPropertiesDataGeneral and simulation data manager
 CRateLimiterLimits the rising and/or falling rate.
 CRateLimiterFormForm to edit the rate limit control data
 CRateLimiterFormBase
 CReactiveLimits
 CReactiveShuntElementFormForm to edit the reactive shunt element power data
 CReactiveShuntElementFormBase
 CShuntAbstract class for shunt power elements
 CSimulationData
 CSimulationsSettingsFormForm to edit the simulation data
 CSimulationsSettingsFormBase
 CSumSum the all inputs (can choose the input signal)
 CSumFormForm to edit the sum control data
 CSumFormBase
 CSwitchingDataSwitching data of power elements
 CSwitchingFormForm to edit the switching data of power elements for electromechanical transient studies
 CSwitchingFormBase
 CSyncGeneratorSynchronous generator power element
 CSyncGeneratorElectricalData
 CSyncMachineFormForm to edit the synchronous machine power data
 CSyncMachineFormBase
 CSyncMachineModelDataSynchronous machine data for different models
 CSyncMotorSynchronous motor (synchronous compensator) power element
 CSyncMotorElectricalData
 CTextElement that shows power element informations in workspace
 CTextFormForm to edit the text graphical data
 CTextFormBase
 CTransferFunctionCalculates the time response by a frequency domain transfer function
 CTransferFunctionFormForm to edit the transfer function control data
 CTransferFunctionFormBase
 CTransformerTwo-winding transformer power element
 CTransformerElectricalData
 CTransformerFormForm to edit the transformer power data
 CTransformerFormBase
 CWorkspaceThis class manages the graphical and power elements. It is responsible for handling the user's interaction with the elements
 CWorkspaceBase
 CwxRibbonMetroArtProvider
 CRateLimiterFormForm to edit the rate limit control data
 CReactiveLimits
 CReactiveShuntElementFormForm to edit the reactive shunt element power data
 CShuntAbstract class for shunt power elements
 CSimulationData
 CSimulationsSettingsFormForm to edit the simulation data
 CSumSum the all inputs (can choose the input signal)
 CSumFormForm to edit the sum control data
 CSwitchingDataSwitching data of power elements
 CSwitchingFormForm to edit the switching data of power elements for electromechanical transient studies
 CSyncGeneratorSynchronous generator power element
 CSyncGeneratorElectricalData
 CSyncMachineFormForm to edit the synchronous machine power data
 CSyncMachineModelDataSynchronous machine data for different models
 CSyncMotorSynchronous motor (synchronous compensator) power element
 CSyncMotorElectricalData
 CTextElement that shows power element informations in workspace
 CTextFormForm to edit the text graphical data
 CTransferFunctionCalculates the time response by a frequency domain transfer function
 CSpaceState
 CTransferFunctionFormForm to edit the transfer function control data
 CTransformerTwo-winding transformer power element
 CTransformerElectricalData
 CTransformerFormForm to edit the transformer power data
 CWorkspaceThis class manages the graphical and power elements. It is responsible for handling the user's interaction with the elements
diff --git a/docs/doxygen/html/annotated_dup.js b/docs/doxygen/html/annotated_dup.js index d6a2478..be01b1b 100644 --- a/docs/doxygen/html/annotated_dup.js +++ b/docs/doxygen/html/annotated_dup.js @@ -1,31 +1,24 @@ var annotated_dup = [ [ "AboutForm", "class_about_form.html", "class_about_form" ], - [ "AboutFormBase", "class_about_form_base.html", "class_about_form_base" ], [ "Branch", "class_branch.html", "class_branch" ], [ "Bus", "class_bus.html", "class_bus" ], [ "BusElectricalData", "struct_bus_electrical_data.html", "struct_bus_electrical_data" ], [ "BusForm", "class_bus_form.html", "class_bus_form" ], - [ "BusFormBase", "class_bus_form_base.html", "class_bus_form_base" ], [ "Camera", "class_camera.html", "class_camera" ], [ "Capacitor", "class_capacitor.html", "class_capacitor" ], [ "CapacitorElectricalData", "struct_capacitor_electrical_data.html", "struct_capacitor_electrical_data" ], [ "ChartView", "class_chart_view.html", "class_chart_view" ], - [ "ChartViewBase", "class_chart_view_base.html", "class_chart_view_base" ], [ "ConnectionLine", "class_connection_line.html", "class_connection_line" ], [ "Constant", "class_constant.html", "class_constant" ], [ "ConstantForm", "class_constant_form.html", "class_constant_form" ], - [ "ConstantFormBase", "class_constant_form_base.html", "class_constant_form_base" ], [ "ControlEditor", "class_control_editor.html", "class_control_editor" ], - [ "ControlEditorBase", "class_control_editor_base.html", "class_control_editor_base" ], [ "ControlElement", "class_control_element.html", "class_control_element" ], [ "ControlElementButton", "class_control_element_button.html", "class_control_element_button" ], [ "ControlElementContainer", "class_control_element_container.html", "class_control_element_container" ], [ "ControlElementSolver", "class_control_element_solver.html", "class_control_element_solver" ], [ "ControlSystemTest", "class_control_system_test.html", "class_control_system_test" ], - [ "ControlSystemTestBase", "class_control_system_test_base.html", "class_control_system_test_base" ], [ "DataReport", "class_data_report.html", "class_data_report" ], - [ "DataReportBase", "class_data_report_base.html", "class_data_report_base" ], [ "Divider", "class_divider.html", "class_divider" ], [ "ElectricCalculation", "class_electric_calculation.html", "class_electric_calculation" ], [ "Electromechanical", "class_electromechanical.html", "class_electromechanical" ], @@ -35,43 +28,33 @@ var annotated_dup = [ "ElementsLists", "struct_elements_lists.html", "struct_elements_lists" ], [ "Exponential", "class_exponential.html", "class_exponential" ], [ "ExponentialForm", "class_exponential_form.html", "class_exponential_form" ], - [ "ExponentialFormBase", "class_exponential_form_base.html", "class_exponential_form_base" ], [ "Fault", "class_fault.html", "class_fault" ], [ "FileHanding", "class_file_handing.html", "class_file_handing" ], [ "Gain", "class_gain.html", "class_gain" ], [ "GainForm", "class_gain_form.html", "class_gain_form" ], - [ "GainFormBase", "class_gain_form_base.html", "class_gain_form_base" ], [ "GeneralData", "struct_general_data.html", "struct_general_data" ], [ "GeneralPropertiesForm", "class_general_properties_form.html", "class_general_properties_form" ], - [ "GeneralPropertiesFormBase", "class_general_properties_form_base.html", "class_general_properties_form_base" ], [ "GeneratorStabForm", "class_generator_stab_form.html", "class_generator_stab_form" ], - [ "GeneratorStabFormBase", "class_generator_stab_form_base.html", "class_generator_stab_form_base" ], [ "GraphicalElement", "class_graphical_element.html", "class_graphical_element" ], [ "IndMotor", "class_ind_motor.html", "class_ind_motor" ], [ "IndMotorElectricalData", "struct_ind_motor_electrical_data.html", "struct_ind_motor_electrical_data" ], [ "IndMotorForm", "class_ind_motor_form.html", "class_ind_motor_form" ], - [ "IndMotorFormBase", "class_ind_motor_form_base.html", "class_ind_motor_form_base" ], [ "Inductor", "class_inductor.html", "class_inductor" ], [ "InductorElectricalData", "struct_inductor_electrical_data.html", "struct_inductor_electrical_data" ], [ "IntegrationConstant", "struct_integration_constant.html", "struct_integration_constant" ], [ "IOControl", "class_i_o_control.html", "class_i_o_control" ], [ "IOControlForm", "class_i_o_control_form.html", "class_i_o_control_form" ], - [ "IOControlFormBase", "class_i_o_control_form_base.html", "class_i_o_control_form_base" ], [ "Limiter", "class_limiter.html", "class_limiter" ], [ "LimiterForm", "class_limiter_form.html", "class_limiter_form" ], - [ "LimiterFormBase", "class_limiter_form_base.html", "class_limiter_form_base" ], [ "Line", "class_line.html", "class_line" ], [ "LineElectricalData", "struct_line_electrical_data.html", "struct_line_electrical_data" ], [ "LineForm", "class_line_form.html", "class_line_form" ], - [ "LineFormBase", "class_line_form_base.html", "class_line_form_base" ], [ "Load", "class_load.html", "class_load" ], [ "LoadElectricalData", "struct_load_electrical_data.html", "struct_load_electrical_data" ], [ "LoadForm", "class_load_form.html", "class_load_form" ], - [ "LoadFormBase", "class_load_form_base.html", "class_load_form_base" ], [ "Machines", "class_machines.html", "class_machines" ], [ "MainApp", "class_main_app.html", "class_main_app" ], [ "MainFrame", "class_main_frame.html", "class_main_frame" ], - [ "MainFrameBase", "class_main_frame_base.html", "class_main_frame_base" ], [ "MathOperation", "class_math_operation.html", "class_math_operation" ], [ "Multiplier", "class_multiplier.html", "class_multiplier" ], [ "Node", "class_node.html", "class_node" ], @@ -83,38 +66,27 @@ var annotated_dup = [ "PropertiesData", "class_properties_data.html", "class_properties_data" ], [ "RateLimiter", "class_rate_limiter.html", "class_rate_limiter" ], [ "RateLimiterForm", "class_rate_limiter_form.html", "class_rate_limiter_form" ], - [ "RateLimiterFormBase", "class_rate_limiter_form_base.html", "class_rate_limiter_form_base" ], [ "ReactiveLimits", "struct_reactive_limits.html", "struct_reactive_limits" ], [ "ReactiveShuntElementForm", "class_reactive_shunt_element_form.html", "class_reactive_shunt_element_form" ], - [ "ReactiveShuntElementFormBase", "class_reactive_shunt_element_form_base.html", "class_reactive_shunt_element_form_base" ], [ "Shunt", "class_shunt.html", "class_shunt" ], [ "SimulationData", "struct_simulation_data.html", "struct_simulation_data" ], [ "SimulationsSettingsForm", "class_simulations_settings_form.html", "class_simulations_settings_form" ], - [ "SimulationsSettingsFormBase", "class_simulations_settings_form_base.html", "class_simulations_settings_form_base" ], [ "Sum", "class_sum.html", "class_sum" ], [ "SumForm", "class_sum_form.html", "class_sum_form" ], - [ "SumFormBase", "class_sum_form_base.html", "class_sum_form_base" ], [ "SwitchingData", "struct_switching_data.html", "struct_switching_data" ], [ "SwitchingForm", "class_switching_form.html", "class_switching_form" ], - [ "SwitchingFormBase", "class_switching_form_base.html", "class_switching_form_base" ], [ "SyncGenerator", "class_sync_generator.html", "class_sync_generator" ], [ "SyncGeneratorElectricalData", "struct_sync_generator_electrical_data.html", "struct_sync_generator_electrical_data" ], [ "SyncMachineForm", "class_sync_machine_form.html", "class_sync_machine_form" ], - [ "SyncMachineFormBase", "class_sync_machine_form_base.html", "class_sync_machine_form_base" ], [ "SyncMachineModelData", "struct_sync_machine_model_data.html", "struct_sync_machine_model_data" ], [ "SyncMotor", "class_sync_motor.html", "class_sync_motor" ], [ "SyncMotorElectricalData", "struct_sync_motor_electrical_data.html", "struct_sync_motor_electrical_data" ], [ "Text", "class_text.html", "class_text" ], [ "TextForm", "class_text_form.html", "class_text_form" ], - [ "TextFormBase", "class_text_form_base.html", "class_text_form_base" ], [ "TransferFunction", "class_transfer_function.html", "class_transfer_function" ], [ "TransferFunctionForm", "class_transfer_function_form.html", "class_transfer_function_form" ], - [ "TransferFunctionFormBase", "class_transfer_function_form_base.html", "class_transfer_function_form_base" ], [ "Transformer", "class_transformer.html", "class_transformer" ], [ "TransformerElectricalData", "struct_transformer_electrical_data.html", "struct_transformer_electrical_data" ], [ "TransformerForm", "class_transformer_form.html", "class_transformer_form" ], - [ "TransformerFormBase", "class_transformer_form_base.html", "class_transformer_form_base" ], - [ "Workspace", "class_workspace.html", "class_workspace" ], - [ "WorkspaceBase", "class_workspace_base.html", "class_workspace_base" ], - [ "wxRibbonMetroArtProvider", "classwx_ribbon_metro_art_provider.html", "classwx_ribbon_metro_art_provider" ] + [ "Workspace", "class_workspace.html", "class_workspace" ] ]; \ No newline at end of file diff --git a/docs/doxygen/html/class_about_form-members.html b/docs/doxygen/html/class_about_form-members.html index 3826bd7..27227a5 100644 --- a/docs/doxygen/html/class_about_form-members.html +++ b/docs/doxygen/html/class_about_form-members.html @@ -92,35 +92,9 @@ $(document).ready(function(){initNavTree('class_about_form.html','');});

This is the complete list of members for AboutForm, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
AboutForm(wxWindow *parent) (defined in AboutForm)AboutForm
AboutFormBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("About PSP-UFU"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE) (defined in AboutFormBase)AboutFormBase
GetButtonOK() (defined in AboutFormBase)AboutFormBaseinline
GetGridCredits() (defined in AboutFormBase)AboutFormBaseinline
GetHyperLinkPSP() (defined in AboutFormBase)AboutFormBaseinline
GetNotebook() (defined in AboutFormBase)AboutFormBaseinline
GetPanelCredits() (defined in AboutFormBase)AboutFormBaseinline
GetPanelLicense() (defined in AboutFormBase)AboutFormBaseinline
GetPanelLogo() (defined in AboutFormBase)AboutFormBaseinline
GetRichTextCtrlLicense() (defined in AboutFormBase)AboutFormBaseinline
GetStaticBitmapLogo() (defined in AboutFormBase)AboutFormBaseinline
GetStaticTextHome() (defined in AboutFormBase)AboutFormBaseinline
GetStaticTextVersion() (defined in AboutFormBase)AboutFormBaseinline
GetStaticTextVersionLabel() (defined in AboutFormBase)AboutFormBaseinline
Init() (defined in AboutForm)AboutFormvirtual
m_buttonOK (defined in AboutFormBase)AboutFormBaseprotected
m_gridCredits (defined in AboutFormBase)AboutFormBaseprotected
m_hyperLinkPSP (defined in AboutFormBase)AboutFormBaseprotected
m_notebook (defined in AboutFormBase)AboutFormBaseprotected
m_panelCredits (defined in AboutFormBase)AboutFormBaseprotected
m_panelLicense (defined in AboutFormBase)AboutFormBaseprotected
m_panelLogo (defined in AboutFormBase)AboutFormBaseprotected
m_richTextCtrlLicense (defined in AboutFormBase)AboutFormBaseprotected
m_staticBitmapLogo (defined in AboutFormBase)AboutFormBaseprotected
m_staticTextHome (defined in AboutFormBase)AboutFormBaseprotected
m_staticTextVersion (defined in AboutFormBase)AboutFormBaseprotected
m_staticTextVersionLabel (defined in AboutFormBase)AboutFormBaseprotected
OnOKButtonClick(wxCommandEvent &event) (defined in AboutForm)AboutForminlineprotectedvirtual
~AboutForm() (defined in AboutForm)AboutFormvirtual
~AboutFormBase() (defined in AboutFormBase)AboutFormBasevirtual
Init() (defined in AboutForm)AboutFormvirtual
OnOKButtonClick(wxCommandEvent &event) (defined in AboutForm)AboutForminlineprotectedvirtual
~AboutForm() (defined in AboutForm)AboutFormvirtual
diff --git a/docs/doxygen/html/class_about_form.html b/docs/doxygen/html/class_about_form.html index 97ff3a4..8ac1d05 100644 --- a/docs/doxygen/html/class_about_form.html +++ b/docs/doxygen/html/class_about_form.html @@ -96,14 +96,13 @@ $(document).ready(function(){initNavTree('class_about_form.html','');});

Form to show some informations. More...

-

#include <AboutForm.h>

+

#include <AboutForm.h>

Inheritance diagram for AboutForm:
-AboutFormBase
@@ -115,102 +114,20 @@ Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - -
virtual void Init ()
 
- Public Member Functions inherited from AboutFormBase
-wxStaticBitmap * GetStaticBitmapLogo ()
 
-wxPanel * GetPanelLogo ()
 
-wxGrid * GetGridCredits ()
 
-wxPanel * GetPanelCredits ()
 
-wxRichTextCtrl * GetRichTextCtrlLicense ()
 
-wxPanel * GetPanelLicense ()
 
-wxNotebook * GetNotebook ()
 
-wxStaticText * GetStaticTextVersionLabel ()
 
-wxStaticText * GetStaticTextVersion ()
 
-wxStaticText * GetStaticTextHome ()
 
-wxHyperlinkCtrl * GetHyperLinkPSP ()
 
-wxButton * GetButtonOK ()
 
AboutFormBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("About PSP-UFU"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
 
-

Protected Member Functions

virtual void OnOKButtonClick (wxCommandEvent &event)
 
- - - - - - - - - - - - - - - - - - - - - - - - - -

-Additional Inherited Members

- Protected Attributes inherited from AboutFormBase
-wxNotebook * m_notebook
 
-wxPanel * m_panelLogo
 
-wxStaticBitmap * m_staticBitmapLogo
 
-wxPanel * m_panelCredits
 
-wxGrid * m_gridCredits
 
-wxPanel * m_panelLicense
 
-wxRichTextCtrl * m_richTextCtrlLicense
 
-wxStaticText * m_staticTextVersionLabel
 
-wxStaticText * m_staticTextVersion
 
-wxStaticText * m_staticTextHome
 
-wxHyperlinkCtrl * m_hyperLinkPSP
 
-wxButton * m_buttonOK
 

Detailed Description

Form to show some informations.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017
- -

Definition at line 32 of file AboutForm.h.


The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_about_form.png b/docs/doxygen/html/class_about_form.png index fb32911..b05abb1 100644 Binary files a/docs/doxygen/html/class_about_form.png and b/docs/doxygen/html/class_about_form.png differ diff --git a/docs/doxygen/html/class_about_form_base-members.html b/docs/doxygen/html/class_about_form_base-members.html deleted file mode 100644 index 57bf4db..0000000 --- a/docs/doxygen/html/class_about_form_base-members.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - -Member List - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
AboutFormBase Member List
-
-
- -

This is the complete list of members for AboutFormBase, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AboutFormBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("About PSP-UFU"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE) (defined in AboutFormBase)AboutFormBase
GetButtonOK() (defined in AboutFormBase)AboutFormBaseinline
GetGridCredits() (defined in AboutFormBase)AboutFormBaseinline
GetHyperLinkPSP() (defined in AboutFormBase)AboutFormBaseinline
GetNotebook() (defined in AboutFormBase)AboutFormBaseinline
GetPanelCredits() (defined in AboutFormBase)AboutFormBaseinline
GetPanelLicense() (defined in AboutFormBase)AboutFormBaseinline
GetPanelLogo() (defined in AboutFormBase)AboutFormBaseinline
GetRichTextCtrlLicense() (defined in AboutFormBase)AboutFormBaseinline
GetStaticBitmapLogo() (defined in AboutFormBase)AboutFormBaseinline
GetStaticTextHome() (defined in AboutFormBase)AboutFormBaseinline
GetStaticTextVersion() (defined in AboutFormBase)AboutFormBaseinline
GetStaticTextVersionLabel() (defined in AboutFormBase)AboutFormBaseinline
m_buttonOK (defined in AboutFormBase)AboutFormBaseprotected
m_gridCredits (defined in AboutFormBase)AboutFormBaseprotected
m_hyperLinkPSP (defined in AboutFormBase)AboutFormBaseprotected
m_notebook (defined in AboutFormBase)AboutFormBaseprotected
m_panelCredits (defined in AboutFormBase)AboutFormBaseprotected
m_panelLicense (defined in AboutFormBase)AboutFormBaseprotected
m_panelLogo (defined in AboutFormBase)AboutFormBaseprotected
m_richTextCtrlLicense (defined in AboutFormBase)AboutFormBaseprotected
m_staticBitmapLogo (defined in AboutFormBase)AboutFormBaseprotected
m_staticTextHome (defined in AboutFormBase)AboutFormBaseprotected
m_staticTextVersion (defined in AboutFormBase)AboutFormBaseprotected
m_staticTextVersionLabel (defined in AboutFormBase)AboutFormBaseprotected
OnOKButtonClick(wxCommandEvent &event) (defined in AboutFormBase)AboutFormBaseinlineprotectedvirtual
~AboutFormBase() (defined in AboutFormBase)AboutFormBasevirtual
-
- - - - diff --git a/docs/doxygen/html/class_about_form_base.html b/docs/doxygen/html/class_about_form_base.html deleted file mode 100644 index 15d49bd..0000000 --- a/docs/doxygen/html/class_about_form_base.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - -AboutFormBase Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- - -
-
-Inheritance diagram for AboutFormBase:
-
-
- - -AboutForm - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-wxStaticBitmap * GetStaticBitmapLogo ()
 
-wxPanel * GetPanelLogo ()
 
-wxGrid * GetGridCredits ()
 
-wxPanel * GetPanelCredits ()
 
-wxRichTextCtrl * GetRichTextCtrlLicense ()
 
-wxPanel * GetPanelLicense ()
 
-wxNotebook * GetNotebook ()
 
-wxStaticText * GetStaticTextVersionLabel ()
 
-wxStaticText * GetStaticTextVersion ()
 
-wxStaticText * GetStaticTextHome ()
 
-wxHyperlinkCtrl * GetHyperLinkPSP ()
 
-wxButton * GetButtonOK ()
 
AboutFormBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("About PSP-UFU"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
 
- - - -

-Protected Member Functions

-virtual void OnOKButtonClick (wxCommandEvent &event)
 
- - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Attributes

-wxNotebook * m_notebook
 
-wxPanel * m_panelLogo
 
-wxStaticBitmap * m_staticBitmapLogo
 
-wxPanel * m_panelCredits
 
-wxGrid * m_gridCredits
 
-wxPanel * m_panelLicense
 
-wxRichTextCtrl * m_richTextCtrlLicense
 
-wxStaticText * m_staticTextVersionLabel
 
-wxStaticText * m_staticTextVersion
 
-wxStaticText * m_staticTextHome
 
-wxHyperlinkCtrl * m_hyperLinkPSP
 
-wxButton * m_buttonOK
 
-

Detailed Description

-
-

Definition at line 224 of file PropertiesForm.h.

-

The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/doxygen/html/class_about_form_base.js b/docs/doxygen/html/class_about_form_base.js deleted file mode 100644 index 1a3e62b..0000000 --- a/docs/doxygen/html/class_about_form_base.js +++ /dev/null @@ -1,30 +0,0 @@ -var class_about_form_base = -[ - [ "AboutFormBase", "class_about_form_base.html#aa52e54457b4cf595f1714a0320458e6c", null ], - [ "~AboutFormBase", "class_about_form_base.html#afc2c8fd7901eef089aa3bf618fe3096a", null ], - [ "GetButtonOK", "class_about_form_base.html#a8d70d38cc7eb8f41bd833f18aafeaf30", null ], - [ "GetGridCredits", "class_about_form_base.html#af7ac5a27424141c707927070efe3d6f5", null ], - [ "GetHyperLinkPSP", "class_about_form_base.html#a5a2bb84e1eb7fc3b92d82a68fc93858a", null ], - [ "GetNotebook", "class_about_form_base.html#acdb89e02449607a015ed94c6117b9eec", null ], - [ "GetPanelCredits", "class_about_form_base.html#aee3f59a44c6423598ae7c697c065057a", null ], - [ "GetPanelLicense", "class_about_form_base.html#a428f630068bebd4e0fdd258c0b8cd2ac", null ], - [ "GetPanelLogo", "class_about_form_base.html#a4438eded1319f84ed19cf0350d819efb", null ], - [ "GetRichTextCtrlLicense", "class_about_form_base.html#a490a133019381aa2569ca04f517829ea", null ], - [ "GetStaticBitmapLogo", "class_about_form_base.html#a74341fb9c17f6320745444ea4eb76df8", null ], - [ "GetStaticTextHome", "class_about_form_base.html#a37e22612779e67b33b66f6a3a7bb60c1", null ], - [ "GetStaticTextVersion", "class_about_form_base.html#ab9eb80b69d8109a3af6d3b6309b65c76", null ], - [ "GetStaticTextVersionLabel", "class_about_form_base.html#a1fae6815dc4f49df45f05f3893a332c7", null ], - [ "OnOKButtonClick", "class_about_form_base.html#a64ea9b42b326b773067de6d1b4f649f4", null ], - [ "m_buttonOK", "class_about_form_base.html#ab8d26c339ff508e7497e011cca359246", null ], - [ "m_gridCredits", "class_about_form_base.html#a02da06240394048e693c6ae3e2a69282", null ], - [ "m_hyperLinkPSP", "class_about_form_base.html#a6fcacff0bfb56d11923d0f80e5560f70", null ], - [ "m_notebook", "class_about_form_base.html#a01a0cbc42c52e7eb69fa1337f756af7d", null ], - [ "m_panelCredits", "class_about_form_base.html#a34d37030073f1e71cc233a8d0d4a27dc", null ], - [ "m_panelLicense", "class_about_form_base.html#a3dbb1a9739786e22307f7ae4fb0617f1", null ], - [ "m_panelLogo", "class_about_form_base.html#a306c84f41395aee3200b887ec71ff11a", null ], - [ "m_richTextCtrlLicense", "class_about_form_base.html#a6d243c886c28b231279798dd3cca6df4", null ], - [ "m_staticBitmapLogo", "class_about_form_base.html#ae54042e29c9f00f7d4dad5d5b162f4bc", null ], - [ "m_staticTextHome", "class_about_form_base.html#a4470b5bcf193376d3a8849bdcba2acd4", null ], - [ "m_staticTextVersion", "class_about_form_base.html#ae14aaaac297d045e61b81df6379a18d7", null ], - [ "m_staticTextVersionLabel", "class_about_form_base.html#a6a33f787646eea29e95441b05c0409df", null ] -]; \ No newline at end of file diff --git a/docs/doxygen/html/class_about_form_base.png b/docs/doxygen/html/class_about_form_base.png deleted file mode 100644 index 09a5024..0000000 Binary files a/docs/doxygen/html/class_about_form_base.png and /dev/null differ diff --git a/docs/doxygen/html/class_branch.html b/docs/doxygen/html/class_branch.html index e69acbd..7ccb872 100644 --- a/docs/doxygen/html/class_branch.html +++ b/docs/doxygen/html/class_branch.html @@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('class_branch.html','');});

Abstract class for branch power elements. More...

-

#include <Branch.h>

+

#include <Branch.h>

Inheritance diagram for Branch:
@@ -516,8 +516,6 @@ Additional Inherited Members

Abstract class for branch power elements.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
06/10/2017
- -

Definition at line 31 of file Branch.h.

Member Function Documentation

◆ AddPoint()

@@ -555,8 +553,6 @@ Additional Inherited Members

Reimplemented in Line.

-

Definition at line 51 of file Branch.h.

-
@@ -595,8 +591,6 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 37 of file Branch.h.

- @@ -646,8 +640,6 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 38 of file Branch.h.

- @@ -680,8 +672,6 @@ Additional Inherited Members

Reimplemented in Line.

-

Definition at line 46 of file Branch.h.

- @@ -721,8 +711,6 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 52 of file Branch.h.

- @@ -761,8 +749,6 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 47 of file Branch.h.

- @@ -801,8 +787,6 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 39 of file Branch.h.

- @@ -852,8 +836,6 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 41 of file Branch.h.

- @@ -892,8 +874,6 @@ Additional Inherited Members

Reimplemented in Line.

-

Definition at line 48 of file Branch.h.

- @@ -931,8 +911,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 22 of file Branch.cpp.

- @@ -972,8 +950,6 @@ Additional Inherited Members

Reimplemented in Line.

-

Definition at line 49 of file Branch.h.

- @@ -1010,8 +986,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 105 of file Branch.cpp.

- @@ -1061,8 +1035,6 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 143 of file Branch.cpp.

- @@ -1102,8 +1074,6 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 43 of file Branch.cpp.

- @@ -1142,13 +1112,11 @@ Additional Inherited Members

Reimplemented in Transformer, and Line.

-

Definition at line 40 of file Branch.h.

-
The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_bus.html b/docs/doxygen/html/class_bus.html index c613d83..16898c8 100644 --- a/docs/doxygen/html/class_bus.html +++ b/docs/doxygen/html/class_bus.html @@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('class_bus.html','');});

Node for power elements. All others power elements are connected through this. More...

-

#include <Bus.h>

+

#include <Bus.h>

Inheritance diagram for Bus:
@@ -523,8 +523,6 @@ Additional Inherited Members

Node for power elements. All others power elements are connected through this.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
06/10/2017
- -

Definition at line 69 of file Bus.h.

Member Function Documentation

◆ AddParent()

@@ -571,8 +569,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 77 of file Bus.h.

-
@@ -609,8 +605,6 @@ Additional Inherited Members

Implements Element.

-

Definition at line 104 of file Bus.cpp.

- @@ -658,8 +652,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 41 of file Bus.cpp.

- @@ -690,8 +682,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 141 of file Bus.cpp.

- @@ -729,8 +719,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 193 of file Bus.cpp.

- @@ -761,8 +749,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 212 of file Bus.cpp.

- @@ -800,8 +786,6 @@ Additional Inherited Members

Reimplemented from PowerElement.

-

Definition at line 246 of file Bus.cpp.

- @@ -832,8 +816,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 218 of file Bus.cpp.

- @@ -870,8 +852,6 @@ Additional Inherited Members

Implements Element.

-

Definition at line 110 of file Bus.cpp.

- @@ -908,8 +888,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 158 of file Bus.cpp.

- @@ -947,8 +925,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 117 of file Bus.cpp.

- @@ -985,8 +961,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 184 of file Bus.cpp.

- @@ -1035,13 +1009,11 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 200 of file Bus.cpp.

-
The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_bus_form-members.html b/docs/doxygen/html/class_bus_form-members.html index 3818b01..e39c601 100644 --- a/docs/doxygen/html/class_bus_form-members.html +++ b/docs/doxygen/html/class_bus_form-members.html @@ -92,102 +92,20 @@ $(document).ready(function(){initNavTree('class_bus_form.html','');});

This is the complete list of members for BusForm, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + +
BusForm(wxWindow *parent, Bus *bus) (defined in BusForm)BusForm
BusFormBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Bus"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE) (defined in BusFormBase)BusFormBase
EnableCtrlVoltageFields(bool enable=true) (defined in BusForm)BusFormprotectedvirtual
EnableFaultFields(bool enable=true) (defined in BusForm)BusFormprotectedvirtual
EnableStabFaultFields(bool enable=true) (defined in BusForm)BusFormprotectedvirtual
GetButtonCancel() (defined in BusFormBase)BusFormBaseinline
GetButtonOK() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxCtrlVoltage() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxFault() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxPlotData() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxSlackBus() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxStabFault() (defined in BusFormBase)BusFormBaseinline
GetChoiceCtrlVoltage() (defined in BusFormBase)BusFormBaseinline
GetChoiceFaultPlace() (defined in BusFormBase)BusFormBaseinline
GetChoiceFaultType() (defined in BusFormBase)BusFormBaseinline
GetChoiceNomVoltage() (defined in BusFormBase)BusFormBaseinline
GetNotebook() (defined in BusFormBase)BusFormBaseinline
GetPanelFault() (defined in BusFormBase)BusFormBaseinline
GetPanelGeneral() (defined in BusFormBase)BusFormBaseinline
GetPanelStability() (defined in BusFormBase)BusFormBaseinline
GetStaticTextFaultPlace() (defined in BusFormBase)BusFormBaseinline
GetStaticTextFaultResistance() (defined in BusFormBase)BusFormBaseinline
GetStaticTextFaultType() (defined in BusFormBase)BusFormBaseinline
GetStaticTextName() (defined in BusFormBase)BusFormBaseinline
GetStaticTextNomVoltage() (defined in BusFormBase)BusFormBaseinline
GetStaticTextPU_1() (defined in BusFormBase)BusFormBaseinline
GetStaticTextPU_2() (defined in BusFormBase)BusFormBaseinline
GetStaticTextPU_3() (defined in BusFormBase)BusFormBaseinline
GetStaticTextPU_4() (defined in BusFormBase)BusFormBaseinline
GetStaticTextReactance() (defined in BusFormBase)BusFormBaseinline
GetStaticTextS_1() (defined in BusFormBase)BusFormBaseinline
GetStaticTextS_2() (defined in BusFormBase)BusFormBaseinline
GetStaticTextStabFaultLength() (defined in BusFormBase)BusFormBaseinline
GetStaticTextStabFaultReactance() (defined in BusFormBase)BusFormBaseinline
GetStaticTextStabFaultResistance() (defined in BusFormBase)BusFormBaseinline
GetStaticTextStabFaultTime() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlCtrlVoltage() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlFaultReactance() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlFaultResistance() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlName() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlNomVoltage() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlStabFaultLength() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlStabFaultReactance() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlStabFaultResistance() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlStabFaultTime() (defined in BusFormBase)BusFormBaseinline
m_bus (defined in BusForm)BusFormprotected
m_ButtonCancel (defined in BusFormBase)BusFormBaseprotected
m_buttonOK (defined in BusFormBase)BusFormBaseprotected
m_checkBoxCtrlVoltage (defined in BusFormBase)BusFormBaseprotected
m_checkBoxFault (defined in BusFormBase)BusFormBaseprotected
m_checkBoxPlotData (defined in BusFormBase)BusFormBaseprotected
m_checkBoxSlackBus (defined in BusFormBase)BusFormBaseprotected
m_checkBoxStabFault (defined in BusFormBase)BusFormBaseprotected
m_choiceCtrlVoltage (defined in BusFormBase)BusFormBaseprotected
m_choiceFaultPlace (defined in BusFormBase)BusFormBaseprotected
m_choiceFaultType (defined in BusFormBase)BusFormBaseprotected
m_choiceNomVoltage (defined in BusFormBase)BusFormBaseprotected
m_notebook (defined in BusFormBase)BusFormBaseprotected
m_panelFault (defined in BusFormBase)BusFormBaseprotected
m_panelGeneral (defined in BusFormBase)BusFormBaseprotected
m_panelStability (defined in BusFormBase)BusFormBaseprotected
EnableCtrlVoltageFields(bool enable=true) (defined in BusForm)BusFormprotectedvirtual
EnableFaultFields(bool enable=true) (defined in BusForm)BusFormprotectedvirtual
EnableStabFaultFields(bool enable=true) (defined in BusForm)BusFormprotectedvirtual
m_bus (defined in BusForm)BusFormprotected
m_parent (defined in BusForm)BusFormprotected
m_staticTextFaultPlace (defined in BusFormBase)BusFormBaseprotected
m_staticTextFaultResistance (defined in BusFormBase)BusFormBaseprotected
m_staticTextFaultType (defined in BusFormBase)BusFormBaseprotected
m_staticTextName (defined in BusFormBase)BusFormBaseprotected
m_staticTextNomVoltage (defined in BusFormBase)BusFormBaseprotected
m_staticTextPU_1 (defined in BusFormBase)BusFormBaseprotected
m_staticTextPU_2 (defined in BusFormBase)BusFormBaseprotected
m_staticTextPU_3 (defined in BusFormBase)BusFormBaseprotected
m_staticTextPU_4 (defined in BusFormBase)BusFormBaseprotected
m_staticTextReactance (defined in BusFormBase)BusFormBaseprotected
m_staticTextS_1 (defined in BusFormBase)BusFormBaseprotected
m_staticTextS_2 (defined in BusFormBase)BusFormBaseprotected
m_staticTextStabFaultLength (defined in BusFormBase)BusFormBaseprotected
m_staticTextStabFaultReactance (defined in BusFormBase)BusFormBaseprotected
m_staticTextStabFaultResistance (defined in BusFormBase)BusFormBaseprotected
m_staticTextStabFaultTime (defined in BusFormBase)BusFormBaseprotected
m_textCtrlCtrlVoltage (defined in BusFormBase)BusFormBaseprotected
m_textCtrlFaultReactance (defined in BusFormBase)BusFormBaseprotected
m_textCtrlFaultResistance (defined in BusFormBase)BusFormBaseprotected
m_textCtrlName (defined in BusFormBase)BusFormBaseprotected
m_textCtrlNomVoltage (defined in BusFormBase)BusFormBaseprotected
m_textCtrlStabFaultLength (defined in BusFormBase)BusFormBaseprotected
m_textCtrlStabFaultReactance (defined in BusFormBase)BusFormBaseprotected
m_textCtrlStabFaultResistance (defined in BusFormBase)BusFormBaseprotected
m_textCtrlStabFaultTime (defined in BusFormBase)BusFormBaseprotected
OnButtonCancelClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnButtonOKClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnControlledVoltageClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnFaultTypeChoice(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnInsertFaultClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnInsertStabFaultClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnNominalVoltageChoice(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
UpdateChoiceBoxes() (defined in BusForm)BusFormprotectedvirtual
~BusForm() (defined in BusForm)BusFormvirtual
~BusFormBase() (defined in BusFormBase)BusFormBasevirtual
OnButtonCancelClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnButtonOKClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnControlledVoltageClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnFaultTypeChoice(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnInsertFaultClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnInsertStabFaultClick(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
OnNominalVoltageChoice(wxCommandEvent &event) (defined in BusForm)BusFormprotectedvirtual
UpdateChoiceBoxes() (defined in BusForm)BusFormprotectedvirtual
~BusForm() (defined in BusForm)BusFormvirtual
diff --git a/docs/doxygen/html/class_bus_form.html b/docs/doxygen/html/class_bus_form.html index 4d0099f..e445352 100644 --- a/docs/doxygen/html/class_bus_form.html +++ b/docs/doxygen/html/class_bus_form.html @@ -97,14 +97,13 @@ $(document).ready(function(){initNavTree('class_bus_form.html','');});

Form to edit the bus power data. More...

-

#include <BusForm.h>

+

#include <BusForm.h>

Inheritance diagram for BusForm:
-BusFormBase
@@ -113,130 +112,6 @@ Public Member Functions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 BusForm (wxWindow *parent, Bus *bus)
 
- Public Member Functions inherited from BusFormBase
-wxStaticText * GetStaticTextName ()
 
-wxTextCtrl * GetTextCtrlName ()
 
-wxStaticText * GetStaticTextNomVoltage ()
 
-wxTextCtrl * GetTextCtrlNomVoltage ()
 
-wxChoice * GetChoiceNomVoltage ()
 
-wxCheckBox * GetCheckBoxCtrlVoltage ()
 
-wxTextCtrl * GetTextCtrlCtrlVoltage ()
 
-wxChoice * GetChoiceCtrlVoltage ()
 
-wxCheckBox * GetCheckBoxSlackBus ()
 
-wxPanel * GetPanelGeneral ()
 
-wxCheckBox * GetCheckBoxFault ()
 
-wxStaticText * GetStaticTextFaultType ()
 
-wxChoice * GetChoiceFaultType ()
 
-wxStaticText * GetStaticTextFaultPlace ()
 
-wxChoice * GetChoiceFaultPlace ()
 
-wxStaticText * GetStaticTextFaultResistance ()
 
-wxTextCtrl * GetTextCtrlFaultResistance ()
 
-wxStaticText * GetStaticTextPU_1 ()
 
-wxStaticText * GetStaticTextReactance ()
 
-wxTextCtrl * GetTextCtrlFaultReactance ()
 
-wxStaticText * GetStaticTextPU_2 ()
 
-wxPanel * GetPanelFault ()
 
-wxCheckBox * GetCheckBoxPlotData ()
 
-wxCheckBox * GetCheckBoxStabFault ()
 
-wxStaticText * GetStaticTextStabFaultTime ()
 
-wxTextCtrl * GetTextCtrlStabFaultTime ()
 
-wxStaticText * GetStaticTextS_1 ()
 
-wxStaticText * GetStaticTextStabFaultLength ()
 
-wxTextCtrl * GetTextCtrlStabFaultLength ()
 
-wxStaticText * GetStaticTextS_2 ()
 
-wxStaticText * GetStaticTextStabFaultResistance ()
 
-wxTextCtrl * GetTextCtrlStabFaultResistance ()
 
-wxStaticText * GetStaticTextPU_3 ()
 
-wxStaticText * GetStaticTextStabFaultReactance ()
 
-wxTextCtrl * GetTextCtrlStabFaultReactance ()
 
-wxStaticText * GetStaticTextPU_4 ()
 
-wxPanel * GetPanelStability ()
 
-wxNotebook * GetNotebook ()
 
-wxButton * GetButtonOK ()
 
-wxButton * GetButtonCancel ()
 
BusFormBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Bus"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
 
@@ -282,137 +157,14 @@ Protected Attributes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Protected Member Functions

wxWindow * m_parent = NULL
 
- Protected Attributes inherited from BusFormBase
-wxNotebook * m_notebook
 
-wxPanel * m_panelGeneral
 
-wxStaticText * m_staticTextName
 
-wxTextCtrl * m_textCtrlName
 
-wxStaticText * m_staticTextNomVoltage
 
-wxTextCtrl * m_textCtrlNomVoltage
 
-wxChoice * m_choiceNomVoltage
 
-wxCheckBox * m_checkBoxCtrlVoltage
 
-wxTextCtrl * m_textCtrlCtrlVoltage
 
-wxChoice * m_choiceCtrlVoltage
 
-wxCheckBox * m_checkBoxSlackBus
 
-wxPanel * m_panelFault
 
-wxCheckBox * m_checkBoxFault
 
-wxStaticText * m_staticTextFaultType
 
-wxChoice * m_choiceFaultType
 
-wxStaticText * m_staticTextFaultPlace
 
-wxChoice * m_choiceFaultPlace
 
-wxStaticText * m_staticTextFaultResistance
 
-wxTextCtrl * m_textCtrlFaultResistance
 
-wxStaticText * m_staticTextPU_1
 
-wxStaticText * m_staticTextReactance
 
-wxTextCtrl * m_textCtrlFaultReactance
 
-wxStaticText * m_staticTextPU_2
 
-wxPanel * m_panelStability
 
-wxCheckBox * m_checkBoxPlotData
 
-wxCheckBox * m_checkBoxStabFault
 
-wxStaticText * m_staticTextStabFaultTime
 
-wxTextCtrl * m_textCtrlStabFaultTime
 
-wxStaticText * m_staticTextS_1
 
-wxStaticText * m_staticTextStabFaultLength
 
-wxTextCtrl * m_textCtrlStabFaultLength
 
-wxStaticText * m_staticTextS_2
 
-wxStaticText * m_staticTextStabFaultResistance
 
-wxTextCtrl * m_textCtrlStabFaultResistance
 
-wxStaticText * m_staticTextPU_3
 
-wxStaticText * m_staticTextStabFaultReactance
 
-wxTextCtrl * m_textCtrlStabFaultReactance
 
-wxStaticText * m_staticTextPU_4
 
-wxButton * m_buttonOK
 
-wxButton * m_ButtonCancel
 

Detailed Description

Form to edit the bus power data.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017
- -

Definition at line 31 of file BusForm.h.


The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_bus_form.png b/docs/doxygen/html/class_bus_form.png index acade6c..c1a59d7 100644 Binary files a/docs/doxygen/html/class_bus_form.png and b/docs/doxygen/html/class_bus_form.png differ diff --git a/docs/doxygen/html/class_bus_form_base-members.html b/docs/doxygen/html/class_bus_form_base-members.html deleted file mode 100644 index 654f60c..0000000 --- a/docs/doxygen/html/class_bus_form_base-members.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - -Member List - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
BusFormBase Member List
-
-
- -

This is the complete list of members for BusFormBase, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BusFormBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Bus"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE) (defined in BusFormBase)BusFormBase
GetButtonCancel() (defined in BusFormBase)BusFormBaseinline
GetButtonOK() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxCtrlVoltage() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxFault() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxPlotData() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxSlackBus() (defined in BusFormBase)BusFormBaseinline
GetCheckBoxStabFault() (defined in BusFormBase)BusFormBaseinline
GetChoiceCtrlVoltage() (defined in BusFormBase)BusFormBaseinline
GetChoiceFaultPlace() (defined in BusFormBase)BusFormBaseinline
GetChoiceFaultType() (defined in BusFormBase)BusFormBaseinline
GetChoiceNomVoltage() (defined in BusFormBase)BusFormBaseinline
GetNotebook() (defined in BusFormBase)BusFormBaseinline
GetPanelFault() (defined in BusFormBase)BusFormBaseinline
GetPanelGeneral() (defined in BusFormBase)BusFormBaseinline
GetPanelStability() (defined in BusFormBase)BusFormBaseinline
GetStaticTextFaultPlace() (defined in BusFormBase)BusFormBaseinline
GetStaticTextFaultResistance() (defined in BusFormBase)BusFormBaseinline
GetStaticTextFaultType() (defined in BusFormBase)BusFormBaseinline
GetStaticTextName() (defined in BusFormBase)BusFormBaseinline
GetStaticTextNomVoltage() (defined in BusFormBase)BusFormBaseinline
GetStaticTextPU_1() (defined in BusFormBase)BusFormBaseinline
GetStaticTextPU_2() (defined in BusFormBase)BusFormBaseinline
GetStaticTextPU_3() (defined in BusFormBase)BusFormBaseinline
GetStaticTextPU_4() (defined in BusFormBase)BusFormBaseinline
GetStaticTextReactance() (defined in BusFormBase)BusFormBaseinline
GetStaticTextS_1() (defined in BusFormBase)BusFormBaseinline
GetStaticTextS_2() (defined in BusFormBase)BusFormBaseinline
GetStaticTextStabFaultLength() (defined in BusFormBase)BusFormBaseinline
GetStaticTextStabFaultReactance() (defined in BusFormBase)BusFormBaseinline
GetStaticTextStabFaultResistance() (defined in BusFormBase)BusFormBaseinline
GetStaticTextStabFaultTime() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlCtrlVoltage() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlFaultReactance() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlFaultResistance() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlName() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlNomVoltage() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlStabFaultLength() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlStabFaultReactance() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlStabFaultResistance() (defined in BusFormBase)BusFormBaseinline
GetTextCtrlStabFaultTime() (defined in BusFormBase)BusFormBaseinline
m_ButtonCancel (defined in BusFormBase)BusFormBaseprotected
m_buttonOK (defined in BusFormBase)BusFormBaseprotected
m_checkBoxCtrlVoltage (defined in BusFormBase)BusFormBaseprotected
m_checkBoxFault (defined in BusFormBase)BusFormBaseprotected
m_checkBoxPlotData (defined in BusFormBase)BusFormBaseprotected
m_checkBoxSlackBus (defined in BusFormBase)BusFormBaseprotected
m_checkBoxStabFault (defined in BusFormBase)BusFormBaseprotected
m_choiceCtrlVoltage (defined in BusFormBase)BusFormBaseprotected
m_choiceFaultPlace (defined in BusFormBase)BusFormBaseprotected
m_choiceFaultType (defined in BusFormBase)BusFormBaseprotected
m_choiceNomVoltage (defined in BusFormBase)BusFormBaseprotected
m_notebook (defined in BusFormBase)BusFormBaseprotected
m_panelFault (defined in BusFormBase)BusFormBaseprotected
m_panelGeneral (defined in BusFormBase)BusFormBaseprotected
m_panelStability (defined in BusFormBase)BusFormBaseprotected
m_staticTextFaultPlace (defined in BusFormBase)BusFormBaseprotected
m_staticTextFaultResistance (defined in BusFormBase)BusFormBaseprotected
m_staticTextFaultType (defined in BusFormBase)BusFormBaseprotected
m_staticTextName (defined in BusFormBase)BusFormBaseprotected
m_staticTextNomVoltage (defined in BusFormBase)BusFormBaseprotected
m_staticTextPU_1 (defined in BusFormBase)BusFormBaseprotected
m_staticTextPU_2 (defined in BusFormBase)BusFormBaseprotected
m_staticTextPU_3 (defined in BusFormBase)BusFormBaseprotected
m_staticTextPU_4 (defined in BusFormBase)BusFormBaseprotected
m_staticTextReactance (defined in BusFormBase)BusFormBaseprotected
m_staticTextS_1 (defined in BusFormBase)BusFormBaseprotected
m_staticTextS_2 (defined in BusFormBase)BusFormBaseprotected
m_staticTextStabFaultLength (defined in BusFormBase)BusFormBaseprotected
m_staticTextStabFaultReactance (defined in BusFormBase)BusFormBaseprotected
m_staticTextStabFaultResistance (defined in BusFormBase)BusFormBaseprotected
m_staticTextStabFaultTime (defined in BusFormBase)BusFormBaseprotected
m_textCtrlCtrlVoltage (defined in BusFormBase)BusFormBaseprotected
m_textCtrlFaultReactance (defined in BusFormBase)BusFormBaseprotected
m_textCtrlFaultResistance (defined in BusFormBase)BusFormBaseprotected
m_textCtrlName (defined in BusFormBase)BusFormBaseprotected
m_textCtrlNomVoltage (defined in BusFormBase)BusFormBaseprotected
m_textCtrlStabFaultLength (defined in BusFormBase)BusFormBaseprotected
m_textCtrlStabFaultReactance (defined in BusFormBase)BusFormBaseprotected
m_textCtrlStabFaultResistance (defined in BusFormBase)BusFormBaseprotected
m_textCtrlStabFaultTime (defined in BusFormBase)BusFormBaseprotected
OnButtonCancelClick(wxCommandEvent &event) (defined in BusFormBase)BusFormBaseinlineprotectedvirtual
OnButtonOKClick(wxCommandEvent &event) (defined in BusFormBase)BusFormBaseinlineprotectedvirtual
OnControlledVoltageClick(wxCommandEvent &event) (defined in BusFormBase)BusFormBaseinlineprotectedvirtual
OnFaultTypeChoice(wxCommandEvent &event) (defined in BusFormBase)BusFormBaseinlineprotectedvirtual
OnInsertFaultClick(wxCommandEvent &event) (defined in BusFormBase)BusFormBaseinlineprotectedvirtual
OnInsertStabFaultClick(wxCommandEvent &event) (defined in BusFormBase)BusFormBaseinlineprotectedvirtual
OnNominalVoltageChoice(wxCommandEvent &event) (defined in BusFormBase)BusFormBaseinlineprotectedvirtual
~BusFormBase() (defined in BusFormBase)BusFormBasevirtual
-
- - - - diff --git a/docs/doxygen/html/class_bus_form_base.html b/docs/doxygen/html/class_bus_form_base.html deleted file mode 100644 index 6ac6ad6..0000000 --- a/docs/doxygen/html/class_bus_form_base.html +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - - - -BusFormBase Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- - -
-
-Inheritance diagram for BusFormBase:
-
-
- - -BusForm - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Public Member Functions

-wxStaticText * GetStaticTextName ()
 
-wxTextCtrl * GetTextCtrlName ()
 
-wxStaticText * GetStaticTextNomVoltage ()
 
-wxTextCtrl * GetTextCtrlNomVoltage ()
 
-wxChoice * GetChoiceNomVoltage ()
 
-wxCheckBox * GetCheckBoxCtrlVoltage ()
 
-wxTextCtrl * GetTextCtrlCtrlVoltage ()
 
-wxChoice * GetChoiceCtrlVoltage ()
 
-wxCheckBox * GetCheckBoxSlackBus ()
 
-wxPanel * GetPanelGeneral ()
 
-wxCheckBox * GetCheckBoxFault ()
 
-wxStaticText * GetStaticTextFaultType ()
 
-wxChoice * GetChoiceFaultType ()
 
-wxStaticText * GetStaticTextFaultPlace ()
 
-wxChoice * GetChoiceFaultPlace ()
 
-wxStaticText * GetStaticTextFaultResistance ()
 
-wxTextCtrl * GetTextCtrlFaultResistance ()
 
-wxStaticText * GetStaticTextPU_1 ()
 
-wxStaticText * GetStaticTextReactance ()
 
-wxTextCtrl * GetTextCtrlFaultReactance ()
 
-wxStaticText * GetStaticTextPU_2 ()
 
-wxPanel * GetPanelFault ()
 
-wxCheckBox * GetCheckBoxPlotData ()
 
-wxCheckBox * GetCheckBoxStabFault ()
 
-wxStaticText * GetStaticTextStabFaultTime ()
 
-wxTextCtrl * GetTextCtrlStabFaultTime ()
 
-wxStaticText * GetStaticTextS_1 ()
 
-wxStaticText * GetStaticTextStabFaultLength ()
 
-wxTextCtrl * GetTextCtrlStabFaultLength ()
 
-wxStaticText * GetStaticTextS_2 ()
 
-wxStaticText * GetStaticTextStabFaultResistance ()
 
-wxTextCtrl * GetTextCtrlStabFaultResistance ()
 
-wxStaticText * GetStaticTextPU_3 ()
 
-wxStaticText * GetStaticTextStabFaultReactance ()
 
-wxTextCtrl * GetTextCtrlStabFaultReactance ()
 
-wxStaticText * GetStaticTextPU_4 ()
 
-wxPanel * GetPanelStability ()
 
-wxNotebook * GetNotebook ()
 
-wxButton * GetButtonOK ()
 
-wxButton * GetButtonCancel ()
 
BusFormBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Bus"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
 
- - - - - - - - - - - - - - - -

-Protected Member Functions

-virtual void OnNominalVoltageChoice (wxCommandEvent &event)
 
-virtual void OnControlledVoltageClick (wxCommandEvent &event)
 
-virtual void OnInsertFaultClick (wxCommandEvent &event)
 
-virtual void OnFaultTypeChoice (wxCommandEvent &event)
 
-virtual void OnInsertStabFaultClick (wxCommandEvent &event)
 
-virtual void OnButtonOKClick (wxCommandEvent &event)
 
-virtual void OnButtonCancelClick (wxCommandEvent &event)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Attributes

-wxNotebook * m_notebook
 
-wxPanel * m_panelGeneral
 
-wxStaticText * m_staticTextName
 
-wxTextCtrl * m_textCtrlName
 
-wxStaticText * m_staticTextNomVoltage
 
-wxTextCtrl * m_textCtrlNomVoltage
 
-wxChoice * m_choiceNomVoltage
 
-wxCheckBox * m_checkBoxCtrlVoltage
 
-wxTextCtrl * m_textCtrlCtrlVoltage
 
-wxChoice * m_choiceCtrlVoltage
 
-wxCheckBox * m_checkBoxSlackBus
 
-wxPanel * m_panelFault
 
-wxCheckBox * m_checkBoxFault
 
-wxStaticText * m_staticTextFaultType
 
-wxChoice * m_choiceFaultType
 
-wxStaticText * m_staticTextFaultPlace
 
-wxChoice * m_choiceFaultPlace
 
-wxStaticText * m_staticTextFaultResistance
 
-wxTextCtrl * m_textCtrlFaultResistance
 
-wxStaticText * m_staticTextPU_1
 
-wxStaticText * m_staticTextReactance
 
-wxTextCtrl * m_textCtrlFaultReactance
 
-wxStaticText * m_staticTextPU_2
 
-wxPanel * m_panelStability
 
-wxCheckBox * m_checkBoxPlotData
 
-wxCheckBox * m_checkBoxStabFault
 
-wxStaticText * m_staticTextStabFaultTime
 
-wxTextCtrl * m_textCtrlStabFaultTime
 
-wxStaticText * m_staticTextS_1
 
-wxStaticText * m_staticTextStabFaultLength
 
-wxTextCtrl * m_textCtrlStabFaultLength
 
-wxStaticText * m_staticTextS_2
 
-wxStaticText * m_staticTextStabFaultResistance
 
-wxTextCtrl * m_textCtrlStabFaultResistance
 
-wxStaticText * m_staticTextPU_3
 
-wxStaticText * m_staticTextStabFaultReactance
 
-wxTextCtrl * m_textCtrlStabFaultReactance
 
-wxStaticText * m_staticTextPU_4
 
-wxButton * m_buttonOK
 
-wxButton * m_ButtonCancel
 
-

Detailed Description

-
-

Definition at line 49 of file ElementForm.h.

-

The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/doxygen/html/class_bus_form_base.js b/docs/doxygen/html/class_bus_form_base.js deleted file mode 100644 index 9f341f2..0000000 --- a/docs/doxygen/html/class_bus_form_base.js +++ /dev/null @@ -1,92 +0,0 @@ -var class_bus_form_base = -[ - [ "BusFormBase", "class_bus_form_base.html#ac1120978e7aa07573b91813a8ae68a57", null ], - [ "~BusFormBase", "class_bus_form_base.html#a1de759d6ea9d3ec462f6c6e57ce4ae65", null ], - [ "GetButtonCancel", "class_bus_form_base.html#acf8bd66a3a96a1eed23d011b987a0c3d", null ], - [ "GetButtonOK", "class_bus_form_base.html#ad21eac8e9b4bae9eeb6d6b74b0504917", null ], - [ "GetCheckBoxCtrlVoltage", "class_bus_form_base.html#afc825c5f3a39d9853d82ae9f88a2b4c4", null ], - [ "GetCheckBoxFault", "class_bus_form_base.html#ab4d194132dd3d327f33cbe91e324537a", null ], - [ "GetCheckBoxPlotData", "class_bus_form_base.html#a5952c32662024cf8895e8770a0988b88", null ], - [ "GetCheckBoxSlackBus", "class_bus_form_base.html#a5a912a40403f046e7d0e495cb5d18768", null ], - [ "GetCheckBoxStabFault", "class_bus_form_base.html#a65fc5c09ea6d29267fdec67a353c0a46", null ], - [ "GetChoiceCtrlVoltage", "class_bus_form_base.html#a82fe4711262bffeb2bb4bb442e1252ac", null ], - [ "GetChoiceFaultPlace", "class_bus_form_base.html#ada95b25afb1d645438a2d19e580c996d", null ], - [ "GetChoiceFaultType", "class_bus_form_base.html#a00ab2e9982bb5e53dbec2755f00c440f", null ], - [ "GetChoiceNomVoltage", "class_bus_form_base.html#a1e36c6d5f70746232c50b201c1fd2155", null ], - [ "GetNotebook", "class_bus_form_base.html#a86f11b43c8b8762eba2233219590638c", null ], - [ "GetPanelFault", "class_bus_form_base.html#ac64b7fddaa3ffe0e7671b920495cfa9f", null ], - [ "GetPanelGeneral", "class_bus_form_base.html#a9852553d782d38de865ba5c5960983a4", null ], - [ "GetPanelStability", "class_bus_form_base.html#a2ca2f93c9c6e26d359dca609b1ceaf97", null ], - [ "GetStaticTextFaultPlace", "class_bus_form_base.html#ae452c5575974492125f1568338c8b9ae", null ], - [ "GetStaticTextFaultResistance", "class_bus_form_base.html#a801768a5a9d92a52f69fb3eeb3ad0406", null ], - [ "GetStaticTextFaultType", "class_bus_form_base.html#abd3346fc4bdb1cf185138043359e324a", null ], - [ "GetStaticTextName", "class_bus_form_base.html#ab73005fe27a337b523a5f272d4b82bea", null ], - [ "GetStaticTextNomVoltage", "class_bus_form_base.html#a63e68c3239ba0848e6d2d668dd18cfd1", null ], - [ "GetStaticTextPU_1", "class_bus_form_base.html#a2c08563d7229b417bb4138ee7c279d58", null ], - [ "GetStaticTextPU_2", "class_bus_form_base.html#abf7d8daf69f4133fc8175a7653b8ff99", null ], - [ "GetStaticTextPU_3", "class_bus_form_base.html#a6be144296e304131dcb1699d9ba9ad81", null ], - [ "GetStaticTextPU_4", "class_bus_form_base.html#a190710be297fd8e6d7f2c51e78649a47", null ], - [ "GetStaticTextReactance", "class_bus_form_base.html#a08a8bef4d3a9043fd28ad6da2370e5c5", null ], - [ "GetStaticTextS_1", "class_bus_form_base.html#a60f3d4e6c52f15cd078cfcc14eb6f621", null ], - [ "GetStaticTextS_2", "class_bus_form_base.html#a8d5b1711fddb03dd93655a6427bdf482", null ], - [ "GetStaticTextStabFaultLength", "class_bus_form_base.html#ace34b60ad7f00f16e1b75994326cab45", null ], - [ "GetStaticTextStabFaultReactance", "class_bus_form_base.html#aaac7957c8de855891e7e102562ca722f", null ], - [ "GetStaticTextStabFaultResistance", "class_bus_form_base.html#ae423bd94fc53bce76329dcb7dafc524e", null ], - [ "GetStaticTextStabFaultTime", "class_bus_form_base.html#aa017dca9dccd43a28236173370b89bb3", null ], - [ "GetTextCtrlCtrlVoltage", "class_bus_form_base.html#a36b8dc398f13c546c63b6ab622eaf3dd", null ], - [ "GetTextCtrlFaultReactance", "class_bus_form_base.html#affaa6a2355ae588b3f6da69b92ba90b0", null ], - [ "GetTextCtrlFaultResistance", "class_bus_form_base.html#aff5d6c90e212f2ca0fa4856b65dcdb15", null ], - [ "GetTextCtrlName", "class_bus_form_base.html#a3a1954a4465bbdace9170426d9caa37b", null ], - [ "GetTextCtrlNomVoltage", "class_bus_form_base.html#a017ddcc57c0a2534e3e2b6a90180ff2d", null ], - [ "GetTextCtrlStabFaultLength", "class_bus_form_base.html#a97c195c038c7bac1ec32d69c87d7f3b6", null ], - [ "GetTextCtrlStabFaultReactance", "class_bus_form_base.html#a12379c4e025fd8416f57d5027ffe6481", null ], - [ "GetTextCtrlStabFaultResistance", "class_bus_form_base.html#aae93403e83e2c7f5e2a769a2bffccd83", null ], - [ "GetTextCtrlStabFaultTime", "class_bus_form_base.html#aac4df99b23e332ed5c950ddbc7247715", null ], - [ "OnButtonCancelClick", "class_bus_form_base.html#aad9b945cf9842a88b1e61085963eab7a", null ], - [ "OnButtonOKClick", "class_bus_form_base.html#a9737e676f0eb420635a0acf49a0f7f2e", null ], - [ "OnControlledVoltageClick", "class_bus_form_base.html#af0c5a0347c1b7fd2a5bdaad95e4574e1", null ], - [ "OnFaultTypeChoice", "class_bus_form_base.html#af5b28bc2cd481ebc7a3bb99261727683", null ], - [ "OnInsertFaultClick", "class_bus_form_base.html#a617c029a5b0210fea72f012ab36f6c75", null ], - [ "OnInsertStabFaultClick", "class_bus_form_base.html#a7d827c0d4128a4f6fd83dc23396bb894", null ], - [ "OnNominalVoltageChoice", "class_bus_form_base.html#adac2978ce17e56e8ad03d2f7da7be343", null ], - [ "m_ButtonCancel", "class_bus_form_base.html#aa9546384b368a06197565391b6c38315", null ], - [ "m_buttonOK", "class_bus_form_base.html#ab5b4dc715c6d9fde94f9cfa5a984bf11", null ], - [ "m_checkBoxCtrlVoltage", "class_bus_form_base.html#ad9c07ce14e481e6d20062ddeb3464675", null ], - [ "m_checkBoxFault", "class_bus_form_base.html#a5270a367a652e48303e6470ed07398e6", null ], - [ "m_checkBoxPlotData", "class_bus_form_base.html#a71e4382ed47ed4dc5c09c26fc9369729", null ], - [ "m_checkBoxSlackBus", "class_bus_form_base.html#a63f007f4ff46c8dcd69dec2143aa7c55", null ], - [ "m_checkBoxStabFault", "class_bus_form_base.html#a203dbfd80d3eb784d7c1606aea5426a7", null ], - [ "m_choiceCtrlVoltage", "class_bus_form_base.html#aedb47f128db9b468dd2a58ad73df74b1", null ], - [ "m_choiceFaultPlace", "class_bus_form_base.html#aca83346b86e9a3b13447111e109c99e3", null ], - [ "m_choiceFaultType", "class_bus_form_base.html#af259e49af9eaa04b29b193c73ba2d9de", null ], - [ "m_choiceNomVoltage", "class_bus_form_base.html#afb24ac3dd51199ac3984469bb7df3fce", null ], - [ "m_notebook", "class_bus_form_base.html#a7609afe675dab29a19ec718f0881f9fc", null ], - [ "m_panelFault", "class_bus_form_base.html#a6139eada122f07b35cbcbd2a3d159e76", null ], - [ "m_panelGeneral", "class_bus_form_base.html#a1572a94c93318c849c110ec7e624cdec", null ], - [ "m_panelStability", "class_bus_form_base.html#ab29a9e37fdfa9b3c20ce6aad1191ee69", null ], - [ "m_staticTextFaultPlace", "class_bus_form_base.html#a4c9495ac8f926d191d8cbae7424e20d7", null ], - [ "m_staticTextFaultResistance", "class_bus_form_base.html#a5bb8c266725602ab79ea8e72490a734a", null ], - [ "m_staticTextFaultType", "class_bus_form_base.html#affdfd06744bc4def0c85f658f4682d60", null ], - [ "m_staticTextName", "class_bus_form_base.html#a32e8874976056e0756392c2344e475bc", null ], - [ "m_staticTextNomVoltage", "class_bus_form_base.html#a2a8dfe41d7f36f97131fde680273f3c8", null ], - [ "m_staticTextPU_1", "class_bus_form_base.html#a03430fef9d5e98ba3aabd829e1505453", null ], - [ "m_staticTextPU_2", "class_bus_form_base.html#a5b465616f6c15b732e4ef27503bfdf45", null ], - [ "m_staticTextPU_3", "class_bus_form_base.html#a3bccc8160428b6c11a7606426b6004f8", null ], - [ "m_staticTextPU_4", "class_bus_form_base.html#a166ac9753433cb57901ee52803de4b70", null ], - [ "m_staticTextReactance", "class_bus_form_base.html#af5fbe5a2f9281bfaec01d0b6d158a71b", null ], - [ "m_staticTextS_1", "class_bus_form_base.html#a30a89bad9ebb75bb3f80d88933188e76", null ], - [ "m_staticTextS_2", "class_bus_form_base.html#adc4f4cf29badd77f8e648fddeef4ce94", null ], - [ "m_staticTextStabFaultLength", "class_bus_form_base.html#a7cf16a658b8180bc61f644879c3fe8e9", null ], - [ "m_staticTextStabFaultReactance", "class_bus_form_base.html#a469a049ae99c868e80797a0b087a8f11", null ], - [ "m_staticTextStabFaultResistance", "class_bus_form_base.html#a502d6cce63b416cf8aa93b2fc97357ec", null ], - [ "m_staticTextStabFaultTime", "class_bus_form_base.html#af8503eb53503f90af53b8206c16e4629", null ], - [ "m_textCtrlCtrlVoltage", "class_bus_form_base.html#ae9d2477b6b6cfbb03af205a96d5c4928", null ], - [ "m_textCtrlFaultReactance", "class_bus_form_base.html#afb7b2bed6e9d25865022dfd10baadc58", null ], - [ "m_textCtrlFaultResistance", "class_bus_form_base.html#a7b5d970aa19f06714b66366100651994", null ], - [ "m_textCtrlName", "class_bus_form_base.html#ab51f67bf4aa7de715e867203af072a05", null ], - [ "m_textCtrlNomVoltage", "class_bus_form_base.html#a60aaf017c107d9eef9df57f0368ef1e6", null ], - [ "m_textCtrlStabFaultLength", "class_bus_form_base.html#ae6c7cbbf7aa4fa53647b3a00f1c3fffc", null ], - [ "m_textCtrlStabFaultReactance", "class_bus_form_base.html#a8731cdb29c22002ed2d63bceaba322a5", null ], - [ "m_textCtrlStabFaultResistance", "class_bus_form_base.html#aa206919e95a050a9c9b2a471e6b5c4c9", null ], - [ "m_textCtrlStabFaultTime", "class_bus_form_base.html#a5345f4bf4c3747d167ae27b06ea87222", null ] -]; \ No newline at end of file diff --git a/docs/doxygen/html/class_bus_form_base.png b/docs/doxygen/html/class_bus_form_base.png deleted file mode 100644 index 381d32f..0000000 Binary files a/docs/doxygen/html/class_bus_form_base.png and /dev/null differ diff --git a/docs/doxygen/html/class_camera.html b/docs/doxygen/html/class_camera.html index 44bca8c..f5f8442 100644 --- a/docs/doxygen/html/class_camera.html +++ b/docs/doxygen/html/class_camera.html @@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('class_camera.html','');});

Class responsible for the correct visualization of the elements on screen. More...

-

#include <Camera.h>

+

#include <Camera.h>

@@ -159,11 +159,9 @@ double  - - - - - + + + - - @@ -110,68 +106,32 @@ $(document).ready(function(){initNavTree('class_chart_view.html','');}); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

m_zoomMax = 3.0

Class responsible for the correct visualization of the elements on screen.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017
- -

Definition at line 30 of file Camera.h.


The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_capacitor.html b/docs/doxygen/html/class_capacitor.html index 3ebe8fc..6783b08 100644 --- a/docs/doxygen/html/class_capacitor.html +++ b/docs/doxygen/html/class_capacitor.html @@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('class_capacitor.html','');});

Shunt capactior power element. More...

-

#include <Capacitor.h>

+

#include <Capacitor.h>

Inheritance diagram for Capacitor:
@@ -539,8 +539,6 @@ void 
DrawGround (wxPoi

Shunt capactior power element.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
06/10/2017
- -

Definition at line 38 of file Capacitor.h.

Member Function Documentation

◆ AddParent()

@@ -587,8 +585,6 @@ void 
DrawGround (wxPoi

Reimplemented from Element.

-

Definition at line 24 of file Capacitor.cpp.

- @@ -625,8 +621,6 @@ void 
DrawGround (wxPoi

Reimplemented from Shunt.

-

Definition at line 134 of file Capacitor.cpp.

- @@ -674,8 +668,6 @@ void 
DrawGround (wxPoi

Reimplemented from Element.

-

Definition at line 55 of file Capacitor.cpp.

- @@ -713,8 +705,6 @@ void 
DrawGround (wxPoi

Reimplemented from Element.

-

Definition at line 127 of file Capacitor.cpp.

- @@ -745,8 +735,6 @@ void 
DrawGround (wxPoi

Reimplemented from Element.

-

Definition at line 180 of file Capacitor.cpp.

- @@ -777,8 +765,6 @@ void 
DrawGround (wxPoi

Reimplemented from Element.

-

Definition at line 187 of file Capacitor.cpp.

- @@ -815,8 +801,6 @@ void 
DrawGround (wxPoi

Reimplemented from Shunt.

-

Definition at line 140 of file Capacitor.cpp.

- @@ -853,8 +837,6 @@ void 
DrawGround (wxPoi

Reimplemented from Element.

-

Definition at line 115 of file Capacitor.cpp.

- @@ -903,13 +885,11 @@ void 
DrawGround (wxPoi

Reimplemented from Element.

-

Definition at line 145 of file Capacitor.cpp.

-
The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_chart_view-members.html b/docs/doxygen/html/class_chart_view-members.html index 102d504..d4480ea 100644 --- a/docs/doxygen/html/class_chart_view-members.html +++ b/docs/doxygen/html/class_chart_view-members.html @@ -94,14 +94,10 @@ $(document).ready(function(){initNavTree('class_chart_view.html','');});
AllToYAxis(wxTreeItemId root) (defined in ChartView)ChartViewprotectedvirtual
BuildColourList() (defined in ChartView)ChartViewprotectedvirtual
ChartView(wxWindow *parent, std::vector< ElementPlotData > epdList, std::vector< double > time) (defined in ChartView)ChartView
ChartViewBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Chart viewer"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_FRAME_STYLE) (defined in ChartViewBase)ChartViewBase
Fit() (defined in ChartView)ChartView
GetActiveCurvesCSV() (defined in ChartView)ChartViewprotectedvirtual
GetActivePlotData(wxTreeItemId root, std::vector< PlotData *> &plotDataList) (defined in ChartView)ChartViewprotectedvirtual
GetMenuBar() (defined in ChartViewBase)ChartViewBaseinline
Fit() (defined in ChartView)ChartView
GetActiveCurvesCSV() (defined in ChartView)ChartViewprotectedvirtual
GetActivePlotData(wxTreeItemId root, std::vector< PlotData *> &plotDataList) (defined in ChartView)ChartViewprotectedvirtual
GetNextColour() (defined in ChartView)ChartViewprotectedvirtual
GetPgMgr() (defined in ChartViewBase)ChartViewBaseinline
GetTreeCtrl() (defined in ChartViewBase)ChartViewBaseinline
m_chartTitle (defined in ChartView)ChartViewprotected
m_colourList (defined in ChartView)ChartViewprotected
m_coords (defined in ChartView)ChartViewprotected
m_hideGrid (defined in ChartView)ChartViewprotected
m_itColourList (defined in ChartView)ChartViewprotected
m_leg (defined in ChartView)ChartViewprotected
m_menuBar (defined in ChartViewBase)ChartViewBaseprotected
m_menuFile (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemDarkTheme (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemExit (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemExportCSV (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemFit (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemSaveImage (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemSendToClipboard (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemSeparator_1 (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemSeparator_2 (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemShowCoordinates (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemShowGrid (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemShowLabel (defined in ChartViewBase)ChartViewBaseprotected
m_menuView (defined in ChartViewBase)ChartViewBaseprotected
m_mpWindow (defined in ChartView)ChartViewprotected
m_pgMgr (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropAxisLimit (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropChartProp (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropChartTitle (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropColor (defined in ChartView)ChartViewprotected
m_pgPropDraw (defined in ChartViewBase)ChartViewBaseprotected
m_pgProplineAxis (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropLineProp (defined in ChartViewBase)ChartViewBaseprotected
m_pgProplineThick (defined in ChartViewBase)ChartViewBaseprotected
m_pgProplineType (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMargins (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMarginsBot (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMarginsLeft (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMarginsRight (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMarginsUp (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropXLabel (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropXMax (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropXMin (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropYLabel (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropYMax (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropYMin (defined in ChartViewBase)ChartViewBaseprotected
m_showCoords (defined in ChartView)ChartViewprotected
m_showLeg (defined in ChartView)ChartViewprotected
m_time (defined in ChartView)ChartViewprotected
m_treeCtrl (defined in ChartViewBase)ChartViewBaseprotected
m_treeTimeID (defined in ChartView)ChartViewprotected
m_xaxis (defined in ChartView)ChartViewprotected
m_xAxisValues (defined in ChartView)ChartViewprotected
m_yaxis (defined in ChartView)ChartViewprotected
OnMenuDarkThemeClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuExitClick(wxCommandEvent &event) (defined in ChartView)ChartViewinlineprotectedvirtual
OnMenuExpCSVClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuFitClick(wxCommandEvent &event) (defined in ChartView)ChartViewinlineprotectedvirtual
OnMenuSaveImageClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuSendClipClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuShowCoordinatesClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuShowGridClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuShowLabelClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnPropertyGridChange(wxPropertyGridEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnTreeItemActivated(wxTreeEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnTreeItemSelectionChanged(wxTreeEvent &event) (defined in ChartView)ChartViewprotectedvirtual
SetMPWindow() (defined in ChartView)ChartViewprotectedvirtual
SetTreectrl() (defined in ChartView)ChartViewprotectedvirtual
UpdateAllPlots(wxTreeItemId root) (defined in ChartView)ChartViewprotectedvirtual
UpdatePlot(bool fit=true) (defined in ChartView)ChartView
~ChartView() (defined in ChartView)ChartViewvirtual
~ChartViewBase() (defined in ChartViewBase)ChartViewBasevirtual
m_treeTimeID (defined in ChartView)ChartViewprotected
m_xaxis (defined in ChartView)ChartViewprotected
m_xAxisValues (defined in ChartView)ChartViewprotected
m_yaxis (defined in ChartView)ChartViewprotected
OnMenuDarkThemeClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuExitClick(wxCommandEvent &event) (defined in ChartView)ChartViewinlineprotectedvirtual
OnMenuExpCSVClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuFitClick(wxCommandEvent &event) (defined in ChartView)ChartViewinlineprotectedvirtual
OnMenuSaveImageClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuSendClipClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuShowCoordinatesClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuShowGridClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnMenuShowLabelClick(wxCommandEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnPropertyGridChange(wxPropertyGridEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnTreeItemActivated(wxTreeEvent &event) (defined in ChartView)ChartViewprotectedvirtual
OnTreeItemSelectionChanged(wxTreeEvent &event) (defined in ChartView)ChartViewprotectedvirtual
SetMPWindow() (defined in ChartView)ChartViewprotectedvirtual
SetTreectrl() (defined in ChartView)ChartViewprotectedvirtual
UpdateAllPlots(wxTreeItemId root) (defined in ChartView)ChartViewprotectedvirtual
UpdatePlot(bool fit=true) (defined in ChartView)ChartView
~ChartView() (defined in ChartView)ChartViewvirtual
diff --git a/docs/doxygen/html/class_chart_view.html b/docs/doxygen/html/class_chart_view.html index 99d195f..9eea6b9 100644 --- a/docs/doxygen/html/class_chart_view.html +++ b/docs/doxygen/html/class_chart_view.html @@ -97,14 +97,13 @@ $(document).ready(function(){initNavTree('class_chart_view.html','');});

This class is responsible to manage the charts generated in the transient electromechanical studies. More...

-

#include <ChartView.h>

+

#include <ChartView.h>

Inheritance diagram for ChartView:
-ChartViewBase
@@ -119,19 +118,6 @@ void  - - - - - - - - -
Fit ()
void UpdatePlot (bool fit=true)
 
- Public Member Functions inherited from ChartViewBase
-wxMenuBar * GetMenuBar ()
 
-wxTreeCtrl * GetTreeCtrl ()
 
-wxPropertyGridManager * GetPgMgr ()
 
ChartViewBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Chart viewer"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_FRAME_STYLE)
 
@@ -249,122 +235,14 @@ std::vector< wxColour >  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Protected Member Functions

std::vector< wxColour >::iterator m_itColourList
 
- Protected Attributes inherited from ChartViewBase
-wxMenuBar * m_menuBar
 
-wxMenu * m_menuFile
 
-wxMenuItem * m_menuItemSaveImage
 
-wxMenuItem * m_menuItemSendToClipboard
 
-wxMenuItem * m_menuItemExportCSV
 
-wxMenuItem * m_menuItemSeparator_1
 
-wxMenuItem * m_menuItemExit
 
-wxMenu * m_menuView
 
-wxMenuItem * m_menuItemFit
 
-wxMenuItem * m_menuItemSeparator_2
 
-wxMenuItem * m_menuItemShowGrid
 
-wxMenuItem * m_menuItemShowLabel
 
-wxMenuItem * m_menuItemShowCoordinates
 
-wxMenuItem * m_menuItemDarkTheme
 
-wxTreeCtrl * m_treeCtrl
 
-wxPropertyGridManager * m_pgMgr
 
-wxPGProperty * m_pgPropLineProp
 
-wxPGProperty * m_pgPropDraw
 
-wxPGProperty * m_pgProplineThick
 
-wxPGProperty * m_pgProplineType
 
-wxPGProperty * m_pgProplineAxis
 
-wxPGProperty * m_pgPropChartProp
 
-wxPGProperty * m_pgPropChartTitle
 
-wxPGProperty * m_pgPropXLabel
 
-wxPGProperty * m_pgPropYLabel
 
-wxPGProperty * m_pgPropMargins
 
-wxPGProperty * m_pgPropMarginsUp
 
-wxPGProperty * m_pgPropMarginsBot
 
-wxPGProperty * m_pgPropMarginsLeft
 
-wxPGProperty * m_pgPropMarginsRight
 
-wxPGProperty * m_pgPropAxisLimit
 
-wxPGProperty * m_pgPropXMin
 
-wxPGProperty * m_pgPropXMax
 
-wxPGProperty * m_pgPropYMin
 
-wxPGProperty * m_pgPropYMax
 

Detailed Description

This class is responsible to manage the charts generated in the transient electromechanical studies.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017
- -

Definition at line 40 of file ChartView.h.


The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_chart_view.png b/docs/doxygen/html/class_chart_view.png index be9ba87..ca51379 100644 Binary files a/docs/doxygen/html/class_chart_view.png and b/docs/doxygen/html/class_chart_view.png differ diff --git a/docs/doxygen/html/class_chart_view_base-members.html b/docs/doxygen/html/class_chart_view_base-members.html deleted file mode 100644 index 9708ca4..0000000 --- a/docs/doxygen/html/class_chart_view_base-members.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - -Member List - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ChartViewBase Member List
-
-
- -

This is the complete list of members for ChartViewBase, including all inherited members.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ChartViewBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Chart viewer"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_FRAME_STYLE) (defined in ChartViewBase)ChartViewBase
GetMenuBar() (defined in ChartViewBase)ChartViewBaseinline
GetPgMgr() (defined in ChartViewBase)ChartViewBaseinline
GetTreeCtrl() (defined in ChartViewBase)ChartViewBaseinline
m_menuBar (defined in ChartViewBase)ChartViewBaseprotected
m_menuFile (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemDarkTheme (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemExit (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemExportCSV (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemFit (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemSaveImage (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemSendToClipboard (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemSeparator_1 (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemSeparator_2 (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemShowCoordinates (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemShowGrid (defined in ChartViewBase)ChartViewBaseprotected
m_menuItemShowLabel (defined in ChartViewBase)ChartViewBaseprotected
m_menuView (defined in ChartViewBase)ChartViewBaseprotected
m_pgMgr (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropAxisLimit (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropChartProp (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropChartTitle (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropDraw (defined in ChartViewBase)ChartViewBaseprotected
m_pgProplineAxis (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropLineProp (defined in ChartViewBase)ChartViewBaseprotected
m_pgProplineThick (defined in ChartViewBase)ChartViewBaseprotected
m_pgProplineType (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMargins (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMarginsBot (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMarginsLeft (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMarginsRight (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropMarginsUp (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropXLabel (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropXMax (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropXMin (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropYLabel (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropYMax (defined in ChartViewBase)ChartViewBaseprotected
m_pgPropYMin (defined in ChartViewBase)ChartViewBaseprotected
m_treeCtrl (defined in ChartViewBase)ChartViewBaseprotected
OnMenuDarkThemeClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnMenuExitClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnMenuExpCSVClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnMenuFitClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnMenuSaveImageClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnMenuSendClipClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnMenuShowCoordinatesClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnMenuShowGridClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnMenuShowLabelClick(wxCommandEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnPropertyGridChange(wxPropertyGridEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnTreeItemActivated(wxTreeEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
OnTreeItemSelectionChanged(wxTreeEvent &event) (defined in ChartViewBase)ChartViewBaseinlineprotectedvirtual
~ChartViewBase() (defined in ChartViewBase)ChartViewBasevirtual
-
- - - - diff --git a/docs/doxygen/html/class_chart_view_base.html b/docs/doxygen/html/class_chart_view_base.html deleted file mode 100644 index 7f631eb..0000000 --- a/docs/doxygen/html/class_chart_view_base.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - - -ChartViewBase Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- - -
-
-Inheritance diagram for ChartViewBase:
-
-
- - -ChartView - -
- - - - - - - - - - -

-Public Member Functions

-wxMenuBar * GetMenuBar ()
 
-wxTreeCtrl * GetTreeCtrl ()
 
-wxPropertyGridManager * GetPgMgr ()
 
ChartViewBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Chart viewer"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_FRAME_STYLE)
 
- - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Member Functions

-virtual void OnMenuSaveImageClick (wxCommandEvent &event)
 
-virtual void OnMenuSendClipClick (wxCommandEvent &event)
 
-virtual void OnMenuExpCSVClick (wxCommandEvent &event)
 
-virtual void OnMenuExitClick (wxCommandEvent &event)
 
-virtual void OnMenuFitClick (wxCommandEvent &event)
 
-virtual void OnMenuShowGridClick (wxCommandEvent &event)
 
-virtual void OnMenuShowLabelClick (wxCommandEvent &event)
 
-virtual void OnMenuShowCoordinatesClick (wxCommandEvent &event)
 
-virtual void OnMenuDarkThemeClick (wxCommandEvent &event)
 
-virtual void OnTreeItemActivated (wxTreeEvent &event)
 
-virtual void OnTreeItemSelectionChanged (wxTreeEvent &event)
 
-virtual void OnPropertyGridChange (wxPropertyGridEvent &event)
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Protected Attributes

-wxMenuBar * m_menuBar
 
-wxMenu * m_menuFile
 
-wxMenuItem * m_menuItemSaveImage
 
-wxMenuItem * m_menuItemSendToClipboard
 
-wxMenuItem * m_menuItemExportCSV
 
-wxMenuItem * m_menuItemSeparator_1
 
-wxMenuItem * m_menuItemExit
 
-wxMenu * m_menuView
 
-wxMenuItem * m_menuItemFit
 
-wxMenuItem * m_menuItemSeparator_2
 
-wxMenuItem * m_menuItemShowGrid
 
-wxMenuItem * m_menuItemShowLabel
 
-wxMenuItem * m_menuItemShowCoordinates
 
-wxMenuItem * m_menuItemDarkTheme
 
-wxTreeCtrl * m_treeCtrl
 
-wxPropertyGridManager * m_pgMgr
 
-wxPGProperty * m_pgPropLineProp
 
-wxPGProperty * m_pgPropDraw
 
-wxPGProperty * m_pgProplineThick
 
-wxPGProperty * m_pgProplineType
 
-wxPGProperty * m_pgProplineAxis
 
-wxPGProperty * m_pgPropChartProp
 
-wxPGProperty * m_pgPropChartTitle
 
-wxPGProperty * m_pgPropXLabel
 
-wxPGProperty * m_pgPropYLabel
 
-wxPGProperty * m_pgPropMargins
 
-wxPGProperty * m_pgPropMarginsUp
 
-wxPGProperty * m_pgPropMarginsBot
 
-wxPGProperty * m_pgPropMarginsLeft
 
-wxPGProperty * m_pgPropMarginsRight
 
-wxPGProperty * m_pgPropAxisLimit
 
-wxPGProperty * m_pgPropXMin
 
-wxPGProperty * m_pgPropXMax
 
-wxPGProperty * m_pgPropYMin
 
-wxPGProperty * m_pgPropYMax
 
-

Detailed Description

-
-

Definition at line 39 of file ChartViewBase.h.

-

The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/doxygen/html/class_chart_view_base.js b/docs/doxygen/html/class_chart_view_base.js deleted file mode 100644 index 3581af7..0000000 --- a/docs/doxygen/html/class_chart_view_base.js +++ /dev/null @@ -1,55 +0,0 @@ -var class_chart_view_base = -[ - [ "ChartViewBase", "class_chart_view_base.html#a491fa99972b27860b94e78c6e1745216", null ], - [ "~ChartViewBase", "class_chart_view_base.html#af306e9608d094a91919745c887bb181e", null ], - [ "GetMenuBar", "class_chart_view_base.html#ae03299107d6d4b75aa723abd8276764a", null ], - [ "GetPgMgr", "class_chart_view_base.html#ae8839884176bb6ceec1d1d153477a084", null ], - [ "GetTreeCtrl", "class_chart_view_base.html#af6593ae0442366b2eccc2d6a5e955a97", null ], - [ "OnMenuDarkThemeClick", "class_chart_view_base.html#a321240363d83ca86670fb4934f1d67f7", null ], - [ "OnMenuExitClick", "class_chart_view_base.html#aef79c958c41b225453204b16544fe6fb", null ], - [ "OnMenuExpCSVClick", "class_chart_view_base.html#a5f4f7a86703647a1380865cb58cd706d", null ], - [ "OnMenuFitClick", "class_chart_view_base.html#a27408a2fa4cc3c63a7655ddc6bca7412", null ], - [ "OnMenuSaveImageClick", "class_chart_view_base.html#a4b7cd79da101027b37493d018c9e872a", null ], - [ "OnMenuSendClipClick", "class_chart_view_base.html#a61bd67b67cbffc8a2e0ce1df62969d8c", null ], - [ "OnMenuShowCoordinatesClick", "class_chart_view_base.html#af2200f3be62850235149d40534b9f354", null ], - [ "OnMenuShowGridClick", "class_chart_view_base.html#a9b1f7be30ded13bf8f4d355489bc82f6", null ], - [ "OnMenuShowLabelClick", "class_chart_view_base.html#a23f74f17c47b4352def0919e9efd3afa", null ], - [ "OnPropertyGridChange", "class_chart_view_base.html#ae866653d71bc2a1323b35a2739c6c4a6", null ], - [ "OnTreeItemActivated", "class_chart_view_base.html#a0ab362bd15f37bf94201b6e40d0ba3fa", null ], - [ "OnTreeItemSelectionChanged", "class_chart_view_base.html#af57957557cef66ae2abbc6c7c125d9e5", null ], - [ "m_menuBar", "class_chart_view_base.html#a84dd44e402a650e86d2ff293fac12162", null ], - [ "m_menuFile", "class_chart_view_base.html#afbfb88d48b10e02cac353a472e1628fc", null ], - [ "m_menuItemDarkTheme", "class_chart_view_base.html#a7adac58739fe82b104e34bbf27fb1dc7", null ], - [ "m_menuItemExit", "class_chart_view_base.html#a407b4fc3b5f891ff37cd8475f0f6ab19", null ], - [ "m_menuItemExportCSV", "class_chart_view_base.html#a624ed8499a19a7cae28437dd54ccaa30", null ], - [ "m_menuItemFit", "class_chart_view_base.html#a70006384adb23f93d64612c20d50cd2f", null ], - [ "m_menuItemSaveImage", "class_chart_view_base.html#aef2fe75fb8e5f72673d24633ca40f4e6", null ], - [ "m_menuItemSendToClipboard", "class_chart_view_base.html#aa9d955087848cbe20c4bf50b149b4d0f", null ], - [ "m_menuItemSeparator_1", "class_chart_view_base.html#af952160ce42c32bfff6496f7d07fea99", null ], - [ "m_menuItemSeparator_2", "class_chart_view_base.html#a27f1cf05d785e4f230b3093ab807972c", null ], - [ "m_menuItemShowCoordinates", "class_chart_view_base.html#a250a4f7292e38ffadf609f07dbbc0323", null ], - [ "m_menuItemShowGrid", "class_chart_view_base.html#a8babad2afd97edf9cb0d0e10bf1dc7c6", null ], - [ "m_menuItemShowLabel", "class_chart_view_base.html#ad24acb1e08f0a4223df11a4e2d929710", null ], - [ "m_menuView", "class_chart_view_base.html#a237d5355111659d84fa4e61569deeecc", null ], - [ "m_pgMgr", "class_chart_view_base.html#adb24602e82869403f8ea40d71849fe0c", null ], - [ "m_pgPropAxisLimit", "class_chart_view_base.html#ad8c758cc9494a44e6ba66fbdec7884bd", null ], - [ "m_pgPropChartProp", "class_chart_view_base.html#a51f2301e489e6ca6309948c51953d2eb", null ], - [ "m_pgPropChartTitle", "class_chart_view_base.html#a4083de6c29b7ab0997217c32e246ee0b", null ], - [ "m_pgPropDraw", "class_chart_view_base.html#af69de67731b917ec6f5eef8d20e3e4c8", null ], - [ "m_pgProplineAxis", "class_chart_view_base.html#afd083ffdfe84b6f2460efdcd928c8edd", null ], - [ "m_pgPropLineProp", "class_chart_view_base.html#a34f689775bc42f1f11a7b84067a98808", null ], - [ "m_pgProplineThick", "class_chart_view_base.html#a561157aa85ca4ad02d28870b1c2c856a", null ], - [ "m_pgProplineType", "class_chart_view_base.html#aafb4ae39c6001ad8efb213ea54561b5d", null ], - [ "m_pgPropMargins", "class_chart_view_base.html#a9bcd17e77ca213af3c6cca1b05508d85", null ], - [ "m_pgPropMarginsBot", "class_chart_view_base.html#ac9b41d88147f15b2ce6d76f117bfff75", null ], - [ "m_pgPropMarginsLeft", "class_chart_view_base.html#a720211e750c1184bced8da8db3fb1438", null ], - [ "m_pgPropMarginsRight", "class_chart_view_base.html#afa436ffebb21ce63202333cc33f02b8d", null ], - [ "m_pgPropMarginsUp", "class_chart_view_base.html#a7c69cf95fa34405e07c420275aca35f4", null ], - [ "m_pgPropXLabel", "class_chart_view_base.html#a96122bb85c3bfbf72369b2a0b3ee9340", null ], - [ "m_pgPropXMax", "class_chart_view_base.html#a6b4dad71a2c76cc196f671c74c57bc38", null ], - [ "m_pgPropXMin", "class_chart_view_base.html#ab7fff2a1e52f784a92edc1e9808bf6a5", null ], - [ "m_pgPropYLabel", "class_chart_view_base.html#afef3a2f6f799ee3bcac9a796cddc0ada", null ], - [ "m_pgPropYMax", "class_chart_view_base.html#a43e25960f37484e564f8043b273760cd", null ], - [ "m_pgPropYMin", "class_chart_view_base.html#a0d66080c5a61b4a544111cd829cd88b8", null ], - [ "m_treeCtrl", "class_chart_view_base.html#adc3855389d4369940b7caafa0c446851", null ] -]; \ No newline at end of file diff --git a/docs/doxygen/html/class_chart_view_base.png b/docs/doxygen/html/class_chart_view_base.png deleted file mode 100644 index 3df1a98..0000000 Binary files a/docs/doxygen/html/class_chart_view_base.png and /dev/null differ diff --git a/docs/doxygen/html/class_connection_line.html b/docs/doxygen/html/class_connection_line.html index 4be8e58..a761661 100644 --- a/docs/doxygen/html/class_connection_line.html +++ b/docs/doxygen/html/class_connection_line.html @@ -97,7 +97,7 @@ $(document).ready(function(){initNavTree('class_connection_line.html','');});

Connection between two control elements or other connection line and an element. More...

-

#include <ConnectionLine.h>

+

#include <ConnectionLine.h>

Inheritance diagram for ConnectionLine:
@@ -532,8 +532,6 @@ Additional Inherited Members

Connection between two control elements or other connection line and an element.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017
- -

Definition at line 30 of file ConnectionLine.h.

Member Function Documentation

◆ Contains()

@@ -569,8 +567,6 @@ Additional Inherited Members

Implements Element.

-

Definition at line 53 of file ConnectionLine.cpp.

-
@@ -618,8 +614,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 33 of file ConnectionLine.cpp.

- @@ -650,8 +644,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 199 of file ConnectionLine.cpp.

- @@ -688,8 +680,6 @@ Additional Inherited Members

Implements Element.

-

Definition at line 61 of file ConnectionLine.cpp.

- @@ -726,8 +716,6 @@ Additional Inherited Members

Reimplemented from ControlElement.

-

Definition at line 158 of file ConnectionLine.cpp.

- @@ -764,8 +752,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 191 of file ConnectionLine.cpp.

- @@ -802,13 +788,11 @@ Additional Inherited Members

Reimplemented from ControlElement.

-

Definition at line 164 of file ConnectionLine.cpp.

-
The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_constant.html b/docs/doxygen/html/class_constant.html index 0e3e8f7..d7f45bd 100644 --- a/docs/doxygen/html/class_constant.html +++ b/docs/doxygen/html/class_constant.html @@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('class_constant.html','');});

A control element that provides a constant value. More...

-

#include <Constant.h>

+

#include <Constant.h>

Inheritance diagram for Constant:
@@ -479,8 +479,6 @@ Additional Inherited Members

A control element that provides a constant value.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017
- -

Definition at line 35 of file Constant.h.

Member Function Documentation

◆ Contains()

@@ -516,8 +514,6 @@ Additional Inherited Members

Implements Element.

-

Definition at line 42 of file Constant.h.

-
@@ -565,8 +561,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 35 of file Constant.cpp.

- @@ -597,8 +591,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 116 of file Constant.cpp.

- @@ -635,8 +627,6 @@ Additional Inherited Members

Implements Element.

-

Definition at line 43 of file Constant.h.

- @@ -673,8 +663,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 66 of file Constant.cpp.

- @@ -723,8 +711,6 @@ Additional Inherited Members

Reimplemented from Element.

-

Definition at line 55 of file Constant.cpp.

- @@ -755,13 +741,11 @@ Additional Inherited Members

Reimplemented from ControlElement.

-

Definition at line 124 of file Constant.cpp.

-
The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_constant_form-members.html b/docs/doxygen/html/class_constant_form-members.html index f1dd5aa..3dfd804 100644 --- a/docs/doxygen/html/class_constant_form-members.html +++ b/docs/doxygen/html/class_constant_form-members.html @@ -92,26 +92,12 @@ $(document).ready(function(){initNavTree('class_constant_form.html','');});

This is the complete list of members for ConstantForm, including all inherited members.

- - - - - - - - - - - - - - - - - - - - + + + + + +
ConstantForm(wxWindow *parent, Constant *constant) (defined in ConstantForm)ConstantForm
ConstantFormBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Constant"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE) (defined in ConstantFormBase)ConstantFormBase
GetButtonCancel() (defined in ConstantFormBase)ConstantFormBaseinline
GetButtonOK() (defined in ConstantFormBase)ConstantFormBaseinline
GetNotebook() (defined in ConstantFormBase)ConstantFormBaseinline
GetPanelGeneral() (defined in ConstantFormBase)ConstantFormBaseinline
GetStaticTextValue() (defined in ConstantFormBase)ConstantFormBaseinline
GetTextCtrlValue() (defined in ConstantFormBase)ConstantFormBaseinline
m_buttonCancel (defined in ConstantFormBase)ConstantFormBaseprotected
m_buttonOK (defined in ConstantFormBase)ConstantFormBaseprotected
m_constant (defined in ConstantForm)ConstantFormprotected
m_notebook (defined in ConstantFormBase)ConstantFormBaseprotected
m_panelGeneral (defined in ConstantFormBase)ConstantFormBaseprotected
m_parent (defined in ConstantForm)ConstantFormprotected
m_staticTextValue (defined in ConstantFormBase)ConstantFormBaseprotected
m_textCtrlValue (defined in ConstantFormBase)ConstantFormBaseprotected
OnCancelButtonClick(wxCommandEvent &event) (defined in ConstantForm)ConstantForminlineprotectedvirtual
OnOKButtonClick(wxCommandEvent &event) (defined in ConstantForm)ConstantFormprotectedvirtual
ValidateData() (defined in ConstantForm)ConstantFormvirtual
~ConstantForm() (defined in ConstantForm)ConstantFormvirtual
~ConstantFormBase() (defined in ConstantFormBase)ConstantFormBasevirtual
m_constant (defined in ConstantForm)ConstantFormprotected
m_parent (defined in ConstantForm)ConstantFormprotected
OnCancelButtonClick(wxCommandEvent &event) (defined in ConstantForm)ConstantForminlineprotectedvirtual
OnOKButtonClick(wxCommandEvent &event) (defined in ConstantForm)ConstantFormprotectedvirtual
ValidateData() (defined in ConstantForm)ConstantFormvirtual
~ConstantForm() (defined in ConstantForm)ConstantFormvirtual
diff --git a/docs/doxygen/html/class_constant_form.html b/docs/doxygen/html/class_constant_form.html index 8907813..da079a9 100644 --- a/docs/doxygen/html/class_constant_form.html +++ b/docs/doxygen/html/class_constant_form.html @@ -97,14 +97,13 @@ $(document).ready(function(){initNavTree('class_constant_form.html','');});

Form to edit the constant control data. More...

-

#include <ConstantForm.h>

+

#include <ConstantForm.h>

Inheritance diagram for ConstantForm:
-ConstantFormBase
@@ -116,28 +115,6 @@ Public Member Functions - - - - - - - - - - - - - - -
virtual bool ValidateData ()
 
- Public Member Functions inherited from ConstantFormBase
-wxStaticText * GetStaticTextValue ()
 
-wxTextCtrl * GetTextCtrlValue ()
 
-wxPanel * GetPanelGeneral ()
 
-wxNotebook * GetNotebook ()
 
-wxButton * GetButtonOK ()
 
-wxButton * GetButtonCancel ()
 
ConstantFormBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Constant"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
 
@@ -156,35 +133,14 @@ wxWindow *  - - - - - - - - - - - - -

Protected Member Functions

m_parent =
Constantm_constant = NULL
 
- Protected Attributes inherited from ConstantFormBase
-wxNotebook * m_notebook
 
-wxPanel * m_panelGeneral
 
-wxStaticText * m_staticTextValue
 
-wxTextCtrl * m_textCtrlValue
 
-wxButton * m_buttonOK
 
-wxButton * m_buttonCancel
 

Detailed Description

Form to edit the constant control data.

Author
Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
Date
05/10/2017
- -

Definition at line 31 of file ConstantForm.h.


The documentation for this class was generated from the following files: diff --git a/docs/doxygen/html/class_constant_form.png b/docs/doxygen/html/class_constant_form.png index b850ff8..cd549f1 100644 Binary files a/docs/doxygen/html/class_constant_form.png and b/docs/doxygen/html/class_constant_form.png differ diff --git a/docs/doxygen/html/class_constant_form_base-members.html b/docs/doxygen/html/class_constant_form_base-members.html deleted file mode 100644 index cba1071..0000000 --- a/docs/doxygen/html/class_constant_form_base-members.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - -Member List - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- -
-
-
ConstantFormBase Member List
-
-
- -

This is the complete list of members for ConstantFormBase, including all inherited members.

- - - - - - - - - - - - - - - - - -
ConstantFormBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Constant"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE) (defined in ConstantFormBase)ConstantFormBase
GetButtonCancel() (defined in ConstantFormBase)ConstantFormBaseinline
GetButtonOK() (defined in ConstantFormBase)ConstantFormBaseinline
GetNotebook() (defined in ConstantFormBase)ConstantFormBaseinline
GetPanelGeneral() (defined in ConstantFormBase)ConstantFormBaseinline
GetStaticTextValue() (defined in ConstantFormBase)ConstantFormBaseinline
GetTextCtrlValue() (defined in ConstantFormBase)ConstantFormBaseinline
m_buttonCancel (defined in ConstantFormBase)ConstantFormBaseprotected
m_buttonOK (defined in ConstantFormBase)ConstantFormBaseprotected
m_notebook (defined in ConstantFormBase)ConstantFormBaseprotected
m_panelGeneral (defined in ConstantFormBase)ConstantFormBaseprotected
m_staticTextValue (defined in ConstantFormBase)ConstantFormBaseprotected
m_textCtrlValue (defined in ConstantFormBase)ConstantFormBaseprotected
OnCancelButtonClick(wxCommandEvent &event) (defined in ConstantFormBase)ConstantFormBaseinlineprotectedvirtual
OnOKButtonClick(wxCommandEvent &event) (defined in ConstantFormBase)ConstantFormBaseinlineprotectedvirtual
~ConstantFormBase() (defined in ConstantFormBase)ConstantFormBasevirtual
-
- - - - diff --git a/docs/doxygen/html/class_constant_form_base.html b/docs/doxygen/html/class_constant_form_base.html deleted file mode 100644 index 3120b56..0000000 --- a/docs/doxygen/html/class_constant_form_base.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - -ConstantFormBase Class Reference - - - - - - - - - - - - - - - -
-
- - - - - - -
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
- -
- - -
-
-Inheritance diagram for ConstantFormBase:
-
-
- - -ConstantForm - -
- - - - - - - - - - - - - - - - -

-Public Member Functions

-wxStaticText * GetStaticTextValue ()
 
-wxTextCtrl * GetTextCtrlValue ()
 
-wxPanel * GetPanelGeneral ()
 
-wxNotebook * GetNotebook ()
 
-wxButton * GetButtonOK ()
 
-wxButton * GetButtonCancel ()
 
ConstantFormBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Constant"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
 
- - - - - -

-Protected Member Functions

-virtual void OnOKButtonClick (wxCommandEvent &event)
 
-virtual void OnCancelButtonClick (wxCommandEvent &event)
 
- - - - - - - - - - - - - -

-Protected Attributes

-wxNotebook * m_notebook
 
-wxPanel * m_panelGeneral
 
-wxStaticText * m_staticTextValue
 
-wxTextCtrl * m_textCtrlValue
 
-wxButton * m_buttonOK
 
-wxButton * m_buttonCancel
 
-

Detailed Description

-
-

Definition at line 966 of file ElementForm.h.

-

The documentation for this class was generated from the following files: -
-
- - - - diff --git a/docs/doxygen/html/class_constant_form_base.js b/docs/doxygen/html/class_constant_form_base.js deleted file mode 100644 index 9830550..0000000 --- a/docs/doxygen/html/class_constant_form_base.js +++ /dev/null @@ -1,19 +0,0 @@ -var class_constant_form_base = -[ - [ "ConstantFormBase", "class_constant_form_base.html#a5558f2f8b9ef633a3fcddc41541b6d42", null ], - [ "~ConstantFormBase", "class_constant_form_base.html#ab51a2d238d94e9e437af4eaf7e4d13f6", null ], - [ "GetButtonCancel", "class_constant_form_base.html#a2b824eb2d3d46733708d794b201fe092", null ], - [ "GetButtonOK", "class_constant_form_base.html#a37822df309a1260995e1041f0db5bde7", null ], - [ "GetNotebook", "class_constant_form_base.html#ad44906e7590449a0b71adcdc2c231422", null ], - [ "GetPanelGeneral", "class_constant_form_base.html#aa26c32ca1da62ff10ef1c074dc961b78", null ], - [ "GetStaticTextValue", "class_constant_form_base.html#a944dd92ff574dad388f90c7962929d12", null ], - [ "GetTextCtrlValue", "class_constant_form_base.html#a8eb28b11673e380878c3d30623203c69", null ], - [ "OnCancelButtonClick", "class_constant_form_base.html#af77b45b748f679a1895c69578d0a62ce", null ], - [ "OnOKButtonClick", "class_constant_form_base.html#ad9296d05ec4b36ef59108bf72ddfdaca", null ], - [ "m_buttonCancel", "class_constant_form_base.html#a8c2c85c2dbe59fc4831024ad4bb9e675", null ], - [ "m_buttonOK", "class_constant_form_base.html#aa56d043968b6ebdfdafbe30ca6d02569", null ], - [ "m_notebook", "class_constant_form_base.html#a1b97bf3e083d829859cca12dde3da9ab", null ], - [ "m_panelGeneral", "class_constant_form_base.html#a8f63d297eb21c599da233e9d3e1273e7", null ], - [ "m_staticTextValue", "class_constant_form_base.html#acc606e8951953ebde5bbceb507148141", null ], - [ "m_textCtrlValue", "class_constant_form_base.html#a6fe68e9986fc74437ead27503fe7592a", null ] -]; \ No newline at end of file diff --git a/docs/doxygen/html/class_constant_form_base.png b/docs/doxygen/html/class_constant_form_base.png deleted file mode 100644 index e1fc5c8..0000000 Binary files a/docs/doxygen/html/class_constant_form_base.png and /dev/null differ diff --git a/docs/doxygen/html/class_control_editor-members.html b/docs/doxygen/html/class_control_editor-members.html index a4569fe..2a014aa 100644 --- a/docs/doxygen/html/class_control_editor-members.html +++ b/docs/doxygen/html/class_control_editor-members.html @@ -95,81 +95,61 @@ $(document).ready(function(){initNavTree('class_control_editor.html','');}); BuildControlElementPanel() (defined in ControlEditor)ControlEditorprotected CheckConnections() (defined in ControlEditor)ControlEditorvirtual ControlEditor(wxWindow *parent, int ioflags=IOControl::IN_TERMINAL_VOLTAGE|IOControl::IN_VELOCITY|IOControl::OUT_FIELD_VOLTAGE|IOControl::OUT_MEC_POWER) (defined in ControlEditor)ControlEditor - ControlEditorBase(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Control editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(800, 600), long style=wxDEFAULT_FRAME_STYLE) (defined in ControlEditorBase)ControlEditorBase - ControlEditorMode enum name (defined in ControlEditor)ControlEditor - DeleteLineFromList(std::vector< ConnectionLine *>::iterator &it) (defined in ControlEditor)ControlEditorprotected - DeleteSelectedElements() (defined in ControlEditor)ControlEditorvirtual - GetAuimgr() (defined in ControlEditorBase)ControlEditorBaseinline - GetButtonOK() (defined in ControlEditorBase)ControlEditorBaseinline - GetButtonTest() (defined in ControlEditorBase)ControlEditorBaseinline + ControlEditorMode enum name (defined in ControlEditor)ControlEditor + DeleteLineFromList(std::vector< ConnectionLine *>::iterator &it) (defined in ControlEditor)ControlEditorprotected + DeleteSelectedElements() (defined in ControlEditor)ControlEditorvirtual GetConnectionLineList() const (defined in ControlEditor)ControlEditorinlinevirtual GetControlElementList() const (defined in ControlEditor)ControlEditorinlinevirtual - GetGlCanvas() (defined in ControlEditorBase)ControlEditorBaseinline - GetNextID() (defined in ControlEditor)ControlEditorprotected - GetPanelButtons() (defined in ControlEditorBase)ControlEditorBaseinline - GetPanelControlElements() (defined in ControlEditorBase)ControlEditorBaseinline - GetPanelWorkspace() (defined in ControlEditorBase)ControlEditorBaseinline - GetToolbarMain() (defined in ControlEditorBase)ControlEditorBaseinline - ID_RIBBON_EXPORT enum value (defined in ControlEditorBase)ControlEditorBase - ID_RIBBON_IMPORT enum value (defined in ControlEditorBase)ControlEditorBase - LeftClickDown(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - m_auimgr (defined in ControlEditorBase)ControlEditorBaseprotected - m_buttonOK (defined in ControlEditorBase)ControlEditorBaseprotected - m_buttonTest (defined in ControlEditorBase)ControlEditorBaseprotected + GetNextID() (defined in ControlEditor)ControlEditorprotected + LeftClickDown(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual m_camera (defined in ControlEditor)ControlEditorprotected m_connectionList (defined in ControlEditor)ControlEditorprotected m_ctrlContainer (defined in ControlEditor)ControlEditorprotected m_elementList (defined in ControlEditor)ControlEditorprotected - m_glCanvas (defined in ControlEditorBase)ControlEditorBaseprotected - m_glContext (defined in ControlEditor)ControlEditorprotected - m_inputType (defined in ControlEditor)ControlEditorprotected - m_ioFlags (defined in ControlEditor)ControlEditorprotected - m_justOpened (defined in ControlEditor)ControlEditorprotected - m_mode (defined in ControlEditor)ControlEditorprotected - m_panelButtons (defined in ControlEditorBase)ControlEditorBaseprotected - m_panelControlElements (defined in ControlEditorBase)ControlEditorBaseprotected - m_panelWorkspace (defined in ControlEditorBase)ControlEditorBaseprotected + m_glContext (defined in ControlEditor)ControlEditorprotected + m_inputType (defined in ControlEditor)ControlEditorprotected + m_ioFlags (defined in ControlEditor)ControlEditorprotected + m_justOpened (defined in ControlEditor)ControlEditorprotected + m_mode (defined in ControlEditor)ControlEditorprotected m_selectionRect (defined in ControlEditor)ControlEditorprotected m_simTime (defined in ControlEditor)ControlEditorprotected m_slope (defined in ControlEditor)ControlEditorprotected m_startSelRect (defined in ControlEditor)ControlEditorprotected m_startTime (defined in ControlEditor)ControlEditorprotected m_timeStep (defined in ControlEditor)ControlEditorprotected - m_toolbarMain (defined in ControlEditorBase)ControlEditorBaseprotected - MODE_DRAG enum value (defined in ControlEditor)ControlEditor - MODE_DRAG_INSERT enum value (defined in ControlEditor)ControlEditor - MODE_DRAG_PASTE enum value (defined in ControlEditor)ControlEditor - MODE_EDIT enum value (defined in ControlEditor)ControlEditor - MODE_INSERT enum value (defined in ControlEditor)ControlEditor - MODE_INSERT_LINE enum value (defined in ControlEditor)ControlEditor - MODE_MOVE_ELEMENT enum value (defined in ControlEditor)ControlEditor - MODE_MOVE_LINE enum value (defined in ControlEditor)ControlEditor - MODE_PASTE enum value (defined in ControlEditor)ControlEditor - MODE_SELECTION_RECT enum value (defined in ControlEditor)ControlEditor - OnButtonOKClick(wxCommandEvent &event) (defined in ControlEditor)ControlEditorinlineprotectedvirtual - OnClose(wxCloseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnDoubleClick(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnExportClick(wxCommandEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnIdle(wxIdleEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnImportClick(wxCommandEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnKeyDown(wxKeyEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnLeftClickDown(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnLeftClickUp(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnMiddleDown(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnMiddleUp(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnMouseMotion(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnPaint(wxPaintEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnScroll(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - OnTestClick(wxCommandEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual - Redraw() (defined in ControlEditor)ControlEditorinlinevirtual - RotateSelectedElements(bool clockwise) (defined in ControlEditor)ControlEditorvirtual - SetConnectionsList(std::vector< ConnectionLine *> connectionList) (defined in ControlEditor)ControlEditorinlinevirtual - SetControlContainer(ControlElementContainer *ctrlContainer) (defined in ControlEditor)ControlEditorinlinevirtual - SetElementsList(std::vector< ControlElement *> elementList) (defined in ControlEditor)ControlEditorinlinevirtual - SetJustOpened(bool justOpened) (defined in ControlEditor)ControlEditorinlinevirtual - SetViewport() (defined in ControlEditor)ControlEditorprotected - ~ControlEditor() (defined in ControlEditor)ControlEditorvirtual - ~ControlEditorBase() (defined in ControlEditorBase)ControlEditorBasevirtual + MODE_DRAG enum value (defined in ControlEditor)ControlEditor + MODE_DRAG_INSERT enum value (defined in ControlEditor)ControlEditor + MODE_DRAG_PASTE enum value (defined in ControlEditor)ControlEditor + MODE_EDIT enum value (defined in ControlEditor)ControlEditor + MODE_INSERT enum value (defined in ControlEditor)ControlEditor + MODE_INSERT_LINE enum value (defined in ControlEditor)ControlEditor + MODE_MOVE_ELEMENT enum value (defined in ControlEditor)ControlEditor + MODE_MOVE_LINE enum value (defined in ControlEditor)ControlEditor + MODE_PASTE enum value (defined in ControlEditor)ControlEditor + MODE_SELECTION_RECT enum value (defined in ControlEditor)ControlEditor + OnButtonOKClick(wxCommandEvent &event) (defined in ControlEditor)ControlEditorinlineprotectedvirtual + OnClose(wxCloseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnDoubleClick(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnExportClick(wxCommandEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnIdle(wxIdleEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnImportClick(wxCommandEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnKeyDown(wxKeyEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnLeftClickDown(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnLeftClickUp(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnMiddleDown(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnMiddleUp(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnMouseMotion(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnPaint(wxPaintEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnScroll(wxMouseEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + OnTestClick(wxCommandEvent &event) (defined in ControlEditor)ControlEditorprotectedvirtual + Redraw() (defined in ControlEditor)ControlEditorinlinevirtual + RotateSelectedElements(bool clockwise) (defined in ControlEditor)ControlEditorvirtual + SetConnectionsList(std::vector< ConnectionLine *> connectionList) (defined in ControlEditor)ControlEditorinlinevirtual + SetControlContainer(ControlElementContainer *ctrlContainer) (defined in ControlEditor)ControlEditorinlinevirtual + SetElementsList(std::vector< ControlElement *> elementList) (defined in ControlEditor)ControlEditorinlinevirtual + SetJustOpened(bool justOpened) (defined in ControlEditor)ControlEditorinlinevirtual + SetViewport() (defined in ControlEditor)ControlEditorprotected + ~ControlEditor() (defined in ControlEditor)ControlEditorvirtual diff --git a/docs/doxygen/html/class_control_editor.html b/docs/doxygen/html/class_control_editor.html index 065705d..1440fd1 100644 --- a/docs/doxygen/html/class_control_editor.html +++ b/docs/doxygen/html/class_control_editor.html @@ -100,7 +100,6 @@ Inheritance diagram for ControlEditor:
-ControlEditorBase
@@ -122,11 +121,6 @@ Public Types
} - - -
 
- Public Types inherited from ControlEditorBase
enum  { ID_RIBBON_EXPORT = 10001, -ID_RIBBON_IMPORT = 10002 - }
 
@@ -166,34 +160,6 @@ virtual void  - - - - - - - - - - - - - - - - - - -

Public Member Functions

SetConnection
virtual void SetControlContainer (ControlElementContainer *ctrlContainer)
 
- Public Member Functions inherited from ControlEditorBase
-wxToolBar * GetToolbarMain ()
 
-wxPanel * GetPanelControlElements ()
 
-wxGLCanvas * GetGlCanvas ()
 
-wxPanel * GetPanelWorkspace ()
 
-wxButton * GetButtonTest ()
 
-wxButton * GetButtonOK ()
 
-wxPanel * GetPanelButtons ()
 
-wxAuiManager * GetAuimgr ()
 
ControlEditorBase (wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Control editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(800, 600), long style=wxDEFAULT_FRAME_STYLE)
 
@@ -305,38 +271,10 @@ double  - - - - - - - - - - - - - - - - -

Protected Member Functions

m_timeStep = 1e
double m_simTime = 10.0
 
- Protected Attributes inherited from ControlEditorBase
-wxToolBar * m_toolbarMain
 
-wxAuiManager * m_auimgr
 
-wxPanel * m_panelControlElements
 
-wxPanel * m_panelWorkspace
 
-wxGLCanvas * m_glCanvas
 
-wxPanel * m_panelButtons
 
-wxButton * m_buttonTest
 
-wxButton * m_buttonOK
 
-

Detailed Description

-
-

Definition at line 104 of file ControlEditor.h.

-

The documentation for this class was generated from the following files: