# conditional constraint linearization

 0 how to put the following constraints in a linear form. if(T(i)

 1 You cannot do exactly what you asked, at least not in the context of a mathematical program. The problem is that strict inequalities are incompatible with mathematical programs. (They lead to feasible regions that are not closed.) One way to come close is the following:$T(i) \le T_{max}(i)+10x$ $T(i) \ge T_{max}(i)-10(1-x)$ The only issue here is that if $$T(i)=T_{max}(i)$$, $$x$$ can be either 0 or 1. An alternative that makes the value of $$x$$ unambiguous involves specifying some small $$\epsilon > 0$$ and partitioning the cases into $$T(i) \le T_{max}(i) - \epsilon$$ and $$T(i) \ge T_{max}(i)$$, making $$T_{max}(i) - \epsilon < T(i) < T_{max}(i)$$ infeasible. answered 01 Aug '17, 11:12 Paul Rubin ♦♦ 14.6k●4●12 accept rate: 19% Thank you so much for you reply...I am most grateful. According to my problem, the question can be rephrased to be: if(T(i)=Tmax(i)) then x=1 else x=0. Since Tmax is the maximum value of T, then T can never be greater than Tmax. you posted a solution using z1 and z2 in orinanobworld I am trying to use the same technique with only z1 that signifies y=Lz1(i)+Tmax(i)x(i)+(Tmax(i)+ϵ)z2(i) and x(i)+z2(i)+z1(i)=1. using this set of constraints cplex finds an infeasibility in x(i)+z2(i)+z1(i)=1. am i doing anything wrong? (03 Aug '17, 10:17) nardinebasta Yes, this is wrong. Look at what happens if z2(i) = 1. (03 Aug '17, 11:45) Paul Rubin ♦♦ i somehow got it. my constraints are now: T(i)≤Tmax(i)−ϵ∗(1−x) and T(i)≥Tmax(i)−10(1−x) in my problem T(i)=h(i)ho(i,j)+ w(i)wo(i,j)+s(i)*st(i,j) where ho,st,wo are parameters and h,w,s are the variables I need to optimize. Now using these constraints, for some i, T gets the value of ϵ and thus Tmax as well since it is calculated through the following constraint: Tmax(i)>=T(i). Where should I look? your help is highly appreciated i apologize am asking too much questions. i need this to validate my PhD theory in the area of VANET and I have no strong theoretical background in this area (04 Aug '17, 03:47) nardinebasta If $$T(i)\in [0.0008, 10]$$ then I assume you have either set 0.0008 as a lower bound for $$T(i)$$ or added the constraint $$T(i)\ge 0.0008$$. Thus if $$T(i)=\epsilon$$, I assume $$\epsilon \ge 0.0008$$. Are you saying that you know, for some reason, that $$T(i)$$ should not be that small? (04 Aug '17, 17:08) Paul Rubin ♦♦ yes, that exactly my problem now. t(i) should not be that small... this doesn't happen for all i, only some. hint on where the problem might be is highly appreciated. (06 Aug '17, 06:29) nardinebasta You apparently have an error in your model (but I have no idea where). The best general advice I can give is to do the following. First, ask yourself what aspect of the underlying problem would rule out $$T(i)=\epsilon$$. Second, ask yourself what constraints and/or bounds in the model capture that aspect of the problem. If none, you are apparently missing some constraints. Otherwise, plug your solution into those constraints and figure out why they are not violated by the solution. (06 Aug '17, 20:06) Paul Rubin ♦♦ my problem is finally solved.... am so grateful to you...many many thanks :) (22 Aug '17, 08:06) nardinebasta showing 5 of 9 show 4 more comments
 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: