Statistical programming, matrix languages, and more

Why Optimization results don't produce the optimal objective value and don't satisfy the constraint?

Reply
Contributor
Posts: 37

Why Optimization results don't produce the optimal objective value and don't satisfy the constraint?


Dear all,

My non linear optimization syntax is running without errors however, when i substitute with the optimal parameter estimates in the objective function, I did't get the optimal objective value. Also, the optimal parameter estimates don't satisfy my constraint. I attached the output I got, I don't figure out any problems or errors in my syntax, Any help or suggestions?

Emara


                                                                                                

                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


                                                                                                


Attachment
Regular Contributor
Posts: 152

Re: Why Optimization results don't produce the optimal objective value and don't satisfy the constraint?

Could you specify your two-parameter nonlinear model?

According to your output,

                                                             X1                          X2        Value of objective function          

    Starting parameter values:       0.798                      0.150                    3.4654

    Optimized parameter values:   0                              0.880851             3.45307

The constraint violation occurs only with the optimized value of X1, which is minimally different from zero but negative (not meeting your lower bound constraint).  However, this violation of the constraint is minimal.

The facts that the optimized values of X1 and X2 differ so much from the starting parameter values, that the optimized value for one of these values is on the constraint boundary, and that the value of the objective function changes so minimally imply that many parameter values are consistent with your data, that the objective function "space" is basically flat, and that you probably need more data to distinguish among these values to find a global minimum.  What happens to the values of the objective function when you remove or widen the constraints?

Contributor
Posts: 37

Re: Why Optimization results don't produce the optimal objective value and don't satisfy the constraint?

Thanks alot for ur help, I attached the syntax containing my model. I tried to run the syntax without the consraint as you mentioned and i got the following output:

Optimization Start



Active Constraints                            0  Objective Function                  3.469302357



 


                                                        Objective     Std Dev  Restart


                  Function       Active      Objective   Function  of Simplex   Vertex  Simplex


Iter   Restarts     Calls  Constraints       Function     Change      Values   Length     Size



    1          0        20            2        3.45151     0.0125     0.00540    1.000    0.200



                                      Optimization Results



Iterations                                    1  Function Calls                               22


Restarts                                      0  Active Constraints                            2


Objective Function                 3.4657027053  Std Dev of Simplex Values          0.0053965381


Deltax                                        1  Size                                     0.1995



All parameters are actively constrained.  Optimization cannot proceed.



NOTE: At least one element of the (projected) gradient is greater than 1e-3.

Optimization Start



Active Constraints                            0  Objective Function                  3.469302357



 


                                                        Objective     Std Dev  Restart


                  Function       Active      Objective   Function  of Simplex   Vertex  Simplex


Iter   Restarts     Calls  Constraints       Function     Change      Values   Length     Size



    1          0        20            2        3.45151     0.0125     0.00540    1.000    0.200



                                      Optimization Results



Iterations                                    1  Function Calls                               22


Restarts                                      0  Active Constraints                            2


Objective Function                 3.4657027053  Std Dev of Simplex Values          0.0053965381


Deltax                                        1  Size                                     0.1995



All parameters are actively constrained.  Optimization cannot proceed.



NOTE: At least one element of the (projected) gradient is greater than 1e-3.

Optimization Results


                                       Parameter Estimates


                                                           Active


                                                           Bound


                           N Parameter         Estimate    Constraint



                           1 X1                       0     Lower BC


                           2 X2                1.000000     Upper BC



                           Value of Objective Function = 3.4657027053

 

The Lagrange multipliers for active lower bounds are equal to the corresponding gradient


    element; for upper bounds, they are equal to the negative gradient element.

Tthanks,

Emara

Attachment
Regular Contributor
Posts: 152

Re: Why Optimization results don't produce the optimal objective value and don't satisfy the constraint?

Obviously, that didn't work.  When I tried your PROC IML program you sent, the program took a very long time and did NOT converge.  I tried reducing the number of iterations and changing the input data, but the problem seems to be with the slow convergence of the Nelder-Mead simplex method on your problem.  Do you have previously published input data for your problem that are known to converge to known solutions using this method?  If so, try to see if you obtain these solutions using these input data.  Otherwise, see if you can recast your problem so that another optimization method might work with it.  What is the purpose of this optimization?

SAS Super FREQ
Posts: 3,618

Re: Why Optimization results don't produce the optimal objective value and don't satisfy the constraint?

For previous threads associated with earlier stages of this project/program, see

https://communities.sas.com/thread/38604

and

https://communities.sas.com/thread/39637

Contributor
Posts: 37

Re: Why Optimization results don't produce the optimal objective value and don't satisfy the constraint?

I run my model once again and it took 10 minutes to get the output i attached before, my questions are:

1-does the output indicate problems in the model?does the output indicate that my constraint is violated or that the optimal parameter estimates won't result in the displayed optimal objective value?

2-why the optimal parameter estimates don't satisfy the constraints and don't result in the optimal objective value?

3-why every time i run my model i get different answers?

4-Does this part of the output indicate that the constraint is satisfied? if so, why when i substitute with the optimal values in my constraint, i find that the constraint is not satisfied?

                       Values of Nonlinear Constraints                                

                                                                                      

                      Constraint          Residual                                              

                                                                                  

                      [            1 ]           0 Active  NLEC

Waiting for your reply,

Emara


Ask a Question
Discussion stats
  • 5 replies
  • 534 views
  • 0 likes
  • 3 in conversation