{
  "id": "P177",
  "slug": "stock-reorder",
  "key": "P177-stock-reorder",
  "title": "Stock reorder",
  "summary": "One item's reorder point set for a 5-day lead time when the supplier takes 10, a stock screen that counts units on a ship and units already promised, and a shortage in which every order doubles.",
  "entry": "main.eml",
  "ui": "terminal",
  "readme": "# P177 - Stock reorder\n\nOne item in a hardware shop's warehouse: its reorder point, its stock\nscreen, and a shortage.\n\n- `main.eml` - the menu, the item, a season at the new lead time, what can\n  be promised, the shortage's order book, and a lead time and point of\n  your own\n- `stock.eml` - demand by weekday, the order size, the lead times, the\n  point for a lead time, a season day by day, the screen and the shortage\n\nHow each part works:\n\n- A garden hose sells 40 a day on average, 60 on Saturdays and 10 on\n  Sundays. An order of 600 goes in when stock falls to the reorder point,\n  and arrives at the end of the day the lead time later.\n- As in the corpus case `the-lead-time-doubled-and-the-reorder-point-did-not`,\n  the point of 200 was 5 days of demand. The supplier now takes 10: over a\n  season of 120 days the shelf is empty on 35 days with the point\n  unchanged, and on 5 with it recomputed to 400 - every order fired on\n  time at its point. Even 400 covers only the average wait; points from\n  445 up cover the swing. With a wait longer than 15 days, one order of 600\n  at a time cannot keep up, whatever the point.\n- As in `the-stock-was-counted-and-the-promises-were-not`, the sales screen\n  shows 1,400: 1,000 on hand and 400 on a ship, with 300 of those on hand\n  already promised. 700 can be promised, and a day of new orders for 900\n  taken against the screen promises 200 that are not there.\n- As in `the-orders-doubled-because-half-would-be-filled`, a supplier that\n  fills 50% of every order gets 200 from each of 1,000 shops that need\n  100: a book of 200,000, half of it cancelled when supply catches up.\n\nWhat is checked: menu choices 1 to 6; a lead time from 1 to 30 days and a\nreorder point from 0 to 2000. An empty answer cancels.\n\nSessions: `sessions/basic.in` gives:\n- the item, the season, what can be promised and the shortage;\n- your own: points of 300 and 400 at 10 days, and 0 at 1 day.\n\n`sessions/bad-input.in` gives:\n- menu choices 0 and x;\n- lead times: a cancel, 0, 31 and x; points: a cancel, 2001 and x;\n- 30 days with a point of 2,000 (no point is enough), and 3 days with 50.\n\nBuilt on the verified corpus cases `the-lead-time-doubled-and-the-reorder-point-did-not`\n(a reorder point set for a 5-day lead time when the supplier takes 10),\n`the-stock-was-counted-and-the-promises-were-not` (a sales screen of stock\non hand and in transit) and `the-orders-doubled-because-half-would-be-filled`\n(a shortage allocated as half of every order).\n",
  "modules": [
    {
      "name": "main.eml",
      "eml": "# P177 stock reorder: one item's reorder point, its stock screen and a\n# shortage - the item, a season at the new lead time, what can be promised,\n# the shortage's order book, and a lead time and point of your own.\nimport stock\n\ndef plain(s):\n    0 => i\n    len(s) => j\n    while i < j and s[i] == \" \":\n        i + 1 => i\n    while j > i and s[j - 1] == \" \":\n        j - 1 => j\n    return s[i:j]\n\ndef pad(s, n):\n    s => out\n    while len(out) < n:\n        out + \" \" => out\n    return out\n\ndef lpad(s, n):\n    s => out\n    while len(out) < n:\n        \" \" + out => out\n    return out\n\ndef digits(t):\n    for c in t:\n        if c < \"0\" or c > \"9\":\n            return False\n    return len(t) > 0\n\ndef commas(n):\n    str(n) => s\n    \"\" => out\n    0 => k\n    len(s) => i\n    while i > 0:\n        if k == 3:\n            \",\" + out => out\n            0 => k\n        s[i - 1] + out => out\n        k + 1 => k\n        i - 1 => i\n    return out\n\ndef show_item():\n    \"A garden hose in a hardware shop's warehouse. It sells 40 a day on average: 35 on Monday, 40 on Tuesday and Wednesday, 45 on Thursday, 50 on Friday, 60 on Saturday and 10 on Sunday.\" ^0\n    (\"An order of \" + commas(stock.order_size()) + \" is placed when stock falls to the reorder point. The point, \" + str(stock.point_for(stock.old_lead())) + \", was set for the supplier's \" + str(stock.old_lead()) + \"-day lead time: \" + str(stock.old_lead()) + \" days of demand. The supplier now takes \" + str(stock.new_lead()) + \".\") ^0\n\ndef row(lead, point, note):\n    stock.season(lead, point) => s\n    (\"  \" + pad(str(lead) + \" days\", 11) + pad(str(point) + note, 22) + lpad(str(s[0]), 9) + lpad(commas(s[1]), 13) + lpad(str(s[2]), 8)) ^0\n\ndef show_season():\n    \"A season of 120 days from 800 in stock:\" ^0\n    (\"  \" + pad(\"lead time\", 11) + pad(\"reorder point\", 22) + lpad(\"days out\", 9) + lpad(\"units short\", 13) + lpad(\"orders\", 8)) ^0\n    row(stock.old_lead(), stock.point_for(stock.old_lead()), \"\")\n    row(stock.new_lead(), stock.point_for(stock.old_lead()), \", unchanged\")\n    row(stock.new_lead(), stock.point_for(stock.new_lead()), \", recomputed\")\n    stock.season(stock.new_lead(), stock.point_for(stock.old_lead())) => a\n    stock.season(stock.new_lead(), stock.point_for(stock.new_lead())) => b\n    (\"Every order fired on time at its point. With the point left at 5 days of demand, the shelf is empty on \" + str(a[0]) + \" days of the 120; recomputed for 10 days, on \" + str(b[0]) + \".\") ^0\n    \"Even the recomputed point runs out in a busy week: it covers the average wait, and Saturdays sell 60. Stock kept above the point for that swing is what covers it.\" ^0\n\ndef show_promise():\n    stock.screen() => s\n    s[0] + s[1] => shown\n    s[0] - s[2] => atp\n    (\"The sales screen shows \" + commas(shown) + \": \" + commas(s[0]) + \" on hand and \" + commas(s[1]) + \" on a ship. Of those on hand, \" + commas(s[2]) + \" are already promised to earlier orders.\") ^0\n    (\"Available to promise today: \" + commas(s[0]) + \" - \" + commas(s[2]) + \" = \" + commas(atp) + \", half of what the screen shows.\") ^0\n    (\"A day of new orders for 900, accepted against the screen, promises \" + commas(900 - atp) + \" units that are not there to deliver.\") ^0\n\ndef show_shortage():\n    stock.shortage() => s\n    s[0] * s[1] => need\n    int(s[1] * 100 / s[2]) => each\n    s[0] * each => book\n    (\"In a shortage the supplier fills \" + str(s[2]) + \"% of every order. \" + commas(s[0]) + \" shops each need \" + str(s[1]) + \": \" + commas(need) + \" in all.\") ^0\n    (\"Knowing half will be filled, each orders \" + str(each) + \": an order book of \" + commas(book) + \", and read as demand, capacity built for \" + commas(book) + \".\") ^0\n    (\"When supply catches up and every order is filled in full, \" + commas(book - need) + \" of the book is cancelled: half of it was never demand.\") ^0\n\ndef number(prompt, lo, hi):\n    plain(input(prompt + \" (\" + str(lo) + \" to \" + str(hi) + \")> \")) => t\n    if t == \"\":\n        \"Cancelled.\" ^0\n        return 0 - 1\n    if len(t) > len(str(hi)) or not digits(t) or int(t) < lo or int(t) > hi:\n        (\"Type a whole number from \" + str(lo) + \" to \" + str(hi) + \".\") ^0\n        return 0 - 1\n    return int(t)\n\ndef own():\n    number(\"lead time in days\", 1, 30) => lead\n    if lead < 0:\n        return\n    number(\"reorder point\", 0, 2000) => point\n    if point < 0:\n        return\n    stock.season(lead, point) => s\n    (\"A \" + str(lead) + \"-day lead time and a reorder point of \" + commas(point) + \": out of stock on \" + str(s[0]) + \" days of 120, \" + commas(s[1]) + \" units short, \" + str(s[2]) + \" orders.\") ^0\n    (\"A point of 40 a day times the lead time is \" + commas(stock.point_for(lead)) + \".\") ^0\n    if stock.point_for(lead) > stock.order_size():\n        (\"One order of \" + commas(stock.order_size()) + \" at a time cannot cover a wait that sells \" + commas(stock.point_for(lead)) + \": the shelf runs dry, whatever the point.\") ^0\n\n\"== Stock reorder ==\" ^0\n\"A reorder point, a stock screen and a shortage, each right by its own count.\" ^0\nTrue => running\nwhile running:\n    \"\" ^0\n    \"1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\" ^0\n    plain(input(\"choice> \")) => choice\n    if choice == \"1\":\n        show_item()\n    elif choice == \"2\":\n        show_season()\n    elif choice == \"3\":\n        show_promise()\n    elif choice == \"4\":\n        show_shortage()\n    elif choice == \"5\":\n        own()\n    elif choice == \"6\":\n        False => running\n    else:\n        \"Pick a number from 1 to 6.\" ^0\n\"Bye.\" ^0\n",
      "python": "import stock\n\ndef plain(s):\n    i = 0\n    j = len(s)\n    while i < j and s[i] == \" \":\n        i = i + 1\n    while j > i and s[j - 1] == \" \":\n        j = j - 1\n    return s[i:j]\n\ndef pad(s, n):\n    out = s\n    while len(out) < n:\n        out = out + \" \"\n    return out\n\ndef lpad(s, n):\n    out = s\n    while len(out) < n:\n        out = \" \" + out\n    return out\n\ndef digits(t):\n    for c in t:\n        if c < \"0\" or c > \"9\":\n            return False\n    return len(t) > 0\n\ndef commas(n):\n    s = str(n)\n    out = \"\"\n    k = 0\n    i = len(s)\n    while i > 0:\n        if k == 3:\n            out = \",\" + out\n            k = 0\n        out = s[i - 1] + out\n        k = k + 1\n        i = i - 1\n    return out\n\ndef show_item():\n    print(\"A garden hose in a hardware shop's warehouse. It sells 40 a day on average: 35 on Monday, 40 on Tuesday and Wednesday, 45 on Thursday, 50 on Friday, 60 on Saturday and 10 on Sunday.\")\n    print(\"An order of \" + commas(stock.order_size()) + \" is placed when stock falls to the reorder point. The point, \" + str(stock.point_for(stock.old_lead())) + \", was set for the supplier's \" + str(stock.old_lead()) + \"-day lead time: \" + str(stock.old_lead()) + \" days of demand. The supplier now takes \" + str(stock.new_lead()) + \".\")\n\ndef row(lead, point, note):\n    s = stock.season(lead, point)\n    print(\"  \" + pad(str(lead) + \" days\", 11) + pad(str(point) + note, 22) + lpad(str(s[0]), 9) + lpad(commas(s[1]), 13) + lpad(str(s[2]), 8))\n\ndef show_season():\n    print(\"A season of 120 days from 800 in stock:\")\n    print(\"  \" + pad(\"lead time\", 11) + pad(\"reorder point\", 22) + lpad(\"days out\", 9) + lpad(\"units short\", 13) + lpad(\"orders\", 8))\n    row(stock.old_lead(), stock.point_for(stock.old_lead()), \"\")\n    row(stock.new_lead(), stock.point_for(stock.old_lead()), \", unchanged\")\n    row(stock.new_lead(), stock.point_for(stock.new_lead()), \", recomputed\")\n    a = stock.season(stock.new_lead(), stock.point_for(stock.old_lead()))\n    b = stock.season(stock.new_lead(), stock.point_for(stock.new_lead()))\n    print(\"Every order fired on time at its point. With the point left at 5 days of demand, the shelf is empty on \" + str(a[0]) + \" days of the 120; recomputed for 10 days, on \" + str(b[0]) + \".\")\n    print(\"Even the recomputed point runs out in a busy week: it covers the average wait, and Saturdays sell 60. Stock kept above the point for that swing is what covers it.\")\n\ndef show_promise():\n    s = stock.screen()\n    shown = s[0] + s[1]\n    atp = s[0] - s[2]\n    print(\"The sales screen shows \" + commas(shown) + \": \" + commas(s[0]) + \" on hand and \" + commas(s[1]) + \" on a ship. Of those on hand, \" + commas(s[2]) + \" are already promised to earlier orders.\")\n    print(\"Available to promise today: \" + commas(s[0]) + \" - \" + commas(s[2]) + \" = \" + commas(atp) + \", half of what the screen shows.\")\n    print(\"A day of new orders for 900, accepted against the screen, promises \" + commas(900 - atp) + \" units that are not there to deliver.\")\n\ndef show_shortage():\n    s = stock.shortage()\n    need = s[0] * s[1]\n    each = int(s[1] * 100 / s[2])\n    book = s[0] * each\n    print(\"In a shortage the supplier fills \" + str(s[2]) + \"% of every order. \" + commas(s[0]) + \" shops each need \" + str(s[1]) + \": \" + commas(need) + \" in all.\")\n    print(\"Knowing half will be filled, each orders \" + str(each) + \": an order book of \" + commas(book) + \", and read as demand, capacity built for \" + commas(book) + \".\")\n    print(\"When supply catches up and every order is filled in full, \" + commas(book - need) + \" of the book is cancelled: half of it was never demand.\")\n\ndef number(prompt, lo, hi):\n    t = plain(input(prompt + \" (\" + str(lo) + \" to \" + str(hi) + \")> \"))\n    if t == \"\":\n        print(\"Cancelled.\")\n        return 0 - 1\n    if len(t) > len(str(hi)) or not digits(t) or int(t) < lo or int(t) > hi:\n        print(\"Type a whole number from \" + str(lo) + \" to \" + str(hi) + \".\")\n        return 0 - 1\n    return int(t)\n\ndef own():\n    lead = number(\"lead time in days\", 1, 30)\n    if lead < 0:\n        return\n    point = number(\"reorder point\", 0, 2000)\n    if point < 0:\n        return\n    s = stock.season(lead, point)\n    print(\"A \" + str(lead) + \"-day lead time and a reorder point of \" + commas(point) + \": out of stock on \" + str(s[0]) + \" days of 120, \" + commas(s[1]) + \" units short, \" + str(s[2]) + \" orders.\")\n    print(\"A point of 40 a day times the lead time is \" + commas(stock.point_for(lead)) + \".\")\n    if stock.point_for(lead) > stock.order_size():\n        print(\"One order of \" + commas(stock.order_size()) + \" at a time cannot cover a wait that sells \" + commas(stock.point_for(lead)) + \": the shelf runs dry, whatever the point.\")\n\nprint(\"== Stock reorder ==\")\nprint(\"A reorder point, a stock screen and a shortage, each right by its own count.\")\nrunning = True\nwhile running:\n    print(\"\")\n    print(\"1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\")\n    choice = plain(input(\"choice> \"))\n    if choice == \"1\":\n        show_item()\n    elif choice == \"2\":\n        show_season()\n    elif choice == \"3\":\n        show_promise()\n    elif choice == \"4\":\n        show_shortage()\n    elif choice == \"5\":\n        own()\n    elif choice == \"6\":\n        running = False\n    else:\n        print(\"Pick a number from 1 to 6.\")\nprint(\"Bye.\")\n"
    },
    {
      "name": "stock.eml",
      "eml": "# P177 stock reorder - one item in a hardware shop's warehouse. As in the\n# corpus case the-lead-time-doubled-and-the-reorder-point-did-not, the\n# reorder point was set to cover demand during a 5-day lead time, and the\n# supplier now takes 10. As in the-stock-was-counted-and-the-promises-were-\n# not, the stock on the sales screen counts units on a ship and units\n# already promised. And as in the-orders-doubled-because-half-would-be-\n# filled, a supplier that fills half of every order gets orders for twice\n# what is needed.\n\ndef demand(d):\n    # units sold on day d (day 1 is a Monday) when there is stock\n    return [35, 40, 40, 45, 50, 60, 10][(d - 1) % 7]\n\ndef order_size():\n    return 600\n\ndef old_lead():\n    return 5\n\ndef new_lead():\n    return 10\n\ndef point_for(lead):\n    # the reorder point that covers average demand, 40 a day, over a lead time\n    return 40 * lead\n\ndef season(lead, point):\n    # 120 days from 800 in stock: [days out of stock, units short, orders].\n    # An order is placed after a day's sales once stock is at the point, and\n    # arrives at the end of the day `lead` days later, after its sales.\n    800 => stock\n    0 => arrives\n    0 => out_days\n    0 => short\n    0 => orders\n    1 => d\n    while d <= 120:\n        demand(d) => want\n        if want > stock:\n            out_days + 1 => out_days\n            short + want - stock => short\n            0 => stock\n        else:\n            stock - want => stock\n        if arrives == d:\n            stock + order_size() => stock\n            0 => arrives\n        if stock <= point and arrives == 0:\n            d + lead => arrives\n            orders + 1 => orders\n        d + 1 => d\n    return [out_days, short, orders]\n\ndef screen():\n    # [on hand, on the ship, already promised]\n    return [1000, 400, 300]\n\ndef shortage():\n    # [shops, what each needs, the share of every order the supplier fills, in %]\n    return [1000, 100, 50]\n",
      "python": "def demand(d):\n    return [35, 40, 40, 45, 50, 60, 10][(d - 1) % 7]\n\ndef order_size():\n    return 600\n\ndef old_lead():\n    return 5\n\ndef new_lead():\n    return 10\n\ndef point_for(lead):\n    return 40 * lead\n\ndef season(lead, point):\n    stock = 800\n    arrives = 0\n    out_days = 0\n    short = 0\n    orders = 0\n    d = 1\n    while d <= 120:\n        want = demand(d)\n        if want > stock:\n            out_days = out_days + 1\n            short = short + want - stock\n            stock = 0\n        else:\n            stock = stock - want\n        if arrives == d:\n            stock = stock + order_size()\n            arrives = 0\n        if stock <= point and arrives == 0:\n            arrives = d + lead\n            orders = orders + 1\n        d = d + 1\n    return [out_days, short, orders]\n\ndef screen():\n    return [1000, 400, 300]\n\ndef shortage():\n    return [1000, 100, 50]\n"
    }
  ],
  "sessions": [
    {
      "name": "bad-input",
      "input": "0\nx\n5\n\n5\n0\n5\n31\n5\nx\n5\n10\n\n5\n10\n2001\n5\n10\nx\n5\n30\n2000\n5\n3\n50\n6\n",
      "screen": "== Stock reorder ==\nA reorder point, a stock screen and a shortage, each right by its own count.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 0\nPick a number from 1 to 6.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> x\nPick a number from 1 to 6.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> \nCancelled.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 0\nType a whole number from 1 to 30.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 31\nType a whole number from 1 to 30.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> x\nType a whole number from 1 to 30.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 10\nreorder point (0 to 2000)> \nCancelled.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 10\nreorder point (0 to 2000)> 2001\nType a whole number from 0 to 2000.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 10\nreorder point (0 to 2000)> x\nType a whole number from 0 to 2000.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 30\nreorder point (0 to 2000)> 2000\nA 30-day lead time and a reorder point of 2,000: out of stock on 58 days of 120, 2,195 units short, 4 orders.\nA point of 40 a day times the lead time is 1,200.\nOne order of 600 at a time cannot cover a wait that sells 1,200: the shelf runs dry, whatever the point.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 3\nreorder point (0 to 2000)> 50\nA 3-day lead time and a reorder point of 50: out of stock on 14 days of 120, 435 units short, 7 orders.\nA point of 40 a day times the lead time is 120.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 6\nBye.\n",
      "interpreter": "equal"
    },
    {
      "name": "basic",
      "input": "1\n2\n3\n4\n5\n10\n300\n5\n10\n400\n5\n1\n0\n6\n",
      "screen": "== Stock reorder ==\nA reorder point, a stock screen and a shortage, each right by its own count.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 1\nA garden hose in a hardware shop's warehouse. It sells 40 a day on average: 35 on Monday, 40 on Tuesday and Wednesday, 45 on Thursday, 50 on Friday, 60 on Saturday and 10 on Sunday.\nAn order of 600 is placed when stock falls to the reorder point. The point, 200, was set for the supplier's 5-day lead time: 5 days of demand. The supplier now takes 10.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 2\nA season of 120 days from 800 in stock:\n  lead time  reorder point          days out  units short  orders\n  5 days     200                           8          155       7\n  10 days    200, unchanged               35        1,210       5\n  10 days    400, recomputed               5          120       8\nEvery order fired on time at its point. With the point left at 5 days of demand, the shelf is empty on 35 days of the 120; recomputed for 10 days, on 5.\nEven the recomputed point runs out in a busy week: it covers the average wait, and Saturdays sell 60. Stock kept above the point for that swing is what covers it.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 3\nThe sales screen shows 1,400: 1,000 on hand and 400 on a ship. Of those on hand, 300 are already promised to earlier orders.\nAvailable to promise today: 1,000 - 300 = 700, half of what the screen shows.\nA day of new orders for 900, accepted against the screen, promises 200 units that are not there to deliver.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 4\nIn a shortage the supplier fills 50% of every order. 1,000 shops each need 100: 100,000 in all.\nKnowing half will be filled, each orders 200: an order book of 200,000, and read as demand, capacity built for 200,000.\nWhen supply catches up and every order is filled in full, 100,000 of the book is cancelled: half of it was never demand.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 10\nreorder point (0 to 2000)> 300\nA 10-day lead time and a reorder point of 300: out of stock on 22 days of 120, 755 units short, 6 orders.\nA point of 40 a day times the lead time is 400.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 10\nreorder point (0 to 2000)> 400\nA 10-day lead time and a reorder point of 400: out of stock on 5 days of 120, 120 units short, 8 orders.\nA point of 40 a day times the lead time is 400.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 5\nlead time in days (1 to 30)> 1\nreorder point (0 to 2000)> 0\nA 1-day lead time and a reorder point of 0: out of stock on 14 days of 120, 360 units short, 7 orders.\nA point of 40 a day times the lead time is 40.\n\n1) the item  2) a season  3) what can be promised  4) the shortage  5) a lead time of your own  6) quit\nchoice> 6\nBye.\n",
      "interpreter": "equal"
    }
  ],
  "builtOn": [
    {
      "slug": "the-lead-time-doubled-and-the-reorder-point-did-not",
      "caseId": "906-the-lead-time-doubled-and-the-reorder-point-did-not",
      "title": "The lead time doubled and the reorder point did not"
    },
    {
      "slug": "the-stock-was-counted-and-the-promises-were-not",
      "caseId": "910-the-stock-was-counted-and-the-promises-were-not",
      "title": "The stock was counted and the promises were not"
    },
    {
      "slug": "the-orders-doubled-because-half-would-be-filled",
      "caseId": "907-the-orders-doubled-because-half-would-be-filled",
      "title": "The orders doubled because half would be filled"
    }
  ],
  "updated": "2026-10-19"
}
