Showing posts with label Product Configurator. Show all posts
Showing posts with label Product Configurator. Show all posts

Wednesday, March 7, 2012

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

Monday, March 5, 2012

Dynamics AX 2012 Optimization – Product Configurator

Dynamics AX 2012 Optimization – Product Configurator

Purpose: The purpose of this document is to illustrate how Product Configurator can be used in Dynamics AX 2012 to configure products and services. In this document the emphasis will be put on how to build rules base or constraints base for particular business scenario to ensure that valid combination of modeling variables values is selected.

Challenge: In 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 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 Dynamics AX 2012, so functional users will be able to use Configurator efficiently. The challenge is to understand how Product Configurator can be effectively used to implement real world rules-based and constraint-based configuration scenarios.

Solution: Example of start-to-end Car configuration using Product Configurator in Dynamics AX 2012 will be described in this document. We start with definition of the problem and its formalization, and then continue with translating this knowledge into Dynamics AX 2012 terms and setting up the system appropriately, and end with working solution and the result.

Configuration Model:

Modeling Variable Name

Modeling Variable Value(s)

Type

"Sport Car", "Family 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. The task is to build rules base or constraints base for Car configuration scenario to ensure that valid combination of modeling variables values is selected.

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 Sport 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).

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.

Please note that certain modeling variable selection may be a result of different combinations of other modeling variables selections which is the case in complex business domains (such as Automotive industry).

Next step: We will define Product Configuration Model, Attributes and Attribute types, and design User Interface for Product Configuration Model in Dynamics AX 2012

Attribute types

Attribute Type Name

Base Type

Attribute Type Fixed List

CarType

Text

"Sport Car", "Family Car"

CarPackage

Text

"Deluxe", "Luxury", "Standard"

CarFrame

Text

"Convertible", "Hatchback", "Sedan"

CarEngine

Text

"A", "B"

CarTransmission

Text

"Manual", "HalfAutomatic", "Automatic"

Attribute Type = "CarType"

Attribute Type = "CarPackage"

Attribute Type = "CarFrame"

Attribute Type = "CarEngine"

Attribute Type = "CarTransmission"

Product Configuration Model

Attributes

Attribute Name

Attribute Type

Type

CarType

Package

CarPackage

Frame

CarFrame

Engine

CarEngine

Transmission

CarTransmission

User interface

Attribute Group

Attribute Name

Preferences

Type

Preferences

Package

Specifications

Frame

Specifications

Engine

Specifications

Transmission

To better organize configuration process all modeling variables will be divided into 2 groups: Preferences and Specifications. Preferences will represent client's initial requirements regarding Type of Car and Package to be included. Specifications group will represent physical characteristics of Car such as Frame, Engine and Transmission which will be defined based on initial client's requirements.

Next step: We will implement 2 options to illustrate Rules-based and Constraints-based approach in order to structure knowledge base. Option 1 implements Rules-based approach and Option 2 implements Constraints-based approach.

Option 1: Constraints (Rules base)

Using Rules-based approach all Rules can be represented as Expression constraints in Dynamics AX 2012. Please see all Expression constraints in relation to the original rule below

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"

Option 1: Result

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

Type

Package

Frame

Engine

Transmission

The exceptions are Frame = "Hatchback" and Transmission = "Half-automatic" which were filtered out because of lack of relevant rules.

However when you specify client's requirements "Deluxe Sport Car" the system will automatically filter out all inappropriate selections and the final result will look like the following

Please note that after you have selected Type = "Sport Car" and Package = "Deluxe" the only one selection for each modeling variable will remain available based on existing rules

Type

Package

Frame

Engine

Transmission

Please note that every time you change selection for particular modeling variable the system sends current configuration to Solver for analysis and then adjusts selections for all related modeling variables in real time. Red circle is your indication that particular selection for modeling variable is not available within current configuration.

Also please note that using Rules-based approach the system implements deduction principle based on existing rules. For example, when you specify Transmission = "Manual" the system will know that Engine = "A" based on Rule 4

Rule 4: IF Engine = "A" THEN Transmission = "Manual" (forward chaining)

Type

Package

Frame

Engine

Transmission

And vice versa when you specify Engine = "A" the system will know that Transmission = "Manual" based on Rule 4

Rule 4*: IF Transmission = "Manual" THEN Engine = "A" (backward chaining)

Type

Package

Frame

Engine

Transmission

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

Option 2: Table Constraints

In order to use Constraints-based approach we will have to represent 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.

Group 1: Package-Frame-Engine

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"

Package

Frame

Engine

Deluxe

Convertible

