Originally posted by: SystemAdmin
[prubin said:]
[quote author=makhlouf link=topic=390.msg1126#msg1126 date=1215775400]
Thanks for your reply,
Q1-Really, I use the C++ Builder 6 to construct my project, i tried to use ILOG CPLEX Cancert Technology, but i have an error "...can't open generic.h", (I have included lot of paths in my IDE, but...), so now, i like to try Callable library to program a Branch& Cut , and the problem is after looking the examples "Admipex4, 5.c" , i dont know how can i use it?
First off, admipex4.c and admipex5.c are C examples, not C++ examples. The C++ versions are named iloadmipex4.cpp and iloadmipex5.cpp.
Second, Borland's C++ compiler is not one of the ones that ILOG supports (see [url=http://www.ilog.com/products/cplex/product/platforms.cfm]http://www.ilog.com/products/cplex/product/platforms.cfm[/url]). That said, I had an earlier version of CPLEX running with an earlier version of C++ Builder years ago, before I saw the light and switched to Java. The generic.h header file is part of C++ Builder, not an ILOG file, so you should look for it and make sure that C++ Builder can see it. Trust me, you'll be much happier working with CPLEX in C++ than you will be in C.
[quote author=makhlouf link=topic=390.msg1126#msg1126 date=1215775400]
Q2- Mu second question is, I compiled successfully "Admipex5.c---->Admipex5.cpp",
What does this mean?? Did you compile the C version or the C++ version? I thought you said above that you couldn't compile it because the generic.h header was missing??
[quote author=makhlouf link=topic=390.msg1126#msg1126 date=1215775400]
and when i looked to the Model, i didnt't find the added constraints (8 constraints)!!! Why? Where did the compiler place them?
When cuts are added by a cut callback, they are added to the solver instance during the solution process, not to the model. If you print out the model after solving it, you will see only the constraints that were present when you called solve().
/Paul
#CPLEXOptimizers#DecisionOptimization