# Tag Info

9

You can activate variable $Y[j,t]$ when $O[j,t]$ is active ($O[j,t] \; \Longrightarrow \; Y[j,t]$) with: $$O[j,t] \le Y[j,t] \tag{1}$$ And then make sure $Y[j,t]$ remains active ($Y[j,t] \; \Longrightarrow \; Y[j,t+1]$): $$Y[j,t] \le Y[j,t+1] \tag{2a}$$ I suppose there is some cost on variables $Y[j,t]$ ? If so, this cost should preclude the solver from ...

9

There are many ways to do this. Here is a popular one: define a binary variable $x_i$ per interval $[b_i,b_{i+1}]$ and use the following constraints: \begin{align*} 1&=x_0+x_1+\cdots+x_n \tag{1}\\ 0x_0 + (b_0+\epsilon)x_1 + \cdots+ (b_{n-1}+\epsilon)x_n \le Y_t &\le b_0x_0 + b_1x_1 + \cdots+ b_nx_n \tag{2}\\ r_t &\ge f_i - M_i(1-x_i) \tag{3}\\ ...

7

So you are dealing with a configuration where for any path $A-B-...-Z$, the reverse path $Z-...-B-A$ is also valid. To break this symmetry, you can impose that the index of node $A$ must be smaller than the index of node $Z$: $$x_{i0} \le \sum_{j| j\le i}x_{0j}\quad \forall i$$ This way, if arc $(i,0)$ enters the depot, then there must be a lower indexed ...

7

within CPLEX you could try CPOptimizer and use intervals. In OPL (One of CPLEX API) you could write using CP; int sizeT=10; range T=1..sizeT; int d[i in T]=i; dvar interval t[i in T] size d[i]; {int} T1={i | i in T : i <=(sizeT div 2)}; {int} T2=asSet(T) diff T1; subject to { forall(i in T1,j in T2) overlapLength(t[i],t[j])==0; } and then see This ...

7

One simple approach is to impose the classical non-overlap constraints for each pair of tasks for which one task is in $T_1$ and one task is in $T_2$, as shown here.

6

It looks like you want to model $x \; \Longrightarrow \; y$, or in conjunctive normal form : \begin{align*} \lnot x \vee y \\ 1-x + y \ge 1 \\ x \le y \end{align*} If $y$ takes value $1$ when a given parameter $p$ is larger than a given variable $z$, then you need to add $p > z \; \Longrightarrow y=1$, or its contraposition $y=0 \; \Longrightarrow \; p \... 6 For asymmetric TSP, you can use a directed graph, with variables$x_{i,j}$for$i \not= j, and the flow balance constraints are: \begin{align} \sum_{j \not= i} x_{i,j} &= 1 &&\text{for alli$} \\ \sum_{j \not= i} x_{j,i} &= 1 &&\text{for all$i} \\ \end{align} For symmetric TSP, you should use an undirected graph, with variables...

6

You want to model constraints of the form $$x_1 \le a_1 \quad \Longrightarrow \quad x_2 \in [b_2,c_2]$$ Define a binary variable $y \in \{0,1\}$ and use constraints \begin{align*} 0 &\le x_1 \le a_1 + M_1(1-y) \tag{1}\\ b_2 - M_3(1-y) &\le x_2 \le c_2 +M_2 (1-y) \tag{2} \end{align*} Constraint $(1)$ enforces $y=1 \; \Longrightarrow \; x_1 \le a_1$,...

4

Via conjunctive normal form: $$A_i \implies \bigwedge_j \lnot B_j \\ \lnot A_i \lor \bigwedge_j \lnot B_j \\ \bigwedge_j (\lnot A_i \lor \lnot B_j) \\ \bigwedge_j (1-A_i +1- B_j\ge 1) \\ \bigwedge_j (A_i +B_j\le 1) \\$$ The other implication $$B_j \implies \bigwedge_i \lnot A_i$$ yields the same linear constraints. From your comment, you also want to ...

4

I assume for you have a binary matrix $S_{i,t}$ (tasks)$\times$(time steps) which tells you whether some task $i$ is active at time $t$. This approach introduces additional variables unless you have other parallelism constraints that can only be expressed in that format or of your objective depends on it like it does here. Define a new binary matrix of $G_{g,... 2 The quickest way to study this is to use Generalized Disjunctive Programming. If we use disjunctions to formulate the problem, we get: $$min/max \quad z=f(x)\\ \begin{bmatrix} Y_1 \\ x_1 = a \\ x_2 \geq c\\x_3 \geq d \end{bmatrix} \veebar \begin{bmatrix} Y_2 \\ x_1 = b·x_3 \\ x_2 \geq c\\0\leq x_3 \leq d \end{bmatrix} \veebar \begin{bmatrix} Y_3 \\ x_1 = 0 ... 1 The third process does not always have lowest capacity. In fact, it never does. Ask yourself the following question: for what batch size does etching take less total time (setup plus processing) than patterning takes? 1 I would add an auxiliary variable z\in\{0,1\}:$$ z \geq a_i \ \ \forall a_i \in A $$Then you can write:$$ b_j \leq 1-z \ \ \forall b_j \in B$$If$z=0$, then the constraint is redundant. However, if$z=1$, then all elements of$B$have to be 0. Update: @RobPratt correctly pointed out that the above formulation allows for$a_i = b_j = 0\$, which ...

1

Based off on what Daniel commented: select all the edges used in any vehicle's tour that are asymmetrical group them by vehicle, collecting the count of the number of asymetrical edges in that vehicle's tour add a hard constraint that there must be at least one (=> penalize if count is zero) Alternatives: Make it a soft constraint: Add a soft ...

Only top voted, non community-wiki answers of a minimum length are eligible