Skip to content

Commit

Permalink
Merge pull request #22 from ahmedosama07/gui
Browse files Browse the repository at this point in the history
Gui
  • Loading branch information
ahmedosama07 authored Apr 25, 2023
2 parents 4987d6a + d9bc4e6 commit 6a0f283
Show file tree
Hide file tree
Showing 22 changed files with 3,506 additions and 50 deletions.
10 changes: 8 additions & 2 deletions CASE1.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
function [efficiency, VR, P_r, pf] = CASE1(A, B, C, D)
%CASE1 Summary of this function goes here
% Detailed explanation goes here
V_r = complex((input('Recieving voltage (in kV): ') / sqrt(3)) * 10^3);
% function measures line performance for 0.8 lagging power factor
val = inputdlg("Recieving voltage (in kV): ");

while isempty(str2num(val{1}))
val = inputdlg("Recieving voltage (in kV): ");
end

V_r = complex((str2num(val{1}) / sqrt(3)) * 10^3);
pf = 0.8; % 0.8 lagging power factor
phi = -1 * acos(pf);
P_r = 0:100*10^(3); % recieved active power
Expand Down
15 changes: 10 additions & 5 deletions CASE2.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
function [efficiency, VR, P_r, pf] = CASE2(A ,B ,C ,D)
%UNTITLED2 Summary of this function goes here
%CASE2 Summary of this function goes here
% calculate efficiency and voltage reg for case 2
V_r = complex((input('Recieving voltage (in kV): ') / sqrt(3)) * 10^3);
val = inputdlg("Recieving voltage (in kV): ");

while isempty(str2num(val{1}))
val = inputdlg("Recieving voltage (in kV): ");
end

V_r = complex((str2num(val{1}) / sqrt(3)) * 10^3);
pf = 0.3:0.01:1;
phi_lag = -1 * acos(pf);
phi_lead = acos(pf);
Expand Down Expand Up @@ -34,8 +40,7 @@
VR_lag = ((abs(V_rnl_lag) - abs(V_r)) / abs(V_r)) * 100; % voltage regulation lag
VR_lead = ((abs(V_rnl_lead) - abs(V_r)) / abs(V_r)) * 100; % voltage regulation lead

efficiency = [efficiency_lag efficiency_lead];
VR = [VR_lag VR_lead];

efficiency = [efficiency_lag; efficiency_lead];
VR = [VR_lag; VR_lead];
end

132 changes: 132 additions & 0 deletions TransmissionLines.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<deployment-project plugin="plugin.ezdeploy" plugin-version="1.0">
<configuration file="D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\TransmissionLines.prj" location="D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines" name="TransmissionLines" target="target.ezdeploy.standalone" target-name="Application Compiler">
<param.appname>TransmissionLines</param.appname>
<param.icon />
<param.icons />
<param.version>1.0</param.version>
<param.authnamewatermark>Ahmed Osama</param.authnamewatermark>
<param.email>[email protected]</param.email>
<param.company />
<param.summary />
<param.description />
<param.screenshot />
<param.guid />
<param.installpath.string>\TransmissionLines\</param.installpath.string>
<param.installpath.combo>option.installpath.programfiles</param.installpath.combo>
<param.logo />
<param.install.notes />
<param.target.install.notes />
<param.intermediate>${PROJECT_ROOT}\TransmissionLines\for_testing</param.intermediate>
<param.files.only>${PROJECT_ROOT}\TransmissionLines\for_redistribution_files_only</param.files.only>
<param.output>${PROJECT_ROOT}\TransmissionLines\for_redistribution</param.output>
<param.logdir>${PROJECT_ROOT}\TransmissionLines</param.logdir>
<param.enable.clean.build>false</param.enable.clean.build>
<param.user.defined.mcr.options />
<param.target.type>subtarget.standalone</param.target.type>
<param.support.packages />
<param.web.mcr>true</param.web.mcr>
<param.package.mcr>false</param.package.mcr>
<param.no.mcr>false</param.no.mcr>
<param.web.mcr.name>MyAppInstaller_web</param.web.mcr.name>
<param.package.mcr.name>MyAppInstaller_mcr</param.package.mcr.name>
<param.no.mcr.name>MyAppInstaller_app</param.no.mcr.name>
<param.windows.command.prompt>true</param.windows.command.prompt>
<param.create.log>false</param.create.log>
<param.log.file />
<param.native.matlab>false</param.native.matlab>
<param.checkbox>false</param.checkbox>
<param.example />
<param.help.text>Syntax
-?

