Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 functions. Results can be returned for recorded items or functions within the project.

RiverSystem.CommandLine.exe is included with Source.

...


Display option commands

Function

Example

-a, --address
Address for server to create, or client to connect.
-a "net.pipe://localhost/PipeReverse" or "net.tcp://localhost:8523/eWater/Services/RiverSystemService"
-b, --baseSIUnits
Ignore units set within project and output base SI units
--baseSIUnits
-c, -rec, --recording
File to load state from when in client mode or file to save state in when in server mode.
-c "c:\StateFiles\state.txt"
--cp, --configurationproperty
Run configuration property.
--configurationproperty "name=value"
-d, --directory
Directory in which to look for projects.
-d "c:\ProjectFiles"
-e, --timeout
Operation timeout for WCF service in seconds.
-e 2000
-et, -endtime
The end Data/Time of the scenario run.
--endtime "1/1/2011"
-f, --settingFile
File to merge command-line settings from.
-f "settings.txt"
-?, --help
Show usage help
-?
--is, --inputset
The Scenario Input Set to use for this run.
--inputset "ScenarioInputSetName"
--inputset "ScenarioInputSetName.ChildInputSetName"
--ip, --inputSetProperty 

Scenario Input Set property.

These are Scenario input set parameter lines. If you are using child input sets, these are applied after the last child input set. See: Scenario Input Sets

--ip "Functions.Functions.$MyFunction.Expression = 0.25"

--ip "Nodes.InflowNode.Flow =20 ML/d"

-l, --loadPlugin
This option allows a plugin (that the project has been saved with) to be loaded for this run only. The path specified is a relative path to the plugin from the command line. eg. "Plugins\ExampleRainfallRunoffModel.dll"
-l "plugin.dll"
-m, --mode
Application mode Client/Server/InProcess.
-m Client or -m Server
-o, --output
File to save output into. The extension selects the output format based on the standard TIME I/O formats. A directory of the name specified will be created if the format only supports a single time series.
-o "output.res.csv" for CSV or -o "output.nc" for NetCDF etc.
-p, --project

Path to the project, or project name on server and optional scenario within that project, DateTime values to override the default start and end times of the loaded scenario and data source input set to run.

-p "projectName.rsproj", or to specify the scenario within the project

-md, --ProjectMetadata
Display the metadata for the given project--ProjectMetadata
-r, --results

Which results to return. This can appear multiple times.

Info
iconfalse
Note: By default, all recorded results are saved into the specified output file. When this options is used, it only allows you to reduce the number of results saved out. Requested results must be set to record in the project file. To specify the output file name, save the result to a file with a .res.csv extension. Use the column name for the time series.
-r "someResult" -r "someOtherResult"
--resultsOutputMode

Specifies the way output is created. 3 options are available:

ClientNamedFormat
ServerNamedFormat
NoOutput


"ClientNamedFormat" - Results fetched to client, saved to output file from there, in a format based on output file extension. Default for Client mode. Only valid for Client mode.

"ServerNamedFormat" - Results saved to output file directly from server, in a format based on output file extension. Does not fetch results to client. This "server side" save is more efficient. Default for InProcess mode, since "server side" is local here. Can be used in Client mode, assuming the end user has access to the path provided to the server.

"NoOutput" - Does not save results anywhere, hence does not fetch results either. Can be used where the result data files are ignored. E.g. in tests, or where a plugin gives a different pathway to results.

--resultsOutputMode NoOutput

-o "..\cmdlineResult.res.csv" --resultsOutputMode ServerNamedFormat
-rc, --runconfiguration

Allows you to set the running configuration to be used for the run.



-rc "Flow Calibration"
--scenario
Specify the scenario name
--scenario "New Scenario"
--snapThe snapshot file to apply at the beginning of a run

--snap "C:\some\file\name.rsnap"

--starttime
The Start Time for the scenario run
--starttime "1/1/2011"
-s, --step
Number of time-steps to run.
--step 1
-t, --reset
Reset the loaded project.
--reset
-u, --current
Return only the current time step's value for the specified results
--current
-y, --saveAs
Save the loaded project after the run is complete to the specified path and file. The string argument cannot be empty, and the path provided must be an existing directory and have saving permissions for the current user.
-y "C:\ProjectFiles\newProject.rsproj"

Anchor
addrunconfig
addrunconfig
Additional run configuration properties

When using a running configuration other than the default Single Analysis, there can be additional configuration properties available. These are handled with the -cp command. 

-cp, --ConfigurationProperty

When using River Operations, you can specify the additional properties listed in the table below:

Operations Configuration Property

Data

Example

WarmUpStart

Date Time

-cp "WarmUpStart=1/1/2017"

ReloadOnRunBoolean-cp "ReloadOnRun=True"
TodayDate Time

-cp "Today=1/1/2018"

ForecastLengthPositive integer

-cp "ForecastLength=90"

DataUpdatePeriod

Positive integer

-cp "DataUpdatePeriod=15"

For details about these parameters, please see: Operations forecasting

...