Reading files
These file-reading routines and methods read problems from system files.
CPLEX file-reading routines and methods are used to read problems from system files. CPLEX can read problem files stored in a variety of formats. For more information about the file formats, see the reference manual, File formats supported by CPLEX.
Names of classes, methods, and symbolic constants in the C#.NET API correspond very closely to those in the Java API with these systematic exceptions:
-
In the Java API, the names of classes begin with the prefix Ilo, whereas in C#.NET they do not.
-
In the Java API, the names of methods conventionally begin with a lowercase letter, for example,
addCols, whereas in the C#.NET API, the names of methods conventionally begin with an uppercase (that is, capital) letter, for example,AddColsaccording to Microsoft practice.
| Purpose | Java API | C++ API | C API |
|---|---|---|---|
| Reads and copies a problem in LP, MPS, or SAV format | IloCplex. importModel | IloCplex:: importModel then IloModel:: add for any SOSs |
CPXXreadcopyprob and CPXreadcopyprob
|
| Reads and copies a solution file in SOL format | IloCplex. readSolution | IloCplex:: readSolution |
CPXXreadcopysol and CPXreadcopysol
|
| Reads and copies a basis file in BAS format | IloCplex. readBasis | IloCplex:: readBasis |
CPXXreadcopybase and CPXreadcopybase
|
| Reads and copies an ORD priority order file | ---- | ---- |
CPXXreadcopyorder and CPXreadcopyorder
|
| Reads and copies a formatted file of MIP start values | IloCplex. readMIPStarts | IloCplex:: readMIPStarts |
CPXXreadcopymipstarts and CPXreadcopymipstarts
|
| Reads comma-separated values from a CSV file | ---- | IloCsvReader | ---- |
| Reads CPLEX parameter settings from a file in PRM format and sets current model accordingly | IloCplex. readParam | IloCplex:: readParam |
CPXXreadcopyparam and CPXreadcopyparam
|
| Reads and copies an FLT formatted file of filters for the solution pool | IloCplex. readFilters | IloCplex:: readFilters |
CPXXreadcopysolnpoolfilters and CPXreadcopysolnpoolfilters
|