Case 907

The orders doubled because half would be filled

the_orders_doubled_because_half_would_be_filled.eml - During a shortage a manufacturer allocates half of every order, reads the order book as demand, and builds capacity to meet it. Every order is real and every allocation is exact. What customers do to their orders when they know half will be filled is computed below.

ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-18

EML

eml
# Self-authored for the EML case corpus (no external origin). During a shortage
# a manufacturer allocates half of every order, reads the order book as demand,
# and builds capacity to meet it. Every order is real and every allocation is
# exact. What customers do to their orders when they know half will be filled is
# computed below.
#
# The response is careful. The order book is the real one; the allocation rule
# is applied exactly and fairly; the capacity plan matches the orders on the
# book; and the intent is exactly 'build enough to meet demand'.
#
# A customer who needs a hundred and knows half will be filled orders two
# hundred, so the order book is twice the demand - and when supply catches up
# and every order is filled in full, half of it is cancelled.

100 => true_need_per_customer
5000 => fill_rate_per_myriad
1000 => customers

int(true_need_per_customer * 10000 / fill_rate_per_myriad) => order_each_customer_places
true_need_per_customer * customers => true_demand_total
order_each_customer_places * customers => order_book_total
order_book_total - true_demand_total => phantom_orders
order_book_total => capacity_built_for
capacity_built_for - true_demand_total => capacity_idle_once_orders_are_filled_in_full
int(phantom_orders * 10000 / order_book_total) => phantom_share_of_the_book_per_myriad

"true need per customer          : " + str(true_need_per_customer) ^0
"fill rate during the shortage   : " + str(fill_rate_per_myriad) + " per ten thousand" ^0
"order each customer places      : " + str(order_each_customer_places) + ", to receive " + str(true_need_per_customer) ^0
"" ^0
"customers                       : " + str(customers) ^0
"true demand                     : " + str(true_demand_total) ^0
"order book                      : " + str(order_book_total) ^0
"phantom orders                  : " + str(phantom_orders) ^0
"phantom share of the book       : " + str(phantom_share_of_the_book_per_myriad) + " per ten thousand" ^0
"capacity built for              : " + str(capacity_built_for) ^0
"capacity idle once filled in full : " + str(capacity_idle_once_orders_are_filled_in_full) ^0
"" ^0

# ---- what the response verified ----

"the capacity response" ^0
"  order book : the real one, every order genuine" ^0
"  allocation : exactly half of every order, fairly" ^0
"  capacity plan : matches the book" ^0
"  intent : build enough to meet demand" ^0
"  orders miscounted : 0" ^0
"  verdict : THE BOOK SAYS 200000, BUILD 200000" ^0
"" ^0
"  reading the real book and allocating it exactly is the" ^0
"  part done right here, and it is why every customer got" ^0
"  precisely the fair share the rule promised" ^0
"" ^0

# ---- what customers do to their orders ----

"ordering under rationing" ^0
"  what a customer knows : half of what is ordered arrives" ^0
"  what a customer needs : " + str(true_need_per_customer) ^0
"  so a customer orders : " + str(order_each_customer_places) ^0
"  what the book records : need doubled, for every customer" ^0
"  what the allocation rule did : made the doubling the" ^0
"    rational thing to do, then read it as demand" ^0
"" ^0

# ---- what the manufacturer got ----

"after supply catches up" ^0
"  orders filled in full : every customer receives " + str(order_each_customer_places) + "," ^0
"    needs " + str(true_need_per_customer) + ", cancels or returns the rest" ^0
"  capacity built : " + str(capacity_built_for) ^0
"  demand it serves : " + str(true_demand_total) ^0
"  capacity idle : " + str(capacity_idle_once_orders_are_filled_in_full) ^0
"  is the book wrong : no; every order on it was placed" ^0
"  is an order a unit of need : not when the customer wrote" ^0
"    it to survive the allocation rule" ^0
"" ^0

# ---- null control ----

# The same shortage allocated on customers' past consumption (or their true
# need declared and audited) rather than on the size of the order they place.
200000 => nc_book_when_allocation_rewards_large_orders
100000 => nc_book_when_allocation_follows_past_consumption
100000 => nc_phantom_orders_the_change_removes

