# Environment¶

class amplpy.Environment(binaryDirectory=None)

This class provides access to the environment variables and provides facilities to specify where to load the underlying AMPL interpreter.

__init__(binaryDirectory=None)

Constructor with ability to select the location of the AMPL binary. Note that if binaryDirectory is set, the automatic lookup for an AMPL executable will not be executed.

Args:
binaryDirectory: The directory in which look for the AMPL Binary.
__iter__()
__setitem__(name, value)

Add an environment variable to the environment, or change its value if already defined.

Args:

name: Name of the environment variable.

value: Value to be assigned.

__getitem__(name)

Searches the current object for an environment variable called name and returns an iterator to it if found, otherwise it returns None.

setBinDir(binaryDirectory)

Set the location where AMPL API will search for the AMPL executable.

Args:
binaryDirectory: The directory in which look for the AMPL Binary.
__module__ = 'amplpy.environment'
getBinDir()

Get the location where AMPL API will search for the AMPL executable.