% Edit the above text to modify the response to help Principal

Similar documents
Signal and Systems. Matlab GUI based analysis. XpertSolver.com

% Edit the above text to modify the response to help Video_Player. % Last Modified by GUIDE v May :38:12

LAMPIRAN 1. Percobaan

1. Peralatan LAMPIRAN

GUI code for different sections is in following sections

Homeworks on FFT Instr. and Meas. for Communication Systems- Gianfranco Miele. Name Surname

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

LISTING PROGRAM. % Edit the above text to modify the response to help cover. % Last Modified by GUIDE v Jun :24:43

OMR Sheet Recognition

Ear Recognition. By: Zeyangyi Wang

Supplementary Information

LAMPIRAN A PROGRAM PELATIHAN DAN PENGUJIAN

We are IntechOpen, the world s leading publisher of Open Access books Built by scientists, for scientists. International authors and editors

Lithium-Ion Battery Data. Management

1.Matlab Image Encryption Code

A NEW MACHINING COST CALCULATOR (MC 2 )

Lampiran 1. Script M-File Global Ridge

% --- Executes on button press in btn_gsn. function btn_gsn_callback(hobject, eventdata, handles) GaussianSpeckleNoise close AiSoftware;

MV 1:00 1:05 1:00 1:05

Akkad Bakad Bambai Bo

ECE Fall 05. Undergraduate Research: Digital Signal Processing & Quantization Effects

Finding a Minimum Covering Circle Based on Infinity Norms

LAMPIRAN A LISTINGPROGRAM

PROGRAMMING IN MATLAB

LAMPIRAN LISTING PROGRAM

LISTING PROGRAM. if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); end

.., 7. References. [ 1] 1 mage Analysis and Mathematical Morphology:J.Serra. [2] Erosion, dilation and related operators,by Mariusz Jankowski

Solving Sudoku with MATLAB

Parallel-connected solar arrays

Airfoil Boundary Layer Separation Prediction

Contents INTERFACING MATLAB WITH EMBEDDED SYSTEMS

Main Form visual Studio

COMPLETELY AUTOMATED PUBLIC TURING TEST TO TELL COMPUTERS AND HUMANS APART

ALGORITHMS AND INTERFACE FOR OCEAN ACOUSTIC RAY-TRACING (Developed in MATLAB)

GUI Signal Analysis and Filtering Design

Accepted by... John H. Lienhard V

MATLAB. Creating Graphical User Interfaces Version 7. The Language of Technical Computing

Real-Time IIR Digital Filters

TREBALL FINAL DE GRAU

Implementation of a Motion Detection System

IMAGE STEGANOGRAPHY USING DISCRETE COSINE TRNASFORM ALGORITHM

LOK-Viewer : Graphical Interface Application for Geomagnetic Data in Observatory Geomagnetic Lombok

MEASURING INTERFACIAL TENSION WITH THE PENDANT DROP METHOD

1 Lab 3, Simulation of crank-piston system

Design of Automated Digital Eye Palpation Exam for Intraocular Pressure Measurement

Introduction To MATLAB Interactive Graphics

GENDER ESTIMATION BASED ON FACIAL IMAGE AZLIN BT YAJID UNIVERSITI TEKNOLOGI MALAYSIA

Special Topics II: Graphical User Interfaces (GUIs)

UNIVERSITÀ DEGLI STUDI DI PADOVA

Blind to Change. More on Graphical User Interfaces. Exploring change blindness

Intel Quark microcontroller D2000 How to communicate with MATLAB over UART

Sandia National Laboratories: Implementation of and Experimenting with a Clustering Tool

The Language of Technical Computing. Computation. Visualization. Programming. Creating Graphical User Interfaces Version 1

Keywords: Learning automata, Vertex multicoloring.

There are two ways to launch Graphical User Interface (GUI). You can either

Interactive Programs

LAMPIRAN A: LISTING PROGRAM

SBT 645 Introduction to Scientific Computing in Sports Science #5

Flow Control and Functions

Matlab for Engineers

Introduction. Like other programming languages, MATLAB has means for modifying the flow of a program

Still More About Matlab GUI s (v. 1.3) Popup Menus. Popup Menu Exercise. Still More GUI Info - GE /29/2012. Copyright C. S. Tritt, Ph.D.

Chapter 6 User-Defined Functions. dr.dcd.h CS 101 /SJC 5th Edition 1

Computational Methods of Scientific Programming

Part #10. AE0B17MTB Matlab. Miloslav Čapek Viktor Adler, Pavel Valtr, Filip Kozák

BUILDING A MATLAB GUI. Education Transfer Plan Seyyed Khandani, Ph.D. IISME 2014

Computational Methods of Scientific Programming. Matlab Lecture 3 Lecturers Thomas A Herring Chris Hill

GUI Building for Test & Measurement Applications

EL2310 Scientific Programming

W1005 Intro to CS and Programming in MATLAB. Data Structures. Fall 2014 Instructor: Ilia Vovsha. hep://

Chemical Engineering 541

Supplement: Case Study: Sudoku. For Introduction to Java Programming By Y. Daniel Liang

ANEXO G. % Se calcula el valor de la señal cuando a llegado % al 28.3% y 63.2% de su de su cambio total.

Additions to the CREWES Matlab Library

Building a Graphical User Interface

EL2310 Scientific Programming

Interfacing to MATLAB. You can download the interface developed in this tutorial. It exists as a collection of 3 MATLAB files.

Ultraplatjoslas radaru izmantošana automašīnu skaitīšanai

COMS 3101 Programming Languages: MATLAB. Lecture 2

Computational Methods of Scientific Programming Fall 2008

Spring 2010 Instructor: Michele Merler.

INTRODUCTION TO MATLAB INTERACTIVE GRAPHICS EXERCISES

Flow Control. Spring Flow Control Spring / 26

User Defined Functions

Computational Methods of Scientific Programming. Matlab Lecture 4 Lecturers Thomas A Herring Chris Hill

Office 2016 Excel Basics 06 Video/Class Project #18 Excel Basics 6: Customize Quick Access Toolbar (QAT) and Show New Ribbon Tabs

Fibonacci numbers introduce vectors, functions and recursion. An exercise introduces graphics user interfaces.

Computational Methods of Scientific Programming

1 >> Lecture 3 2 >> 3 >> -- Functions 4 >> Zheng-Liang Lu 169 / 221

K -B U S R. R S232/ K N X C ontroller. U ser m anual-v er.1 BTCC-02/ KNX/EIB Intelligent Installation Systems

1 >> Lecture 3 2 >> 3 >> -- Functions 4 >> Zheng-Liang Lu 172 / 225

Lab 8: Conditional Statements with Multiple Branches (please develop programs individually)

Introduction to. The Help System. Variable and Memory Management. Matrices Generation. Interactive Calculations. Vectors and Matrices

SECTION 2: PROGRAMMING WITH MATLAB. MAE 4020/5020 Numerical Methods with MATLAB

ME 142 Engineering Computation I. Unit 1.1 Excel Basics

WINTER 2017 ECE 102 ENGINEERING COMPUTATION STANDARD HOMEWORK #3 ECE DEPARTMENT PORTLAND STATE UNIVERSITY

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB

Loops. by Ahmet Sacan

Introduction to Problem Solving and Programming in Python.

MATLAB for the Sciences

Transcription:

