How to set @variable(m, tau[1:N] >0 ) with JuMP

I get an error when trying to set variables larger than zero. Is there any way to over come this?

ERROR: LoadError: LoadError: In @variable(m, tau[1:N] > 0): Unknown sense >

Thank you

I am not sure to understand what you are trying to do. Can you share the error and a minimal code reproducing it?
See PSA: make it easier to help you for more details.

1 Like

Thank you for your help. I have updated the error.

1 Like

Thanks, it’s much clearer now. You cannot use strict constraints in JuMP (no solver supports it anyway).
You can use @variable(m, tau[1:N] >= 0) if you are ok with the variable being zero. Otherwise, you need to model things differently but it’s difficult to give recommendation without more context on what you are trying to do.


Thank you for your help. I fixed it by very small number, e.g. 10^-8