Skip to main content

All Questions

Tagged with
0 votes
1 answer
33 views

How to add an Array to a datasource in Cplex with Java API using an OPL model?

I'm a newbie with cplex. I have a model which is written in opl and I want to run the model from my java application. To do that I want to fill the external data directly from my application instead ...
Christof's user avatar
-1 votes
1 answer
50 views

How to Solve p-median with Java CPLEX?

This is an equivalent model to the sample that ships with CPLEX Studio/opl/examples/opl/pmedian, but written in OPL. Here is the equivalent in Java: import ilog.concert.IloConstraint; import ilog....
filipemb's user avatar
0 votes
2 answers
4k views

java.lang.ClassNotFoundException: com.zerog.lax.LAX

I'm trying to install a software called CPLEX, from IBM. They provided me with an .bin installer. When I try to run it, I get an error when a class is not found. Since I'm not familiar with this ...
Lucas Kuratani's user avatar
0 votes
1 answer
56 views

Writing a simple CPLEX model

I'm trying to write a CPLEX model that reflects this set of constraints: x, y, z in { 1, 2, 3 } constraint C1: AllDiff(x,y,z) constraint C2: z == x + 2y constraint C3: y < x constraint C4: z == 2x ...
Patrick Perkins's user avatar
0 votes
0 answers
56 views

CPLEX Java StaticLex is not applicable for (iloNumexpr, iloNumexpr)

I need to blend two objective functions f1 and f2 (see image here) where c is a continuous variable, C_{ug} is a binary variable and a,d and f are parameters. I'm using Cplex Studio IDE 22.1.0 Java ...
MARWA's user avatar
  • 1
-3 votes
1 answer
61 views

Exception in thread "main" java.lang.UnsupportedOperationException: CpxRange for general expressions error

i want to find solution of this problem plz:i use java,cplex .eclipse-java-2022-03-R-win32-x86_64 : the details are: obj : min x1x4(x1+x2+x3)+x4 s.t :x1.x2.x3.x4>=25 (square x1)+(square x2)+(...
Nada ALainiah's user avatar
0 votes
1 answer
315 views

Variables annotations in CPLEX for Automatic Benders decomposition Java API

I am trying to implement the automatic benders decomposition to my problem using CPLEX version 20.10. I want to use USER strategy where CPLEX attempts to decompose the model according to my ...
CHE's user avatar
  • 41
1 vote
1 answer
266 views

Integrate CPLEX with a Java application

We are developing an application that will use CPLEX to solve an industrial problem. A mathematical model (mod file) has been developed. We would like to use this model directly instead of re-...
qnhant5010's user avatar
0 votes
1 answer
763 views

java unable to find native libraries on java.library.path

So I am trying to run a very simple java program that uses IBM CPLEX on a mac. The program recognizes the JAR file but cannot seem to find the native implementations no matter where I point to it. The ...
bturner1273's user avatar
0 votes
0 answers
48 views

How to code a constaint that contains an integral in java &cplex?

I started Java programming 2 months ago. I don't know how to code a constraint in the Java+Cplex library. This constraint contains an integral. Does Java contain an integral library already and I'll ...
E.sop's user avatar
  • 1
1 vote
0 answers
149 views

How to divide IloNumExpr from Cplex?

I'm using Java to solve a maximization problem in Cplex. My objective function is quite complex. In a nutshell, there are two parts, A and B. Both of them contain variables. My goal is to maximize A/B,...
John Z's user avatar
  • 11
0 votes
0 answers
72 views

Link error: How do I run CPLEX java example in macos?

Am I missing anyting e.g escape char, '/', that would cause this linkage error? Command: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java \ -Djava.library.path=/...
Espresso's user avatar
  • 5,759
1 vote
0 answers
81 views

How to use CPLEX on google colab with java programming?

As IBM CPLEX can be accessed on the google colab by using python programming I was wondering if, is there any way to use that by java programming on the colab? If so, how we can import the CPLEX java ...
A.Omidi's user avatar
  • 113
1 vote
2 answers
243 views

How to enable linear relaxation outputs

I have a rather complex MILP, but the main problem is the number of continuous variables, not the number of binaries. I just "hard-coded" the linear relaxation to understand its output, and ...
Layla's user avatar
  • 125
0 votes
1 answer
227 views

How to get values of vars by its name

I'm using the CPLEX Java interface to do some MIP problems, the optimizer is doing well but I can't get values of vars by their names. The definitions of my vars are in a for loop, so in the outer ...
kentergav's user avatar

15 30 50 per page
1
2 3 4 5
14