build(agent): new-agents-4#58ba63 iteration
This commit is contained in:
parent
dff976d0ad
commit
132a4743cb
|
|
@ -17,9 +17,11 @@ class ADMMCoordinator:
|
|||
self.rho = rho
|
||||
|
||||
def coordinate(self, plan: PlanDelta, venues: List[str]) -> PlanDelta:
|
||||
if not plan or not plan.steps:
|
||||
if plan is None:
|
||||
return plan
|
||||
# Minimal ADMM-like annotation to indicate coordination happened
|
||||
# Ensure the plan has a steps list; initialize if missing for robustness
|
||||
if not hasattr(plan, "steps") or plan.steps is None:
|
||||
plan.steps = [] # type: ignore[attr-defined]
|
||||
venues_str = ",".join(venues) if venues else "[]"
|
||||
plan.steps.append(f"ADMM_COORDINATE between [{venues_str}] with rho={self.rho}")
|
||||
return plan
|
||||
|
|
|
|||
|
|
@ -46,5 +46,7 @@ class DualVariables:
|
|||
class PlanDelta:
|
||||
# A delta plan that can be applied to move a local problem toward feasibility
|
||||
actions: List[StrategyDelta] = field(default_factory=list)
|
||||
# Optional sequence of high-level orchestration steps or annotations
|
||||
steps: List[str] = field(default_factory=list)
|
||||
timestamp: float = 0.0
|
||||
safety_tags: List[str] = field(default_factory=list)
|
||||
|
|
|
|||
Loading…
Reference in New Issue