全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2637 13
2012-11-19
[img]file:///C:/Documents%20and%20Settings/Administrator/Application%20Data/Tencent/Users/178684023/QQ/WinTemp/RichOle/4[~CYGG5CA`XJ(K%TW]E8Y2.jpg[/img]
附件列表
未命名.jpg

原图尺寸 43.08 KB

未命名.jpg

二维码

扫码加我 拉你入群

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

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

全部回复
2012-11-20 07:12:32

Do you have any fast algorithm to find the solution? I amnot sure why this was called mathematical model. I try to "hard-code"it and it is de facto fast since only 16 values are involved for thecombination.

Jingju

复制代码
The results like:
--------------------------------------------------------------------------------
Combinations                                                                                                      sum

x04+x06+x10+x13+x14+x16                                                                         12090
x01+x03+x07+x09+x12+x15+x16                                                                 12090
x02+x03+x05+x06+x09+x12+x15+x16                                                        12090
x01+x02+x04+x08+x09+x11+x15+x16                                                        12090
x04+x06+x07+x08+x09+x13+x14+x16                                                        12090
x01+x02+x04+x06+x07+x09+x11+x15+x16                                                12090
x01+x02+x03+x05+x06+x10+x12+x13+x14+x15                                       12090
x01+x02+x03+x05+x06+x07+x08+x09+x12+x13+x14+x15                      12090
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Combinations                                                          sum

x02+x03+x08                                                             92
x03+x04+x05+x07                                                     92
x02+x03+x06+x07                                                     92
x01+x02+x04+x05+x07                                             90
--------------------------------------------------------------------------------
二维码

扫码加我 拉你入群

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

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

2012-11-20 08:47:32
jingju11 发表于 2012-11-20 07:12
Do you have any fast algorithm to find the solution? I amnot sure why this was called mathematical m ...
非常感谢!我仔细看看!太感谢您了。之前我用了LINGO软件求最优解,但是只能求精确的不能求近似的。谢谢你的方法!
二维码

扫码加我 拉你入群

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

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

2012-11-20 09:25:54
我怎么看不到题目呢?
二维码

扫码加我 拉你入群

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

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

2012-11-20 09:26:45
jingju11 发表于 2012-11-20 07:12
Do you have any fast algorithm to find the solution? I amnot sure why this was called mathematical m ...
这里提供一种不一样的思路:
首先,找出各变量的所有不重复的组合;
然后,对每种组合进行求和;
最后,对于任意给定的值,找出与此值距离最小的组合,并且输出。

plus,佩服京剧大人的output功力,我是做不到你的程度啦。
程序如下:
复制代码

二维码

扫码加我 拉你入群

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

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

2012-11-20 09:30:03
小甲克虫 发表于 2012-11-20 08:47
非常感谢!我仔细看看!太感谢您了。之前我用了LINGO软件求最优解,但是只能求精确的不能求近似的。谢谢你 ...
用Lingo的话,目标函数可能不太好写。毕竟,你要找的,是距离的绝对值最小。
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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