Questions tagged [callback]

For questions on interfaces between a solver library and applications that allow to call user code at specific points in the solving process (e.g. on finding a new solution).

Filter by
Sorted by
Tagged with
2
votes
1answer
62 views

How to determine whether the solution is integer feasible in a CPLEX heuristic callback?

I am working with a MILP formulation of a routing problem using Concert CPLEX 12.10. And I am implementing a greedy heuristic that uses the variables fractional values to attempt to construct an ...
7
votes
1answer
82 views

Duals in CPLEX generic callback

When using a generic callback in the "relaxation" context, it is fairly clear how to get values of the primal variables in the LP relaxation (along with a bunch of other stuff), but I can't seem to ...
11
votes
1answer
119 views

CPLEX allows manually inserted solutions to violate lazy constraints

I am using CPLEX 12.9 to solve a mixed integer linear programming problem. Some of my constraints are enforced through a legacy LazyConstraintCallback. Heuristic solutions are inserted through a ...
7
votes
2answers
321 views

How can I implement a user-written lazy constraint callback in concert CPLEX with C++?

I am trying to implement a user-written lazy constraint callback in concert CPLEX with C++. Although I know there exists a way to implement callbacks in concert CPLEX with C++ via macros, I am looking ...
7
votes
1answer
140 views

Program can't stop when using callback of usercut in CPLEX to solve a branch-and-cut problem

When I tried to use Java to call CPLEX and use callback functions to solve a VRP problem with branch-and-cut, some problems emerged. I took out the subtour elimination constraint from the original ...
12
votes
1answer
510 views

Difference between lazy callbacks and using lazy constraints directly

I'm trying to use lazy constraints to solve an optimization problem. In some software such as CPLEX or GUROBI, they have some tools to handle them directly (in the original model) or using callback ...
12
votes
2answers
297 views

When does Gurobi add cuts from callback

A while ago I used Gurobi and I added user cuts from within a callback. However, I got the feeling that my user cuts were not directly added to the model. Is it right that Gurobi can decide to ...