Wednesday, March 7, 2012

Dynamics AX 2012 Optimization – Product Builder: Change Model

Dynamics AX 2012 – Optimization Product Builder: Change Model

Purpose: The purpose of this document is to illustrate how Product Builder can be used in Dynamics AX 2012 to configure products. In this document the emphasis will be put on how to change existing model in case of changing business requirements.

Challenge: In Microsoft Dynamics AX 2012 new Product Configurator was introduced which will ultimately replace Product Builder in the next release. Product Configurator is a new Configurator solution which leverages Microsoft Solver Foundation engine. One of the reasons to introduce Product Configurator was to eliminate a need for Developer license in order to use Configurator capabilities of Microsoft Dynamics AX 2012, so functional users will be able to use Configurator efficiently. The challenge is to understand what it takes to change Product Builder model in case of changing business requirements and compare this effort against similar effort using Product Configurator.

Solution: Example of start-to-end Car configuration using Product Builder in Dynamics AX 2012 was described in previous walkthrough. In this document we introduce new business requirements and outline the steps required to change Product Builder model in order to satisfy these new business requirements.

Configuration Model:

Modeling Variable Name

Modeling Variable Value(s)

Type

"Sport Car", "Family Car", "Concept Car"

Package

"Deluxe", "Luxury", "Standard"

Frame

"Convertible", "Hatchback", "Sedan"

Engine

"A", "B"

Transmission

"Manual", "HalfAutomatic", "Automatic"

In this example Car is configured using 5 modeling variables such as Type, Package, Frame, Engine and Transmission. Each modeling variable has a set of possible values as depicted in the table above. Please note that one more Type = "Concept Car" was added along with new business requirements formulated later. The task will be to change the model appropriately in order to satisfy new business requirements.

Configuration Model Diagram:

image

In the configuration process client initially is supposed to provide input regarding Type of Car which he/she needs and what Package will have to be included. After that other Car specifications will be determined such as Frame, Engine and Transmission based on Configuration rules.

For example, Client says: "I need Deluxe Concept Car" and the system will have to ensure that valid combination of Car specifications is selected as the result of configuration.

On the Configuration Model Diagram you can see that certain modeling variables drive the selection of other modeling variables. For example, Type of Car is used to determine Transmission. Please see the full list of Configuration rules which were composed with knowledge of business domain (Automotive industry in this example). Please note that new Rule 9 and Rule 10 will be introduced because of changing business requirements.

Configuration Rules:

Rule 1: IF Package = "Deluxe" AND Frame = "Convertible" THEN Engine = "A"

Rule 2: IF Package = "Deluxe" AND Frame = "Hatchback" THEN Engine = "B"

Rule 3: IF Package = "Standard" AND Frame = "Convertible" THEN Engine = "A"

Rule 4: IF Engine = "A" THEN Transmission = "Manual"

Rule 4-1: IF Engine = "A" AND Type = "Concept Car" THEN Transmission = "Half-automatic"

Rule 4-2: IF Engine = "A" AND (Type = "Sport Car" OR Type = "Family Car") THEN Transmission = "Manual"

Rule 5: IF Engine = "B" THEN Transmission = "Automatic"

Rule 6: IF Type = "Sport Car" THEN Frame = "Convertible"

Rule 7: IF Type = "Family Car" THEN Frame = "Sedan"

Rule 8: IF Type = "Sport Car" THEN Transmission = "Manual"

Rules 1, 2 and 3 use Package and Frame to determine Engine. Rules 4 and 5 make decision about Transmission based on Engine. Rules 6 and 7 decide on Frame taking into account Type. And Rule 8 uses Type to determine Transmission.

Rule 9: IF Type = "Concept Car" THEN Frame = "Convertible"

Rule 10: IF Type = "Concept Car" THEN Transmission = "Half-automatic"

Please note that Rules 9 and 10 represent new business requirements which will have to be satisfied for the new Type = "Concept Car". Using Rules-based approach it may be required to revise and change existing rules in addition to introduction of new rules.

Let's imagine that Client wants "Deluxe Concept Car". So based on existing knowledge base we will go through the logical sequence of steps until we face with a contradiction which requires changes in rules base.

Step 1: IF Type = "Concept Car" THEN Frame = "Convertible" (Rule 9)

Step 2: IF Package = "Deluxe" AND Frame = "Convertible" THEN Engine = "A" (Rule 1)

Step 3: IF Engine = "A" THEN Transmission = "Manual" (Rule 4)

Step 4: IF Type = "Concept Car" THEN Transmission = "Half-automatic" (Rule 10)

