evaluate: Evaluate

Description Usage Arguments Details

View source: R/ampl.R

Description

Parses AMPL code and evaluates it as a possibly empty sequence of AMPL declarations and statements.

Usage

1
evaluate(ampl, amplstatements)

Arguments

ampl

amplpy.ampl.AMPL object

amplstatements

A collection of AMPL statements and declarations to be passed to the interpreter.

Details

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

The output of interpreting the statements is passed to the current OutputHandler (see getOutputHandler and setOutputHandler).

By default, errors are reported as exceptions and warnings are printed on stdout. This behavior can be changed reassigning an ErrorHandler using setErrorHandler.


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