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's gravatar image

behsharik
02
accept rate: 0%

edited 13 May '13, 04:10

fbahr's gravatar image

fbahr ♦
4.6k716

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

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.

link

answered 13 May '13, 05:53

Gilead's gravatar image

Gilead ♦
2.3k513
accept rate: 15%

edited 13 May '13, 05:53

Thank for your helping my friend.

(14 May '13, 06:17) behsharik
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • 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:

×231
×127
×65
×7

Asked: 13 May '13, 02:23

Seen: 1,876 times

Last updated: 14 May '13, 10:12

OR-Exchange! Your site for questions, answers, and announcements about operations research.