It appears that there is a contradiction because based on Rule 4 Transmission = "Manual" and based on Rule 10 Transmission = "Half-automatic". That's why we will have to remove Rule 4 and create its more detailed variations as Rule 4-1 and Rule 4-2 to eliminate a contradiction. This will certainly make a rules base more complex.

Next step: We will change appropriate Modeling Variable for Product Configuration Model in Microsoft Dynamics AX 2012 in order to add new Type.

Modeling Variables

Modeling Variable Name

Base Type

Type

Enumerated Text

Package

Enumerated Text

Frame

Enumerated Text

Engine

Enumerated Text

Transmission

Enumerated Text

Modeling Variable = "Type" -> Outcomes

Next step: We will use Rules-based scenario to demonstrate how complex it may be to change a knowledge base to accommodate for new business requirements.

Using Rules-based approach we represented all Rules as Local Rules in Microsoft Dynamics AX 2012.

Please see created or changed Local Rules in relation to the appropriate rule below

Rule 4 - Remove: IF Engine = "A" THEN Transmission = "Manual"

Rule 4-1 - Add: IF Engine = "A" AND Type = "Concept Car" THEN Transmission = "Half-automatic"

Rule 4-2 - Add: IF Engine = "A" AND (Type = "Sport Car" OR Type = "Family Car") THEN Transmission = "Manual"

Rule 9 - Add: IF Type = "Concept Car" THEN Frame = "Convertible"

Rule 10 - Add: IF Type = "Concept Car" THEN Transmission = "Half-automatic"

Result

Please note that when you just open Configuration screen and you don't have any particular selections for modeling variables yet, absolutely all selections for all modeling variables will be available

Type

Package

Frame

Engine

Transmission

Now we can complete configuration process by making appropriate selections.

This is how the final result looks like

Type

Package

Frame

Engine

Transmission

Please note that when all appropriate selections were made Type has the only one valid selection left. This is because the system goes through the list of constraints (rules and table constraints) and eliminates invalid selections for particular modeling variables. In our example selections Type = "Sport Car" and Type = "Family Car" were eliminated by using deduction principle based on Rule 4-2 (Simple rule allows deduction) when I open Type drop down. The prerequisite for deduction principle to be applied based on particular rule is that all selections for participating modeling variables should be already made.

Rule 4-2: IF Engine = "A" AND (Type = "Sport Car" OR Type = "Family Car") THEN Transmission = "Manual"

Now I will represent Rule 4-2 as 2 rules for clarity: Rule 4-2-1 and Rule 4-2-2.

Rule 4-2-1: IF Engine = "A" AND Type = "Sport Car" THEN Transmission = "Manual"

Rule 4-2-2: IF Engine = "A" AND Type = "Family Car" THEN Transmission = "Manual"

When Engine = "A" and Transmission = "Half-automatic" (NOT "Manual") based on Rule 4-2 the system will eliminate Type = "Sport Car" and Type = "Family Car" from consideration so we will have the only Type = "Concept Car" left.

Please also note that the system evaluates rules every time when some changes are made to the selections of modeling variables. For example, when selection of Frame = "Convertible" is made with the selections of Type = "Concept Car", Package = "Deluxe" and Engine = "A" already in place the system will evaluate Rule 1, Rule 2, Rule 3, Rule 6, Rule 7 and Rule 9, because modeling variable Frame participates in these rules. Similarly when selection of Transmission = "Half-automatic" is made with all other selections for "Deluxe Concept Car" the system will evaluate Rule 4-1, Rule 4-2, Rule 5, Rule 8 and Rule 10.

You can download DAT/DEF file for Rules-based configuration (PB-AlexCar-Rules-Extended) here: https://skydrive.live.com/redir.aspx?cid=9c660ef56a3ba3f7&resid=9C660EF56A3BA3F7!111&parid=9C660EF56A3BA3F7!101&authkey=!ACa1ueZkALwWr1I

Summary: Product Builder is a flexible solution which can be used in Dynamics AX 2012 for configuring products. Product Builder allows you to implement Rules-based approach and Constraints-based approach for Product Models. However it is recommended to use new Product Configurator in Dynamics AX 2012 to configure products and services with more ease and efficiency. Please note that there is no need to have Developer license if you use Product Configurator. This document shows how complex it may be to introduce new business requirements into the model when using Rules-based approach. In similar walkthrough I will also explain how Product Configurator in Dynamics AX 2012 allows you to implement Rules-based approach and Constraints-based approach for Product Configuration Models.

Author: Alex Anikiev, PhD, MCP

Tags: Dynamics ERP, Dynamics AX 2012, Solver Foundation, Product Builder, Rules-based Configurator, Change Model.

