Skip to content

Commit

Permalink
update nodes 27 and 28
Browse files Browse the repository at this point in the history
  • Loading branch information
david-deboer committed Jul 29, 2024
1 parent afd5273 commit f36c0dd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
13 changes: 11 additions & 2 deletions hera_mc/cm_active.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from . import cm_partconnect as partconn
from . import cm_utils, mc

IGNORE_DUPLICATE_ACTIVE_PART = False

def get_active(
at_date="now", at_time=None, float_format=None, loading=["apriori"], testing=False
Expand Down Expand Up @@ -196,13 +197,21 @@ def load_connections(self, at_date=None, at_time=None, float_format=None):
if self.pytest_param:
check_keys[self.pytest_param].append(chk)
if chk in check_keys["up"]:
raise ValueError("Duplicate active port {}".format(chk))
if IGNORE_DUPLICATE_ACTIVE_PART:
print("Duplicate active port {}".format(chk))
continue
else:
raise ValueError("Duplicate active port {}".format(chk))
check_keys["up"].append(chk)
chk = cm_utils.make_part_key(
cnn.downstream_part, cnn.down_part_rev, cnn.downstream_input_port
)
if chk in check_keys["down"]:
raise ValueError("Duplicate active port {}".format(chk))
if IGNORE_DUPLICATE_ACTIVE_PART:
print("Duplicate active port {}".format(chk))
continue
else:
raise ValueError("Duplicate active port {}".format(chk))
check_keys["down"].append(chk)
key = cm_utils.make_part_key(cnn.upstream_part, cnn.up_part_rev)
self.connections["up"].setdefault(key, {})
Expand Down
10 changes: 5 additions & 5 deletions hera_mc/data/nodes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
21: 541110.54,6601215.50: 175,195,212,214,231,232,326,327,331,332,336,340
22: 540888.28,6601276.27: 250,251,252,253,266,267,268,269,281,282,283,295
23: 540946.68,6601276.27: 254,255,256,257,270,271,272,273,284,285,286,287
24: 541015.60,6601278.97: 258,259,260,274,275,276,288,289,290,291,302,303
24: 541015.60,6601278.97: 258,259,260,274,275,276,288,289
25: 541078.95,6601261.39: 230,247,248,249,263,264,265,279,280,335,339
26: 540912.55,6601304.63: 296,297,298,308,309,310,330,334,338,341,346,347
27: 540968.58,6601307.69: 299,300,301,311,312,313,314,342,343
28: 541026.98,6601307.69: 304,305,315,316,317,318,348
29: 541060.59,6601291.49: 277,278,292,293,294,306,307,319,344,345,349
26: 540912.55,6601304.63: 296,297,298,308,309,310,330,334,338,341,346
27: 540968.58,6601307.69: 299,300,301,302,311,312,313,314,342,343,344,347
28: 541026.98,6601307.69: 290,291,303,304,305,315,316,317,318,345,348,349
29: 541060.59,6601291.49: 277,278,292,293,294,306,307,319

0 comments on commit f36c0dd

Please sign in to comment.