Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
353 views
in Technique[技术] by (71.8m points)

java - IloEnv is not working

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...