[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Setting a constraint
From: |
Mihai Banciu |
Subject: |
Re: [Help-glpk] Setting a constraint |
Date: |
Mon, 21 Nov 2005 03:25:14 -0500 |
User-agent: |
Thunderbird 1.5 (Windows/20051025) |
Hi,
That constraint would make the problem nonlinear (a bunch of products of
two variables). Hence, I really doubt you can do this in GLPK (where the
"L" stands for Linear).
However, the good news is that you might be able to reformulate your
constraint using some simple linearization technique. What is it that
you want to express? Do you want something like "if Xi is 1, then all
these Yj's must be 0"? If so, I think using |J|*Xi <= |J| - SUM(Yj)
might be what you want (where |J| is how many Y variables you have).
Regards,
Mihai
Pedro Oguri wrote:
> Hi,
>
> Is it possible to set this constraint ?
>
> SUM (Xi * Yj) <= 1
>
> where Xi and Yj are variables in {0,1}.
>
> Thanks in advance,
> Pedro
>
>
>
> ------------------------------------------------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
> <http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Help-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-glpk
>