New answers tagged

3 votes
Accepted

Coding some parameters with index zero in Julia

Just use c[i+1] when indexing c? ...
user avatar
3 votes

Can docplex solve a mixed integer quadratic programming (MIQP) problem?

In OPL You can write ...
user avatar
5 votes

How to use condition in cplex?

In OPL CPLEX you can use if then logical constraints. For instance ...
user avatar
3 votes

How to use condition in cplex?

It looks like you want to enforce $h_i = \max(\sum_{k,l} x_{i,j,k,l}-7, 0)$. Some solvers will automatically linearize this. Depending on where $h_i$ appears elsewhere in the problem, you might be ...
user avatar
  • 21.7k
1 vote

How to use condition in cplex?

Below is one way to formulate it. Need to introduce another binary variable ($\delta_{i,j}$). $M$ depends on bounds of $h_{i}$ and $x_{i,j,k,l}$ : $$ \begin{align} \sum_{k,l} x_{i,j,k,l}-7 &\le h_{...
user avatar
  • 959

Top 50 recent answers are included