Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SELECT
branch_id AS trafo_id,
f_bus AS bus0,
t_bus AS bus1,
br_x AS x,
br_x/100 AS x,
rate_a as s_nom,
tap AS tap_ratio,
shift AS phase_shift,
Expand All @@ -77,12 +77,6 @@ UPDATE model_draft.ego_grid_pf_hv_line a
FROM model_draft.ego_grid_pf_hv_bus
WHERE bus_id=bus1)*1000)^2 / (100 * 10^6));

UPDATE model_draft.ego_grid_pf_hv_transformer a
SET
x = x * (((GREATEST(
(SELECT v_nom as v_nom_bus0 FROM model_draft.ego_grid_pf_hv_bus WHERE bus_id = bus0),
(SELECT v_nom as v_nom_bus1 FROM model_draft.ego_grid_pf_hv_bus WHERE bus_id = bus1)))* 1000)^2 / (100 * 10^6));

-- calculate line length (in km) from geoms

UPDATE model_draft.ego_grid_pf_hv_line a
Expand Down