Reads a model from the file specified by name
into the active model.
Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll) Version: 22.1.1.0
Syntax
| C# |
|---|
public virtual void ImportModel( string name ) |
| Visual Basic |
|---|
Public Overridable Sub ImportModel ( _ name As String _ ) |
Parameters
- name
- Type: System..::..String
The name of the file from which the model is read. The extension of the filename determines the format in which to read the model file.
Remarks
The format of the file is specified by the extension of the filename. The following extensions are recognized:
- .sav
- .mps
- .Lp
- .sav.Gz
- .mps.Gz
- .Lp.Gz
- .Bz2
When CPLEX reads a file, the existing active model is first cleaned out and then new modeling objects, as specified by the input file, are added to it. In particular, one IObjective object and one ILPMatrix object are always added to the active model. The ILPMatrix object will contain all the constraints of the imported model. ISOS1 and ISOS2 objects are added as needed.