IPOPT Restoration phase failed

1,509 views
Skip to first unread message

Mohammadhasan Fathollahzadeh

unread,
Mar 10, 2021, 9:09:39 PM3/10/21
to AMPL Modeling Language



Hi, 

I am using AMPL Python API using the IPOPT solver and I am getting the following error as the optimization procedure starts. I was wondering if anyone could help me with that:

Thanks for your help,

RestorationFailed.JPG

AMPL Google Group

unread,
Mar 11, 2021, 1:27:52 PM3/11/21
to AMPL Modeling Language
The "error evaluating Jacobian of equality constraints at user provided starting point" refers to computation of the derivatives of the constraint functions. It is telling you that at the initial values of the variables provided from AMPL to Ipopt, some of the derivative values could not be computed. If Ipopt continues running and produces a solution, then it has worked around the error and you can ignore it if you like. If you want to know more about the error, try following the instructions to set

option ipopt_options 'halt_on_ampl_error=yes';

(or if you are already seting an ipopt_options string, add halt_on_ampl_error=yes to it). Then run Ipopt again and examine the error output.

To avoid the error, assign some better starting values to the variables before solving. (See Initial values of variables in Chapter 18 of the AMPL book.) By default, the initial values are all 0, which is often not a good choice; for example, sqrt(x) has an infinite derivative value at x = 0.


