set_expr not working
- Dominant language
- Linear Programming
- Stars
- 600
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The functions below are not updating the coefficients
model.objective.set_expr()
constraint.expr.set_expr()
**To Reproduce**
```
from mip import Model, maximize
m = Model()
v = m.add_var('v', ub=1)
m.objective = maximize(v)
print(m.objective.expr) # should print {mip.Var id : 1}
m.objective.set_expr({v: 2})
print(m.objective.expr) # should print {mip.Var id : 2}
c = m.add_constr(v <= 0.5, 'c')
print(c.expr) # should print + v - 0.5
c.expr.set_expr({v: 0.6})
print(c.expr) # should print + v - 0.6
m.optimize()
```
**Expected behavior**
The output of the print statements should be as shown above in comments. However, they are not updating so it prints 1,1 and 0.5, 0.5. The expected solution to the problem is 0.6, but instead it is 0.5. Here is the ouput:

**Desktop:**
- Operating System, version: Ubuntu 18.04.4 LTS
- Python version: 3.7.3
- Python-MIP: 1.9.3
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.