開始使用免費開始

選擇模型狀態練習

根據下方程式碼,選出模型狀態會印出哪一個。

# Initialize Class, Define Decision Vars., Objective Function, and Constraints
from pulp import *
model = LpProblem("Exercise Routine", LpMaximize)
P = LpVariable('Pushups', lowBound=0)
R = LpVariable('Miles ran', lowBound=0)
model += 3 * P + 10 * R
model += P + R < 10
model += R > 11

# Solve Model
model.solve()
print("Status:", LpStatus[model.status])

本練習屬於課程

Python 的供應鏈分析

檢視課程

動手互動練習

將理論付諸實踐,立即體驗我們的互動練習

開始練習