Populating the problem object
Your Callable Library application populates the problem object with data.
The problem object instantiated by CPXcreateprob represents
an empty problem that contains no data; it has zero constraints, zero
variables, and an empty constraint matrix. This empty problem object
must be populated with data. This step can be carried out in several
ways.
The problem object can be populated by assembling arrays of data and then calling
CPXcopylpto copy the data into the problem object. (For example, see Building and solving a small LP model in C.)Alternatively, you can populate the problem object by sequences of calls to the routines
CPXnewcols,CPXnewrows,CPXaddcols,CPXaddrows, andCPXchgcoeflist; these routines may be called in any order that is convenient. (For example, see Adding rows to a problem: example lpex3.c.)If the data already exist in a file using MPS format or LP format, you can use
CPXreadcopyprobto read the file and copy the data into the problem object. (For example, see Reading a problem from a file: example lpex2.c.)