Sie sind auf Seite 1von 60

The OseMOSYS modeling

framework

(Open Source Energy Modeling System)


Dr. Fabrizio Fattori - Laboratorio di Energetica Elettrica, Dip. di Ing.
Industriale e dellInformazione, Universit degli studi di Pavia

Question: Whats the best solution?

The answer is: it depends!


One solution might be better than another, depending
on the purposes
Energy system models help us choosing the proper
solution once the purposes are set

1. INTRODUCTION

What is OSeMOSYS?
OSeMOSYS
It is a generator of energy
system models
Open Source,
free

Transparency,
Broad potential

www.osemosys.org

1. INTRODUCTION
OSeMOSYS
It is a modeling framework (or models generator) for
long-term energy system models
It is based on linear programming
It has a bottom-up approach
It is developed by an international team of research groups
6

What is a modeling framework?


25
cm

Arm angle 30; legs


100 cm; head 25 cm;
etc.

80
cm
30
100
cm

Two legs, two arms,


one head

OSeMOSYS

(modeling framework)

Data of a
particular
energy
system

Model of that
particular energy
system
I can moreover
modify the structure

1. INTRODUCTION
OseMOSYS, has been created for
Enabling long-term transparent energy system analysis
Providing a free tool to anyone who might be interested
Enabling customization of models on the case studies

1. INTRODUCTION
OSeMOSYS : PROs
It is relatively simple
It is more or less constantly updated
It is open-source (you can get access to the structure and
modify it)
its free

1. INTRODUCTION
OSeMOSYS : CONs
There is no graphic interface yet (it is under development
and it will be called MoManI)
Computational burden, in terms of memory and time
required for the solutions (but a lot of progress have been
done in this sense)
10

1. INTRODUCTION
OSeMOSYS, some practical information
It works with all the main Operative Systems
The official website is www.osemosys.org
The modeling framework can be downloaded on http://
www.osemosys.org/getting-started.html
It is written with GLPK (Gnu Linear Programming Kit), so GLPK
is necessary to run the models.
11

2. THE LOGICAL STRUCTURE

12

The basic logical structure


emissions
Input Fuel

Output fuel
or energy
service

Processes and technologies may be represented by black boxes characterized by:


A) input and output
B) emissions
C) costs
...and other parameters (described later)
13

An example: gasoline cars

CO2
gasoline

transport

14

From the black boxes to energy systems


Black boxes can be used in series and parallel to represent all the processes
and technologies of the energy system
mining

production

conversion

Final uses

services

15

Detail of the energy system model


The modeler must choose the detail depending on the purposes

Group of
resources (type1)

Energy system
type 1

Overall demand

Gropu of
resources (type2)

Energy system
type n

Overall demand

16

Optimal mix of technologies

The results tell the optimal mix of technologies that satisfy the
energy demands and minimize the overall cost of the energy
system

technologies

CO2

demands

COSTI

CONSUMI
17

Example: private cars transport


Import of gasoline

Gasoline car
gasoline

Import of electricity

Photovoltaic generation

transport

Demand of
transport

electricity

Electric car

18

The low temporal resolution of long-term energy system models


(which is needed due to the computational burden) might
introduce over- or under-estimations that must be taken into
account
potenza

Profilo del carico reale


Carico modellizzato > carico reale
Carico modellizzato < carico reale

Carico
giornaliero

Carico
notturno
tempo

19

2. MODEL STRUCTURE
BASIC WORKING SCHEME
ENERGY
CARRIERS

TECHNOLOGIES
Links carriers and
technologies; defines
technologies specific
consumption
Describes fixed and
variable costs and
operating constraints
Fixes a limit on the
exploitation of
sources

EMISSIONS

Defines the emission factors of each


technology and the emission limits

Defines the specific


production of energy
service or carrier of
each technology

ENERGY CARRIERS
OR SERVICES

Defines the demand of


energy services

Over the time


horizon

THE USER

20

2. MODEL STRUCTURE
BASIC WORKING SCHEME
ENERGY
CARRIERS

TECHNOLOGIES

Calculates the fuel


consumption

Over the time


horizon

Decides which technology to


install and when to use them,
in order to minimize the
overall cost while respecting
all the constraints and
satisfying the energy service
demands

THE SOLVER

EMISSIONS

Calculates the production


of emissions

ENERGY CARRIERS
OR SERVICES

21

The mathematical structure of


OSeMOSYS

OSeMOSYS is based on a linear optimization problem


made up of:
parameters

Decision
variables

Intermediate
variables

indexes

Parameters are the input data set by the user in order to describe:
technologies (efficiencies, costs, etc.) and demands (quantity and normalized
profile).
Decision variables are endogenous variables, i.e. values that are defined by
the solver in order to (i) to meet the constraints and (ii) minimize the costs

Intermediate variables are values that may be interesting for reading the
results or that may be used within constraints

Indexes of the variables and parameters. They define the number of


dimensions of variables and parameters.

23

equations

constraints

Objective
function

