The new INOSIM version 13 will be released later this year. That process simulation software comes with a number of new features and useful improvements. Here, you get a first outlook.
Outlook for INOSIM Version 13
Standardization of controls and events
In V12, there were corresponding event procedures only for some control types. In V13, the event procedures have been completed and the controls have been adjusted. This changes some controls. The following example shows a pool allocation control in V12.
Function UnitPoolAllocation_V12(proc As ProcedureInstance, u As Unit) As Boolean
' ...
End Function
In V13, all controls consistently are procedures. Controls that had a return value now have an additional reference parameter. The above example then looks like this:
Sub UnitPoolAllocation_V13(proc As ProcedureInstance, p As UnitPool, u As Unit, ByRef allocate As Boolean)
' ...
End Sub
The additional parameter allocate takes the role of the return value. The second additional parameter p is an extension in V12.
Due to the change, controls and event procedures use identical parameters. It is now also possible to integrate a control and one or more event procedures at the same time. Hence, in the example above, an event procedure might change the value of the parameter allocate that was previously set by a control (event procedures are always executed after a control).
Old controls are still supported in V13, so that an immediate adjustment of existing projects is usually not necessary.
Inline-Editing of Custom Attributes
The values of custom attributes can now be changed directly on the tab of the respective properties dialog.
“Continuous” transfers become more flexible
In a unit procedure, in addition to a continuous transfer (with influx, outflux, and startTransfer operations), any number of transfer operations can be active in V13 which are part of continuous transfers of other unit procedures.
What does the new .NET support mean to INOSIM Basic programming?
V13 supports, in addition to the known Basic language, a new language variant called WWB.NET which orientates itself towards VB.NET without being completely identical. It can be enabled by a #Language comment.
'#Language "WWB.NET"
Sub Main
End Sub
Macros without #Language comment use the older language variant.
Sub Main
End Sub
The old language variant named WWB.COM can also be selected explicitly.
'#Language "WWB.COM"
Sub Main
End Sub
For existing projects, this means on the one hand that the existing code does not have to be changed. On the other hand, a project can contain macros of both the old language variant and the new language variant. This simplifies a changeover if desired.
Using the .NET framework
The Basic language variant WWB.NET in V13 allows using the .NET framework. That is pre-installed under Windows and contains useful classes which can simplify programming.
The following example uses the list class System.Collections.Generic.List. It behaves like an array which supports pasting and deleting items at any position.
'#Language "WWB.NET"
Option Explicit
Private Sub Simulation_Init() Handles Simulation.Init
' Write orders in a List object
Dim l As New System.Collections.Generic.List(Of Order)
Dim o As Order
For Each o In Orders
l.Add o
Next
' Take and delete first item
If l.Count > 0 Then
o = l(0)
l.RemoveAt(0)
Console.Print "Order " & o.Name & " has been removed from list"
End If
End Sub
The classes of the .NET framework are documented in detail. Details on the List class are available here.
More .NET components can be integrated to INOSIM via dialog References in the Basic window.
Do you have any questions or would like to know more about this topic? Please contact us.