function varargout = Principal(varargin) % OPFGUI MATLAB code for Principal.fig % OPFGUI, by itself, creates a new OPFGUI or raises the existing % singleton*. % % H = OPFGUI returns the handle to a new OPFGUI or the handle to % the existing singleton*. % % OPFGUI('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in OPFGUI.M with the given input arguments. % % OPFGUI('Property','Value',...) creates a new OPFGUI or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before Principal_OpeningFcn gets. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to Principal_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help Principal % Last Modified by GUIDE v2.5 12-Jan-2017 20:51:44 % Begin initialization code - DO NOT EDIT gui_singleton = 1; gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @Principal_OpeningFcn,... 'gui_outputfcn', @Principal_OutputFcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1}); if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:});

else gui_mainfcn(gui_state, varargin{:}); % End initialization code - DO NOT EDIT % --- Executes just before Principal is made visible. function Principal_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hobject handle to figure % varargin command line arguments to Principal (see VARARGIN) % Choose default command line output for Principal handles.output = hobject; % Update handles structure guidata(hobject, handles); % UIWAIT makes Principal wait for user response (see UIRESUME) % uiwait(handles.figure1); % ----------------------------------------------------------------------- --- set(handles.uipanel_conv_profile, 'Position', [95 5 165 45]); set(handles.axes_conv_profile, 'Position', [15 6 145 36]); set(handles.uipanel_conv_profile1, 'Position', [95 5 165 45]); set(handles.axes_conv_profile1, 'Position', [15 6 145 36]); % ----------------------------------------------------------------------- --- %---------------------------------------------------------------------- ---- % --- Outputs from this function are returned to the command line. function varargout = Principal_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hobject handle to figure % Get default command line output from handles structure varargout{1} = handles.output;

% --- Executes on selection change in popupmenu_testsystem. function popupmenu_testsystem_callback(hobject, eventdata, handles) % hobject handle to popupmenu_testsystem (see GCBO) % Hints: contents = cellstr(get(hobject,'string')) returns popupmenu_testsystem contents as cell array % contents{get(hobject,'value')} returns selected item from popupmenu_testsystem %Determine the selected data set. set(handles.uipanel_singlelinediagram, 'Visible', 'on'); str=get(hobject, 'String'); val=get(hobject, 'Value'); set(handles.uipanel_singlelinediagram, 'Visible', 'on'); axes(handles.axes_singlelinediagram); %Set current data to the selected data set switch str{val}; case 'Caso_9Bus'; a=randperm(9);x1=a(1,1);x2=a(1,2); save bus.mat x1 x2 handles.current_data = 'Caso_9Bus'; im = imread('caso_9bus.jpg'); case 'Caso_30Bus'; a=randperm(30);x1=a(1,1);x2=a(1,2);x3=a(1,3);x4=a(1,4);x5=a(1,5); save bus.mat x1 x2 x3 x4 x5 handles.current_data = 'Caso_30Bus'; im = imread('caso_30bus.jpg'); %Save the handles structure image(im); function popupmenu_testsystem_createfcn(hobject, eventdata, handles) % hobject handle to popupmenu_testsystem (see GCBO) % Hint: popupmenu controls usually have a white background on Windows.

% --- Executes on button press in pushbutton_singlelinediagram. function pushbutton_singlelinediagram_callback(hobject, eventdata, handles) % hobject handle to pushbutton_singlelinediagram (see GCBO) set(handles.uipanel_singlelinediagram, 'Visible', 'on'); axes(handles.axes_singlelinediagram); %Set current data to the selected data set switch handles.current_data; case 'Caso_9Bus'; im = imread('caso_9bus.jpg'); case 'Caso_30Bus'; im = imread('caso_30bus.jpg'); % image(im); % --- Executes on button press in pushbutton_systemdata. function pushbutton_systemdata_callback(hobject, eventdata, handles) % hobject handle to pushbutton_systemdata (see GCBO) switch handles.current_data case 'Caso_9Bus' edit Caso_9Bus; case 'Caso_30Bus' edit Caso_30Bus; %---------------------------------------------------------------------- ---- function edit_populationsizejana_callback(hobject, eventdata, handles) % hobject handle to edit_populationsizejana (see GCBO) % Hints: get(hobject,'string') returns contents of edit_populationsizejana as text edit_populationsizejana as a double input = str2double(get(hobject,'string'));

if isnan(input) errordlg('you must enter a numeric value','invalid Input','modal') uicontrol(hobject) return else % display(input); %handles.pop_sizejana=input handles.pop_sizejana = input; function edit_populationsizejana_createfcn(hobject, eventdata, handles) % hobject handle to edit_populationsizejana (see GCBO) %---------------------------------------------------------------------- ---- function edit_tmaxjana_callback(hobject, eventdata, handles) % hobject handle to edit_tmaxjana (see GCBO) % Hints: get(hobject,'string') returns contents of edit_tmaxjana as text edit_tmaxjana as a double input = str2double(get(hobject,'string')); if isnan(input) errordlg('you must enter a numeric value','invalid Input','modal') uicontrol(hobject) return else % display(input); handles.tmaxjana = input;

function edit_tmaxjana_createfcn(hobject, eventdata, handles) % hobject handle to edit_tmaxjana (see GCBO) %---------------------------------------------------------------------- ---- function edit_numberofrunsjana_callback(hobject, eventdata, handles) % hobject handle to edit_numberofrunsjana (see GCBO) % Hints: get(hobject,'string') returns contents of edit_numberofrunsjana as text edit_numberofrunsjana as a double input = str2double(get(hobject,'string')); if isnan(input) errordlg('you must enter a numeric value','invalid Input','modal') uicontrol(hobject) return else % display(input); handles.num_runsjana = input; function edit_numberofrunsjana_createfcn(hobject, eventdata, handles) % hobject handle to edit_numberofrunsjana (see GCBO)

function edit_constantk1jana_callback(hobject, eventdata, handles) % hobject handle to edit_constantk1jana (see GCBO) % Hints: get(hobject,'string') returns contents of edit_constantk1jana as text edit_constantk1jana as a double input = str2double(get(hobject,'string')); if isnan(input) errordlg('you must enter a numeric value','invalid Input','modal') uicontrol(hobject) return else % display(input); handles.k1jana = input; function edit_constantk1jana_createfcn(hobject, eventdata, handles) % hobject handle to edit_constantk1jana (see GCBO) function edit_constantk2jana_callback(hobject, eventdata, handles) % hobject handle to edit_constantk2jana (see GCBO) % Hints: get(hobject,'string') returns contents of edit_constantk2jana

as text edit_constantk2jana as a double input = str2double(get(hobject,'string')); if isnan(input) errordlg('you must enter a numeric value','invalid Input','modal') uicontrol(hobject) return else % display(input); handles.k2jana = input; function edit_constantk2jana_createfcn(hobject, eventdata, handles) % hobject handle to edit_constantk2jana (see GCBO) % --- Executes on selection change in popupmenu_objectivefunctions. function popupmenu_objectivefunctions_callback(hobject, eventdata, handles) % hobject handle to popupmenu_objectivefunctions (see GCBO) % Hints: contents = cellstr(get(hobject,'string')) returns popupmenu_objectivefunctions contents as cell array % contents{get(hobject,'value')} returns selected item from popupmenu_objectivefunctions %Determine the selected data set. str=get(hobject, 'String'); val=get(hobject, 'Value'); %Set current data to the selected data set switch str{val}; case 'minpotencia'; handles.obj_fun = 'Ploss';

%Save the handles structure function popupmenu_objectivefunctions_createfcn(hobject, eventdata, handles) % hobject handle to popupmenu_objectivefunctions (see GCBO) % Hint: popupmenu controls usually have a white background on Windows. % --- Executes on selection change in popupmenu_method. function popupmenu_method_callback(hobject, eventdata, handles) % hobject handle to popupmenu_method (see GCBO) % Hints: contents = cellstr(get(hobject,'string')) returns popupmenu_method contents as cell array % contents{get(hobject,'value')} returns selected item from popupmenu_method %Determine the selected data set. str=get(hobject, 'String'); val=get(hobject, 'Value'); %Set current data to the selected data set switch str{val}; case 'TabuSearch'; handles.method = 'JANA'; %set(handles.uipanel_singlelinediagram, 'Visible', 'off'); %set(handles.uipanel_parametersjana, 'Visible', 'on'); %Save the handles structure function popupmenu_method_createfcn(hobject, eventdata, handles) % hobject handle to popupmenu_method (see GCBO)

% Hint: popupmenu controls usually have a white background on Windows. %====================================================================== ====================================================== % --- Executes on button press in pushbutton_runopf. function pushbutton_runopf_callback(hobject, eventdata, handles) % hobject handle to pushbutton_runopf (see GCBO) %runopf(handles.method,handles.current_data,handles.obj_fun,handles.pop _size,handles.tmax,handles.num_runs) switch handles.method %---------------------------------------------------------------------- ------------------------------------------------------ case 'JANA' TPR=0; num_runsjana=handles.num_runsjana; while TPR<handles.num_runsJANA TPR=TPR+1; tic; [Fbest,Lbest,BestChart]=JANA(handles.pop_sizeJANA,handles.tmaxJANA,hand les.current_data,handles.obj_fun,handles.k1jana,handles.k2jana); toc; FBEST(TPR)=Fbest; LBEST(TPR,:)=Lbest; BESTCHART(TPR,:)=BestChart; TOC(TPR)=toc; [Fbest,indFbest]=min(FBEST); L=LBEST(indFbest,:); BstCh=BESTCHART(indFbest,:); set(handles.uipanel_conv_profile, 'Visible', 'on'); set(handles.uipanel_bestresults, 'Visible', 'on'); set(handles.uipanel_conv_profile1, 'Visible', 'off') set(handles.uipanel_optimumcontrolvariables, 'Visible', 'off'); set(handles.uipanel_busvoltages, 'Visible', 'off'); set(handles.uipanel_branchpower, 'Visible', 'off'); set(handles.uipanel_statistics, 'Visible', 'off'); set(handles.uipanel_violatingconstraints, 'Visible', 'off');

axes(handles.axes_conv_profile); hold on; plot(bstch,'-b','linewidth',2); xlabel('\fontsize{10}\bf Iteración');ylabel('\fontsize{10}\bf Pérdidas (MW)'); leg('\fontsize{10}\bf Tabú Search',1);grid on;hold off; load test.mat axes(handles.axes_conv_profile1); for count_1=1:1:iter hold on; plot(volbus(:,count_1),':*g','linewidth',2); xlabel('\fontsize{10}\bf Bus');ylabel('\fontsize{10}\bf Tensión (p.u.)'); %leg('\fontsize{10}\bf Tabú Search',1) grid on; hold off; [BestResults,tabela_Pg,tabela_Vg,tabela_T,tabela_Qc,Vviolat,Qgviolat,ta bela_cvorovi,tabela_grane,statistics]=st(l,handles.current_data,handles.obj_fun,handles.pop_sizejana,handles.tmaxjana,num_runsjana,fbest,toc); %---------------------------------------------------------------------- -------------------------------------------------------------- %---------------------------------------------------------------------- --------------------------------------------------------- %BestResults handles.fbest= BestResults(1); % Fbest=sprintf('%10.5f', handles.fbest); % refreshdisplaysfbest(fbest, handles); handles.fcost= BestResults(2); Fcost=sprintf('%10.2f ($/h)', handles.fcost); refreshdisplaysfcost(fcost, handles); handles.pgub_sum= BestResults(3); % pgub_sum=sprintf('%3.5f (MW)',handles.pgub_sum); % refreshdisplayspgubsum(pgub_sum, handles); handles.vd= BestResults(4); % VD=sprintf('%3.5f (p.u.)', handles.vd); % refreshdisplaysvd(vd, handles) %---------------------------------------------------------------------- ---- %tabela_pg handles.pg=tabela_pg;

Pg=handles.Pg; refreshdisplayspg(pg, handles); %tabela_vg handles.vg=tabela_vg; Vg=handles.Vg; refreshdisplaysvg(vg, handles); %tabela_t handles.t=tabela_t; T=handles.T; refreshdisplayst(t, handles); %tabela_qc handles.qc=tabela_qc; Qc=handles.Qc; refreshdisplaysqc(qc, handles); %---------------------------------------------------------------------- ---- %tabela_cvorovi handles.busvoltages=tabela_cvorovi; BusVoltages=handles.BusVoltages; refreshdisplaysbusvoltages(busvoltages, handles); %tabela_grane handles.branchpower=tabela_grane; BranchPower=handles.BranchPower; refreshdisplaysbranchpower(branchpower, handles); %---------------------------------------------------------------------- ---- %Statistics handles.statistics=statistics'; Statistics=handles.Statistics; refreshdisplaysstatistics(statistics, handles); %---------------------------------------------------------------------- ---- %Vviolat, Qgviolat, handles.vviolating=vviolat; Vviolating=handles.Vviolating; refreshdisplaysvviolating(vviolating, handles); handles.qgviolating=qgviolat; Qgviolating=handles.Qgviolating; refreshdisplaysqgviolating(qgviolating, handles); %---------------------------------------------------------------------- ---------------------------------------------------------------- function refreshdisplaysfcost(fcost, handles) set(handles.edit_fcostbest, 'String', Fcost); function refreshdisplayspgubsum(pgub_sum, handles) set(handles.edit_plossbest, 'String', pgub_sum);

function refreshdisplaysvd(vd, handles) set(handles.edit_vdbest, 'String', VD); function refreshdisplayspg(pg, handles) set(handles.uitable_pg, 'Data', Pg); function refreshdisplaysvg(vg, handles) set(handles.uitable_vg, 'Data', Vg); function refreshdisplayst(t, handles) set(handles.uitable_t, 'Data', T); function refreshdisplaysqc(qc, handles) set(handles.uitable_qc, 'Data', Qc); function refreshdisplaysbusvoltages(busvoltages, handles) set(handles.uitable_busvoltages, 'Data', BusVoltages); function refreshdisplaysbranchpower(branchpower, handles) set(handles.uitable_branchpower, 'Data', BranchPower); function refreshdisplaysstatistics(statistics, handles) set(handles.uitable_statistics, 'Data', Statistics); function refreshdisplaysvviolating(vviolating, handles) if isempty(vviolating) porukavv=sprintf('niveles de tension entre 0,95 y 1,05 p.u.'); else porukavv=sprintf('violacion de voltaje en el bus: %3d; ',Vviolating); set(handles.edit_vviolating, 'String', porukavv); function refreshdisplaysqgviolating(qgviolating, handles) if isempty(qgviolating) porukaqgv=sprintf('niveles de potencia reactiva dentro de los límites'); else porukaqgv=sprintf('violacion de potencia reactiva en el bus: %3d; ',Qgviolating); set(handles.edit_qgviolating, 'String', porukaqgv); %====================================================================== ======================================================== % --- Executes on button press in pushbutton_ok_jana. function pushbutton_ok_jana_callback(hobject, eventdata, handles)

% hobject handle to pushbutton_ok_jana (see GCBO) set(handles.uipanel_parametersjana, 'Visible', 'off'); % --- Executes on button press in pushbutton_bestresults. function pushbutton_bestresults_callback(hobject, eventdata, handles) % hobject handle to pushbutton_bestresults (see GCBO) set(handles.uipanel_bestresults, 'Visible', 'on') set(handles.uipanel_conv_profile, 'Visible', 'on') set(handles.uipanel_conv_profile1, 'Visible', 'off') set(handles.uipanel_optimumcontrolvariables, 'Visible', 'off') set(handles.uipanel_busvoltages, 'Visible', 'off') set(handles.uipanel_branchpower, 'Visible', 'off') set(handles.uipanel_statistics, 'Visible', 'off') set(handles.uipanel_violatingconstraints, 'Visible', 'off') % --- Executes on button press in pushbutton52. function pushbutton52_callback(hobject, eventdata, handles) % hobject handle to pushbutton52 (see GCBO) set(handles.uipanel_bestresults, 'Visible', 'on') set(handles.uipanel_conv_profile, 'Visible', 'off') set(handles.uipanel_conv_profile1, 'Visible', 'on') set(handles.uipanel_optimumcontrolvariables, 'Visible', 'off') set(handles.uipanel_busvoltages, 'Visible', 'off') set(handles.uipanel_branchpower, 'Visible', 'off') set(handles.uipanel_statistics, 'Visible', 'off') set(handles.uipanel_violatingconstraints, 'Visible', 'off') % --- Executes on button press in pushbutton_optimumcontrolvariables. function pushbutton_optimumcontrolvariables_callback(hobject, eventdata, handles) % hobject handle to pushbutton_optimumcontrolvariables (see GCBO) set(handles.uipanel_optimumcontrolvariables, 'Visible', 'on') set(handles.uipanel_bestresults, 'Visible', 'on') set(handles.uipanel_conv_profile, 'Visible', 'off') set(handles.uipanel_conv_profile1, 'Visible', 'off') set(handles.uipanel_busvoltages, 'Visible', 'off') set(handles.uipanel_branchpower, 'Visible', 'off')

set(handles.uipanel_statistics, 'Visible', 'off') set(handles.uipanel_violatingconstraints, 'Visible', 'off') % --- Executes on button press in pushbutton_violatingconstraints. function pushbutton_violatingconstraints_callback(hobject, eventdata, handles) % hobject handle to pushbutton_violatingconstraints (see GCBO) set(handles.uipanel_violatingconstraints, 'Visible', 'on') set(handles.uipanel_busvoltages, 'Visible', 'off') set(handles.uipanel_optimumcontrolvariables, 'Visible', 'off') set(handles.uipanel_bestresults, 'Visible', 'on') set(handles.uipanel_conv_profile, 'Visible', 'off') set(handles.uipanel_conv_profile1, 'Visible', 'off') set(handles.uipanel_branchpower, 'Visible', 'off') set(handles.uipanel_statistics, 'Visible', 'off') % --- Executes on button press in pushbutton_busvoltages. function pushbutton_busvoltages_callback(hobject, eventdata, handles) % hobject handle to pushbutton_busvoltages (see GCBO) set(handles.uipanel_busvoltages, 'Visible', 'on') set(handles.uipanel_optimumcontrolvariables, 'Visible', 'off') set(handles.uipanel_bestresults, 'Visible', 'on') set(handles.uipanel_conv_profile, 'Visible', 'off') set(handles.uipanel_conv_profile1, 'Visible', 'off') set(handles.uipanel_branchpower, 'Visible', 'off') set(handles.uipanel_statistics, 'Visible', 'off') set(handles.uipanel_violatingconstraints, 'Visible', 'off') % --- Executes on button press in pushbutton_statistics. function pushbutton_statistics_callback(hobject, eventdata, handles) % hobject handle to pushbutton_statistics (see GCBO) set(handles.uipanel_statistics, 'Visible', 'on') set(handles.uipanel_busvoltages, 'Visible', 'off') set(handles.uipanel_optimumcontrolvariables, 'Visible', 'off') set(handles.uipanel_bestresults, 'Visible', 'on') set(handles.uipanel_conv_profile, 'Visible', 'off') set(handles.uipanel_conv_profile1, 'Visible', 'off') set(handles.uipanel_branchpower, 'Visible', 'off') set(handles.uipanel_violatingconstraints, 'Visible', 'off')

% --- Executes on button press in pushbutton_branchpowerflow. function pushbutton_branchpowerflow_callback(hobject, eventdata, handles) % hobject handle to pushbutton_branchpowerflow (see GCBO) set(handles.uipanel_branchpower, 'Visible', 'on') set(handles.uipanel_busvoltages, 'Visible', 'off') set(handles.uipanel_optimumcontrolvariables, 'Visible', 'off') set(handles.uipanel_bestresults, 'Visible', 'on') set(handles.uipanel_conv_profile, 'Visible', 'off') set(handles.uipanel_conv_profile1, 'Visible', 'off') set(handles.uipanel_statistics, 'Visible', 'off') set(handles.uipanel_violatingconstraints, 'Visible', 'off') function edit_iteration_callback(hobject, eventdata, handles) % hobject handle to edit_iteration (see GCBO) % Hints: get(hobject,'string') returns contents of edit_iteration as text edit_iteration as a double function edit_iteration_createfcn(hobject, eventdata, handles) % hobject handle to edit_iteration (see GCBO) function edit_objfunbest_callback(hobject, eventdata, handles) % hobject handle to edit_objfunbest (see GCBO)

% Hints: get(hobject,'string') returns contents of edit_objfunbest as text edit_objfunbest as a double function edit_objfunbest_createfcn(hobject, eventdata, handles) % hobject handle to edit_objfunbest (see GCBO) function edit_fcostbest_callback(hobject, eventdata, handles) % hobject handle to edit_fcostbest (see GCBO) % Hints: get(hobject,'string') returns contents of edit_fcostbest as text edit_fcostbest as a double function edit_fcostbest_createfcn(hobject, eventdata, handles) % hobject handle to edit_fcostbest (see GCBO)

function edit_plossbest_callback(hobject, eventdata, handles) % hobject handle to edit_plossbest (see GCBO) % Hints: get(hobject,'string') returns contents of edit_plossbest as text edit_plossbest as a double function edit_plossbest_createfcn(hobject, eventdata, handles) % hobject handle to edit_plossbest (see GCBO) function edit_vdbest_callback(hobject, eventdata, handles) % hobject handle to edit_vdbest (see GCBO) % Hints: get(hobject,'string') returns contents of edit_vdbest as text edit_vdbest as a double function edit_vdbest_createfcn(hobject, eventdata, handles) % hobject handle to edit_vdbest (see GCBO)

function edit_runcounter_callback(hobject, eventdata, handles) % hobject handle to edit_runcounter (see GCBO) % Hints: get(hobject,'string') returns contents of edit_runcounter as text edit_runcounter as a double function edit_runcounter_createfcn(hobject, eventdata, handles) % hobject handle to edit_runcounter (see GCBO) function edit_vviolating_callback(hobject, eventdata, handles) % hobject handle to edit_vviolating (see GCBO) % Hints: get(hobject,'string') returns contents of edit_vviolating as text edit_vviolating as a double function edit_vviolating_createfcn(hobject, eventdata, handles) % hobject handle to edit_vviolating (see GCBO)

function edit_qgviolating_callback(hobject, eventdata, handles) % hobject handle to edit_qgviolating (see GCBO) % Hints: get(hobject,'string') returns contents of edit_qgviolating as text edit_qgviolating as a double function edit_qgviolating_createfcn(hobject, eventdata, handles) % hobject handle to edit_qgviolating (see GCBO) % --- Executes on button press in pushbutton_defaultjana. function pushbutton_defaultjana_callback(hobject, eventdata, handles) % hobject handle to pushbutton_defaultjana (see GCBO) set(handles.edit_populationsizejana, 'String', 50); handles.pop_sizejana=25; set(handles.edit_tmaxjana, 'String', 100); handles.tmaxjana=100; set(handles.edit_numberofrunsjana, 'String', 5); handles.num_runsjana=1;

set(handles.edit_constantk1jana, 'String', 0.7); handles.k1jana=1; set(handles.edit_constantk2jana, 'String', 1.2); handles.k2jana=1; function uipanel_singlelinediagram_createfcn(hobject, eventdata, handles) % hobject handle to uipanel_singlelinediagram (see GCBO) function axes_singlelinediagram_createfcn(hobject, eventdata, handles) % hobject handle to axes_singlelinediagram (see GCBO) % Hint: place code in OpeningFcn to populate axes_singlelinediagram % --- Executes on key press with focus on popupmenu_testsystem and none of its controls. function popupmenu_testsystem_keypressfcn(hobject, eventdata, handles) % hobject handle to popupmenu_testsystem (see GCBO) % eventdata structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL) % Key: name of the key that was pressed, in lower case % Character: character interpretation of the key(s) that was pressed % Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed % % --- Executes on button press in pushbutton53. % function pushbutton53_callback(hobject, eventdata, handles) % % hobject handle to pushbutton53 (see GCBO) % % function pushbutton_violatingconstraints_createfcn(hobject, eventdata, handles)

