# How to choose at least one contraint from a set of constraints in integer programming?

 0 I have a binary decision variable $$x_{kn}$$ and I would like to model a situation like the following: If $$x_{kn}=1$$, then $$A_n\geqslant b_k$$ or $$A_n+C_{n+1}\geqslant b_k$$ if $$C_{n+1}>0$$ or $$A_n+C_{n+1}+C_{n+2}\geqslant b_k$$ if $$C_{n+1}>0$$ and $$C_{n+2}>0$$ or ... or $$A_n+C_{n+1}+\ldots+C_{n+p}\geqslant b_k$$ if $$C_{n+1}>0$$ and $$C_{n+2}>0$$ and $$\ldots$$ $$C_{n+p}>0$$ Where, $$p\geqslant2$$ is given, $$C_n$$ and $$b_k$$ are non-negative integers given as inputs and $$A_n$$ is a non-negative integer decision variable. At least one constraint of the above $$p+1$$ constraints has to be true. Can I model this in linear integer programming? I thought of adding binary variables $$y_i$$ such that $$x_{kn}=\sum_{i=1}^{p+1}y_{ikn}$$ but I cannot continue (if I am even right). asked 10 Jan '18, 11:41 zbir 17●1●4 accept rate: 0%

 2 I suspect you have some indexing errors in your question. If all $$C_n$$ are nonnegative, each constraint implies the next, so the OR operator reduces to the last constraint. answered 10 Jan '18, 12:58 Rob Pratt 1.2k●2●6 accept rate: 28% So you mean I just have to write the constraint like $$A_n+C_{n+1}+\ldots+C_{n+p}\geqslant b_k x_{kn}$$ ? (10 Jan '18, 13:42) zbir Yes, if your question is stated correctly. (10 Jan '18, 14:01) Rob Pratt Let me give an example to illustrate my problem. Assume $$p=3$$ and $$b_k=3$$ and $$C_{n+1}=0$$, $$C_{n+2}=0$$ and $$C_{n+3}=1$$. Also, say, the variable $$A_{n}=2$$. Here, $$A_n+C_{n+1}+C_{n+2}+C_{n+3}\geqslant b_k$$ but I cannot set $$x_{kn}=1$$ because $$A_n+C_{n+1}+C_{n+2}< b_k$$. (10 Jan '18, 14:29) zbir I have updated the question. (10 Jan '18, 14:31) zbir
 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: