Aan de slagGa gratis aan de slag

Choose the model status exercise

Given the code below, choose what will be printed for the model status.

# 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])

Deze oefening maakt deel uit van de cursus

Supply Chain Analytics in Python

Cursus bekijken

Praktische interactieve oefening

Zet theorie om in actie met een van onze interactieve oefeningen.

Begin met trainen