read: Read

Description Usage Arguments Details Value

View source: R/ampl.R

Description

Interprets the specified file. As a side effect, it invalidates all entities (as the passed file can contain any arbitrary command); the lists of entities will be re-populated lazily (at first access).

Usage

1
2
3
4
5
read(ampl, filename, cd = TRUE)

read_model(ampl, filename, cd = TRUE)

read_data(ampl, filename, cd = TRUE)

Arguments

ampl

amplpy.ampl.AMPL object

filename

Full path to the file.

cd

Logical indicating whether to run the file in its directory to allow for relative path names. FALSE will cause AMPL to read in its current working directory. Defaults to TRUE.

Details

read_model accepts a script or model or mixed.

read_data accepts an AMPL data file. After reading the file the interpreter is put back to "model" mode.

Value

amplpy.ampl.AMPL object


ruaridhw/r-AMPL documentation built on May 4, 2019, 10:55 a.m.