This node is currently not available in KNIME v4.3 — instead we’re showing this page for **KNIME v4.2**. You can use the version menu in the title bar to permanently switch your preferred version. This will also show the link to the update site.

0 ×

**Market Simulation nodes by Scientific Strategy for KNIME - Community Edition** version **4.0.0.v202007040653** by **Decision Ready, LLC**

Market Simulation is designed to reproduce all of the dynamics of a Market. Hence any observation about a real-world Market can be used to help tune the Market Simulation so that it can make better predictions.

For example, if the Price and Market Share of the Competitor Products in a Market are known, then these measurements can be compared to a Market Simulation model. The Input Parameters of the Market Simulation that define the Vertical Differentiation and Horizontal Differentiation of Products in the Market can then be tuned.

Alternatively, if the precise Quantity Sold of Competitor Products is not known, then the Product Elasticity may be know. Product Elasticity is often calculated for eCommerce Products where a Competitor publishes their Prices but not how much Quantity they've sold. Instead, the Competitor will publish the fact that their Product is Out-of-Stock. When these Out-of-Stock events occur, the user can calculate how much additional Quantity they've sold themselves. This Product Elasticity can then be incorporated into a Tuning Loop.

The Feature Differentiation nodes, Product Generation node, and Simulate Market node can be placed between a 'Tuning Loop Start' node and a 'Tuning Loop End' node. A 'Quantity Error' representing the difference between the actual Quantity Sold and the simulated Quantity Sold can be calculated by the Simulate Market node. The Tuning Loop will then automatically adjust the Input Parameters to minimize the 'Quantity Error' and improve the accuracy of the predictions.

The Tuning Loop may also be used to optimize the sales of Products. For example, a Tuning Loop might be set up to find the Profit Maximizing Price (or Revenue Maximizing Price) of a Product. The Objective Function can be customized to suit the other goals of the user. For example, the user may wish to find a Profit Maximizing Price that does not decrease the amount of Quantity Sold.

There are several 'Optimization Methods' available in the Tuning Loop (the Optimization Method is set in the 'Tuning Loop Start' node):

● **Parameter Funnel**: (default) The Parameter Funnel algorithm will start by alternatively raising and lowering the Input Parameters by the 'Starting Adjustment Percentage'. For example, if the 'Starting Adjustment Percentage' is 20% then the Search Strategy will try raising and lowering each Input Parameter by 20% (relative to their Maximum Value and Minimum Value). The Input Parameters than improve the Objective Function will be kept. When no more improvement is possible, the Parameter Funnel algorithm will halve the 'Adjustment Percentage' and continue, so that now each Input Parameter will be altered by plus/minus 10%. Halving the 'Adjustment Percentage' is the same as incrementing the 'Tuning Adjustment Depth'. Reducing the 'Adjustment Percentage' from 20% to 10% will increase the 'Adjustment Depth' from 1 to 2. Tuning will stop after a user-defined 'Number of Tuning Adjustment' improvements, or after the Adjustment Depth has reached the 'Maximum Depth of Tuning Adjustments'.

● **Brute Force**: The Brute Force algorithm will test all possible combinations of Input Parameters and return the overall best results. The Brute Force algorithm will initially set the Input Parameter to be equal to the Start Value, then increment by Step Size until the Stop Value is reached.

● **Hill Climb**: The Hill Climb algorithm will initially set each Input Parameter to a random value between the Start Value and the Stop Value. The Hill Climb algorithm will then test each of the direct neighbors by incrementing and decrementing the Input Parameter by the Step Size. The best combination among the each of the neighbors then becomes the new start point for the next iteration. If no neighbor improves the Objective Function the Hill Climb algorithm terminates.

The specific role of the Tuning Loop End node is to determine whether the adjusted Input Parameters improves the Objective Function. The Objective Function is a Flow Variable that has been calculated by the user within the Tuning Loop and represents the tuning goal. For example, if the goal of the Tuning Loop is to improve the accuracy of the Market Simulation, then the Objective Function would be set to minimize the (weighted) 'Quantity Error' of all Products in the Market. Alternatively, if the goal of the Tuning Loop is to maximize the Profit of all Products sold by the Store, then the Objective Function would be set to sum the Product Profits then find the maximum.

**See Also:** 'Parameter Optimization Loop End' node in the 'KNIME Optimization Extension'.

**More Help:** Examples and sample workflows can be found at the Scientific Strategy website: www.scientificstrategy.com.

- Objective Function Flow Variable
- The name of the Flow Variable that was calculated by the user within the Tuning Loop. This Objective Function Flow Variable cannot be the same as an Input Parameter. If the Objective Function is to minimize 'Quantity Error' then the column of 'Quantity Error' values from the 'Simulate Market' node can be aggregated using a KNIME 'GroupBy' node and then converted into a Flow Variable using a 'Table Row to Variable' node.
- Objective Function Goal
- The goal of the Objective Function can be either to 'Minimize the Flow Variable' or to 'Maximize the Flow Variable'. The user would 'Minimize the Flow Variable' when trying to reduce the 'Quantity Error'. The user would 'Maximize the Flow Variable' when trying to find the optimal Price of Products.
- Save the Additional Tables
- The Input Product Array and Input WTP Matrix can be passed through by the Loop End Node at the end of the Tuning Loop. The state of these two additional tables can be either saved at the Optimization Point when the Objective Function has been reached, or at the last Loop Iteration.

- List of Output Flow Variables
- By default, the 'Output Test Results' table will only include details of the Input Parameters and the Objective Function. But additional Flow Variables from the Tuning Loop can be added to the Output Test Results. The additional Flow Variables to include can be selected here.

