Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

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

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...