Reputation: 133
I am a beginner in using CPLEX in c++. I know how to solve a simple LP using CPLEX.
I am wondering if setting variables as integer (as follows), causes CPLEX use the branch and bound method to solve the MIP or it just solves a LP and at the end rounds the resulted values to integer?
I define everything same as a LP problem except variables. This is how I set the variables : IloIntVarArray Variables(env,LowerBound,UpperBound)
I really appreciate if you can help me or introduce a good tutorial for CPLEX in c++.
Thank you
Upvotes: 1
Views: 318
Reputation: 2072
Yes. Declaring any of your modelling variables as integer will give you a MILP model. CPLEX will (usually) use B&B to solve such models. Check out the provided samples which are available in C++ as well as C#, Java,etc.
Upvotes: 2