Workflow Overview
This workflow shows a more flexible way to use a Recursive Loop to optimize Market KPIs.
The Market used in this loop is based upon the BB-101 Simple Monopoly, but the Recursive Loop itself is very powerful and can be adapted to any number of situations.
This Building Blocks example assumes you have already downloaded the open-source KNIME analytics platform and installed the free Market Simulation (Community Edition) plugin. If not, start by returning to Getting Started.
Downloads
Maximize Revenue
The Competitor wishes to maximize their Revenue KPI. A Recursive Loop is set up to test whether raising Price by 2% or lowering Price by 2% will result in more Revenue.
The loop is continued until neither raising nor lowering Price improves the KPI.

Product
Product Array
The Sprockets Products and its associated WTP Matrix is generated by the Customer Distributions node.

Simulate Market
Configuration
The Simulate Market node can be used to model a wider range of Markets where the actual number of Customers in the real-world is different to the number of Virtual Customers in the simulation.

Loop
Output
The improved Price calculated from the last iteration is returned to the beginning of the next iteration.

Change Price
Increase Price
A math formula is used to increase Price by 2%. A similar math formula is used at the bottom branch of the loop to decrease Price by 2%.

Test Price

Results
- Increase Price
- No Change in Price
- Decrease Price
Comparison
Decreasing Price would improve Quantity sold. Increasing Price would improve Profit. Maintaining the current iteration Price would maximize Revenue.

Optimize What?
Revenue
In this case, maximizing Revenue is the most important so the Price that results in the highest Revenue is sorted to the top.

Loop End
Iterations
The loop is configured to run up to 100 times or until the Revenue Maximizing Price is equal to ‘No Change’.
Loop Results
At each loop iteration, the Product Price drops from $150 to $147 to $144.06 all the way down to $86.94. The expected Quantity, Revenue, and Profit are all calculated.
Trends

Line Charts
Profit Trend
The decreasing Price iterates past the Profit Maximizing Price which occurs at $106.40. Recall that the ‘Profit Engine’ node used the Demand Curve to identify $105 as the Profit Maximizing Price.