-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVarProfiles.m
More file actions
157 lines (108 loc) · 5.67 KB
/
VarProfiles.m
File metadata and controls
157 lines (108 loc) · 5.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
classdef VarProfiles< handle
% class import data from file, preprocess and show
% CTU UCEEB, Petr Wolf
% Last modified: 14.06.2019
% Version hist.:
properties
Fvs1 %= FVS% object FVS (.Irr, .Tamb, .Tcell, ->.PoutReal, .Pout)
% .Irr = Profile; %irradiance on module place
%. .Tamb = Profile; %ambient temeprature
% .Tcell= Profile; %cell temperature
% .PoutSet=Profile %setted Pout
Fvs1Pred %= FVS %FVS predicted
% .PoutSet=Profile %setted Pout
Grid1 %=GRID %.object GRID
% .PriceOut % grid price
% .Preal %real power out/ -in
Load1 %=Profile %load
Load1Pred %=Profile %predicted load
Ess1 %=ESS %battery (ess)
%ESS
end
properties (Dependent)
end
%properties (Access = protected)
%end
%properties (Constant)
%end
%%
methods
%% Construct an instance of this class
function obj = VarProfiles() %
obj.Fvs1=FVS();
obj.Fvs1Pred=FVS();
obj.Grid1=GRID();
obj.Load1=Profile();
obj.Load1Pred=Profile();
obj.Ess1=ESS();
PoutReal = Profile(); % real output, possible limitation of system (e.g. battery charged) included
end
% Setting the Import selection data to varaibles for simulation
function SetVar(obj, imp1, app) %set selected variable from loaded & adjusted profile
switch str2double(app.VariableListBox.Value) %VarButton.Text
case 1 %'Irradiance (G)'
app.ImportstatusLabel.Text= 'G set';
obj.Fvs1.Irr.Profile1=imp1.dataMin.Profile1 ;
case 2 %'Temperature ambient (Tamb)'
app.ImportstatusLabel.Text= 'Tamb set';
obj.Fvs1.Tamb.Profile1=imp1.dataMin.Profile1 ;
case 3 %'Temperature module (Tm)'
app.ImportstatusLabel.Text= 'Tm set';
obj.Fvs1.Tcell.Profile1=imp1.dataMin.Profile1 ;
case 4 % 'PVS AC output'
app.ImportstatusLabel.Text= 'P ac set';
obj.Fvs1.PoutSet.Profile1=imp1.dataMin.Profile1;
case 5 %'PVS AC output predicted'
app.ImportstatusLabel.Text= 'P ac predicted set';
obj.Fvs1Pred.PoutSet.Profile1=imp1.dataMin.Profile1;
case 6 %'Grid price'
app.ImportstatusLabel.Text= 'price set';
obj.Grid1.PriceOut.Profile1 =imp1.dataMin.Profile1;
case 7 %'Load'
app.ImportstatusLabel.Text= 'load set';
obj.Load1.Profile1= imp1.dataMin.Profile1 ;
case 8 %'Load predicted'
app.ImportstatusLabel.Text= 'predicted load set';
obj.Load1Pred.Profile1= imp1.dataMin.Profile1;
otherwise
disp('no selection')
end
end
%% Loading the variable to import selection
function LoadVar(obj, imp1, app) %set selected variable from loaded & adjusted profile
%VarButton = app.VariableButtonGroup.SelectedObject;
switch str2double(app.VariableListBox.Value) %VarButton.Text
case 1 %'Irradiance (G)'
app.ImportstatusLabel.Text= 'G loaded';
imp1.dataMin.Profile1 =obj.Fvs1.Irr.Profile1;
case 2 %'Temperature ambient (Tamb)'
app.ImportstatusLabel.Text= 'Tamb loaded';
imp1.dataMin.Profile1 = obj.Fvs1.Tamb.Profile1;
case 3 %'Temperature module (Tm)'
app.ImportstatusLabel.Text= 'Tm loaded';
imp1.dataMin.Profile1 =obj.Fvs1.Tcell.Profile1;
case 4 % 'PVS AC output'
app.ImportstatusLabel.Text= 'P ac loaded';
imp1.dataMin.Profile1 =obj.Fvs1.PoutSet.Profile1;
case 5 %'PVS AC output predicted'
app.ImportstatusLabel.Text= 'P ac predicted loaded';
imp1.dataMin.Profile1 =obj.Fvs1Pred.PoutSet.Profile1;
case 6 %'Grid price'
app.ImportstatusLabel.Text= 'price loaded';
imp1.dataMin.Profile1 = obj.Grid1.PriceOut.Profile1;
case 7 %'Load'
app.ImportstatusLabel.Text= 'load loaded';
imp1.dataMin.Profile1 = obj.Load1.Profile1;
case 8 %'Load predicted'
app.ImportstatusLabel.Text= 'predicted load loaded';
imp1.dataMin.Profile1 = obj.Load1Pred.Profile1;
otherwise
disp('no selection')
end
% imp1.dataMinOrig.Profile1 =imp1.dataMin.Profile1;
end
%% Button CHOOSE FILE
% function dataMin1 = ImportFile(obj, app)
% end
end
end