muscle recuitment failure!

Hi guys,

I am sasi, Graduate student, Mechanical engineering at University of Buffalo, NY. I am currently working on the project wherein I have to use the arm curl model in the repository and build an exo-skeleton around it to minimize the muscle forces. The arm is suppossed to lift a dumb-bell of given weight and the ex0-skeleton should aid the moment of the arm. The exo-skeleton in turn in actuated by a moment at its joint. I used the AnyOpt function to iteratively Optimize the moment such that the muscle forces are minimized. However, I realised that after a few iterations the muscle recuitment analysis fails. Is there any way in which I can prevent this from happening? I am attaching my code to this post. Your help in this is greatly appreciated.

P.S: I previously put this post on a wrong forum and I hope I got it right this time. Thanks Sylvian.

Thank you,