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

View File

@@ -30,7 +30,7 @@ def admin_index():
def reseed():
repo = get_repo()
counts = load_transport_seed(repo)
total = counts["platforms"] + counts["power_sources"]
total = counts["platforms"] + counts["actuators"] + counts["energy_storages"]
flash(
f"Reseed complete — added {total} entities, {counts['domains']} domains.",
"success",
@@ -43,7 +43,7 @@ def wipe_and_reseed():
repo = get_repo()
repo.clear_all()
counts = load_transport_seed(repo)
total = counts["platforms"] + counts["power_sources"]
total = counts["platforms"] + counts["actuators"] + counts["energy_storages"]
flash(
f"Wiped all data and reseeded — {total} entities, {counts['domains']} domains.",
"success",

View File

@@ -118,7 +118,7 @@
<h3>Entities</h3>
<p>
The building blocks. Each entity belongs to a <em>dimension</em>
(e.g. platform, power_source) and carries typed dependencies
(e.g. platform, actuator, energy_storage) and carries typed dependencies
that define its physical properties and constraints.
</p>
<div class="concept-examples">