全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1882 3
2012-08-20
复制代码
同样的一段优化程序,SAS/OR 9.1 User’s Guide Mathematical Programming手册上输出结果和我运行的结果竟然差别很大,而且我安装的也是SAS9.1.3,不知道是什么原因,请各位指教!
QQ截图20120820152708.jpg
第一张是在我电脑上运行的结果,第二张是手册上结果,从函数调用和迭代次数上看,在我电脑上的速度明显要慢
QQ截图20120817153419.jpg
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-8-20 15:50:28
没人在家,又让我自己慢慢扣,好吧,我想着是应该初始值不同造成的
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-8-21 11:27:55
This is because that initial values are selected differently. See attached log below.

You can force them to fixed values. Then the result should be the same.

67       proc nlp;
68         lsq f1 f2;
69         decvar x1 x2;
70         bounds x1-x2<=.5;
71         lincon x1+x2<=.6;
72         f1=10*10*(x2-x1*x1);
73         f2=1-x1;
74         run;

NOTE: Your code contains 2 program statements.
NOTE: Gradient is computed using analytic formulas.
NOTE: Cross product Jacobian is computed using analytic formulas.
NOTE: Initial value of parameter x1 is set randomly to 0.6032013691.
NOTE: Initial value of parameter x2 is set randomly to 0.3147264259.
NOTE: Initial point was changed to be feasible for boundary and linear constraints.
NOTE: ABSGCONV convergence criterion satisfied.
NOTE: PROCEDURE NLP used (Total process time):
      real time           0.68 seconds
      cpu time            0.03 seconds


75       proc nlp;
76         lsq f1 f2;
77         decvar x1 x2;
78         bounds x1-x2<=.5;
79         lincon x1+x2<=.6;
80         f1=10*10*(x2-x1*x1);
81         f2=1-x1;
82         run;

NOTE: Your code contains 2 program statements.
NOTE: Gradient is computed using analytic formulas.
NOTE: Cross product Jacobian is computed using analytic formulas.
NOTE: Initial value of parameter x1 is set randomly to 0.4814047206.
NOTE: Initial value of parameter x2 is set randomly to 0.8789847772.
NOTE: Initial point was changed to be feasible for boundary and linear constraints.
NOTE: GCONV convergence criterion satisfied.
NOTE: PROCEDURE NLP used (Total process time):
      real time           0.06 seconds
      cpu time            0.01 seconds

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-8-21 11:58:19
bobguy 发表于 2012-8-21 11:27
This is because that initial values are selected differently. See attached log below.

You can for ...
ouch ,my guess is right,thank you very ,very ,very much!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群