Operational Remediation Reports
Semaphore Capacity Remediation Report
Grant requests against a fixed permit pool and turn the remaining capacity into an admit, hold, or shed remediation action.
Semaphore Capacity Remediation Report
semaphore_capacity_remediation_report.py
capacity = 3
requests =
granted = 0
for _ in range(requests):
if granted < capacity:
granted += 1
available = capacity - granted
action = "admit" if available >= 2 else "hold" if available == 1 else "shed"
print("requests=" + str(requests) + " granted=" + str(granted) + " available=" + str(available) + " action=" + action)
capacity = 3
requests =
granted = 0
for _ in range(requests):
if granted < capacity:
granted += 1
available = capacity - granted
action = "admit" if available >= 2 else "hold" if available == 1 else "shed"
print("requests=" + str(requests) + " granted=" + str(granted) + " available=" + str(available) + " action=" + action)
capacity = 3
requests =
granted = 0
for _ in range(requests):
if granted < capacity:
granted += 1
available = capacity - granted
action = "admit" if available >= 2 else "hold" if available == 1 else "shed"
print("requests=" + str(requests) + " granted=" + str(granted) + " available=" + str(available) + " action=" + action)
remaining capacity
A fixed permit pool is modeled with a scalar counter so the remaining capacity stays deterministic and free of object identity, and it is the only driver of the remediation action.