Note: This document is intended for information purposes only, presented as it is with no warranties from the author. This document may be updated with more content to better outline the concepts and describe the examples.

Reference: "Constraint-based knowledge representation for configuration systems" by Boi Faltings and Rainer Weigel

Dynamics AX 2012 Optimization – Product Configurator: Change Model

Dynamics AX 2012 – Optimization Product Configurator: Change Model

Purpose: The purpose of this document is to illustrate how Product Configurator can be used in Microsoft Dynamics AX 2012 to configure products and services. In this document the emphasis will be put on how to change existing model in case of changing business requirements.

Challenge: In Microsoft Dynamics AX 2012 new Product Configurator was introduced which will ultimately replace Product Builder in the next release. Product Configurator is a new Configurator solution which leverages Microsoft Solver Foundation engine. One of the reasons to introduce Product Configurator was to eliminate a need for Developer license in order to use Configurator capabilities of Microsoft Dynamics AX 2012, so functional users will be able to use Configurator efficiently. The challenge is to understand what it takes to change Product Configurator model in case of changing business requirements and compare this effort against similar effort using Product Builder.

Solution: Example of start-to-end Car configuration using Product Configurator in Microsoft Dynamics AX 2012 was described in previous walkthrough. In this document we introduce new business requirements and outline the steps required to change Product Configurator model in order to satisfy these new business requirements.

Configuration Model:

Modeling Variable Name

Modeling Variable Value(s)

Type

"Sport Car", "Family Car", "Concept Car"

Package

"Deluxe", "Luxury", "Standard"

Frame

"Convertible", "Hatchback", "Sedan"

Engine

"A", "B"

Transmission

"Manual", "HalfAutomatic", "Automatic"

In this example Car is configured using 5 modeling variables such as Type, Package, Frame, Engine and Transmission. Each modeling variable has a set of possible values as depicted in the table above. Please note that one more Type = "Concept Car" was added along with new business requirements formulated later. The task will be to change the model appropriately in order to satisfy new business requirements.

Configuration Model Diagram:

image

In the configuration process client initially is supposed to provide input regarding Type of Car which he/she needs and what Package will have to be included. After that other Car specifications will be determined such as Frame, Engine and Transmission based on Configuration rules.

For example, Client says: "I need Deluxe Concept Car" and the system will have to ensure that valid combination of Car specifications is selected as the result of configuration.

On the Configuration Model Diagram you can see that certain modeling variables drive the selection of other modeling variables. For example, Type of Car is used to determine Transmission. Please see the full list of Configuration rules which were composed with knowledge of business domain (Automotive industry in this example). Please note that new Rule 9 and Rule 10 will be introduced because of changing business requirements.

Configuration Rules:

Rule 1: IF Package = "Deluxe" AND Frame = "Convertible" THEN Engine = "A"

Rule 2: IF Package = "Deluxe" AND Frame = "Hatchback" THEN Engine = "B"

Rule 3: IF Package = "Standard" AND Frame = "Convertible" THEN Engine = "A"

Rule 4: IF Engine = "A" THEN Transmission = "Manual"

Rule 5: IF Engine = "B" THEN Transmission = "Automatic"

Rule 6: IF Type = "Sport Car" THEN Frame = "Convertible"

Rule 7: IF Type = "Family Car" THEN Frame = "Sedan"

Rule 8: IF Type = "Sport Car" THEN Transmission = "Manual"

Rules 1, 2 and 3 use Package and Frame to determine Engine. Rules 4 and 5 make decision about Transmission based on Engine. Rules 6 and 7 decide on Frame taking into account Type. And Rule 8 uses Type to determine Transmission.

Rule 9: IF Type = "Concept Car" THEN Frame = "Convertible"

Rule 10: IF Type = "Concept Car" THEN Transmission = "Half-automatic"

Please note that Rules 9 and 10 represent new business requirements which will have to be satisfied for the new Type = "Concept Car". Using Constraints-based approach there is no need to change existing knowledge base because all we will have to do is to introduce new valid combinations of modeling variables in appropriate groups.

Next step: We will change appropriate Attribute type for Product Configuration Model in Microsoft Dynamics AX 2012 in order to add new Type.

Attribute types

Attribute Type Name

Base Type

Attribute Type Fixed List

CarType

Text

"Sport Car", "Family Car", "Concept Car"

CarPackage

Text

"Deluxe", "Luxury", "Standard"

CarFrame

Text

"Convertible", "Hatchback", "Sedan"

CarEngine

Text

"A", "B"

CarTransmission

Text

"Manual", "HalfAutomatic", "Automatic"

Attribute Type = "CarType"

Next step: We will use Constraints-based scenario to demonstrate how relatively easy it is to change a knowledge base to accommodate for new business requirements.