% hobject handle to pushbutton_violatingconstraints (see GCBO) % --- Executes on key press with focus on pushbutton_ok_jana and none of its controls. function pushbutton_ok_jana_keypressfcn(hobject, eventdata, handles) % hobject handle to pushbutton_ok_jana (see GCBO) % eventdata structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL) % Key: name of the key that was pressed, in lower case % Character: character interpretation of the key(s) that was pressed % Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed % --- Executes on key press with focus on pushbutton_violatingconstraints and none of its controls. function pushbutton_violatingconstraints_keypressfcn(hobject, eventdata, handles) % hobject handle to pushbutton_violatingconstraints (see GCBO) % eventdata structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL) % Key: name of the key that was pressed, in lower case % Character: character interpretation of the key(s) that was pressed % Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed % --- Executes on key press with focus on edit_qgviolating and none of its controls. function edit_qgviolating_keypressfcn(hobject, eventdata, handles) % hobject handle to edit_qgviolating (see GCBO) % eventdata structure with the following fields (see MATLAB.UI.CONTROL.UICONTROL) % Key: name of the key that was pressed, in lower case % Character: character interpretation of the key(s) that was pressed % Modifier: name(s) of the modifier key(s) (i.e., control, shift) pressed

% --- Executes when selected cell(s) is changed in uitable_pg. function uitable_pg_cellselectioncallback(hobject, eventdata, handles) % hobject handle to uitable_pg (see GCBO) % eventdata structure with the following fields (see MATLAB.UI.CONTROL.TABLE) % Indices: row and column indices of the cell(s) currently selecteds function edit117_callback(hobject, eventdata, handles) % hobject handle to edit117 (see GCBO) % Hints: get(hobject,'string') returns contents of edit117 as text edit117 as a double function edit117_createfcn(hobject, eventdata, handles) % hobject handle to edit117 (see GCBO) function Fbest_Callback(hObject, eventdata, handles) % hobject handle to Fbest (see GCBO) % Hints: get(hobject,'string') returns contents of Fbest as text Fbest as a double

function Fbest_CreateFcn(hObject, eventdata, handles) % hobject handle to Fbest (see GCBO) % --- Executes on button press in Reset. function Reset_Callback(hObject, eventdata, handles) % hobject handle to Reset (see GCBO) set(handles.uipanel_branchpower, 'Visible', 'off') set(handles.uipanel_busvoltages, 'Visible', 'off') set(handles.uipanel_optimumcontrolvariables, 'Visible', 'off') set(handles.uipanel_bestresults, 'Visible', 'off') set(handles.uipanel_conv_profile, 'Visible', 'off') set(handles.uipanel_conv_profile1, 'Visible', 'off') set(handles.uipanel_statistics, 'Visible', 'off') set(handles.uipanel_violatingconstraints, 'Visible', 'off') axes(handles.axes_conv_profile); cla axes(handles.axes_conv_profile1); cla