neos/ampl-ipopt problem

63 vues
Accéder directement au premier message non lu

Dridi Marwa

non lue,
9 nov. 2017, 05:53:3709/11/2017
à AMPL Modeling Language
Hello
I have an error while running my cod by Neos-ipot, and can not figure where it comes from.
Here is the error and thanks for your help.

Load Avg: ( 7.75 , 6.04 , 4.13 )
File exists
You are using the solver ipopt.
Executing AMPL.
processing data.
processing commands.

Presolve eliminates 19553 constraints and 6664 variables.
Substitution eliminates 141465 variables.
Adjusted problem:
185689 variables:
    168915 nonlinear variables
    16774 linear variables
144022 constraints; 1177823 nonzeros
    139829 nonlinear constraints
    4193 linear constraints
    144020 equality constraints
    2 inequality constraints
1 linear objective; 0 nonzeros.


cordially
Marwa

Robert Fourer

non lue,
10 nov. 2017, 10:45:1910/11/2017
à am...@googlegroups.com
I do not see any error reported in your NEOS listing. The AMPL statistics in the listing show "1 linear objective; 0 nonzeros" which implies that either your AMPL model does not have an objective function, or that all the variables in your objective were fixed by AMPL's presolve phase; thus there is nothing to optimize, but Ipopt should still find a feasible solution to your constraints if one exists.

For Ipopt this is quite a large problem. If you are not getting any useful results then you should consider (1) experimenting with a smaller version first, and/or (2) trying the other nonlinear solvers to see whether another one is better for your application.

Bob Fourer
am...@googlegroups.com

=======
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

Dridi Marwa

non lue,
13 nov. 2017, 03:45:3713/11/2017
à AMPL Modeling Language
Thank you for your reply

but the "1 linear object" does it mean that I have an objective function? "et "0 nonzeros " what exactly? and i have anather question if in the code I have nondifferentiable function is it that can make me a problem?

cordially
Mara

Robert Fourer

