Hi,

I'm programming a linear programming model in C++ via CPLEX where the number of constraints is exponential. I'm looking for an optimal fractional solution and I would like to not add all the constraints from the beginning (because of the number of the number of constraints). So I have a separation oracle. I tried to use lazy constraint callback but I read that the lazy constraint callback is called only when an integer feasible candidate is found. I tried to use the user cut callback, but the callback was not called.

I would like to know how can I implement this model where some constraints are added on demand.

Regards,

Hugo.

asked 21 Oct '16, 14:44

HugoBraga's gravatar image

HugoBraga
112
accept rate: 0%


You have two options as follows:

  1. Solve the original model without the lazy constraints, add the active ones for the current optimal solution then and re-optimize. Repeat until no more constraint is added.
  2. Add a dummy integer variable to your model with all corresponding coefficients being zero. Then, you can use the lazy constraint callback.
link

answered 21 Oct '16, 16:36

Ehsan's gravatar image

Ehsan ♦
4.8k31122
accept rate: 16%

1

Just to be clear about Ehsan's first solution, unless you turn off the hot-start indicator (it is on by default), CPLEX will start the solution of each subsequent problem by trying to "repair" the basis of the optimal solution to the previous problem (most likely by doing a few dual simplex pivots). That can be pretty efficient.

(21 Oct '16, 19:54) Paul Rubin ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×231
×27
×3
×2

Asked: 21 Oct '16, 14:44

Seen: 571 times

Last updated: 21 Oct '16, 19:54

OR-Exchange! Your site for questions, answers, and announcements about operations research.