Você está na página 1de 19

Document creat ion and dist ribut ion

Document Owner Rouquia Dj abali, Joel Hoeksema, Yves Langer,


Funct ion Cosmos development group
File locat ion
Dist ribut ion Publicly available
Approval
Version Dat e Name Funct ion Signat ure

Previous versions
Version Dat e Aut hor Summary of changes

Relat ed document s



At t achment s



COSMOS descript ion
CWE Market Coupling algorit hm

Version 1. 0
Dat e 29 June 2010
St at us Draft Final

1 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 General principles of market coupling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. 1. General principle of market coupling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. 2. ATC market coupling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 COSMOS in a nutshell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4 Market const raint s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4. 1. Hourly orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4. 2. Profile block orders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5 Net work Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5. 1. ATC- Based const raint s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5. 2. Flow- Based const raint s ( used for FB parallel runs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6 Funct ioning of COSMOS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6. 1. Algorit hm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6. 2. Precision and rounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6. 3. Price boundaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6. 3. 1. Price boundaries and net work const raint s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6. 3. 2. Ext reme prices and curt ailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6. 4. Opt imalit y and qualit y of t he solut ion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6. 5. Time cont rol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6. 6. Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7 Furt her geographic and product ext ensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
8 APPENDI X 1: Mathemat ical formulat ion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8. 1. Set s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8. 2. Dat a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8. 3. Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8. 4. Market Const raint s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
8. 5. Net work Const raint s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8. 6. Obj ect ive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8. 7. Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
9 APPENDI X 2: Price indet erminacy rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
9. 1. Not at ions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
9. 2. Mid point rule formulat ion for price det erminat ion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
9. 3. Prices t o be published . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
9. 4. Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
10 APPENDI X 3: Volume indet erminacies and curt ailment rules. . . . . . . . . . . . . . . 16
10. 1. Definit ions and obj ect ive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
10. 2. Avoiding curt ailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
10. 3. Minimizing and sharing curt ailment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10. 4. Maximizing t raded volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
10. 5. Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 3 of 19


1 Summary

The CWE proj ect part ies have select ed COSMOS as t he algorit hm t o calculat e daily market
coupling result s. COSMOS is a branch- and-bound algorit hm designed, in collaborat ion wit h
N- SI DE, t o solve t he problem of coupling spot market s including block orders. I t nat urally
t reat s all t echnical and product requirement s set by t he CWE proj ect , including st ep and
int erpolat ed orders, flow- based net work under PTDF represent at ion, ATC links and DC
cables (possible wit h ramping, t ariffs and losses) , profiles block orders, flexible blocks
orders and linked block orders.

COSMOS out put s net export posit ions and prices on each market and each hour, t he set of
execut ed orders, and t he congest ion prices on each t ight net work element . These out put s
sat isfy all requirement s of a feasible solut ion, including congest ion price propert ies and t he
absence of Paradoxically Accept ed Blocks.

This document only describes t he feat ures t hat are current ly in use in t he CWE cont ext ,
t hough COSMOS already int egrat es many addit ional feat ures such as t hose t o be expect ed
in a cont ext of product and geographic ext ensions.

2 General principles of market coupling
2.1. General principle of market coupling

Market coupling is bot h a mechanism for mat ching orders on power exchanges (PXs) and
an implicit cross- border capacit y allocat ion mechanism. Market coupling opt imizes t he
economic efficiency of t he coupled market s: all profit able deals result ing from t he
mat ching of bids and offers in t he coupled market s of t he PXs are execut ed; mat ching
result s are however subj ect t o capacit y const raint s calculat ed by Transmission Syst em
Operat ors ( TSOs) which may limit t he flows bet ween t he coupled market s.

Market prices and schedules of t he connect ed market s are simult aneously det ermined wit h
t he use of t he available capacit y defined by t he TSOs. The t ransmission capacit y is t hereby
implicit ly auct ioned and t he implicit cost of t he t ransmission capacit y is set t led by t he price
differences bet ween t he market s. I n part icular, if no t ransmission capacit y const raint is
act ive, t hen t here is no price difference bet ween t he market s and t he implicit cost of t he
t ransmission capacit y is null.

2.2. ATC market coupling

Under ATC, Market coupling relies on t he principle t hat t he market s wit h t he lowest prices
export elect ricit y t o t he market s wit h t he highest prices. Bet ween t wo market s, t wo
sit uat ions are possible: eit her t he ATC is large enough and t he prices of bot h market s are
equalized (price convergence), or t he ATC is not sufficient and t he prices cannot be
equalized. These t wo cases are described in t he following examples.

Suppose t hat , init ially, t he price of market A is lower t han t he price of market B. Market A
will t herefore export t o market B, t he price of market A will increase whereas t he price of
market B decreases. I f t he ATC from market A t o market B is sufficient ly large, a common
price in t he market may be reached ( PA* = PB* ) . This first case is illust rat ed in Figure 1.

COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 4 of 19


Figure 1: Market coupling of t wo market s wit h no congest ion


The ot her case, illust rat ed in Figure 2, happens when t he ATC is not sufficient t o ensure
price harmonizat ion bet ween t he t wo market s. The amount of elect ricit y exchanged
bet ween t he t wo count ries is t hen equal t o t he ATC and t he prices PA* and PB* are given
by t he int ersect ion of t he purchase and sale curves. Export ed elect ricit y is bought in t he
export area at a price of PA* and is sold in t he import area at a price of PB* . The
difference bet ween t he t wo prices mult iplied by t he exchanged volume i.e. t he ATC is
called congest ion revenue , and is collect ed and used pursuant t o art icle 6. 6 of t he
Regulat ion ( EC) N 1228/ 2003 of t he European Parliament and of t he Council of 26 June
2003 on condit ion for access t o t he net work for cross- border exchanges in elect ricit y.


Figure 2: Market coupling of t wo market s wit h congest ion



COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 5 of 19

3 COSMOS in a nut shell
This sect ion describes t he model and t he algorit hm t hat have been chosen t o solve t he
problem associat ed wit h t he coupling of t he day- ahead power market s in t he CWE region.

Market part icipant s submit orders on t heir respect ive power exchange. The goal is t o
decide which orders t o execut e and which t o rej ect and publish prices such t hat :

- The social welfare
1
generat ed by t he execut ed orders is maximal.
- Orders and prices are coherent .
- The power flows induced by t he execut ed orders, result ing in t he net posit ions do
not exceed t he capacit y of t he relevant net work element s.

COSMOS has been init ially developed by BELPEX, in collaborat ion wit h N- SI DE, a company
specialized in opt imizat ion solut ions based on operat ions research & modeling. The
purpose of t his algorit hm is t o deal wit h t he CWE coupling problem in way t hat allows
considering more general aspect s of market coupling such as const raint s t hat would arise if
coupling wit h neighboring market s. COSMOS is current ly co- owned by APX- ENDEX, BELPEX
and EPEX SPOT.

I n summary, t he COSMOS algorit hm:

- nat urally t reat s st andard and new order t ypes wit h all t heir requirement s,
- nat urally handles bot h Available Transmission Capacit y ( ATC) and Flow-Based ( FB)
net work represent at ions as well as possible alt ernat ive models and HVDC cable
feat ures,
- implement s specific curt ailment rules for t hose cases where price boundaries are
not harmonized
- is not limit ed by t he number of market s, orders or net work const raint s,
- finds quickly ( wit hin seconds) a very good solut ion in all cases (even wit h problems
wit h 350000 hourly orders and 1800 block orders in more t han 10 market s) ,
- cont inues improving t his init ial solut ion unt il t he t ime limit ( e. g. 10 min) is
reached,
- generat ing several feasible solut ions during t he course of it s execut ion,
- unless it can show t hat t he mat hemat ically opt imal solut ion has been found ( which
is most oft en t he case), in which case it st ops before t he t ime limit .

I n t he t wo following sect ions, we det ail which product s and net work models can be
handled by COSMOS. Sect ion 6 gives a high- level descript ion of how COSMOS works, and
sect ion 7 provides addit ional informat ion relat ed t o t he funct ionalit ies and behaviors of t he
algorit hm.
4 Market const raint s
Market const raint s
2
are t hose applying t o t he orders submit t ed t o t he exchanges. The list
present ed hereunder proposes a set of all product s available in at least one CWE
Exchange.
4.1. Hourly orders
Depending on market s needs and on already exist ing syst ems, hourly orders can be eit her
st epwise ( BELPEX, APX- ENDEX) or linearly int erpolat ed ( EPEX SPOT) .

The fixing of hourly orders sat isfies t he following const raint s:

1
Social welfare is defined as: consumer surplus + producer surplus + congest ion revenue
across t he region. I t is t he obj ect ive funct ion of COSMOS (see obj ect ive in t echnical
appendix 1) .
2
See also Market const raint s sect ion in appendix 1 for a mat hemat ical formulat ion of
t hese const raint s.
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 6 of 19


- An Hourly Offer is rej ect ed when t he Market Clearing Price is lower t han t he offer
( lowest ) price limit .
- An Hourly Bid is rej ect ed when t he Market Clearing Price is higher t han t he bid
( highest ) price limit .
- An Hourly Offer is execut ed when t he Market Clearing Price is higher t han t he offer
( highest ) price limit .
- An Hourly Bid is execut ed when t he Market Clearing Price is lower t han t he bid
( lowest ) price limit .
- An Hourly Order may be part ially execut ed if and only if t he Market Price is equal
t o t he price limit of t hat order / is bet ween t he t wo price limit s of t hat order.
- An Hourly Order is not execut ed for a quant it y in excess of t he volume limit
specified in t he Order.

4.2. Profile block orders
Compared t o block orders t hat were available prior t o t he CWE market coupling go- live,
block orders in COSMOS can represent profiles, i.e. are defined by dist inct volume limit s at
each hour.

Block orders are neit her part ially nor paradoxically execut ed. Therefore, all orders can only
be eit her execut ed fully, or rej ect ed fully. Because of t his const raint called t he fill or kill
const raint - some block orders can be rej ect ed even if t hey are in t he money
3
, in which
case t hey are called Paradoxically Rej ect ed Blocks ( PRB) . On t he cont rary, no block orders
can be execut ed paradoxically ( i. e. execut ed even if out of t he money) .


The fixing of block orders sat isfies t he following const raint s:

- A Block Offer is not execut ed when t he average of t he rounded Market Clearing
Prices over t he relevant hours and weight ed by t he corresponding volume limit s is
lower t han t he price limit of t his order.
- A Block Bid is not execut ed when t he average of t he rounded Market Clearing
Prices over t he relevant hours and weight ed by t he corresponding volume limit s is
higher t han t he price limit of t his order.
- A Block Order can only be execut ed at all hours simult aneously, for a quant it y
equal t o t he hourly volume limit s specified in t he order.
5 Net work Const raint s
COSMOS is able t o t ackle t he net work const raint s associat ed wit h several net work
configurat ions
4
( ATC- Based and Flow- Based as well as wit h HVDC cables and ramping
const raint s in case of furt her ext ensions) .
5.1. ATC- Based const raint s
Wit h an ATC- Based represent at ion of t he net work, t he cross border bilat eral exchanges are
only limit ed by t he ATCs as provided for each hour and each int erconnect ion in bot h
direct ions. The algorit hm will t hus comput e t he cross border bilat eral exchanges t hat are
opt imal in t erms of overall social welfare.

The fixing wit h ATC- Based const raint s sat isfies t he following const raint s:
- Cross-border bilat eral exchanges are smaller t han or equal t o t he relevant ATC
value.
- Whenever t he cross- border exchange is st rict ly smaller t han t he relevant ATC
value, t hen t he clearing prices on bot h sides of t he border are equal.

3
A supply ( respect ively demand) order is said t o be in t he money if t he submission price
of t he order is below ( resp. above) t he average market price.
4
See also Net work const raint s sect ion in appendix 1 for a mat hemat ical formulat ion of
t hese const raint s.
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 7 of 19

- Whenever t here is a price difference bet ween t wo areas, t he ATC bet ween t hese, if
any, is congest ed in t he direct ion of t he high price area.
5.2. Flow- Based const raint s ( used for FB parallel runs)
Flow- based net work represent at ions are set t o model more precisely physical elect ricit y
laws.

I n a flow- based represent at ion of t he net work, t he flows on a set of given crit ical net work
element s are equal t o t he product of a PTDF ( Power Transfer Dist ribut ion Fact or) mat rix
wit h t he vect or of t he areas net posit ions. These ( unidirect ional) flows are limit ed by t he
corresponding t ransmission capacit ies provided for each hour. Such PTDF const raint s allow
represent ing explicit ly all crit ical element s and securit y const raint s, but would also support
more simplified net work models.

The fixing wit h Flow- Based const raint s sat isfies t he following const raint s:
- For each flow-based const raint , t he sum of t he areas net posit ions of all market s
weight ed by t he PTDF value is smaller t han or equal t o t he corresponding
t ransmission capacit y.
- The sum of t he areas net posit ion is equal t o zero
- For each flow-based const raint , whenever t he sum of t he areas net posit ions of all
market s weight ed by t he PTDF value is st rict ly smaller t han t he corresponding
t ransmission capacit y, t hen t he congest ion price of t his const raint is null.
- The price difference bet ween t wo areas is equal t o t he sum of t he congest ion
prices of all capacit y const raint s weight ed by t he difference of t he corresponding
PTDF values.

6 Funct ioni ng of COSMOS
I n t his sect ion we describe how COSMOS select s orders t o be execut ed or rej ect ed, under
t he Market and Net works Const raint s. The obj ect ive of COSMOS is t o maximize t he social
welfare, i.e. t he t ot al market value of t he day- ahead auct ion.

The main difficult y in det ermining which orders t o execut e or rej ect comes from t he fact
t hat block orders must sat isfy t he fill or ki ll propert y.

Wit hout t hose block orders, t he problem is much simpler t o solve. I ndeed, t he problem can
t hen nat urally be modeled as a Quadrat ic Program ( QP)
5
, which can be rout inely solved by
off- t he- shelf commercial solvers
6
. The use of a commercial solver t o direct ly solve t his
Quadrat ic Program would t hen be t he most efficient solut ion.

The presence of block orders in t he order book however makes t he problem subst ant ially
more difficult . The problem wit h block orders can be formulat ed as a Mixed I nt eger
Quadrat ic Program ( MI QP) allowing modeling t he fill or kill condit ion of block orders. The
st at e- of- t he-art met hod used t o solve MI QP is called branch-and- bound
7
. COSMOS has
been designed as a dedicat ed branch- and-bound algorit hm for solving t he CWE Market
Coupling problem ( t he mat hemat ical model of t his problem is proposed in appendix 1) .

6.1. Algorit hm
COSMOS proceeds st ep by st ep.
At t he first st ep, COSMOS solves a market coupling QP wit hout fill or kill const raint s, hence
allowing all block orders t o be part ially execut ed. By chance, t he solut ion of t his problem
might sat isfy t he fill or kill condit ion for all block orders and is t herefore a feasible solut ion

5
A Quadrat ic Program ( QP) is an opt imizat ion problem where an obj ect ive ( funct ion) of
t he second order is t o be opt imized under linear const raint s.
6
COSMOS uses t he CPLEX solver.
7
For a more ext ensive discussion on t he branch and bound t echnique, see for inst ance:
I nt eger Programming, Wolsey, 1998
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 8 of 19

of t he CWE market coupling problem. I n t his case, t he solut ion t hat has been found is t he
opt imal solut ion.

Ot herwise, COSMOS gradually forces t he part ially execut ed block orders t o be eit her fully
rej ect ed or fully execut ed in subsequent st eps, in order t o obt ain a solut ion t o t he CWE
market coupling problem which respect s all fill or kil l const raint s.

At a given st ep, t wo sit uat ions can occur:
1. COSMOS has produced a solut ion in which some block orders are eit her fully
execut ed or rej ect ed and some block orders are part ially execut ed. This solut ion
has been comput ed by solving t he init ial QP, but in which some block orders have
been forced t o be execut ed or rej ect ed ( as t he result of some previous st eps) .
Since it cont ains part ially execut ed orders, it is called a part ial solut ion. The
propert y of t his solut ion is t hat it s obj ect ive value is an upper bound of t he welfare
of any solut ion t hat could be produced by ext ending t his part ial solut ion int o a
feasible solut ion by adding furt her const raint s. Two sub- cases can occur:
o Sub-case 1a: I f t he upper bound associat ed t o t his part ial solut ion is smaller
t han t he welfare of t he best feasible solut ion found so far, COSMOS will
discard t his part ial solut ion and wont consider it anymore.
o Sub-case 1b: Ot herwise, COSMOS will select a block order part ially execut ed
and creat e t wo new st eps t o be analyzed: in t he first of t hese new st eps,
t he select ed block is forced t o be execut ed, and in t he second one it is
forced t o be rej ect ed.

2. COSMOS has produced a solut ion in which all block orders are eit her fully execut ed
or fully rej ected ( even t hose t hat were not forced t o) . I n t his case, COSMOS must
st ill check whet her t here exist prices t hat are compat ible wit h t his solut ion and t he
const raint s ( which is done by verifying t hat all market and net work const raint s are
sat isfied). Two cases can occur:
- Sub-case 2a: I f such prices exist , COSMOS has found a feasible
solut ion. I f t his solut ion is bet t er t han t he best one found so far
8
, it
is marked as such.
- Sub-case 2b: I f no such prices exist , t hen a new st ep is creat ed
wit h a t ransformed problem cont aining addit ional const raint s t o
exclude t his non feasible solut ion.
During t he course of it s execut ion, COSMOS might somet imes increase t he number of
st eps t hat it has yet t o consider (e.g. sub-cases b) or reduce it ( sub- cases a). When t here
remains none, t his means t hat COSMOS has finished and has found t he best possible
solut ion. Possibly, COSMOS will reach t he t ime limit alt hough t here remain some part ial
solut ions t hat were not analyzed. I n t his case, COSMOS will out put t he best solut ion found
so far wit hout being able t o prove whet her it is t he very best possible one.


8
Or if it is t he first feasible solut ion found.
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 9 of 19

Here is a small example of t he execut ion of COSMOS:

6.2. Precision and rounding
COSMOS provides exact result s which sat isfy all const raint s wit h a t arget t olerance of 10
- 5

( and in any case 10
- 3
) . Those exact prices and volumes ( net posit ions) are rounded by
applying t he commercial rounding ( round- half- up) convent ion before being published. The
size of t he t ick varies depending on t he dat a considered. For inst ance:
- Prices at APX- ENDEX and BELPEX are rounded wit h t wo digit s ( e. g. 0. 01 / MWh)
- Prices at EPEX SPOT are rounded wit h t hree digit s on t he FR market ( e. g. 0. 001
/ MWh) and wit h t wo digit s on t he DE/ AU market
- Net posit ions in BE, DE and NL are rounded wit h 1 digit ( e. g. 0. 1 MWh)
- Net posit ions in FR are rounded wit h no digit ( e.g. 1 MWh)

NB: rounding t he result s imposes t o accept some t olerances on const raint s. Typically, t his
t olerance is equal t o t he sum t he precision t icks of all rounded values divided by t wo. For
inst ance, t he sum of t he net posit ions of all bidding areas must be zero, wit h a t olerance of
0. 65 MWh ( t he sum of t he net posit ion t icks of all market s divided by t wo) for t he CWE
MC.
6.3. Price boundaries
Published prices must be wit hin predefined boundaries. I t is int ended t hat all price
boundaries will be harmonized so t hat prices are in t he [ - 3000 / MWh, + 3000 / MWh]
int erval, t hough t he algorit hm is designed t o also support different price boundaries
6. 3. 1. Price boundaries and net work const raint s
Generally speaking, different price boundaries can be implement ed in COSMOS, but not
t oget her wit h t he net work price propert ies as commonly defined. I n part icular, flow- based
models in general hinder t he possibilit y t o impose boundaries on prices at all in some
part icular cases.

I n order t o accommodat e t echnical price boundaries and t o comput e coherent prices ( in
t he sense t hat t hey respect market and net work const raint s), COSMOS guarant ees on t he
one hand t hat market and net work const raint s are sat isfied wit h respect t o unrounded
prices. On t he ot her hand, COSMOS also ensures t hat market const raint s are sat isfied
- t hir d node, block 23 execut ed
- Solut ion value 3440
- all blocks int egr al, no pr ices
const r aint s added
- fift h node, block 23 execut ed, block 30 r ej ect ed + constr aint s
- Solut ion value 3100
- all block int egr al, t her e exist pr ices
bet t er solut ion found!

Case2a
Case2b
Case1a
- Fir st node
- Solut ion value 3500
- Blocks 23 and 54 fr act ional
- four t h node, block 23 execut ed + constr aint s
- Solut ion value 3300
- block 30 fr act ional
- sixt h node, block 23 execut ed, block 30 execut ed + const r aint s
- Solut ion value 3000
t her e cannot exist bet t er solut ions her e!
Case1b
- second node, block 23 r ej ect ed
- Solut ion value 3050
- all block int egr al, t her e exist pr ices
feasible solut ion found

COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 10 of 19

using rounded and wit hin bound prices. Hence some net work const raint s are not checked
against rounded and wit hin bound prices, but only against unrounded and possibly out of
bounds prices. This allows comput ing coherent prices while respect ing t he local price
boundaries and is current ly only relevant in flow-based simulat ions.

See t echnical appendix 2 for more informat ion.

6. 3. 2. Ext reme prices and curt ailment
Generally speaking, Cosmos is designed t o avoid curt ailment sit uat ions i.e. sit uat ions
when price t aking orders are not fully sat isfied. More precisely, COSMOS enforces local
mat ching of price t aking hourly orders wit h hourly orders in t he opposit e direct ion and in
t he same market as count erpart . Hence, whenever curt ailment of price t aking orders can
be avoided locally on an hourly basis i. e. t he curves cross each ot her - t hen it is also
avoided in t he final result s. I n case t he local mat ching does not allow t o fulfill all t he price
t aking orders, t hen t his curt ailment is equally apport ioned bet ween all market s ( subj ect t o
net work const raint s).

See t echnical appendix 3 for more informat ion.
6.4. Opt imalit y and qualit y of t he solut ion
During t he course of it s execut ion, COSMOS will t ypically generat e several feasible
solut ions. The best one in t erms of welfare is select ed among t hese solut ions at
t erminat ion of t he algorit hm.
By opt imizing welfare, COSMOS also avoids whenever possible - generat ing solut ions
wit h paradoxically rej ect ed orders ( PRBs), and especially t he ones wit h large volume
and/ or largely in t he money.

COSMOS algorit hm select s t he solut ions wit h t he largest welfare, but discards during it s
comput at ion t he solut ions wit h paradoxically rej ect ed blocks t hat are very deep in t he
money. This is implement ed t o guarant ee fairness, as t his could only happen wit h blocks of
small volume.
6.5. Time cont rol
COSMOS is t uned t o provide very quickly a first feasible solut ion. I t can be shown t hat t he
upper bound in t erms of comput ing t ime t o obt ain a first feasible solut ion is linear in t erms
of number of block orders. I n pract ical cases, t he first feasible solut ion has been found
wit hin less t han 30 seconds on all our CWE inst ances.

Due t o t he combinat orial complexit y of t he problem, t his is obviously not t rue for t he
comput ing t ime t o obt ain t he opt imal solut ions. Nevert heless, most of t he inst ances were
solved at opt imalit y in less t han 10 minut es ( which is t he maximal t ime allowed in t he CWE
coupling process) , t he remaining showing quit e small dist ances t o opt imalit y aft er t his t ime
limit .
6.6. Transparency
Generally speaking, COSMOS is based on sound and robust concept s and has a good
degree of t ransparency. I n part icular, COSMOS is perfect ly clear and t ransparent as t o
what are feasibilit y and opt imalit y. More precisely, COSMOS will t ypically consider all
feasible solut ions and choose t he best one according t o t he agreed crit erion ( welfare-
maximizat ion) .

Also, COSMOS opt imizes t he t ot al welfare, so t hat t he chosen result s are well explainable
t o t he market part icipant s: published solut ions are t he ones for which t he market value is
t he largest . I n addit ion, in order t o avoid undesirable solut ions, COSMOS will not out put
solut ions in which blocks t hat are unduly deep in t he money are rej ect ed paradoxically.
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 11 of 19

7 Furt her geographic and product ext ensions
During t he design and implement at ion of COSMOS, great care has been t aken t o ensure
t hat t he addit ional requirement s aiming at support ing pot ent ial ext ensions in t he product
range or t he geographical scope of t he coupling ( or possibly bot h of t hem) are also met . I n
part icular, all t he foreseeable requirement s necessary t o facilit at e t he mid- t erm
ext endibilit y of t he COSMOS solut ion ( linked and flexible orders of NPS, ramping const raint
of NorNed, charges and losses of Brit Ned and I FA) are already support ed by COSMOS,
alt hough t here are not yet in use. COSMOS t hus already support s most of t he ext ensions
foreseeable in t he next few years.

Furt hermore, COSMOS uses a very general met hod for solving t he market coupling
problems wit h fill or kill const raint s. The abilit y of t he algorit hm t o handle new product s
or new requirement s is t hus excellent as long as t he const raint s remain of t he same t ype
( linear const raint s, wit h possible fill or ki ll condit ions).
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 12 of 19


8 APPENDI X 1 : Mat hemat ical for mulat ion
I n t his appendix, we describe t he mat hemat ical formulat ion of t he Market Coupling
Problem t hat is solved by COSMOS. As ment ioned earlier, it is a Mixed- I nt eger Quadrat ic
Program ( MI QP) .
8.1. Set s
Let us first int roduce some set s, and t heir indices:
- Bidding areas ( m)
- Hours ( h)
- Hourly orders ( o)
- Profile block orders (b)
- Unidirect ional ATC lines ( l)
8.2. Dat a
Here are t he input dat a of t he Coupling problem:
- q
o
is t he quant it y of hourly order o; it is considered posit ive for
supply orders and negat ive for demand orders
- p
0
o
is t he price at which an hourly order st art s t o be accept ed
- p
1
o
is t he price at which an hourly order is fully accept ed
( in t he case of st ep orders, p
0
o
= p
1
o
; in t he case of int erpolat ed
supply orders, p
0
o
p
1
o
; in t he case of int erpolat ed demand order
p
0
o
p
1
o
)
- q
b,h
is t he quant it y of profile block b on period h; it is considered
posit ive for supply orders and negat ive for demand orders
- bidding area ( b) is t he bidding area in which profiled block order
b originat es
- from( l) is t he bidding area from which line l is originat ing
- t o( l) is t he bidding area t o which line l is leading
- capacit y
l,h
is t he capacit y on t he ATC line l on period h
8.3. Variables
- 0 ACCEPT
o
1 Accept ance of t he hourly order
- ACCEPT
b
e{ 0, 1} Accept ance of t he block order
- 0 FLOW
l,h
Flow on t he line l at period h
- MCP
m,h
Market clearing price at market m and period h
- 0 ATC_PRI CE
l,h
Congest ion price of t he capacit y const raint of line l at period h
8.4. Market Const raint s
These are t he const raint s linking t he prices t o t he orders select ion.

- An hourly order may be accept ed only if it is at - or in- t he-money:
( ) 0 0
0
,
> >
o h m o o
p MCP q ACCEPT
- An hourly order must be refused if it is out - of- t he- money:
( ) 0 0
,
0
= >
o h m o o
ACCEPT MCP p q
- An hourly order may be part ially rej ect ed only if it is at - t he- money:
( )
o o o o h m o
ACCEPT p p p MCP ACCEPT + = < <
0 1 0
,
1 0
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 13 of 19

- An hourly order must be fully accept ed if it is in- t he-money:
( ) 1 0
,
1
= <
o h m o o
ACCEPT MCP p q
- An accept ed block must be in- t he- money:
( ) 0 1
), ( ,
> =

h
b h b area bidding h b b
p MCP q ACCEPT

8.5. Net work Const raint s
These are t he const raint s on t he physical exchanges and t he prices arising
from t he ATC net work model of t he CWE region.

- The bidding area must be in balance, meaning t hat t he sell and t he import volumes
must mat ch t he purchase and t he export volumes. :

= = =
= +
m l t o
h l
m l fr om
h l
m b ar ea bidding
o
o
o
FLOW FLOW
b
ACCEPT
h b
q q ACCEPT
) (
,
) (
,
) (
,

- The maximum flow on an ATC line must not exceed t he available capacit y.
h l h l
Capacit y FLOW
, ,
s
- The congest ion price of an ATC line can be posit ive only if t he line is congest ed.
h l h l h l
Capacit y FLOW PRI CE ATC
, , ,
0 _ = >

- The ( posit ive) congest ion prices of t he capacit y const raint s must be equal t o t he
price difference bet ween t he dest inat ion and t he source bidding areas of t he ATC
line:
-
h l f r om h l t o h l
MCP MCP PRI CE ATC
) , ( ) , ( ,
_ =

8.6. Obj ect ive
The obj ect ive of t he Market Coupling Problem is t o maximize t he t ot al welfare:
( )

e

|
|
.
|

\
|

+
c o c b
b h b b o
o o
o o o
ACCEPT q p ACCEPT
p p
p ACCEPT q
,
,
1 0
0
1
2
max
Here t he welfare is defined as t he difference bet ween t he cumulat ive amount t hat t he
buyers are ready t o pay and t he cumulat ive amount t hat t he sellers want t o be paid
( quant it ies are signed) . This difference corresponds t o t he sum of t he surplus of t he
producers and t he consumers, plus t he congest ion revenue.
Not e t hat t he obj ect ive is quadrat ic in t he ACCEPT
o
variables ( for int erpolat ed orders) .

8.7. Summary
COSMOS is an algorit hm that generat es several ( i. e. virt ually all) solut ions which
sat isfy t he constraints list ed under Market Const raints, and Net work
Const raints and chooses the best one according t o the crit eria formulat ed under
Obj ect ive.
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 14 of 19

9 APPENDI X 2 : Price indet ermi nacy rules

There are cases where mult iple solut ions of t he Market Coupling Problem have ident ical
block select ions and ident ical welfares but different clearing prices. I n t he most frequent
cases, t his arises when offer and demand curves overlap on a vert ical segment . These
cases are called price indet erminacies. The aim of t his appendix is t o describe t he rules
implement ed in COSMOS t o choose amongst t hese clearing prices.

Figure 3: Simple case of price indet erminacy

I n a nut shell, COSMOS will pick t he mid- point of t he int ersect ion, t hat is MCP* in t he figure
above. However, in a realist ic problem wit h several market s coupled over several hours,
t his solut ion might be non- feasible. This would be t he case for example if MCP* invalidat es
t he select ion of block ( i.e. t he price accept ance of block orders are not compat ible wit h
MCP* ) . I n such a case, COSMOS will pick up t he price which is closed t o t he mid point and
which respect s all ot her price const raint s.

This sect ion explains in det ails how COSMOS select s prices in indet erminat e cases
9
.
9.1. Not at ions
Let s not e:
LB
m,h
: t he lowest possible price in t he market m on hour h for a defined net posit ion Q* .
UB
m,h
: t he highest possible price in t he market m on hour h for a defined net posit ion Q* .
MCP
m,h
: t he ( unrounded) Market Clearing Price of t he market m on hour h.

The mid point of t he int ersect ion defined by [ LB
m,h,
UB
m,h
] is equal t o ( UB
m,h
+ LB
m,h
) / 2.
9.2. Mid point rule formulat ion for price det erminat ion
A pot ent ial feasible solut ion produced by t he algorit hm is definit ively a feasible solut ion
once unique rounded prices sat isfying all const raint s can be defined for t his solut ion.
I n case of non- unique price solut ion, for a given hour h, t he mid-point rule is defined
as t he minimal square dist ance bet ween MCP
m,h
and t he dist ance t o it s mid point . I n
case of several indet erminacies, t he sum of t hese dist ances is considered. The mid-
point price expression can be formulat ed wit h t he following funct ion


9
Not e t hat t hese rules are independent of t he ATC or FB net work model
P





MCP*
LB
Q
UB
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 15 of 19

|
|
.
|

\
| +

h m
h m h m
h m
LB UB
MCP
,
2
, ,
,
2
min
Subj ect t o t he following const raint s:
- All market and net work const raint s
- B_ACCEPT
o
= 1 if t he block order o is execut ed in t he feasible solut ion
= 0 ot herwise
9.3. Prices t o be published
These prices must be rounded and bounded before being published. This is done as follows

) max ) , min ) , , ( min( max( _
, , m m m h m h m
P P precision MCP round price Published =
Wit h:
- Published_Price
m,h
: t he price published by t he Exchange in market m on
hour h
- Precision
m
: t he precision of prices in market m
- Pmin
m
: t he lower price boundary of market m
- Pmax
m
: t he upper price boundary of market m

Not e t hat market const raint s are checked against t hese prices as well before being
published
9.4. Summary
COSMOS lifts pot ent ial price indet erminacies by select ing the prices at the middle
of t he feasible int erval, t aking into account t he price const raint s arising from
block select ion and net work configurat ion. Then Cosmos rounds and enforces
bounds on t hese prices before publicat ion.
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 16 of 19


10 APPENDI X 3 : Volume indet erminacies and
curt ail ment rules
There are cases where mult iple solut ions of t he Market Coupling Problem have ident ical
prices, ident ical block select ions and ident ical welfares but different volumes sold or
bought on some market s. The cases are called volume indet erminacies. The aim of t his
appendix is t o describe t he rules implement ed in COSMOS t o choose amongst t hese
solut ions.

Figure 4: Simple case of volume indet erminacy

I n a nut shell, COSMOS will choose t he solut ions for which t he t raded volumes are
maximal, t hat is MCV* in t he figure above.

I n addit ion, t hese volume indet erminacy rules encompass curt ailment rules which are rules
for special volume indet erminacy sit uat ions, namely at minimum/ maximum prices. I ndeed,
a secondary obj ect ive of COSMOS is t o avoid t hat price t aking orders - i.e. orders at
ext reme prices - are not fully execut ed, t his sit uat ion being called curt ailment
10
.
10.1. Definit ions and obj ect ive
Volume indet erminacy occurs when, for
- a given set of market clearing prices ( and congest ion prices) sat isfying t he
const raint s of t he COSMOS model
- a given feasible block select ion
There exist s many solut ions for t he hourly orders such t hat
- t hey are compat ible wit h t he market clearing prices ( i. e. out - of- t he-money orders
are ent irely rej ect ed and in- t he-money orders are ent irely execut ed)
- t hey are compat ible wit h congest ion prices ( i.e. , element s wit h non- zero
congest ion prices are congest ed) .
I n t his case, all t hese solut ions have an ident ical welfare. So welfare cannot be a crit erion
t o select one of t hem. Thus addit ional crit eria are required for such cases.

I n general ( not at ext reme prices) , in case of volume indet erminacy, t he crit erion is t o
maximize t raded volume and t o share volumes of possible furt her indet erminacies equally
amongst all t he market s. Sect ion 10. 4 describes how t o achieve t his goal.


10
These rules are independent of t he ATC or FB net work model






MCV*
COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 17 of 19

However, because of volume indet erminacy at ext reme prices, hierarchical rules have been
implement ed:
- First ly: avoid curt ailment by t emporarily mat ching price t aking order locally ( see
10. 2)
- Secondly: share curt ailment ( see 10. 3). I n order t o provide fairness, t he algorit hm
will t ry t o equally share t he curt ailed volumes bet ween all market s.
- Thirdly: maximize t raded volume ( see 10. 4)

10.2. Avoiding curt ailment
Avoiding curt ailment is desirable in general, as price t aking orders allow t o close posit ions
prior t o day- ahead nominat ions. This is done by be t he local mat ching const raint which
enforces t he local mat ching of price t aking orders prior t o t he welfare maximizat ion
procedure ( see Figure 5) .


Figure 5 Removing price t aking volume f rom Demand and Supply curves

However, it is possible t hat a market is init ially in curt ailment , t hat is, it is a priori
impossible t o mat ch locally all price t aking orders. I n t his case only t he price t aking order
t hat can be met locally can be discarded from t he curves, but t he remaining price t aking
volume should be submit t ed, since not providing t his volume could in ext reme cases lead
t o infeasible const raint s (e.g. if all market s are init ially in curt ailment and none would
submit any price t aking volume t hen all impose a const raint t hat t hey should export . Since
no market is willing t o import , t he balance const raint will be violat ed) . The init ial
curt ailment case is illust rat ed in Figure 6.









COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 18 of 19


Figure 6 Removing price t aking volume f rom Demand and Supply f rom a market
init ially in curt ail ment


I n pract ice, COSMOS will force t he accept ance of price t aking hourly supply ( respect ively
demand) orders by mat ching t hem wit h hourly demand ( resp. supply) orders. Let us call
such a const raint LocalMat ching
pmin
( resp. LocalMat ching
pmax
) .

The local mat ching const raint s can be writ t en as follows:
- For price t aking supply orders:

>

e
e
min
min
; 1 min :
min
p
p
Supply s
s
Demand d
d
Supply p
q
q
ACCEPT ing LocalMatch

- For price t aking demand orders:

>

e
e
max
max
; 1 min :
max
p
p
Demand d
d
Supply s
s
Demand p
q
q
ACCEPT ing LocalMatch

Where
- Supply
pmin
is t he set of all supply orders at minimum price ( i.e. price t aking) ,
- Demand
pmax
is t he set of all demand orders at maximum price ( i.e. price t aking).

The local mat ching const raint s are enforced for each market individually prior t o t he
welfare maximizat ion process. This rule helps finding block select ions where curt ailment is
reduced. Upon lift ing volume indet erminacies, t he local mat ching const raint is dropped in
order t o allow a fair sharing of curt ailment .
10.3. Minimizing and sharing curt ailment
When one or more market s are init ially curt ailed ( see above) , t he curt ailment might not be
avoided t hrough local mat ching. I n t his case, t he secondary goal is t o minimize t he volume
curt ailed. However t wo addit ional issues must be dealt wit h:
1. The solut ion must be uniquely defined





COSMOS descript ion CWE Market Coupling algorit hm
Version 1. 0 Dat e 29 June 2010 Page 19 of 19

2. The solut ion must be fair in apport ioning t he curt ailment bet ween t wo ( or more)
market s init ially in curt ailment .
To t his end, t he obj ect ive is defined as a quadrat ic funct ion of t he accept ance of t he
curt ailed orders:

( )
2
,
, ,
1 min

e e

CURVE C C o
o c o c
ACCEPT q

Subj ect t o t he following const raint s:
- All market and net work const raint s
- B_ACCEPT
o
= 1 if t he block order o is execut ed in t he feasible solut ion
= 0 ot herwise

where C is t he set of price t aking orders of market s of whom t he curt ailment has t o be
apport ioned and q
o
is t he volume of t hese price t aking orders. I n plain English, we
minimize t he sum of t he non- accept ance of price t aking orders, measuring non- accept ance
by t he square of t he rej ect ed proport ion of t he price t aking order t imes it s volume. This
obj ect ive funct ion has several desirable propert ies:
- it is st rict ly convex in t he space of price t aking orders of market s in curt ailment ,
t hus guarant eeing uniqueness of solut ion for t hese orders
- I t will apport ion curt ailment according t o t he size of init ial curt ailment . For
example suppose t wo market s init ially in curt ailment by X and Y MW are coupled
( wit h infinit e capacit ies) wit h a t hird market t hat can offer Z MW before being it self
in curt ailment . Then X/ ( X+ Y) * Z will be given t o reduce curt ailment in market X
and Y/ ( X+ Y) * Z will be used t o reduce curt ailment in market Y. Therefore, each
market will see it s curt ailment decrease by t he same proport ion Z/ (X+ Y) . Thus
price t aking orders in each curt ailed market are t reat ed equally.

I f t wo market s are curt ailed t o a different degree, t he market wit h t he least severe
curt ailment ( in proport ion) would help t he ot her reducing it s curt ailment , so t hat bot h
market s end up wit h ident ical curt ailment rat ios.
10.4. Maximizing t raded volume
We assume now t hat for market at P
min
and P
max
t he volume indet erminacy has been
set t led according t o previous sect ion, and volume in t hese market s in curt ailment is fixed.
We t urn now our at t ent ion t o dealing wit h volume indet erminacy for market s and/ or hours
not in curt ailment . Here our goal will be t o maximize t raded volume.

We t herefore solve t he following opt imizat ion problem:
( )
2
,
, ,
1 min

e e

H C C o
o c o c
ACCEPT q
Subj ect t o t he following const raint s:
- All market and net work const raint s
- B_ACCEPT
o
= 1 if t he block order o is execut ed in t he feasible solut ion
= 0 ot herwise

where H is t he set of supply and demand st ep curves t hat are exact ly at t he market
clearing price of t heir respect ive market s and are not at Pmin or Pmax. Again, we want t o
minimize t he rej ect ion of all ( demand & supply) orders and apport ion t his equally across
market s.

10.5. Summary
COSMOS lifts pot ent ial volume indet erminacies wit h t he following priorit ies:
1. Avoiding curt ailment of price t aking orders whenever possible
2. Minimizing and sharing t he curt ailment when unavoidable
3. Maximizing t he volume t raded in ot her cases.

Você também pode gostar