All runners are configurable through the following environment variables. Runner options change how the runner outputs solutions. For instance, HOP_RUNNER_OUTPUT_SOLUTIONS
default of last
will only output the final improving solution in a Hop model. Solver options change how many states Hop allows in a diagram, how many states it pulls from the search queue, termination criteria, and randomization.
The HOP_SOLVER_POOL_SIZE
variable is only used by specific engines, e.g. the fleet engine. In the specific case of the fleet engine, the larger value of runtime.GOMAXPROCS(0) / 2
and 1
overrides the POOL_SIZE
default value.
Environment Variable | Default |
---|---|
HOP_RUNNER_OUTPUT_QUIET | null |
HOP_RUNNER_OUTPUT_SOLUTIONS | last |
HOP_RUNNER_INPUT_PATH | - (required for test runner) |
HOP_RUNNER_OUTPUT_PATH | - (required for test runner) |
HOP_RUNNER_OUTPUT_STREAM | null |
HOP_RUNNER_PROFILE_CPU | null |
HOP_SOLVER_DIAGRAM_EXPANSION_LIMIT | 0 |
HOP_SOLVER_DIAGRAM_WIDTH | 10 |
HOP_SOLVER_LIMITS_DURATION | 10s |
HOP_SOLVER_LIMITS_NODES | model.MaxInt |
HOP_SOLVER_LIMITS_SOLUTIONS | model.MaxInt |
HOP_SOLVER_RANDOM_SEED | 0 |
HOP_SOLVER_SEARCH_BUFFER | 100 |
HOP_SOLVER_POOL_SIZE | 0 |
Solver options are automatically marshaled into model output in the options
section of the JSON.
Similarly, Dash runner options affect the output of simulation events and where to create a CPU profile. Simulator options allow one to set simulation duration, and set a seed for randomization. Note that the default value of null
for DASH_RUNNER_OUTPUT_EVENTS
and DASH_RUNNER_OUTPUT_MEASURES
means that events
and measures
data are not included in the output. Any other value tells the runner to include this data.
Environment Variable | Default |
---|---|
DASH_RUNNER_OUTPUT_EVENTS | null |
DASH_RUNNER_OUTPUT_MEASURES | null |
DASH_RUNNER_OUTPUT_LOG_LEVEL | all |
DASH_RUNNER_OUTPUT_LOG_TYPES | null |
DASH_RUNNER_OUTPUT_LOG_WARMUP_DURATION | 0 (no warmup) |
DASH_RUNNER_OUTPUT_LOG_WARMUP_INCLUDE | false |
DASH_RUNNER_INPUT_PATH | - |
DASH_RUNNER_OUTPUT_PATH | - |
DASH_RUNNER_PROFILE_CPU | null |
DASH_SIMULATOR_LIMITS_DURATION | 0 (no limit) |
DASH_SIMULATOR_RANDOM_SEED | 0 |
DASH_SIMULATOR_TIME_DURATION | 0 (no limit) |
To set a command-line flag, convert its corresponding environment variable to lowercase, replacing each underscore (_) with a period (.). For example,
-hop.solver.limits.solutions is equivalent to HOP_SOLVER_LIMITS_SOLUTIONS
.
If both an environment variable and its corresponding flag are defined, the flag will overwrite the variable.
HOP_SOLVER_LIMITS_DURATION
should be set to a non-zero value in production i.e. 1h
or 1m30s
. Valid time units are as follows, according to time.ParseDuration from Go's standard library.
- ns (nanoseconds)
- us/µs (microseconds)
- ms (milliseconds)
- s (seconds)
- m (minutes)
- h (hours)