←
Build the decisionSaved automatically
Medium · Grade 724. Autonomous Parking Operations

Adapt facility routing to handle traffic surges, temporary bay closures, and gate outages.

Scenario

Live incidents happen during operation. Bays close for maintenance and gate bottlenecks form.

Problem statement

ParkFlow now operates high-volume airport and event parking facilities!

Arrival volume surges dynamically, bays close unexpectedly for maintenance, and exit gates suffer temporary outages while spots remain occupied.

Keep facility operations stable: balance arrival queue pressure against exit turnover, prevent driver abandonment, and pass 8 hidden surge scenarios!

Build decision layers: 1. Release exiting vehicles when exit gates are open to recover capacity. 2. Handle hard safety constraints (reserved, accessible, large). 3. Check driver patience (`carPatienceRemaining`) to prevent queue abandonment. 4. Route to available fallbacks when primary categories close.

What this teaches

Balance throughput, service priority, queue patience, and incident recovery under heavy load.

Evaluation contract

  • Hard-constraint correctness: 30%
  • Throughput, timeout, and fairness: 30%
  • Incident recovery and congestion control: 25%
  • Policy generalization: 15%
Scroll down to build and test your solution.

Active controller

Apply & Run executes only the selected controller.

How a rule works

A rule has two parts:

WHEN <something is true> → DO <this action>

  • WHEN is a question about what is happening right now. For example: "Is it raining?" or "Is there a wall ahead?"
  • DO is what happens when the answer is yes.
  • The simulation runs one step at a time.
  • On each step, the rules are checked from top to bottom.
  • The first rule that is true wins. The rules below it are skipped for that step.
  • To change which rule wins, move it up or down the list.
  • If no rule is true, nothing happens on that step.
  • Some actions have more than one step, like "turn right, then move". You build these in the Functions tab.
  • Once a multi-step action starts, it finishes all its steps before the rules are checked again. It only stops early if the next step is not safe.
See an example

Two rules for deciding about an umbrella:

1  WHEN isRaining  → take an umbrella
2  WHEN always     → leave the umbrella at home
  • It is raining. Rule 1 is true, so you take an umbrella. Rule 2 is skipped.
  • It is sunny. Rule 1 is false, so rule 2 is checked next. Rule 2 is always true, so you leave the umbrella at home.
  • Order matters. If rule 2 were on top, it would be true every day, and you would never take an umbrella.

Rule folders

Categorise cards without changing their global execution order.

No rules yet. Nothing will happen until you add at least one rule.