Try our new documentation site (beta).
read()
read ( filename, env=None )
Read a model from a file.
Arguments:
filename: Name of file containing model. Note that the type of the file is encoded in the file name suffix. Valid suffixes are .mps, .rew, .lp, .rlp, or .ilp. The files can be compressed, so additional suffixes of .gz, .bz2, .zip, or .7z are accepted. The file name may contain * or ? wildcards. No file is read when no wildcard match is found. If more than one match is found, this routine will attempt to read the first matching file.
env: Compute Server client environment in which to create the model. This argument should only be used when you have explicitly created a Compute Server client environment (using the Env constructor).
Return value:
Model object containing the model that was read from the input file.
Example usage:
m = read("afiro.mps") m.optimize()