Input Arguments
-? print help on how to use the application
input arguments</param.help.text>
<unset>
<param.icon />
<param.icons />
<param.version />
<param.company />
<param.summary />
<param.description />
<param.screenshot />
<param.guid />
<param.installpath.string />
<param.installpath.combo />
<param.logo />
<param.install.notes />
<param.target.install.notes />
<param.intermediate />
<param.files.only />
<param.output />
<param.logdir />
<param.enable.clean.build />
<param.user.defined.mcr.options />
<param.target.type />
<param.support.packages />
<param.web.mcr />
<param.package.mcr />
<param.no.mcr />
<param.web.mcr.name />
<param.package.mcr.name />
<param.no.mcr.name />
<param.windows.command.prompt />
<param.create.log />
<param.log.file />
<param.native.matlab />
<param.checkbox />
<param.example />
</unset>
<fileset.main>
<file>${PROJECT_ROOT}\app1_autoreflow2.mlapp</file>
</fileset.main>
<fileset.resources />
<fileset.package />
<fileset.depfun>
<file>${PROJECT_ROOT}\capacitance.m</file>
<file>${PROJECT_ROOT}\CASE1.m</file>
<file>${PROJECT_ROOT}\CASE2.m</file>
<file>${PROJECT_ROOT}\inductance.m</file>
<file>${PROJECT_ROOT}\inputsdlg.m</file>
<file>${PROJECT_ROOT}\lineParameters.m</file>
<file>${PROJECT_ROOT}\linePerformance.m</file>
<file>${PROJECT_ROOT}\longLine.m</file>
<file>${PROJECT_ROOT}\midiumLine.m</file>
<file>${PROJECT_ROOT}\rcl.m</file>
<file>${PROJECT_ROOT}\resistance.m</file>
<file>${PROJECT_ROOT}\shortLine.m</file>
</fileset.depfun>
<build-deliverables>
<file location="${PROJECT_ROOT}\TransmissionLines\for_testing" name="TransmissionLines.exe" optional="false">D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\TransmissionLines\for_testing\TransmissionLines.exe</file>
<file location="${PROJECT_ROOT}\TransmissionLines\for_testing" name="splash.png" optional="false">D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\TransmissionLines\for_testing\splash.png</file>
<file location="${PROJECT_ROOT}\TransmissionLines\for_testing" name="readme.txt" optional="true">D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\TransmissionLines\for_testing\readme.txt</file>
</build-deliverables>
<workflow />
<matlab>
<root>C:\Program Files\Polyspace\R2021a</root>
<toolboxes>
<toolbox name="matlabcoder" />
</toolboxes>
<toolbox>
<matlabcoder>
<enabled>true</enabled>
</matlabcoder>
</toolbox>
</matlab>
<platform>
<unix>false</unix>
<mac>false</mac>
<windows>true</windows>
<win2k>false</win2k>
<winxp>false</winxp>
<vista>false</vista>
<linux>false</linux>
<solaris>false</solaris>
<osver>10.0</osver>
<os32>false</os32>
<os64>true</os64>
<arch>win64</arch>
<matlab>true</matlab>
</platform>
</configuration>
</deployment-project>
16 changes: 16 additions & 0 deletions TransmissionLines/PackagingLog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<html><meta charset="UTF-8"><pre>
<font color=blue>mcc -o TransmissionLines -W 'WinMain:TransmissionLines,version=1.0' -T link:exe -d 'D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\TransmissionLines\for_testing' -v 'D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\app1_autoreflow2.mlapp' -r 'C:\Program Files\Polyspace\R2021a\toolbox\compiler\resources\default_icon.ico' </font>
Compiler version: 8.2 (R2021a)

