You are viewing Nextmv legacy docs. ⚡️ Go to latest docs ⚡️

Deployment

Env Variables And Options

Overview of environment variables and CLI flags.

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 VariableDefault
HOP_RUNNER_OUTPUT_QUIETnull
HOP_RUNNER_OUTPUT_SOLUTIONSlast
HOP_RUNNER_INPUT_PATH- (required for test runner)
HOP_RUNNER_OUTPUT_PATH- (required for test runner)
HOP_RUNNER_OUTPUT_STREAMnull
HOP_RUNNER_PROFILE_CPUnull
HOP_SOLVER_DIAGRAM_EXPANSION_LIMIT0
HOP_SOLVER_DIAGRAM_WIDTH10
HOP_SOLVER_LIMITS_DURATION10s
HOP_SOLVER_LIMITS_NODESmodel.MaxInt
HOP_SOLVER_LIMITS_SOLUTIONSmodel.MaxInt
HOP_SOLVER_RANDOM_SEED0
HOP_SOLVER_SEARCH_BUFFER100
HOP_SOLVER_POOL_SIZE0

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 VariableDefault
DASH_RUNNER_OUTPUT_EVENTSnull
DASH_RUNNER_OUTPUT_MEASURESnull
DASH_RUNNER_OUTPUT_LOG_LEVELall
DASH_RUNNER_OUTPUT_LOG_TYPESnull
DASH_RUNNER_OUTPUT_LOG_WARMUP_DURATION0 (no warmup)
DASH_RUNNER_OUTPUT_LOG_WARMUP_INCLUDEfalse
DASH_RUNNER_INPUT_PATH-
DASH_RUNNER_OUTPUT_PATH-
DASH_RUNNER_PROFILE_CPUnull
DASH_SIMULATOR_LIMITS_DURATION0 (no limit)
DASH_SIMULATOR_RANDOM_SEED0
DASH_SIMULATOR_TIME_DURATION0 (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)

Page last updated