Scripting has been around for quite long time. The script enables automation. In other words this is a way to execute code without compiling it first.
In Process Simulate the script provides an easy way to implement behavior models. This is especially useful when implementing digital twins that are used in simulation.
SCL is implemented as a scripting language in Process Simulate. It is intended for behavior modeling of all resources in your study. But how does this all work?
In the late 90s Microsoft introduced the Active Scripting framework. It defines the basic components and interfaces that are needed for a scripting language to be implemented. There is quite an impressive list of interfaces there. Everything from parsing the language text to debugging and profiling the script. They provided some proprietary implementations of these interfaces along with Internet Explorer. These were known as JScript and VBScript.
The same implementations were made part of the Windows Scripting Host (WSH) that was the predecessor of PowerShell.
This framework has become the de-facto standard when implementing scripting languages on Windows. Visual Studio also supports it (when you try to debug a script)
We build SCL on top of the same architecture. e.g. we introduce one more scripting language on the Windows platform.
The basic entities in the Active Scripting framework are:
Script engine - the brain behind the script language. it takes care of parsing and interpreting the text.
Script host - hosts the script engines. e.g. creates and configures them. Also handles their events.
Process Debug Manager - organizes scripts into virtual applications suitable for debugging.
Script debugger - the UI that provides debugging capabilities
Each of them has special responsibilities and implements specific interfaces.
Process Debug Manager is provided by Microsoft as part of Visual Studio or the Remote Tools for Visual Studio package. It is a prerequisite for debugging SCL scripts in Process Simulate.
The script engine, host and debugger are implemented by us. It took us around 3 years to implement these and still there is more to be implemented. It is an ongoing project.
On top of this architecture we introduced APIs that allow for implementing custom FB/FC blocks and UTDs. This enabled us to bring Process Simulate specific blocks to SCL.
You see. Now we have a flexible behavior modeling tool that can be customized!
Nice!
Comentarios