How to reference the plant input value to a solver variable in motionview?

I am trying to integrate this AI model that predicts the primary and secondary pulley radius of a motorcycle with CVT in twin activate co simulation.
I have created python block which contains the AI model. This accepts inputs that should come from the motionsolve block during simulation.
I have already setup the plant input and output in my motorcycle model and I already established a communication between this motionsolve block and python block and the AI model is already providing the output (primary and secondary pulley radius) to the motionsolve block.
Here is how i setup my plant input which should receive the output from the python block.
How can I reference this input values to this primary and secondary pulley solver arrays of the motorcycle model so that it will use the values coming from the ai model throughout the simulation instead of using their default expressions.
Is this the proper approach? Need some advice. Thanks in advance!
Answers
-
Hi @sudo,
I believe you have the correct approach. If you want the Twin Activate model to supply you with a primary and secondary pulley radius throughout the simulation, the respective solver variables must be assigned to a plant input. Therefore, as the simulation progresses, the values from your Twin Activate model will overwrite the values in the solver arrays.
Hope this helps!
Adam Reid
0