Is there a way to dynamically add constraints? #231
Unanswered
dark-trojan789
asked this question in
Q&A
Replies: 1 comment
-
Interesting idea... I think a lot will depend on what the TOML file content looks like. You can find the code the builds constraints here: Lines 202 to 214 in 4476b83 Basically, the constraint method is called to build up a constraint model, and that constraint model is added to the rand-obj model. You should be able to use Python dynamic evaluation (exec / eval) to evaluate constraints read from your TOML file and build a PyVSC constraint data model. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello guys, I wanted to know if there is way to randomly add constraints to a pyvsc.randobj?
for example I wanted to extend a base class to dynamically add constraints from a TOML file into the extended class
Beta Was this translation helpful? Give feedback.
All reactions