Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from gurobipy import *
- >>> m=Model("scanning")
- >>> from sympy import *
- >>> v=zeros(3,1)
- >>> ub=zeros(3,1)
- >>> lb=zeros(3,1)
- >>> x=m.addVar(lb=0,ub=3,vtype='I',name='x')
- >>> m.addConstr(Array([[1,2,3],[2,1,0],[2,3,1]])*x>=0,"c0")
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- File "/Users/midow/anaconda3/lib/python3.6/site-packages/sympy/tensor/array/ndim_array.py", line 346, in __mul__
- other = sympify(other)
- File "/Users/midow/anaconda3/lib/python3.6/site-packages/sympy/core/sympify.py", line 266, in sympify
- if a in sympy_classes:
- File "var.pxi", line 39, in gurobipy.Var.__hash__
- gurobipy.GurobiError: Variable has not yet been added to the model
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement