# 4 or more type 2 implies 3 or less type 1

 -1 I'm having difficulties with the logic with the last part of the reformulation. asked 08 Apr '16, 06:06 BCLC 8●3●12 accept rate: 0%

 0 You can omit #3 and #4 in your final constraints because the logical implications you want to model are only one direction. Also, make sure you use smallish values (separate for each constraint) of $$M$$, based on upper bounds on $$x_i$$. You can derive such upper bounds from the other constraints in the problem. answered 08 Apr '16, 11:00 Rob Pratt 1.2k●2●6 accept rate: 28% Are you sure? What if $$y_3 = 0$$ ? (08 Apr '16, 11:26) BCLC Yes. If $$y_3 = 0$$, then constraint #1 does nothing and constraint #2 forces $$x_1 \le 3$$, just like your logical implications specify. You do not need to model the converse implications. (08 Apr '16, 13:49) Rob Pratt Rob Pratt, what about $$x_2 \ge 4$$? I think that is in where, for example, constraint 3 would come (08 Apr '16, 14:00) BCLC Constraint #3 models the converse, if $$y_3 = 0$$ then $$x_2 \ge 4$$, but you do not need that. Statement b.iii in the problem is only a one-way if-then logical implication, not a two-way if-and-only-if. (08 Apr '16, 14:29) Rob Pratt Only constraints #1 and #2: If $$y_3 = 1$$, then $$x_2 \le 3$$. If $$y_3 = 0$$, then $$x_2 \le 3 + M$$ and $$x_1 \le 3$$...right? Is $$x_2 \le 3 + M$$ supposed to be the same as $$x_2 \ge 4$$? (08 Apr '16, 14:36) BCLC
 0 Let $$x_i$$ be the the number of ships of type $$i$$ to purchase. For 4a: $\min \ z = 20,000x_1 + 1,000x_2$ s.t. $2,000x_1 + 1,000x_2 \le 7,500$ $$12,000x_1 + 7,000x_2 \le 55,000$$ $$250x_1 + 100x_2 \le 900$$ $$x_1, x_2 \in {0,1,2,...}$$ For 4b: $\min \ z = 20,000x_1 + 1,000x_2 \color{red}{+ 2,000y_1 + 1,000y_2}$ s.t. same same same same $$x_2 \le My_1, y_1 \in {0,1}$$ $$x_2 - 2 \le My_2, y_2 \in {0,1}$$ ... I think we have to say, linearly, that: if $$x_2 \ge 4$$, then $$y_3 = 0$$. if $$y_3 = 0$$, then $$x_1 \le 3$$. then exactly one of the following (also linearly): converse of 'if $$x_2 \ge 4$$, then $$y_3 = 0$$' converse of 'if $$y_3 = 0$$, then $$x_1 \le 3$$' and also $$y_3$$ is binary. I believe these translate to: $$x_2 - 3 \le M(1-y_3)$$ $$x_1 - 3 \le M(y_3)$$ $$4 - x_2 \le My_3$$ $$4 - x_1 \le M(1-y_3)$$ $$y_3 \in {0,1}$$ Is that right? I think if I use 4 instead of 3, I'm going to get the contrapositive of $$(iii)$$. answered 07 May '16, 07:23 BCLC 8●3●12 accept rate: 0%
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags: