Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:VOLTTRON/volttron into 2030_5_anew
Browse files Browse the repository at this point in the history
  • Loading branch information
craig8 committed Nov 3, 2023
2 parents 4d64eda + 0794cdf commit 7c7b552
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions volttron/platform/control/control_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@


def _calc_min_uuid_length(agents):
agent_ids = [agent.uuid for agent in agents]
common_len = len(os.path.commonprefix(agent_ids))
return common_len + 1
n = 0
for agent1 in agents:
for agent2 in agents:
if agent1 is agent2:
continue
common_len = len(os.path.commonprefix([agent1.uuid, agent2.uuid]))
if common_len > n:
n = common_len
return n + 1


def _list_agents(aip):
Expand Down

0 comments on commit 7c7b552

Please sign in to comment.