Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilization of GensetModule module #253

Open
fusion-research opened this issue Aug 27, 2024 · 2 comments
Open

Utilization of GensetModule module #253

fusion-research opened this issue Aug 27, 2024 · 2 comments

Comments

@fusion-research
Copy link

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:

  1. Please provide an example on how I can define the control for genset module
  2. 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@fusion-research and others