Solving with the command line tool
You can use a command line tool to run the Network Optimization, Inventory Optimization, Transportation Optimization and Simulation solvers outside the Supply Chain Guru X user interface. The solver executable is located in your Supply Chain Guru X installation folder. The tool requires the following:
- the type of solver (Network Optimization, Inventory Optimization, Transportation Optimization or Simulation).
- the connection string to the model.
- the working folder to use for the input and output files.

- Open a command prompt window.
- Navigate to the Supply Chain Guru X installation folder (typically C:\Program Files\Coupa\Supply Chain Guru X).
- Type solver, then include the required arguments as listed below:
Argument
Description
Required
netopt
Runs a Network Optimization solve.
One of netopt, invopt, transopt, or classicsim is required. invopt Run an Inventory Optimization solve. One of netopt, invopt, transopt, or classicsim is required. transopt
Runs a Transportation Optimization solve.
One of netopt, invopt, transopt, or classicsim is required. classicsim Runs Simulation. One of netopt, invopt, transopt, or classicsim is required. -t, --type Determines the Problem Type to be run. Supported values per technology are:
Network Optimization:
- no - Network Optimization. This is the default if no type is provided.
- ga - Greenfield Analysis.
- inf - Network Optimization Infeasibility Diagnosis.
- paths - Cost To Serve Analysis.
- decomp - Decomposition.
Inventory Optimization:
- sso - Safety Stock Optimization. This is the default if no type is provided.
- ssoslo - Safety Stock + Service Level Optimization.
- ssorhm - Safety Stock + Rolling Horizon Modeling.
- da - Demand Analysis.
- rhm - Rolling Horizon Modeling.
- inf - SSO Infeasibility Analysis.
- invsim - Inventory Simulation.
Transportation Optimization:
to - Transportation Optimization. This is the default if no type is provided.
ds - Driver Scheduling
For Simulation, there are no additional problem types.
Required only if you do not want to use the default Problem Type. -c, --conn
Connection string to be used to specify the model. This must be a Microsoft SQL Server model. The model database must be attached to the server. Enclose the connection string in quotes.
Yes -e, --external
External data folder to be used when the model includes input pipes. Enclose the external data folder string in quotes.
No -f, --folder
Working folder where input and output files will be written. Enclose the working folder string in quotes.
Note: The folder must not be the folder where the model is located. It should be a folder without any files you want to keep, as the folder is cleared when the solver runs.
Yes
-s, --scenario The Scenario ID to be run. If no value is supplied for this argument, the default of 0 is used; 0 is the Baseline scenario. No (default of 0 is used if not specified). -o, --optimizer With Network Optimization, the default solver is the newer .NET optimizer. If you need to run Network Optimization with the previous "gol" optimizer, you can use this option. Valid values are:
dotnet - Uses the current .NET optimizer
gol - Uses the previous gol optimizer
This option does not apply to Inventory Optimization, Transportation Optimization and Simulation.
No (default .NET solver is used if not specified). help Displays more information about a specific command. No version Displays the detailed command line tool version. No
- Enter the command line to run the solver and process the selected model scenario.
For example, assume you want to run Network Optimization on a specific scenario in the model called “Eastern DC Study”. The command would look similar to the following:
solver netopt -c "Server=(localDB)\GURU-LLamaUse~1;Database=Eastern DC Study_E08212D99D39AB1410DDBDA210C425B32E466DC5;Pooling=True;Connection Timeout=60;MultipleActiveResultSets=True;Trusted_Connection=True" -e "C:\MyModels\DataSource" -s 2 -f "C:\MyModels\Eastern DC Study\SolverFiles"
In another example, you are running Greenfield Analysis on the Baseline scenario. In this case, there are no external data sources:
solver netopt -t ga -c "Server=(localDB)\GURU-LLamaUse~1;Database=Database=Greenfield_USSites_85E0D5FB78A2E9BE62406A344DCE10B939835A47;Pooling=True;Connection Timeout=60;MultipleActiveResultSets=True;Trusted_Connection=True" -f "C:\MyModels\USSites\Greenfield Analysis"
Connection string details
The connection string in the example above will vary depending on your SQL Server implementation. A connection string can include many keyword/value pairs. The keywords included in the example are recommended; however, they may be changed based on your implementation:
Keyword |
Description |
Required |
---|---|---|
Server |
Provide the instance name as you use to connect in SQL Server Management Studio. |
Yes |
Database |
Enter the full model name as specified in SQL Server Management Studio. You can also see this value in the Model GUID field under Model > Model Info. |
Yes |
Pooling |
When Pooling is True, the number of times that new connections must be opened is reduced. |
No |
Connection Timeout |
Enter the time to wait while trying to establish a connection before terminating the attempt. |
No |
MultipleActiveResultSets |
When MultipleActiveResultSets is True, execution of multiple batches on a single connection is allowed. |
Coupa recommends you include this keyword/value pair, with a value of True. |
Trusted_Connection | When Trusted_Connection is True, the current Windows account credentials are used for authentication. | No |
Persist Security Info | Include Persist Security Info=True when your connection string includes a User Id and Password. This setting persists the password defined in the connection string. | Yes, when your connection string includes User Id and Password. |
The table lists typical keywords used in the connection string. However, your implementation may include additional keywords, such as User Id and Password.
Working folder details
The folder you define for the working folder must not be the folder where the model is located. It should be a folder without any files you want to keep, as the folder is cleared when the solver runs.
Last modified: Wednesday May 15, 2024