// Numbas version: exam_results_page_options {"questions": [], "duration": 0, "name": "Inventory Analysis", "showQuestionGroupNames": false, "allQuestions": true, "percentPass": 0, "feedback": {"showanswerstate": true, "advicethreshold": 0, "showactualmark": true, "allowrevealanswer": true, "showtotalmark": true}, "shuffleQuestions": false, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Inventory analysis: constant demand", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [{"variables": ["company_names", "company", "product_data", "chosen_product", "product", "products", "unit", "units"], "name": "Names"}, {"variables": ["demand", "labour", "clean", "clerical", "order_cost", "price", "holding_rate", "holding_cost"], "name": "Costs"}, {"variables": ["eoq", "minimum_cost"], "name": "Answers"}], "variables": {"minimum_cost": {"templateType": "anything", "group": "Answers", "definition": "order_cost*demand/eoq + holding_cost/2 * eoq", "description": "", "name": "minimum_cost"}, "labour": {"templateType": "anything", "group": "Costs", "definition": "random(4..7)", "description": "", "name": "labour"}, "clerical": {"templateType": "anything", "group": "Costs", "definition": "random(1..3)", "description": "", "name": "clerical"}, "holding_cost": {"templateType": "anything", "group": "Costs", "definition": "holding_rate*price", "description": "", "name": "holding_cost"}, "chosen_product": {"templateType": "anything", "group": "Names", "definition": "random(product_data)", "description": "", "name": "chosen_product"}, "company_names": {"templateType": "list of strings", "group": "Names", "definition": "[ \"ProdCo\", \"Amalgamated Things, Inc.\", \"Barker & Sons\" ]", "description": "", "name": "company_names"}, "units": {"templateType": "anything", "group": "Names", "definition": "chosen_product[3]", "description": "", "name": "units"}, "holding_rate": {"templateType": "anything", "group": "Costs", "definition": "random(0.05..0.3#0.01)", "description": "", "name": "holding_rate"}, "company": {"templateType": "anything", "group": "Names", "definition": "random(company_names)", "description": "", "name": "company"}, "product_data": {"templateType": "anything", "group": "Names", "definition": "[\n [\"dog tiara\",\"dog tiaras\",\"unit\",\"units\"],\n [\"diesel\",\"diesel\",\"gallon\",\"gallons\"],\n [\"stinky cheese\",\"stinky cheese\",\"kg\",\"kg\"]\n]", "description": "", "name": "product_data"}, "products": {"templateType": "anything", "group": "Names", "definition": "chosen_product[1]", "description": "", "name": "products"}, "unit": {"templateType": "anything", "group": "Names", "definition": "chosen_product[2]", "description": "", "name": "unit"}, "price": {"templateType": "anything", "group": "Costs", "definition": "random(4..12)", "description": "", "name": "price"}, "product": {"templateType": "anything", "group": "Names", "definition": "chosen_product[0]", "description": "", "name": "product"}, "order_cost": {"templateType": "anything", "group": "Costs", "definition": "labour+clean+clerical", "description": "", "name": "order_cost"}, "eoq": {"templateType": "anything", "group": "Answers", "definition": "sqrt((2*order_cost*demand)/holding_cost)", "description": "", "name": "eoq"}, "demand": {"templateType": "anything", "group": "Costs", "definition": "random(800..2500#50)", "description": "", "name": "demand"}, "clean": {"templateType": "anything", "group": "Costs", "definition": "random(1..5)", "description": "", "name": "clean"}}, "ungrouped_variables": [], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"prompt": "

Set-up cost for each batch: £[[0]]

\n

Annual holding cost per {unit}: £[[1]]

