Adding Internal Variables #452
-
|
Is there an equivalent method to "create_input_slot" for internal variables in pyoptiSLang? I have a simple test case with just a CalculatorSet node but as far as I can tell, I haven't found a way to add the required internal variables to make the node work without having to write a native optiSLang script and execute it. I tried forcing the "register_as_internal_variable" to take an expression but I couldn't find the right syntax to trick it into making what I wanted. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @JonathonMcMullan Yes there is corresponding API functionality available. You can use the register_location_as_internal_variable method. Unfortunately, the functionality for registering internal variables is still pretty raw and inconvenient via pyoptislang, you need to know exactly in what format you need to provide the location definition. We plan to improve this in the future. Here is a snippet on how you can achieve this: |
Beta Was this translation helpful? Give feedback.
Hi @JonathonMcMullan Yes there is corresponding API functionality available. You can use the register_location_as_internal_variable method. Unfortunately, the functionality for registering internal variables is still pretty raw and inconvenient via pyoptislang, you need to know exactly in what format you need to provide the location definition. We plan to improve this in the future.
Here is a snippet on how you can achieve this: