AmplModel

(class from pyomo.opt.problem.ampl)

class pyomo.opt.problem.ampl.AmplModel(modfile, datfile=None)[source]

Bases: object

A class that provides a wrapper for AMPL models.

__init__(modfile, datfile=None)[source]

The constructor.

Methods

__init__(modfile[, datfile])

The constructor.

valid_problem_types()

This method allows the pyomo.opt convert function to work with an AmplModel object.

write(filename[, format, solver_capability])

Write the model to a file, with a given format.

Member Documentation

valid_problem_types()[source]

This method allows the pyomo.opt convert function to work with an AmplModel object.

write(filename, format=None, solver_capability=None)[source]

Write the model to a file, with a given format.

NOTE: this is the same exact code as is used in PyomoModel.py