[The manual for the New ION Experience has been released.](https://docs.firstresonance.io/)

For the complete documentation index, see [llms.txt](https://manual.firstresonance.io/llms.txt). This page is also available as [Markdown](https://manual.firstresonance.io/plans-and-autoplan/autoplan.md).

### What is Autoplan?

Autoplan is IONs **Material Requirements Planning** engine to calculate the tasks required (plan items) to build end products (plan inputs). It is an automated planner for your factory.

Below shows an overview of plans.

1. backward schedules demand from the plan input **Need by** date

2. allocates existing and active supply in the factory (inventory, purchase orders, and runs) to those demands

- Supply is allocated in the order of:
     - Inventory first
     - Purchase orders/runs based on highest percentage complete
     - Primary parts allocated before substitute parts

3. generates plan items

The main inputs for Autoplan are:

- plan inputs (master schedules) on plans with **include in MRP** set to true and a status of in progress or scheduled
- part properties
  - mBOMs
  - part lead times
- existing/active supply
  - open purchase order lines (status is not received or cancelled)
  - open runs (status is not complete, cancelled, or archived)
  - inventories with a quantity > 0 that are not on open purchase orders or runs

Accurate data is required on these inputs to ensure Autoplan generates accurate results.

Autoplan is currently an infinite capacity model, which means that it does not consider resource constraints, but it will in the near future.

#### Substitutes

Autoplan will allocate substitute supply if is available. Substitutes get defined in the manufacturing bill of material (mBOM). Supply for substitutes will always get allocated in the order of the primary part first and then the substitute. The goal is to use existing supply as efficiently as possible.

#### How does it work?

When Autoplan is creating demand for child components, it will use the latest released mBOM version when an mBOM is released, otherwise, it will use the latest mBOM version in draft.

Take for example the mBOM below. When a new plan item is generated for Assembly A, it will also create demand for x1 Part B and x2 Part Cs.

| Quantity | Part        |
|----------|-------------|
| x1       | Part B     |
| x2       | Part C     |

The exception to this is when a run for Assembly is allocated. Instead of using the mBOM to drive demand, it will use the aBOM.

As soon as parts are installed for B or C, the demand will disappear from Autoplan. This is done because the plan data only reflects work that is in progress or remaining.

### How is Autoplan triggered?

Autoplan can be run by clicking the **Run MRP** button on the plan search page.

### Let's do an example!

#### Step 1: Create the plan

- Make sure that the plan is **Included in MRP**
- Set a need date for your top level part
  - Here we're saying that we want x1 of _MRP test part 1_ completed for 6/17/21
- Set the plan status to **In progress**

#### Step 2: Setup part properties

For the below parts, note the lead time and mBOM:

- _MRP test part 1_
  - lead time: 10 days
  - child part: MRP test part 2
- _MRP test part 2_
  - lead time: 20 days
  - child part: MRP test part 3
- _MRP test part 3_
  - lead time: 30 days

**Step 3: Run MRP and view results**

- The date of the last completed MRP job is displayed
- The dates for the plan items are generated based on the backwards schedule from the plan input.

### Example #2

Now let's throw some supply in the mix by creating inventory for _MRP test part 2_:

After creating the inventory and running MRP again, new results will be generated.
