package gurobi does not exist

221 views
Skip to first unread message

Saeed Poormoaied

unread,
May 30, 2018, 7:00:55 AM5/30/18
to Gurobi Optimization
Dear all,

I am using Guribi with Netbeans interface. I do not know how to add the Gurobi package to NetBeans. I looked over the FAQs provided in gurobi optimizer web. But, it does not work. 
Thanks in advance.

The best,
Saeed

Robert Luce

unread,
May 30, 2018, 3:46:05 PM5/30/18
to Gurobi Optimization
Hi Saeed,

could you please post an exact error message, or a screen shot?

The first step is to add the file gurobi.jar to your project's libraries in Netbeans.  You can find this jar file in the Gurobi installation directory, in the folder 'lib'.

Robert

Saeed Poormoaied

unread,
May 31, 2018, 11:10:38 AM5/31/18
to gur...@googlegroups.com
 Dear Robert Luce,

Thank you very much for the reply. It is the error. I added the gurobi.jar, but I still have this error. Could you please tell me where I should paste gurobi.jar in the Netbeans files?





--

---
You received this message because you are subscribed to a topic in the Google Groups "Gurobi Optimization" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gurobi/PnaeVp7plZ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gurobi+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Luce

unread,
Jun 4, 2018, 10:42:08 AM6/4/18
to Gurobi Optimization
Hello Saeed,

Please put the gurobi.jar file per drag-and-drop to project tree at

<your application>
  + Libraries 

Please find attached a screenshot of the sample project tree I created on my machine.

Robert




Auto Generated Inline Image 1

Saeed Poormoaied

unread,
Jun 4, 2018, 2:19:13 PM6/4/18
to gur...@googlegroups.com
Dear Robert,

Thank you very much for the reply. I fixed it and it is now working. But I encountered another problem which I attached it. I did copy and paste the Gurobi Code provided on the website. For example, I used  Mip2.java. But it gives an error "Error code: 20001. Variable not in model". I used all sample examples on the web. In all cases, it gives the same error as above. Could you please tell me how I can fix this error? Thanks in advance for your help.

The best,
Saeed


ErrorCode_Saeed.png

Robert Luce

unread,
Jun 18, 2018, 6:10:03 AM6/18/18
to Gurobi Optimization

Hello Saeed,

I cannot reproduce the error you are reporting.  Could you maybe debug this on your side a little bit further and find out at which line the error is thrown?

Robert

Saeed Poormoaied

unread,
Jun 18, 2018, 9:35:47 AM6/18/18
to gur...@googlegroups.com
Hello Robert,

I solved my problem. I sent an email to you. I think you didn't receive it. The error was exactly in the lines at which I add constraints. Whenever, you write a constraint you need to write "model.update(); " in order to the model is updated. Now, the model is along with constraint and it is working.

Thank you very much for your consideration.
Saeed Poormoaied

--
Reply all
Reply to author
Forward
0 new messages