Can you re-post this question so that it also shows the AMPL definitions for F, y, and Pmax? Then it will be possible to give a more specific answer.
Bob Fourer
am...@googlegroups.com
=======
From:
am...@googlegroups.com [mailto:
am...@googlegroups.com] On Behalf Of skyline
Sent: Monday, November 23, 2015 2:07 PM
To: AMPL Modeling Language
Subject: [AMPL 11021] Non linear Constraint
I have Non linear Constraint in my problem given by :
C4{i in N} : F[i] == Pmax / (y[i]);
L{N} Variable such as 0=<F[i]<=Pmax
F{N} variable such as 0=<y[i]
Pmax is a positive paramater
When I solve this problem with C4 constraint using : KnitroAmpl, Bonmin, IPOPT.
The solvers to avoid the problem of division by zero they fix the value of y[i] to 1.I get wrong results because in many cases y[i] sould be equal to zero
here is an example of the solution i get:
: y F :=
1 5 2
2 1 10
3 1 10
4 1 10
5 1 10
6 1 10
7 1 10
8 1 10
9 1 10
10 1 10
;
When I should get the following :
: y F :=
1 5 2
2 0 10
3 0 10
4 0 10
5 0 10
6 0 10
7 0 10
8 0 10
9 0 10
10 0 10
;
I did add a test on the value of y[i]. I changed C4 by this constraint:
C444{i in N}: F[i] = if (y[i]=0) then Pmax
else Pmax/y[i];
I get the Same results also.