How to set reference value #153
-
|
Hi experts, I would like to modify the reference value of a parameter, but without success. The test code is as below. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @ring630 , this is not currently possible directly through To explain what happened: In following line of code you queried server to obtain first parameter's data and modified reference value in your local copy.
Then you queried server again to obtain first parameter's reference value ( ... compared with 1 and used assert).
Development of pyOptiSLang is still in progress, we are working on suitable functionality for your task. The best way, how to achieve your goal right now is through Hopefully it helps, best regards, Ondrej |
Beta Was this translation helpful? Give feedback.
Hi @ring630 ,
this is not currently possible directly through
Parameterobject, since it's not connected to the server nor shares the same address space with optiSLang project, it's data class that stores copy parameter's properties.To explain what happened:
In following line of code you queried server to obtain first parameter's data and modified reference value in your local copy.
op.parameter_manager.get_parameters()[0].reference_value = 1Then you queried server again to obtain first parameter's reference value ( ... compared with 1 and used assert).
assert op.parameter_manager.get_parameters()[0].reference_value == 1Development of pyOptiSLang is still in progress, we are working o…