楼主: zkp216
1919 3

[原创博文] LSQ优化结果不同的原因 [推广有奖]

  • 4关注
  • 2粉丝

已卖:30份资源

硕士生

38%

还不是VIP/贵宾

-

威望
0
论坛币
246 个
通用积分
0
学术水平
1 点
热心指数
5 点
信用等级
1 点
经验
1857 点
帖子
103
精华
0
在线时间
159 小时
注册时间
2012-6-18
最后登录
2021-12-10

楼主
zkp216 发表于 2012-8-20 15:35:56 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
  1. proc nlp;
  2.   lsq f1 f2;
  3.   decvar x1 x2;
  4.   bounds x1-x2<=.5;
  5.   lincon x1+x2<=.6;
  6.   f1=10*10*(x2-x1*x1);
  7.   f2=1-x1;
  8.   run;
复制代码
同样的一段优化程序,SAS/OR 9.1 User’s Guide Mathematical Programming手册上输出结果和我运行的结果竟然差别很大,而且我安装的也是SAS9.1.3,不知道是什么原因,请各位指教!
QQ截图20120820152708.jpg
第一张是在我电脑上运行的结果,第二张是手册上结果,从函数调用和迭代次数上看,在我电脑上的速度明显要慢
QQ截图20120817153419.jpg
二维码

扫码加我 拉你入群

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

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

关键词:结果不同 Bounds Bound CVAR CVA

回帖推荐

bobguy 发表于3楼  查看完整内容

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

本帖被以下文库推荐

沙发
zkp216 发表于 2012-8-20 15:50:28
没人在家,又让我自己慢慢扣,好吧,我想着是应该初始值不同造成的

藤椅
bobguy 发表于 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

已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

板凳
zkp216 发表于 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!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-4 01:29