Insight can be configured, set up (using a settings file) and run using the command line.
|When using the command line, you must keep the command prompt open until the optimisation has been run and is complete.|
Additional help for the command line is also available. Once in the Insight directory, enter the following:
The settings file can be created in a text editor, such as Notepad, saved as a .txt file (such as Example_InsightSettings.txt) and must include the information shown in Table 1.
|Location of the Source project file|
|List of the objectives, using the Functions in the Source project|
|List of decision variables, using the Functions in the Source project, along with their constraints|
real $pipecapacity 0 200
real $demand 0 100
real $treatmentcapacity 0 100
|Cache results file from previous run(s) to avoid re-running runs using the same decision variables as previously|
|Advanced options - also optional||Example|
Real Var Crossover Probability
|GAExpert RealVarCrossoverProb 0.9|
|Real Var Mutation Probability||GAExpert RealVarMutationProb 0.5|
|Integer Var Crossover Probability||GAExpert IntegerVarCrossoverProb 0.9|
|Integer Var Mutation Probability||GAExpert IntegerVarMutationProb 0.5|
|Crossover Distribution Index||GAExpert CrossoverDistribIndex 5|
|Mutation Distribution Index|
GAExpert MutationDistribIndex 10
The values above are the default values. They should only be changed by expert users who know what they are doing. Invalid values may cause NSGA to fail.
Note: To view a list of all available Functions in a Source project, use the following command:
Once a settings file has been created, specify the following (shown in Table 2) in the command line to configure the optimisation run.
|Run the Insight executable file|
|Location of Insight settings file|
|Number of cores / endpoints to use|
|Number of generations|
|Output file name|
There are a number of optional parameters which may be specified on the command line as shown in Table 3.
Output cache file name
File can be used as an input to subsequent runs by specifying the cache option in the Insight configuration file
Progress message format string for
|Suppress message to StdOut other than formatted progress messages and results (if output not specified)|
|Note: Whenever specifying a file outside the Insight folder, you must include the full path.|
Server endpoints allow you to run the optimisation across several machines simultaneously. It is recommended to discuss the use of endpoints with your IT department should you wish to choose this option. They can be set up either manually, or using the Powershell script. These are discussed separately next.
Note the following about server endpoints:
For each individual computer you wish to use in the optimisation, you will need to set it up as an endpoint(s). This is setup using the command line on each machine.
RiverSystem.CommandLine.exe -m server -a net.tcp://localhost:8593/insight
A message will then appear indicating that setup is complete.
|Note: Windows may request permission to allow access to the endpoint. Click OK to grant permission.|
To use additional cores on an individual machine, you will need to set up multiple endpoints.
If you wish to open up another endpoint for the same machine, open up another command prompt, change to the Source directory, and enter a similar command, this time with a different endpoint identifier. For example:
RiverSystem.CommandLine.exe -m server -a net.tcp://localhost:8594/insight
You can also set up endpoints using the included PowerShell script.
|Note: If Source is installed in your Program Files folder, you will need to run PowerShell as administrator every time you set up endpoints. In the Start menu, right click on the PowerShell icon and choose Run as Administrator.|
Complete the following on every machine that you wish to set up as an endpoint/s:
|Note: To find out more about execution policies, enter help about_execution_policy at the PowerShell command prompt.|
Finally, create an endpoints setting file using a text editor. Using the IP addresses or machine names (as located previously), specify the endpoints manually or via PowerShell. An example of such as file is shown below:
net.tcp://192.168.1.2:8593/insight net.tcp://192.168.1.2:8594/insight net.tcp://192.168.1.73:8595/insight net.tcp://192.168.1.73:8596/insight
Once the settings file has been configured (along with endpoints if you are using them), you set up the optimisation run using the command line.
The location of the Source project must be in a location accessible to all endpoints. For example, a local server with a mapped drive x:\projects, or be in the same location on each machine e.g. C:\projects
Ensure that the parameters listed in Table 2 are entered. Then, press enter to begin the optimisation run.
As Insight computes the optimisation for each popluation, a completion notification is displayed in the command line.