<!-- canonical: efficientnewlanguage.org/ai/examples/905-the-factory-saw-a-season-the-customers-did-not-have | ai_layer_version: 0.1.0 | updated: 2026-09-18 -->

# Example 905 — The factory saw a season the customers did not have

`the_factory_saw_a_season_the_customers_did_not_have.eml` - A factory plans capacity from the orders it receives, the orders are real and exactly recorded, and they show a sharp spike on the first of every month. Where that spike comes from is computed below.

## EML

```eml
# Self-authored for the EML case corpus (no external origin). A factory plans
# capacity from the orders it receives, the orders are real and exactly
# recorded, and they show a sharp spike on the first of every month. Where that
# spike comes from is computed below.
#
# The planning is careful. It reads the real order book, not a forecast; every
# order is dated to the day it arrived; the monthly spike is genuinely there;
# and the intent is exactly 'staff up for the busy period'.
#
# Customers buy a flat hundred a day, and the retailer orders once a month in
# one batch, so the factory sees thirty days of demand land on one day and a
# calm that is not calm on the other twenty-nine.

100 => customer_demand_per_day
30 => days_per_month

customer_demand_per_day * days_per_month => retailer_monthly_batch
retailer_monthly_batch => factory_orders_on_the_first
0 => factory_orders_on_other_days
customer_demand_per_day => customer_demand_on_the_first
customer_demand_per_day => customer_demand_on_other_days
int(factory_orders_on_the_first / customer_demand_per_day) => apparent_peak_as_a_multiple_of_daily_demand
customer_demand_on_the_first - customer_demand_on_other_days => customers_actual_swing
factory_orders_on_the_first - factory_orders_on_other_days => factorys_apparent_swing

"customer demand, every day      : " + str(customer_demand_per_day) ^0
"retailer's batch, once a month  : " + str(retailer_monthly_batch) ^0
"" ^0
"factory orders, the first       : " + str(factory_orders_on_the_first) ^0
"factory orders, other days      : " + str(factory_orders_on_other_days) ^0
"customer demand, the first      : " + str(customer_demand_on_the_first) ^0
"customer demand, other days     : " + str(customer_demand_on_other_days) ^0
"" ^0
"apparent peak                   : " + str(apparent_peak_as_a_multiple_of_daily_demand) + " times a normal day" ^0
"customers' swing, day to day    : " + str(customers_actual_swing) ^0
"factory's apparent swing        : " + str(factorys_apparent_swing) ^0
"" ^0

# ---- what the planning verified ----

"the capacity plan" ^0
"  reads : the real order book, not a forecast" ^0
"  dating : every order to the day it arrived" ^0
"  the spike : genuinely in the data, every month" ^0
"  intent : staff up for the busy period" ^0
"  orders misdated : 0" ^0
"  verdict : DEMAND PEAKS THIRTY-FOLD ON THE FIRST" ^0
"" ^0
"  reading the real order book with real dates is the part" ^0
"  done right here, and it is why the spike is not an" ^0
"  artefact of the factory's own records" ^0
"" ^0

# ---- where the spike comes from ----

"batching" ^0
"  what customers do : buy " + str(customer_demand_per_day) + " a day, every day" ^0
"  what the retailer does : orders " + str(days_per_month) + " days at once, on the first" ^0
"  what the factory sees : " + str(retailer_monthly_batch) + " on one day, nothing on the rest" ^0
"  so the season : is in the retailer's calendar, not the" ^0
"    customers' behaviour" ^0
"  what staffing up for the first buys : capacity for a" ^0
"    peak that is an accounting event" ^0
"" ^0

# ---- what the factory got ----

"the plan" ^0
"  temporary staff hired for : the first of each month" ^0
"  demand on the first, from customers : " + str(customer_demand_on_the_first) + ", same as any day" ^0
"  is the order book wrong : no; the batch really arrives" ^0
"    then" ^0
"  is an order date a demand date : no; it is the date the" ^0
"    retailer chose to send thirty days at once" ^0
"" ^0

# ---- null control ----

# The same factory planning on the retailer's sell-through (customer sales per
# day) instead of on the retailer's order dates.
3000 => nc_peak_planned_for_on_order_dates
100 => nc_peak_planned_for_on_sell_through
0 => nc_seasonal_staff_needed_on_sell_through

"null control - plan on sell-through, not on order dates" ^0
"  peak planned for, order dates : " + str(nc_peak_planned_for_on_order_dates) ^0
"  peak planned for, sell-through : " + str(nc_peak_planned_for_on_sell_through) ^0
"  seasonal staff needed on sell-through : " + str(nc_seasonal_staff_needed_on_sell_through) ^0
"  no customer and no order changed; the calendar the" ^0
"  factory read stopped being the retailer's" ^0
"" ^0

# ---- the rule ----

"what an order-book capacity plan guarantees" ^0
"  the plan matches when orders arrive : exactly, real" ^0
"    orders, real dates" ^0
"  the plan matches when customers buy : not addressed; the" ^0
"    retailer batches " + str(days_per_month) + " days into one order, so the factory" ^0
"    sees a " + str(apparent_peak_as_a_multiple_of_daily_demand) + "-fold peak in a demand that swings by " + str(customers_actual_swing) ^0
"" ^0

"the rhythm of the orders is the rhythm of whoever places them, and one tier's" ^0
"convenience arrives at the next as weather; a spike that is really a batch has" ^0
"a date but no cause the customers would recognise" ^0
"" ^0

"It plans from the real order book with real dates - the monthly spike is truly" ^0
"there. But customers buy " + str(customer_demand_per_day) + " every day and the retailer batches " + str(days_per_month) + " days into" ^0
"one order, so the factory staffs for a " + str(apparent_peak_as_a_multiple_of_daily_demand) + "-fold peak in a demand that" ^0
"swings by " + str(customers_actual_swing) + ", until it plans on sell-through instead of order dates." ^0
```

