I am trying to solve an optimization problem with PyPSA in Google Colab using Gurobi as solver, which normally works perfectly fine on my local computer. When I try to run this in Google Colab I always receive the error of the size-limited license, although I have the correct non-size-limited academic license.
Before trying to run this in Google Colab I followed the steps indicated in the post "Google Colab: Installation and Licensing". The problem is that the model to be optimized is inside PyPSA and must not be created by myself with a line like
model = gp.Model(env=e)
as indicated in the aforementioned post.
So what I need is to find out how to make the model run in the correct environment.
I have run these lines of code to create the environment:
e = gp.Env(empty=True)
e.setParam('WLSACCESSID', 'your wls accessid (string)')
e.setParam('WLSSECRET', 'your wls secret (string)')
e.setParam('LICENSEID', <your license id (integer)>)
And I use this dictionary to pass specify some parameters for the Gurobi Solver:
Please sign in to leave a comment.