IloEnv is not working

人盡茶涼 提交于 2019-12-14 03:27:29

问题


I am using Java to solve a series of problems with Cplex. My main goad is to optimise different stances of a model with modified variables and constraints ( and no, I can't modify the main model every time). To do so, I want to use IloEnv, but, this command:

IloEnv env;

is not recognised by Cplex. It gives me the "IloEnv cannot be resolved to a type" error.

Any idea?


回答1:


IloEnv is only available in the C++ API, but not the Java API (where the memory management details are hidden).

With the Java API, you can just create an IloCplex for each instance of your model.

It would be well worth your time to look at the examples that are shipped with CPLEX Optimization Studio. If COSDIR is the location where you installed the product, then the examples can be found at COSDIR/cplex/examples/src/java.



来源:https://stackoverflow.com/questions/48653753/iloenv-is-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!