I have been modelling a LP problem with ~ 50k variables. Some of them are bounded, the other ones can take any value, i.e., they are unbounded. I coded the objective function and constraints but at the end, I got this result:

`WARNING: Not solved to optimality, status: Unbounded`

and also, the constraints I have specified were not respected.

I can understand that my problem has variables unbounded, but it also has variables bounded. Anyone knows how it’s possible? The solution was supposed to respect the constraints even though they are not specified for all the variables… Thanks in advance.

# LP having unbouded and bounded variables

**jayce_ram**#1

**mohamed82008**#2

Without an example that people can run, there is not much any one here can do to help.

**leethargo**#3

Maybe some variables do not appear in the constraints? The status `Unbounded`

here refers to the objective value, not individual variables. That is, there is a direction in which the objective values keeps improving while staying feasible.

**blegat**#4

If the problem is unbounded, JuMP sets the value of the variables to the unbounded ray

The unbounded ray is not a feasible solution of the problem, it is a feasible solution of the problem where the constants are replaced by 0.

For instance, for the problem

```
min x
s.t. y == 1
```

the unbounded rays is `u = (x=-1, y=0)`

which is feasible for the problem

```
min x
s.t. y == 0
```

The reason is that the unbounded ray should be added to a feasible solution `z`

(e.g. `z = (x=0, y=1)`

to get a ray `z + a u`

that is feasible for any `a >= 0`

and for which the objective function tends to minus infinity when `a`

tends to infinity.