@@ -64,48 +64,11 @@ async def main():
6464"""
6565
6666# Carrier layer
67- from .carrier .core import Carrier , EventWithValue
68- from .carrier .simple import (
69- ActorContainer ,
70- SimpleCarrier ,
71- cid ,
72- start_coordinated_optimization ,
73- start_distributed_optimization ,
74- )
75-
76- # Algorithm base
77- from .algorithm .core import (
78- CoordinatedDistributedAlgorithm ,
79- Coordinator ,
80- DistributedAlgorithm ,
81- OptimizationMessage ,
82- on_exchange_message ,
83- start_optimization ,
84- )
85-
86- # COHDA
87- from .algorithm .heuristic .cohda .core import (
88- COHDAAlgorithmData ,
89- DefaultLocalDecider ,
90- LocalDecider ,
91- ScheduleSelection ,
92- SolutionCandidate ,
93- SystemConfig ,
94- TargetParams ,
95- WorkingMemory ,
96- act ,
97- cohda_default_performance ,
98- create_cohda_participant ,
99- create_cohda_participant_with_decider ,
100- create_cohda_start_message ,
101- create_from_updated_sysconf ,
102- decide ,
103- merge_candidates ,
104- merge_sysconfigs ,
105- perceive ,
106- result as cohda_result ,
67+ from .algorithm .admm .consensus_admm import (
68+ ADMMConsensusGlobalActor ,
69+ create_admm_start_consensus ,
70+ create_consensus_target_reach_admm_coordinator ,
10771)
108- from .algorithm .heuristic .cohda .decider import LocalSearchDecider
10972
11073# ADMM
11174from .algorithm .admm .core import (
@@ -120,22 +83,21 @@ async def main():
12083from .algorithm .admm .flex_actor import (
12184 ADMMFlexActor ,
12285 create_admm_flex_actor_one_to_many ,
123- result as admm_flex_result ,
12486)
125- from .algorithm .admm .consensus_admm import (
126- ADMMConsensusGlobalActor ,
127- create_admm_start_consensus ,
128- create_consensus_target_reach_admm_coordinator ,
87+ from .algorithm .admm .flex_actor import (
88+ result as admm_flex_result ,
12989)
13090from .algorithm .admm .sharing_admm import (
13191 ADMMSharingData ,
13292 ADMMSharingGlobalActor ,
13393 ADMMTargetDistanceObjective ,
13494 create_admm_sharing_data ,
135- create_admm_start as create_sharing_admm_start ,
13695 create_sharing_admm_coordinator ,
13796 create_sharing_target_distance_admm_coordinator ,
13897)
98+ from .algorithm .admm .sharing_admm import (
99+ create_admm_start as create_sharing_admm_start ,
100+ )
139101
140102# Consensus
141103from .algorithm .consensus .averaging import (
@@ -151,6 +113,50 @@ async def main():
151113 LinearCostEconomicDispatchConsensusActor ,
152114)
153115
116+ # Algorithm base
117+ from .algorithm .core import (
118+ CoordinatedDistributedAlgorithm ,
119+ Coordinator ,
120+ DistributedAlgorithm ,
121+ OptimizationMessage ,
122+ on_exchange_message ,
123+ start_optimization ,
124+ )
125+
126+ # COHDA
127+ from .algorithm .heuristic .cohda .core import (
128+ COHDAAlgorithmData ,
129+ DefaultLocalDecider ,
130+ LocalDecider ,
131+ ScheduleSelection ,
132+ SolutionCandidate ,
133+ SystemConfig ,
134+ TargetParams ,
135+ WorkingMemory ,
136+ act ,
137+ cohda_default_performance ,
138+ create_cohda_participant ,
139+ create_cohda_participant_with_decider ,
140+ create_cohda_start_message ,
141+ create_from_updated_sysconf ,
142+ decide ,
143+ merge_candidates ,
144+ merge_sysconfigs ,
145+ perceive ,
146+ )
147+ from .algorithm .heuristic .cohda .core import (
148+ result as cohda_result ,
149+ )
150+ from .algorithm .heuristic .cohda .decider import LocalSearchDecider
151+ from .carrier .core import Carrier , EventWithValue
152+ from .carrier .simple import (
153+ ActorContainer ,
154+ SimpleCarrier ,
155+ cid ,
156+ start_coordinated_optimization ,
157+ start_distributed_optimization ,
158+ )
159+
154160# Mango carrier (optional — only imported if mango-agents is available)
155161_MANGO_AVAILABLE = False
156162try :
0 commit comments