Re: package gurobi does not exist (Solution found)

175 views
Skip to first unread message

Saeed Poormoaied

unread,
Jun 13, 2018, 12:16:38 PM6/13/18
to gur...@googlegroups.com
Dear Robert,

I found the solution of my problem. We need to add "model.update();" after adding any constraint, otherwise the constraint would not be added to the problem and JAVA gives "Error code: 20001. Variable not in model".

Thanks again for helping me.
Saeed



On Mon, Jun 4, 2018 at 6:50 PM, Saeed Poormoaied <s.poor...@gmail.com> wrote:
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


On Mon, Jun 4, 2018 at 5:42 PM, 'Robert Luce' via Gurobi Optimization <gur...@googlegroups.com> wrote:
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




--

---
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.


Reply all
Reply to author
Forward
0 new messages