Equations allows to calculate the value of interesting intermediate variables

Constraints are inequations that allow recreate physical relations (e.g.


converting power into energy), political limits (e.g. emission limit), socioeconomic limit (e.g. meeting the demand), behavioral limits and other.

The objective function to be minimized is the overall discounted cost of


the energy system over the time-horizon

24

Working scheme

ta
a
D

setting the optimal valu


e for
the decision variables

ut
p
in

parameters

Decision
variables

equations

Intermediate
variables
Rea
d

ing

of
th

er
esu

l ts

Objective
function

constraints

Meeting the
contraints

Objective function
minimization

25

Parameters that describe the technologies


VariableCost

When and how much it should


work (CapacityFactor)

Input per unit of


activity
(InputActivityRatio)

Output per unit of


activity
(OutputActivityRatio)
OperationalLife
Annual
potential

FixedCost

InvestmentCost

CapacityTo
ActivityUnit

ResidualCapacity

Parameters that descrive the demands


Annual energy

Annual quantities required


( SpecifiedAnnualDemand
Profilo dettagliato
Or
AccumulatedAnnualDemand)
(SpecifiedDemandProfile)
Tempo (anni)

The demand

Power

Normalized annual profile


(SpecifiedDemandProfile)
Tempo (frazioni di anno)

It can be described through an overall annual value and then through a normalized
annual profile

The decision variables


Scarti/emissioni
Trasporto
(di persone)

benzina

RateOfActivity

NewCapacity

How many technologies, when, where

Trade

Which technologies to use among the


installed ones, when, where, in which
mode of operation, how much

Which fuel to trade between which regions, how


much, when.

The objective function


Cost minimization
Variable costs

They vary with the use of the


technologies

Investment
costs
They vary with the new
installed capacity

Fixed costs
They vary with the total
installed capacity

Emission
penalties

(overall discounted cost of the energy system throughout


the time horizon)

constraints

The energy balance for each fuel


Other modeled regions

Region boundaries

In each region in each moment, for


each fuel, production + trade (in) must
be greater than or equal to
consumption + trade (out)

Technologies that use the


considered fuel

Technologies that produce the


considered fuel
Exogenous demand of
the considered fuel

31

From power to energy


Capacity

Producible energy
Produced energy

Producible energy
In one year (= p x t)

1 year

time

Installed
capacity

The parameter CapacityToActivityUnit is the the producible energy in one year by


one unit power of one specified technology: e.g. if the installed power is 1kW and
energy is measured in KWh, since in one year there are 8766 hours, the parameter
will be 8766.
1

From power to energy


Capacity

Producible energy
Produced energy

Producible energy
In one year (= p x t)

Installed
capacity

time

1 year

From power to energy


Capacity

Producible energy
Produced energy

Installed
capacity

Maximum producible
Producible energy
energy is always >= to the
In one year (= p x t)
produced energy

time

1 year

From power to energy


Capacity

Producible energy
Produced energy

Installed
capacity

The decision variable


NewCapacity decides the
installed power
Variable RateOfActivity
decides the fraction to be
used in one year

NewCapacity
RateOfActivity
time

1 year

From power to energy


Capacity

Producible energy
Produced energy
Demand

Installed
capacity

If the demand is constant, the


solver will tend to minimize the
installed capacity and use it at
full power (to minimize cost if
they are constant in time)

time

1 year

From power to energy


Capacity

Producible energy
Produced energy
Demand

Installed
capacity

If the demands depend on


time, the solver will install the
minimum capacity and use ti at
minimum required

time

1 year

From power to energy


Producible energy

Capacity
Installed
capacity

Produced energy
Demand
CapacityFactor

CapacityFactor (from 0 to 1)
indicates the maximum
exploitability of the capacity
available in each time slice

time

1 year

From power to energy


Producible energy

Capacity
Installed
capacity

Produced energy
Demand
CapacityFactor

If you want to sastify the demand


with the given CapacityFactor the
maximum installed capacity must
be increased.

WARNING

time

1 year

From power to energy


Capacity

Producible energy
Produced energy
Demand
CapacityFactor

Installed
capacity

By increasing the installed capacity


also the maximum installed
capacity used (according to the
capacity factor) increases

OK

time

1 year

From power to energy


Capacity

Producible energy
Produced energy
Demand
CapacityFactor

Actually the technology is used as


less as possible

Installed
capacity

time

1 year

10

From power to energy


Capacity
Installed
capacity

Producible energy
Produced energy
CapacityFactor

tempo
In every region, at every time slice, the production of each technology must be <=
to the producible energy rescaled with teh capacuity factor
Produciton

Installed capcity x CapacityToActivityUnit

x CapacityFactor

