# FS Alpha Fixed Parameter Optimization Guide

# Question

The FS Alpha Fixed Parameter Scenario asks the question:

What is the optimal stocking level for the set of parameters:

`Purchase Cost`

: of**$20,000**`Sales Price`

:**$40,000**`Lead Time Days`

: 7**00**`Cost of Capital`

:**12%**`Expected Annual Demand`

: 5**Units**

Try out the fixed parameter demo by clicking the application link here:

Knowing the **Optimal Stocking Level** is nice, but seeing how we arrived at the answer is much better.

This gives us insight into the `value`

that the evaluated stocking levels provide.

This is particularly important since **marginal value**** **decreases** as the stocking level **increases**.**

**FS Alpha** provides the calculations associated with each step of the optimization process such that values associated with all the metrics calculated can be evaluated by planners.

## Guide by Example

Since abstract theory can get rather dry, we will look at one iteration of the optimization process.

Specifically we will look at moving from a `stocking level`

of `10`

units to a `stocking level`

of `11`

units and explain the calculations of the metrics:

`Number of Fills`

`Marginal Number of Fills`

`Profit`

`Marginal Profit`

`Inventory Cost`

`Marginal Inventory Cost`

`Net Profit`

`Marginal Net Profit`

When Marginal Net Profit turns negative, the optimal stocking level has been found.

Note that when comparing the result here, to the result in the app, the numbers may be slightly different due to more aggressive rounding here.

## Approach

In order to answer the optimal stocking level question we have to be able to do 2 things:

- Calculate the Marginal Inventory Cost of increasing the stocking level by 1 unit
- Calculate the Marginal Profit associated with the increase to the stocking level of 1 unit

So in other words, if we increase the stocking level by one unit, how much of an increase in profit do we expect to see?

Also, how much of an increase in inventory cost do we incur correspondingly by stocking one additional unit?

Once we have a model that allows us to calculate these things we can:

- Increase the stocking level by one unit
- Compare Marginal Inventory Cost to Marginal Profit

Increase stocking level by one unit again until Marginal Inventory Cost exceeds Marginal Profit.

At this point Marginal Net Profit is negative.

## Assumption

The assumption is that we will be employing an S, S-1 Inventory Policy. This is the type of inventory policy that is commonly used with long lead time, capital intensive, low demand service parts.

## Step 1: Calculating Lead Time Demand

The first thing FS Alpha needs to know is what the `lead time demand`

for the part is.

Our expected annual average demand is `5`

units, therefore the `expected average lead time demand`

is` 5* 365 / 700,`

or `9.58`

.

This is the average demand level we **expect** to see during the lead time for the part.

If we were to repeat each lead time period as an experiment 1000 times, we would see real demand values that fluctuate around this average, like 5, 11,15, 7, 3, and so on, and if we averaged out these numbers the value would be approximately **9.58**.

## Step 2: Creating the Demand Probability Distribution

In order to model the increase in the Number of Fills that we get from stocking one additional unit we need to create a Demand Probability Distribution around our mean demand level of **9.58**.

Firefly Semantics created it’s own distribution based on our research of models used in US Air Force applications.

Lets have a look at a section of the distribution with a mean demand of **9.58**.

`Demand Probability`

1 0.000

2 0.001

3 0.010

4 0.029

5 0.053

6 0.074

7 0.090

8 0.098

9 0.099

10 0.094

11 0.085

12 0.074

13 0.062

14 0.051

15 0.041

16 0.032

17 0.025

## Step 3: Calculating the Number of Fills

To get the Expected Number of Fills we sum the probabilities up to the stocking level we are considering and multiple that by the mean demand level.

`Demand Probability`

1 0.000

2 0.001

3 0.010

4 0.029

5 0.053

6 0.074

7 0.090

8 0.098

9 0.099

10 0.094

11 0.085

So the Expected Number of Fills for a stocking level of `10`

would be the sum of these values up to `[`

times **Demand 10 or the 0.94 value]**`9.58`

:

