# Converting a NLP constraint to LP constraint

 -1 Hello every body. I have a question and I need your help. I used a constraint in my model like this: X*Y. where X And Y are zero-one variables. You know that this constraint is a NLP. Do you know how I convert this constraint to LP constraint? It's a part of constraint for example: X*Y=T; I mean I need some values like this: if X and Y are one, T is one; otherwise T is zero. Unfortunately I just model this expression like above as a NLP constraint. great thanks asked 13 May '13, 02:23 behsharik 0●2 accept rate: 0% fbahr ♦ 4.6k●7●17 1 In what sense is this a constraint? It contains no relation. There might be different approaches depending on whether one wants simply to model the expression or how it acts in a particular relation. (13 May '13, 03:03) Matthew Salt... ♦ 2 Seems this is some homework as we get twice the same question from two newcomers (14 May '13, 10:05) jfpuget

 4 That is a logical AND condition. It cannot be modeled as a LP constraint, but can be modeled as an ILP one This set of constraints will do what you want: \begin{align} T &\leq X \\ T &\leq Y \\ T &\geq X + Y - 1 \\ T &\geq 0 \end{align} Incidentally, LPs comprise only continuous variables. Your (discrete) problem is not an LP. It is either an ILP (integer variables only) or an MILP (continuous and integer variables). The terminology is extremely important, because pure LP solvers cannot solve integer problems. answered 13 May '13, 05:53 Gilead ♦ 2.3k●5●14 accept rate: 15% Thank for your helping my friend. (14 May '13, 06:17) behsharik
 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: