Skip to main content

All Questions

Tagged with
0 votes
0 answers
116 views

why this little constraint changes my whole program?

I'm trying to linearize a CP in ILOG CPLEX. I have the following constraint that I want to linearize (I already simplified it with the big M) : ...
Marcocorico's user avatar
0 votes
0 answers
66 views

Why are these two constraint equations not equivalent?

I've made a CP Model of an hospital in ILOG CPLEX and I want to test the performance of the CPLEX version of it. In my CP model, I have the following constraint : ...
Marcocorico's user avatar
3 votes
2 answers
232 views

Convex equivalent of a constraint

I have a constraint as follows in my MILP model: $$ \sum_{e} (a_1(e) - a_2(e))^2 \leq M $$ Where, $a_1(e)$ and $a_2(e)$ are binary variables. Would you please guide me how can I find the equivalent ...
Mohammad Reza Salehizadeh's user avatar
2 votes
1 answer
251 views

Replace the constraint using ==> by a linear formulation

I would like to know how to express the continuity constraint without using a decision variable in the conditional form. My challenge is to stay with a linear formulation. I will start to explain my ...
Basma Ben Mahmoud's user avatar
1 vote
0 answers
92 views

Linearization of Conditional Constraints for MIP using Cplex

I'm currently working on a mixed-integer programming (MIP) problem and I'm trying to implement a set of conditional constraints in CPlex. These constraints involve decision variables that are indexed ...
B.Kim's user avatar
  • 11
2 votes
3 answers
2k views

How to use condition in cplex?

I want to use conditions to my variable. dvar boolean x[I][J][K][L] dvar in h[i] my code is ...
MIN's user avatar
  • 21
5 votes
2 answers
1k views

How to linearize a quadratic constraint to add it then via a callback function

Suppose we have a positive continuous variables $0 \le x \le UB$ where $UB$ is a known upper bound. How can we linearize the term $x^2$? Detailled problem: Suppose that via a callback we compute a ...
Farouk Hammami's user avatar
5 votes
3 answers
265 views

Problem with binary decision variable constraints in VRP

I would like to create non-linear violation costs in my VRP. I already created my whole VRP with time windows in which I have these decision variable: ...
Jeroen's user avatar
  • 51
5 votes
2 answers
104 views

How to formulate case distinctions in AMPLs objective function?

This is my first real optimization problem I formulated and now trying to solve by using AMPL. The following objective function is from a linear 0-1 LP means all variables $x_i^b\in\{0,1\}$, with $i\...
baxbear's user avatar
  • 319
11 votes
1 answer
671 views

k-means/k-medoids Clustering Implementation in CPLEX Java

I am trying to model a grouping algorithm as k-means clustering problem, by referring to the general definition as mentioned in Wikipedia. In my system, I have $N$ nodes that I want to group in $m$ ...
Betty's user avatar
  • 544