-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from BESTenergytrade/feature/optimisation
Feature/optimisation
- Loading branch information
Showing
32 changed files
with
71,497 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ version: 2 | |
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.10" | ||
python: "3.8" | ||
|
||
python: | ||
install: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ sphinx_rtd_theme | |
networkx | ||
matplotlib | ||
pandas | ||
pytest | ||
pytest | ||
pyomo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
projects/example_projects/example_project_ev_opt/actors_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"comment": "An example of a residential prosumer with load and pv data specified by their 'deviceID'", | ||
"prosumerName": "residential_1", | ||
"prosumerType": "residential", | ||
"gridLocation": "N01", | ||
"devices": [ | ||
{ | ||
"deviceType": "load", | ||
"deviceID": "CHH10_sample.csv" | ||
}, | ||
{ | ||
"deviceType": "solar", | ||
"deviceID": "generated_pv.csv" | ||
} | ||
] | ||
}, | ||
{ | ||
"comment": "An example of a residential prosumer with load data specified by their 'deviceID' but without pv", | ||
"prosumerName": "residential_2", | ||
"prosumerType": "residential", | ||
"gridLocation": "N02", | ||
"devices": [ | ||
{ | ||
"deviceType": "load", | ||
"deviceID": "CHH9_sample.csv" | ||
} | ||
], | ||
"strategy": 4 | ||
}, | ||
{ | ||
"comment": "An example of a residential prosumer with load, pv and electric vehicle data specified by their 'deviceID' and a battery", | ||
"prosumerName": "residential_3", | ||
"prosumerType": "residential", | ||
"gridLocation": "N02", | ||
"devices": [ | ||
{ | ||
"deviceType": "load", | ||
"deviceID": "CHH16_sample.csv" | ||
}, | ||
{ | ||
"deviceType": "solar", | ||
"deviceID": "generated_pv.csv" | ||
}, | ||
{ | ||
"deviceType": "battery", | ||
"capacityKwh": 3, | ||
"initialSOC": 0.5 | ||
}, | ||
{ | ||
"deviceType": "ev", | ||
"deviceID": "ev_0000.csv" | ||
} | ||
], | ||
"strategy": 4, | ||
"pricing_strategy": {"name": "linear", "param": [0.01]} | ||
} | ||
] |
42 changes: 42 additions & 0 deletions
42
projects/example_projects/example_project_ev_opt/config.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#-------------------------- | ||
# scenario | ||
#-------------------------- | ||
# load existing scenario | ||
load_scenario = True | ||
# possible data_formats: json, csv | ||
data_format = csv | ||
|
||
#-------------------------- | ||
# market | ||
#-------------------------- | ||
# start timestep | ||
start = 0 | ||
# number of timesteps in simulation | ||
nb_ts = 13 | ||
horizon = 10 | ||
# interval between simulation timesteps | ||
ts_per_hour = 4 | ||
|
||
# which market type to use? fair, pac | ||
market_type = fair | ||
# reset market after each interval (discard unmatched orders) | ||
reset_market = True | ||
# size of energy units to be traded individually | ||
energy_unit = 0.01 | ||
# factor describing the relation of grid fee to cumulative power network edge weights | ||
weight_factor = 0.03 | ||
# default grid_fee to be used by market maker | ||
default_grid_fee = 0.09 | ||
# local grid fee applied for trades within a cluster | ||
local_grid_fee = 0.02 | ||
|
||
#-------------------------- | ||
# output | ||
#-------------------------- | ||
# print debug info to console | ||
show_prints = true | ||
# show various plots | ||
show_plots = true | ||
# save orders and matching results to csv files | ||
save_csv = true | ||
#-------------------------- |
22 changes: 22 additions & 0 deletions
22
projects/example_projects/example_project_ev_opt/network_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"example_network": { | ||
"directed": false, | ||
"multigraph": false, | ||
"graph": {}, | ||
"nodes": [ | ||
{ | ||
"id": "N01" | ||
}, | ||
{ | ||
"id": "N02" | ||
} | ||
], | ||
"links": [ | ||
{ | ||
"weight": 1, | ||
"source": "N01", | ||
"target": "N02" | ||
} | ||
] | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
projects/example_projects/example_project_ev_opt/scenario/MarketMaker.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
,all_buy_prices,all_sell_prices | ||
0,0.05087,0.05087 | ||
1,0.05087,0.05087 | ||
2,0.05087,0.05087 | ||
3,0.05087,0.05087 | ||
4,0.04819,0.04819 | ||
5,0.04819,0.04819 | ||
6,0.04819,0.04819 | ||
7,0.04819,0.04819 | ||
8,0.04468,0.04468 | ||
9,0.04468,0.04468 | ||
10,0.04468,0.04468 | ||
11,0.04468,0.04468 | ||
12,0.04292,0.04292 | ||
13,0.04292,0.04292 | ||
14,0.04292,0.04292 | ||
15,0.04292,0.04292 | ||
16,0.04039,0.04039 | ||
17,0.04039,0.04039 | ||
18,0.04039,0.04039 | ||
19,0.04039,0.04039 | ||
20,0.0402,0.0402 | ||
21,0.0402,0.0402 | ||
22,0.0402,0.0402 | ||
23,0.0402,0.0402 |
3 changes: 3 additions & 0 deletions
3
projects/example_projects/example_project_ev_opt/scenario/_meta.inf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"rng_seed": 1963995559 | ||
} |
25 changes: 25 additions & 0 deletions
25
projects/example_projects/example_project_ev_opt/scenario/actor_residential_1.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Time,load,pv,schedule | ||
2016-01-01 00:00:00,0.011886246327641098,7.04546466156181e-05,-0.01181579168102548 | ||
2016-01-01 00:15:00,0.0410388447933982,0.0002472798864404,-0.040791564906957796 | ||
2016-01-01 00:30:00,0.0406771589865564,0.0002556439361969,-0.0404215150503595 | ||
2016-01-01 00:45:00,0.0405878697548583,0.00035547628083399996,-0.0402323934740243 | ||
2016-01-01 01:00:00,0.0408237818838657,0.0010430721723367,-0.039780709711529 | ||
2016-01-01 01:15:00,0.0407177271612198,0.0010594459560612,-0.039658281205158595 | ||
2016-01-01 01:30:00,0.0155266774334944,0.0021104014895109,-0.013416275943983499 | ||
2016-01-01 01:45:00,0.0163007931439657,0.0012627368346117,-0.015038056309354002 | ||
2016-01-01 02:00:00,0.0322130119232581,0.0034005784433971996,-0.028812433479860903 | ||
2016-01-01 02:15:00,0.0091297259677855,0.0034302420258755994,-0.0056994839419099 | ||
2016-01-01 02:30:00,0.0193711826356853,0.0044974952377916,-0.0148736873978937 | ||
2016-01-01 02:45:00,0.028851808922693505,0.0087416387113377,-0.020110170211355805 | ||
2016-01-01 03:00:00,0.0092306359903934,0.0054444566014102,-0.0037861793889832004 | ||
2016-01-01 03:15:00,0.021129578178791,0.013092584681101398,-0.0080369934976896 | ||
2016-01-01 03:30:00,0.0261416596035054,0.0143581217010604,-0.011783537902444999 | ||
2016-01-01 03:45:00,0.009300330445916,0.0010009727768025,-0.0082993576691135 | ||
2016-01-01 04:00:00,0.0264843050659245,0.0190323954720175,-0.007451909593907003 | ||
2016-01-01 04:15:00,0.0405926330346124,0.0020486715257943,-0.0385439615088181 | ||
2016-01-01 04:30:00,0.040739211280267,0.0437830919236495,0.003043880643382499 | ||
2016-01-01 04:45:00,0.0405072188688263,0.0031536962879483,-0.037353522580878 | ||
2016-01-01 05:00:00,0.0364741472516811,0.0083302330939972,-0.0281439141576839 | ||
2016-01-01 05:15:00,0.0093203889536746,0.0306331420625005,0.0213127531088259 | ||
2016-01-01 05:30:00,0.0255923848829077,0.0366225507371767,0.011030165854268997 | ||
2016-01-01 05:45:00,0.022564346575841502,0.0050192915366731,-0.0175450550391684 |
25 changes: 25 additions & 0 deletions
25
projects/example_projects/example_project_ev_opt/scenario/actor_residential_2.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Time,load,pv,schedule | ||
2016-01-01 00:00:00,0.0542322728238491,0,-0.0542322728238491 | ||
2016-01-01 00:15:00,0.033030005643254305,0,-0.033030005643254305 | ||
2016-01-01 00:30:00,0.0142862986715691,0,-0.0142862986715691 | ||
2016-01-01 00:45:00,0.0141467792373111,0,-0.0141467792373111 | ||
2016-01-01 01:00:00,0.0142478747577574,0,-0.0142478747577574 | ||
2016-01-01 01:15:00,0.0142467892610824,0,-0.0142467892610824 | ||
2016-01-01 01:30:00,0.0258862073719723,0,-0.0258862073719723 | ||
2016-01-01 01:45:00,0.0275837814486352,0,-0.0275837814486352 | ||
2016-01-01 02:00:00,0.0143721215284459,0,-0.0143721215284459 | ||
2016-01-01 02:15:00,0.0142922358318904,0,-0.0142922358318904 | ||
2016-01-01 02:30:00,0.0309747101252188,0,-0.0309747101252188 | ||
2016-01-01 02:45:00,0.0174783232826058,0,-0.0174783232826058 | ||
2016-01-01 03:00:00,0.0144721663610269,0,-0.0144721663610269 | ||
2016-01-01 03:15:00,0.0142060443537789,0,-0.0142060443537789 | ||
2016-01-01 03:30:00,0.0140319164885409,0,-0.0140319164885409 | ||
2016-01-01 03:45:00,0.0832210665762793,0,-0.0832210665762793 | ||
2016-01-01 04:00:00,0.2529950562998062,0,-0.2529950562998062 | ||
2016-01-01 04:15:00,0.11682297414734,0,-0.11682297414734 | ||
2016-01-01 04:30:00,0.1520900997528187,0,-0.1520900997528187 | ||
2016-01-01 04:45:00,0.1552827818895501,0,-0.1552827818895501 | ||
2016-01-01 05:00:00,0.1564985586562892,0,-0.1564985586562892 | ||
2016-01-01 05:15:00,0.0976440743721818,0,-0.0976440743721818 | ||
2016-01-01 05:30:00,0.0298138002225059,0,-0.0298138002225059 | ||
2016-01-01 05:45:00,0.0143183628313887,0,-0.0143183628313887 |
25 changes: 25 additions & 0 deletions
25
projects/example_projects/example_project_ev_opt/scenario/actor_residential_3.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Time,load,pv,schedule,ev_avail,ev_demand | ||
2016-01-01 00:00:00,0.0183501135461672,7.04546466156181e-05,-0.01827965889955158,1.0,0.0 | ||
2016-01-01 00:15:00,0.0183276402096313,0.0002472798864404,-0.0180803603231909,1.0,0.0 | ||
2016-01-01 00:30:00,0.0186881603411869,0.0002556439361969,-0.01843251640499,1.0,0.0 | ||
2016-01-01 00:45:00,0.0184871298585762,0.00035547628083399996,-0.018131653577742202,1.0,0.0 | ||
2016-01-01 01:00:00,0.0179609033250519,0.0010430721723367,-0.0169178311527152,1.0,0.0 | ||
2016-01-01 01:15:00,0.0183569591857021,0.0010594459560612,-0.017297513229640897,1.0,0.0 | ||
2016-01-01 01:30:00,0.0429906796923723,0.0021104014895109,-0.0408802782028614,1.0,0.0 | ||
2016-01-01 01:45:00,0.0468752880631146,0.0012627368346117,-0.0456125512285029,1.0,0.0 | ||
2016-01-01 02:00:00,0.04839955195562141,0.0034005784433971996,-0.044998973512224205,1.0,0.0 | ||
2016-01-01 02:15:00,0.04895941513644,0.0034302420258755994,-0.0455291731105644,1.0,0.0 | ||
2016-01-01 02:30:00,0.0448443403712756,0.0044974952377916,-0.040346845133483994,1.0,0.0 | ||
2016-01-01 02:45:00,0.0243064739511402,0.0087416387113377,-0.0155648352398025,1.0,0.0 | ||
2016-01-01 03:00:00,0.0495014864417933,0.0054444566014102,-0.0440570298403831,1.0,0.0 | ||
2016-01-01 03:15:00,0.0493275564676503,0.013092584681101398,-0.0362349717865489,1.0,0.0 | ||
2016-01-01 03:30:00,0.0503633213311156,0.0143581217010604,-0.036005199630055204,1.0,0.0 | ||
2016-01-01 03:45:00,0.0499530098865384,0.0010009727768025,-0.0489520371097359,0.0,15.3136 | ||
2016-01-01 04:00:00,0.0291384623307321,0.0190323954720175,-0.0101060668587146,0.0,0.0 | ||
2016-01-01 04:15:00,0.0181229042056159,0.0020486715257943,-0.016074232679821603,0.0,0.0 | ||
2016-01-01 04:30:00,0.0184295811072935,0.0437830919236495,0.025353510816356,0.0,0.0 | ||
2016-01-01 04:45:00,0.0184305987280745,0.0031536962879483,-0.0152769024401262,0.0,0.0 | ||
2016-01-01 05:00:00,0.0185237682294309,0.0083302330939972,-0.0101935351354337,0.0,0.0 | ||
2016-01-01 05:15:00,0.0185859507615892,0.0306331420625005,0.012047191300911302,0.0,0.0 | ||
2016-01-01 05:30:00,0.0183005206430141,0.0366225507371767,0.018322030094162597,0.0,0.0 | ||
2016-01-01 05:45:00,0.0855216764172982,0.0050192915366731,-0.0805023848806251,0.0,0.0 |
Oops, something went wrong.