ILOG CPLEX 10.2 User's Manual > Discrete Optimization > Solving Mixed Integer Programming Problems (MIP) > Examples: Optimizing a Basic MIP Problem > mipex1.c |
mipex1.c |
INDEX
![]() |
The example derives from lpex8.c
. Here are the differences between that linear program and this mixed integer program:
setproblemdata
has a parameter, ctype
, to set the types of the variables to indicate which ones must assume integer values. The routine CPXcopyctype
associates this data with the problem that CPXcreateprob
creates.
CPXmipopt
to optimize the problem, rather than CPXlpopt
.
CPXgetstat
, CPXgetobjval
, CPXgetx
, and CPXgetslack
(instead of CPXsolution
) to get a solution.
CPXchgprobtype
to change the problem type to CPXPROB_FIXEDMILP
.
CPXprimopt
to optimize that problem.
CPXsolution
to get a solution to the fixed problem.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |