Skip to content

doc: update ChangeTable docstrings#451

Merged
danielolsen merged 13 commits intodevelopfrom
daniel/change_table_docstring
Apr 14, 2021
Merged

doc: update ChangeTable docstrings#451
danielolsen merged 13 commits intodevelopfrom
daniel/change_table_docstring

Conversation

@danielolsen
Copy link
Copy Markdown
Contributor

Purpose

Add details to the docstrings of the ChangeTable methods for adding new elements, and update the main ChangeTable docstring to more accurately reflect the new storage schema (clean-up after #383).
Closes #445.

What the code is doing

No code, just docstrings.

Time estimate

5-10 minutes.

@danielolsen danielolsen self-assigned this Apr 14, 2021
Comment thread powersimdata/input/change_table.py Outdated
Comment thread powersimdata/input/change_table.py Outdated
Comment thread powersimdata/input/change_table.py Outdated
Required keys: "bus_id", "Pmax", "type".
Optional keys: "c0", "c1", "c2", "Pmin".
"c0", "c1", and "c2" are the coefficients for the cost curve, representing
the fixed cost ($/hour), linear cost ($/MWh), and quadratic cost ($/MW^2*h).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:math:`\rm{MW}^2 \rm{h}`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want formatting on the quadratic term only, or all of them?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it change for the other ones? the exponent in the quadratic is the on;y thing that will be in math mode

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First time see this representation. This is the classic way to represent the unit of the quadratic term?

Copy link
Copy Markdown
Contributor Author

@danielolsen danielolsen Apr 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rouille: Ah, I get it now. I didn't realize that \rm{} completely undid the 'math-style' formatting, or if it just de-italicized or something similar like that (like \text). Clever!.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:math: in ReST lets you right some LaTeX math

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BainanXia I'm not sure. I think removing the * per @rouille's suggestion will make it clear. The units line up properly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread powersimdata/input/change_table.py Outdated
"c0", "c1", and "c2" are the coefficients for the cost curve, representing
the fixed cost ($/hour), linear cost ($/MWh), and quadratic cost ($/MW^2*h).
These are optional for hydro, solar, and wind, and required for other types.
:raises TypeError: if info is not a list.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info --> ``info``

Copy link
Copy Markdown
Contributor Author

@danielolsen danielolsen Apr 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With one ` or two on each side?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two on each side for verbatim (it displays like that) in ReST. I started to reference to parameters in the docstring this way as we do in Slack or Markdown

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rouille Good to know.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread powersimdata/input/change_table.py Outdated
e.g. 0.5 means that the storage must end the interval with at least 50%.
"terminal_max" denotes the maximum state of charge at interval end,
e.g. 0.9 means that the storage must end the interval with no more than 90%.
:raises TypeError: if info is not a list.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

info --> ``info``

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Copy Markdown
Collaborator

@rouille rouille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Copy Markdown
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@danielolsen danielolsen merged commit 974f7fa into develop Apr 14, 2021
@danielolsen danielolsen deleted the daniel/change_table_docstring branch April 14, 2021 23:48
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

Successfully merging this pull request may close these issues.

Improve documentation of element additions via the change table

3 participants