線形計画モデルを解くための素敵なRパッケージを探しています。私はデフォルトのlpSolve::lp
にはとても満足していますが、の影と価格をにする方法はありません。私はこれらを統合性の制約とともに必要としています。R線形計画問題を解決するため
サンプルモデル:
A = rbind(
c(0.5, 0.2, 0.2),
c(-1, 1, 0),
c( 0, 1, -1),
c(-1, -1, -1),
c(-1, 0, 0),
c( 0, -1, 0),
c( 0, 0, -1)
)
b = c(5, 0, 0, -13, 0, 0, 0)
c_ = c(8.4, 6, 9.2)
(signs = c('=', rep('<=', 6)))
res = lpSolve::lp('min', c_, A, signs, b, all.int = TRUE)
# Objective function
res
# Variables
res$solution
# Shadow prices???
# Reduced prices???
申し訳ありませんが、影と価格はどうですか? – Arun
@Arunこれはデュアル変数です。http://en.wikipedia.org/wiki/Shadow_price – mreq
を参照してください。[** this documentation **](http://cran.r-project.org/web/packages/lpSolve/lpSolve.pdf)は制約のための '二重の値'について話します。これはあなたが探しているものですか? – Arun