敏感度分析練習
你正在為一家庭院家具公司做資源規劃。公司以金屬管製造庭院椅、長椅與桌子的裝飾椅腳/桌腳組,流程分兩步:彎管與焊接。每售出一組產品的利潤為:椅腳組 $3、長椅腳組 $3、桌腳組 $5。你要為即將到來的季節規劃生產組合。不過,因為罷工,目前手邊可用的金屬管只有 2000 磅。
每個產品所需的時間與原料已在主控台列印出來。另外,PuLP 模型已為你建立並存於變數 model,模型中的各項限制式也已列印到主控台。
本練習屬於課程
Python 的供應鏈分析
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
model.solve()
# Print the Model Status
print("Model Status: {}".format(____[____]))
# Print the Decision Variables
for v in model.variables():
print(v.name, "=", ____)
# Print the Objective Value
print("Objective = ", ____)