"null control - allocate on past consumption, not order size" ^0
"  order book, allocation by order size : " + str(nc_book_when_allocation_rewards_large_orders) ^0
"  order book, allocation by past consumption : " + str(nc_book_when_allocation_follows_past_consumption) ^0
"  phantom orders the change removes : " + str(nc_phantom_orders_the_change_removes) ^0
"  no customer's need changed; inflating the order stopped" ^0
"  being the way to get what you need" ^0
"" ^0

# ---- the rule ----

"what an order-book capacity plan guarantees" ^0
"  capacity matches the orders placed : exactly, real book," ^0
"    exact allocation" ^0
"  capacity matches what customers need : not addressed;" ^0
"    filling half of every order makes doubling the order" ^0
"    the rational move, so the book is " + str(order_book_total) + " for a need of" ^0
"    " + str(true_demand_total) + " and " + str(capacity_idle_once_orders_are_filled_in_full) + " of capacity goes idle when the shortage ends" ^0
"" ^0

"a number that people write in order to be treated fairly by a rule is a fact" ^0
"about the rule; the book doubled because the allocation halved, and building" ^0
"to the book is building to your own rationing" ^0
"" ^0

"It reads the real order book and allocates exactly half of every order - fair" ^0
"and precise. But customers who know half will arrive order double, so the book" ^0
"is " + str(order_book_total) + " for a true need of " + str(true_demand_total) + ", " + str(phantom_share_of_the_book_per_myriad) + " per ten thousand phantom, and" ^0
"" + str(capacity_idle_once_orders_are_filled_in_full) + " of built capacity idles once every order is filled in full." ^0

Python (deterministic transpilation)

python
true_need_per_customer = 100
fill_rate_per_myriad = 5000
customers = 1000
order_each_customer_places = int(true_need_per_customer * 10000 / fill_rate_per_myriad)
true_demand_total = true_need_per_customer * customers
order_book_total = order_each_customer_places * customers
phantom_orders = order_book_total - true_demand_total
capacity_built_for = order_book_total
capacity_idle_once_orders_are_filled_in_full = capacity_built_for - true_demand_total
phantom_share_of_the_book_per_myriad = int(phantom_orders * 10000 / order_book_total)
print("true need per customer          : " + str(true_need_per_customer))
print("fill rate during the shortage   : " + str(fill_rate_per_myriad) + " per ten thousand")
print("order each customer places      : " + str(order_each_customer_places) + ", to receive " + str(true_need_per_customer))
print("")
print("customers                       : " + str(customers))
print("true demand                     : " + str(true_demand_total))
print("order book                      : " + str(order_book_total))
print("phantom orders                  : " + str(phantom_orders))
print("phantom share of the book       : " + str(phantom_share_of_the_book_per_myriad) + " per ten thousand")
print("capacity built for              : " + str(capacity_built_for))
print("capacity idle once filled in full : " + str(capacity_idle_once_orders_are_filled_in_full))
print("")
print("the capacity response")
print("  order book : the real one, every order genuine")
print("  allocation : exactly half of every order, fairly")
print("  capacity plan : matches the book")
print("  intent : build enough to meet demand")
print("  orders miscounted : 0")
print("  verdict : THE BOOK SAYS 200000, BUILD 200000")
print("")
print("  reading the real book and allocating it exactly is the")
print("  part done right here, and it is why every customer got")
print("  precisely the fair share the rule promised")
print("")
print("ordering under rationing")
print("  what a customer knows : half of what is ordered arrives")
print("  what a customer needs : " + str(true_need_per_customer))
print("  so a customer orders : " + str(order_each_customer_places))
print("  what the book records : need doubled, for every customer")
print("  what the allocation rule did : made the doubling the")
print("    rational thing to do, then read it as demand")
print("")
print("after supply catches up")
print("  orders filled in full : every customer receives " + str(order_each_customer_places) + ",")
print("    needs " + str(true_need_per_customer) + ", cancels or returns the rest")
print("  capacity built : " + str(capacity_built_for))
print("  demand it serves : " + str(true_demand_total))
print("  capacity idle : " + str(capacity_idle_once_orders_are_filled_in_full))
print("  is the book wrong : no; every order on it was placed")
print("  is an order a unit of need : not when the customer wrote")
print("    it to survive the allocation rule")
print("")
nc_book_when_allocation_rewards_large_orders = 200000
nc_book_when_allocation_follows_past_consumption = 100000
nc_phantom_orders_the_change_removes = 100000
print("null control - allocate on past consumption, not order size")
print("  order book, allocation by order size : " + str(nc_book_when_allocation_rewards_large_orders))
print("  order book, allocation by past consumption : " + str(nc_book_when_allocation_follows_past_consumption))
print("  phantom orders the change removes : " + str(nc_phantom_orders_the_change_removes))
print("  no customer's need changed; inflating the order stopped")
print("  being the way to get what you need")
print("")
print("what an order-book capacity plan guarantees")
print("  capacity matches the orders placed : exactly, real book,")
print("    exact allocation")
print("  capacity matches what customers need : not addressed;")
print("    filling half of every order makes doubling the order")
print("    the rational move, so the book is " + str(order_book_total) + " for a need of")
print("    " + str(true_demand_total) + " and " + str(capacity_idle_once_orders_are_filled_in_full) + " of capacity goes idle when the shortage ends")
print("")
print("a number that people write in order to be treated fairly by a rule is a fact")
print("about the rule; the book doubled because the allocation halved, and building")
print("to the book is building to your own rationing")
print("")
print("It reads the real order book and allocates exactly half of every order - fair")
print("and precise. But customers who know half will arrive order double, so the book")
print("is " + str(order_book_total) + " for a true need of " + str(true_demand_total) + ", " + str(phantom_share_of_the_book_per_myriad) + " per ten thousand phantom, and")
print("" + str(capacity_idle_once_orders_are_filled_in_full) + " of built capacity idles once every order is filled in full.")

