Take the shift

Run the dock.Beat the model.

You're the shift supervisor from 06:00 with ten doors, five crews and a yard that fills up. The 9B model in our harness ran this exact shift for $4,950. Every move you make is replayed by the same engine on our server; nothing is stored.
Tick 01 / 24 · 06:00 · cost so far $0
Warehouse · staging 0/40 palletsCrew roomD1D2D3D4D5D6D7D8 ❄D9 ❄D10 ❄Yard← gate inshipped out →201206 ❄209207 ❄203202204208205 ❄C1C2C3C4C5
Inbound · freight left to unload Outbound · freight loaded Moved this tick Crew Door out of service❄ Refrigerated · D8–D10 are cold doors
Outbound waiting · must leave by
OUT-201 11:00 · OUT-206 11:00 · OUT-209 11:30 · OUT-207 12:00 · OUT-203 13:00 · OUT-202 14:00 · OUT-204 14:00 · OUT-208 14:30 · OUT-205 15:00
Cost so far
$0
Your moves this tick
  • No moves yet: ending the tick holds.

Moves apply in order, then crews work for 30 minutes. A refused move costs nothing but changes nothing; the reason shows next tick.

Inbound still due · expected at
IN-101 drop ❄ · 07:30, IN-102 drop · 07:30, IN-103 live · 08:00, IN-104 drop ❄ · 08:00, IN-105 drop · 08:30, IN-106 drop · 08:30, IN-107 live · 08:30, IN-108 drop · 09:00, IN-109 live · 09:00, IN-110 live · 09:30, IN-111 drop ❄ · 10:00, IN-112 drop · 10:30, IN-113 live · 10:30, IN-114 live · 11:00, IN-115 live ❄ · 11:00, IN-116 live · 11:30, IN-117 drop · 11:30, IN-118 drop ❄ · 12:30, IN-119 live · 13:00, IN-120 live · 14:00, IN-121 drop ❄ · 14:00, IN-122 live · 14:00, IN-123 drop · 14:30, IN-124 live · 14:30
The rules the model was given
You are the shift supervisor of a cross-dock distribution centre. Your job is to run one shift at the lowest total cost.

TIME
- The shift runs in 30-minute ticks from 06:00. Regular time ends at 16:00 (tick 20); overtime runs to 18:00 (tick 24), when the shift ends.
- Each tick you send a list of actions. They apply at the start of the tick, then crews work for the tick.

THE DOCK
- Doors: a trailer must be docked at a door to be worked. Cold doors open onto the cooler; reefer trailers can only use cold doors (other trailers may use them too).
- Yard jockey: at most 3 "dock" or "undock" moves per tick in total.
- Crews: one crew per door. A crew only works if its door has a trailer and the door is not out of service. Crews can move to any door at no cost.
- Unload speed per crew per tick: 8 pallets (palletized) or 3 (floor-loaded). Load speed: 8 pallets.
- Inbound trailers unload in manifest order. "storage" pallets go to the warehouse. Pallets marked for an outbound trailer (cross-dock) go to the staging area, capacity 40 pallets. If staging is full and the next pallet is cross-dock, unloading stops.
- Outbound trailers load staged cross-dock pallets for them first, then their warehouse (storage) pallets, which are always available.
- Inbound trailers leave on their own once empty. Outbound trailers leave on their own once fully loaded, or you can send one early with "depart" (missing pallets are short-shipped).
- Not everything is known: trailers can arrive early, late (sometimes with an ETA notice) or not at all; unscheduled trailers can walk in; doors can go out of service.

COSTS (what you are minimising)
- Detention: $40 per tick for each LIVE trailer (driver waiting) still on site after 4 ticks of free time, counted from its arrival or its appointment, whichever is later. Drop trailers have no driver and no detention.
- Overtime: $80 per crew per tick assigned to a door from tick 20 on. Release crews you don't need in overtime.
- Late outbound: $150 per tick an outbound is still on site at or after its cutoff. 4 ticks after cutoff it is sent as it is.
- Short-ship: $60 per pallet an outbound leaves without.
- Spoilage: $120 per cold pallet that waits in staging 2 ticks or more (it is lost).
- End of shift: $250 per live trailer still on site, $100 per drop trailer not unloaded.

ACTIONS (JSON objects)
- {"type":"dock","trailer":"IN-104","door":"D3"}   move a yard trailer to an empty door
- {"type":"undock","trailer":"OUT-202"}            move a trailer from its door back to the yard (keeps progress)
- {"type":"assign","crew":"C2","door":"D3"}        put a crew on a door (it stays there until moved)
- {"type":"release","crew":"C2"}                   take a crew off its door
- {"type":"depart","trailer":"OUT-202"}            send an outbound now, as loaded