non lue,
13 nov. 2017, 22:27:4513/11/2017
à am...@googlegroups.com
If your model defines a linear objective function, but every variable in the objective either has a coefficient of zero or is fixed to zero (by AMPL's presolve phase), then you will see the "1 linear objective; 0 nonzeros" message. In that case the objective value is a constant and any feasible solution will be optimal.

In general, Ipopt and other nonlinear solvers do not work well with nondifferentiable functions; they get stuck at points that are not locally optimal, or fail to converge entirely. In a few cases, such as with min-max objectives or certain convex piecewise-linear functions, it is possible to transform the problem to an equivalent differentiable one.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Dridi Marwa
Sent: Monday, November 13, 2017 2:46 AM
To: AMPL Modeling Language

Dridi Marwa

non lue,
15 nov. 2017, 03:51:2215/11/2017
à AMPL Modeling Language
Thank you very much.


Le jeudi 9 novembre 2017 11:53:37 UTC+1, Dridi Marwa a écrit :

Dridi Marwa

non lue,
16 nov. 2017, 08:31:0416/11/2017
à AMPL Modeling Language
sorry for the inconvenience but I am a beginner in AMPL and I need your advice in my program I have non-differentiable functions in the following form:

param ZNmin;
param NJ;
param J_lev;
param
U_optl;
set Stage:=lev amf lax flo DRP eed  mat;
param tau_root;
param T_r1;
param T_r0;
var zeta_N1{1..NJ};
var I_N{1..NJ};
var t_th{Stage};
var u_dev{1..NJ};
var T_sol{0..Z,1..NJ};
var rho_root{0..Z,1..NJ};
var dl_root{1..NJ};
var zeta_w4{0..Z,1..NJ};
var zeta_N4{0..Z,1..nj};

s.t. zetaN1{j in 1..NJ}:zeta_N1[j]=min(1,max(ZNmin,I_N[j]))
s.t. uroot{j in 1..NJ}:u_root[j]= if J_lev <=j<J_amf then  1+(u_dev[j]/t_th['amf'])*(U_optl-1)
                                            else if j in interval(J_amf,J_lax] then U_optl+((u_dev[j]-t_th['amf'])/(t_th['lax']-t_th['amf']))*(3-U_optl)
                                            else 3;
s.t. dzpot{j in 1..NJ}: dz_pot[j]=if T_r0<T_sol[Z,j-1]<T_r1 then (T_sol[Z,j]-T_r0)*tau_root
                                                        else if T_r1<T_sol[Z,j-1] then (T_r1-T_r0)
                                                        else 0;
s.t. rhoroot{z in 0..Z, j in 2.. NJ}:rho_root[z,j]= if z=z_root[j] then rho_rF
                                                else dl_root[j]*(rho_root[z,j-1]/ rho_rF)*zeta_w4[j]*zeta_N4[j];

for the max(ZNmin,I_N[j]) function I try to express it in the following form <<ZNmin;ZNmin,1>>I_N[j]

but for others I find it a bit complicated thank your for your help

cordialy
Marwa
Le jeudi 9 novembre 2017 11:53:37 UTC+1, Dridi Marwa a écrit :

Robert Fourer

non lue,
17 nov. 2017, 11:38:4517/11/2017
à am...@googlegroups.com
You should fix all AMPL errors in your model so that it can be send to a solver. Your model refers to undefined params and vars such as Z and dz_pot. Also if you want to give the data for set Stage in the model, you need to write

set Stage := {"lev","amf","lax","flo","DRP","eed","mat"};

More generally, this does not appear to be an optimization problem. There is not objective function, and the constraints all define variables in terms of other variables. As a result you might not need to worry about the form of the functions in the constraints.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Dridi Marwa
Sent: Thursday, November 16, 2017 7:31 AM
To: AMPL Modeling Language

Dridi Marwa

non lue,
19 nov. 2017, 12:08:2419/11/2017
à AMPL Modeling Language
when i change set Stage by  {"lev","amf","lax","flo","DRP","eed","mat"};   i have this error
amplin, line 815 (offset 56350):
	expected ; ( : or symbol
context:  set Stage:= >>> { <<< "lev" "amf" "lax" "flo" "DRP" "eed" "mat"};
ting on prod-exec-1.neos-server.org
 Error (2) in /opt/ampl/ampl -R amplin

otherwise the part I sent you is not complete that's why i miss a lot of definition just i wanted to see with you how i can transform these function as a diférentiable problem

Le jeudi 9 novembre 2017 11:53:37 UTC+1, Dridi Marwa a écrit :

Robert Fourer

non lue,
20 nov. 2017, 17:29:0420/11/2017
à am...@googlegroups.com
The error message suggests that you have forgotten to put commas between the set members in the "set Stage := ... statement.

Please note that a complete and correct statement of the sets, parameters, and variables will be needed in order to give any specific advice about the constraints.

Bob Fourer
am...@googlegroups.com

=======

From: am...@googlegroups.com [mailto:am...@googlegroups.com] On Behalf Of Dridi Marwa
Sent: Sunday, November 19, 2017 11:08 AM
To: AMPL Modeling Language
Subject: [AMPL 15159] Re: neos/ampl-ipopt problem

when i change set Stage by {"lev","amf","lax","flo","DRP","eed","mat"}; i have this error
amplin, line 815 (offset 56350):
expected ; ( : or symbol
context: set Stage:= >>> { <<< "lev" "amf" "lax" "flo" "DRP" "eed" "mat"};
ting on prod-exec-1.neos-server.org
Error (2) in /opt/ampl/ampl -R amplin

otherwise the part I sent you is not complete that's why i miss a lot of definition
just i wanted to see with you how i can transform these function as a
diférentiable problem
.

Dridi Marwa

non lue,
24 nov. 2017, 10:28:4424/11/2017
à AMPL Modeling Language
Thank you for your reply
ok, and thank you for your advices, 

cordialy 
Marwa

Le jeudi 9 novembre 2017 11:53:37 UTC+1, Dridi Marwa a écrit :
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message