New answers tagged

0 votes

Converting a piecewise function to linear equations

Judging by the additional remarks in the comments, it seems like you want to linearize: $$ \alpha = \begin{cases} \alpha_1, \quad \text{if} \quad \sum_{i \in J_1} x_i = |J_1| = 1 \\ \alpha_2, \quad \...
joni's user avatar
  • 1,562
0 votes

How to linearize a product of an integer and a binary variable

Some comments already hinted at questions that give you the answer. In your specific example, this translates to the following: \begin{align} 0 \leq number_t \leq (number_{t−1}+new_t) \newline ...
PeterD's user avatar
  • 1,501
1 vote

Weighted sum in the objective function

We typically normalize on seconds, minutes xor dollars, for as far as that is possible. And then leave it to a business stakeholder alignment meeting to tweak the weights. But normalization is not ...
Geoffrey De Smet's user avatar
3 votes

How to modify master problem and individual sub problems in column generation?

Your problem is: \begin{align} &\text{minimize} &\sum_t \sum_s \text{slack}_{ts} \\ &\text{subject to} &\sum_i \text{motivation}_{its} + \text{slack}_{ts} &= \text{demand}_{ts} &...
RobPratt's user avatar
  • 31.5k
0 votes

PuLP is ignoring constraints, and setting everything to 0 for minimization problem

I don't think you should have binary constraints here at all. Infer "use" by a treatment-specific rate being non-zero. One obvious quirk is that, with no other constraints on available ...
Reinderien's user avatar
0 votes

Scheduling: Connecting the end and the beginning of the planning horizon

You can take time indexes mod $T$ to make it work. Rewrite the first constraint as $$ \sum_{d=t-6}^t \,\sum_{k\in K} x_{i,d\bmod T,k} \le 6 \quad \forall i\in I, t\in \lbrace 1,\dots, T\rbrace.$$ So, ...
prubin's user avatar
  • 38.7k
2 votes

Help with formulating the objective function of my subproblem

Your original problem is: \begin{align} &\text{minimize} &\sum_t \sum_s \text{slack}_{ts} \\ &\text{subject to} &\sum_i x_{its} + \text{slack}_{ts} & = \text{Demand}_{ts} &&...
RobPratt's user avatar
  • 31.5k

Top 50 recent answers are included