-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add an option to keep changed parameters #579
Comments
The option already exists.
If a parameter is changed through "alter", it will be saved to the case
file when exported.
If a parameter is changed through "set", it will not be saved to the export.
Regards,
Hantao Cui
…On Wed, Nov 13, 2024 at 12:12 PM Jinning Wang ***@***.***> wrote:
*Is your feature request related to a problem? Please describe.*
N/A
*Describe the solution you'd like*
For easier usage, we can add an option in the IO module to allow
"overwrite original values". Thus, users can save all the changes they have
made through "Mode.set". into the exported case file.
Proposed development:
Add a parameter save_changes=False to func "write()"
If true, overwrite the Param.vin by per unit conversion of Param.v
*Describe alternatives you've considered*
N/A
*Additional context*
N/A
—
Reply to this email directly, view it on GitHub
<#579>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSNZA2OA2GIBGLLVTBA3TL2AOB77AVCNFSM6AAAAABRW7RUJ6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2TMMJZHA2DOMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This is going to fail. If a field, say, generator's |
The proposed change to my mind looks like this: A quick demo is attached: dev_alter.pdf Let me know if this makes sense to you. |
Thanks. Can you respond to my replies, please? |
Which one is better, the proposed API or the same API as "set", which takes an "attr"? |
Yes, I also saw this in my local test.
Yes, so I made changes to method
Let me think about this. If second one is better, I can make a notebook demo as a clarification. |
The purpose of my proposed change is to eliminate the need for users to handle per-unit conversions themselves when adjusting parameters. At the same time, they can maintain all changes in a dumped file. This change is motivated by my own confusion when manipulating parameters, as I feel this approach is less confusing. Welcome any further comments or suggestions if I have overlooked anything. |
The point in my proposed change is that users would not need to bother
with per_unit conversion themself when manipulating the parameters, but the
same time they can also keep all the changes in a dumped file.
I understand. The goal is to be able to specify values after the per-unit
conversion and save it properly to a case file.
Using the same signature for `set` and `alter` reduces cognitive burden.
`set` is for setting values but will not be saved to cases. `alter` will
set the values and affect the dump. In `alter`, add an `attr` argument and
default it to `v`. If the input is `vin`, handle it in the function as you
did.
Regards,
Hantao Cui
…On Mon, Nov 18, 2024 at 12:58 PM Jinning Wang ***@***.***> wrote:
The point in my proposed change is that users would not need to bother
with per_unit conversion themself when manipulating the parameters, but
the same time they can also keep all the changes in a dumped file.
This change is motivated by my personal misunderstanding of manipulating
parameters, as I feel this way less confusing.
Welcome further comments if I missed anything.
—
Reply to this email directly, view it on GitHub
<#579 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABSNZAZGMKMVQ6KCIJJOSPD2BITFBAVCNFSM6AAAAABRW7RUJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBTG42DMNJZG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks for this informative comment, I'll make a quick development in short. |
Is your feature request related to a problem? Please describe.
N/A
Describe the solution you'd like
For easier usage, we can add an option in the IO module to allow "overwrite original values". Thus, users can save all the changes they have made through "Mode.set". into the exported case file.
Proposed development:
Add a parameter
save_changes=False
to func "write()"If true, overwrite the
Param.vin
by per unit conversion ofParam.v
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: