# FS Alpha Fixed Parameter Optimization | Guide

Ole Ersoy
May - 11  -  9 min

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

• `Purchase Cost`: \$20,000
• `Sales Price`: \$40,000
• `Lead Time Days`: 700
• `Cost of Capital`: 12%
• `Expected Annual Demand`: 5 Units

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:

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:

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 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 [Demand 10 or the 0.94 value] times `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 [Demand 11 or the 0.85 value] times `9.58`:

```.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.

According to the formula if the initial stocking level is `10` then we get:

`(10–9.58) + 0.5 = 0.92`

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.

## 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.