Passing a WLSToken to Gurobi environments
ユーザーの入力を待っています。Hello,
I've been trying to use the WLSToken parameter to pass a token to my Gurobi environment like it is mentioned here: https://www.gurobi.com/documentation/11.0/refman/wlstoken.html.
I get the following error message regardless of the token's content: `Gurobi Error 10003: No web license service access ID given`.
I'm requesting a token from https://token.gurobi.com/api/v1/tokens using my WLS credentials.
Is this still supported?
Thanks
-
正式なコメント
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi, David!
In Python you can also provide programmatically the WLS credentials, which can be found in the license file that you previously downloader from our Web License Manager, as follows:
import os
import gurobipy as gp
from gurobipy import GRB
GRB_HOME = os.environ.get("GUROBI_HOME")
myenv = gp.Env(empty=True)
#Info contained in the API key file.
myenv.setParam("WLSAccessID", <myWLSAccessIDAsString>)
myenv.setParam("WLSSecret", <myWLSSecretAsString>)
myenv.setParam("LicenseID", <myLicenseIDAsInteger>)
myenv.start()
model = gp.read(f"{GRB_HOME}/examples/data/afiro.mps", env=myenv)
model.optimize()
model.dispose()
myenv.dispose()Finally, it's worth noting you seem to be a commercial user. Remember that you request support by opening a ticket in our Help Center.
0 -
Hi Juan,
thank you for the message! I can verify that using `WLSAccessID`, `WLSSecret`, and `LicenseID` works for me. Is it possible to only supply the `WLSToken` without the other parameters? I would like to separate the service requesting tokens from the service running the Gurobi optimizer for security reasons. I used the WLS credentials to request a token from `https://token.gurobi.com:443/` and want to pass this token to the Gurobi environment.
Thanks,
David
0 -
Yes, this is still supported. Can you please make sure the Gurobi version specified in your POST request matches the version of Gurobi you're using to run your code? I could reproduce the error you described when passing a Gurobi 11.0.2 WLS token to Gurobi 11.0.1, and vice versa.
0
投稿コメントは受け付けていません。
コメント
4件のコメント