_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › 螻覯

Contents

1 覿
2 1
3 2
4 谿瑚襭


EXCEL 蟆曙螻狩 (螳)/螳蠍, 一/覦 覓語襯 R襦 企瓦.

1 覿 #

  • 覿覦
    • 譟: 譟壱蟆一, 一殊螻, 襭覦壱, 螻蟯襴
    • 襷貅: 襷れ^讌蟯襴(襷れ , 襷れ ), 蟯螻 覦 殊螻
    • 覓: 覲語郁襴, 伎蠍蟯襴, 誤启Μ 蟆一, 蠍 覿
    • 語: 碁ロ 覦 覦一, 蠍 覦 蠍蟯襴
    • : 蟲讌 , 郁規 覦 螳 螻糾覿覦, 伎蠍 覿覦 覦 覿覦
  • 覦 殊螻: 覓願襴螻, 碁リ, 螻旧讌螻, 覦磯 覦 襷れ殊螻, 覓殊覦郁
  • 蟯襴覓語: 蟯襴, 豌願蟯襴
  • °語: 殊螻, 殊螻, 蟲一覓殊 ♀
  • 豪語: 蟆曙旭ロ, 碁ロ, 貉危壱磯碁

2 1 #

螳蟲 企螻 襯 壱 譴 覈 襷ろ 企. 蟇一 郁概 螳. 讀, 覈殊 牛 覈襯 襴螻, 覈詞 , 誤螻 蟯 螻旧 蟇一螻 襷讌襷朱 蟆 螻旧 蟇一. 螳 企 2螳 覈, 2螳 誤 覦 蟯, 0.1螳 蟆殊 襦 覃, 螳 5螳 覈, 1螳 誤 覦 蟯, 0.1螳 蟆殊 襦. 郁鍵螳(貉, ) 覈 殊 50螳, 誤/蟯 殊 22螳, 蟆 殊 磯 1.3螳 螳ロり. 企 襯 覃 6襷 伎旧 螻, 襯 覃 5襷 企Ν り . 伎旧 豕蠍 伎 企, 襯 螳螳 朱襷 壱伎 螳?

> library("lpSolve")
> # Set up problem: maximize
> # x1: 企, x2: 
> # 豕: 6x1 + 5x2 
> # 曙^蟇: 2x1 + 5x2 <= 50
> # 曙^蟇: 2x1 + 1x2 <= 22
> # 曙^蟇: 0.1x1 + 0.1x2 <= 1.3
> f.obj <- c(6, 5)
> f.con <- matrix (c(2, 5, 2, 1, 0.1, 0.1), nrow=3, byrow=TRUE)
> f.dir <- c("<=", "<=", "<=")
> f.rhs <- c(50, 22, 1.3)
> #豐伎
> lp ("max", f.obj, f.con, f.dir, f.rhs)
Success: the objective function is 74 
> #磯
> lp ("max", f.obj, f.con, f.dir, f.rhs)$solution
[1] 9 4
> #企
> lp ("max", f.obj, f.con, f.dir, f.rhs, compute.sens=TRUE)$duals
[1]  0  1 40  0  0
企 9螳, 3螳襯 壱 蟆曙 豕伎旧 74襷企.

谿瑚
lp ("max", f.obj, f.con, f.dir, f.rhs, compute.sens=TRUE)$sens.coef.from
lp ("max", f.obj, f.con, f.dir, f.rhs, compute.sens=TRUE)$sens.coef.to
lp ("max", f.obj, f.con, f.dir, f.rhs, compute.sens=TRUE)$duals
lp ("max", f.obj, f.con, f.dir, f.rhs, compute.sens=TRUE)$duals.from
lp ("max", f.obj, f.con, f.dir, f.rhs, compute.sens=TRUE)$duals.to
lp ("max", f.obj, f.con, f.dir, f.rhs, int.vec=1:3)
lp ("max", f.obj, f.con, f.dir, f.rhs, int.vec=1:3)$solution
lp ("max", f.obj, f.con, f.dir, f.rhs, int.vec=1:3, compute.sens=TRUE)$duals
* sens: 覩手, dual: , solution:

3 2 #

襭 A, B螳 . 螳螳 覿 1,2,3 れ伎. A襭 1覿 0.2, 2覿 0.3 れ伎螻, B襭 1覿 0.4, 2覿 0.1, 3覿 0.3襷 れ伎. 螳螳 覿 襭 1 30, 2 50, 3 20襷 . A襭 螳蟆 5,000願, B襭 螳蟆 7豌企. 襭 A, B 豕 蟲螻 蟲襷り蟆 蟲.

  • 覈 Min Z = 5000x1 + 7000x2
  • 曙^蟇
    • 0.2x1 + 0.4x2 30
    • 0.3x1 + 0.1x2 50
    • 0.0x1 + 0.3x2 20
  • 觜譟郁唄 x1 0 , x2 0


> library("lpSolve")
> f.obj <- c(5000, 7000)
> f.con <- matrix(c(0.2, 0.4, 0.3, 0.1, 0, 0.3), nrow=3, byrow=TRUE)
> f.dir <- c(">=",">=",">=")
> f.rhs <- c(30, 50, 20)
> lp ("min", f.obj, f.con, f.dir, f.rhs)
Success: the objective function is 1188889 
> lp ("min", f.obj, f.con, f.dir, f.rhs)$solution
[1] 144.44444  66.66667
> lp ("min", f.obj, f.con, f.dir, f.rhs, compute.sens=TRUE)$duals
[1]     0.00 16666.67 17777.78     0.00     0.00
> 
襭襯 蟲 豕 蠍′ 1188889願, A襭 144.44444螳, 66.66667螳襯 蟲覃 .

4 谿瑚襭 #


譴 蟆 襷れ. -- 2017-04-06 11:46:20


譬覲 螳~ -- 螳 2017-07-07 15:09:11

譬覲 螳~ -- 螳 2017-07-07 15:09:35

螻襷! -- actuary 2019-06-02 16:46:48
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2019-06-02 18:23:26

Youth is not a time of life but it is a state of mind. (覓伎碁)