Example: Network to LP Transformation

This example shows how to transform a network-flow problem into its corresponding LP formulation. That example also indicates why you might want to make such a change. The example reads a network-flow problem from a file (rather than populating the problem object by adding rows and columns as we did in netex1.c). It then attempts to solve the problem by calling the Callable Library routine CPXNETprimopt(). If it determines that the problem is infeasible, it then transforms the problem into its LP formulation so that the infeasibility finder can analyze the problem and possibly indicate the cause of the infeasibility in an irreducibly inconsistent set (IIS). To perform this analysis, the application calls the Callable Library routine CPXiiswrite() to write the IIS to the file netex2.iis.


Previous Page: Solving Network-Flow Problems as LP Problems  Return to Top Next Page: Complete Program: netex2.c