// Numbas version: exam_results_page_options {"name": "Andrew's copy of Inventory analysis: constant demand", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [{"name": "Names", "variables": ["company_names", "company", "product_data", "chosen_product", "product", "products", "unit", "units"]}, {"name": "Costs", "variables": ["demand", "labour", "clean", "clerical", "order_cost", "price", "holding_rate", "holding_cost"]}, {"name": "Answers", "variables": ["eoq", "minimum_cost"]}], "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}%.

", "name": "Andrew's copy of Inventory analysis: constant demand", "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)} \\]

", "metadata": {"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.

"}, "extensions": [], "rulesets": {}, "functions": {}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "preamble": {"js": "", "css": ""}, "variables": {"company": {"definition": "random(company_names)", "name": "company", "templateType": "anything", "description": "", "group": "Names"}, "eoq": {"definition": "sqrt((2*order_cost*demand)/holding_cost)", "name": "eoq", "templateType": "anything", "description": "", "group": "Answers"}, "products": {"definition": "chosen_product[1]", "name": "products", "templateType": "anything", "description": "", "group": "Names"}, "clean": {"definition": "random(1..5)", "name": "clean", "templateType": "anything", "description": "", "group": "Costs"}, "clerical": {"definition": "random(1..3)", "name": "clerical", "templateType": "anything", "description": "", "group": "Costs"}, "price": {"definition": "random(4..12)", "name": "price", "templateType": "anything", "description": "", "group": "Costs"}, "labour": {"definition": "random(4..7)", "name": "labour", "templateType": "anything", "description": "", "group": "Costs"}, "minimum_cost": {"definition": "order_cost*demand/eoq + holding_cost/2 * eoq", "name": "minimum_cost", "templateType": "anything", "description": "", "group": "Answers"}, "unit": {"definition": "chosen_product[2]", "name": "unit", "templateType": "anything", "description": "", "group": "Names"}, "product": {"definition": "chosen_product[0]", "name": "product", "templateType": "anything", "description": "", "group": "Names"}, "units": {"definition": "chosen_product[3]", "name": "units", "templateType": "anything", "description": "", "group": "Names"}, "holding_cost": {"definition": "holding_rate*price", "name": "holding_cost", "templateType": "anything", "description": "", "group": "Costs"}, "holding_rate": {"definition": "random(0.05..0.3#0.01)", "name": "holding_rate", "templateType": "anything", "description": "", "group": "Costs"}, "order_cost": {"definition": "labour+clean+clerical", "name": "order_cost", "templateType": "anything", "description": "", "group": "Costs"}, "product_data": {"definition": "[\n [\"dog tiara\",\"dog tiaras\",\"unit\",\"units\"],\n [\"diesel\",\"diesel\",\"gallon\",\"gallons\"],\n [\"stinky cheese\",\"stinky cheese\",\"kg\",\"kg\"]\n]", "name": "product_data", "templateType": "anything", "description": "", "group": "Names"}, "company_names": {"definition": "[ \"ProdCo\", \"Amalgamated Things, Inc.\", \"Barker & Sons\" ]", "name": "company_names", "templateType": "list of strings", "description": "", "group": "Names"}, "demand": {"definition": "random(800..2500#50)", "name": "demand", "templateType": "anything", "description": "", "group": "Costs"}, "chosen_product": {"definition": "random(product_data)", "name": "chosen_product", "templateType": "anything", "description": "", "group": "Names"}}, "parts": [{"prompt": "

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

\n

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

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

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

\n

[[0]] {units}

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

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

\n

£[[0]]

", "scripts": {}, "showFeedbackIcon": true, "type": "gapfill", "marks": 0, "variableReplacements": [], "gaps": [{"precisionType": "dp", "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": false, "precision": "2", "variableReplacementStrategy": "originalfirst", "showPrecisionHint": false, "correctAnswerStyle": "plain", "minValue": "minimum_cost", "scripts": {}, "showFeedbackIcon": true, "type": "numberentry", "marks": 1, "variableReplacements": [{"part": "p1g0", "variable": "eoq", "must_go_first": false}], "strictPrecision": false, "precisionPartialCredit": 0, "showCorrectAnswer": true, "maxValue": "minimum_cost", "allowFractions": false, "precisionMessage": "You have not given your answer to the correct precision."}], "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst"}], "tags": [], "type": "question", "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}]}], "contributors": [{"name": "Andrew Dunbar", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/770/"}]}