This example derives from mipex1.c
. The differences between that simpler MIP example and this one are:
-
The problem solved is slightly different so the output is interesting. The actual SOS and priority order that the example implements are arbitrary; they do not necessarily represent good data for this problem.
-
The ILOG CPLEX preprocessing parameters for the presolver and aggregator are turned off to make the output interesting. Generally, this is not required nor recommended.
-
The routine
setsosandorder
sets the SOS and priority order:
-
It calls
CPXcopysos
to copy the SOS into the problem object.
-
It calls
CPXcopyorder
to copy the priority order into the problem object.
-
It writes the priority order to files by calling
CPXordwrite
.
-
The routine
CPXwriteprob
writes the problem with the constrainnts and SOSs to disk before the example copies the SOS and priority order to verify that the base problem was copied correctly.