Reinforcement learning (RL) needs vast numbers of simulated trajectories, and for discrete event systems (DES) the simulator is often the bottleneck: event-queue and fixed-step engines are general but slow and hard to vectorize. DES governed by synchronization and delays are max-plus linear without resource sharing (timed event graphs) and switched max-plus linear once resource conflicts are resolved. A simulation step is then a few additions and maxima over a sparse matrix. It is exact, has no event queue or clock, and is easy to compile. We use such models as RL environments. The exact max-plus recursion is the transition function, and states are taken relative to a reference date (translation equivariance). Sequential conflict resolution guarantees deadlock-free modes. On job shops from 3x3 to 20x10, a compiled sparse max-plus simulator gives the same makespans as event-driven and time-driven references. It is up to 194x and 419x faster, with a 2.6-6.0x lower peak Python heap. Most of the gain comes from compilation and sparse storage, which the max-plus form makes easy. A hybrid RL policy is trained by policy gradient on repetitive job shops with due dates. It cuts mean cost by 24-62% against dispatching rules and a one-round MPC, and by 18-26% against derivative-free search. A stronger MPC beats the policy by 13-37% on larger shops but needs 150-190x more computation per decision. Sampling 100 schedules per round from the policy and choosing among them with the max-plus model beats that MPC by 8-34% in five of six settings, at a third of its decision time. The approach applies wherever dynamics are (switched) max-plus linear.
翻译:暂无翻译