Utilization of GensetModule module
Opened this issue · 0 comments
I am a new user of pymgrid. I saw the quick start sample notebook and was able to add renewable modules but when I was trying to add GensetModule in quick-start.ipynb.
While the controls section I was getting an error.
Following are my doubts:
- Please provide an example on how I can define the control for genset module
- I tried defining the control the same manner as external grid is defined but I was getting the following error
TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 obs, reward, done, info = microgrid.run(control, normalized=False)
1 frames
/usr/local/lib/python3.10/dist-packages/pymgrid/modules/genset_module.py in step(self, action, normalized)
140 this module provided to or absorbed from the microgrid.
141
--> 142 """
143 goal_status = action[0]
144 assert 0 <= goal_status <= 1
TypeError: 'int' object is not subscriptable
Please let me know where I am making the mistake
My genset module defination
min_production = 10
max_production = 100
gen_cost = 1
co2_gen_per_unit= 1
generator = GensetModule(running_min_production=min_production,
running_max_production=max_production,
genset_cost=gen_cost,
co2_per_unit=co2_gen_per_unit)