split actuators from energy storage
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user