36 EOQ Interactive Model
Figure 36.1 shows the annual costs against the order quantity for the parameters chosen with the sliders.
Economic Order Quantity
Explore how demand, ordering cost, and holding cost affect EOQ.
Figure 36.1 shows the annual costs against the order quantity for the parameters chosen with the sliders.
Economic Order Quantity
Explore how demand, ordering cost, and holding cost affect EOQ.
html`
<div class="eoq-formula">
Q* = √(2DS / H)
</div>
<div class="eoq-metrics">
<div class="eoq-metric">
<div class="eoq-number">
${Qstar.toFixed(1)}
</div>
<div class="eoq-label">
Optimal order quantity
</div>
</div>
<div class="eoq-metric">
<div class="eoq-number">
${orderingCost.toFixed(0)}
</div>
<div class="eoq-label">
Ordering cost
</div>
</div>
<div class="eoq-metric">
<div class="eoq-number">
${totalCost.toFixed(0)}
</div>
<div class="eoq-label">
Total relevant cost
</div>
</div>
</div>
`Plot.plot({
height: 400,
x: {
label: "Order quantity Q"
},
y: {
label: "Annual cost",
grid: true
},
marks: [
Plot.line(
costData,
{
x: "Q",
y: "ordering"
}
),
Plot.line(
costData,
{
x: "Q",
y: "holding"
}
),
Plot.line(
costData,
{
x: "Q",
y: "total",
strokeWidth: 3
}
),
Plot.ruleX(
[Qstar]
),
Plot.dot(
[{
Q: Qstar,
cost: totalCost
}],
{
x: "Q",
y: "cost",
r: 6
}
)
]
})