# linearization of a conditioal constraint

 0 Hello, I liniarized the following constraint: if(r1= 0 b2 - b1 >= 0 A2 * b2 + 30 * ( 1-b2 ) - A1 >= 0  Where b1 and B2 are two binary variables However this is not working. Your hel is highly appreciated asked 29 Jan '18, 10:08 nardinebasta 6●1●3 accept rate: 0%

 1 Are r1,r2,b1,b2,A1,A2 decision variables? if both r2, b1, A2, b2 are all decision variables, the formulation is not linear because of terms like r2*b1. Correct me if I am wrong One possible answer is: r2-r1 <= 29*b1 A2-A1>=((10+e)*b1-10) is the set of constrains if 'e' is a very small constant (tolerance like 10^-6 or so) you are ready to use, because in linear programs a strict ">" is not solvable with the available algorithms. This set of constraints will work only if r2<=r1 also means A2= (30*b1-29) because as per the requirement in the problem the binary variable should be active (1) when r2 > r1, and since they are integers the difference should be atleast 1. Was it this that caused it to not work? (30 Jan '18, 19:32) Naveen Divak... it didn't so much affect the result. May be because i was inaccurate when answering your question. r1,r2 are parameters whose values are predefined. A2 and A1 are variables whose values should be calculated. b1 and b2 are binary variables that i introduced to manage the constraints. (30 Jan '18, 20:00) nardinebasta if r1, and r2 are constants, you wouldnt need the binary variables, you can already construct the constraint saing A2 -A1 >= e, or A2 - A1 <= 0, based on what the values of r1 and r2 at the time you generate the lp model to solve. Maybe I am still not understanding your problem. (30 Jan '18, 20:26) Naveen Divak... in more details: r is the rank where r(u)
 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: