Factory-simulator: A process-oriented environment for evaluating manufacturing decisions against optimisation-based references

Andrzej Wodecki, Wojciech Godlewski, Michał ChojnaarXiv 2026

It’s late, the coffee has worn off, and you’re staring at a screen full of logs. You’ve got a Large Language Model (LLM) acting as an autonomous agent, and it’s doing... something. It says it’s managing a supply chain. It’s shipping orders on time. But is it actually running a business, or is it just burning through your venture capital to keep the "on-time delivery" metric green?

This is the core tension explored in Factory-simulator, a new research environment designed to put LLM-based multi-agent systems (LLM-MAS) through their paces in a deterministic, financially rigorous manufacturing world.

TL;DR

Factory-simulator is a "flight simulator" for AI factory managers that measures success in dollars and cents, not just shipped boxes. It allows researchers to see if an AI can balance procurement, production, and cash flow, providing a "perfect" mathematical benchmark to show exactly how much money the AI left on the table.

What Problem Does This Paper Address?

We are currently in an "agentic" gold rush. We’re building LLM agents to handle inventory, schedule production, and talk to suppliers. However, evaluating these agents is surprisingly tricky.

Most existing benchmarks focus on narrow, functional silos—like "did the agent order the right amount of stock?" But in the real world, business is a web of interconnected processes. If an agent over-orders stock to ensure they never run out (high service level), they might run out of cash to pay the electricity bill (low liquidity).

The authors argue that equal delivery performance can hide vastly different financial consequences. You can be a "hero" who delivers every order on time while simultaneously bankrupting the company through storage costs and rush-order fees. We need a way to evaluate the process-oriented performance of these systems.

Methods

The authors built a deterministic simulation engine that acts as the "ground truth" for a factory. Here’s how it works:

  1. The Engine: It handles state transitions (moving parts from a warehouse to a production line) and accounting (tracking cash, receivables, and debt). It’s exposed via a JSON API, making it easy for LLM agents to "talk" to the factory.
  2. Process-Oriented Modeling: Unlike simple inventory games, this connects everything. Procurement decisions affect future production, which affects shipments, which eventually (after a delay) affects cash flow. The architecture connects the simulation engine to external research harnesses and benchmark layers.

  3. Deterministic Replay & Forking: This is a researcher's dream. Because the world is deterministic, you can record a run, go back to period 10, "fork" the history, and try a different decision to see exactly how the future changes.

  4. Optimization-Based References: To know how well an LLM is doing, you need a baseline. The system uses Linear Programming (LP) and Mixed-Integer Linear Programming (MILP) to calculate "Full-Foresight" references—essentially, what a perfect manager who can see the future would have done.
Fig. 1. Architecture supporting decision evaluation. Demonstration clients accompany the engine; an external research harness defines the study and controls access. Codex (OpenAI, GPT-6 Astra) assisted with the Python/Matplotlib drawing code.

Datasets

The paper introduces a "Library Factory"—a stylized electronics assembly plant with:

  • Entities: 3 products, 6 components, 9 materials.
  • Infrastructure: 4 production lines, 2 warehouses, 4 suppliers, and 4 customers.
  • Scenarios: A catalogue of 23 pre-configured "stress tests," including demand surges, supplier outages, and equipment breakdowns.

Key Insights and Ideas

  • The "Delivery Metric" is a Lie: The paper demonstrates that two different controllers can both achieve 100% on-time delivery, but one might be significantly more profitable because it managed its inventory and storage costs better.
  • Full-Foresight as a Diagnostic: By comparing an agent to a "perfect" reference that knows future demand, researchers can distinguish between "the agent made a bad choice" and "the agent didn't have enough information."
  • Liquidity vs. Profitability: The simulator explicitly separates these. An agent might be profitable on paper (high receivables) but fail because it ran out of actual cash to buy raw materials. The decision loop: agents receive observations, make decisions, and the engine executes them in a specific order.
The decision loop: agents receive observations, make decisions, and the engine executes them in a specific order.

Key Results

The authors integrated a live LLM-MAS (using OpenAI's gpt-6.1-terra) consisting of three roles: a planner, a procurement officer, and a reviewer.

  • Financial Divergence: In one scenario ("Outage with notice"), two different LLM runs on the exact same world resulted in a profit difference of over 211,000 monetary units. One run ended with positive profit but negative cash, highlighting the difficulty of managing liquidity.
  • Optimization Gap: The LLM agents generally performed worse than the "Rolling" optimization baseline, providing a clear quantitative "gap" for researchers to try and close.
  • Verification: The system successfully reconciled material and financial balances across 159 periods of live LLM interaction, proving the environment is stable enough for long-running research.

Limitations and Future Work

  • Stylized, Not Real: The "Library Factory" is a simplified model. It’s not meant to be a digital twin of a real factory, but a controlled laboratory.
  • Discrete Time: The simulation moves in "periods" (e.g., days). It doesn't handle the second-by-second scheduling of a real shop floor.
  • Inference Costs: Currently, the "profit" calculation doesn't subtract the cost of the LLM API calls. In the future, a truly efficient agent would need to balance its business profit against its own computational "salary."
  • Agent Organization: The authors suggest future work should investigate whether a centralized "boss" agent is more profitable than a distributed team of specialized agents.

Summary updated

Abstract

Motivated by discussions with an electronics contract manufacturer about decision support, Factory-simulator provides a deterministic manufacturing environment for controlled research on the business performance of large language model-based multi-agent systems (LLM-MAS). Equal delivery performance can arise from decisions with different financial consequences, complicating evaluation through delivery metrics alone. Its process-oriented model connects procurement and production decisions to order fulfilment and factory finances. Seeded worlds and recorded actions support replay and branching from a shared history to examine alternative decisions and their downstream consequences. Linear and mixed-integer programming models generate profit-oriented reference decisions. Observation-limited comparators use disclosed information; full-foresight references use future events for diagnostic comparison. Controlled examples show equal delivery performance with different profit under the same information and distinguish delivery penalties from deferred payment. Verification includes material and financial balances, replay and forks, and a small allocation instance in which the tested optimisation-based controllers attain an analytically established optimum. An external three-role LLM-MAS client completed four illustrative runs comprising 159 periods, with reconciled balances and exact replay of recorded actions. Matched-world rolling comparisons contextualise the financial outcomes, while full-foresight results provide heuristic reference points rather than certified optima. The software enables researchers to investigate how agent organisation and information access affect business outcomes, including whether distributing procurement and production responsibilities changes profit relative to a centralised controller.
BibTeX
@misc{wodecki2026factory,
  author = {Andrzej Wodecki and Wojciech Godlewski and Michał Chojna},
  title = {{Factory-simulator: A process-oriented environment for evaluating manufacturing decisions against optimisation-based references}},
  year = {2026},
  eprint = {2611.29079},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29079},
}
Figure