In order to use Constraints-based approach we represented Rules differently by grouping them into 4 groups. Rules 1, 2 and 3 will fall into 1st group which represents all valid combinations of Package, Frame and Engine. Rules 4 and 5 will form 2nd group which represents all valid combinations of Engine and Transmission. Rules 6 and 7 will be basis for 3rd group which represents all valid combinations of Type and Frame. And Rule 8 will represent 4th group with the only one valid combination of Type and Transmission defined at the moment.

Please see changed groups in relation to the corresponding rules below

Group 2: Engine-Transmission

Rule 4: IF Engine = "A" THEN Transmission = "Manual"

Rule 5: IF Engine = "B" THEN Transmission = "Automatic"

Engine

Transmission

A

Manual

B

Automatic

A

Half-automatic

Please note that I had to add one more valid combination "A - Half-automatic" to Group 2 Table corresponding to Engine-Transmission relationship with no Rule associated. This is because based on Rule 10 for Type = "Concept Car" it is valid to have Transmission = "Half-automatic", but in fact Engine-Transmission relationship doesn't even have a mention about Transmission = "Half-automatic". So if I don't define valid combination "A - Half-automatic" in Group 2 Table I will ultimately will not be able to select Type = "Concept Car".

Group 3: Type-Frame

Rule 6: IF Type = "Sport Car" THEN Frame = "Convertible"

Rule 7: IF Type = "Family Car" THEN Frame = "Sedan"

Rule 9: IF Type = "Concept Car" THEN Frame = "Convertible"

Type

Frame

Sport Car

Convertible

Family Car

Sedan

Concept Car

Convertible

Please note that I added one more valid combination "Concept Car - Convertible" to Group 3 Table corresponding to Type-Frame relationship based on Rule 9

Group 4: Type-Transmission

Rule 8: IF Type = "Sport Car" THEN Transmission = "Manual"

Rule 10: IF Type = "Concept Car" THEN Transmission = "Half-automatic"

Type

Transmission

Sport Car

Manual

Concept Car

Half-automatic

Please note that I added one more valid combination "Concept Car - Half-automatic" to Group 4 Table corresponding to Type-Transmission relationship based on Rule 10

Now let's translate this knowledge into Microsoft Dynamics AX 2012 terms by changing appropriate Table constraints (User defined). Please see changed Table constraints in relation to the original rules group below

Group2: Engine-Transmission

Group3: Type-Frame

Group4: Type-Transmission

Result

Please note that when you just open Configuration screen you have particular selections for some modeling variables already in place, this is because the system took into account valid combinations of modeling variables specified in Table constraints.

Type

Package

Frame

Engine

Transmission

Now we can complete configuration process by making appropriate selections.

This is how the final result looks like

Type

Package

Frame

Engine

Transmission

Please note that in Product Builder invalid selections will simply not show up in a dropdown and Product Configurator will still display invalid selections with Red circle indication. This makes a lot of sense for analysis because user will see that this selection is potentially available, but in current circumstances (with current selections of other modeling variables) it's not available at the moment. However this may also be overwhelming in the case of very big number of selections in a drop down vast majority of which are not available.

Please also note that when you start configuration process the system will compose XML configuration (attributes, constraints, etc) which will be sent to solver. Managed .NET control will orchestrate the configuration process working with constraints and update selections of modeling variables in UI appropriately. When configuration is completed final validation will be performed before the results of configuration will be introduced in Microsoft Dynamics AX 2012.

You can download XML file for Constraints-based configuration (PC-AlexCar-Constraints-Extended) here: https://skydrive.live.com/redir.aspx?cid=9c660ef56a3ba3f7&resid=9C660EF56A3BA3F7!110&parid=9C660EF56A3BA3F7!101&authkey=!ALJ3y9wD7_Ir8TE

Summary: Product Configurator is a very powerful solution which can be used in Dynamics AX 2012 for configuring products and services. Product Configurator allows you to implement Constraints-based approach for Product Configuration Models. This document shows how relatively easy new business requirements can be introduced into the model when using Constraints-based approach. In similar walkthrough I will also explain what it takes to introduce changes to Product Builder model in Dynamics AX 2012.

Author: Alex Anikiev, PhD, MCP

Tags: Dynamics ERP, Dynamics AX 2012, Solver Foundation, Product Configurator, Constraints-based Configurator, Change Model.

Note: This document is intended for information purposes only, presented as it is with no warranties from the author. This document may be updated with more content to better outline the concepts and describe the examples.

Reference: "Constraint-based knowledge representation for configuration systems" by Boi Faltings and Rainer Weigel