split actuators from energy storage

This commit is contained in:
2026-03-04 14:18:52 -06:00
parent e99a14d087
commit 216879bdd5
13 changed files with 601 additions and 681 deletions

View File

@@ -115,7 +115,7 @@ def domain_list(ctx):
@click.argument("domain_name")
@click.option("--passes", "-p", default="1,2,3", help="Comma-separated pass numbers to run")
@click.option("--threshold", "-t", default=0.1, type=float, help="Score threshold for pass 3")
@click.option("--dimensions", "-d", default="platform,power_source",
@click.option("--dimensions", "-d", default="platform,actuator,energy_storage",
help="Comma-separated dimension names")
@click.pass_context
def run(ctx, domain_name, passes, threshold, dimensions):

View File

@@ -191,7 +191,11 @@ class ConstraintResolver:
def _check_unmet_requirements(
self, all_deps: list[tuple[str, Dependency]], result: ConstraintResult
) -> None:
"""Rule 5: Required condition not provided by any entity → conditional."""
"""Rule 5: Required condition not provided by any entity → conditional.
Energy-category requirements (e.g. energy_form) are hard blocks —
you cannot power an actuator with an incompatible energy source.
"""
provides = {(d.key, d.value) for _, d in all_deps if d.constraint_type == "provides"}
# Ambient conditions that don't need to be explicitly provided
ambient = {
@@ -207,7 +211,11 @@ class ConstraintResolver:
continue # Infrastructure is external, not checked here
key_val = (dep.key, dep.value)
if key_val not in provides and key_val not in ambient:
result.warnings.append(
msg = (
f"{name} requires {dep.key}={dep.value} "
f"but no entity in this combination provides it"
)
if dep.category == "energy":
result.violations.append(msg)
else:
result.warnings.append(msg)

File diff suppressed because it is too large Load Diff