Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Millinger
BENOPT
Commits
065c10ef
Commit
065c10ef
authored
Sep 24, 2020
by
Markus Millinger
Browse files
Included safety valve for lacking capacity and generation input data
parent
ce0ca7f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main.m
View file @
065c10ef
...
...
@@ -59,7 +59,7 @@ for scenario = 1:noScenarios
s
.
weatherYear
=
{
'2018'
};
%Set country specific data
countryID
=
'
D
E'
;
countryID
=
'
S
E'
;
% powerDataCountry = ...
% powerData(contains(powerData.cet_cest_timestamp,s.weatherYear),...
% contains(powerData.Properties.VariableNames,countryID));
...
...
src/scalingCapFacVRE.m
View file @
065c10ef
...
...
@@ -22,6 +22,10 @@
function
[
genDataScaled
,
capFacInst
]
=
scalingCapFacVRE
(
capData
,
genData
,
capFac
)
if
capData
==
0
%to avoid division by zero
capData
=
0.00001
*
ones
(
8760
,
1
);
end
ScaleFactor
=
1
;
capFacVar
=
sum
(
genData
.
/
capData
)/
length
(
genData
);
capFacInst
=
genData
.
/
capData
;
...
...
@@ -29,13 +33,10 @@ capFacInst = genData./capData;
while
capFacVar
<
capFac
index
=
capFacInst
<
1
;
genData
(
index
)
=
min
(
genData
(
index
)
.*
ScaleFactor
,
capData
(
index
));
% genData(~index) = capData(~index);
ScaleFactor
=
ScaleFactor
+
0.001
;
capFacInst
=
genData
.
/
capData
;
capFacVar
=
sum
(
genData
.
/
capData
)/
length
(
genData
);
end
% capFacVar/capFac;
genDataScaled
=
genData
;
% ScaleFactor;
end
\ No newline at end of file
src/setCountryData.m
View file @
065c10ef
...
...
@@ -28,14 +28,6 @@ indexCountry = find(contains(s.countryNames,{countryID}));
s
.
discountRateInvest
=
techData
.
data
.
countryData
(
1
,
indexCountry
);
s
.
labourCostStart
=
techData
.
data
.
countryData
(
2
,
indexCountry
);
%/h
s
.
powerLoad
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_load_actual_entsoe_power_statistics'
]))};
s
.
PVcap
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_solar_cap'
]))};
s
.
PVgen
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_solar_gen'
]))};
s
.
WindOnCap
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_wind_onshore_cap'
]))};
s
.
WindOnGen
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_wind_onshore_gen'
]))};
s
.
WindOffCap
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_wind_offshore_cap'
]))};
s
.
WindOffGen
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_wind_offshore_gen'
]))};
s
.
windOnShoreInit
=
techData
.
data
.
countryData
(
11
,
indexCountry
);
s
.
windOnShoreEnd
=
techData
.
data
.
countryData
(
12
,
indexCountry
);
s
.
windOffShoreInit
=
techData
.
data
.
countryData
(
13
,
indexCountry
);
...
...
@@ -79,6 +71,26 @@ f.resPot = techData.data.biomassResPot(1:f.numResidue,index
s
.
ghgEFPowerData
=
techData
.
data
.
powerEmissions
(
1
+
indexCountry
,[
2017
2018
2030
2050
]
-
2016
);
%kgCO2eq/kWh interp1([2015 2020 2025 2030 2035 2040 2045 2050],co2sourceData,2020:1:2050,'linear');
s
.
powerLoad
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_load_actual_entsoe_power_statistics'
]))};
s
.
PVcap
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_solar_cap'
]))};
if
isempty
(
s
.
PVcap
)
==
1
%if the data does not exist for the country/year, use the given initial capacity as approximation (the set weather year should not be too far off the capacity year for this to work properly)
s
.
PVcap
=
s
.
solarPVInit
.*
ones
(
8760
,
1
);
end
s
.
PVgen
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_solar_gen'
]))};
s
.
WindOnCap
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_wind_onshore_cap'
]))};
if
isempty
(
s
.
WindOnCap
)
==
1
s
.
WindOnCap
=
s
.
windOnShoreInit
.*
ones
(
8760
,
1
);
end
s
.
WindOnGen
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_wind_onshore_gen'
]))};
s
.
WindOffCap
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_wind_offshore_cap'
]))};
if
isempty
(
s
.
WindOffCap
)
==
1
s
.
WindOffCap
=
s
.
windOffShoreInit
.*
ones
(
8760
,
1
);
end
s
.
WindOffGen
=
powerDataCountry
{:,
contains
(
powerDataCountry
.
Properties
.
VariableNames
,
join
([
countryID
,
'_wind_offshore_gen'
]))};
if
isempty
(
s
.
WindOffGen
)
==
1
s
.
WindOffGen
=
10
^-
6
*
ones
(
8760
,
1
);
end
%The number of historic passenger vehicles in each fuel type
%(Diesel,Hybrid (excl. Plug-in-hybrid),Plug-in-Hybrid,Battery electric/Fuel
%cell,Natural gas (incl. LPG),Flex-Fuel,Petrol)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment