# MIP start and Heuristic callback

**URL:** <https://discourse.julialang.org/t/mip-start-and-heuristic-callback/109615>\
**Category:** Optimization (Mathematical)\
**Tags:** gurobi\
**Created:** [February 2, 2024, 11:29am UTC](https://discourse.julialang.org/t/mip-start-and-heuristic-callback/109615 "2024-02-02T11:29:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![martina.gherardi](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@martina.gherardi](https://discourse.julialang.org/u/martina.gherardi)\
**Post date:** [February 2, 2024, 11:29am UTC](https://discourse.julialang.org/t/mip-start-and-heuristic-callback/109615/1 "2024-02-02T11:29:30Z")

</div>

Hi,

I would like to receive a message about constraint violation when using heuristic callback. When I warm start the model, if there is an infeasibility, I obtain

```julia
user MIP start violates constraints constraint_name by value

```

Instead, in the Heuristic callback, the message is

```julia
Heuristic_solution_rejected

```

but there is no additional explanation about violation of constraints.

In the MOI.callback.jl of gurobi.jl (MOI.HeuristicCallback), a solution is created, then the solution is passed to GRBcbsolution and the objective function value is got back and checked with respect to GRB\_INFINITY to eventually return

```julia
MOI.Heuristic_solution_accepted

```

Otherwise, rejected.

Is there a way to hack the code to get some additional information about the infeasibility of the partial solution passed with the heustistic callback?  
I want to know if the partial solution is infeasible or if gurobi does not complete the (feasible) partial solution I submitted.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [February 2, 2024, 8:12pm UTC](https://discourse.julialang.org/t/mip-start-and-heuristic-callback/109615/2 "2024-02-02T20:12:15Z")

</div>

You could ask Gurobi support for more information, but i don’t know of a way to find out why Gurobi rejected the solution.