A

Deluxe

Hatchback

B

Standard

Convertible

A

Please note that I substituted Rules 1, 2 and 3 with Group 1 Table representing all valid combinations of Package-Frame-Engine

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

Please note that I substituted Rules 4 and 5 with Group 2 Table representing all valid combinations of Engine-Transmission

Group 3: Type-Frame

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

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

Type

Frame

Sport Car

Convertible

Family Car

Sedan

Please note that I substituted Rules 6 and 7 with Group 3 Table representing all valid combinations of Type-Frame

Group 4: Type-Transmission

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

Type

Transmission

Sport Car

Manual

Please note that I substituted Rule 8 with Group 4 Table representing valid combination of Type-Transmission

The difference between Rules-based approach and Constraints-based approach is that instead of expressing the rules in form of conditions and conclusions (Rules-based approach) I'm expressing relations between modeling variables and valid modeling variables value combinations (Constraints-based approach).

Using Constraints-based approach all Rules can be represented as Table constraints (User defined) in Dynamics AX 2012. Please see all Table constraints in relation to the original rules group below

Group1: PackageFrameEngine

Group2: Engine-Transmission

Group3: Type-Frame

Group4: Type-Transmission

Option 2: Constraints (Constraints base)

After we set up Table constraints we can link them to our Product Configuration Model

For all Product Configuration Model Table constraints we have to define the relation between Column name in the original Table constraint and Product Configuration Model Attribute name.

Group1: Package-Frame-Engine

Group2: Engine-Transmission

Group3: Type-Frame

Group4: Type-Transmission

Option 2: Result

Please note that when you just open Configuration screen you have particular selections for almost all modeling variables already in place, this is because the system took into account valid combinations of modeling variables specified in Table constraints. Moreover based on current Table constraints the only 2 combinations of 5 modeling variables are available. They are {Type = "Sport Car", Package = "Deluxe", Frame = "Convertible", Engine = "A", Transmission = "Manual"} and {Type = "Sport Car", Package = "Standard", Frame = "Convertible", Engine = "A", Transmission = "Manual"}.

Type

Package

Frame

Engine

Transmission

Let's explain why the only 2 combinations of 5 modeling variables are available based on current Table constraints at the moment. In order to explain this I will get back to 4 groups defined earlier which represent knowledge base.

Group 1: Package-Frame-Engine

Package

Frame

Engine

Deluxe

Convertible

A

Deluxe

Hatchback

B

Standard

Convertible

A

Group 2: Engine-Transmission

Engine

Transmission

A

Manual

B

Automatic

Group 3: Type-Frame

Type

Frame

Sport Car

Convertible

Family Car

Sedan

Group 4: Type-Transmission

Type

Transmission

Sport Car

Manual

Please note that each Group represents valid combinations of modeling variables. Please also note that certain modeling variables are used multiple times in different groups which means that we can reduce number of groups by combining them together and making sure that selections of "shared" modeling variables in different groups will be the same as we add a combination into new "super" group.

Iteration 1: Combine Group 1 and Group 2 into Group 1-2 by "shared" modeling variable "Engine"

Group 1-2: Package-Frame-Engine-Transmission

Package

Frame

Engine

Transmission

Deluxe

Convertible

A

Manual

Deluxe

Hatchback

B

Automatic

Standard

Convertible

A

Manual

Iteration 2: Combine Group 1-2 and Group 3 into Group 1-2-3 by "shared" modeling variable "Frame"

Group 1-2-3: Package-Frame-Engine-Transmission-Type

Package

Frame

Engine

Transmission

Type

Deluxe

Convertible

A

Manual

SportCar

Standard

Convertible

A

Manual

SportCar

Iteration 3: Combine Group 1-2-3 and Group 4 into Group 1-2-3-4 by "shared" modeling variables "Type" and "Transmission"

Group 1-2-3-4: Package-Frame-Engine-Transmission-Type

Package

Frame

Engine

Transmission

Type

Deluxe

Convertible

A

Manual

SportCar

Standard

Convertible

A

Manual

SportCar

Group 1-2-3-4 Table represents all valid combinations of 5 modeling variables

As the result we have only 2 valid combinations of 5 modeling variables which is exactly what was available on Configuration screen

You can download XML file for Constraints-based configuration (PC-AlexCar-Constraints) 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 Rules-based approach and Constraints-based approach for Product Configuration Models. In similar walkthrough I will also explain how Product Builder in Dynamics AX 2012 allows you to implement Rules-based approach and Constraints-based approach for Product Models.

Author: Alex Anikiev, PhD, MCP

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

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