Solver Error

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Sakamo Yuto
Posts: 2
Joined: Sun Jun 09, 2024 8:42 pm

Solver Error

Post by Sakamo Yuto » Tue Nov 12, 2024 10:09 pm

Hi from Japan.
I use RajagopalModel for MocoStudy.
When study.solve() works , this error occurs.

Java exception occurred:
java.lang.RuntimeException: casVector should be 1-dimensional, but has size 0 x 0.
Thrown at MocoCasOCProblem.h:108 in convertToSimTKVector().

at org.opensim.modeling.opensimMocoJNI.MocoStudy_solve(Native Method)

at org.opensim.modeling.MocoStudy.solve(MocoStudy.java:282)




I can't understand why solver can not solve this problem.

User avatar
Nicholas Bianco
Posts: 1043
Joined: Thu Oct 04, 2012 8:09 pm

Re: Solver Error

Post by Nicholas Bianco » Fri Nov 15, 2024 8:21 pm

Hi Sakamo,

That error usually occurs when the optimizer struggles with the problem initial guess. Are you using the default initial guess or providing your own? Some general details about your problem would be helpful too.

Best,
Nick

POST REPLY