Update add-vars.md#4332
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4332 +/- ##
==========================================
+ Coverage 48.86% 48.87% +0.01%
==========================================
Files 151 151
Lines 29417 29426 +9
==========================================
+ Hits 14374 14383 +9
Misses 15043 15043 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Requesting a couple of reviews to ensure these docs make sense and are sufficiently detailed |
0aba1cf to
d1dd370
Compare
| ``` | ||
| minmax = 20 | ||
| ``` | ||
| Remember, setting `minmax = -20` would minimise instead of maximise our new variable. |
There was a problem hiding this comment.
Would be good the specify here that this is the case as it is the value of the second derivative?
| my_new_blanket_variable = 1.0 | ||
| ``` | ||
|
|
||
| ----------------- |
There was a problem hiding this comment.
Do we need a bit here about how the value of an input variable is unchanged throughout a run ?
There was a problem hiding this comment.
This point is made at least twice in the document, I think that should be enough
| ## Add a constraint equation | ||
|
|
||
| Constraint equations are added to *PROCESS* in the `process/core/solver/constraints.py` file. They are registered with the `ConstraintManager` whenever the application is run. Each equation has a unique name that is currently an integer, however upgrades to the input file format in the future will allow arbitrary hashable constraint names. | ||
| Constraint equations are added to PROCESS in the `process/core/solver/constraints.py` file. They are registered with the `ConstraintManager` whenever the application is run. Each equation has a unique name that is currently an integer, however upgrades to the input file format in the future will allow arbitrary hashable constraint names. |
There was a problem hiding this comment.
Will updates to the input file format mean changes for more things in this page other than just constraints? If so, probably worth a general note at the start of this page? Might not though, just thought I'd ask!
There was a problem hiding this comment.
Tbh that information is probably not necessary and I will remove it
Co-authored-by: clmould <86794332+clmould@users.noreply.github.com> Co-authored-by: Christopher Ashe <91618944+chris-ashe@users.noreply.github.com>
Co-authored-by: clmould <86794332+clmould@users.noreply.github.com>
a18ef77 to
3af3782
Compare
| The arguments to the `register_constraint` function are: | ||
|
|
||
| - Name (again, currently an integer) | ||
| - Unit (for output reporting purposes) | ||
| - Symbol (e.g. =, >=, <=. Again, for output reporting purposes) | ||
| - Symbol (e.g. `=`, `>=`, `<=`. Again, for output reporting purposes) |
There was a problem hiding this comment.
| - Symbol (e.g. `=`, `>=`, `<=`. Again, for output reporting purposes) |
think github might've messed up my suggestion ! not sure why it added it instead of overwriting !
Updated the guide for adding variables, inputs, scan vars, figures of merit, and iteration vars. They needed a refresh due to changes in the Python conversion, recent data structure changes, and enumification.
I have also reduced the need for users to manually increment some variables (was not possible for the scan variables due to circular imports).