", "scripts": {}, "gaps": [{"precisionPartialCredit": 0, "allowFractions": false, "correctAnswerFraction": false, "minValue": "order_cost", "maxValue": "order_cost", "precision": "2", "type": "numberentry", "precisionType": "dp", "showPrecisionHint": false, "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1}, {"precisionPartialCredit": 0, "allowFractions": false, "correctAnswerFraction": false, "minValue": "holding_cost", "maxValue": "holding_cost", "precision": "2", "type": "numberentry", "precisionType": "dp", "showPrecisionHint": false, "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

How much {product} should {company} produce in each batch? Round your answer to the nearest {unit}.

\n

[[0]] {units}

", "scripts": {}, "gaps": [{"precisionPartialCredit": 0, "allowFractions": false, "correctAnswerFraction": false, "minValue": "eoq", "maxValue": "eoq", "precision": 0, "type": "numberentry", "precisionType": "dp", "showPrecisionHint": false, "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

What is {company}'s minimum cost per year? Round your answer to the nearest penny.

\n

£[[0]]

", "scripts": {}, "gaps": [{"precisionPartialCredit": 0, "allowFractions": false, "correctAnswerFraction": false, "minValue": "minimum_cost", "maxValue": "minimum_cost", "precision": "2", "type": "numberentry", "precisionType": "dp", "showPrecisionHint": false, "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [{"part": "p1g0", "must_go_first": false, "variable": "eoq"}], "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "statement": "

The demand {company} receives for its {products} is $d = \\var{demand}$ {units} per year and is fairly constant throughout the year.

\n

The {product} is valued at £{price} per {unit} and is produced in batches. Each production run incurs the following costs:

\n\n

The costs of self-insurance and loss of investment income for money tied up in stock are rated at {holding_rate*100}%.

", "tags": ["MAS1901"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given constant demand for a product, calculate the economic order quantity, and the minimum cost per year.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a)

\n

The set-up cost for each batch is the sum of the labour, cleaning, and clerical costs:

\n

\\[ \\simplify[]{{labour} + {clean} + {clerical}} = \\var{order_cost} \\]

\n

The annual holding cost per {unit} is the product of the price per {unit} of {products} and the rated holding cost. That is,

\n

\\[ \\simplify[]{{price}*{holding_rate}} = \\var{holding_cost} \\]

\n

b)

\n

The economic order quantity is given by

\n

\\[ \\mathrm{EOQ} = \\sqrt{\\frac{2ad}{h}} \\]

\n

where $a = \\var{order_cost}$ is the set-up cost of each order, $d = \\var{demand}$ is the annual demand, and $h = \\var{holding_cost}$ is the annual holding cost per {unit}.

\n

Using the values calculated above, we have:

\n

\\[ \\mathrm{EOQ} = \\simplify[]{sqrt((2*{order_cost}*{demand})/{holding_cost})} = \\var{round(eoq)} \\, \\var{units} \\text{ (to the nearest }\\var{unit}\\text{)} \\]

\n

c)

\n

The minimum cost per year is given by 

\n

\\[ \\sqrt{2adh} = £\\var{precround(minimum_cost,2)} \\]

"}, {"name": "Inventory analysis: single price break point", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "variable_groups": [{"variables": ["company_names", "company", "product_data", "chosen_product", "product", "products", "unit", "units"], "name": "Names"}, {"variables": ["demand_range", "demand", "order_cost", "price_range", "price_low", "price_high", "holding_cost", "breakpoint", "breakpoint_equal_high", "breakpoint_equal_low"], "name": "Costs"}, {"variables": ["eoq", "total_cost", "total_cost_high", "total_cost_low", "r", "optimal_order_quantity"], "name": "Answers"}], "variables": {"price_range": {"templateType": "anything", "group": "Costs", "definition": "chosen_product[5]", "description": "", "name": "price_range"}, "total_cost_high": {"templateType": "anything", "group": "Answers", "definition": "let(q,round(eoq),\n price_high*demand+sqrt(2*holding_cost*order_cost*demand)\n)", "description": "", "name": "total_cost_high"}, "chosen_product": {"templateType": "anything", "group": "Names", "definition": "random(product_data)", "description": "", "name": "chosen_product"}, "price_low": {"templateType": "anything", "group": "Costs", "definition": "random(price_range)", "description": "

Price per unit when more than breakpoint units ordered

