Specifications

253
This completes the introduction to optimization studies.
Trouble shooting AnyScript models
If you think mechanics is simple, it's probably just because you haven't worked with three-dimensional
space yet. The laws of mechanics are pretty easy to comprehend as long as stuff is moving on a one-
dimensional line. When you go to two dimensions, complications such as rotational inertia and centrifugal
forces start to play a role, but the equations are still not very difficult. The third dimension is what
complicates things enormously and even to the point that mere kinematics becomes a matter for university
scholars. It is quite literally rocket science.
A system like AnyBody is a tremendous help in this situation because it sets up and handles all the
equations inside the system and relieves you of the task of actually handling the mathematics. But the
system does not prevent you from creating models where the syntax or semantics of the model is invalid,
where segments cannot reach their joints, where the kinematics is undefined, or where there are not
enough muscles to balance the forces in the system. You are likely to run into all these problems.
More precisely, you can get the following types of errors:
Load-time errors - when the AnyScript model is syntactically erroneous
Run-time errors - when a successfully loaded model refuses to be analyzed.
Load-time errors
A load-time error occurs when you load a model by pressing F7 or the M<-S icon on top of each window.
This causes the system to attempt a compilation of the model you have in the window, and any errors
occurring in this respect are load-time errors.
Load-time errors are problems with the syntax of the AnyScript model you have authored. Such a model
must honor a number of very formal semantic rules to be valid, and if it fails the test of any of those, you
will get a load-time error.
Each possible error that can occur is associated with an error message, and the system will print the
message in the message window at the bottom of the screen, for instance like this:
ERROR : C:\MyDocuments\AnyScripts\Main.any(42) : AnyVar : unexpected
or like this:
ERROR : C:\MyDocuments\AnyScripts\Main.any(45) : cannot open file : DrawSetting.any
or this:
ERROR : C:\MyDocuments\AnyScripts\Main.any(133) : EOF : unexpected
As you can see, error messages adhere to a certain structure. The first part after ERROR is the file in which
the system encountered the error. Notice that this may be a different file from the one you were loading
because the main file may spawn to include files during the loading of the model.
After the file name you find a number in parenthesis. This is the number of the line where the error
occurred. If you double-click the file name or the number, the file opens, and the cursor is placed at the line
in question. Be sure to click the file name or line number and not the error message.
After the line number comes the actual specification of the error. With good descriptive error messages and
easy access to the error location you should have the problem fixed in no time. Unfortunately things are not