我最近正在使用eclipse中的gurobi(java),我确信我已经成功地获得了许可,当我使用gurobi来解决像这样的LP问题时,一切都很好:
public LP(int n, int[]s, int[][]b) throws GRBException
{
...
env = new GRBEnv("LPRelaxation.log");
model = new GRBModel(env);
}然后我添加了一个QP部件到我的程序中,错误发生了:
public QP() throws GRBException
{
env = new GRBEnv("LPRelaxation.log");
model = new GRBModel(env);
}错误:
Exception in thread "main" gurobi.GRBException: No Gurobi license found (user asus, host OWEN-ASUS, hostid fccf6a77)
at gurobi.GRBEnv.<init>(GRBEnv.java:20)
at methods.QP.<init>(QP.java:16)
....发布于 2019-02-19 04:53:09
使用许可证密钥文件的路径设置环境变量GRB_LICENSE_FILE
参考:https://www.gurobi.com/documentation/8.1/quickstart_mac/testing_your_license.html
https://stackoverflow.com/questions/44931340
复制相似问题