--
Robert Fourer
am...@googlegroups.com
{#HS:1450145479-102735#}

Mohammadhasan Fathollahzadeh

unread,
Mar 11, 2021, 8:40:34 PM3/11/21
to AMPL Modeling Language
Hi Robert,

Thank you very much for providing insights on that. I changed the initial values of the variables as well as the objective using the results that I have from a step back. By step back, I mean that the problem faces this "Restoration phase failed" whenever I add a couple of new constraints. I have provided these constraints as follows. Before adding these constraints, the optimization problem works fine on providing optimal and feasible solutions. However, I have not been able to figure out what is causing the restoration issue with the new constraints even though that I have tried to relax the constraints as much as possible. In terms of the results, I don't think that the results with the restoration failed message look correct. At least based on the knowledge that I have from the system that I am optimizing, the results look too good to be true. 
I would appreciate any further insights that can help me. 

# Constraints 
subject to SupplyAHU1_BBW{t in 9..T_CH}: P_ref_SF_BBW_AHU1 * ((BBW_AHU1_SF_VFD[t]/100)**3) = P_S_BBW_AHU1[t];

subject to SupplyAHU1_BBW_VFD{t in 9..T_CH}: ((IndDAT_BBW_AHU1_SF[1]*DAT_AHU1_BBW[t] + sum{i in 2..9}(IndDAT_BBW_AHU1_SF[i]*IndDAT_BBW_AHU1_SFValue[t-i+1]))+(IndOAF_BBW_AHU1_SF[1]*OAFlow_BBW_AHU1[t] + sum{i in 2..9}(IndOAF_BBW_AHU1_SF[i]*IndOAF_BBW_AHU1_SFValue[t-i+1])) + IndOAT_BBW_AHU1_SF[1]*T_OA[t]) - (sum{i in 2..9} (DepC_BBW_AHU1_SF[i]*DepC_BBW_AHU1_SFValue[t-i+1])) = BBW_AHU1_SF_VFD[t];

subject to BBW_Load_AHU1{t in 9..T_CH}: c_p_air * Rho_air * OAFlow_BBW_AHU1[t] *0.00047194745* (((T_OA[t]-32)*(5/9)) - ((DAT_AHU1_BBW[t]-32)*(5/9))) = Q_BBW_AHU1[t];

subject to RATBBW_AHU1{t in 10..T_CH}: (sum {i in 1..5}(IndDAT_BBW_AHU1_RAT[i]*IndDAT_BBW_AHU1_RATValue[t-i])+sum {i in 1..5}(IndOAF_BBW_AHU1_RAT[i]*IndOAF_BBW_AHU1_RATValue[t-i]) + IndOAT_BBW_AHU1_RAT[1]*T_OA[t]) - sum {j in 2..5}(DepC_BBW_AHU1_RAT[j]*DepC_BBW_AHU1_RATValue[t-j+1]) = RAT_BBW_AHU1[t];

subject to RAFlowRateBBWAHU1{t in 10..T_CH}: (sum {i in 1..9}(IndDAT_BBW_AHU1_RAFlow[i]*IndDAT_BBW_AHU1_RAFlowValue[t-i]) + IndOAT_BBW_AHU1_RAFlow[1]*T_OA[t]) - sum {j in 2..9}(DepC_BBW_AHU1_RAFlow[j]*DepC_BBW_AHU1_RAFlowValue[t-j+1]) = RAFlow_BBW_AHU1[t]; 

subject to BBW_VFDLimits_AHU1 {t in 9..T_CH}: BBW_AHU1_SF_VFD[t] <= 100;

subject to BBW_DATLimits_AHU1 {t in 9..T_CH}:  48.4 <= DAT_AHU1_BBW[t] <= 68.8;

subject to BBW_OAFLowLimits_AHU1 {t in 9..T_CH}:   1714 <= OAFlow_BBW_AHU1[t] <= 39725; 

subject to BBW_MADamperLimits_AHU1 {t in 9..T_CH}: MAD_AHU1BBW[t] =0; 

subject to RATBBW_AHU1Bounds {t in 9..T_CH}: (0.9 * RAT_BBW_AHU1Schedule[t]) <= RAT_BBW_AHU1[t] <= (1.1*RAT_BBW_AHU1Schedule[t]);


Thank you very much!  

AMPL Google Group

unread,
Mar 13, 2021, 4:30:26 PM3/13/21
to AMPL Modeling Language
The Ipopt output documentation gives this explanation for Restoration Failed:

This indicates that the restoration phase failed to find a feasible point that was acceptable to the filter line search for the original problem. This could happen if the problem is highly degenerate, does not satisfy the constraint qualification, or if your NLP code provides incorrect derivative information.

If Ipopt did not end with an Optimal Solution Found message, then it may still have returned the last solution that it found, but that solution is likely to not be useful. It might not even satisfy all of the constraints.

As you can see, this is a rather technical problem in the Ipopt algorithm. I cannot determine the cause only by looking at the constraints. You might want to ask a question on the Ipopt Discussion Page; for best results, try to attach any model and data files you are using.

First, however, I suggest that you download Ipopt 3.12.13 from our Open Source Solvers page, to take advantage of any fixes or improvements that have been added since the version (3.11.1) that you are using.


--
Robert Fourer
am...@googlegroups.com
{#HS:1450145479-102735#}
On Fri, Mar 12, 2021 at 1:40 AM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Hi Robert,

Thank you very much for providing insights on that. I changed the initial values of the variables as well as the objective using the results that I have from a step back. By step back, I mean that the problem faces this "Restoration phase failed" whenever I add a couple of new constraints. I have provided these constraints as follows. Before adding these constraints, the optimization problem works fine on providing optimal and feasible solutions. However, I have not been able to figure out what is causing the restoration issue with the new constraints even though that I have tried to relax the constraints as much as possible. In terms of the results, I don't think that the results with the restoration failed message look correct. At least based on the knowledge that I have from the system that I am optimizing, the results look too good to be true.
I would appreciate any further insights that can help me.

# Constraints
subject to SupplyAHU1_BBW{t in 9..T_CH}: P_ref_SF_BBW_AHU1 * ((BBW_AHU1_SF_VFD[t]/100)**3) = P_S_BBW_AHU1[t];

subject to SupplyAHU1_BBW_VFD{t in 9..T_CH}: ((IndDAT_BBW_AHU1_SF[1]*DAT_AHU1_BBW[t] + sum{i in 2..9}(IndDAT_BBW_AHU1_SF*IndDAT_BBW_AHU1_SFValue[t-i+1]))+(IndOAF_BBW_AHU1_SF[1]*OAFlow_BBW_AHU1[t] + sum{i in 2..9}(IndOAF_BBW_AHU1_SF*IndOAF_BBW_AHU1_SFValue[t-i+1])) + IndOAT_BBW_AHU1_SF[1]*T_OA[t]) - (sum{i in 2..9} (DepC_BBW_AHU1_SF*DepC_BBW_AHU1_SFValue[t-i+1])) = BBW_AHU1_SF_VFD[t];


subject to BBW_Load_AHU1{t in 9..T_CH}: c_p_air * Rho_air * OAFlow_BBW_AHU1[t] *0.00047194745* (((T_OA[t]-32)*(5/9)) - ((DAT_AHU1_BBW[t]-32)*(5/9))) = Q_BBW_AHU1[t];

subject to RATBBW_AHU1{t in 10..T_CH}: (sum {i in 1..5}(IndDAT_BBW_AHU1_RAT*IndDAT_BBW_AHU1_RATValue[t-i])+sum {i in 1..5}(IndOAF_BBW_AHU1_RAT*IndOAF_BBW_AHU1_RATValue[t-i]) + IndOAT_BBW_AHU1_RAT[1]*T_OA[t]) - sum {j in 2..5}(DepC_BBW_AHU1_RAT[j]*DepC_BBW_AHU1_RATValue[t-j+1]) = RAT_BBW_AHU1[t];

subject to RAFlowRateBBWAHU1{t in 10..T_CH}: (sum {i in 1..9}(IndDAT_BBW_AHU1_RAFlow*IndDAT_BBW_AHU1_RAFlowValue[t-i]) + IndOAT_BBW_AHU1_RAFlow[1]*T_OA[t]) - sum {j in 2..9}(DepC_BBW_AHU1_RAFlow[j]*DepC_BBW_AHU1_RAFlowValue[t-j+1]) = RAFlow_BBW_AHU1[t];


subject to BBW_VFDLimits_AHU1 {t in 9..T_CH}: BBW_AHU1_SF_VFD[t] <= 100;

subject to BBW_DATLimits_AHU1 {t in 9..T_CH}: 48.4 <= DAT_AHU1_BBW[t] <= 68.8;

subject to BBW_OAFLowLimits_AHU1 {t in 9..T_CH}: 1714 <= OAFlow_BBW_AHU1[t] <= 39725;

subject to BBW_MADamperLimits_AHU1 {t in 9..T_CH}: MAD_AHU1BBW[t] =0;

subject to RATBBW_AHU1Bounds {t in 9..T_CH}: (0.9 * RAT_BBW_AHU1Schedule[t]) <= RAT_BBW_AHU1[t] <= (1.1*RAT_BBW_AHU1Schedule[t]);

Thank you very much!
On Thu, Mar 11, 2021 at 6:27 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
The "error evaluating Jacobian of equality constraints at user provided starting point" refers to computation of the derivatives of the constraint functions. It is telling you that at the initial values of the variables provided from AMPL to Ipopt, some of the derivative values could not be computed. If Ipopt continues running and produces a solution, then it has worked around the error and you can ignore it if you like. If you want to know more about the error, try following the instructions to set

option ipopt_options 'halt_on_ampl_error=yes';

(or if you are already seting an ipopt_options string, add halt_on_ampl_error=yes to it). Then run Ipopt again and examine the error output.

To avoid the error, assign some better starting values to the variables before solving. (See Initial values of variables in Chapter 18 of the AMPL book.) By default, the initial values are all 0, which is often not a good choice; for example, sqrt(x) has an infinite derivative value at x = 0.


--
Robert Fourer
am...@googlegroups.com

M I Shafique

unread,
Mar 15, 2021, 2:13:11 PM3/15/21
to am...@googlegroups.com
For efficiency reasons, it can be beneficial to use a non-default linear solver like https://www.hsl.rl.ac.uk/specs/hsl_ma86.pdf



--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-1450145479-4210219747-1615671023-1851846022%40helpscout.net.
Reply all
Reply to author
Forward
0 new messages