stdout (executed)

text
true need per customer          : 100
fill rate during the shortage   : 5000 per ten thousand
order each customer places      : 200, to receive 100

customers                       : 1000
true demand                     : 100000
order book                      : 200000
phantom orders                  : 100000
phantom share of the book       : 5000 per ten thousand
capacity built for              : 200000
capacity idle once filled in full : 100000

the capacity response
  order book : the real one, every order genuine
  allocation : exactly half of every order, fairly
  capacity plan : matches the book
  intent : build enough to meet demand
  orders miscounted : 0
  verdict : THE BOOK SAYS 200000, BUILD 200000

  reading the real book and allocating it exactly is the
  part done right here, and it is why every customer got
  precisely the fair share the rule promised

ordering under rationing
  what a customer knows : half of what is ordered arrives
  what a customer needs : 100
  so a customer orders : 200
  what the book records : need doubled, for every customer
  what the allocation rule did : made the doubling the
    rational thing to do, then read it as demand

after supply catches up
  orders filled in full : every customer receives 200,
    needs 100, cancels or returns the rest
  capacity built : 200000
  demand it serves : 100000
  capacity idle : 100000
  is the book wrong : no; every order on it was placed
  is an order a unit of need : not when the customer wrote
    it to survive the allocation rule

null control - allocate on past consumption, not order size
  order book, allocation by order size : 200000
  order book, allocation by past consumption : 100000
  phantom orders the change removes : 100000
  no customer's need changed; inflating the order stopped
  being the way to get what you need

what an order-book capacity plan guarantees
  capacity matches the orders placed : exactly, real book,
    exact allocation
  capacity matches what customers need : not addressed;
    filling half of every order makes doubling the order
    the rational move, so the book is 200000 for a need of
    100000 and 100000 of capacity goes idle when the shortage ends

a number that people write in order to be treated fairly by a rule is a fact
about the rule; the book doubled because the allocation halved, and building
to the book is building to your own rationing

It reads the real order book and allocates exactly half of every order - fair
and precise. But customers who know half will arrive order double, so the book
is 200000 for a true need of 100000, 5000 per ten thousand phantom, and
100000 of built capacity idles once every order is filled in full.

Trace event types

eml:run:starteml:assigneml:outputeml:run:done