Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "VIATRA/DSE/UserGuide/BPMNExample"

< VIATRA‎ | DSE
m (Description of the problem)
(The BPMN example of the VIATRA-DSE framework)
Line 37: Line 37:
  
 
== Modeling the problem ==
 
== Modeling the problem ==
 +
 +
This section gives an idea how to model a design space exploration problem and prepare it for using the VIATRA-DSE framework.
  
 
=== Domain model ===
 
=== Domain model ===
  
=== Objectives ===
+
The first step it to model the domain in the Eclipse Modeling Framwork by creating a metamodel. A simplified metamodel of the BPMN domain can be found in the following figure. There is an existing EMF metamodel of the BPMN domain which is compatible with the OMG standard ([https://www.eclipse.org/bpmn2-modeler/ link]) but we wanted to keep it simple.
 +
 
 +
(insert image of the BPMN metamodel here)
 +
 
 +
 
 +
 
 +
The second step is to define the instance model (i.e. any business process workflow), the previously shown web shop example with the resource variants can be an ideal example for that. This will be the initial model of the exploration process.
  
 
=== Transformation rules ===
 
=== Transformation rules ===
 +
 +
The transformation rules specify how the exploration process can modify the initial model. For this example four rules is spcified, namely:
 +
* Assign a resource variant to a task
 +
** Condition: a ''task'' without resource variant and a ''resource variant'' of the task's required resource type
 +
** Operation: assign the resource variant to the task
 +
* Create resource instance
 +
** Condition: a ''resource variant''
 +
** Operation:: create a resource instance for the resource variant
 +
* Make a sequential task execution parallel
 +
** Condition: two sequential task, the first has exactly one out flow, the second has exactly one in flow
 +
** Operation: create two parallel gateway, organize flows
 +
* Make a parallel task execution sequential
 +
** Condition: two parallel task, which are between two gateways; the gateways don't have any more tasks between them
 +
** Operation: delete the two gateway, organize flows
 +
 +
=== Objectives ===
 +
 +
There are three main objectives and a fourth objective is defined to help the traversal strategies:
 +
* Average response time: The BPMN model is simulated by sending tokens through the system. It will be defined as a hard objective by checking if the simulation is executable and if not it won't be satisfied. In this case it will return an "infinite" number as this objective is to minimize. It is measured in millisecond.
 +
* Minimum resource utilization: Along the simulation utilization of the resource instances is also calculated averaged to resource variants and normalized to a number between 0 and 1. The minimum of this number will give the fitness value of this objective, which should be maximized.
 +
* Cost: Creating resource instances have costs depending on the resource type variant (see the table above) which should be minimized.
 +
* +1: This soft objective will guide the exploration to a valid solution (so it can be simulated) by checking for unassigned tasks and absence of required resource instances. The fitness value will be calculated by the following expression: (unassignedTasks*10) + (absenceOfResourceInstance*1) + (unrequiredResourceInstance*100), which should be minimized (to 0). Note that unassigned tasks has a higher weight to make it more important while unrequired resource instance is punished with a weight of 100.
 +
  
 
== Using the VIATRA-DSE framework ==
 
== Using the VIATRA-DSE framework ==
  
 
== Download the example ==
 
== Download the example ==

Revision as of 06:01, 5 March 2015

The BPMN example of the VIATRA-DSE framework

This page gives an introduction to the usage of the VIATRA-DSE framework based on the BPMN domain.

Description of the problem

As an example a simplified business process of a web shop is presented, see the image below. After authorization (i.e. the user is signed in) the request can be either about purchasing (e.g. editing user information, paying with a bank card, etc.) or about browsing items. In the later case recommendations are calculated in parallel with fetching item data and logging. All tasks need a particular resource either a web server, a SQL or a NoSQL database.

(insert web shop business process image here)

Resources can have multiple variants, which have different characteristics. For example the SQL and the NoSQL resources hava a second variant which perform better (i.e. they have shorter execution time) but has extra costs:

Resource Type Variant 1

(factor/cost)

Variant 2

(factor/cost)

Web server 1 / 1 -
SQL 1 / 3 0.75 / 5
NoSQL 1 / 3 0.75 / 5

The problem is to optimize the business process on response time, resource utilization and cost by assigning resource variants to each task and create enough resource instances for the variants' pools. Furthermore the business process can suffer from bad design which could pull back the performance of the system. For example, the Fetch data and Log tasks could be executed in parallel.

However, optimizing a process with respect to multiple objectives (e.g. response time, resource usage, etc.) is a time consuming and erroneous task. Running simulations with different parameters is required to find an optimal solution, while evaluating results to identify a promising configuration is essential. In addition, contradicting objectives may be present (e.g. increasing resource utilization can lead to reduced throughput) and design flaws could prevent better performance. VIATRA-DSE can automate the process to go through different design candidates and find the optimal one.

Modeling the problem

This section gives an idea how to model a design space exploration problem and prepare it for using the VIATRA-DSE framework.

Domain model

The first step it to model the domain in the Eclipse Modeling Framwork by creating a metamodel. A simplified metamodel of the BPMN domain can be found in the following figure. There is an existing EMF metamodel of the BPMN domain which is compatible with the OMG standard (link) but we wanted to keep it simple.

(insert image of the BPMN metamodel here)


The second step is to define the instance model (i.e. any business process workflow), the previously shown web shop example with the resource variants can be an ideal example for that. This will be the initial model of the exploration process.

Transformation rules

The transformation rules specify how the exploration process can modify the initial model. For this example four rules is spcified, namely:

  • Assign a resource variant to a task
    • Condition: a task without resource variant and a resource variant of the task's required resource type
    • Operation: assign the resource variant to the task
  • Create resource instance
    • Condition: a resource variant
    • Operation:: create a resource instance for the resource variant
  • Make a sequential task execution parallel
    • Condition: two sequential task, the first has exactly one out flow, the second has exactly one in flow
    • Operation: create two parallel gateway, organize flows
  • Make a parallel task execution sequential
    • Condition: two parallel task, which are between two gateways; the gateways don't have any more tasks between them
    • Operation: delete the two gateway, organize flows

Objectives

There are three main objectives and a fourth objective is defined to help the traversal strategies:

  • Average response time: The BPMN model is simulated by sending tokens through the system. It will be defined as a hard objective by checking if the simulation is executable and if not it won't be satisfied. In this case it will return an "infinite" number as this objective is to minimize. It is measured in millisecond.
  • Minimum resource utilization: Along the simulation utilization of the resource instances is also calculated averaged to resource variants and normalized to a number between 0 and 1. The minimum of this number will give the fitness value of this objective, which should be maximized.
  • Cost: Creating resource instances have costs depending on the resource type variant (see the table above) which should be minimized.
  • +1: This soft objective will guide the exploration to a valid solution (so it can be simulated) by checking for unassigned tasks and absence of required resource instances. The fitness value will be calculated by the following expression: (unassignedTasks*10) + (absenceOfResourceInstance*1) + (unrequiredResourceInstance*100), which should be minimized (to 0). Note that unassigned tasks has a higher weight to make it more important while unrequired resource instance is punished with a weight of 100.


Using the VIATRA-DSE framework

Download the example

Back to the top