Skip to content

Commit

Permalink
Fix minor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrozocca committed Feb 5, 2024
1 parent 4dad201 commit 3246411
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions notebooks/03/03-recharging-electric-vehicle.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,13 @@
],
"source": [
"def ev_plan(stations, x, D):\n",
" m.D = D\n",
" # find stations between x and x + D\n",
" on_route = stations[(stations[\"location\"] >= x) & (stations[\"location\"] <= x + m.D)]\n",
"\n",
" m = pyo.ConcreteModel(\"Recharging EV strategy\")\n",
"\n",
" m.D = D\n",
"\n",
" # find stations between x and x + D\n",
" on_route = stations[(stations[\"location\"] >= x) & (stations[\"location\"] <= x + m.D)]\n",
" m.n = pyo.Param(default=len(on_route))\n",
"\n",
" # locations and road segments between location x and x + D\n",
Expand Down

0 comments on commit 3246411

Please sign in to comment.