Put data in the problem object
Tells how to populate a problem object with data in the C API.
When you instantiate a problem object, it is originally empty. In other words, it has no constraints, no variables, and no coefficient matrix. CPLEX offers you several alternative ways to put data into an empty problem object (that is, to populate your problem object).
You can make a sequence of calls, in any convenient order, to these routines:
If data already exist in MPS, SAV, or LP format in a file, you can call
CPXreadcopyprobto read that file and copy the data into the problem object. Mathematical Programming System (MPS) is an industry-standard format for organizing data in mathematical programming problems. LP and SAV file formats are CPLEX-specific formats for expressing linear programming problems as equations or inequalities. Understanding file formats explains these formats briefly. They are documented in the reference manual File formats supported by CPLEX.You can assemble arrays of data and then call
CPXXcopylp and CPXcopylpto copy the data into the problem object.
Whenever possible, compute your problem data in double precision (64 bit). Computers are finite-precision machines, and truncating your data to single precision (32 bit) can result in unnecessarily ill-conditioned problems For more information, refer to Numeric difficulties.