# HiGHS Error: No invertible representation for getDualRay

**URL:** <https://discourse.julialang.org/t/highs-error-no-invertible-representation-for-getdualray/101372>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [July 8, 2023, 10:29pm UTC](https://discourse.julialang.org/t/highs-error-no-invertible-representation-for-getdualray/101372 "2023-07-08T22:29:23Z")\
**Posts on this page:** 1\
**Showing post:** 16

<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:** [September 26, 2023, 2:04am UTC](https://discourse.julialang.org/t/highs-error-no-invertible-representation-for-getdualray/101372/16 "2023-09-26T02:04:38Z")

</div>

I haven’t tested this, but do instead something like

```julia
if demand
    P = Generate_PowerMatrix(L)
    R = Generate_DemandPeakRef(L.Δt, 4, 1)
    for i in 1:size(P, 1)
        if any(!iszero, P[i, :])
            @constraint(model, 0 <= P[i, :]' * x <= R[i])
        end
    end
end

```

---

_[View the full topic](https://discourse.julialang.org/t/highs-error-no-invertible-representation-for-getdualray/101372)._