**Input Tuning Parameters [Flow Variables]**: The adjusted Input Parameters passed through the Tuning Loop as Flow Variables. These Input Parameters can be selected in the 'List of Output Flow Variables' (Advanced Tab) for collection at the end of each Loop Iteration. In addition, the 'Input Tuning Parameters' must include the following Flow Variables:**Objective Function**(double): The Flow Variable that was calculated by the user within the Tuning Loop. The Objective Function can have any name, but the name must be specified by the user in the 'Objective Function Flow Variable' Configuration Dialog. This Objective Function Flow Variable cannot be the same as an Input Parameter. If the Objective Function is to minimize 'Quantity Error' then the column of 'Quantity Error' values from the 'Simulate Market' node can be aggregated using a KNIME 'GroupBy' node and then converted into a Flow Variable using a 'Table Row to Variable' node.

**Input Product Array**: (optional) The 'Input Product Array' contains the set of Products after each Tuning Loop has been completed. This table is not used within the Tuning Loop and the incremental results are not collected each iteration. But the port is provided as a convenience to pass the final results down to the next stage of the Market Simulation after the Tuning Loop has finished. Any table can be injected into this port.**Input Willingness To Pay Matrix**: (optional) The 'Input WTP Matrix' contains the set of Virtual Customers and their associated WTP values after each Tuning Loop has been completed. This table is not used within the Tuning Loop and the incremental results are not collected each iteration. But the port is provided as a convenience to pass the final results down to the next stage of the Market Simulation after the Tuning Loop has finished. Any table can be injected into this port.

**Output Tuning Parameters**: The 'Output Tuning Parameters' contains the values of the best combination of 'Input Parameters' whose values have been adjusted and optimized by the Tuning Loop. In addition, the Output Tuning Parameters will contain these columns:**Objective Function**: The best Objective Function result after all the Input Parameters were optimized.

**Output Iteration Results**: The 'Output Iteration Results' lists all of the detailed Output Tuning Parameter test results calculated at each iteration in the Tuning Loop. The Output Iteration Results will contain these columns (additional columns containing the value of Flow Variables at the end of each iteration can be selected from the 'Advanced' tab in the Configuration Dialog):**List of Input Parameters**: The current values of all the Input Parameters updated whenever an alteration improved the Objective Function.**Objective Function**: The current value of the Objective Function after the Input Parameter was altered. If the New Objective Function is better than the Old Objective Function then the value of the Input Parameter will be retained.**Iteration**: The current iteration number of the Tuning Loop that increments each time the control is passed from the Tuning Loop End back to the Tuning Loop Start.**Adjustment Factor**: For the 'Parameter Funnel' algorithm, the Tuning Loop will alter each Input Parameter by plus/minus the 'Adjustment Percentage'. Each plus-adjustment and each minus-adjustment will be recorded on separate rows in the 'Output Test Results'. For the 'Brute Force' and 'Hill Climb' algorithms, the Adjustment Factor is the 'Step Size' of the latest Input Parameter being altered.**Adjustment Depth**: For the 'Parameter Funnel' algorithm, the current depth of change to the Input Parameters by the 'Adjustment Percentage'. The 'Adjustment Depth' starts at level 1 and increases whenever there are no more opportunities to improve the Objective Function using the current 'Adjustment Percentage'. When this happens, the Parameter Funnel algorithm halves the 'Adjustment Percentage' and then continues looking for opportunities to improve the Objective Function. For example, if the 'Adjustment Percentage' is 20% and all the opportunities to improve the Objective Function have been exhausted, then the Parameter Funnel will halve the 'Adjustment Percentage' to 10% and increment the 'Adjustment Depth' from 1 to 2. When the 'Maximum Depth of Tuning Adjustments' is reached (set in the Tuning Loop Start node) then the Tuning Loop will End. For the 'Brute Force' algorithm, the Adjustment Depth is the Tuning Loop Start node row of the latest Input Parameter being altered. For the 'Hill Climb' algorithm, the Adjustment Depth increments after a new improvement is found at the given depth and a collection of new points are queued for testing.**Improvement Count**: The accumulating number of improvements to the Adjusted Input Parameters.**List of Flow Variables**: The current values of the additional list of Flow Variables selected by the user to be included in the 'Output Test Results'. These additional Flow Variables can be selected in the 'Advanced' tab of the Tuning Loop End node Configuration Dialog.

**Output Product Array**: (optional) The 'Output Product Array' contains the final set of Products after the Tuning Loop has been completed. These tuned Products can then be further analyzed in downstream nodes. While the Tuning Nodes are typically used to optimize a Market Simulation, in fact any table can be output from this port. The state of the Input Product Array can be saved at either the Optimization Point or at the last Tuning Loop iteration.**Output Willingness To Pay Matrix**: (optional) The 'Output WTP Matrix' contains the final set of Virtual Customers and their associated WTP values after the Tuning Loop has been completed. While the Tuning Nodes are typically used to optimize a Market Simulation, in fact any table can be output from this port. The state of the Input WTP Matrix can be saved at either the Optimization Point or at the last Tuning Loop iteration.

- Product Generator (20 %)
~~Table Row to Variable~~(20 %) Deprecated~~Merge Variables~~(20 %) Deprecated- Tune Scenarios (20 %)
- Table Row to Variable (20 %)

- Line Chart (JFreeChart) (100 %)

- CN-161 Tuning Loop Start Node v05 (KNIME Hub)
- CN-162 Tuning Loop End Node v05 (KNIME Hub)
- CS-123 Cola Market 2015 Feature Tuning v05 (KNIME Hub)
- CS-132 SUV Market 2013 Feature Tuning v05 (KNIME Hub)
- MS-161 Stackelberg Leader-Follower Price Competition v05 (KNIME Hub)

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.

Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com, follow @NodePit on Twitter, or chat on Gitter!

Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.