Skip to content

change query of storages in neighbouring countries - #283

Merged
wolfbunke merged 1 commit into
release/v0.4.1from
fix-#274
Jun 13, 2018
Merged

change query of storages in neighbouring countries#283
wolfbunke merged 1 commit into
release/v0.4.1from
fix-#274

Conversation

@wolfbunke

Copy link
Copy Markdown

see #274

@wolfbunke wolfbunke self-assigned this Jun 12, 2018
@wolfbunke
wolfbunke requested review from IlkaCu and lukasoldi June 12, 2018 15:06
@lukasoldi

Copy link
Copy Markdown
Contributor

can you please check that the capacity of storages is not doubled since the criterion A.nominal_capacity IS not NULL; is removed.

@wolfbunke

Copy link
Copy Markdown
Author

Yes I did. Here my script with the country code:

SELECT
    B.cntr_id,
   'NEP 2035' as scn_name,
   row_number() over () + 200000 as storage_id,
   B.bus_id as bus,
   'flexible' AS dispatch,
   'PV' AS control,
   nominal_value[1] AS p_nom,
   FALSE as p_nom_extendable,
   0 as p_nom_min,
   -1 as p_min_pu_fixed,
   1 as p_max_pu_fixed,
   1 as sign,
   11 as source,
   0 as marginal_cost,
   0 as capital_cost,
   1 as efficiency,
   0 as soc_inital,
   true as soc_cyclic,
   6 as max_hours,
   0.88 as efficiency_store, -- efficiency_store according to Acatech2015 
   0.89 as efficiency_dispatch, -- efficiency_dispatch according to Acatech2015 
   0.00052 as standing_loss -- standing_loss according to Acatech2015
 
 		FROM calc_renpass_gis.renpass_gis_storage A join
 		(
 		SELECT
 		*
 		FROM
 			(SELECT *,
 			max(v_nom) over (partition by cntr_id) AS max_v_nom
 			FROM
 			model_draft.ego_grid_hv_electrical_neighbours_bus
 			where central_bus = True
 			) SQ
 		WHERE SQ.v_nom = SQ.max_v_nom
 		) B
 		ON (substring(A.source, 1, 2) = B.cntr_id)
 	WHERE substring(A.source, 1, 2) <> 'DE'
 	AND A.nominal_value IS not NULL
 	AND A.nominal_value[1] > 0.001
 	AND A.source not LIKE '%%powerline%%'
 	AND A.scenario_id = 41
Group by bus, p_nom, B.cntr_id;

@wolfbunke
wolfbunke merged commit 2405c48 into release/v0.4.1 Jun 13, 2018
@wolfbunke
wolfbunke deleted the fix-#274 branch June 13, 2018 14:40
lukasoldi added a commit that referenced this pull request Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants