Code: Select all

```
x.lo(i,dl)=MinGen(i);
x.up(i,dl)= MaxGen(i);
```

While minimizing a cost function with constraints specified as equations, I get 0 for all marginal values, but if I use x.lo and x.up (x is a variable) then I get a bunch of different marginal values. In both scenarios, optimized value stays the same and constraints are followed. Why is there a difference between marginal values? I attached the gams file which will return 0 for all marginal costs of x, but if you add the following 2 lines the marginal costs change completely.

Code: Select all

```
x.lo(i,dl)=MinGen(i);
x.up(i,dl)= MaxGen(i);
```

Why would you expect marginal costs to be *unchanged*?

If you add, remove, or alter constraints and bounds you can expect a change in level and/or marginal values.

-Steve

If you add, remove, or alter constraints and bounds you can expect a change in level and/or marginal values.

-Steve

I totally understand that, but there is no change in constraints as I already have constraint equations on x. The difference occurs when I explicitly state x's bounds via x.lo and x.hi instead of using x(i,dl) =L= MaxGen(i) and x(i,dl) =G= MinGen(i,dl). However, the same marginal costs are displayed in tables for MinGen and MaxGen, so I believe this is more of a syntax problem rather than something about the solver.