Moreover, in every region, in every year, the production of each technology must be
smaller or equal to the producible energy rescaled withthe CapacityFactor and
AvailabilityFactor (from 0 to 1, it represents the availability of the technology in time
11

Possible error of time discretization


Error due to low resolution must me corrected and avioded

Capacity

Real load profile


Load computed > real loadreale
Load computed < real load

Day load
Night load
time

12

Correction of time approximation


Capacity

Producible energy
Produced energy
CapacityFactor
Final installed capacity

Installed capacity
(computed)

time
The installed capacity is increased of the parameter ReserveMargin (> o =1) that is used
(at the beginning) to take into account the possibility (statistically defined) of having a
deman higher than expected. The parameter can be used also to correct the
approximation introduce by time discretization. In alternative, it is possible to add a
time-slice related only to the peak of the demand
Final installe capacity = installed capacity (computed) x ReserveMargin
13

Modeling other dynamics


Behavioral, physical, thechnological, logistic, economic limits

Maximum penetrations
Behavior
Economy
Politics, logistic
technology
physics

14

Installed capacity
Capacity

Installed capacity previous year


New capacity

Capacity installed year 4


Capacity installed year 3
Capacity installed year 2
Capacity installed year 1

time
Year 1

Year 2

Year 3

Year 4

Installed capacity y = NewCapacity y + installed capacityy-1


In case plant life time is longerthan considered time span

15

Installed capacity
Capacity

Installed capacity previous year


New capacity

Capacity installed year 4


Capacity installed year 3
Capacity installed year 2
Capacity installed year 1

time
Year 1

Year 2

Year 3

Year 4

Installed capacity y = NewCapacity y + installed capacityy-1


In case plant life time is shorter than considered time span

16

Installed capacity
capacity

Residual capacity
New capacity
Installed capacity from year to year y-1 and still operating

Capacity installed year 4


Capacity installed year 3
Capacity installed year 2
Capacity installed year 1

time
Year 1

Year 2

Year 3

Anno 4

Introduce a new parameter: ResidualCapacity (installed capacity before year 1


taken into account in the modellled time period)

Potenza installata y =
17

Vincoli sulla potenza installata


potenza

Residual capacity
New capacity
Installed capacity from year to year y-1 and still operating

Capacity installed year 4


Capacity installed year 3
Capacity installed year 2
Capacity installed year 1

time
Year 1

Year 2

TotalCapacityLowerLimity

Year 3

Year 4

Installed
capacityy

TotalCapacityUpperLimity

18

Constraints on installed capacity


capacity

Residual capacity
New capacity
Installed capacity from year to year y-1 and still operating

Capacity installed year 4


Capacity installed year 3
Capacity installed year 2
Capacity installed year 1

time
Year 1

Year 2

NewInvestment
CapacityLowerLimit y

Year 3

Year 4

New
Capacity y

NewInvestment
CapacityUpperLimity
19

Consumptions

x InputActivityRatio

consumi

Consumptions of one technology are porportional to its production and the specific
consumptions
Consumptions

RateOfActivity

InputActivityRatio
20

Production of waste/emissions

x EmissionActivityRatio

Emissions

Emissions of one technology are proportional to the produciton and the emissions
factor (EmissionActivityRatio)
emissions

RateOfActivity

EmissionActivityRatio
21

Emission constraint
Emissions
Emissions

Time horizon (years)

AnnualEmissiony

EmissionLimity

22

Discount rate (cost actualizationdei costi)


Objective function to be minimized is the actualized sum of all the costs, by
technologu, region,

Costs and revenewes value less if referred


to the future (I prefer to have 100 euros
today than tomorrow)

e.g. with a DiscountRate of 3%, 100 of today will values 97. In one year The effect of the
discount rate affectes the results of the model on the preference of technologies with
smaller initial investment cost.
23

A list of the indexes and of the parameters used in the original


version of OseMOSYS (2011.11.08) is reported in the next slides. The
list make reference to the article of Mark Howells et al. OSeMOSYS:
The Open Source Energy Modeling System: An introduction to its
ethos, structure and development, Energy Policy (39), October
2011, Pages 58505870.
http://www.sciencedirect.com/science/article/pii/S0301421511004897

55

Definition of the indexes

Definition of the decision variables


56

Parameters definition 1/2

57

Parameters definition 2/2

58

Additional material and references

website www.osemosys.org

Manual (2015)

http://www.osemosys.org/uploads/1/8/5/0/18504136/osemosys_manual_-_working_with_text_files_-_2015-11-05.pdf

The forums online

1- https://www.facebook.com/groups/1078001842230669/?fref=ts
2- http://
area51.stackexchange.com/proposals/97641/open-modelling-tools-for-sustainable-development-goals-sdgs

Mark Howells et al. OSeMOSYS: The Open Source Energy Modeling System: An introduction to
its ethos, structure and development, Energy Policy (39), October 2011, Pages 58505870.
http://www.sciencedirect.com/science/article/pii/S0301421511004897

For an example application,Fattori, Albini e Anglani, Proposing an open-source model for


unconventional participation to energy planning, Energy Research & Social Science, Volume
15, May 2016, Pages 12-33
http://www.sciencedirect.com/science/article/pii/S2214629616300160

59

For any question, please address an email to


fabrizio.fattori@unipv.it

Das könnte Ihnen auch gefallen