Analyzing file dependencies.

Parsing file "D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\app1_autoreflow2.mlapp"
(referenced from command line).
Generating file "D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\TransmissionLines\for_testing\readme.txt".
<font color=blue>Packaging...</font>
Creating the bundle...
Creating the install agent URL file...
Web based installer created at D:\Engineering\College\Year 2\Second Term\Power Systems\Projects\Transmission-Lines\TransmissionLines\for_redistribution\MyAppInstaller_web.exe.
Packaging complete.
Elapsed packaging time was: 7 seconds.
</pre></html>
Binary file not shown.
Binary file not shown.
47 changes: 47 additions & 0 deletions TransmissionLines/for_redistribution_files_only/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
TransmissionLines Executable

1. Prerequisites for Deployment

Verify that version 9.10 (R2021a) of the MATLAB Runtime is installed.
If not, you can run the MATLAB Runtime installer.
To find its location, enter

>>mcrinstaller

at the MATLAB prompt.
NOTE: You will need administrator rights to run the MATLAB Runtime installer.

Alternatively, download and install the Windows version of the MATLAB Runtime for R2021a
from the following link on the MathWorks website:

https://www.mathworks.com/products/compiler/mcr/index.html

For more information about the MATLAB Runtime and the MATLAB Runtime installer, see
"Distribute Applications" in the MATLAB Compiler documentation
in the MathWorks Documentation Center.

2. Files to Deploy and Package

Files to Package for Standalone
================================
-TransmissionLines.exe
-MCRInstaller.exe
Note: if end users are unable to download the MATLAB Runtime using the
instructions in the previous section, include it when building your
component by clicking the "Runtime included in package" link in the
Deployment Tool.
-This readme file



3. Definitions

For information on deployment terminology, go to
https://www.mathworks.com/help and select MATLAB Compiler >
Getting Started > About Application Deployment >
Deployment Product Terms in the MathWorks Documentation
Center.




Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 2 additions & 0 deletions TransmissionLines/for_testing/mccExcludedFiles.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The List of Excluded Files
Excluded files Exclusion Message ID Reason For Exclusion Exclusion Rule
47 changes: 47 additions & 0 deletions TransmissionLines/for_testing/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
TransmissionLines Executable

1. Prerequisites for Deployment

Verify that version 9.10 (R2021a) of the MATLAB Runtime is installed.
If not, you can run the MATLAB Runtime installer.
To find its location, enter

>>mcrinstaller

at the MATLAB prompt.
NOTE: You will need administrator rights to run the MATLAB Runtime installer.

Alternatively, download and install the Windows version of the MATLAB Runtime for R2021a
from the following link on the MathWorks website:

https://www.mathworks.com/products/compiler/mcr/index.html

For more information about the MATLAB Runtime and the MATLAB Runtime installer, see
"Distribute Applications" in the MATLAB Compiler documentation
in the MathWorks Documentation Center.

2. Files to Deploy and Package

Files to Package for Standalone
================================
-TransmissionLines.exe
-MCRInstaller.exe
Note: if end users are unable to download the MATLAB Runtime using the
instructions in the previous section, include it when building your
component by clicking the "Runtime included in package" link in the
Deployment Tool.
-This readme file



3. Definitions

For information on deployment terminology, go to
https://www.mathworks.com/help and select MATLAB Compiler >
Getting Started > About Application Deployment >
Deployment Product Terms in the MathWorks Documentation
Center.




1 change: 1 addition & 0 deletions TransmissionLines/for_testing/requiredMCRProducts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
35000 35010
Binary file added TransmissionLines/for_testing/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions TransmissionLines/for_testing/unresolvedSymbols.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Path Symbol Reason
Binary file added app1_autoreflow2.mlapp
Binary file not shown.
Loading

0 comments on commit 6a0f283

Please sign in to comment.