The riversystem.commandline.exe provides a mechanism to run existing projects without the Source interface. It is possible to modify or change the behaviour of the project from the command line, by changing the values of global expressions. Results can be returned for recorded items or global expressions within the project.
riversystem.commandline.exe is included with Source.
The command line is used where it is impractical to run Source from the main user interface. For example, the command line can be used for , such as:
- For batch runs, where Source is run many times with a range of different parameter values
...
- ; or
- Optimisation scenarios and when integrating Source with other models or business systems.
The command line can be used in either a standalone (in-process) mode or in a client/server configuration. When run in client/server mode, the Source project is loaded and run at the server side, with parameters provided by and results through a separate client. In this way, the server can be used for many runs of the same project, without needing to reload the project file each time.
...
The Metaparameter explorer (Adding function usages manuallyExplorer) can be used to attach global expressions directly to model variables for situations where the Function Editor has not been enabled by default.
...
You can run a project in the following modes:
- Standalone mode - the project loads; the simulation runs with a single line command:
Code Block |
---|
RiverSystem.CommandLine -p C:\Temp\ExampleProject.rsproj |
- Client/server mode - one command line runs projects. It does anything except for loading a project until a second command line is run in client mode. In this way, multiple runs can be completed with the server loading the project only once. It also enables the server to run on a different machine to the client. The examples provided assume a client/server mode, illustrating the calls made by the client. They could also work in standalone mode. Refer to Advanced configuration options for two options available in this mode.
Info | ||
---|---|---|
| ||
Note: When working with functions in the command line, ensure that functions are referenced by their full name to avoid errors or run failures. The syntax for referencing a function by its full name is $Folder.Function. For example, use Riversystem.CommandLine.exe -v "$Folder1.Function1=10. |
Retrieving results
By default, all recorded items are returned, as configured from within the Source application (Running scenarios). Alternatively, you can specify specific items to record by using a command line argument:
...
Notice in the examples that the command line contains various options, which result in different outputs. The function of these options is provided in Table 1. Note that these are optional extras.
...
Anchor | ||||
---|---|---|---|---|
|
...