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!