## Python (deterministic transpilation)

```python
customer_demand_per_day = 100
days_per_month = 30
retailer_monthly_batch = customer_demand_per_day * days_per_month
factory_orders_on_the_first = retailer_monthly_batch
factory_orders_on_other_days = 0
customer_demand_on_the_first = customer_demand_per_day
customer_demand_on_other_days = customer_demand_per_day
apparent_peak_as_a_multiple_of_daily_demand = int(factory_orders_on_the_first / customer_demand_per_day)
customers_actual_swing = customer_demand_on_the_first - customer_demand_on_other_days
factorys_apparent_swing = factory_orders_on_the_first - factory_orders_on_other_days
print("customer demand, every day      : " + str(customer_demand_per_day))
print("retailer's batch, once a month  : " + str(retailer_monthly_batch))
print("")
print("factory orders, the first       : " + str(factory_orders_on_the_first))
print("factory orders, other days      : " + str(factory_orders_on_other_days))
print("customer demand, the first      : " + str(customer_demand_on_the_first))
print("customer demand, other days     : " + str(customer_demand_on_other_days))
print("")
print("apparent peak                   : " + str(apparent_peak_as_a_multiple_of_daily_demand) + " times a normal day")
print("customers' swing, day to day    : " + str(customers_actual_swing))
print("factory's apparent swing        : " + str(factorys_apparent_swing))
print("")
print("the capacity plan")
print("  reads : the real order book, not a forecast")
print("  dating : every order to the day it arrived")
print("  the spike : genuinely in the data, every month")
print("  intent : staff up for the busy period")
print("  orders misdated : 0")
print("  verdict : DEMAND PEAKS THIRTY-FOLD ON THE FIRST")
print("")
print("  reading the real order book with real dates is the part")
print("  done right here, and it is why the spike is not an")
print("  artefact of the factory's own records")
print("")
print("batching")
print("  what customers do : buy " + str(customer_demand_per_day) + " a day, every day")
print("  what the retailer does : orders " + str(days_per_month) + " days at once, on the first")
print("  what the factory sees : " + str(retailer_monthly_batch) + " on one day, nothing on the rest")
print("  so the season : is in the retailer's calendar, not the")
print("    customers' behaviour")
print("  what staffing up for the first buys : capacity for a")
print("    peak that is an accounting event")
print("")
print("the plan")
print("  temporary staff hired for : the first of each month")
print("  demand on the first, from customers : " + str(customer_demand_on_the_first) + ", same as any day")
print("  is the order book wrong : no; the batch really arrives")
print("    then")
print("  is an order date a demand date : no; it is the date the")
print("    retailer chose to send thirty days at once")
print("")
nc_peak_planned_for_on_order_dates = 3000
nc_peak_planned_for_on_sell_through = 100
nc_seasonal_staff_needed_on_sell_through = 0
print("null control - plan on sell-through, not on order dates")
print("  peak planned for, order dates : " + str(nc_peak_planned_for_on_order_dates))
print("  peak planned for, sell-through : " + str(nc_peak_planned_for_on_sell_through))
print("  seasonal staff needed on sell-through : " + str(nc_seasonal_staff_needed_on_sell_through))
print("  no customer and no order changed; the calendar the")
print("  factory read stopped being the retailer's")
print("")
print("what an order-book capacity plan guarantees")
print("  the plan matches when orders arrive : exactly, real")
print("    orders, real dates")
print("  the plan matches when customers buy : not addressed; the")
print("    retailer batches " + str(days_per_month) + " days into one order, so the factory")
print("    sees a " + str(apparent_peak_as_a_multiple_of_daily_demand) + "-fold peak in a demand that swings by " + str(customers_actual_swing))
print("")
print("the rhythm of the orders is the rhythm of whoever places them, and one tier's")
print("convenience arrives at the next as weather; a spike that is really a batch has")
print("a date but no cause the customers would recognise")
print("")
print("It plans from the real order book with real dates - the monthly spike is truly")
print("there. But customers buy " + str(customer_demand_per_day) + " every day and the retailer batches " + str(days_per_month) + " days into")
print("one order, so the factory staffs for a " + str(apparent_peak_as_a_multiple_of_daily_demand) + "-fold peak in a demand that")
print("swings by " + str(customers_actual_swing) + ", until it plans on sell-through instead of order dates.")
```

