Skip to contents

Internally used, package-specific options. All options will prioritize R options() values, and fall back to environment variables if undefined. If neither the option nor the environment variable is set, a default value is used.

Checking Option Values

Option values specific to energyRt can be accessed by passing the package name to env.

options::opts(env = "energyRt")

options::opt(x, default, env = "energyRt")

Options

gams_path
Path to the GAMS installation directory. Prefixed to the gams command when solving with a GAMS backend. If unset, gams is resolved on the session PATH.
default:
NULL
option:

en.gams_path

envvar:

ENERGYRT_GAMS_PATH (evaluated if possible, raw string otherwise)

gdxlib_path
Path to the GAMS Data Exchange (GDX) library, used to read and write *.gdx files. If unset, gams_path is used instead.
default:
NULL
option:

en.gdxlib_path

envvar:

ENERGYRT_GDXLIB_PATH (evaluated if possible, raw string otherwise)

python_path
Path to the Python installation or environment used by the Pyomo backend. Prefixed to the python command. If unset, python is resolved on the session PATH.
default:
NULL
option:

en.python_path

envvar:

ENERGYRT_PYTHON_PATH (evaluated if possible, raw string otherwise)

julia_path
Path to the Julia installation used by the JuMP backend. Prefixed to the julia command. If unset, julia is resolved on the session PATH.
default:
NULL
option:

en.julia_path

envvar:

ENERGYRT_JULIA_PATH (evaluated if possible, raw string otherwise)

glpk_path
Path to a standalone GLPK installation containing the glpsol executable. If unset, glpsol is auto-detected on the session PATH -- which on Windows finds the copy bundled with Rtools.
default:
NULL
option:

en.glpk_path

envvar:

ENERGYRT_GLPK_PATH (evaluated if possible, raw string otherwise)

neos_email
Email address for NEOS Server job submission (required by NEOS). Read from the NEOS_EMAIL environment variable if the option is unset.
default:
NULL
option:

en.neos_email

envvar:

NEOS_EMAIL (evaluated if possible, raw string otherwise)

neos_endpoint
XML-RPC endpoint of the NEOS Server.
default:
"https://neos-server.org:3333"
option:

en.neos_endpoint

envvar:

ENERGYRT_NEOS_ENDPOINT (evaluated if possible, raw string otherwise)

solver
Default solver specification, used when a scenario carries none. A named list, normally one of the solver_options presets.
default:
list(name = "glpk", lang = "GLPK")
option:

en.solver

envvar:

ENERGYRT_SOLVER (evaluated if possible, raw string otherwise)

scenarios_path
Root directory for scenario folders. Scenario paths and solver working directories are built underneath it.
default:
"scenarios/"
option:

en.scenarios_path

envvar:

ENERGYRT_SCENARIOS_PATH (evaluated if possible, raw string otherwise)

registry_file
Path to the project registry CSV indexing saved models, scenarios and runs. Kept at the project root, a sibling of the scenarios/ and models/ stores, so one registry spans both.
default:
"energyRt_registry.csv"
option:

en.registry_file

envvar:

ENERGYRT_REGISTRY_FILE (evaluated if possible, raw string otherwise)

models_path
Root directory for the model store, a sibling of the scenarios/ store. save_model() writes one folder per model name underneath it, updated in place; the content hash lives in the entry's model.yml. Scenarios saved with the default embed_model = NULL store their model here and reference it.
default:
"models/"
option:

en.models_path

envvar:

ENERGYRT_MODELS_PATH (evaluated if possible, raw string otherwise)

repositories_path
Root directory for the repository store. save_repository() writes one folder per repository name underneath it, updated in place; the content hash lives in the entry's repository.yml.
default:
"repositories/"
option:

en.repositories_path

envvar:

ENERGYRT_REPOSITORIES_PATH (evaluated if possible, raw string otherwise)

datasets_path
Root directory for the dataset store. save_dataset() writes one folder per dataset name underneath it, updated in place; the content hash lives in the entry's dataset.yml.
default:
"datasets/"
option:

en.datasets_path

envvar:

ENERGYRT_DATASETS_PATH (evaluated if possible, raw string otherwise)

log_file
Optional operation-log CSV. Empty (default) = logging off; a path makes interpolate_model()/solve_scenario()/solve_myopic() append one line per operation. Read it back with read_log().
default:
""
option:

en.log_file

envvar:

ENERGYRT_LOG_FILE (evaluated if possible, raw string otherwise)

