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.

...


The service is ready at net.tcp://localhost:8523/eWater/Services/RiverSystemService.

Additional examples of running Source using a DOS batch file, a Python script or an R script can be found here.

 

Client Server interaction

 

The service will keep the current state after the client  commands exit. Projects that are loaded, steps executed and parameters set are still in effect on the server until changed. The client changes this by loading another project changing state in some other way. This allows for very complicated interactions. 

A simple situation is to load a project and run it multiple times with changing values. This would be accomplished by first starting a server

 

Code Block
> RiverSystem.CommandLine.exe -mode server 

 

 then loading the project in the server from the client in another window while the server is running.

 

Code Block
> RiverSystem.CommandLine.exe -mode client -p c:\test.rsproj -s 0 

NOTE: the "-s 0" in the command above will stop the project from running by default. The project will load and wait, not performing any timesteps ("-s 0")

Next we set some parameter on the loaded project

Code Block
> RiverSystem.CommandLine.exe -mode client -v "$metaParam=2.5" -s 0

Then run the project (running is the default action of the commandline so no extra paramaters need to be specified)

Code Block
> RiverSystem.CommandLine.exe -mode client 

Executing the project again with a different value for the parameter would then be

Then run the project

Code Block
> RiverSystem.CommandLine.exe -mode client -v "$metaParam=7.5" -s 0
> RiverSystem.CommandLine.exe -mode client 

OR Just

Code Block
> RiverSystem.CommandLine.exe -mode client -v "$metaParam=7.5" 


which will set the parmeter and execute the model (the default operation because no "-s 0" is present to stop the execution)

Anchor
AdvancedConfiguration
AdvancedConfiguration
Advanced configuration options

...