## stdout (executed)

```text
customer demand, every day      : 100
retailer's batch, once a month  : 3000

factory orders, the first       : 3000
factory orders, other days      : 0
customer demand, the first      : 100
customer demand, other days     : 100

apparent peak                   : 30 times a normal day
customers' swing, day to day    : 0
factory's apparent swing        : 3000

the capacity plan
  reads : the real order book, not a forecast
  dating : every order to the day it arrived
  the spike : genuinely in the data, every month
  intent : staff up for the busy period
  orders misdated : 0
  verdict : DEMAND PEAKS THIRTY-FOLD ON THE FIRST

  reading the real order book with real dates is the part
  done right here, and it is why the spike is not an
  artefact of the factory's own records

batching
  what customers do : buy 100 a day, every day
  what the retailer does : orders 30 days at once, on the first
  what the factory sees : 3000 on one day, nothing on the rest
  so the season : is in the retailer's calendar, not the
    customers' behaviour
  what staffing up for the first buys : capacity for a
    peak that is an accounting event

the plan
  temporary staff hired for : the first of each month
  demand on the first, from customers : 100, same as any day
  is the order book wrong : no; the batch really arrives
    then
  is an order date a demand date : no; it is the date the
    retailer chose to send thirty days at once

null control - plan on sell-through, not on order dates
  peak planned for, order dates : 3000
  peak planned for, sell-through : 100
  seasonal staff needed on sell-through : 0
  no customer and no order changed; the calendar the
  factory read stopped being the retailer's

what an order-book capacity plan guarantees
  the plan matches when orders arrive : exactly, real
    orders, real dates
  the plan matches when customers buy : not addressed; the
    retailer batches 30 days into one order, so the factory
    sees a 30-fold peak in a demand that swings by 0

the rhythm of the orders is the rhythm of whoever places them, and one tier's
convenience arrives at the next as weather; a spike that is really a batch has
a date but no cause the customers would recognise

It plans from the real order book with real dates - the monthly spike is truly
there. But customers buy 100 every day and the retailer batches 30 days into
one order, so the factory staffs for a 30-fold peak in a demand that
swings by 0, until it plans on sell-through instead of order dates.
```

## Round-trip

`ok: true` — round-trip fixpoint reached (python1 == python2)

## Trace event types

eml:run:start · eml:assign · eml:output · eml:run:done