profile_dir
Directory for the interpolation profile log (interp_runs.csv, interp_stages.csv, interp_maps.csv, interp_params.csv -- per-run timing and memory tables, appended after every interpolation). Empty (default) = fall back to the operation log's directory, then to html/logs/ when a project registry exists; no sink = no files written.
default:
""
option:

en.profile_dir

envvar:

ENERGYRT_PROFILE_DIR (evaluated if possible, raw string otherwise)

reports_path
Default directory for rendered reports of IN-MEMORY objects (treated as temporary output). Reports of saved objects land inside the owning folder (html/reports/, html/reports/) instead.
default:
"reports/"
option:

en.reports_path

envvar:

ENERGYRT_REPORTS_PATH (evaluated if possible, raw string otherwise)

levcost_cache_path
Default directory for cached levcost results of IN-MEMORY objects (treated as temporary). Results for saved objects are cached inside the owning folder (html/levcost/) instead.
default:
"levcosts/"
option:

en.levcost_cache_path

envvar:

ENERGYRT_LEVCOST_CACHE_PATH (evaluated if possible, raw string otherwise)

path_builders
Named list of user functions overriding the built-in folder-name derivations (session-local; set with set_path_builder()). Hookable kinds: scenario_dir, store_entry, run_label, slug — see ?path_builders for the contracts.
default:
option:

en.path_builders

envvar:

ENERGYRT_PATH_BUILDERS (evaluated if possible, raw string otherwise)

storage_format
On-disk table storage format: 'feather' (IPC), 'parquet', or 'csv'; 'arrow' and 'ipc' are aliases for feather. Both support lazy filtered reads. Size depends far more on DICTIONARY ENCODING than on the container: parquet dictionary-encodes repeated strings itself, feather only if the caller passes factors. Measured on a 543k-row table with zstd-15: plain feather 11.8 MB, parquet 1.10 MB either way, feather with factor columns 1.03 MB and 4.5x faster to read.
default:
"feather"
option:

en.storage_format

envvar:

ENERGYRT_STORAGE_FORMAT (evaluated if possible, raw string otherwise)

storage_compression
Storage compression codec: 'zstd', 'lz4', or 'uncompressed'.
default:
"zstd"
option:

en.storage_compression

envvar:

ENERGYRT_STORAGE_COMPRESSION (evaluated if possible, raw string otherwise)

storage_compression_level
Storage compression level (codec-dependent; ZSTD supports 1-22).
default:
15L
option:

en.storage_compression_level

envvar:

ENERGYRT_STORAGE_COMPRESSION_LEVEL (evaluated if possible, raw string otherwise)

exchange_format
Data-exchange format for the JuMP/Pyomo solvers: 'feather' (IPC), 'parquet', or 'csv'. Julia's Arrow.jl reads IPC only. A solver's export_format/import_format overrides this per solve.
default:
"feather"
option:

en.exchange_format

envvar:

ENERGYRT_EXCHANGE_FORMAT (evaluated if possible, raw string otherwise)

exchange_compression
Exchange compression codec: 'zstd', 'lz4', or 'uncompressed'. Exchange files are written and read within the same solve, so the default trades size for speed.
default:
"lz4"
option:

en.exchange_compression

envvar:

ENERGYRT_EXCHANGE_COMPRESSION (evaluated if possible, raw string otherwise)

exchange_compression_level
Exchange compression level (codec-dependent; ZSTD supports 1-22). Ignored for lz4.
default:
15L
option:

en.exchange_compression_level

envvar:

ENERGYRT_EXCHANGE_COMPRESSION_LEVEL (evaluated if possible, raw string otherwise)

verbose
Verbosity level: 0 silent, 1 progress messages, 2 and above for increasingly detailed reporting. TRUE/FALSE are accepted and read as 1/0. Test with isVerbose(level).
default:
0
option:

en.verbose

envvar:

ENERGYRT_VERBOSE (evaluated if possible, raw string otherwise)

debug
Debug level, in the same 0/1/2 form as verbose. Enables internal consistency warnings that are silent in normal use. Test with isDebug(level).
default:
0
option:

en.debug

envvar:

ENERGYRT_DEBUG (evaluated if possible, raw string otherwise)

progress_bar
Whether long-running operations display a progress bar. Set through show_progress_bar() / set_progress_bar().
default:
TRUE
option:

en.progress_bar

envvar:

ENERGYRT_PROGRESS_BAR (evaluated if possible, raw string otherwise)

See also

options getOption Sys.setenv Sys.getenv