Hi, everyone

I’ve met a problem about nonliear programming.

the issue is

max f = cx

s.t. Ax=0

Ky = 0;

x*y 0 or x <0

y=0, when x =0

in the formulae, x, y, 0 are vectors, A,K are matrix.

I was stuck on the last two constraints, which I transformed into

sign(x) + sign(y) =e=0 and x*y=l=0 and I used dnlp solver. However,

the GAMS failed to proceed due to “too small pivot”.

Any Clues?

Thank you in advance!

Best

\

Hello Riyeyan

Is it possible to convert your problem in an MIP? As far as I can see,

the only non-linearity in your formulation is the product x*y, am I

correct?

So, we could first decompose x and y in 4 positive variables:

x =e= xPlus - xMinus;

y =e= yPlus - yMinus;

To ensure that either xPlus or xMinus is greater than 0 (but not both

at the same time), we need to add two Big-M constraints:

xPlus =L= M * BinaryX;

xMinus =L= M * (1-BinaryX);

The same is valid for y:

yPlus =L= M * BinaryY;

yMinus =L= M *(1- BinaryY);

Of course, BinaryX and BinaryY are two binary variables and M is an

arbitrary upper bound. You don’t need to use the same value of M in

all the constraints as the upper bounds in X and Y can be quite

different.

Now, to represent that x and y have opposite signs at any time, we

write

BinaryX + BinaryY =e= 1;

And finally, if both xPlus and xMinus are 0 than yPlus and yMinus must

be 0 too. This can be accomplished with another big-M constraint:

yPlus + yMinus =L= M * (xPlus + xMinus);

I’m not sure if this is the best approach because sometimes MIP

problems are also quite difficult to solve, but at least this is

another way to think.

Good luck and let me know if something is not clear.

Cheers

Bruno

On 9 ago, 00:48, Riyeyan wrote:

Hi, everyone

I’ve met a problem about nonliear programming.

the issue is

max f = cx

s.t. Ax=0

```
Ky = 0;
x*y 0 or x >
y=0, when x =0
```

in the formulae, x, y, 0 are vectors, A,K are matrix.

I was stuck on the last two constraints, which I transformed into

sign(x) + sign(y) =e=0 and x*y=l=0 and I used dnlp solver. However,

the GAMS failed to proceed due to “too small pivot”.

Any Clues?

Thank you in advance!

Best

\

Dear Bruno,

Thank you very much for your inspirational suggestion!

Indeed, there is only one nonlinear constraint (x*y 0, Y=0, all the constrains were met, but it is not

what we want, since product of X and Y should be strictly less than

zero, when neither X nor Y is zero.

So, is it possible to add another constraint, just like the last one

you mentioned?

i.e. xPlus + xMinus =L= M*(yPlus + yMinus)

I’ll try your way and my idea in GAMS.

Thank you!

Best regards

On Tue, Aug 10, 2010 at 6:22 AM, Bruno wrote:

Hello Riyeyan

Is it possible to convert your problem in an MIP? As far as I can see,

the only non-linearity in your formulation is the product x*y, am I

correct?

So, we could first decompose x and y in 4 positive variables:

x =e= xPlus - xMinus;

y =e= yPlus - yMinus;

To ensure that either xPlus or xMinus is greater than 0 (but not both

at the same time), we need to add two Big-M constraints:

xPlus =L= M * BinaryX;

xMinus =L= M * (1-BinaryX);

The same is valid for y:

yPlus =L= M * BinaryY;

yMinus =L= M *(1- BinaryY);

Of course, BinaryX and BinaryY are two binary variables and M is an

arbitrary upper bound. You don’t need to use the same value of M in

all the constraints as the upper bounds in X and Y can be quite

different.

Now, to represent that x and y have opposite signs at any time, we

write

BinaryX + BinaryY =e= 1;

And finally, if both xPlus and xMinus are 0 than yPlus and yMinus must

be 0 too. This can be accomplished with another big-M constraint:

yPlus + yMinus =L= M * (xPlus + xMinus);

I’m not sure if this is the best approach because sometimes MIP

problems are also quite difficult to solve, but at least this is

another way to think.

Good luck and let me know if something is not clear.

Cheers

Bruno

On 9 ago, 00:48, Riyeyan wrote:

Hi, everyone

I’ve met a problem about nonliear programming.

the issue is

max f = cx

s.t. Ax=0

```
Ky = 0;
x*y 0 or x > >>
y=0, when x =0
```

in the formulae, x, y, 0 are vectors, A,K are matrix.

I was stuck on the last two constraints, which I transformed into

sign(x) + sign(y) =e=0 and x*y=l=0 and I used dnlp solver. However,

the GAMS failed to proceed due to “too small pivot”.

Any Clues?

Thank you in advance!

Best

–

To post to this group, send email to gamsworld@googlegroups.com.

To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

– Yours, Yan Zhu Institute of Microbiology, Chinese Academy of Sciences Datun Rd. Chaoyang District Beijing 100101 P. R. China