Skip to main content

New answers tagged

0 votes

How to generate random bounded polytope by MATLAB defined by Ax=b, x≥0

I don't use MATLAB, but the following should be straightforward to implement. I am going to assume that you start knowing the dimension $n$ of $x.$ The first step is to partition $n$ randomly into $...
prubin's user avatar
  • 39.5k
0 votes

Adopt constraint formulation

Maybe try something like: $$\sum_{j=t}^{t+F-1}(1-y_{ij})\geq F\cdot (y_{i(t-1)}-y_{it})\quad \forall i\in I, t\in \{2,\ldots,T-F+1\}$$.
mingabua's user avatar
1 vote

Inconsistencies in modeling a binary variable that indicates a switch

I'm going to assume that time indexing starts at 1. You can introduce a new binary variable $\gamma_{p,t}$ together with the constraints $$\gamma_{p,1}=1$$ $$\gamma_{p,t} \le \gamma_{p, t-1}$$ $$\...
prubin's user avatar
  • 39.5k
1 vote

PULP: Optimization Assignment of Bicycle production per month

For both Q1 and Q2, you need to enforce $y_i = 1 \implies x_i \ge 1$, which you can do via linear constraint $y_i \le x_i$. For Q1: Replace $15 x_C$ with $15(1 - 0.2 y_A y_H) x_C$ in the working ...
RobPratt's user avatar
  • 32.7k
0 votes

Generalize working days constraints

Have you also considered an alternate formulation where you give all possible blocks as decision variables? So, instead of working day making the model choose which working blocks should be used? ...
Arvind Kumar's user avatar
0 votes

Combine two constraints into one

Assuming that for fixed $j$ and $t$ there is a lower bound $L_{jt}>0$ on the motivation of anyone assigned to a shift (0.1 is suggested in a comment), the second constraint can be replaced by an ...
prubin's user avatar
  • 39.5k
0 votes

Combine two constraints into one

I wonder if the second constraint can be replaced by a simple upper bound on $s^+_{jt}$? Something like $$ \begin{align} &\sum_{i}^{}m_{ijt}+s^+_{jt}\ge Demand_{jt}&\forall j,t\\ &s^+_{jt} ...
Henrik Alsing Friberg's user avatar

Top 50 recent answers are included