ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Using Piecewise Linear Functions in Optimization: a Transport Example > Solving the Problem

The following lines create an algorithm (an instance of IloCplex) in an environment (an instance of IloEnv) and extract the model (an instance of IloModel) for that algorithm to find a solution.

    IloCplex cplex(env);
    cplex.extract(model);
    cplex.exportModel("transport.lp");
    cplex.solve();