0

Suppose we have two variable x and y, and I want x-y between 0 and 1. So I did this

x = mdl.continuous_var(0, 1, 'x')
y = mdl.continuous_var(0, 1, 'y')
mdl.add_range(0.0, x - y, 1.0, f'_range_experiment')

In the LP file, I can see that this is translated into

_range_experiment: x - y- Rg_range_experiment = 1
 -1 <= Rg_range_experiment <= 0

This seems very strange to me. Totally not what I expected. It is correct, but very unpleasant to read. The desired output should be:

_range_experiment: x - y- Rg_range_experiment = 0
 0 <= Rg_range_experiment <= 1

I am wondering whether I can have some control over the LP file generated? Thanks!

qqzj
  • 21
  • 1
  • 6

0 Answers0