A script which runs perfectly in Pycharm can not be implemented in the Matlab environment.
AnsweredThe following errors occur.
Traceback (most recent call last):
File "dualSP.py", line 138, in <module>
[Aeq,Aineq,beq,bineq,f]=BVRP()
File "dualSP.py", line 107, in BVRP
A=m1.getA()
File "model.pxi", line 288, in gurobipy.Model.__getattr__
File "model.pxi", line 1576, in gurobipy.Model.getAttr
File "model.pxi", line 4403, in gurobipy.Model.__getattrinfo
AttributeError: 'gurobipy.Model' object has no attribute 'getA'
0
-
Hi Canqi,
You cannot simply run a Python script in Matlab. The APIs are very different. Please consult our documentation for further information.
The error message seems to be coming from Python, though, and suggest that you need to update your Gurobi installation - getA() was only introduced in version 9.0. You may also have an error in the Python code because getA() is a method and not an attribute, so you may be missing the brackets.
Cheers,
Matthias0
Please sign in to leave a comment.
Comments
1 comment