Docs Simulator Blog About Github ↗

Task Scheduling

How MAFIS assigns tasks to agents in lifelong mode and what schedulers are available.

In lifelong MAPF, agents continuously receive new tasks after completing their current ones. The component that decides which goal to assign to which agent is the TaskScheduler.

Available Schedulers

Random

Picks a pickup or delivery cell uniformly at random. Serves as the baseline scheduler.

Closest

Two-phase batch assignment. Phase 1 creates random task candidates from all pickup cells. Phase 2 assigns each agent the nearest task from the pool via greedy matching. Preserves locality benefit without positional convergence.

Both schedulers are intentionally fault-blind: dead agents are pre-filtered before the scheduler sees them. The schedulers have no awareness of congestion, queue state, or blocked zones. This rigid design isolates solver behavior as the experimental variable.

Task Model

Agents follow an 8-state task cycle using zones defined by the topology:

  1. Free → Scheduler assigns a pickup cell from the topology’s pickup zone
  2. TravelEmpty → Agent travels to pickup cell (no cargo)
  3. Loading → Agent loads cargo at pickup cell (1-tick minimum dwell)
  4. TravelToQueue → Agent travels to the back of a delivery queue line
  5. Queuing → Agent shuffles forward in queue (one slot per tick)
  6. TravelLoaded → Agent travels to delivery cell (promoted from queue front)
  7. Unloading → Agent unloads cargo at delivery cell
  8. Free → Task complete (throughput increments), cycle repeats

Each completed delivery = one throughput unit. If the topology has no queue lines, agents skip steps 4-5 and go directly from Loading to TravelLoaded.