run

The CLI for the EHub Model.

The options for running the model are set in the config.yaml file or as command-line arguments. See the config.yaml file for more information about the yaml format.

Given the config.yaml file, solving the model is easy:

$ python run.py

The program will then print out the output of whatever solver is configured in the config.yaml file and then the solved variables, parameters, constraints, etc..

If you want to learn how to use run.py as a command-line tool, run

$ python run.py -h

to learn more about the arguments.

Note: You can use both the config.yaml and the command-line arguments together in certain situations.

run.get_command_line_arguments() → dict[source]

Get the arguments from the command-line and return them as a dictionary.

Returns:A dictionary holding all the arguments
run.main()[source]

The main function for the CLI.

run.parse_arguments(arguments: dict) → dict[source]

Parse the command-line arguments along with the config file.

Parameters:arguments – The dictionary containing the command-line arguments
Returns:A dictionary with the command-line arguments combined with the config file’s settings