# Prevent dual ray calculation when using \`HiGHS\`

**URL:** https://discourse.julialang.org/t/prevent-dual-ray-calculation-when-using-highs/128414
**Category:** Optimization (Mathematical)
**Created:** [April 25, 2025, 7:09pm UTC](https://discourse.julialang.org/t/prevent-dual-ray-calculation-when-using-highs/128414 "2025-04-25T19:09:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sstroemer](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sstroemer](https://discourse.julialang.org/u/sstroemer)
#### Post date: [April 25, 2025, 7:09pm UTC](https://discourse.julialang.org/t/prevent-dual-ray-calculation-when-using-highs/128414/1 "2025-04-25T19:09:19Z")

</div>

I’m seeing the following log with an older model that I’ve just updated:

```console
Running HiGHS 1.10.0 (git hash: fd8665394e): Copyright (c) 2025 HiGHS under MIT licence terms
LP has 51118 rows; 38919 cols; 128913 nonzeros
Coefficient ranges:
  Matrix [2e-06, 4e+03]
  Cost [7e-02, 7e+02]
  Bound [0e+00, 0e+00]
  RHS [3e-03, 5e+07]
Presolving model
3144 rows, 21250 cols, 29864 nonzeros 0s
Problem status detected on presolve: Infeasible
Model status : Infeasible
Objective value : 0.0000000000e+00
HiGHS run time : 0.04
Solving LP to try to compute dual ray
LP has 51118 rows; 38919 cols; 128913 nonzeros
Coefficient ranges:
  Matrix [2e-06, 4e+03]
  Cost [0e+00, 0e+00]
  Bound [0e+00, 0e+00]
  RHS [3e-03, 5e+07]
Solving LP without presolve, or with basis, or unconstrained
Using EKK dual simplex solver - serial
  Iteration Objective Infeasibilities num(sum)
          0 0.0000000000e+00 Pr: 2921(2.32528e+08); Du: 0(3.18915e-09) 0s
       8921 9.6977738654e+00 Pr: 2677(1.35329e+08); Du: 0(4.50078e-05) 5s
      13852 1.3780839869e+01 Pr: 2866(2.76119e+08); Du: 0(2.02671e-05) 10s
      17865 2.3041731613e+01 Pr: 3004(2.32925e+08); Du: 0(1.5276e-05) 15s
      21885 3.9687283873e+01 Pr: 2535(7.27035e+07); Du: 0(1.71219e-05) 21s
      25139 2.5016489653e+02 23s
Model status : Infeasible
Simplex iterations: 25139
Objective value : 0.0000000000e+00
Relative P-D gap : 2.5016489664e+02
HiGHS run time : 23.42
Solving linear system to compute dual ray

```

`HiGHS` indicates infeasibility during presolve - how can I turn off the dual ray computation that follows? I didn’t find any (/new) setting in the list of options.

---

<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: [April 25, 2025, 10:18pm UTC](https://discourse.julialang.org/t/prevent-dual-ray-calculation-when-using-highs/128414/2 "2025-04-25T22:18:45Z")

</div>

There is no option.

HiGHS.jl always asks for the dual ray if the problem is infeasible:

> <https://github.com/jump-dev/HiGHS.jl/blob/c7e2fbd3f639e95c5edaafc1e433665f5bd82838/src/MOI_wrapper.jl#L2030-L2043>

Why do you want to opt-out of computing the dual ray?

---

<div class="post-metadata">

### Author: ![sstroemer](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sstroemer](https://discourse.julialang.org/u/sstroemer)
#### Post date: [April 26, 2025, 11:18am UTC](https://discourse.julialang.org/t/prevent-dual-ray-calculation-when-using-highs/128414/3 "2025-04-26T11:18:45Z")

</div>

Simply because of the the timing - comparing

```console
Problem status detected on presolve: Infeasible
Model status : Infeasible
Objective value : 0.0000000000e+00
HiGHS run time : 0.04

```

versus

```console
Model status : Infeasible
Simplex iterations: 25139
Objective value : 0.0000000000e+00
Relative P-D gap : 2.5016489664e+02
HiGHS run time : 23.42
Solving linear system to compute dual ray

```

This “problem” occurred during a MGA use-case, where spending \>100x the time necessary to detect that a given model is infeasible “just” to also get a dual ray isn’t worth it.

---

<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: [April 27, 2025, 8:12pm UTC](https://discourse.julialang.org/t/prevent-dual-ray-calculation-when-using-highs/128414/4 "2025-04-27T20:12:07Z")

</div>

I’ve opened an issue for a feature request in HiGHS.jl: [Add option to turn off certificates · Issue #273 · jump-dev/HiGHS.jl · GitHub](https://github.com/jump-dev/HiGHS.jl/issues/273)

---

<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: [April 27, 2025, 10:23pm UTC](https://discourse.julialang.org/t/prevent-dual-ray-calculation-when-using-highs/128414/5 "2025-04-27T22:23:02Z")

</div>

@sstroemer thoughts on [Add HiGHS.ComputeInfeasibilityCertificates attribute by odow · Pull Request #274 · jump-dev/HiGHS.jl · GitHub](https://github.com/jump-dev/HiGHS.jl/pull/274)?
