Skip to content

Commit

Permalink
limiting ramal to 30meters
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldcga committed Feb 13, 2024
1 parent ba60970 commit 0cd14df
Show file tree
Hide file tree
Showing 4 changed files with 1,205 additions and 2,303 deletions.
7 changes: 5 additions & 2 deletions bdgd_tools/core/Core.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def run_gui(folder_bdgd: str) -> None:
gui.load_window()


def run(folder: Optional[str] = None, feeder: Optional[str] = None, all_feeders: Optional[bool] = None) -> None:
def run(folder: Optional[str] = None, feeder: Optional[str] = None, all_feeders: Optional[bool] = None, limit_ramal_30m: Optional[bool] = False) -> None:

if feeder == None:
all_feeders = True
Expand Down Expand Up @@ -200,7 +200,10 @@ def run(folder: Optional[str] = None, feeder: Optional[str] = None, all_feeders
for entity in ['SSDMT', 'UNSEMT', 'SSDBT', 'UNSEBT', 'RAMLIG']:

if not case.dfs[entity]['gdf'].query("CTMT == @alimentador").empty:
case.lines_SSDMT, aux = Line.create_line_from_json(json_data.data, case.dfs[entity]['gdf'].query("CTMT==@alimentador"), entity)
if limit_ramal_30m == True:
case.lines_SSDMT, aux = Line.create_line_from_json(json_data.data, case.dfs[entity]['gdf'].query("CTMT==@alimentador"), entity, ramal_30m = limit_ramal_30m)
else:
case.lines_SSDMT, aux = Line.create_line_from_json(json_data.data, case.dfs[entity]['gdf'].query("CTMT==@alimentador"), entity)
list_files_name.append(aux)
else:
print(f'No {entity} elements found\n')
Expand Down
Loading

0 comments on commit 0cd14df

Please sign in to comment.