Skip to content

Commit

Permalink
fix example 06 jupyter notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary committed Dec 13, 2023
1 parent 3c0f689 commit 49c517d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
"time = np.arange(time_start, time_end, time_delta)\n",
"\n",
"def simulate(SB, time, available_power, signal):\n",
" inputs = {\"controller\": {\"signal\": 0}, \"py_sims\": {\"inputs\": {\"available_power\": 0}}}\n",
" inputs = {\"setpoints\": {\"battery\":{\"signal\": 0}}, \"py_sims\": {\"inputs\": {\"available_power\": 0}}}\n",
" batt_power = np.zeros(len(time))\n",
" batt_reject = np.zeros(len(time))\n",
" batt_soc = np.zeros(len(time))\n",
"\n",
" for i in range(len(time)):\n",
" inputs[\"controller\"][\"signal\"] = signal[i]\n",
" inputs[\"setpoints\"][\"battery\"][\"signal\"] = signal[i]\n",
" inputs[\"py_sims\"][\"inputs\"][\"available_power\"] = available_power[i]\n",
" outputs = SB.step(inputs)\n",
" batt_power[i] = outputs[\"power\"]\n",
Expand Down

0 comments on commit 49c517d

Please sign in to comment.