", "name": "price_low"}, "demand": {"templateType": "anything", "group": "Costs", "definition": "random(demand_range)", "description": "", "name": "demand"}, "product_data": {"templateType": "anything", "group": "Names", "definition": "[\n [\"paper\",\"paper\",\"roll\",\"rolls\", 100..900#25, 5..15#0.1],\n [\"pen\",\"pens\",\"box\",\"boxes\", 10..100#1, 3..8#0.05],\n [\"lubricant\",\"lubricant\",\"litre\",\"litres\", 1000..3000#50, 30..60#0.5],\n [\"paint\",\"paint\",\"can\",\"cans\",500..1000#10, 20..50#1],\n [\"wood plank\",\"wood planks\", \"metre\", \"metres\", 10000..20000#100, 1..5#0.05]\n]", "description": "

For each product:

\n", "name": "product_data"}, "unit": {"templateType": "anything", "group": "Names", "definition": "chosen_product[2]", "description": "

Singular form of the units the product comes in

", "name": "unit"}, "eoq": {"templateType": "anything", "group": "Answers", "definition": "sqrt((2*order_cost*demand)/holding_cost)", "description": "

Economic order quantity if the price is always price_high

", "name": "eoq"}, "total_cost": {"templateType": "anything", "group": "Answers", "definition": "min(total_cost_high,total_cost_low)", "description": "", "name": "total_cost"}, "breakpoint_equal_low": {"templateType": "anything", "group": "Costs", "definition": "(2*(total_cost_high-price_low*demand)-sqrt(4*(price_low*demand-total_cost_high)^2-8*holding_cost*order_cost*demand))/(2*holding_cost)", "description": "

The breakpoint which would make low-price and high-price orders cost the same. (lowest solution)

", "name": "breakpoint_equal_low"}, "holding_cost": {"templateType": "anything", "group": "Costs", "definition": "precround(random(0.4..0.8)*price_low,2)", "description": "", "name": "holding_cost"}, "total_cost_low": {"templateType": "anything", "group": "Answers", "definition": "let(q,breakpoint,\n price_low*demand + order_cost*demand/q + q*holding_cost/2\n)", "description": "", "name": "total_cost_low"}, "breakpoint_equal_high": {"templateType": "anything", "group": "Costs", "definition": "(2*(total_cost_high-price_low*demand)+sqrt(4*(price_low*demand-total_cost_high)^2-8*holding_cost*order_cost*demand))/(2*holding_cost)", "description": "

The breakpoint which would make low-price and high-price orders cost the same. (highest solution)

", "name": "breakpoint_equal_high"}, "price_high": {"templateType": "anything", "group": "Costs", "definition": "random(precround(price_low*1.01,1)..max(precround(price_low*1.1,1),price_low+0.1)#0.1 except price_low)", "description": "

Price per unit when fewer than breakpoint units ordered

", "name": "price_high"}, "company_names": {"templateType": "list of strings", "group": "Names", "definition": "[ \"ProdCo\", \"Amalgamated Things, Inc.\", \"Barker & Sons\", \"Quicko, Ltd.\", \"Q3R Services\" ]", "description": "", "name": "company_names"}, "units": {"templateType": "anything", "group": "Names", "definition": "chosen_product[3]", "description": "

Plural form of the units the product comes in

", "name": "units"}, "breakpoint": {"templateType": "anything", "group": "Costs", "definition": "ceil(max(round(eoq)+1,round(\n let(d,(breakpoint_equal_high-max(eoq,breakpoint_equal_low)),\n random(-1,1)*random(0.5..0.9#0.1)*d + breakpoint_equal_high\n )\n))/5)*5", "description": "

Pick a point on either side of the highest breakpoint which would make the low-cost and high-cost orders the same in total. This should make the probability that the low-cost option is preferable about 50%.

\n

Also make sure the breakpoint is bigger than the EOQ, which means the high-cost option is preferable slightly more often. (happens around 5% of the time)

", "name": "breakpoint"}, "r": {"templateType": "anything", "group": "Answers", "definition": "total_cost_low/total_cost_high", "description": "", "name": "r"}, "company": {"templateType": "anything", "group": "Names", "definition": "random(company_names)", "description": "", "name": "company"}, "products": {"templateType": "anything", "group": "Names", "definition": "chosen_product[1]", "description": "

Plural form of the name of the product

", "name": "products"}, "optimal_order_quantity": {"templateType": "anything", "group": "Answers", "definition": "if(total_cost_highSingular form of the name of the product

", "name": "product"}, "order_cost": {"templateType": "anything", "group": "Costs", "definition": "random(30..80)", "description": "", "name": "order_cost"}, "demand_range": {"templateType": "anything", "group": "Costs", "definition": "chosen_product[4]", "description": "

Range of values to pick the demand from

", "name": "demand_range"}}, "ungrouped_variables": [], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "functions": {}, "showQuestionGroupNames": false, "parts": [{"prompt": "

What is the economic order quantity? (Round your answer to the nearest whole number)

", "precisionPartialCredit": 0, "allowFractions": false, "correctAnswerFraction": false, "minValue": "eoq", "maxValue": "eoq", "precision": 0, "type": "numberentry", "precisionType": "dp", "showPrecisionHint": false, "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1}, {"prompt": "

Calculate the total cost per week when ordering the economic order quantity:

\n

(Round your answer to the nearest penny)

\n

£[[0]]

\n

", "scripts": {}, "gaps": [{"precisionPartialCredit": 0, "allowFractions": false, "correctAnswerFraction": false, "minValue": "total_cost_high", "maxValue": "total_cost_high", "precision": "2", "type": "numberentry", "precisionType": "dp", "showPrecisionHint": false, "strictPrecision": false, "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 1}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}, {"prompt": "

How many {units} of {products} should {company} order each time they run out of stock?

\n

[[0]] {units}

", "scripts": {}, "gaps": [{"allowFractions": false, "integerAnswer": true, "showCorrectAnswer": true, "minValue": "optimal_order_quantity", "integerPartialCredit": 0, "showPrecisionHint": false, "scripts": {}, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "marks": 1, "maxValue": "optimal_order_quantity"}], "type": "gapfill", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "statement": "

{company} uses {products} at a rate of {demand} {units} per week. Holding costs (storage, insurance, lost interest) amount to £{dpformat(holding_cost,2)} per {unit} per week. The cost of an order for more {products} is £{order_cost} (including book-keeping, transport and handling).

\n

The price of {products} is £{dpformat(price_high,2)} per {unit} for any order of less than {breakpoint} {units}, or £{dpformat(price_low,2)} if at least {breakpoint} {units} are ordered.

", "tags": ["MAS1901"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Given constant demand for a product, with a single break point on the price, calculate the economic order quantity, and the minimum cost per year.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

a)

\n

The economic order quantity is given by

\n

\\[ \\mathrm{EOQ} = \\sqrt{\\frac{2ad}{h}} \\]

\n

where $a = \\var{order_cost}$ is the set-up cost of each order, $d = \\var{demand}$ is the annual demand, and $h = \\var{holding_cost}$ is the annual holding cost per {unit}.

\n

Using the values given to us, we have:

\n

\\[ \\mathrm{EOQ} = \\simplify[]{sqrt((2*{order_cost}*{demand})/{holding_cost})} = \\var{round(eoq)} \\, \\var{units} \\text{ (to the nearest integer} \\]

\n

b)

\n

If {company} orders {round(eoq)} {units} each time they run out of stock, the total cost per week is

\n

\\[ \\var{latex(dpformat(price_high,2))} \\times d + \\sqrt{2had} = \\simplify[]{{precround(price_high,2)}*{demand} + sqrt(2*{holding_cost}*{order_cost}*{demand})} = £\\var{dpformat(total_cost_high,2)} \\]

\n

c)

\n

It's possible that if {company} increases their order to {breakpoint} units, they will benefit from the discounted price.

\n

The total cost per week for an order of {breakpoint} {units} is

\n

\\[ \\var{latex(dpformat(price_low,2))} \\times d + \\simplify[]{(a*d)/{breakpoint} + ({breakpoint}*h)/2} = \\simplify[]{{price_low}*{demand} + ({order_cost}*{demand})/{breakpoint} + ({breakpoint}*{holding_cost})/2} = £\\var{dpformat(total_cost_low,2)} \\]

\n

This is {if(total_cost_high>total_cost_low,'lower','higher')} than the total cost for an order of {round(eoq)} {units}, so {company} should order {optimal_order_quantity} {units} of {products} each time they run out of stock.

"}], "name": "", "pickQuestions": 0}], "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "

Determine the optimal frequency and size of orders given information about demand and prices.

"}, "type": "exam", "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "browse": true, "showresultspage": "oncompletion", "preventleave": true, "allowregen": true, "showfrontpage": true}, "timing": {"timedwarning": {"action": "none", "message": ""}, "timeout": {"action": "none", "message": ""}, "allowPause": true}, "pickQuestions": 0, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}], "extensions": [], "custom_part_types": [], "resources": []}