ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Using Special Ordered Sets (SOS) > Example: Using SOS and Priority |
Example: Using SOS and Priority |
INDEX PREVIOUS NEXT |
These examples illustrate how to use SOS and priority orders.
This example derives from ilomipex1.cpp
. The differences between that simpler MIP example and this one are:
setPriorities
sets the priority order.
This example derives from mipex1.c
. The differences between that simpler MIP example and this one are:
setsosandorder
sets the SOS and priority order:
CPXcopysos
to copy the SOS into the problem object.
CPXcopyorder
to copy the priority order into the problem object.
CPXordwrite
.
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.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |