CEVE-421-521 / lab-07-parking-garage-luciamra

lab-07-parking-garage-luciamra created by GitHub Classroom
0 stars 0 forks source link

SOW error #2

Open jdossgollin opened 6 months ago

jdossgollin commented 6 months ago

I downloaded the code and can reproduce your error, will take a look later today to troubleshoot

jdossgollin commented 6 months ago

OK @luciamra three issues (we can fix one, but then the next will bother you so let's do all three)

Fortunately they're all in the get_action function:

  1. You have demand = ParkingGarage.calculate_demand(x.year, sow.demand_growth_rate). However, sow isn't one of the arguments so it down't know what that is. Hint: we have now added demand to the state variable -- can you access it there?
  2. if you fix that, you'll see that you try to calculate capacity based on the current number of levels: capacity = calculate_capacity(x.n_levels). Instead, just use capacity = calculate_capacity(x), the equation handles the rest
  3. You want to return the number of levels to add, which should be zero or one. We call it ParkingGarageAction(0) or 1