`.001 + 0.010 + 0.029 + 0.053 + 0.074 + 0.090 + 0.098 + 0.099 + 0.094) * 9.58 `

or

`0.548* 9.58`

or

`5.25`

Units Fulfilled.

So the Expected Number of Fills for a stocking level of `11`

would be the sum of these values up to `[`

times 9.58:**Demand 11 or the 0.85 value]**

`.001 + 0.010 + 0.029 + 0.053 + 0.074 + 0.090 + 0.098 + 0.099 + 0.094 + 0.085) * 9.58`

or

`0.633* 9.58`

or

`6.06`

Units Fulfilled.

The Marginal Fills going from a stocking level of `10`

to `11`

is `6.06-5.25`

or `0.81`

units.

We have calculated the `Units Fulfilled`

and the `Marginal Units Fulfilled`

. With that we can calculate:

## Step 4: Calculating Profit

The profit (That we expect to see over the cycle time period ) corresponding to a stocking level of `10`

units is:

`5.25 * 20,000 = $105,000 `

The `profit`

corresponding to `11`

units is:

`6.06 * 20,000 = $121,200`

The `marginal profit`

is:

`6.06-5.25 * 20,000 = 0.81 * 20,000 = $16,200 `

So the marginal profit we gain from moving from `10`

units to `11`

units is `0.81 * 20,000`

= `16,200`

.

## Step 5: Calculating Average Inventory Levels

The average inventory level for an S, S-1 inventory policy formula can also be found by clicking here. We’ve included the entire thing below for easy reference.

**Case: Lead Time Demand >= S**

When the `lead time demand`

is greater than or equal to the `initial stocking level (S)`

the formula for approximating expected average inventory level is:

`initialStockingLevel / (leadTimeDemand+1);`

The reason we add to `1`

to `leadTimeDemand`

in the denominator to cover the edge case where both the `initialStockingLevel`

and the `leadTimeDemand`

are 1.

So if the initial stocking level is 1, then the `expected average inventory`

level is `1/(9.58+1)`

.

**Case: Lead Time Demand < S**

`(initialStockingLevel - leadTimeDemand) + 0.5; `

So if the initial stocking level is `10`

then we get `(10–9.58) + 0.5 = 0.92`

.

So if the initial stocking level is `11`

then we get `(11–9.58) + 0.5 = 1.92`

.

## Step 6: Calculating Inventory Cost

If our Average Inventory Level is `0.92`

units and our `cost of capital`

is `12%`

then the inventory cost over the lead time period is:

`0.92 * 700/365 * 0.12 * 20,000`

Or `$4234.52`

If our Average Inventory Level is `1.92`

units and our `cost of capital`

is `12%`

then the inventory cost over the lead time period is:

`1.92 * 700/365 * 0.12 * 20,000`

Or `$8837.26`

The Marginal Inventory Cost incurred in moving from `10`

to `11`

units is:

`$8837.26-$4234.52`

or

`$4,602.74`

## Step 7: Comparing Marginal Profit to Marginal Inventory Cost

Our Marginal Profit was `$16,200`

. The marginal inventory cost is `$4,602.74`

. The Net Profit is:

`$16,200 - $4,602.74 = $11,597.26`

Thus our Net Profit is still positive and will continue to be so until we examine stocking `17`

units. At that point the marginal profit is so small that Net Profit turns negative.

Thus our `Optimal Stocking Level`

is `16`

units.

## Optimization Result CSV File

This is the CSV file that can be saved from the triple dot menu in the FS Alpha application. It shows each incrementation of stocking levels and the corresponding calculations.

Note that we get an assessment of the rate at which Net Profit decreases and we can use this number to decide what our stocking level should be for that part and how to go about doing budgeting for parts.

Note that the table includes additional metrics like Cycle Time which are there to aid the planners with inventory management decisions.

## Summary

This took us through one step in the evaluation of the FS Alpha Optimization Algorithm.

We can see that FS Alpha helps us evaluate profitability in the scenario that includes `demand level`

as a starting point.

FS Beta, which will be released soon, considers all possible demand levels and scores them by the probability of that demand scenario occurring.