Skip to content

Commit

Permalink
Add explanation about set and alter in ex2
Browse files Browse the repository at this point in the history
  • Loading branch information
jinningwang committed Apr 7, 2024
1 parent 963f63a commit 5da99ca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples/ex2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The load values can be manipulated in the model `PQ`."
"The load values can be manipulated in the model `PQ`.\n",
"\n",
"Note the difference between `Model.set` and `Model.alter`:\n",
"\n",
"`set`: This method ***WILL NOT*** modify the input values from the case file that have not been converted to the system base. As a result, changes applied by this method ***WILL NOT*** affect the dumped case file.\n",
"\n",
"`alter`: If the method operates on an input parameter, the new data ***should be in the same base as that in the input file***. This function will convert ``value`` to per unit in the system base whenever necessary. The values for storing the input data, i.e., the parameter's ``vin`` field, will be overwritten. As a result, altered values ***WILL BE*** reflected in the dumped case file.\n",
"\n",
"Besides, `Group` also has method `set` but has no `alter`."
]
},
{
Expand Down

0 comments on commit 5da99ca

Please sign in to comment.