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

doc: update ChangeTable docstrings #451

Merged
merged 13 commits into from
Apr 14, 2021
Merged

Conversation

danielolsen
Copy link
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
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
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
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
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
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
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
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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

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).
These are optional for hydro, solar, and wind, and required for other types.
:raises TypeError: if info is not a list.
Copy link
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
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
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
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
Contributor Author

Choose a reason for hiding this comment

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

Done.

"terminal_min" denotes the minimum state of charge at interval end,
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
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
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
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
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