Many users prefer to store parameters like amount and duration in the integrated (or an external) Excel Workbook, instead of parameterizing the recipe via the dialogs. Operations are then parameterized during the simulation from a control for a Parameter Event. In many simulation models, a recipe is executed many times with exactly the same parameters. Instead of setting the duration of an operation anew for every batch and every order, it has been possible since INOSIM Version 2025 to parameterize the Recipe Operations during the Simulation Init procedure.
What is the difference between Recipe Operations and Order Operations?
In INOSIM, a Master Recipe consists of one (or several) Recipe Procedures, which themselves consist of one (or several) sequences of Recipe Operations. When an order is scheduled and become ready to start, INOSIM creates Procedure Instances from the Recipe Procedures. Once a Procedure Instance has allocated a unit, an Order Procedure is created, which consists of Order Operations. These Order Operations are copies of the original Recipe Operation elements and are executed on the allocated unit. Using a Parameter event control the parameters of Order Operations can be changed (cop variable), while the parameters of the Recipe Operation cannot be changed (mop variable).
A Master Recipe with its Recipe Procedures and Recipe Operations is described as a master batch record in the industry, holds all relevant production instructions and is the basis for the batch record. The Order with its Order Procedures and Order Operations is the batch record, which precisely documents how one batch has been produced.
How to write into Recipe Operations
With INOSIM 2025 it became possible to parameterize Recipe Operations during the Simulation Init procedure. Instead of setting the same properties 1000 times (for every Order Procedure), just do it once at the beginning of the simulation. Of course, you can still overwrite the parameters of Order Operations in the Parameter event, e.g., to model that a certain operation takes longer on a Monday morning.
The following code is an example of how you can set properties of Recipe Operations in the Simulation Init. Feel free to extend it for further operation types and other properties.
Sub Set_RecipeOperation_Parameters(rec As Recipe)
'called from Simulation_Init
Dim row_index As String
Dim rp As RecipeProcedure, ro As RecipeOperation
Dim res As RecipeResource
For Each rp In rec.RecipeProcedures
For Each ro In rp.RecipeOperations
row_index = rp.Name & "_" & ro.Name
Select Case ro.Type
Case OperationType.opEnd, OperationType.opStart
Continue For
Case OperationType.opSimpleInflux
ro.Amount = t_parameters(row_index, "Amount [kg]")
ro.SourceSinkUnits = Units("Source")
Case OperationType.opSimpleOutflux
ro.Amount = t_parameters(row_index, "Amount [kg]")
ro.SourceSinkUnits = Units("Sink")
Case OperationType.opStartTransfer
ro.Duration = t_parameters(row_index, "Duration [h]") * 3600
Case OperationType.opSimpleTransfer
ro.Amount = t_parameters(row_index, "Amount [kg]")
ro.Duration = t_parameters(row_index, "Duration [h]") * 3600
If ro.Amount > 0 Then
ro.SourceSinkUnits = Units("Source")
ElseIf ro.Amount < 0 Then
ro.SourceSinkUnits = Units("Sink")
Else
ro.AmountType = AmountType.amNull
End If
Case OperationType.opProcess, OperationType.opClean, OperationType.opAnalyze, OperationType.opSetup
ro.Duration = t_parameters(row_index, "Duration [h]") * 3600
End Select
If Not t_parameters(row_index, "Res1") Is Nothing Then
res = New RecipeResource
res.Resources = Resources(t_parameters(row_index, "Res1"))
res.Amount = t_parameters(row_index, "Res1 Amount")
res.Allocation = t_parameters(row_index, "Res1 Allocation")
ro.RecipeResources.Add res
End If
Next
Next
End Sub
The Advantage
The idea is that reducing the number of calls to parameter controls will decrease the runtime of the simulation model. The impact on a single simulation run is relatively small and, of course, depends on the computer and model used. Since the speed-limiting step on modern systems is less the computational power and more the writing speed to the database, speed gains of only a few percentage points are to be expected. However, in use cases where writing to the database is omitted (statistical analysis, optimization), the benefit is significant. In a brief internal test, the demo model described below was used for a statistical analysis with 40 runs. There, the direct parameterization of the recipe operations reduced the total runtime from just under 3 minutes to 45 seconds.
The Demo Model
The demo model available in the download area lets you compare three options (by selecting experiments):
- Set OrderOperations
- Set Recipe Operations from Table
- Set Recipe Operations from Workbook
All experiments will simulate one order with 1000 batches of a given recipe.
Option 1 and 2 will use a table object for the recipe parameters, Option 3 will read the data directly from the Parameters Workbook with the new WorkbookXML feature in INOSIM 2026. To test it, please activate the setting in the project properties and uncomment the commented code in the procedure Set_RecipeOperation_Parameters_WorkbookXML.
More Questions?
Want to know more about this topic or have another question? Please contact us!
More Tips & Tricks
INOSIM 13 – WWB.NET vs. WWB-COM
With the INOSIM 13 Version, the Basic Editor supports, in addition to WWB-COM, the WWB.NET language, which is compatible with Visual Basic .NET. Therefore, also…
Printing Complex Gantt Charts As PDFs
In this tip, you learn how to create PDFs which display a selected time range of a complex Gantt chart. You also learn how to…
Collaboration and Version Control for INOSIM Models
Often enough, INOSIM models are maintained by several people. One challenge is to provide everyone involved with the most up-to-date version and to keep them…

