BookmarkSubscribeRSS Feed
chcrai
SAS Employee

🏭 Manufacturing Use Case: Predictive Maintenance & Next-Best-Action

 

Decision Question
Based on live sensor data from a factory machine, what is the best maintenance action to take right now?

 

Use Case Scenario

A manufacturing company monitors three production lines: A, B, and C. Each line can have a status of Up, Down, or Idle.

A Random Forest model was developed in a Python Notebook (MS Fabric) using example data from Microsoft documentation. This example data was enhanced with synthetic AI-generated data to better reflect predictive maintenance scenarios.

 

How It Works

Data streams from IoT sensors are fed into a machine learning model that predicts the following:

  • Remaining useful life, or
  • Probability of failure within the next 24 hours.

The Decision Flow in SAS Decision Builder takes this prediction and applies rulesets to determine the next best action:

  • If failure probability > 80% and the production line is idleautomatically schedule emergency maintenance.
  • If probability is 40–80%create a standard work order for the next planned downtime.
  • Other tool wear and power events are considered using rules.

Completed Decision Flow

 

chcrai_13-1757968352164.png

 

Input/Output Variables

Random Forest Model (Training & Prediction)

The model consumes multiple IoT sensor readings and outputs a prediction (0 or 1).

Input/Output Variables for the Python Random Forest model training and prediction in MS Fabric

chcrai_0-1757951637290.png

 

Decision Flow Inputs

  • Air_temperature_K
  • Line_status
  • Process_temperature_K
  • Product_ID
  • Production_line
  • Rotational_speed_rpm
  • Tool_wear_level
  • Tool_wear_minutes
  • Torque_Nm
  • UDI

On the Decision Flow variables tab,  many outputs can be generated based on prediction model and rules. The user controls output variables.

chcrai_1-1757951731008.png

 

Branching

From the Random Forest model, output for prediction that is either 1 or 0. We can use this information in a logic branch to refine subsequent decision logic.

chcrai_7-1757433626195.png

 

There are other branches in the decision logic using line status to determine whether a given line in up, down or idle. Here is the “Line is Down” branch is used to branch on a yes/no path.  On the No path, another branch called “Line Status” is used to check if idle. The user may vary the branching logic for their prediction maintenance logic.

 

chcrai_14-1757968995894.png

 

 

Business Rulesets and Rules (A ruleset contains one or more rules. ) 

 

A business ruleset named production_line_idle is used to determine the status of production line A, B and C. Line A is shown below and rules for production lines B and C are the same respectively in this ruleset. It is considered a best practice to give rulesets and rules meaningful names.

chcrai_2-1757951993480.png

 

Rules checking for tool wear failure.

chcrai_8-1757966419735.png

 

Emergency maintenance rule. Use the model probability of failure combined with the line being idle.

chcrai_9-1757966503040.png

 

💡 Best Practice: Always use meaningful names for rulesets and rules for clarity and maintainability.

 

Run the decision flow in SAS Decision Builder 

chcrai_3-1757952104104.png

chcrai_10-1757434054687.png

 

View table (partial view here) in OneLake (this is where MS Fabric writes all your data)

From the model, when prediction = 1 => failure

chcrai_11-1757434355471.png

 

We can see in the result table, tool wear failure is captured using business rules. This is only an example and a customer can create whatever business logic is necessary for production.

chcrai_5-1757952270801.png

We can also see that one of the production lines is ready for Scheduled standard maintenance.

chcrai_6-1757952313468.png

There are also cases of power failure based on rule logic and an alert to review power failure and maintenance.

chcrai_7-1757952343302.png

 

Conclusion

The Predictive Maintenance – Next Best Action Flow demonstrates how manufacturers can combine machine learning with decision rules to automate maintenance scheduling.

Key takeaways:

  • ML predictions provide powerful insights, but rules capture operational nuances.
  • Decision flows can be customized per customer, aligning with production priorities.
  • This approach helps manufacturers minimize unplanned downtime while ensuring maintenance is scheduled effectively.
  • Any decision flow can be designed specifically and uniquely for any customer.
1 REPLY 1
KumarT_SAS
SAS Employee

Attached input data for predictive maintenance decision flow use case

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

Discussion stats
  • 1 reply
  • 930 views
  • 1 like
  • 2 in conversation