Any Script Ref Manual

377
The AnyBody TM Modeling System AnyScript TM Reference Manual Version 4.0.1, May 2009 Copyright c 2009, AnyBody TM Technology A/S Home: www.anybodytech.com

Transcript of Any Script Ref Manual

Page 1: Any Script Ref Manual

The AnyBodyTM Modeling System

AnyScriptTM Reference ManualVersion 4.0.1, May 2009

Copyright c© 2009, AnyBodyTM Technology A/S

Home: www.anybodytech.com

Page 2: Any Script Ref Manual

Contents

1 Introduction 1

1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Important Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3 How to Write AnyScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3.1 Declarations and Initializations . . . . . . . . . . . . . . . . . . . . . . . . 6

1.3.2 References and Expressions . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.3.3 Comments and Include Statements . . . . . . . . . . . . . . . . . . . . . . 9

1.3.4 Including Main Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

1.3.5 Model Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

1.3.6 The Preprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1.3.7 Class Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1.4 Organization of the Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

1.5 How to Read the Class Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . 15

1.5.1 Expected Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.5.2 Obligatory-Initialization Members, Optional-Initialization Members, andDenied-Access Members . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1.6 What Happens Inside AnyBody . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.6.1 The Loading Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.6.2 Mathematical Expressions and Evaluation Moments . . . . . . . . . . . . 19

1.6.3 Runtime Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2 Basic Classes 21

2.1 Class Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

i

Page 3: Any Script Ref Manual

AnyObjectGeneral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

AnyObjectTreeElement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

AnyObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

AnyRealObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

AnyFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

AnyConfigFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Any3DObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

AnyCamera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

AnyCameraModelView . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

AnyCameraLookAt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

AnyDesVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

AnyDesMeasure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

AnyCamRecorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

AnyMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

AnyFunctionArgList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

AnyOutputFolderGeneral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

AnyOutputFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

AnyAbscissaFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

AnyMainFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

AnyStdSettingsRoot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

AnyConsoleSettingsRoot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

AnyStdGlobalRoot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

AnySystemValuesFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

AnySystemValuesFloatFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

AnySystemValuesIntFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

AnyRefObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3 Variables and Expressions 37

3.1 Mathematical and other Expressions . . . . . . . . . . . . . . . . . . . . . . . . . 39

3.1.1 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

ii

Page 4: Any Script Ref Manual

3.1.2 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.1.3 Standard Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3.2 Class Tree and Overview of Data Types . . . . . . . . . . . . . . . . . . . . . . . 44

3.3 Class Tree of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

AnyValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

AnyFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

AnyFileVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

AnySurfFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

AnyInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

AnyIntVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

AnyIntArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

AnyIntArray2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

AnyFloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

AnyVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

AnyVarRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

AnyRGBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

AnyRGB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

AnyFloatVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

AnyVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

AnyMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

AnyVec3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

AnyVec4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

AnyMat33 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

AnyOutputFloatLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

AnyOutputFloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

AnyOutputFloatPostProc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

AnyString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

AnyObjectSearchString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

AnyStringVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

AnyChartSerieTitle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

iii

Page 5: Any Script Ref Manual

AnyStringVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

AnyStringArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

AnyPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

AnyEnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

AnyRefFrameAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

AnyEnumFloatNumberStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

AnyEnumPointMarkerStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

AnyEnumLineStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

AnyEnumLine3DStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

AnyEnumLine3DCapStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

AnySwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

AnyEnumVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

AnySwitchVar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

AnyEnumState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

AnyDBType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

AnyDesMeasureType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

AnyEnumOptSolver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

AnyMuscleRecruitmentSolver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

AnyKinEqSwitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

AnyEnumFourierSerieType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

AnyKinRotationalType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

AnyEnumMuscleRecruitmentType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

AnyEnumMuscleRecruitmentNormalizationType . . . . . . . . . . . . . . . . . . . . . 66

AnyInterPolType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

AnyFilterType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

AnyChartStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

AnyEnumMessageType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

AnyFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

AnyFun3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

AnyFunTransform3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

iv

Page 6: Any Script Ref Manual

AnyFunTransform3DIdentity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

AnyFunTransform3DLin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

AnyFunCross . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

AnyFunRotMat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

AnyOutputFun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

AnyParamFun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

AnyFunInterpol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

AnySearchFun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

AnyFunLinFilterBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

AnyFunLinFilterDesignBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

AnyFunButterworthFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

AnyFunLinFilter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

AnyFunElemOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

AnyFunElemByElemOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

AnyFunSin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

AnyFunASin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

AnyFunSinh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

AnyFunCos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

AnyFunACos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

AnyFunCosh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

AnyFunTan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

AnyFunATan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

AnyFunTanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

AnyFunLog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

AnyFunLog10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

AnyFunExp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

AnyFunSqrt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

AnyFunAbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

AnyFunCeil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

AnyFunFloor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

v

Page 7: Any Script Ref Manual

AnyFunRound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

AnyFunPow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

AnyFunMult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

AnyFunDiv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

AnyFunAtan2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

AnyFunInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

AnyFunNumElemOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

AnyFunDimOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

AnyFunSizesOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

AnyFunNameOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

AnyFunCompleteNameOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

AnyFunClassNameOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

AnyFunStringValueOf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

AnyFunFormatString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

AnyFunVecOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

AnyFunVecSum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

AnyFunVecSecInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

AnyFunVecMean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

AnyFunVecProd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

AnyFunVecMax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

AnyFunVecMin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

AnyFunVecVNorm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

AnyFunConditional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

AnyFunIf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

AnyFunEq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

AnyFunLessThan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

AnyFunLessThanEq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

AnyFunGreaterThan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

AnyFunGreaterThanEq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

AnyFunAnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

vi

Page 8: Any Script Ref Manual

AnyFunOr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

AnyFunInit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

AnyFunIntArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

AnyFunArrayCat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

AnyMonoFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

4 Mechanical Objects 116

AnyMechObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

AnySurface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

AnySurfSTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

AnyParamSurf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

AnyParamSurfAnalytical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

AnySurfEllipsoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

AnySurfSphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

AnySurfCylinder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

AnyRefFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

AnyFixedRefFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

AnyPositionedRefFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

AnyRefNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

AnyMovingRefFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

AnySeg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

AnyForceMeasure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

AnyForceMomentMeasure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

AnyForceMomentMeasure2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

AnyMuscleModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

AnyMuscleModel3E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

AnyMuscleModel2ELin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

AnyMuscleModelUsr1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

AnyKinMeasureBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

AnyKinMeasureUsr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

vii

Page 9: Any Script Ref Manual

AnyForceBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

AnyAppliedForce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

AnyMuscle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

AnyGeneralMuscle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

AnyViaPointMuscle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

AnyShortestPathMuscle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

AnyShortestPathMuscle2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

AnyLigament . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

AnyViaPointLigament . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

AnyForce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

AnyForce3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

AnyMoment3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

AnyReacForce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

AnyKinMeasure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

AnyKinMeasureReal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

AnyKinLinear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

AnyKinCoM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

AnyKinPLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

AnyKinSPLine2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

AnyKinSPLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

AnyKinRotational . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

AnyKinMeasureCombBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

AnyKinMeasureNormComb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

AnyKinMeasureLinComb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

AnyKinMeasureOrg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

AnyJoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

AnyStdJoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

AnySphericalJoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

AnyTransSphericalJoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

AnyCylindricalJoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

viii

Page 10: Any Script Ref Manual

AnyRevoluteJoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

AnyPrismaticJoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

AnyUniversalJoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

AnyKinEq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

AnyKinEqDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

AnyKinEqSimpleDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

AnyKinEqPolynomialDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

AnyKinEqFourierDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

AnyKinEqInterPolDriver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

AnyLigamentModel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

AnyLigamentModelPol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

4.1 Class Tree for AnyMechObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

4.2 Class Tree for AnyKinMeasureUsr . . . . . . . . . . . . . . . . . . . . . . . . . . 210

4.3 Class Tree for AnyKinMeasure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

5 Drawing and Styling Objects 212

5.1 Drawing Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

AnyDrawObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

AnyDrawObjectRigid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

AnyDrawObjectRigidFormatted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

AnyDrawRefFrame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

AnyDrawSeg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

AnyDrawNode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218

AnyDrawNodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

AnyDrawSurf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

AnyDrawSTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

AnyDrawParamSurf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

AnyDrawCamera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

AnyChart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

AnyDrawVector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

ix

Page 11: Any Script Ref Manual

AnyDrawLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

AnyDrawPLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

AnyDrawViaPointMuscle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

AnyDrawMuscle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

5.2 Scene Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

AnySceneObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

AnyScene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

AnySceneViewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

5.3 Style Defining Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

AnyStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

AnyStyleDraw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

AnyChartObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

AnyChartSerie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

AnyChartText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251

AnyChartTextField . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

AnyChartStyleFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

AnyChartLegendFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

AnyChartSeriesFolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

AnyChartAxisUnit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

AnyChartAxis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

AnyStyleDrawLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

AnyStyleDrawLineWithCaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

AnyStyleDrawPointMarkers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264

AnyStyleDrawLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

AnyStyleDrawLineCap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

AnyStyleNumeric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

AnyStyleNumeric1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268

AnyStyleNumeric1f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

AnyStyleNumeric2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

AnyStyleFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

x

Page 12: Any Script Ref Manual

AnyOutputFileHeaderFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

6 Studies and Operations 274

6.1 Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

AnyStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

AnyDesStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

AnyDesEvalStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

AnyParamStudyBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

AnyParamStudy1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

AnyParamStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

AnyOptStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

AnyTimeStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

AnyMechStudyBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

AnyKinStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

AnyBodyCalibrationStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

AnyBodyStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298

AnyMechStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304

AnyMechStudy1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

AnyBodyStudy1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

6.2 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315

AnyOperation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

AnyOperationDummy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

AnyMechOprBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

AnyMechOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319

AnyMechOprKinAnl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

AnyMechOprInvDynAnl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

AnyMechOprInvMuscleDynAnl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

AnyBodyMusTenLenCalOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325

AnyBodyLigamentLenCalOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326

AnyMechOprDeprecated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

xi

Page 13: Any Script Ref Manual

AnyMechOprSubProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328

AnyOperationSequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

AnyDesEvalStudyOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330

AnyParamStudyOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

AnyOptStudyOpr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332

AnyMechStudy1ModelInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

AnyMechStudy1SetInitCond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334

AnyMechStudy1KinAnl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335

AnyMechStudy1InvDynAnl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336

AnyMechStudyModelInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337

6.3 Operation Settings Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

AnyOprSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

AnyOprSetOptim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

AnyOprSetNRSimplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341

AnyOprSetOOSolSimplex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342

AnyOprSetOOSolQP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

AnyOprSetMuscleRecruitment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344

AnyOprSetMuscleRecruitmentNormalization . . . . . . . . . . . . . . . . . . . . . . . 346

6.4 External Data Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

AnyDataFileBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348

AnyOutputFileBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349

AnyOutputFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

AnyMechOutputFileBase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353

AnyMechOutputFileEquilEqExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

AnyMechOutputFileForceExport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

AnyInputDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

AnyInputBVH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359

AnyInputC3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361

AnyInputFile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

xii

Page 14: Any Script Ref Manual

Chapter 1

Introduction

This document is the reference manual for the AnyBodyTM Modeling System or rather the modelinglanguage AnyScriptTM. AnyScriptTM is AnyBodyTM’s model definition language. Please beware thatthis manual is partially generated by a software with access to the data structure of AnyBodyTM.The generated information should therefore always an accurate map of the associated version ofAnyBodyTM, cf. the version number on the title page.

AnyScriptTM is continuously being developed and so is the information in this manual. The newestversion can always be found on AnyBodyTM Technology’s homepage (www.anybodytech.com). Pleasedo not hesitate to contact AnyBodyTM Technology if you need more information or have suggestionsfor improvements of this manual or the functionality in AnyScriptTM.

This introductional chapter explains some general issues and terminology associated with the Any-ScriptTM language and the data structure in AnyBodyTM. AnyScriptTM is an object-oriented languagewith a fixed set of available data types (classes). This means that you cannot define your own typesand you cannot, like in a programming language, write algorithms. An AnyScriptTM file is purelyconsisting of definitions (declarations) of objects and the internal data structure in AnyBodyTM mapsthese definitions completely.

1.1 Terminology

The first and most obvious thing you may have noticed already, is that a lot of things are called’Any’-something. You may come to like this or hate it, but anyway there are good reasons for thischoice of terminology.

The principle is that the names of all data types (i.e. all class names) start with ’Any’. The historicalreason is that they are the classes of the AnyBodyTM modeling language, and the name ’AnyBody’implies that it is a system for making models of any body, be it a human, a dog, or a dinosaur. Sim-ilarly, you may think of a class as the basis for making any object of that type; for instance the baseclass for any type of object is called AnyObject, i.e., all objects are also AnyObjects. The practicalreason for this standardization of the class names is that it makes class names easy to distinguishfrom object names and other identifiers. It provides a primitive form of syntax highlighting, whichwas particularly nice in earlier versions of AnyBodyTM where color highlighting in the AnyScriptTM

1

Page 15: Any Script Ref Manual

2

editor did not exist.

If you get tired of the many Any’ies, you can often skip them in oral communication without losingthe meaning. Even in this manual you will find us speaking of objects, folders, segments, etc. eventhough it would be more strictly correct to speak of objects of the types AnyObject, AnyFolder, andAnySeg. We believe you will appreciate this.

The remaining part of this section contains brief explanations of terms that will be used frequentlywhile describing the details of the AnyScriptTM language.

Objects are the actual elements you create/define by the AnyScriptTM declarations. They are alsoreferred to as the instances of the classes, i.e., you can have many objects (instances) of thesame class.

Classes: A class is an object type specification. Classes can be derived from other classes wherebythey inherit properties from the class they are derived from. Typically they add more proper-ties to inherited ones in order for their existence to be justified. In AnyScriptTM all classes arederived from one class, which implies that all classes can be organized in a tree with one rootaccording to their derivation. There are three categories of classes in AnyScriptTM:

Creatable classes are the classes you can actually use, meaning that you can define objectsof these classes.

Abstract classes: Objects of abstract classes cannot be declared in AnyScriptTM. They lacksome of the information necessary to be fully operational entities. Their purpose is toprovide some kinship between derived classes, so they are typically found high in theclass hierarchy.

Hidden classes are classes that primarily exist for convenient organization of the program’sfunctionality. Knowledge about these will be of little relevance to the standard user.

Class Templates are AnyScriptTM defined templates for a class. In principle, Class Templates arenot real classes, like the built-in AnyScriptTM classes, but they do indeed work almost likethe real classes. Since the Class Templates can be defined in AnyScriptTM code, they can bedefined by the user.

Class tree or class hierarchy is the tree of classes ordered according to the inheritance. In relationto the relative location of classes in the tree, the following terms are used:

Parent class or base class are names for the class a given class is derived from. The parentor base class is the root in a tree of all the classes derived from it.

Child or derived class are names for the classes that are derived from another class, the baseclass.

Object tree or object hierarchy is the tree of objects. This is a map of the existing objects in amodel and it can be browsed in the user interface of the system after proper loading of themodel in AnyBodyTM. There are in principle two types of objects: those that can contain othersand those that cannot. The former are the nodes of the object tree and the latter the leaves.The basic classes of these two kinds are the AnyFolder, which can contain other objects, andAnyValue, which is parent of all classes that hold values, i.e., basic data. AnyFolder is the

Page 16: Any Script Ref Manual

3

parent of most classes because any modeling object typically hold data for user input andoutput of results; this is what makes the functionality of the class accessible. The followingterms are used to describe object relationship in the object tree:

Owners are the objects that contain other objects. This implies that an owner is of the classAnyFolder or derived from AnyFolder.

Members are the objects defined inside a given object, i.e., the owner.

Properties are the values stored in members, so we may speak of the properties of a givenclass (the owner of the property-holding member), for instance the mass of a segment.This implies that properties are stored in classes that are derived from AnyValue.

Folder scopes: AnyScriptTM files are divided into scopes delimited by braces, "{" and "}". Thescope of a folder is opened by "<foldername> = {" and closed by "}". The scope of a foldercan contain initialization of existing members and declarations of new members, i.e., initial-ization for the folder. The folder scope can be thought of as the "value" of a folder. Generaldescription of the use and access of scopes shall not be given here, but a number of specialissues regarding scopes shall be mentioned below.

Main is first scope you encounter in an AnyScriptTM model. This outer scope is where theuser defines the model. Main is a special folder that is predefined in the system so thatit can be filled (initialized) without declaration. Therefore, all AnyScriptTM models startwith the phrase "Main = {", which open the Main scope for initialization. There existsonly one Main folder and Main is a restricted keyword.

Global is actually the outer most scope which among others contains the Main folder. AsMain, Global is a special folder, which is predefined by the system. The scope of Globalis not accessible for initialization by the user, but it functions to contain predefined ob-jects that the system makes available to the user. The access to these objects is facilitatedby a special mechanism of the AnyScriptTM compiler that makes all objects in the Globalfolder available from anywhere in the script, i.e., from any scope. To the user it appearsas if these global objects exist in all scopes. Apart from Main, typical contents of Globalis mathematical constants and functions.

Restricted keywords are all words that cannot be used for object names. All class names arerestricted keywords, as well as all names of the members of the Global folder. Moreover,all names of predefined members appear as restricted keywords in the given scope.

Object names: All objects are identified by names, the object names. An object is uniquelyidentified by its name and the folder it is member of, i.e., there can be only one objectwith a given name in each folder. The object name can consist of letters (case sensitive),digits (not in the first place) and underscores. Adding the identification of the folder infront of the object name, you can uniquely refer a given object. This will be covered inmore details in a following section.

Class operations: The concept of class operations is introduced in AnyBodyTM version 3.0. It is aspecial kind of functions (or operations as we shall call them) that are associated with a classand thereby with objects of that class. In C++ you call them member functions; but in Any-ScriptTM we have both functions and operations as classes (AnyFunction and AnyOperation,please see Section 1.2), which implies that we can have members of these classes in an ob-ject. This could also be interpreted as member functions or member operations. Therefore,

Page 17: Any Script Ref Manual

4

we have come up with a new name for this type of operations that are associated with a ob-ject through its class definition. Currently, class operations are not documented in the classreference pages, but you will see them in the AnyBodyTM GUI when you right-click objects inthe object tree (i.e. the Model Tree attached to most of AnyBodyTM’s windows). Class opera-tions typically provide some sort of interface between the user and the data in the object. Bythis mean, objects can be made to supply more information than normally available by justbrowsing the members of the object.

Object Description: The Object Description is the most basic class operation, which is as-sociated with AnyObject and thereby all other classes. It basically prints a message withall sorts of information about the objects. Notice that in AnyBodyTM’s GUI this messagewill be presented in a special window with active links that enables you to move aroundin the system according to the information presented. This is a simple, yet powerfulsource of information about objects.

Comments in the code: Comments in the code is a concept known in all developped program-ming languages, i.e., text written in the source files that only serve to document the code butwithout being compiled. In AnyScript comments look much like in C++, for a more detaileddescription see Sections 1.3.3 and 1.3.5 In AnyScriptTM there are two types of comments.

Source code comments are comments documenting the source code as known from mostother programming languages. They are completely disregarded by the AnyScriptTM

compiler and their only objective is to assist the reader of the source code.

Documentation Comments are associated with objects in the model. They are clearly markedin the code and they can therefore be read by the AnyScriptTM parser and stored togetherwith the objects. Later these comments made by the model programmer can be usedby the AnyBodyTM system to assist the user of the model, for instance these commentsare included in the description prepared by the Object Description class operation. SeeSection 1.3.5 for more details. There are three ways to make such Documentation Com-ments:

Prefixed Document Comments are placed just before the initialization of an AnyScriptobject.

Postfixed Document Comments are placed right after the ending ";" of an AnyScriptobject initialization.

Scope-fixed Document Comments can be placed anywhere in the middle of the scopeof an AnyScript object initialization.

1.2 Important Classes

In this section, we shall describe a number of basic and particularly important classes. Detaileddescription of these classes are naturally found in their own manual pages, but the description hereserves to provide some overview of how the AnyScriptTM language is designed. As you may discovermany of these important classes are abstract base classes, so their importance actually comes fromthe role of defining core concepts in the language.

Page 18: Any Script Ref Manual

5

AnyObject This is in priciple the base class of all classes. In other words, all objects in AnyScriptTM

are AnyObjects.

AnyValue Value objects are objects that can contain values of specific types. The actually datatypes are defined in AnyValue-derived classes. As such AnyValue objects, are the base classfor all value or all variables.

AnyRefObject An AnyRefObject is reference object that makes a link between a place in thecode and an exsisting object somewhere else. You do not declare an AnyRefObject directly;you declare an object of the type you are referering to and by the reference operator "&"you indicate that it is a reference, see also Section 1.3.2. Thereby, the reference holds theinformation of the objects it points to as well as a type (class) indicator.

AnyFolder AnyFolders are containers of other objects. Most classes are actually derived fromAnyFolder due of this property, but also AnyFolder itself is important for collecting and or-ganizing your models systematically.

AnyConfigFolder A special branch of AnyFolders is the AnyConfigFolders. AnyConfigFolder-derived classes pocess special functionality for loadtime configuration. This is needed formany classes that have a computational kernel in order to configure these computations andtheir relationship to other classes/objects.

AnyFunction Function classes are a special branch of classes derived from AnyFunction. A func-tion class defines AnyScriptTM functions that can enter into expressions, mathematical func-tions for instance. The name of a function object becomes the identifier you must use tocall the function in an expression. The majority of AnyFunction-derived classes are simplystandard (mathematical) functions, of which one instance is predefined globally. For instancesine and cosine are defined by the classes AnyFunSin and AnyFunCos, and two predefinedglobal objects called "sin" and "cos", respectively, provide the user with the expected abilityto call sin and cos from any expression like in most other programming languages. How-ever, some function classes are user declarable, implying that you actually can declare one(an instance) in the script code. This gives you a kind of local function and typically sucha function requires initialization of certain attributes that make the particular instance of thefunction special.

AnyStudy Studies are derived from AnyStudy. A study class is collection of facilities that define acertain type of investigation (or study) that you might want to do. This implies that the studyclass consist of functionality, for instance mathematical routines and algorithms, for settingup and solving a given problem. For instance AnyMechStudy (and derived classes) are stud-ies for making simulations of a mechanical systems. In addition to the actual capabilities forperforming the invetigations in question, a study also contains the necesarry functionality forsetting up the investigation for instance by means of other classes. For instance the AnyMech-Study analyzes all the AnyMechObjects it contains; these are the definition of the mechanicalsystem to be analyzed.

AnyOperation Operations are an important part of the interface between the model and Any-BodyTM’s user interface. Operations are AnyFolders, but they have the special function thatthey define certain actions that can be done on the model. Typically, a study contains one ormore operations that allow the user to execute the investigations that the study contains. Someoperations can however stand alone without being part of a study.

Page 19: Any Script Ref Manual

6

AnyMechObject Base class for all mechanical objects that are used to define a model of a mechan-ical (hereunder musculoskeltal) system. Mechanical objects are basic building blocks using amultibody dynamics formalism.

AnyDrawObject Base class for all draw objects that are a objects, which can be visually displayedin the Model View of AnyBodyTM’s GUI application. This is noticeable because it illustratesthe general differentiation between model and view in AnyScriptTM. A mechanical element inthe model does not per default give any displayable view. The view is produced by objectsthat are defined by the user in connection to the model. This gives the user complete freedomto define a view that suits a given purpose.

1.3 How to Write AnyScript

This section gives a brief introduction to the rules for writing an AnyScriptTM file or files. In manyways AnyScriptTM looks syntactically like C++ or Java and this is a deliberate choice.

In fact, if you compare AnyScriptTM to popular programming languages, you may find that it isvery similar to JavaScript. The syntax is much the same, and AnyScriptTM shares the property withJavaScript that it works on a set of predefined classes and does not let the user define new classes.Some of the syntactic similarities are the uses of braces to delimit different sections of the modelfrom each other and the fact that each declaration is terminated by a semicolon. The main differenceis that AnyScriptTM does not contain any executable statements, so you cannot specify a sequence ofevents, i.e., write algorithms; AnyScriptTM is purely declarative contrary to all the other languagesmentioned above.

In the following sections, we shall now look closer at the principles of the writing AnyScriptTM.

1.3.1 Declarations and Initializations

As we have already mentioned briefly the Main folder plays a special role as a container of theentire model. This means that a basic AnyScriptTM file must contain "Main = {... <model content> ...};". You could define all the objects of the model in one big pile inside the Main folder. This wouldcreate a very flat but also somewhat messy object tree. So users normally prefer to organize theobjects of the model in subfolders according to some system. For instance, a folder could containobjects of similar types, or it could be a particular body part. The folder structure plays an importantrole for complex models of the entire body. It allows such models with many hundred element to becomposed of models of body parts developed by different users. AnyFolder can be nested as muchas you find practical for your model; AnyScriptTM does not make any restrictions in this regard.

Notice that all statements in AnyScriptTM end by a semicolon. We have this in containing "Main ={... <model content> ... };" statement and this is indeed how all statements must end.

A declaration of an object is made be writing the class name followed by the name, you want forthe object. The object name can consist of letters (case sensitive), digits (not in the first character ofthe name) and underscores. The declaration defines (creates) a new object that did not exist before,i.e., a new instance of the class. The object declaration must also contain an initialization of the

Page 20: Any Script Ref Manual

7

object’s value. This is done by an equality sign followed by an acceptable value for the given class.A complete declaration must look like "<ClassName> <objectname> = <value>;". The <value>can for folders be a scope containing multiple statements inside braces or it value-objects it can besimple values or expressions.

Some objects are not declared directly in the script; they come into the model as predefined membersof others, their owner. Most folder classes, except for AnyFolder and some other basic classes, havesuch predefined members, which are implicitly declared when you declare the owner. Some foldersclasses may contain other folders as members, which may contain other folders and so on, and inthis way a simple declaration an object of such a complex class can lead to a multiple levels andmany properties in the resulting object tree.

An existing object, i.e., a predefined member of another object, can be initialized with a statementsimilar to the declaration; in this case you should simply omit the class name, because the objectalready exists, i.e. "<objectname> = <value>;". All objects that hold values (AnyValue-derived) canonly be initialized once from the script. Folders, however, can be initialized many times, becausea initialization of a folder actually is the same as opening its scope and adding to it. The folderinitialization looks like "<foldername> = {... <content> ... };" Actually, the start of the AnyScriptTM

file, "Main = {... ", can be regarded as merely an initialization of the Main folder.

Multiple initializations of a folder allow you to add contents to folder from many places in yourscript. This is a very important feature when creating complex models that are composed of manybuilding blocks, but it is beyond the scope of this section to explain the details. Please refer to thetutorials in the AnyBodyTM documentation for futher treatment of this issue.

The sequence of declarations of objects in AnyScript does in general not matter. This can be alloweddue to the fact that you only declare objects, i.e., state the existence of them; you do not definesequences of events like in most programming languages. AnyScriptTM will look for objects in theentire object tree if you refer to a existing object. This implies that you can declare an object inthe bottom of your file and refer to it in the top. Some classes do however use the sequence of itsmembers to determine certain properties that may be use in subsequent computations. In such case,it is not advisable to declare such sequence sensitive members from different initialization of thefolder-object, because the sequence actually will be resolved by the script compiler. Doing it insidea single folder initialization scope is safe because the sequence of the members then becomes thesame as the sequence in the code.

1.3.2 References and Expressions

You can refer to objects by their names. Inside the scope of a given folder, the members’ names areunique, i.e., no two objects can have the same name. You can also refer to objects that are located inother folders. This can be accomplished in two ways: by absolute and by relative references. Bothreference types are made by indicating the object’s owner in front of the object name and dots (’.’)are used as separators as customary in object-oriented programming and internet addresses.

Absolute references are made by the so-called complete name of an object. The complete namespecifies all owners from the root, i.e. from Main, and to the object like for instance "Main.-<foldername>.<subfoldername>.<objectname>". This absolute reference to an object is valid fromany scope in model.

Page 21: Any Script Ref Manual

8

A relative reference is however only valid from that particular scope level. You can refer furtherdown in the object tree from a given level like the absolute reference refers down from the Globalscope, for instance "<membername>.<membersmembername>.<objectname>". You can also referup the model tree. A dot in front of the name indicates one level up the tree, i.e., "...<foldername>.-<objectname>" refers to the member of a folder three levels up from the current scope.

Absolute and relative references can be used on the left hand side of the equality sign in an initial-ization; however, the more common use is on the right hand side for specification of the value. Allvalue objects (derived from AnyValue) can be initialized as equal to another value of the same type.Moreover, expressions using mathematical operators and functions are allowed to a certain degree,primarily for classes holding numerical values. Mathematical functions are objects of special func-tion classes derived from the base class called AnyFunction. Therefore, expressions consist entirelyof references to objects and/or direct values combined by operators.

Folders cannot be initialized with another object. So you cannot, as could be expected, copy every-thing from one folder to another by initializing one folder by another. What you can do, however,is to make special referencing objects that refer to an existing folder (this is much like referencesand pointers in C and C++). Such references are made by objects of the class AnyRefObject, butthey are not declared in the script by this class name; they are declared by a class name of theobject you want to refer to and the so-called reference operator (’&’, like in C++). A reference ob-ject declaration looks like: "<TargetClassName> &<refobjectname> = <targetobjectname>", where<targetobjectname> is a folder object specified by either absolute or relative referencing.

What can the reference objects (or in short just ’references’) be used for? Actually they are a veryimportant and powerful feature of AnyScriptTM. Many objects use other objects of particular classes,which they expect to the user declare as members. For instance many mechanical objects need theirattachment points to be defined by declarations of reference frames inside the mechanical object.Often these points are already existing in other places in the model and here it is possible simplyto make a reference object pointing to the real object. The real object exists only once, but throughthe reference object it appears to exist in two places. It cannot be emphasized too much that thereis only one object and when its properties are changed, the changes will appear in the all placesincluding the references.

There is more important comment about the declaration of references to be made. It has just beenstated that a reference object is declared by the class name of the target object and the reference op-erator; however, the class specification does not have to be an exact match of the target object’s type.Any parent class of the target object is valid as reference type specification. It can be advantageousnot to use exact class matches for reference and target, if you occasionally change the class of thetarget or change the target to another object of another class. If all your possible target classes havea common base, this base class may be a more practical choice for type definition of your reference.There may however be restrictions on how general a base class you can choose depending on thefunction the reference object has.

If you make a reference specified as an AnyObject, AnyScriptTM can not resolve whether it is folderclass, a value class, or some much more specific class. This means that you lose the informationabout the special features of a class, if you refer to it with a parent class as class specifier.

Page 22: Any Script Ref Manual

9

1.3.3 Comments and Include Statements

To make your AnyScriptTM file more legible you can benefit from making comments and splittingyour model into several files. Both can be realized by features adopted from the C++ language.

Comments that are ignored by the AnyScriptTM compiler can be made in two ways: An entire para-graph can be excluded from the compilation by bounding it with "/*" and "*/", and a single linecan be excluded by a leading double slash, "//". The comment functionality can be used not onlyto write sensible messages to yourself or other readers of the code, but also to exclude parts of thecode temporarily during development and testing of a model.

Your models will soon grow too big and impractical for one file. Therefore, you can split theminto several files referring to each other. This also allows you to reuse parts of the code in differentmodels without having more than one file to maintain. Files are assembled by so-called includestatement (similar to C and C++), i.e. "#include "filename.any". This type of statement makes thecompiler read the given file, when it comes to the statement, as if its content had been typed in thisplace of the statement.

The functionality of the include statements implies that you must always have one so-called Mainfile, i.e., a file starting with "Main = {" and ending with "};". From this you can include other files,which may include other files and so on. Include statements can be nested as much as you findpractical. Include files do typically also use the extension ".any", but they do not contain "Main ={" statement.

Include statements and their functionality to assemble a model from many parts is an indispensi-ble feature of AnyScriptTM when developing large, complex body models. For instance, it is oftendesirable to separate body and application parts of the model so that the same body model can beincluded in other applications without having multiple copies. Complex models should always beorganized in several files to ensure their manageability and practical reuse of building blocks ofcode. Please refer to he tutorials of the AnyBodyTM documentation for further information abouthow to organize your models pratically.

1.3.4 Including Main Files

Notice that you can in fact also include Main files from other files. This functions in principle isjust like any other include statement, but it deserves as few comments. The special thing in thissituation is that the Main folder is actually a globally defined folder, which implies that regardlessof the scope in which this folder is opened, all additions to the folder will go to the top level folder.Related to include statement, this implies that whereever you include a Main file, the same thinghappens, namely that you add all what is declared in the included Main file to your current model’sMain scope. This can indeed be confusing and it is not recommended to include other Main file fromvarious arbitrary files in your model. Do it from the top level if needed, so that it is as transparentfrom the code as possible. Also notice that the Main file can only be included once; already atthe second attempt all member declared in the included Main file will conflict with already existigobject from the first inclusion.

There is one nice application, where it can be nice (and commendable) to include a Main file fromanother Main file. This is if you are making extensions to an existing model, but you would like these

Page 23: Any Script Ref Manual

10

extensions to stay separated from the existing code. For instance, you may be adding test facilitiesyou only need temporarily or once in a while, and you do not want these facilites to influence theappearance of the model, which you may share with your coworkers. In this case you can make newMain file, include your common Main file, and do you additions in the new file.

Similarly, you can also use the functionality to combine two models, if they are properly designedfor coexistence inside the Main scope. For this case however, it may be advisable to design themodels as separate building block each a non-Main, include file.

1.3.5 Model Documentation

From version 2.0 of AnyBodyTM, comments starting with either "/**" or "///" have been given aspecial meaning. These will be treated as part of a special model documentation that is storedtogether with the model objects and made available to the users of the models without requiringthem to read the AnyScriptTM source code. From version 3.0, these comments are collected withother object specific information to form an Object Description function, which for instance can beaccessed from all Model Trees in the AnyBodyTM GUI.

Comments using "/**" or "///" must be attached to an object in the script code. This is done byplacing the comment right in front the initialization of the object. This is refered to as a prefixedDocumentation Comment. Documentation Comments can also be posfixed, i.e. placed right afteran object initialization, but this requires an additional "<" after the preceding mark, i.e., "///<" and"/**<". This is convennient when documenting "small" objects like variables and the like.

A third method is convenient for "larger objects", i.e. folders. Folders can documented in the midleof the folder scope. We shall refer to this as scope-fixed Documentation Comments. A scope-fixed Documentation Comment is marked by adding an additional "ˆ" after the preceding mark, i.e.,"///ˆ" and "/**ˆ". This is convenient when documenting a section of code in the scope of an object,for instance from the inside of an #include file used during initialization of the object. Inside the#include file there will be no access to the start or end of the object’s scope, but still the contentsof the file may be worth commenting on. This is particularly convenient if the include file is usedmultiple time from different objects in the model, in which case it would require multiple identicalDocumentation Comments if they were made outside the include file, in the vicinity of the #includestatement.

Folders can be initialized several times and Documentation Comments can be made for each ini-tialization. Multiple such comments are collected into one text, when presented in the AnyBodyapplication. In the AnyBody GUI such collected presentations of Documentation Comments typi-cally contains links to the code for each comments. This can be a powerful tool for navigating theAnyScriptTM code of "large" objects being initialized in many places.

Page 24: Any Script Ref Manual

11

Future releases:This feature is still under development. It was the idea that the Model Documentation canbe exported together with other model information on XML format and that this output canbe further processed outside AnyBodyTM by standard XML related technologies (e.g. byXSL/XSLT style sheets transformations) to provide (HTML) documentation of the model.The basic format of the output to XML format was completed, but no further processing iscurrently available to the user. Moreover this exporting showed to be very inefficient, so cur-rently (version 3.0) the Model Documentation Comments have been made available inside theAnyBodyTM system. The exporting function may not be available in all version of AnyBodyTM

since it is still a feature under development Any requests, feedback, and wishes for use of thisfeature will highly appreciated by AnyBodyTM Technology and it is our hope that users willdevelop pratical final format and share them with the AnyScriptTM community.

1.3.6 The Preprocessor

Version 3.1 and 4.0 of AnyBodyTM has introduced a new and more powerfull preprocessor. Previ-ously, the preprocessor only expanded #include-statements during the file scanning process, whereasthe new preprocessor introduces features, such as macros and conditional code, known from C andC++ compilers.

In addition to these fairly simple code elements adopted from C/C++, a number of special featuresexist in the AnyScriptTM preprocesser. In particular, the concept of Class Templates has been in-troduced in version 4.0. Class Templates is an advanced form of code macros that upon usage,i.e. when expanded by the preprocessor, will work almost like declaration of a object of a built-inAnyScriptTM class. A Class Template does, like a macro, have a name and this is used almost likebuilt-in AnyScriptTM class names during declaration of instances (instantiation) of a Class Template.The following section provides a more detailed description of Class Templates.

Below is a complete list of the statements allow by the preprocessor. Notice that all preprocesserkeywords starts by the character #.

#include: The #include-statement is a statement that takes the content of a file and inserts it atthe location of the statement. It has already been explained in Section 1.3.3 Comments andInclude Statements and it was originally the only element of the AnyScriptTM preprocessor.

Syntax:#include "filename.any"

#import: The #import-statement is a statement much like #include-statement. However, the #import-statement is only allowed before the Main folder’s scope and the statement will only importClass Templates from source file. Read more about Class Templates below.

Syntax:#import "filename.any"

#define: The #define-statement links a piece of code to an identifier. When the idetifier is usedlater, it is substituted with the piece of code by the preprocessor. In this way, it works muchlike the #include-statment, except the code does not come from an external file. Due to this

Page 25: Any Script Ref Manual

12

function it is occationally called a macro, or code macro not to confuse it with macro files thatcan be used in the console version of AnyBodyTM. In contrast to #include-statements, #define-statements can however take arguments, which makes #define-statements more flexible.

Syntax:#define <identifier> <single-line-code>

Syntax:#define <identifier>(<arg1>,...) <single-line-code-using-the-arguments>Multi-line code can be made by using double backslash to end all the lines but the last.

#path: The #path-statement allows to link a directory path to an identifier that subsequently can beused in #include-statements as well as in other AnyScriptTM expressions. It functions a bit likethe #define-statement, except that it does not take argument and the content is validated as anactual #path-statement during model loading.

Syntax:#path <identifier> "path"

#undef: #undef-statments undefine macros made by #define-statements.

Syntax:#undef <identifier>where the <identifier> must be previously defined.

#if - #else: The #if-statement gives the posibility for conditional code. Simple expressions, e.g.operating on indetifiers made by #define-statements, can be use to select between blocks ofAnyScriptTM code. Variants of the #if-statement use respectively #ifdef or #ifndef testing onwhether an <identifier> is defined or not-defined.

Syntax:#if <expression> <multi-line-code> #else <multi-line-code> #endif

Syntax:#ifdef <identifier> <multi-line-code> #else <multi-line-code> #endif

Syntax:#ifndef <identifier> <multi-line-code> #else <multi-line-code> #endif

#class_template: Class Template declaration specifier.

Syntax:#class_template <identifier> (<arg_list>) { <multi-line-code> };

where <arg_list> is a comma-separated list of optional arguments. Each argument in the listcan have either of the following forms

Syntax:<identifier><identifier> = <value><class_name>& <identifier>where <identifier> is the argument name, <value> is a default value, and <class_name> isa AnyScriptTM class name. This implies that arguments can either be simple arguments, i.e.,preprocessor values, or object references.

Page 26: Any Script Ref Manual

13

#default: The #default-specifier indicates that existing default values should be maintained uponinstatiation of a Class Template; please refer to the #var-specifier for further details on usageof the #default-specifier.

#var: The #var-specifier specifies that a value member in a Class Template shall be treated as amember that can be initialized upon instantiation of the Class Template by the user. The #var-specifier is placed before the declaration of a member value or before initialization of existingmembers. The #var-specifier is only allowed inside the scope of a Class Template.

Syntax:#var <identifier>;#var <identifier> = <value>;#var <identifier> = #default;where <identifier> is an exsisting member, i.e., a member that is declared implicitly as adefault member of another object via its decalaration.

Initialization with #var specification provides a default value; this implies that initializationupon instantiation of the Class Template is optional (i.e. Optional-Initialization Member). The#default-specifier indicates that previously defined default values are still valid; this is onlyallowed for exisiting members that originally have default values, i.e., Optional-InitializationMembers. Omitted initialization implies that no default value exist and therefore initializationupon instantiation is required (i.e. Obligatory-Initialization Member).

The #var specification can also be used directly on declaration of new value members:

Syntax:#var <class_name> <identifier>;#var <class_name> <identifier> = <value>;where <class_name> is a valid name of a value-class, i.e., a class derived from AnyValue.

Notice that the "life" of preprocessor identifiers defined by #define and #path follows the sequenceof the code so they exist after the statement appear, but not before, and only until undefined by#undef. Only #define-statements can be undefined.

A #path-statement creates an AnyScriptTM variable with the same name as the #path identifier in theglobal Path folder, and notice that this variable is accessible from all parts of the model, even fromcode before the #path-statement. This is the reason why #path variables cannot be undefined.

1.3.7 Class Templates

Class Templates are in principle not real classes, like the AnyScriptTM built-in classes, but they doindeed work almost like the real classes. Class Templates are on the contrary to built-in classesdefined in the AnyScriptTM code and can therefore be defined by the user. Since they are in facthandled by the AnyScriptTM preprocesser as a form of advanced macro being expanded when thepreprocesser parses the code, there are indeed some differences to real classes. However, the basicobjective of Class Templates is indeed allow AnyScriptTM users to making user-defined classes.

In fact, the motivation behind introducing Class Templates in version 4.0 of AnyBodyTM was to pro-vide a facility to nicely encapsulate lumps of code that is intended for systematic reuse. Previously,

Page 27: Any Script Ref Manual

14

such code was typically placed in #include files, which could then be included in many places.However, this approach offers no interface definition of the information provided to the reused codefrom outside and therefore, it offers no systematic assistance in using the reused code correcttly.Class Templates offers such interface definition and therefore a foundation for nicer encapsualtionof the code block, in particular in a form that looks and feels like a normal class.

Please notice the following about Class Templates:

Class Templates can only define a collection of objects. You cannot implement an algoritmicfunctionality, like member functions, as you might expect knowing other object-oriented pro-gramming language. Also at this point, AnyScriptTM is merely a declarative language.

Instances of Class Templates are in principle folder-object, i.e., object of class AnyFolder. ThisAnyFolder will contain all the members that have been defined as members in the Class Tem-plate.

Member initialization control: Class Templates offers encapsulation of the members, similar tothe functionality known from the normal built-in classes. All members are accessible for in-stance from AnyBody Model Tree Views, but initialization of the members from the script incontrolled. Members can be Denied-Access, Optional-Initialization, or Obligatory-Initializationmembers, respectively. By default, initialization is denied but using the #var-specifier ini-tilization can be allowed, please refer to the previous section for syntax details. Existence ofdefault values determines whether a member may or must be initialized.

Class Template argument Class Templates can have template arguments, i.e., arguments used dur-ing the instantion of the object. Since these argument are being used by the preprocessor, theymust resolvable by the preprocesser. This put limits on what such arguments can hold; inprinciple it can hold preprocesser values, i.e., values defined by #define-statements or expres-sions hereof, just like the values allowed in #if-statements and the like. In addition however,object references can be parsed through the template argument list. Object references requiretype declarations in the template argument list needed for argument validation.

Arguments just holding preprocesser values do not require any type specification, but sucharguments can contain default values. Inside the Class Template, this type of arguments canbe regarded as preprocesser identifiers as if they were created by #define-statements in normalAnyScriptTM code.

Conditional code: The template arguments can be used inside the Class Template to control activepathes of the code. This is done by preprocesser #if-statements. This is powerful feature forbuilding advanced "user-defined classes" by means of Class Templates.

Instantiation of Class Templates (or declaration of Class Template objects) are in principle likebuilt-in classes, except that Class Template may need the template arguments to be specified.This is in principle done like

Syntax:<class_template_name> <identifier> (<identifier1>=<value>,...) = {...<multi-line-code>...

Page 28: Any Script Ref Manual

15

};where <identifier> is the object name, and <identifier1> is a template argument name.

Notice that template arguments can be listed in any sequence, not matching the Class Templatedefinition, but you must specify the argument name in the list. This syntax has been chosenin order to accomodate very long argumnet list, where many (most) arguments have defaultvalues that often does not need modification. This is expected to be the case larger, advanced"classes" defined using Class Templates.

1.4 Organization of the Manual

The manual is organized in a number of chapters:

Basic Classes describes the classes that the whole data structure is founded on.

Variables and Expressions describes the leaves of the object tree, hereunder mathematical quan-tities and the operations associated with these.

Mechanical Objects contains descriptions of all objects that can be used in creating a mechanicalmodel, hereunder a body model.

Drawing Objects contains descriptions of objects that are used for creating a visual representationof the model in the Model View Window of AnyBodyTM.

Operations and Studies describes objects for doing things to the model.

Each chapter is centered about one or more branches of the class tree and its contents is orderedaccording to the sequence of class derivation. The particular branches of the class trees are shownin the beginning the chapter. The remaining part of the chapter consists of the class descriptionsthat are structured information pages about each of the classes.

1.5 How to Read the Class Descriptions

The class descriptions are structured similarly for all classes. In the top, information on the classname, type, and parent class is found, followed by a description of the class (when available).

The members of AnyFolder-derived classes are explained in tables according to the type of accessthe user can or must have to the members. The types of access fall into the following categories:

• Expected Members

• Obligatory-Initialization Members

• Optional-Initialization Members

• Denied-Access Members

The members will be described in tables, one associated with each of the four categories.

Page 29: Any Script Ref Manual

16

1.5.1 Expected Members

Expected members are members that do not exist in the object by default when it is created. Thesemust be declared by the user either as objects or as references to objects existing somewhere else inthe model.

The expected members are described in a table such as the one below:

Expected MembersClass Number Description<classname1> [0..Inf] A class of which any number of member objects

optionally can be specified.<classname2> [1..5] A class of which one to five member objects are

required.<classname3> [2] A class of which exactly two member objects

are required.

The former expected class in the table, classname1, illustrates a case where it is optional to definemember objects of the given class. This is actually the case for any class for which nothing else isstated in the table. You may however still find this specification of an "optionally expected" memberclass. This may occur in cases where the particular member class can be used for something by theowner, but does not need to be present.

1.5.2 Obligatory-Initialization Members, Optional-Initialization Members,and Denied-Access Members

These three categories of members are the default members that exist as soon as the owner objectis created. Some members must be initialized, some may be initialized, and finally some cannot beaccessed at all from the AnyScriptTM input file. The former two are settings, parameters, or propertiesso to speak of the owner object, whereas the latter typically is output in some sense. Below is anexample of a table holding such members

Optional-Initialization MembersClass Name Description<classname1> <objectname1> This is the 1st member<classname2> <objectname2> This is the 2nd member (default values)

Some member descriptions contain values in parentheses. These are the default values and/or de-scriptions of limits and options. For instance AnyEnum-derived classes show all possible optionswith the default being underlined.

The tables for members that must be and can be initialized do not only hold the members of thegiven class, but also members of members, and their members, etc. The names of these membersare given with full related name. The reason for this is to make the tables provide a full overviewof the accessible properties of a given class, even though some of these properties belong to itsmembers.

Page 30: Any Script Ref Manual

17

1.6 What Happens Inside AnyBody

In this section, we shall attempt to describe the the way AnyBodyTM, or rather the AnyScriptTM kernelof it, works. We shall do this in very general terms, which means that we are not going into de-tail about particular operations of particular classes. We shall focus on general functionalities andproperties of a model when it is loaded into AnyBodyTM. In order to cover these issues, we shallfirstly consider the loading process, i.e., the processes that take place from initiating the loading ofa model file until it is completely loaded. Afterward, we shall generally consider runtime processes.Runtime processes are envoked by executing operations (AnyOperation objects).

1.6.1 The Loading Process

The loading process is described best by explaining the sequence of procedure that take place. Thisis done in the list below.

Scanning During the scanning the files are actually loaded into the computer’s memory for furtherprocessing. This implies that #include-statements are resolved and the so-called file tree isconstructed. The new and extended preprocessor introduced in version 3.1 is also playingits primary role at this stage. Not only #include-statements are resolved, but also all otherfunctions related to preprocessor statements, see Section 1.3.6, are handled at this stage. Thenature of the functions in the preprocessor is code sequence dependent in contrast to normalbehavior in AnyScriptTM code.

Parsing The parser breaks the text input into pieces and during this the basic syntax is checkedsince it must comply with the AnyScriptTM definition for the parser to understand the input.Basic syntactical errors are reported during this stage. Furthermore, the parser establishessome basic relations between the model in memory and the AnyScriptTM code, which are laterused by the system to assist the user getting from the model (in memory) to the code.

Constructing model tree Having parsed the text input, the parser can construct the data structuresfor the objects declared in the code. It hereby constructs the basic model tree that you findavailable in the Model Tree View in AnyBodyTM’s GUI application. However, this is not thefinal complete tree, as we shall see later. This stage also implies basic validation of the datastructure and related error reporting if necessary.

The new preprocessor introduced in version 3.1 also extends the capabilities of the construc-tion step. Simple AnyScriptTM expressions can be evaluated already by the preprocessor in thisstage and the results can therefore function as input to the creation of the objects. It could forinstance be a filename that is resolved this early, so that the file can be found and used duringthe construction of an file object to import needed data to form the object’s members. Alter-natively this could not happen until the Configuration step far later, after most model links areestablished and fixed beyond further change. This early behavior allows such file object (andtheir like) to behave almost like #include files, i.e., creating objects with unlimitted accessfrom the rest of the model. The trade-of is that the variables evaluated this early can onlyhave limitted connection with other model parameters, since they are evaluated before mostthings are identified properly in the model.

Page 31: Any Script Ref Manual

18

Linking identifiers During this stage, values and references are linked together according to theexpressions in the code. This implies various checks of the validity of the expressions such ascheck for existence of all refered identifiers, cyclic referencing, type validation of references.

Evaluating constants Having linked and validated all expressions, the mathematical expressionsfor values that are constant throughout the excution of the model are evaluated. These valuesplay a special role, because they are input to the subsequent configuration stage. During thisevaluation, the expressions are also checked for dimensional compatibility and the like, andAnyValues having undefined dimensionality or dimension sizes are automatically set to fit theexpressions.

Configuration The configuration is a very important and complex process, in which the objectsprepare themselves for performing their functionality. This implies that certain objects, thatcollect and combine information from many classes/object, for instance studies (AnyStudyand derived), establish links to their dependencies and process their information. This pro-cedure relies on relationships between objects (and their classes) and it is carried out in welldefined sequence. If nothing else is implied for a given class there is assumed a downwardsrelationsship in the object tree, so that the configuration of an object (folder objects only)may depend on its members. This is however not sufficiently general and therefore specialclasses (derived from AnyConfigFolder) are able to state their own dependencies and allowthe configuration to treat them accordingly. This do for instance imply that basic mechanicalobjects are configured before the mechanical studies that use them.

Notice that the configuration sequence is not visible for the user. Notice also that duringthe configuration, new objects can be created into the object tree by exsiting objects. Thishas the special significance that you may find objects in the object tree, which cannot bereferred to by references and in mathematical expressions as these links are validated beforethe configuration step.

Evaluating model After the configuration, the model is more or less ready. This means that intialvalues of all non-const AnyValues can be set. This is done during the Evaluating Model stage.Notice that this first evaluation, as for the constant values evaluated before the configuration,implies a mathematical check of the expressions including automatic definition of udefineddimensionalities and dimension sizes of vectors, matrices and higher order tensors supportedby the AnyValue types.

Post loading process Finally a post process is carried out. This stage makes the final preparationof the data structure. An important issue in this stage is the output data structures in thestudies (AnyStudy’s Output folder) are configured. This cannot take place before, becausethe studies must be configured and all mathematical relations must be ready before that out-put is well-defined. This has the important implication that you cannot make mathematicalexpressions that directly access data in the output data structures for the simple reason thatexpressions are validated before the output exist. There is an indirect workaround to this usingthe AnyOutputFun.

After the loading process as described above is completed succesfully, the model is ready for execu-tion of the operations it contains. We shall refer to this as runtime operations or processes. We shallconsider this briefly in Section 1.6.3 but firstly we shall turn our attention towards the mathematicalexpressions and their evaluation.

Page 32: Any Script Ref Manual

19

1.6.2 Mathematical Expressions and Evaluation Moments

We have in the previous sections just mentioned that some variables are evaluated before the config-uration of the model and some after. This divides the variables into constants and runtime variables.The value of these variables can in principle be controlled in two ways, either by objects using them,i.e., a system controlled value, or by expressions that have been specified in the model, i.e., a (more)user controlled value.

In previous versions of AnyBodyTM (version 1.x.x and earlier), mathematical expressions were al-most exclusively evaluated during the loading process as described in the previous section. How-ever, in version 2.0 a more dynamic evalution scheme has been introduced in which mathematicalexpressions defined by in the script will be evaluated during runtime processes. This is handled byassigning a so-called evaluation moment to each variable. The evaluation moment specifies in prin-ciple when a user controlled value will be evaluated and when system controlled values are readyfor use.

Basic Evaluation MomentsPreProcessVar Preprocessor variable (constants) that are evaluated during the

preprocessor stages, i.e., before and during the objects of themodel is constructed. These can only hold simple expressionswith limitted dependence to other objects in the model. Also errorhandling for this step of evaluation is simpler.

Const Constants that are evaluated before the configuration stage andthey are therefore input to the configuration.

ConfigVar Configuration dependent variables that are evaluated right afterthe configuration stage. They are thereby also constants but theyare a result of the configuration rather than input to it.

"RuntimeVar" Runtime variables may change value during operations on themodel.

"Runtime variables" (or RuntimeVar) is a actually a common name for several evaluation moments.These are not covered here in detail, because they will be different depending on version and con-figuration of the AnyBodyTM system. It is so that a study class typically defines (or enherits) certainevaluation moments that have to do with the specific steps in the particular investigation of thatstudy.

Future releases:Notice that these facilites are under further development and future versions of AnyBodyTM

will attempt to making the evaluation handling system more transparent to the user. FromAnyBodyTM version 3.0, the name of evaluation moments will be available in object generatedobject descriptions.

1.6.3 Runtime Processes

Runtime processes are started by the user by executing operations (AnyOperation-derived) fromthe AnyBodyTM interface, be it the console or the GUI application. Operations are typically splitinto several steps that are sequentially executed, such as the time steps of a simulation or parameter

Page 33: Any Script Ref Manual

20

variation steps of a parameter study. Both interfaces of AnyBodyTM allow you to do a completeexecution of an operation as well as stepwise execution. During stepwise execution you will be ableto follow the changes in the model for each step, whether as displayed image in the Model View ofthe GUI application or as a value variation in dumbed values of charts. Each step of an operationmay involve one or more evaluations moments and after each "moment" has occured in the opertionalgorithm, the associated values are updated.

An example is the mechanical studies (AnyMechStudy). The mechanical study is based on Any-TimeStudy, which is the base class for all studies related to time-varying analyses. In the AnyTime-Study, an evaluation moment identifies the change of time as well as the evaluation of output valuesin the end of the analysis step. These two evaluation moments are extended in the mechanical stud-ies with evaluation moments the identify the different steps in the kinematical analhysis, such asposition, velocity and acceleration analysis, as well as a step for the kinetic (force) analysis. Doingone step of for instance the InverseDynamicAnalysis in the AnyMechStudy will automatically takeyour model through these step and corrsponding evaluation moments.

Runtime processes may be executed sequentially and occasionally also nested into each other. De-sign studies execute other operations in order to investigate the impact of design changes. Anevaluation moment identifying the change of a design parameter is introduced prior to the the abovementioned steps in the AnyTimeStudy and AnyMechStudy, and a later moment is introduced toidentify the end of the analysis operations. In this way, the design study can change design param-eters and and their dependent values, then execute the analysis operation (or a sequence of severaloperations) updating all its evaluation moments, and finally extract and compute design character-istic output (so-called design measures)based on the final evaluation moment of the design study.

Page 34: Any Script Ref Manual

Chapter 2

Basic Classes

This chapter describes the fundamental classes that are the basic building blocks for the AnyScriptlanguage. This makes the chapter of primary interest for AnyBody developers and for users whowant to have a general overview of the data structure in AnyBody. During typical use of AnyBodyfor modeling and analysis purposes, the classes in this chapter are of less relevance. This is evidentfrom the relatively large number of hidden classes described in this chapter.

The functionality of the classes in this chapter cover the following:

• Fundamental data structure, i.e., the root and the close-to-root classes in the class tree.

• Implementation of special features/functionality in a proper encapsulation and properly sepa-rated from other parts of the code. These features may not seem to be particularly importantfrom a user’s point-of-view, but they do provide the foundation. Often a single feature is im-plemented into a single class, and the full functionality that is needed to get real operationalclasses is obtained by derivation. Therefore invisible (hidden) base classes occur frequentlyin this chapter because they are such designated holders of subsets of features.

• Testing functionality which is and should be used by the developers only.

21

Page 35: Any Script Ref Manual

22

2.1 Class Tree

AnyObjectGeneral (see p. 23)AnyObjectTreeElement (see p. 23)

AnyObject (see p. 23)AnyRealObject (see p. 24)

AnyFolder (see p. 24)AnyConfigFolder (see p. 24)

Any3DObject (see p. 25)AnyMechObject (see p. 117)–>AnyCamera (see p. 25)

AnyCameraModelView (see p. 26)AnyCameraLookAt (see p. 27)

AnyDrawObject (see p. 213)–>AnyOperation (see p. 316)–>AnySceneObject (see p. 242)–>AnyDesVar (see p. 28)AnyStudy (see p. 276)–>

AnyFunction (see p. 69)–>AnyDataFileBase (see p. 348)–>AnyDesMeasure (see p. 29)AnyCamRecorder (see p. 30)AnyMessage (see p. 31)AnyStyle (see p. 246)–>AnyFunctionArgList (see p. 32)AnyOprSet (see p. 339)–>AnyOutputFolderGeneral (see p. 32)

AnyOutputFolder (see p. 33)AnyAbscissaFolder (see p. 33)

AnyMainFolder (see p. 34)AnyMonoFunction (see p. 115)–>AnyStdSettingsRoot (see p. 34)

AnyConsoleSettingsRoot (see p. 34)AnyStdGlobalRoot (see p. 34)AnySystemValuesFolder (see p. 35)AnySystemValuesFloatFolder (see p. 35)AnySystemValuesIntFolder (see p. 35)

AnyValue (see p. 49)–>AnyRefObject (see p. 35)

Page 36: Any Script Ref Manual

23

AnyObjectGeneralType: HiddenBase Class: The Root

Description:This is the most basic class and the base class for all other classes in the AnyScript data structure.From a AnyScriptTM-user’s point of view, the AnyObject class is the base class from a practical pointof view, but some of the fundamental contents and functionality is placed separately in the parentsof AnyObject, of which AnyObjectGeneral in the most basic class. This class simply provides arelationship between all derived classes and functions for type comparison, but this functionality isnot directly accessible for the AnyScriptTM-user.

AnyObjectTreeElementType: HiddenBase Class: AnyObjectGeneral (see p. 23)

Description:This class extends the parent with facilities for being a part of the AnyScriptTM tree-like data structure.This implies

• Ability to be owned by/member of another object.

• Ability to be referred to by a reference object.

• Ability to be registered in the AnyScriptTM class tree.

• Object name.

AnyObjectType: AbstractBase Class: AnyObjectTreeElement (see p. 23)

Description:This is the base class for all abstract and creatable objects in the AnyScriptTM data structure, so inpractice this is the real base class of all object in the data structure. Its basic functionality is to

Page 37: Any Script Ref Manual

24

be common to all the derived classes and its actual contents and functions are implemented in theparents. For further details please study these classes.

AnyRealObjectType: AbstractBase Class: AnyObject (see p. 23)

Description:This class is the base class of all "real" objects. Real objects are the objects that contain real data asopposed to objects that are "references" to other objects. All references must eventually be linkedto a real object.

AnyFolderType: CreatableBase Class: AnyRealObject (see p. 24)

Description:This is the base class of all folders, i.e., the nodes of the tree-like data structure.

AnyConfigFolderType: HiddenBase Class: AnyFolder (see p. 24)

Description:This is the base class for all folders/objects that contain a data structure, which needs to be config-ured during the configuration stage of the loading process. This class takes care of the configurationsequence.

Page 38: Any Script Ref Manual

25

Any3DObjectType: HiddenBase Class: AnyConfigFolder (see p. 24)

Description:System folder type. No description available.

AnyCameraType: CreatableBase Class: Any3DObject (see p. 25)

Description:AnyCamera is the base class for camera classes. Camera objects define a view point for the modelscene.

A camera can be attached to a 3D object in the model or in scene. This object then defines the ref-erences frame of the camera. Derived camera classes may have extended functionality for definingthe view point reference.

The view point reference system is defined so it looks along the negative z-axis. It can show bothperspective or orthografic points of view .

The scene is bounded close to the eye and far away (typically beyond the model) by the so-callednear and far clipping planes. The location of theclipping planes are specified by the distances Nearand Far in the view point reference.

Feature such as zoom, perspective aspects, and the like are defined indirectly by the focal plane.The focal plane’s distance from the eye in given by FocalDist and zoom and aspect effect are givenby the height of the image in this plane. This height is given by FocalHeight

Notice that all distances mentioned so far are in real physical model units.

Object Members:Expected Members

Class Number DescriptionAny3DObject [0..1] Definition of the reference frame or object, the

camera is attached to.AnyScene [0..1] Definition of scene settings. If more than one

exists, only the former is used by the camera. Ifnone exists, default settings are used.

Page 39: Any Script Ref Manual

26

Optional-Initialization MembersClass Name DescriptionAnyVar FocalDist Distance to the focal plane in (model units).

(=1)AnyVar FocalHeight Height of the view area in focal plane (model

units). (=1)AnyVar Near Distance from eye to the nearest clipping plane

(model units). Everything closer to the eyepoint is not visible. (=0.001)

AnyVar Far Distance from eye to the farest??? clippingplane (model units). Everything further awayfrom the eye point is not visible. (=1000)

AnySwitchVar Perspective Switch for perspective view. Alternatively, theview is orthographic.(=Off, Options: Off | On)

AnyCameraModelViewType: CreatableBase Class: AnyCamera (see p. 25)

Description:This is a basic and simple camera implementation that primarily is intended to support interactiveModel View of the AnyBody applications.

You can however use this camera class in AnyScript models too. This can be practical becauseyou can find find your choice of view settings using the inactive Model View in AnyBody’s GUIapplication, and then insert those directly in your AnyScript defined camera.

This camera introduces the point being looked at by the LookAtDist distance. This distance can bethe same as the anynameFocalDist, but it does not have to be. The LookAt point is the pivot of thecamera during interactive rotations. This implies that if LookAtDist is equal to FocalDist the viewis rotating about the center of the focal plane, whereas if LookAtDist is zero the camera rotatesabout itself (about the eye point).

This camera class does not accept being attached to other 3D objects.

Object Members:

Page 40: Any Script Ref Manual

27

Expected MembersClass Number DescriptionAny3DObject [0..1] Definition of the reference frame or object, the

camera is attached to.AnyScene [0..1] Definition of scene settings. If more than one

exists, only the former is used by the camera. Ifnone exists, default settings are used.

Optional-Initialization MembersClass Name DescriptionAnyVar FocalDist Distance to the focal plane in (model units).

(=1)AnyVar FocalHeight Height of the view area in focal plane (model

units). (=1)AnyVar Near Distance from eye to the nearest clipping plane

(model units). Everything closer to the eyepoint is not visible. (=0.001)

AnyVar Far Distance from eye to the farest??? clippingplane (model units). Everything further awayfrom the eye point is not visible. (=1000)

AnySwitchVar Perspective Switch for perspective view. Alternatively, theview is orthographic.(=Off, Options: Off | On)

AnyVec3 Pos Positioning vector for the camera/eye point.(={0, 0, 0})

AnyVec4 EulerPar Orientation view point reference frame given byEuler Parameters (quarternions). (={0, 0, 0, 0})

AnyVar LookAtDist Distance from the camera/eye point to the ori-gin point (e.g. used as rotation center). (=0)

AnyCameraLookAtType: CreatableBase Class: AnyCamera (see p. 25)

Description:The LookAt camera is supposed to be an intuitively easier camera to position.

The view point is defined by three points, the position of the eye, the position of the point beinglooked at (the look-at-point) and a point defining what is up (the up-point). This defines the viewpoint reference system with the z-axis parallel to the vector between the look-at-point and the eyepoint. The y-axis is the normal vector from the view line (z-axis) to the up-point, and the x-axis isgiven so a right-handed view point system is obtained.

Page 41: Any Script Ref Manual

28

If the camera is attached to another 3D object then the coordinates of these points are assumed torefer to object reference frame; otherwise they are global points.

Object Members:Expected Members

Class Number DescriptionAny3DObject [0..1] Definition of the reference frame or object, the

camera is attached to.AnyScene [0..1] Definition of scene settings. If more than one

exists, only the former is used by the camera. Ifnone exists, default settings are used.

Optional-Initialization MembersClass Name DescriptionAnyVar FocalDist Distance to the focal plane in (model units).

(=1)AnyVar FocalHeight Height of the view area in focal plane (model

units). (=1)AnyVar Near Distance from eye to the nearest clipping plane

(model units). Everything closer to the eyepoint is not visible. (=0.001)

AnyVar Far Distance from eye to the farest??? clippingplane (model units). Everything further awayfrom the eye point is not visible. (=1000)

AnySwitchVar Perspective Switch for perspective view. Alternatively, theview is orthographic.(=Off, Options: Off | On)

AnyVec3 EyePoint Position the camera/eye point. (={0, 0, 0})AnyVec3 LookAtPoint Position the point the camera/eye should look

at. (={0, 0, 0})AnyVec3 UpPoint Position a point that defines the up-direction of

the camera. (={0, 0, 0})

AnyDesVarType: CreatableBase Class: AnyConfigFolder (see p. 24)

Description:This class functions as a design variable container.

Notice that the Val member contains the current value of the design variable. It is a special variable

Page 42: Any Script Ref Manual

29

class called AnyVarRef, which allows for two way linkage. Please refer to class AnyVarRef too.This implies two possible types of usage of the Val member:

1) Val can be initialized with a constant right-hand side, which may be a single scalar numberor an expression entirely of numbers providing a single scalar constant when evaluated, i.e., Val= <scalar numerical constant>. This form of initialization does not allow two-way linkage and itimplies, therefore, that Val is the real design variable of the problem. The constant right-hand sideis the default value, which may be used by the studies that use the AnyDesVar as input (e.g. initial)values.

2) The AnyVarRef can be initialized with a single scalar variable value, which can be an AnyVaror a single element of any AnyFloat-variable of higher dimensionality, i.e., Val = <scalar variablequantity>. This case allows for two-way linkage between the AnyVarRef and the target value andthe target value can be regarded as the real design variable in the problem; its value may be usedas input to the design studies and when the studies change the design variable, the target value isupdated accordingly.

The second form is the most powerful usage of the AnyDesVar, since it allows you to link designstudies with parameters in an existing model.

There are, however, a couple of further restrictions on the use of Val. Val is associated with aspecial evaluation moment for design variables, which implies that you can only link to variablesin the model that are also associated with this moment. Variables of earlier moments cannot bechanged and variables of later moments will in principle have the effect overridden later; both casesproduce an error during loading. If the target value does not have a well-defined evaluation moment,Val’s AnyVarRef class will try to enforce the design variable moment upon it. Another restriction isthat the target design variable cannot be dependent on other variables; it must be independent, i.e.,initialized by a constant value.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVarRef Val Current value and possible reference to the real

design variable in the model.AnyVar Min Lower bound of the design space.AnyVar Max Upper bound of the design space.

AnyDesMeasureType: CreatableBase Class: AnyFolder (see p. 24)

Description:

Page 43: Any Script Ref Manual

30

This class defines design performance measures. They are used by AnyDesStudy-derived studies tomeasures the effect of design variable.

The Val member should be initialized with an expression of the design measure needed. This mayimply to get access to data in the Output folder of other studies that are part of the design analysis(i.e. declard or refered to from the Analysis operation in the AnyDesStudy object). Such access tooutput of studies may be gained by means of the AnyOutputFun function class.

The Type member is used to specify the function of the measure as for instance objective function orvarious types of constraints in relation to an optimization (see AnyOptStudy). The measure can alsobe a plain output measure that does not play any role, except for being included in the output of thedesign study. The actual study in which the measure is used may interpretate the Type differently.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar Val Current value.

Optional-Initialization MembersClass Name DescriptionAnyDesMeasureType Type Type specification. (=OutputFun, Options:

OutputFun | ObjectiveFun | EqualToZero | Less-ThanZero | GreaterThanZero)

AnyCamRecorderType: CreatableBase Class: AnyFolder (see p. 24)

Description:AnyCamReorder objects serve to record images from a camera to files.

The image is recorded to the file given by the FileName member. FileName can hold a changingname expression thereby saving multiple files. This can for instance be achieved by using Counterin the expression for FileName:

FileName = "MyCamera" + strval(Counter,"

The extension of file name controls the format of image file. It accepts the same formats as theAnyBody Model View’s export feature.

The camera recorder contains two members for controlling the recording, Trig and ResetTrig. Trigis the trigger state that indicates whether the image should be saved or not. ResetTrig is a stateindicating whether to reset the camera or not. Resetting the camera implies that the Counter is set to

Page 44: Any Script Ref Manual

31

zero. Both Trig and ResetTrig can, similarly to FileName, hold dynamically updated expressionsso that images recording can be turned on and off and reset according to the specific needs.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Output filename.AnyIntVar pxWidth Width of picture in of pixels.AnyIntVar pxHeight Height of picture in of pixels.

Optional-Initialization MembersClass Name DescriptionAnySwitchVar ResetTrig Trigger state for resetting the recorder. (=Off,

Options: Off | On)AnySwitchVar Trig Switch for trigger state. (=Off, Options: Off |

On)

Denied-Access MembersClass Name DescriptionAnyIntVar Counter Image counter. (=0)

AnyMessageType: CreatableBase Class: AnyFolder (see p. 24)

Description:This class functions to make user-defined messages. It uses the AnyBodyTM message system, butoptian the message information from this type of object.

The message is given by the string member Message. In addition to this, the message type andtriggers for sending the message can be specified.

The message can be send at any of three moment, during (or right after) the preprocesser, duringthe const evaluation, and the runtime evaluation. All three moment are passed during loading of themodel, but the latter occur again during execution of operations after load

Regarding message types, notice that all except the fatal error allows processes to continue. Fatalerrors stop the current process such as running operations.

Object Members:

Page 45: Any Script Ref Manual

32

Optional-Initialization MembersClass Name DescriptionAnySwitchVar TriggerPreProcess Trigger during evaluation of values after the

preprocesser step in loading process. (=Off,Options: Off | On)

AnySwitchVar TriggerConst Trigger during evaluation of constants whileloading. (=Off, Options: Off | On)

AnySwitchVar TriggerRuntime Trigger during runtime. (=Off, Options: Off |On)

AnyEnumMessage-Type

Type Message type. (=MSG_Message, Options:MSG_Message | MSG_Warning | MSG_Error| MSG_ErrorFatal)

AnyStringVar Message Message string. (="")

AnyFunctionArgListType: AbstractBase Class: AnyFolder (see p. 24)

Description:AnyFunctionArgList is a special folder that holds an argument list for mathematical functions (Any-Function). It can only contain objects suitable as arguments for such functions and it can only belocated inside an AnyFunction.

AnyOutputFolderGeneralType: HiddenBase Class: AnyFolder (see p. 24)

Description:This class provides functionality for storing output data from the analyses that are carried out in thestudies (i.e. AnyStudy and derived classes). Its only function is to provide kinship between its twochildren, AnyOutputFolder and AnyAbssicaFolder. For more details please study the descriptionsof these two classes.

Page 46: Any Script Ref Manual

33

AnyOutputFolderType: AbstractBase Class: AnyOutputFolderGeneral (see p. 32)

Description:Objects of this class store the derived/computed output data from the analyses that are carried out inthe studies (i.e. AnyStudy and derived classes). It also contains an AnyAbscissaFolder object thatstores the input or independent parameters of a given analysis.

The actual values of output for each set of input parameter values are stored in objects of classAnyOutputFloat that refer to the actual AnyValue objects and save their current value at designatedpoints in the actual analysis. For more details on these designated points please refer to the descrip-tion of the actual study in question.

An AnyOutputFolder object may contain the AnyOutputFloat objects in a folder that mimic thestructure of the real value objects in the study.

Object Members:Denied-Access Members

Class Name DescriptionAnyAbscissaFolder Abscissa Folder where the values of the abscissa/input

parameters are stored.

AnyAbscissaFolderType: AbstractBase Class: AnyOutputFolderGeneral (see p. 32)

Description:This class functions much like AnyOutputFolder except that it stores the values of input parameters(or independent parameters) for the given study. These values are the ones that typically (defaultoption) are used as abscissae in the Chart View of the AnyBodyTM GUI. The actual values are similarto AnyOutputFolder stored in objects of class AnyOutputFloat.

An abscissa variable can be any AnyFloat. If it is a scalar (AnyVar) an array of values will existinside the corresponding AnyOutputFloat i.e., one value for each abscissa iteration-step, for instancetime steps in a time series analysis. If the abscissa variable is a vector or higher-order tensor, thedata structure inside the corresponding AnyOutputFloat will contain an array of such tensors, i.e.,one tensor-value for each abscissa iteration-step.

Page 47: Any Script Ref Manual

34

AnyMainFolderType: HiddenBase Class: AnyFolder (see p. 24)

Description:Objects of this class are the top or root folder in the AnyScriptTM data structure. Such folders mustbe predefined like the folder "Main" and their names are automatically restricted keywords in Any-ScriptTM.

AnyStdSettingsRootType: HiddenBase Class: AnyFolder (see p. 24)

Description:

AnyConsoleSettingsRootType: HiddenBase Class: AnyStdSettingsRoot (see p. 34)

Description:

AnyStdGlobalRootType: HiddenBase Class: AnyFolder (see p. 24)

Description:This is the class of the folder that contains global information for the model. There exists onlyone instance of this class called Global. All members of this folder are globally accessible fromanywhere in the script and as such their names are restricted keywords. Typical contents are standard

Page 48: Any Script Ref Manual

35

functions and universal constants.

AnySystemValuesFolderType: HiddenBase Class: AnyFolder (see p. 24)

Description:System variables.

AnySystemValuesFloatFolderType: HiddenBase Class: AnyFolder (see p. 24)

Description:Characteristic values for floating-point type value (AnyFloat).

AnySystemValuesIntFolderType: HiddenBase Class: AnyFolder (see p. 24)

Description:Characteristic values for integer type value (AnyInt).

AnyRefObjectType: HiddenBase Class: AnyObject (see p. 23)

Page 49: Any Script Ref Manual

36

Description:Objects of this class are references to other existing objects in the model. Reference objects cannotbe created directly by declaration of an AnyRefObject. Instead a reference is created by the classname of the referred class followed by the reference operator (&), for instance

AnyObject& Ref2AnyObect = TheRealObject; // This is a reference to an AnyObject object.

Page 50: Any Script Ref Manual

Chapter 3

Variables and Expressions

This chapter contains the descriptions of the value classes of AnyScriptTM and the expressions thatare possible on these classes. The value classes are derived from the class AnyValue. They definethe basic data types of AnyScriptTM, such as floating point numbers, integers, strings etc.

Values can be initialized by assignment statements, i.e., "<objectname> = <value>;". Depending onthe data type such assignments can contain more or less complex expressions of other values in themodel, i.e. "<objectname> = <expression>;". You cannot make references to AnyValues as you canto AnyFolders; expressions however provide a similar functionality for linking values to each other.Expressions on these values can be formed by means a standard set of mathematical operators andfunctions.

Functions are, as other elements in AnyScriptTM, implemented as classes (derived from the base classAnyFunction). Such classes define a function, which is an entity that delivers a certain output valuegiven certain input in a list of values (the argument list). For instance you will find the standardtrigonometric functions sine and cosine implemented in the classes AnyFunSin and AnyFunCos.

When you apply a function in an expression, you use an object for the given function class. Contraryto other objects, AnyScriptTM accepts and require an argument list in parentheses after function objectnames when it appears in a right-hand side expression. The output value replaces the functionobjects in the expression during the evaluation. For instance you use an object called ’sin’, which isof the class AnyFunSin, when you want to get sine of a number. The function is evaluated wheneverthe expression, of which it is part, is evaluated.

For standard functions, such as ’sin’ and ’cos’, the system has predefined objects with practicalnames placed in the Global scope. Therefore, you do not need to make declarations of the objectsbefore using them in expressions. This makes standard functions available, as one would expect,simply by typing the function name followed by the argument list in parentheses. However, forother functions, typically more complex ones with various options, you must declare the functionobject manually similar to any other object in AnyScriptTM. Hereafter the function can be accessedusing the name of the object with either absolute or relative naming principles.

Functions can be polymorphic, which means that the a given function class (AnyFunction) can holdseveral actual functions that can be distinguished from each other by their parameter list. They allshare the same function name, which is the name of the AnyFunction object. The actual functions

37

Page 51: Any Script Ref Manual

38

are implemented in members of AnyFunction that are of the type AnyMonoFunction. MultipleAnyMonoFunctions in an AnyFunction provide polymorphism. From practical user point of view,these "MonoFunctions" do not have any significance and they are typically implemented as Hiddenclasses.

Page 52: Any Script Ref Manual

39

Prior to the class descriptions of the values and function classes, this chapter contains the followingsections:

• Class tree and overview of the data types (i.e. AnyValue and derived classes), see section 3.2.

• Class tree of function classes (i.e. AnyFunction and derived), see Section 3.3

• Operators and expressions, see Section 3.1

3.1 Mathematical and other Expressions

AnyScriptTM supports mathematical relationships between primarily numerical variables. Mathemat-ical expressions can be formed using standard operators and a number of standard functions, pleaserefer to following subsections. In principle, such "mathematical" expressions can also be applied tonon-numerical value, i.e., they apply in priciple to all AnyValue, but not all operations and func-tions are allowed for all data types. There will be functions that apply to numerical values only andfunctions that e.g. apply to strings values only.

3.1.1 Operators

Operators in AnyScriptTM

Unary operators[ ]′ Postfix gives transposition of a matrix or vector, i.e., one- or two-

dimensional AnyFloat. Any other dimensionality and prefix givesan error.

−[ ] Unary minus (prefix). Applies to tensors of any dimensionality.Binary operators

[ ]̂ [ ] Power operator. Second argument must be a scalar whereas thefirst argument can be a tensor of any dimensionality.

[ ] ∗ [ ], [ ]/[ ] Multiplication and division operators. Multiplication functions asa multiplication of matrices and vectors as well as scalar. Multi-plication or division of a tensor of any dimensionality by a scalaris allowed and carried out element by element.

[ ] + [ ], [ ]− [ ] Addition and subtraction operators. Applies to tensors of any di-mensionality, though operands must have the same dimensions.

Page 53: Any Script Ref Manual

40

3.1.2 Constants

Constants in AnyScriptTM

BandPass BandPass = 2 (Class: AnyEnumState, p.62)BandStop BandStop = 3 (Class: AnyEnumState, p.62)Bezier Bezier = 1 (Class: AnyEnumState, p.62)Bspline Bspline = 2 (Class: AnyEnumState, p.62)CartesianChart2D CartesianChart2D = 1 (Class: AnyEnumState, p.62)CartesianChart3D CartesianChart3D = 2 (Class: AnyEnumState, p.62)CompactNumber CompactNumber = 2 (Class: AnyEnumState, p.62)Cos Cos = 1 (Class: AnyEnumState, p.62)CosSin CosSin = 0 (Class: AnyEnumState, p.62)DecimalNumber DecimalNumber = 0 (Class: AnyEnumState, p.62)EqualToZero EqualToZero = 2 (Class: AnyEnumState, p.62)EulerParam EulerParam = 2 (Class: AnyEnumState, p.62)GreaterThanZero GreaterThanZero = 4 (Class: AnyEnumState, p.62)HighPass HighPass = 1 (Class: AnyEnumState, p.62)LessThanZero LessThanZero = 3 (Class: AnyEnumState, p.62)Line3DCapStyleArrow Line3DCapStyleArrow = 5 (Class: AnyEnumState, p.62)Line3DCapStyleCylinder Line3DCapStyleCylinder = 3 (Class: AnyEnumState, p.62)Line3DCapStyleDisk Line3DCapStyleDisk = 2 (Class: AnyEnumState, p.62)Line3DCapStyleEllipsoid Line3DCapStyleEllipsoid = 4 (Class: AnyEnumState, p.62)Line3DCapStyleNone Line3DCapStyleNone = 1 (Class: AnyEnumState, p.62)Line3DCapStyleVoid Line3DCapStyleVoid = 0 (Class: AnyEnumState, p.62)Line3DStyleFull Line3DStyleFull = 0 (Class: AnyEnumState, p.62)LineStyleFull LineStyleFull = 1 (Class: AnyEnumState, p.62)LineStyleHidden LineStyleHidden = 2 (Class: AnyEnumState, p.62)LineStyleNone LineStyleNone = 0 (Class: AnyEnumState, p.62)LowPass LowPass = 0 (Class: AnyEnumState, p.62)MinMaxAQP MinMaxAQP = 4 (Class: AnyEnumState, p.62)MinMaxNRSimplex MinMaxNRSimplex = 3 (Class: AnyEnumState, p.62)MinMaxOOSolQP MinMaxOOSolQP = 2 (Class: AnyEnumState, p.62)MinMaxOOSolSimplex MinMaxOOSolSimplex = 1 (Class: AnyEnumState, p.62)MinMaxSimplex MinMaxSimplex = 0 (Class: AnyEnumState, p.62)MR_Constant MR_Constant = 0 (Class: AnyEnumState, p.62)MR_CurrentStrength MR_CurrentStrength = 1 (Class: AnyEnumState, p.62)MR_Linear MR_Linear = 2 (Class: AnyEnumState, p.62)MR_MinMaxAux MR_MinMaxAux = 1 (Class: AnyEnumState, p.62)MR_MinMaxStrict MR_MinMaxStrict = 0 (Class: AnyEnumState, p.62)MR_NominalStrength MR_NominalStrength = 2 (Class: AnyEnumState, p.62)MR_Polynomial MR_Polynomial = 5 (Class: AnyEnumState, p.62)MR_Quadratic MR_Quadratic = 3 (Class: AnyEnumState, p.62)MR_QuadraticAux MR_QuadraticAux = 4 (Class: AnyEnumState, p.62)MSG_Error MSG_Error = 2 (Class: AnyEnumState, p.62)MSG_ErrorFatal MSG_ErrorFatal = 3 (Class: AnyEnumState, p.62)

Page 54: Any Script Ref Manual

41

MSG_Message MSG_Message = 0 (Class: AnyEnumState, p.62)MSG_Warning MSG_Warning = 1 (Class: AnyEnumState, p.62)MS_Access MS_Access = 2 (Class: AnyEnumState, p.62)MS_SQLServer_2000 MS_SQLServer_2000 = 1 (Class: AnyEnumState, p.62)MS_SQLServer_2005 MS_SQLServer_2005 = 0 (Class: AnyEnumState, p.62)MySQL MySQL = 3 (Class: AnyEnumState, p.62)ObjectiveFun ObjectiveFun = 1 (Class: AnyEnumState, p.62)Off Off = 0 (Class: AnyEnumState, p.62)On On = 1 (Class: AnyEnumState, p.62)OptFeasibleDirSearch1 OptFeasibleDirSearch1 = 1 (Class: AnyEnumState, p.62)OptFeasibleDirSearch2 OptFeasibleDirSearch2 = 2 (Class: AnyEnumState, p.62)OptSimpleSearch OptSimpleSearch = 0 (Class: AnyEnumState, p.62)Oracle Oracle = 4 (Class: AnyEnumState, p.62)OracleXE OracleXE = 5 (Class: AnyEnumState, p.62)OutputFun OutputFun = 0 (Class: AnyEnumState, p.62)pi 3.1415927 (Class: AnyFloatVar, p.53)PiecewiseLinear PiecewiseLinear = 0 (Class: AnyEnumState, p.62)PointStyleBox PointStyleBox = 1 (Class: AnyEnumState, p.62)PointStyleCross PointStyleCross = 4 (Class: AnyEnumState, p.62)PointStyleCross2 PointStyleCross2 = 5 (Class: AnyEnumState, p.62)PointStyleNone PointStyleNone = 0 (Class: AnyEnumState, p.62)PointStyleSphere PointStyleSphere = 2 (Class: AnyEnumState, p.62)PointStyleStar PointStyleStar = 3 (Class: AnyEnumState, p.62)RotAxesAngles RotAxesAngles = 0 (Class: AnyEnumState, p.62)RotVector RotVector = 1 (Class: AnyEnumState, p.62)ScientificNumber ScientificNumber = 1 (Class: AnyEnumState, p.62)Sin Sin = 2 (Class: AnyEnumState, p.62)SpaceAngles_ii SpaceAngles_ii = 3 (Class: AnyEnumState, p.62)SpaceAngles_ij SpaceAngles_ij = 4 (Class: AnyEnumState, p.62)x x = 0 (Class: AnyEnumState, p.62)y y = 1 (Class: AnyEnumState, p.62)z z = 2 (Class: AnyEnumState, p.62)

3.1.3 Standard Functions

Standard Functions in AnyScriptTM

abs(float), abs(int) Absolute value function. (see class ’AnyFunAbs’, p.90)acos(float), acos(int) Inverse cosine (arccosine). (see class ’AnyFunACos’, p.85)andfun(float,float),andfun(int,int),andfun(float,int),andfun(int,float)

Boolean ’and’ function. (see class ’AnyFunAnd’, p.111)

Page 55: Any Script Ref Manual

42

arrcat(float,float),arrcat(int,int),arrcat(str,str),arrcat(file,file),arrcat(enum,enum)

Function for appending two arrays. (see class ’AnyFunArrayCat’,p.114)

asin(float), asin(int) Inverse sine (arcsine). (see class ’AnyFunASin’, p.83)atan(float), atan(int) Inverse tangent (arctangent). (see class ’AnyFunATan’, p.87)atan2(float,float),atan2(float,int),atan2(int,float),atan2(int,int)

The power function of all elements. (see class ’AnyFunAtan2’,p.94)

ceil(float) The ceil function of all elements. (see class ’AnyFunCeil’, p.91)ClassNameOf(float),ClassNameOf(int), Class-NameOf(str), ClassName-Of(enum), ClassName-Of(file)

Returns the class name of an object. (see class ’AnyFunClass-NameOf’, p.98)

CompleteNameOf(float),CompleteNameOf(int),CompleteNameOf(str),CompleteNameOf(enum),CompleteNameOf(file)

Returns the complete-name of an object. (see class ’AnyFun-CompleteNameOf’, p.98)

cos(float), cos(int) Cosine. (see class ’AnyFunCos’, p.84)cosh(float), cosh(int) Hyperbolic cosine. (see class ’AnyFunCosh’, p.85)cross(float,float) Vector mulitplication (cross product) function. (see class ’Any-

FunCross’, p.72)DimOf(float), DimOf(int),DimOf(str), DimOf(enum),DimOf(file)

Returns number of dimensions in an AnyValue structure. (seeclass ’AnyFunDimOf’, p.96)

div(float,float),div(float,int), div(int,float),div(int,int)

Element by element division function. (see class ’AnyFunDiv’,p.93)

eqfun(float,float),eqfun(int,int),eqfun(float,int),eqfun(int,float),eqfun(str,str)

Equality testing function. (see class ’AnyFunEq’, p.107)

exp(float), exp(int) The exponential function. (see class ’AnyFunExp’, p.89)floor(float) The floor function of all elements. (see class ’AnyFunFloor’,

p.91)gteqfun(float,float),gteqfun(int,int),gteqfun(float,int),gteqfun(int,float)

Greater-than-or-equal-to testing function. (see class ’AnyFun-GreaterThanEq’, p.111)

Page 56: Any Script Ref Manual

43

gtfun(float,float),gtfun(int,int),gtfun(float,int),gtfun(int,float)

Greater-than testing function. (see class ’AnyFunGreaterThan’,p.110)

iarr(int,int), iarr(int,int,int) Function for making integer arrays. (see class ’AnyFunIntArray’,p.113)

iffun(float,float,float),iffun(float,int,int),iffun(int,float,float),iffun(int,int,int),iffun(float,str,str),iffun(int,str,str)

If-then-else function. (see class ’AnyFunIf’, p.106)

log(float), log(int) The natural logarithm. (see class ’AnyFunLog’, p.88)log10(float), log10(int) The 10-based logarithm. (see class ’AnyFunLog10’, p.88)lteqfun(float,float),lteqfun(int,int),lteqfun(float,int),lteqfun(int,float)

Less-than-or-equal-to testing function. (see class ’AnyFunLess-ThanEq’, p.109)

ltfun(float,float),ltfun(int,int),ltfun(float,int),ltfun(int,float)

Less-than testing function. (see class ’AnyFunLessThan’, p.108)

max(float), max(int) The maximum of all elements in a vector. (see class ’AnyFun-VecMax’, p.104)

mean(float), mean(int) The mean of all elements in a vector. (see class ’AnyFunVec-Mean’, p.103)

min(float), min(int) The minimum of all elements in a vector. (see class ’AnyFunVec-Min’, p.104)

mult(float,float),mult(float,int),mult(int,float), mult(int,int)

Element by element multiplication function. (see class ’AnyFun-Mult’, p.93)

NameOf(float),NameOf(int), NameOf(str),NameOf(enum),NameOf(file)

Returns the name of an object. (see class ’AnyFunNameOf’,p.97)

NumElemOf(float),NumElemOf(int),NumElemOf(str),NumElemOf(enum),NumElemOf(file)

Returns number of elements in an AnyValue structure. (see class’AnyFunNumElemOf’, p.95)

orfun(float,float),orfun(int,int),orfun(float,int),orfun(int,float)

Boolean ’or’ function. (see class ’AnyFunOr’, p.112)

pow(float,float),pow(float,int),pow(int,float), pow(int,int)

The power function of all elements. (see class ’AnyFunPow’,p.92)

Page 57: Any Script Ref Manual

44

prod(float), prod(int) The product of all elements in a vector. (see class ’AnyFunVec-Prod’, p.103)

RotMat(float,enum),RotMat(float,float,float)

Rotational transformation matrix. (see class ’AnyFunRotMat’,p.72)

round(float) The round function of all elements. (see class ’AnyFunRound’,p.92)

secint(float,float),secint(float,int),secint(int,int),secint(int,float)

The secant integral of a function given by a number discrete val-ues. (see class ’AnyFunVecSecInt’, p.102)

sin(float), sin(int) Sine. (see class ’AnyFunSin’, p.83)sinh(float), sinh(int) Hyperbolic sine. (see class ’AnyFunSinh’, p.84)SizesOf(float),SizesOf(int), SizesOf(str),SizesOf(enum),SizesOf(file)

Returns number of dimensions in an AnyValue structure. (seeclass ’AnyFunSizesOf’, p.96)

sqrt(float), sqrt(int) Square root. (see class ’AnyFunSqrt’, p.89)strformat(str) Formatted string function. (see class ’AnyFunFormatString’,

p.100)strval(float), strval(int),strval(float,str),strval(int,str)

Returns the value of an object as a string. (see class ’AnyFun-StringValueOf’, p.99)

sum(float), sum(int) The sum of all elements in a vector. (see class ’AnyFunVecSum’,p.101)

tan(float), tan(int) Tangent. (see class ’AnyFunTan’, p.86)tanh(float), tanh(int) Hyperbolic tangent. (see class ’AnyFunTanh’, p.87)vnorm(float), vnorm(int),vnorm(float,float),vnorm(float,int),vnorm(int,float),vnorm(int,int)

The norm of a vector. (see class ’AnyFunVecVNorm’, p.105)

3.2 Class Tree and Overview of Data Types

AnyValue (see p. 49)AnyFile (see p. 49)

AnyFileVar (see p. 49)AnySurfFile (see p. 49)

AnyInt (see p. 50)AnyIntVar (see p. 50)

Page 58: Any Script Ref Manual

45

AnyIntArray (see p. 50)AnyIntArray2 (see p. 51)

AnyFloat (see p. 51)AnyVar (see p. 51)

AnyVarRef (see p. 51)AnyRGBs (see p. 52)

AnyRGB (see p. 53)AnyFloatVar (see p. 53)AnyVector (see p. 53)AnyMatrix (see p. 54)AnyVec3 (see p. 54)AnyVec4 (see p. 54)AnyMat33 (see p. 54)AnyOutputFloatLink (see p. 55)

AnyOutputFloat (see p. 55)AnyOutputFloatPostProc (see p. 55)

AnyString (see p. 56)AnyObjectSearchString (see p. 56)AnyStringVar (see p. 57)

AnyChartSerieTitle (see p. 57)AnyStringVector (see p. 57)AnyStringArray (see p. 57)AnyPath (see p. 58)

AnyEnum (see p. 58)AnyRefFrameAxis (see p. 58)AnyEnumFloatNumberStyle (see p. 59)AnyEnumPointMarkerStyle (see p. 59)AnyEnumLineStyle (see p. 60)AnyEnumLine3DStyle (see p. 60)AnyEnumLine3DCapStyle (see p. 60)AnySwitch (see p. 61)AnyEnumVar (see p. 61)

AnySwitchVar (see p. 62)AnyEnumState (see p. 62)

AnyDBType (see p. 62)AnyDesMeasureType (see p. 63)AnyEnumOptSolver (see p. 63)AnyMuscleRecruitmentSolver (see p. 64)AnyKinEqSwitch (see p. 64)AnyEnumFourierSerieType (see p. 65)AnyKinRotationalType (see p. 65)AnyEnumMuscleRecruitmentType (see p. 66)AnyEnumMuscleRecruitmentNormalizationType (see p. 66)AnyInterPolType (see p. 67)AnyFilterType (see p. 67)AnyChartStyle (see p. 67)AnyEnumMessageType (see p. 68)

Page 59: Any Script Ref Manual

46

Page 60: Any Script Ref Manual

47

3.3 Class Tree of Functions

AnyFunction (see p. 69)AnyFun3D (see p. 70)

AnyFunTransform3D (see p. 70)AnyFunTransform3DIdentity (see p. 70)AnyFunTransform3DLin (see p. 71)

AnyFunCross (see p. 72)AnyFunRotMat (see p. 72)

AnyOutputFun (see p. 73)AnyParamFun (see p. 74)

AnyFunInterpol (see p. 75)AnySearchFun (see p. 76)AnyFunLinFilterBase (see p. 77)

AnyFunLinFilterDesignBase (see p. 78)AnyFunButterworthFilter (see p. 79)

AnyFunLinFilter (see p. 81)AnyFunElemOpr (see p. 82)

AnyFunElemByElemOpr (see p. 82)AnyFunSin (see p. 83)AnyFunASin (see p. 83)AnyFunSinh (see p. 84)AnyFunCos (see p. 84)AnyFunACos (see p. 85)AnyFunCosh (see p. 85)AnyFunTan (see p. 86)AnyFunATan (see p. 87)AnyFunTanh (see p. 87)AnyFunLog (see p. 88)AnyFunLog10 (see p. 88)AnyFunExp (see p. 89)AnyFunSqrt (see p. 89)AnyFunAbs (see p. 90)AnyFunCeil (see p. 91)AnyFunFloor (see p. 91)AnyFunRound (see p. 92)AnyFunPow (see p. 92)AnyFunMult (see p. 93)AnyFunDiv (see p. 93)AnyFunAtan2 (see p. 94)

AnyFunInfo (see p. 95)AnyFunNumElemOf (see p. 95)AnyFunDimOf (see p. 96)AnyFunSizesOf (see p. 96)AnyFunNameOf (see p. 97)AnyFunCompleteNameOf (see p. 98)

Page 61: Any Script Ref Manual

48

AnyFunClassNameOf (see p. 98)AnyFunStringValueOf (see p. 99)AnyFunFormatString (see p. 100)

AnyFunVecOpr (see p. 101)AnyFunVecSum (see p. 101)AnyFunVecSecInt (see p. 102)AnyFunVecMean (see p. 103)AnyFunVecProd (see p. 103)AnyFunVecMax (see p. 104)AnyFunVecMin (see p. 104)AnyFunVecVNorm (see p. 105)

AnyFunConditional (see p. 106)AnyFunIf (see p. 106)AnyFunEq (see p. 107)AnyFunLessThan (see p. 108)AnyFunLessThanEq (see p. 109)AnyFunGreaterThan (see p. 110)AnyFunGreaterThanEq (see p. 111)AnyFunAnd (see p. 111)AnyFunOr (see p. 112)

AnyFunInit (see p. 113)AnyFunIntArray (see p. 113)AnyFunArrayCat (see p. 114)

Page 62: Any Script Ref Manual

49

AnyValueType: AbstractBase Class: AnyRealObject (see p. 24)

Description:This is the base class for all classes the hold actual values such as numbers, strings, etc.

AnyFileType: CreatableBase Class: AnyValue (see p. 49)

Description:A special string class for storing file names in a multi-dimensional table.

AnyFileVarType: CreatableBase Class: AnyFile (see p. 49)

Description:A special string class for storing a single file name.

AnySurfFileType: CreatableBase Class: AnyFileVar (see p. 49)

Description:Class for file objects that hold geometrical surfaces.

The format of the surface files is beasically STL (ASCII). However, AnyBody has its own format

Page 63: Any Script Ref Manual

50

with the extension ".anysurf". AnySurfFile objects creates the ANYSURF file and perform theconversion from STL to ANYSURF automatically, if needed. The need for updating the ANYSURFfile is based on the dates of the files; if the ANYSURF file does not exist or is older than the STLfile, it is updated.

Please notice that the conversion takes some time. The benefits of the ANYSURF files are:

1) They are smaller than STL 2) Special information required by AnyBody does not need to beextracted each time you load a model. This is information such as vertex normals, which is utilizedfor rendering and contact evaluation. This saves time, except when the STL files have been changed.

AnyIntType: CreatableBase Class: AnyValue (see p. 49)

Description:Multi-dimensional integer variable.

AnyIntVarType: CreatableBase Class: AnyInt (see p. 50)

Description:Scalar integer variable.

AnyIntArrayType: CreatableBase Class: AnyInt (see p. 50)

Description:One-dimensional integer array.

Page 64: Any Script Ref Manual

51

AnyIntArray2Type: CreatableBase Class: AnyInt (see p. 50)

Description:Two-dimensional integer array.

AnyFloatType: CreatableBase Class: AnyValue (see p. 49)

Description:Multi-dimensional floating-point variable.

AnyVarType: CreatableBase Class: AnyFloat (see p. 51)

Description:A scalar numerical variable.

AnyVar is derived from the general class for numerical variables, AnyFloat, that defines a generaltensor, but AnyVar is restricted to having a single component.

AnyVarRefType: CreatableBase Class: AnyVar (see p. 51)

Description:

Page 65: Any Script Ref Manual

52

This special variable class functions as variable reference.

It is a normal scalar variable but as a reference it also allows that values can be tranferred oppositeto the normal expression evaluation. This restricts the form of initializations that can be allowed forsuch variables. Two types of initializations are allowed:

Firstly, a constant right-hand side is accepted, which may consist a single scalar number or anexpression entirely of numbers providing a single scalar constant when evluated, i.e., Val = <scalarnumerical constant>. This form of initialization does not allow two-way linkage.

Secondly, the AnyVarRef can be initialized with a single scalar variable value; which can be anAnyVar or a single element of any AnyFloat-variable of higher dimensionality, i.e., Val = <scalarvariable quantity>. This case allows for two-way linkage between the AnyVarRef and the targetvalue element.

A third case is that the AnyVarRef is internally created and initialized by the system. This casefunctions like the previous two cases, but you will not be able to find the initialization expression inthe AnyScript code. The dependency is only described in the dependecy list of the variable.

I all cases, AnyVarRef depdencies of other AnyValues impose restrictions on the dependency, i.e.,whether it is variable on the right-hand side of an AnyScript expresssion or and internally createddependency. The restrictions are:

• The right-hand side (or internal dependency) is an expression that must be a single (scalar)element, i.e., either a scalar value (e.g. AnyVar) or a multi-element value (vector, matrix, ortensor) with proper indicies selecting a single element.

• The right-hand side (or internal dependency) must have the same or an earlier EvaluationMoment as the AnyVarRef object.

• The right-hand side (or internal dependency) may be initialized but if so the right-hand sideof this expression must strictly have an earlier Evaluation Moment.

The latter two restrictions deal with the issue that the AnyVarRef object must be able to set thevalue of the right-hand side value (or internal dependency) without this value being overrided belater expression evaluations. This would lead to unpredictable results and is therefore not allowed.

AnyRGBsType: CreatableBase Class: AnyFloat (see p. 51)

Description:Value type holding RGB (color) values. It is basically a three component vector, but it can only holdvalues in the range from zero to one. The three components are interpreted as relative R, G, and Bvalue, respectively.

Page 66: Any Script Ref Manual

53

Assignment with values outside this range will be corrected during expression validation steps andaccompanied by a warning.

AnyRGBType: CreatableBase Class: AnyRGBs (see p. 52)

Description:Value type holding RGB (color) values. It is basically a three component vector, but it can only holdvalues in the range from zero to one. The three components are interpreted as relative R, G, and Bvalue, respectively.

Assignment with values outside this range will be corrected during expression validation steps andaccompanied by a warning.

AnyFloatVarType: CreatableBase Class: AnyFloat (see p. 51)

Description:Scalar floating point variable.

AnyVectorType: CreatableBase Class: AnyFloat (see p. 51)

Description:Algebraic vector with arbitrary number of components (floating point).

Page 67: Any Script Ref Manual

54

AnyMatrixType: CreatableBase Class: AnyFloat (see p. 51)

Description:Algebraic matrix with arbitrary number of rows and columns (floating point).

AnyVec3Type: CreatableBase Class: AnyFloat (see p. 51)

Description:Algebraic vector with three components. AnyVec3 is for instance used for all geometric (spatial)vectors.

AnyVec4Type: CreatableBase Class: AnyFloat (see p. 51)

Description:Algebraic vector with four components. AnyVec4 is for instance used for quaternions in spatialkinematics.

AnyMat33Type: CreatableBase Class: AnyFloat (see p. 51)

Description:Three by three algebraic matrix.

Page 68: Any Script Ref Manual

55

AnyOutputFloatLinkType: AbstractBase Class: AnyFloat (see p. 51)

Description:This class is the base class for classes that hold numerical output from operations (AnyOperation)in studies (AnyStudy). Actually this base class cannot hold data itself; it merely link to data storedelsewhere. The real data is stored in the class AnyOutputFloat, which is derived from AnyOutput-FloatLink.

AnyOutputFloatLink and AnyOutputFloat possess the same functionality and they provide the sameaccess to the stored output. The linkage of output using AnyOutputFloatLink enables that outputis stored only once even though it must be accessible from many places due to references in themodel.

AnyOutputFloatType: AbstractBase Class: AnyOutputFloatLink (see p. 55)

Description:A special floating point tensor class for storing output data.

AnyOutputFloatPostProcType: AbstractBase Class: AnyOutputFloat (see p. 55)

Description:This class for holding output data is specialized for output that comes out of postprocessing stagesof an operation.

Page 69: Any Script Ref Manual

56

AnyStringType: CreatableBase Class: AnyValue (see p. 49)

Description:Multi-dimensional string variable.

AnyObjectSearchStringType: CreatableBase Class: AnyString (see p. 56)

Description:String variable (multi-dimensional) used for specifying object searches in the Model Tree.

A search-string is used to find objects, either one or multiple, in certain classes. In principle, thesearch-string should be a standard object name using either relative or absolute naming similarto AnyScript expressions and reference definitions. Being an AnyString, the search-string must,however, be enclosed in qoutes and it can be formed by AnyScript string expressions.

Absolute naming (complete object names, in principle) can be used from anywhere, whereas relativenaming are restricted to features where the current root of the search is well-defined by the case.

To encrease the power of the search, wild chars (*) are allowed as any part of the name in thesearch-string.

Search-string with multiple elements (arrays/vectors, tables/matrices/tensors) are typically inter-preted as multiple searches that are added. Single- and multi-dimensional arrays are typically treatedthe same way, i.e., there are no special functionality related to multi-dimensional search strings.

Future releases:This string type is not used in AnyScript objects yet, but the searching facilities are indeed, sothe explanation above is valid for various normal strings used for searching. In future versions,AnyObjectSearchString will be used in these places.

Page 70: Any Script Ref Manual

57

AnyStringVarType: CreatableBase Class: AnyString (see p. 56)

Description:String variable holding a single string.

AnyChartSerieTitleType: HiddenBase Class: AnyStringVar (see p. 57)

Description:A special string class for series titles in AnyChart.

AnyStringVectorType: CreatableBase Class: AnyString (see p. 56)

Description:String vector with arbitrary number of components (strings).

AnyStringArrayType: CreatableBase Class: AnyString (see p. 56)

Description:One-dimensional string array.

Page 71: Any Script Ref Manual

58

AnyPathType: HiddenBase Class: AnyString (see p. 56)

Description:A special string class for storing handling #path definition in the Globals.Path folder.

AnyEnumType: AbstractBase Class: AnyValue (see p. 49)

Description:Abstract base class for multi-dimensional, enumerated types.

AnyRefFrameAxisType: CreatableBase Class: AnyEnum (see p. 58)

Description:This class defines axis specifications associated with reference frames (AnyRefFrame and derivedclasses).

Object Members:Options

Option Descriptionx State that indicates the first axis, i.e., the x-axis.y State that indicates the second axis, i.e., the y-axis.z State that indicates the third axis, i.e., the z-axis.

Page 72: Any Script Ref Manual

59

AnyEnumFloatNumberStyleType: CreatableBase Class: AnyEnum (see p. 58)

Description:Number formatting style.

Object Members:Options

Option DescriptionDecimalNumber Fixed decimal point.ScientificNumber Scientific notation using ’e’ to seperate the decimal and the exponential

part.CompactNumber Automatic selection depending on which format is more compact.

AnyEnumPointMarkerStyleType: CreatableBase Class: AnyEnum (see p. 58)

Description:Point marker appearence style class.

Object Members:Options

Option DescriptionPointStyleNone No marker.PointStyleBox Box (cube) marker.PointStyleSphere Spherical marker.PointStyleStar Simple star marker.PointStyleCross Cross marker of three vertical and horizontal lines.PointStyleCross2 Cross marker of four lines (diagonals of a cube).

Page 73: Any Script Ref Manual

60

AnyEnumLineStyleType: CreatableBase Class: AnyEnum (see p. 58)

Description:Line style class providing style options for graphically simple lines and curves.

Object Members:Options

Option DescriptionLineStyleNone No line.LineStyleFull Full line.LineStyleHidden Hidden line.

AnyEnumLine3DStyleType: CreatableBase Class: AnyEnum (see p. 58)

Description:Line style class providing style options for lines and curves with 3D effects.

Object Members:Options

Option DescriptionLine3DStyleFull Full line.

AnyEnumLine3DCapStyleType: CreatableBase Class: AnyEnum (see p. 58)

Description:Line style class providing style options for the caps of lines and curves with 3D effects.

Page 74: Any Script Ref Manual

61

Object Members:Options

Option DescriptionLine3DCapStyleVoid This option will do nothing.Line3DCapStyleNone No visible cap at line end, but the line is nicely closed. Moreover, this

can be used to make spaces in caps composed of multiple caps.Line3DCapStyleDisk Thin disk as line cap.Line3DCapStyle-Cylinder

Cylinder shaped line cap (or disk with thickness of half the cap length).

Line3DCapStyle-Ellipsoid

Ellipsoidal shaped cap.

Line3DCapStyleArrow Arrow head.

AnySwitchType: CreatableBase Class: AnyEnum (see p. 58)

Description:Multi-dimensional switch with states ’On’ and ’Off’.

Object Members:Options

Option DescriptionOffOn

AnyEnumVarType: AbstractBase Class: AnyEnum (see p. 58)

Description:Abstract base class for enumerated types with a single component.

Page 75: Any Script Ref Manual

62

AnySwitchVarType: CreatableBase Class: AnyEnumVar (see p. 61)

Description:Single switch with states ’On’ and ’Off’.

Object Members:Options

Option DescriptionOffOn

AnyEnumStateType: AbstractBase Class: AnyEnumVar (see p. 61)

Description:This class is used to define the states that enumerated types can have. It is abstract class so youcannot create new states in AnyScript. System defined AnyEnumState can however exist and thesewill typically be placed in the global scope in order to allow easy access from anywhere in thescript.

AnyDBTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Database types.

Object Members:

Page 76: Any Script Ref Manual

63

OptionsOption DescriptionMS_SQLServer_2005 Miscrosoft SQL Server 2005MS_SQLServer_2000 Miscrosoft SQL Server 2000MS_Access Miscrosoft Office AccessMySQL My SQLOracle OracleOracleXE

AnyDesMeasureTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Type definitions for design measures.

Object Members:Options

Option DescriptionOutputFun Simple output variable purely for monitoring the performance of the

design.ObjectiveFun Objective function.EqualToZero Equality constraint (equal to zero).LessThanZero Inequality constraint (less than zero).GreaterThanZero Inequality constraint (greater than zero).

AnyEnumOptSolverType: CreatableBase Class: AnyEnum (see p. 58)

Description:This class defines axis specifications associated with reference frames (AnyRefFrame and derivedclasses).

Object Members:

Page 77: Any Script Ref Manual

64

OptionsOption DescriptionOptSimpleSearch Simple search algorithm.OptFeasibleDirSearch1 Feasible directions search algorithm based on steepest descent direction

approach.OptFeasibleDirSearch2 Feasible directions search algorithm based on conjugate direction ap-

proach.

AnyMuscleRecruitmentSolverType: CreatableBase Class: AnyEnum (see p. 58)

Description:Class for specification of criteria functions and solver types for the muscle recruitment problem inAnyBodyStudy1 objects.

Object Members:Options

Option DescriptionMinMaxSimplex Minimization of maximal muscle activity by the default simplex rou-

tine, which in this version is the same as for MinMaxOOSolSimplex.

MinMaxOOSol-Simplex

Minimization of maximal muscle activity by simplex routine from theOOSol library.

MinMaxOOSolQP Minimization of maximal muscle activity by a quadratic programmingroutine from the OOSol library.

MinMaxNRSimplex Minimization of maximal muscle activity by simplex routine from Nu-merical Recipes.

MinMaxAQP

AnyKinEqSwitchType: CreatableBase Class: AnyEnum (see p. 58)

Description:This class is not operational yet. Later it will be used for defining the Type member in the reactionforce class.

Page 78: Any Script Ref Manual

65

Object Members:Options

Option DescriptionOff Reaction force is switched off.On Reaction force is active.

AnyEnumFourierSerieTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Type definitions for the Fourier function.

Object Members:Options

Option DescriptionCosSin Mixed cosine and sine terms.Cos Cosine terms with phase shift.Sin Sine terms with phase shift.

AnyKinRotationalTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Type definitions for rotational coordinates.

Object Members:Options

Option DescriptionRotAxesAngles 3-D cardan angles, such as Euler or Bryant angles.RotVector Cartesian rotation vector.EulerParam Euler parameters.

Page 79: Any Script Ref Manual

66

AnyEnumMuscleRecruitmentTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Class for specification of criterion types for the muscle recruitment problem in AnyOprSetMuscle-Recruitment objects.

Object Members:Options

Option DescriptionMR_MinMaxStrict Min-Max criterion, i.e., the infinite norm in a strict sense.MR_MinMaxAux Min-Max criterion supplemeted with auxillary linear and quadratic

terms.MR_Linear Linear criterion.MR_Quadratic Quadratic criterion.MR_QuadraticAux Quadratic criterion with an auxillary linear term.MR_Polynomial A polynomial criteria with user specified power.

AnyEnumMuscleRecruitmentNormalizationTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Class for specification of criterion types for the muscle recruitment problem in AnyOprSetMuscle-Recruitment objects.

Object Members:Options

Option DescriptionMR_Constant Constant normalization denominator for all muscles.MR_CurrentStrength The current muscle strength (e.g. including length-velocity relation-

ships of the muscle models) of each muscle is used as normalizationdenominator.

MR_NominalStrength The nominal muscle strength (F0 in the muscle models) of each muscleis used as normalization denominator.

Page 80: Any Script Ref Manual

67

AnyInterPolTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Type definitions for the Interpolation functions.

Object Members:Options

Option DescriptionPiecewiseLinear Piecewise linear function.Bezier Bezier interpolation function.Bspline B-spline interpolation function.

AnyFilterTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Type definitions for filter functions.

Object Members:Options

Option DescriptionLowPass Lowpass filterHighPass Highpass filterBandPass Bandpass filterBandStop Bandstop filter

AnyChartStyleType: CreatableBase Class: AnyEnum (see p. 58)

Page 81: Any Script Ref Manual

68

Description:General styles of the AnyChart appearance.

Object Members:Options

Option DescriptionCartesianChart2DCartesianChart3D

AnyEnumMessageTypeType: CreatableBase Class: AnyEnum (see p. 58)

Description:Message types. Notice that all except the fatal error allows processes to continue. The fatal errorstop the current process, for instance a running operation.

Object Members:Options

Option DescriptionMSG_Message Basic message type for purely informative, non-critical messages.MSG_Warning Warning message type.MSG_Error Error message type.MSG_ErrorFatal Fatal error message type.

Page 82: Any Script Ref Manual

69

AnyFunctionType: AbstractBase Class: AnyFolder (see p. 24)

Description:AnyFunction is the base class for all functions in AnyScriptTM. A function is an object that can returna value (AnyValue) for a given set parameters (AnyValue or AnyObjects). A function can be calledin an AnyScript expression and it will be evaluated whenever the expression is evaluated.

The parameters, that govern the return value, can be members of the class or they can be suppliedin the function argument list. The class members can be initialized when declaring an object of theclass, whereas the function arguments are supplied upon evaluation, i.e., they function using theircurrent value. The function argument list is supplied to the function as a comma-separated list inparentheses after the function name. A function call could for instance look like

AnyVar var = funcname(var1,var2);

It is important to notice that an AnyFunction derived class is a class of functions. It is not until anobject of the class is created that there exists an actual function and the name of the object is also thename of the function when calling it. An example is the class AnyFunSin, that is a class of all sinefunctions (though there is only one definition in this particular case). A globally declared objectcalled ’sin’ is the actual sine function that we can use in mathematical expressions as like sin(arg).

For many standard mathematical functions that are defined by the system, like sine, the functionobject is the important one and the function class has only little relevance in the daily work. Thereis a one to one relationship, one class and one function/object, and typically the function object ispredefined in the global scope of AnyScriptTM. However, some function classes contain members,that can be initialized, and of these you can make different functions/objects. For such functionclasses it is more meaningful to speak of a ’class of functions’ and there will typically not be anypredefined objects of such classes in the global scope.

Functions are typically mathematical functions, but generally they can be defined with any type ofvalues (AnyValue) as output. In addition AnyFunction can be polymorfic, which means that a func-tion may have more than one argument list definition. They may even return different value typesas output. For instance Accepted function definitions are made by the class AnyMonoFunction(meaning monomorphic function definition) that contains the return type (an AnyValue) and theargument list (AnyValues in a special folder). An AnyFunction can hold as many AnyMonoFunc-tions as needed and each of them defines one version of the AnyFunction. It should be emphasizedagain that the function name is the name of the object of the AnyFunction class; thus, the namesof the AnyMonoFunctions inside the AnyFunction play no role when applying the function in anAnyScriptTM expression.

Page 83: Any Script Ref Manual

70

AnyFun3DType: AbstractBase Class: AnyFunction (see p. 69)

Description:Base class for a number of 3D geometric functions.

AnyFunTransform3DType: CreatableBase Class: AnyFun3D (see p. 70)

Description:Base class for 3D transformation functions. This type of functions convert 3D (geometrical) vectorsinto new 3D vectors according to a given function built into the class. Such functions can be usedfor geometrical scaling.

Function versions:AnyVec3 FName(AnyVec3 Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction Function Function for 3D vectors (of floating point val-

ues). AnyVec3 FName(AnyVec3 Arg)

AnyFunTransform3DIdentityType: CreatableBase Class: AnyFunTransform3D (see p. 70)

Description:Identity 3D transformation function.

Page 84: Any Script Ref Manual

71

This transformation function returns a vector that is equal to the input argument. This is usefulfor replacement of other transformation function in cases where transformation is not wanted fora particular application but transformation facilites is implemented generally in the AnyScriptTM

model.

Function versions:AnyVec3 FName(AnyVec3 Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction Function Function for 3D vectors (of floating point val-

ues). AnyVec3 FName(AnyVec3 Arg)

AnyFunTransform3DLinType: CreatableBase Class: AnyFunTransform3D (see p. 70)

Description:Linear 3D transformation function.

The linear scaling is defined by a 3 by 3 scaling matrix that is multiplied to the argument (3Dgeometrical vector) after subtracting a set of offset values. The scaling matrix and the offset vectorare given as members of the class.

Function versions:AnyVec3 FName(AnyVec3 Arg)

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyMat33 ScaleMat Scaling Matrix (3 x 3).AnyVec3 Offset Vector of offset values.

Denied-Access MembersClass Name DescriptionAnyMonoFunction Function Function for 3D vectors (of floating point val-

ues). AnyVec3 FName(AnyVec3 Arg)

Page 85: Any Script Ref Manual

72

AnyFunCrossType: CreatableBase Class: AnyFun3D (see p. 70)

Description:Vector mulitplication (cross product) function.

Function versions:AnyFloat FName(AnyVec3 Arg1, AnyVec3 Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFloatFunction AnyFloat FName(AnyVec3 Arg1, AnyVec3

Arg2)

AnyFunRotMatType: CreatableBase Class: AnyFun3D (see p. 70)

Description:Rotational transformation matrix.

RotMatXYZ Rotational tranformation matrix for a planar rotation about a given axis of the coor-dinate system. The axis is given by the second argument and the angle of rotation (in radians)by the first.

RotMat3Points Rotational tranformation matrix for a coordinate system defined by three points.The first point is the origin of the system; the second gives the direction of the first (x) axis.Together all three points must span a plane which will be the plane of the first (x) and thesecond (y) axes, having the third (z) axis as normal.

Function versions:AnyMat33 FName(AnyVar Angle, AnyEnum Axis)AnyMat33 FName(AnyVec3 Pnt1, AnyVec3 Pnt2, AnyVec3 Pnt3)

Object Members:

Page 86: Any Script Ref Manual

73

Denied-Access MembersClass Name DescriptionAnyMonoFunction RotMatXYZ AnyMat33 FName(AnyVar Angle, AnyEnum

Axis)AnyMonoFunction RotMat3Points AnyMat33 FName(AnyVec3 Pnt1, AnyVec3

Pnt2, AnyVec3 Pnt3)

AnyOutputFunType: CreatableBase Class: AnyFunction (see p. 69)

Description:This class defines a function for making and getting access to values in the output data structures ofstudies, see the Output member in AnyStudy and derived classes. The output data structure doesnot exist at loadtime and therefore you cannot access then directly in mathematical expression asmost normal variables, but by means of AnyOutputFun style functions you can work around thisproblem.

By declaring an AnyOutputFun, you define new output and at the same time you define a functionthat returns the output data structure. The new output is defined by the expression assigned to the Valmember. This can be as simple as a direct assignment to another, already existing variable, if yousimply want to get access to the output of the existing variable, or it can be any, more complicated,expression.

This function takes no arguments. When the function is called it returns the output data structureassociated with Val. This typically means that the return value is a higher dimensionality thanVal because the output contains multiple values of Val depending on the study it is part of. TheAnyOutputFun must be declared inside a study in order to resolve the association with the outputdata structure.

The function can be called from anywhere in the script, so it does indeed provide full access to theoutput data. However, use the function carefully, as you get the current values of all output for thegiven variable, i.e., for all steps of a given study, even though not all values may not be computed atthe given time. Uninitialized output data should be zero.

Also notice, as for normal expressions, the AnyOutputFun cannot get access to the output duringloadtime. This is handled by returning a dummy value during loadtime, which is the same dimen-sionality and size as the Val. This implies that the return of the function typically will changedimensionality from loadtime to runtime evaluations. Therefore, expressions using AnyOutputFunfunctions must somehow deal with this change of dimensionality, or the expression evaluator maycomplain either at loadtime or at runtime depending on when the first inconsistency occur. Usually,functions like taking max(), sum(), or various norms() of the returned output data make sense andtake care of the dimensionality issue.

Page 87: Any Script Ref Manual

74

Function versions:AnyFloat FName()

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFloat Val The current value of the output. It must be ini-

tialized with an expression that defines the out-put.

Denied-Access MembersClass Name DescriptionAnyFloat DummyReturn Return value for function calls made before the

output data structure is complete, i.e. duringloading. (="No values given")

AnyMonoFunction VoidFun AnyFloat FName()

AnyParamFunType: AbstractBase Class: AnyFunction (see p. 69)

Description:Base class for parameter functions that are functions of a single scalar (floating point) quantity. Thereturn is also floating point value, but it may be AnyFloats of any dimensionality and size.

Function versions:AnyFloat FName(AnyVar Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction Function AnyFloat FName(AnyVar Arg)

Page 88: Any Script Ref Manual

75

AnyFunInterpolType: CreatableBase Class: AnyParamFun (see p. 74)

Description:This class provides a vector function of a single parameter that interpolates between data pointsspaced. We shall consider this parameter to be ’time’, but it can of course be any parameter youenter as argument to the function. The following types of interpolation are available:

• Piecewise linear function (Notice that the second time-derivatives (accelerations) are zero forall times).

• Bezier interpolation.

• B-Spline interpolation of variable order.

The data points can be entered in the designated data structure or they can be read from a data textfile.

The data file must be an ascii file holding space-separated values. The first column must be theparameter values, whereas the remaining must hold the data points; as many as there are componentsin the return vector. All lines of the file that do not begin with a floating-point number are ignoredand so is any contents on a line after the expected number floating-point values. Too few values ona line give an error, whereas too many produce a warning.

Function versions:AnyFloat FName(AnyVar Arg)

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyInterPolType Type Interpolation type.

Optional-Initialization MembersClass Name DescriptionAnyIntVar BsplineOrder Order of B-spline interpolation. Notice that

this number defines the order of continuity forthe resulting function. Default value is set toprovide continuity of second order derivatives.(=4)

AnyVector T Time (parameter) data points. (="No valuesgiven")

Page 89: Any Script Ref Manual

76

AnyMatrix Data Matrix of data points. Each row contains thedata points for one component of the return vec-tor. (="No values given")

AnyFileVar FileName Name of a text file with data points in space-separated columns. The first column must holdT and the following must correspond to the rowsof Data. Comments can be entered into the datafile in lines that do not start with a number andafter the correct number of values. (="")

AnySwitchVar FileErrorContinue-OnOff

’On’ allows data file loading to continue onsome errors. These are typically when the num-ber data points does not match the expectednumber. Error messages are send anyway andyou should not expect data to work properly.(=Off, Options: Off | On)

Denied-Access MembersClass Name DescriptionAnyMonoFunction Function AnyFloat FName(AnyVar Arg)

AnySearchFunType: CreatableBase Class: AnyFunction (see p. 69)

Description:This class defines a function template that allows you to search for variables in the model by name.The function asembles output from searches that returns in multiple value objects.

The assembled data structure is always a vector containing all the elements of the found value ob-jects disregarding their original dimensionality. There is no rules about the order of the elementsin the resulting vector; one should therefore not rely on picking out particular element of the vec-tor. Thus, the function is mainly usabale for assembling value that should be further processed byfunctions that treat all element uniformly.

Function versions:AnyFloat FName()

Object Members:

Page 90: Any Script Ref Manual

77

Obligatory-Initialization MembersClass Name DescriptionAnyString Search Array of objects search strings (for more info.

on search-strings, see class AnyObjectSearch-String).

Denied-Access MembersClass Name DescriptionAnyMonoFunction VoidFun AnyFloat FName()

AnyFunLinFilterBaseType: AbstractBase Class: AnyFunction (see p. 69)

Description:Abstract base class for all linear filters.

This class contains the initial condition vector for all linear filters in addition to specification ofwhether the initial conditions should be set automatically or not, and whether only forward filteringshould be used, or if filtering should be done both in the forward and backward direction.

When the automatic initial condition option is set to on, the initial conditions are calculated to bethe steady-state state of the filter.

When the filter forward and backward option is set to on, the data is first filtered in the forwarddirection, the data is reversed and the filter run again. Finally, the data is reversed one more time.In this mode, the input data is extrapolated in the ends before filtering to minimize the effects of thebeginning and end transitions. Filtering both in the forward and backward direction has the effectthat the overall phase shift in the data is zero, and the amplitude of the filter is squared.

Function versions:void FName(AnyFloat x)void FName(AnyFloat x, AnyIntVar m)void FName(AnyFloat x, AnyVector z0)void FName(AnyFloat x, AnyIntVar m, AnyVector z0)

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVector z0 Initial condition vector. (="No values given")

Page 91: Any Script Ref Manual

78

AnySwitchVar AutomaticInitial-ConditionOnOff

Switch to specify whether or not the initial con-ditions are calculated automatically. (=Off, Op-tions: Off | On)

AnySwitchVar FilterForward-BackwardOnOff

Switch to specify if filtering should only be per-formed in the forward direction or both in theforward and backward direction.(=Off, Options: Off | On)

Denied-Access MembersClass Name DescriptionAnyMonoFunction FilterFun1 Filtering without initial conditon and downsam-

pling specification. void FName(AnyFloat x)AnyMonoFunction FilterFun2 Filtering with downsampling specification.

void FName(AnyFloat x, AnyIntVar m)AnyMonoFunction FilterFun3 Filtering with initial condition specification.

void FName(AnyFloat x, AnyVector z0)AnyMonoFunction FilterFun4 Filtering with both initial condition and down-

sampling specification.void FName(AnyFloat x, AnyIntVar m,AnyVector z0)

AnyFunLinFilterDesignBaseType: AbstractBase Class: AnyFunLinFilterBase (see p. 77)

Description:Abstract base class for all linear filters that include filter design.

Either the filter can be specified by using the normalized frequency(ies) or it can be specified usingthe sample frequency and the cut-off frequency(ies).

Function versions:void FName(AnyFloat x)void FName(AnyFloat x, AnyIntVar m)void FName(AnyFloat x, AnyVector z0)void FName(AnyFloat x, AnyIntVar m, AnyVector z0)

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVector z0 Initial condition vector. (="No values given")

Page 92: Any Script Ref Manual

79

AnySwitchVar AutomaticInitial-ConditionOnOff

Switch to specify whether or not the initial con-ditions are calculated automatically. (=Off, Op-tions: Off | On)

AnySwitchVar FilterForward-BackwardOnOff

Switch to specify if filtering should only be per-formed in the forward direction or both in theforward and backward direction.(=Off, Options: Off | On)

AnyIntVar N The filter order. (=2)AnyVector W The normalized cut-off frequency(ies). (="No

values given")AnyVar Fs The sample frequency of the data to be filtered.

(=0)AnyVector Fc The cut-off frequency(ies). (="No values

given")AnyFilterType Type The filter type.

(Options: LowPass | HighPass | BandPass |BandStop)

Denied-Access MembersClass Name DescriptionAnyMonoFunction FilterFun1 Filtering without initial conditon and downsam-

pling specification. void FName(AnyFloat x)AnyMonoFunction FilterFun2 Filtering with downsampling specification.

void FName(AnyFloat x, AnyIntVar m)AnyMonoFunction FilterFun3 Filtering with initial condition specification.

void FName(AnyFloat x, AnyVector z0)AnyMonoFunction FilterFun4 Filtering with both initial condition and down-

sampling specification.void FName(AnyFloat x, AnyIntVar m,AnyVector z0)

AnyFunButterworthFilterType: CreatableBase Class: AnyFunLinFilterDesignBase (see p. 78)

Description:Digital Butterworth filter class. This filter allows you to use a low-pass, high-pass, band-pass andband-stop butterworth filter (Type) with the specified order (N) and cutoff frequency/frequencies(depending of the type of filter you use) (W).

The cutoff frequency/frequencies are given as a normalized value between 0.0 and 1.0, with 0.0being a cutoff frequency at DC (0 Hz) and 1.0 a cutoff frequency at half the sampling frequency of

Page 93: Any Script Ref Manual

80

the signal to be filtered.

The implementation of the filter is made using a so-called numerator/denominator form. NUM(z)/DEN(z).

Given the filter specification, the filter coefficients are calculated by: 1) Calculating the poles, zerosand gain for a normalized continuous-time low-pass Butterworth filter. 2) Transforming the nor-malized low-pass Butterworth filter to an unnormalized continous-time filter according to the userspecification with frequency prewrap. 3) Applying a bilinear transformation to obtain the equiv-alent discrete-time filter. 4) If the desired filter is of type high-pass, band-pass, or band-stop, thedesigned discrete-time low-pass filter is transformed to the desired type. When designing the high-pass, band-pass and band-stop filters, the low-pass filter, they are derived from, is calculated usingthe user-specified order and a normalized cutoff frequency of 0.5.

All calculations are made through manipulations of the numerator/denominator structure. Whilethis allows for a simple implementation, it may result in numerical problems for high-order filtersor filters with normalized cutoff frequencies close to 0.0 or 1.0. We hope to be able to make a morenumerically robust implementation in future versions of AnyBodyTM.

Function versions:void FName(AnyFloat x)void FName(AnyFloat x, AnyIntVar m)void FName(AnyFloat x, AnyVector z0)void FName(AnyFloat x, AnyIntVar m, AnyVector z0)

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVector z0 Initial condition vector. (="No values given")AnySwitchVar AutomaticInitial-

ConditionOnOffSwitch to specify whether or not the initial con-ditions are calculated automatically. (=Off, Op-tions: Off | On)

AnySwitchVar FilterForward-BackwardOnOff

Switch to specify if filtering should only be per-formed in the forward direction or both in theforward and backward direction.(=Off, Options: Off | On)

AnyIntVar N The filter order. (=2)AnyVector W The normalized cut-off frequency(ies). (="No

values given")AnyVar Fs The sample frequency of the data to be filtered.

(=0)AnyVector Fc The cut-off frequency(ies). (="No values

given")AnyFilterType Type The filter type.

(Options: LowPass | HighPass | BandPass |BandStop)

Page 94: Any Script Ref Manual

81

Denied-Access MembersClass Name DescriptionAnyMonoFunction FilterFun1 Filtering without initial conditon and downsam-

pling specification. void FName(AnyFloat x)AnyMonoFunction FilterFun2 Filtering with downsampling specification.

void FName(AnyFloat x, AnyIntVar m)AnyMonoFunction FilterFun3 Filtering with initial condition specification.

void FName(AnyFloat x, AnyVector z0)AnyMonoFunction FilterFun4 Filtering with both initial condition and down-

sampling specification.void FName(AnyFloat x, AnyIntVar m,AnyVector z0)

AnyFunLinFilterType: CreatableBase Class: AnyFunLinFilterBase (see p. 77)

Description:Linear digital filter. Both Infinite Impulse Response (IIR) and Finite Impulse Response (FIR) Filters.The filter is a "Direct form II transposed" implementation of the standard difference equation.

The filter is given by the filter coefficients A and B.

Function versions:void FName(AnyFloat x)void FName(AnyFloat x, AnyIntVar m)void FName(AnyFloat x, AnyVector z0)void FName(AnyFloat x, AnyIntVar m, AnyVector z0)

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVector A The filter denominator filter coefficients.AnyVector B The filter numerator filter coefficients.

Optional-Initialization MembersClass Name DescriptionAnyVector z0 Initial condition vector. (="No values given")

Page 95: Any Script Ref Manual

82

AnySwitchVar AutomaticInitial-ConditionOnOff

Switch to specify whether or not the initial con-ditions are calculated automatically. (=Off, Op-tions: Off | On)

AnySwitchVar FilterForward-BackwardOnOff

Switch to specify if filtering should only be per-formed in the forward direction or both in theforward and backward direction.(=Off, Options: Off | On)

Denied-Access MembersClass Name DescriptionAnyMonoFunction FilterFun1 Filtering without initial conditon and downsam-

pling specification. void FName(AnyFloat x)AnyMonoFunction FilterFun2 Filtering with downsampling specification.

void FName(AnyFloat x, AnyIntVar m)AnyMonoFunction FilterFun3 Filtering with initial condition specification.

void FName(AnyFloat x, AnyVector z0)AnyMonoFunction FilterFun4 Filtering with both initial condition and down-

sampling specification.void FName(AnyFloat x, AnyIntVar m,AnyVector z0)

AnyFunElemOprType: AbstractBase Class: AnyFunction (see p. 69)

Description:Base class for a number of functions that can be applied to all elements of AnyValue objects. There-fore these functions can be applied to scalars, vector, matrices, and strutures of higher dimensional-ities.

AnyFunElemByElemOprType: AbstractBase Class: AnyFunElemOpr (see p. 82)

Description:Base class for a number of single argument functions that operates on each element independently.Therefore these functions can be applied to scalars, vector, matrices, and strutures of higher dimen-

Page 96: Any Script Ref Manual

83

sionalities and they return values with the same dementionality as the argument.

AnyFunSinType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Sine.

This class defines the trigonometric sine function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunASinType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Inverse sine (arcsine).

This class defines the inverse cosine function. The function is applied to each element of the argu-ment and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Page 97: Any Script Ref Manual

84

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunSinhType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Hyperbolic sine.

This class defines the hyperbolic sine function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunCosType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Cosine.

This class defines the trigonometric cosine function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Page 98: Any Script Ref Manual

85

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunACosType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Inverse cosine (arccosine).

This class defines the inverse cosine function. The function is applied to each element of the argu-ment and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunCoshType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Page 99: Any Script Ref Manual

86

Description:Hyperbolic cosine.

This class defines the hyperbolic cosine function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunTanType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Tangent.

This class defines the trigonometric tangent function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

Page 100: Any Script Ref Manual

87

AnyFunATanType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Inverse tangent (arctangent).

This class defines the inverse tangent function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunTanhType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Hyperbolic tangent.

This class defines the hyperbolic tangent function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:

Page 101: Any Script Ref Manual

88

Denied-Access MembersClass Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunLogType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:The natural logarithm.

This class defines the natural logarithm function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunLog10Type: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:The 10-based logarithm.

This class defines the 10-based logarithm function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Page 102: Any Script Ref Manual

89

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunExpType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:The exponential function.

This class defines the scalar exponential function. The function is applied to each element of theargument and the return value has the same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunSqrtType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Page 103: Any Script Ref Manual

90

Description:Square root.

This class defines the square root function for each element of the argument. The return value hasthe same dimensions as the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunAbsType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Absolute value function.

This class defines the absolute-value function of both integer and floating point arguments. Thefunction is applied to each element of the argument and the return value has the same dimensionsas the argument.

Function versions:AnyFloat FName(AnyFloat Arg)AnyInt FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyInt FName(AnyInt Arg)

Page 104: Any Script Ref Manual

91

AnyFunCeilType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:The ceil function of all elements.

Function versions:AnyInt FName(AnyFloat Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction Function AnyInt FName(AnyFloat Arg)

AnyFunFloorType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:The floor function of all elements.

Function versions:AnyInt FName(AnyFloat Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction Function AnyInt FName(AnyFloat Arg)

Page 105: Any Script Ref Manual

92

AnyFunRoundType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:The round function of all elements.

Function versions:AnyInt FName(AnyFloat Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction Function AnyInt FName(AnyFloat Arg)

AnyFunPowType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:The power function of all elements.

Function versions:AnyFloat FName(AnyFloat Arg1, AnyFloat Arg2)AnyFloat FName(AnyFloat Arg1, AnyInt Arg2)AnyFloat FName(AnyInt Arg1, AnyFloat Arg2)AnyInt FName(AnyInt Arg1, AnyInt Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFloatFunction AnyFloat FName(AnyFloat Arg1, AnyFloat

Arg2)AnyMonoFunction FloatIntFunction AnyFloat FName(AnyFloat Arg1, AnyInt

Arg2)

Page 106: Any Script Ref Manual

93

AnyMonoFunction IntFloatFunction AnyFloat FName(AnyInt Arg1, AnyFloatArg2)

AnyMonoFunction IntIntFunction AnyInt FName(AnyInt Arg1, AnyInt Arg2)

AnyFunMultType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Element by element multiplication function.

Function versions:AnyFloat FName(AnyFloat Arg1, AnyFloat Arg2)AnyFloat FName(AnyFloat Arg1, AnyInt Arg2)AnyFloat FName(AnyInt Arg1, AnyFloat Arg2)AnyInt FName(AnyInt Arg1, AnyInt Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFloatFunction AnyFloat FName(AnyFloat Arg1, AnyFloat

Arg2)AnyMonoFunction FloatIntFunction AnyFloat FName(AnyFloat Arg1, AnyInt

Arg2)AnyMonoFunction IntFloatFunction AnyFloat FName(AnyInt Arg1, AnyFloat

Arg2)AnyMonoFunction IntIntFunction AnyInt FName(AnyInt Arg1, AnyInt Arg2)

AnyFunDivType: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:Element by element division function.

Page 107: Any Script Ref Manual

94

Function versions:AnyFloat FName(AnyFloat Arg1, AnyFloat Arg2)AnyFloat FName(AnyFloat Arg1, AnyInt Arg2)AnyFloat FName(AnyInt Arg1, AnyFloat Arg2)AnyInt FName(AnyInt Arg1, AnyInt Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFloatFunction AnyFloat FName(AnyFloat Arg1, AnyFloat

Arg2)AnyMonoFunction FloatIntFunction AnyFloat FName(AnyFloat Arg1, AnyInt

Arg2)AnyMonoFunction IntFloatFunction AnyFloat FName(AnyInt Arg1, AnyFloat

Arg2)AnyMonoFunction IntIntFunction AnyInt FName(AnyInt Arg1, AnyInt Arg2)

AnyFunAtan2Type: HiddenBase Class: AnyFunElemByElemOpr (see p. 82)

Description:The power function of all elements.

Function versions:AnyFloat FName(AnyFloat Arg1, AnyFloat Arg2)AnyFloat FName(AnyFloat Arg1, AnyInt Arg2)AnyFloat FName(AnyInt Arg1, AnyFloat Arg2)AnyInt FName(AnyInt Arg1, AnyInt Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFloatFunction AnyFloat FName(AnyFloat Arg1, AnyFloat

Arg2)AnyMonoFunction FloatIntFunction AnyFloat FName(AnyFloat Arg1, AnyInt

Arg2)

Page 108: Any Script Ref Manual

95

AnyMonoFunction IntFloatFunction AnyFloat FName(AnyInt Arg1, AnyFloatArg2)

AnyMonoFunction IntIntFunction AnyInt FName(AnyInt Arg1, AnyInt Arg2)

AnyFunInfoType: AbstractBase Class: AnyFunction (see p. 69)

Description:Base class for a number of functions that can retrieve information about AnyScript data objects.

AnyFunNumElemOfType: HiddenBase Class: AnyFunInfo (see p. 95)

Description:Returns number of elements in an AnyValue structure.

Function versions:AnyIntVar FName(AnyFloat Arg)AnyIntVar FName(AnyInt Arg)AnyIntVar FName(AnyString Arg)AnyIntVar FName(AnyEnum Arg)AnyIntVar FName(AnyFile Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyIntVar FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyIntVar FName(AnyInt Arg)AnyMonoFunction StringFunction AnyIntVar FName(AnyString Arg)AnyMonoFunction EnumFunction AnyIntVar FName(AnyEnum Arg)AnyMonoFunction FileFunction AnyIntVar FName(AnyFile Arg)

Page 109: Any Script Ref Manual

96

AnyFunDimOfType: HiddenBase Class: AnyFunInfo (see p. 95)

Description:Returns number of dimensions in an AnyValue structure.

Function versions:AnyIntVar FName(AnyFloat Arg)AnyIntVar FName(AnyInt Arg)AnyIntVar FName(AnyString Arg)AnyIntVar FName(AnyEnum Arg)AnyIntVar FName(AnyFile Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyIntVar FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyIntVar FName(AnyInt Arg)AnyMonoFunction StringFunction AnyIntVar FName(AnyString Arg)AnyMonoFunction EnumFunction AnyIntVar FName(AnyEnum Arg)AnyMonoFunction FileFunction AnyIntVar FName(AnyFile Arg)

AnyFunSizesOfType: HiddenBase Class: AnyFunInfo (see p. 95)

Description:Returns number of dimensions in an AnyValue structure.

Function versions:AnyIntArray FName(AnyFloat Arg)AnyIntArray FName(AnyInt Arg)AnyIntArray FName(AnyString Arg)AnyIntArray FName(AnyEnum Arg)AnyIntArray FName(AnyFile Arg)

Page 110: Any Script Ref Manual

97

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyIntArray FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyIntArray FName(AnyInt Arg)AnyMonoFunction StringFunction AnyIntArray FName(AnyString Arg)AnyMonoFunction EnumFunction AnyIntArray FName(AnyEnum Arg)AnyMonoFunction FileFunction AnyIntArray FName(AnyFile Arg)

AnyFunNameOfType: HiddenBase Class: AnyFunInfo (see p. 95)

Description:Returns the name of an object.

Currently, only AnyValue objects are supported.

Function versions:AnyStringVar FName(AnyFloat Arg)AnyStringVar FName(AnyInt Arg)AnyStringVar FName(AnyString Arg)AnyStringVar FName(AnyEnum Arg)AnyStringVar FName(AnyFile Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyStringVar FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyStringVar FName(AnyInt Arg)AnyMonoFunction StringFunction AnyStringVar FName(AnyString Arg)AnyMonoFunction EnumFunction AnyStringVar FName(AnyEnum Arg)AnyMonoFunction FileFunction AnyStringVar FName(AnyFile Arg)

Page 111: Any Script Ref Manual

98

AnyFunCompleteNameOfType: HiddenBase Class: AnyFunInfo (see p. 95)

Description:Returns the complete-name of an object.

Currently, only AnyValue objects are supported.

Function versions:AnyStringVar FName(AnyFloat Arg)AnyStringVar FName(AnyInt Arg)AnyStringVar FName(AnyString Arg)AnyStringVar FName(AnyEnum Arg)AnyStringVar FName(AnyFile Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyStringVar FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyStringVar FName(AnyInt Arg)AnyMonoFunction StringFunction AnyStringVar FName(AnyString Arg)AnyMonoFunction EnumFunction AnyStringVar FName(AnyEnum Arg)AnyMonoFunction FileFunction AnyStringVar FName(AnyFile Arg)

AnyFunClassNameOfType: HiddenBase Class: AnyFunInfo (see p. 95)

Description:Returns the class name of an object.

Currently, only AnyValue objects are supported.

Function versions:AnyStringVar FName(AnyFloat Arg)AnyStringVar FName(AnyInt Arg)AnyStringVar FName(AnyString Arg)

Page 112: Any Script Ref Manual

99

AnyStringVar FName(AnyEnum Arg)AnyStringVar FName(AnyFile Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyStringVar FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyStringVar FName(AnyInt Arg)AnyMonoFunction StringFunction AnyStringVar FName(AnyString Arg)AnyMonoFunction EnumFunction AnyStringVar FName(AnyEnum Arg)AnyMonoFunction FileFunction AnyStringVar FName(AnyFile Arg)

AnyFunStringValueOfType: HiddenBase Class: AnyFunInfo (see p. 95)

Description:Returns the value of an object as a string.

The function returns only the first element of multi-element types such as vectors, matrices etc.Values of multi-element types must be converted element by element.

The second argument can optinally be a string specifying the format. This format string uses theC-style formatting specification used in functions such as printf(..).

Future releases:This manual will be extended with an explanation of the formatting string. Until then pleaserefer other printf(..) documentation, e.g. http://www.cplusplus.com/ref/cstdio/printf.html.

Function versions:AnyStringVar FName(AnyFloat Arg)AnyStringVar FName(AnyInt Arg)AnyStringVar FName(AnyFloat Arg, AnyStringVar FormatStr)AnyStringVar FName(AnyInt Arg, AnyStringVar FormatStr)

Object Members:

Page 113: Any Script Ref Manual

100

Denied-Access MembersClass Name DescriptionAnyMonoFunction FloatFunction AnyStringVar FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyStringVar FName(AnyInt Arg)AnyMonoFunction FloatFunction-

FormattedAnyStringVar FName(AnyFloat Arg, Any-StringVar FormatStr)

AnyMonoFunction IntFunction-Formatted

AnyStringVar FName(AnyInt Arg, AnyString-Var FormatStr)

AnyFunFormatStringType: HiddenBase Class: AnyFunInfo (see p. 95)

Description:Formatted string function.

This function formats a string input into a another string that can contain charaters not allowed inAnyScript code. This is for instance charaters such as tabs, newlines, etc. The special charatersare represented by normal characters with so-called escape sequences, i.e., a ’\’ followed by somecharater and in some cases digits too.

This function converts escape sequences known from C and C++. The following escape sequencesare converted:

’\\’: Backslash

’\n’: Newline

’\r’: Carriage return

’\t’: Horizontal tab

’\v’: Vertical tab (not visible in some output)

’\f’: Formfeed (not visible in some output)

’\”: Simple quote

’\"’: Double quote

’\a’: Bell (not visible or hearable in some output)

’\ooo’: ASCII charaters given as octal values, where ’ooo’ are one to tree octal digits

’\xHH’: ASCII charaters given as hex values, where ’HH’ are one or two hex digits (0-9,A-F,a-f).

’\XHH’: Similarly to ’\xHH’.

Page 114: Any Script Ref Manual

101

Cases marked as not visible will in some output be marked by a empty box or the like. Notice manyspecial characters behaves like this, if you use the ASCII codes. Unknown escape seqeunces aresimply converted to the letter following the backslash.

Function versions:AnyString FName(AnyString StrInput)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction StringFunction AnyString FName(AnyString StrInput)

AnyFunVecOprType: AbstractBase Class: AnyFunction (see p. 69)

Description:Base class for a number of functions that applies to vector. The functions can also be applied tomatrices and strutures of higher dimensionalities. In such cases the function processes all vectorsof one dimension and returns a structure with one dimension less than the original structure.

AnyFunVecSumType: HiddenBase Class: AnyFunVecOpr (see p. 101)

Description:The sum of all elements in a vector.

The function applies to matrices and strutures of higher dimensionalities as well. In such cases,the function processes all vectors of the first dimension and returns a similar structure without thisdimension.

Function versions:AnyFloat FName(AnyFloat Arg)AnyInt FName(AnyInt Arg)

Page 115: Any Script Ref Manual

102

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyInt FName(AnyInt Arg)

AnyFunVecSecIntType: HiddenBase Class: AnyFunVecOpr (see p. 101)

Description:The secant integral of a function given by a number discrete values.

The function takes two arguments, the first is the function values and the second is the correspondingparameter values.

The function applies to matrices and strutures of higher dimensionalities as well. In such cases,the function processes all vectors of the first dimension as the function values and returns a similarstructure without this dimension.

Function versions:AnyFloat FName(AnyFloat Arg1, AnyFloat Arg2)AnyFloat FName(AnyFloat Arg1, AnyInt Arg2)AnyFloat FName(AnyInt Arg1, AnyInt Arg2)AnyFloat FName(AnyInt Arg1, AnyFloat Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFloatFunction AnyFloat FName(AnyFloat Arg1, AnyFloat

Arg2)AnyMonoFunction FloatIntFunction AnyFloat FName(AnyFloat Arg1, AnyInt

Arg2)AnyMonoFunction IntIntFunction AnyFloat FName(AnyInt Arg1, AnyInt Arg2)AnyMonoFunction IntFloatFunction AnyFloat FName(AnyInt Arg1, AnyFloat

Arg2)

Page 116: Any Script Ref Manual

103

AnyFunVecMeanType: HiddenBase Class: AnyFunVecOpr (see p. 101)

Description:The mean of all elements in a vector.

The function applies to matrices and strutures of higher dimensionalities as well. In such cases,the function processes all vectors of the first dimension and returns a similar structure without thisdimension.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyFloat FName(AnyInt Arg)

AnyFunVecProdType: HiddenBase Class: AnyFunVecOpr (see p. 101)

Description:The product of all elements in a vector.

The function applies to matrices and strutures of higher dimensionalities as well. In such cases,the function processes all vectors of the first dimension and returns a similar structure without thisdimension.

Function versions:AnyFloat FName(AnyFloat Arg)AnyInt FName(AnyInt Arg)

Object Members:

Page 117: Any Script Ref Manual

104

Denied-Access MembersClass Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyInt FName(AnyInt Arg)

AnyFunVecMaxType: HiddenBase Class: AnyFunVecOpr (see p. 101)

Description:The maximum of all elements in a vector.

The function applies to matrices and strutures of higher dimensionalities as well. In such cases,the function processes all vectors of the first dimension and returns a similar structure without thisdimension.

Function versions:AnyFloat FName(AnyFloat Arg)AnyInt FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyInt FName(AnyInt Arg)

AnyFunVecMinType: HiddenBase Class: AnyFunVecOpr (see p. 101)

Description:The minimum of all elements in a vector.

The function applies to matrices and strutures of higher dimensionalities as well. In such cases,the function processes all vectors of the first dimension and returns a similar structure without thisdimension.

Page 118: Any Script Ref Manual

105

Function versions:AnyFloat FName(AnyFloat Arg)AnyInt FName(AnyInt Arg)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction IntFunction AnyInt FName(AnyInt Arg)

AnyFunVecVNormType: HiddenBase Class: AnyFunVecOpr (see p. 101)

Description:The norm of a vector.

The function applies to matrices and strutures of higher dimensionalities as well. In such cases,the function processes all vectors of the first dimension and returns a similar structure without thisdimension.

By default the second norm is taken, but the (optional) second argument can provide any power ofthe norm taken. The second argument must be a scalar quantity.

Function versions:AnyFloat FName(AnyFloat Arg)AnyFloat FName(AnyInt Arg)AnyFloat FName(AnyFloat Arg1, AnyVar Arg2)AnyFloat FName(AnyFloat Arg1, AnyIntVar Arg2)AnyFloat FName(AnyInt Arg1, AnyVar Arg2)AnyFloat FName(AnyInt Arg1, AnyIntVar Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction Norm2FloatFunction AnyFloat FName(AnyFloat Arg)AnyMonoFunction Norm2IntFunction AnyFloat FName(AnyInt Arg)

Page 119: Any Script Ref Manual

106

AnyMonoFunction NormFloatFloat-Function

AnyFloat FName(AnyFloat Arg1, AnyVarArg2)

AnyMonoFunction NormFloatInt-Function

AnyFloat FName(AnyFloat Arg1, AnyIntVarArg2)

AnyMonoFunction NormIntFloat-Function

AnyFloat FName(AnyInt Arg1, AnyVar Arg2)

AnyMonoFunction NormIntIntFunction AnyFloat FName(AnyInt Arg1, AnyIntVarArg2)

AnyFunConditionalType: AbstractBase Class: AnyFunction (see p. 69)

Description:Base class for a number of conditional functions.

AnyFunIfType: HiddenBase Class: AnyFunConditional (see p. 106)

Description:If-then-else function.

This class defines a function for making conditional statements in an expression. The function takesthree arguments. The first argument is the condition, where zero is equal to ’false’ and a nonzerovalue is ’true’. The second argument is the return value in case of a true condition and the thirdargument is the return value for false.

Function versions:AnyVar FName(AnyVar Condition, AnyVar Result1, AnyVar Result2)AnyIntVar FName(AnyVar Condition, AnyIntVar Result1, AnyIntVar Result2)AnyVar FName(AnyIntVar Condition, AnyVar Result1, AnyVar Result2)AnyIntVar FName(AnyIntVar Condition, AnyIntVar Result1, AnyIntVar Result2)AnyStringVar FName(AnyVar Condition, AnyStringVar Result1, AnyStringVar Result2)AnyStringVar FName(AnyIntVar Condition, AnyStringVar Result1, AnyStringVar Result2)

Page 120: Any Script Ref Manual

107

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction VarVarFunction If-then-else function for scalar floating point

values. AnyVar FName(AnyVar Condition,AnyVar Result1, AnyVar Result2)

AnyMonoFunction VarIntVarFunction If-then-else function with scalar floatingpoint condition and scalar integer returnvalue. AnyIntVar FName(AnyVar Condition,AnyIntVar Result1, AnyIntVar Result2)

AnyMonoFunction IntVarVarFunction If-then-else function with scalar integer con-dition and scalar floating point return value.AnyVar FName(AnyIntVar Condition, AnyVarResult1, AnyVar Result2)

AnyMonoFunction IntVarIntVarFunction If-then-else function for scalar integer val-ues. AnyIntVar FName(AnyIntVar Condition,AnyIntVar Result1, AnyIntVar Result2)

AnyMonoFunction VarStringVarFunction If-then-else function with scalar floating pointcondition and singleton string return. Any-StringVar FName(AnyVar Condition, Any-StringVar Result1, AnyStringVar Result2)

AnyMonoFunction IntVarStringVar-Function

If-then-else function with scalar integer con-dition and singleton string return. AnyString-Var FName(AnyIntVar Condition, AnyString-Var Result1, AnyStringVar Result2)

AnyFunEqType: HiddenBase Class: AnyFunConditional (see p. 106)

Description:Equality testing function.

This function takes take two arguments returning ’true’ if they have the same value and ’false’ ifthey have different values. In fact, this is an equality operator implemented as a function.

Function versions:AnyIntVar FName(AnyVar Arg1, AnyVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyVar Arg2)AnyIntVar FName(AnyStringVar Arg1, AnyStringVar Arg2)

Page 121: Any Script Ref Manual

108

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction VarVarFunction Function for two scalar floating point val-

ues. AnyIntVar FName(AnyVar Arg1, AnyVarArg2)

AnyMonoFunction IntVarIntVarFunction Function for two scalar integer point values.AnyIntVar FName(AnyIntVar Arg1, AnyIntVarArg2)

AnyMonoFunction VarIntVarFunction Function for integer and floating point values.AnyIntVar FName(AnyVar Arg1, AnyIntVarArg2)

AnyMonoFunction IntVarVarFunction Function for floating point and integer values.AnyIntVar FName(AnyIntVar Arg1, AnyVarArg2)

AnyMonoFunction StringVarStringVar-Function

Function for string values. AnyIntVarFName(AnyStringVar Arg1, AnyStringVarArg2)

AnyFunLessThanType: HiddenBase Class: AnyFunConditional (see p. 106)

Description:Less-than testing function.

This function takes take two arguments returning ’true’ if the first is smaller than the second, andotherwise ’false’. In fact, this is a ’<’ operator implemented as a function.

Function versions:AnyIntVar FName(AnyVar Arg1, AnyVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyVar Arg2)

Object Members:

Page 122: Any Script Ref Manual

109

Denied-Access MembersClass Name DescriptionAnyMonoFunction VarVarFunction Function for two scalar floating point val-

ues. AnyIntVar FName(AnyVar Arg1, AnyVarArg2)

AnyMonoFunction IntVarIntVarFunction Function for two scalar integer point values.AnyIntVar FName(AnyIntVar Arg1, AnyIntVarArg2)

AnyMonoFunction VarIntVarFunction Function for integer and floating point values.AnyIntVar FName(AnyVar Arg1, AnyIntVarArg2)

AnyMonoFunction IntVarVarFunction Function for floating point and integer values.AnyIntVar FName(AnyIntVar Arg1, AnyVarArg2)

AnyFunLessThanEqType: HiddenBase Class: AnyFunConditional (see p. 106)

Description:Less-than-or-equal-to testing function.

This function takes take two arguments returning ’true’ if the first is smaller than or equal to thesecond, and otherwise ’false’. In fact, this is a ’<=’ operator implemented as a function.

Function versions:AnyIntVar FName(AnyVar Arg1, AnyVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyVar Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction VarVarFunction Function for two scalar floating point val-

ues. AnyIntVar FName(AnyVar Arg1, AnyVarArg2)

AnyMonoFunction IntVarIntVarFunction Function for two scalar integer point values.AnyIntVar FName(AnyIntVar Arg1, AnyIntVarArg2)

Page 123: Any Script Ref Manual

110

AnyMonoFunction VarIntVarFunction Function for integer and floating point values.AnyIntVar FName(AnyVar Arg1, AnyIntVarArg2)

AnyMonoFunction IntVarVarFunction Function for floating point and integer values.AnyIntVar FName(AnyIntVar Arg1, AnyVarArg2)

AnyFunGreaterThanType: HiddenBase Class: AnyFunConditional (see p. 106)

Description:Greater-than testing function.

This function takes take two arguments returning ’true’ if the first is greater than the second, andotherwise ’false’. In fact, this is a ’>’ operator implemented as a function.

Function versions:AnyIntVar FName(AnyVar Arg1, AnyVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyVar Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction VarVarFunction Function for two scalar floating point val-

ues. AnyIntVar FName(AnyVar Arg1, AnyVarArg2)

AnyMonoFunction IntVarIntVarFunction Function for two scalar integer point values.AnyIntVar FName(AnyIntVar Arg1, AnyIntVarArg2)

AnyMonoFunction VarIntVarFunction Function for integer and floating point values.AnyIntVar FName(AnyVar Arg1, AnyIntVarArg2)

AnyMonoFunction IntVarVarFunction Function for floating point and integer values.AnyIntVar FName(AnyIntVar Arg1, AnyVarArg2)

Page 124: Any Script Ref Manual

111

AnyFunGreaterThanEqType: HiddenBase Class: AnyFunConditional (see p. 106)

Description:Greater-than-or-equal-to testing function.

This function takes take two arguments returning ’true’ if the first is greater than or equal to thesecond, and otherwise ’false’. In fact, this is a ’>=’ operator implemented as a function.

Function versions:AnyIntVar FName(AnyVar Arg1, AnyVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyVar Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction VarVarFunction Function for two scalar floating point val-

ues. AnyIntVar FName(AnyVar Arg1, AnyVarArg2)

AnyMonoFunction IntVarIntVarFunction Function for two scalar integer point values.AnyIntVar FName(AnyIntVar Arg1, AnyIntVarArg2)

AnyMonoFunction VarIntVarFunction Function for integer and floating point values.AnyIntVar FName(AnyVar Arg1, AnyIntVarArg2)

AnyMonoFunction IntVarVarFunction Function for floating point and integer values.AnyIntVar FName(AnyIntVar Arg1, AnyVarArg2)

AnyFunAndType: HiddenBase Class: AnyFunConditional (see p. 106)

Description:Boolean ’and’ function.

Page 125: Any Script Ref Manual

112

This function takes take two arguments returning ’true’ if both are non-zero, and otherwise ’false’.In fact, this is a boolean ’and’ operator implemented as a function.

Function versions:AnyIntVar FName(AnyVar Arg1, AnyVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyVar Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction VarVarFunction Function for two scalar floating point val-

ues. AnyIntVar FName(AnyVar Arg1, AnyVarArg2)

AnyMonoFunction IntVarIntVarFunction Function for two scalar integer point values.AnyIntVar FName(AnyIntVar Arg1, AnyIntVarArg2)

AnyMonoFunction VarIntVarFunction Function for integer and floating point values.AnyIntVar FName(AnyVar Arg1, AnyIntVarArg2)

AnyMonoFunction IntVarVarFunction Function for floating point and integer values.AnyIntVar FName(AnyIntVar Arg1, AnyVarArg2)

AnyFunOrType: HiddenBase Class: AnyFunConditional (see p. 106)

Description:Boolean ’or’ function.

This function takes take two arguments returning ’true’ if one of them non-zero, and otherwise’false’. In fact, this is a boolean ’or’ operator implemented as a function.

Function versions:AnyIntVar FName(AnyVar Arg1, AnyVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyVar Arg1, AnyIntVar Arg2)AnyIntVar FName(AnyIntVar Arg1, AnyVar Arg2)

Page 126: Any Script Ref Manual

113

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction VarVarFunction Function for two scalar floating point val-

ues. AnyIntVar FName(AnyVar Arg1, AnyVarArg2)

AnyMonoFunction IntVarIntVarFunction Function for two scalar integer point values.AnyIntVar FName(AnyIntVar Arg1, AnyIntVarArg2)

AnyMonoFunction VarIntVarFunction Function for integer and floating point values.AnyIntVar FName(AnyVar Arg1, AnyIntVarArg2)

AnyMonoFunction IntVarVarFunction Function for floating point and integer values.AnyIntVar FName(AnyIntVar Arg1, AnyVarArg2)

AnyFunInitType: AbstractBase Class: AnyFunction (see p. 69)

Description:Base class for a number of functions that creates value and initializes values in expressions.

AnyFunIntArrayType: HiddenBase Class: AnyFunInit (see p. 113)

Description:Function for making integer arrays.

The function take two or three integer arguments. The first and last argument are the value of thefirst and the last element in the resulting array, respectively. If three arguments are given, the secondis the step value between two neighboring elements in the array; default step size is 1.

Function versions:AnyIntArray FName(AnyIntVar StartVal, AnyIntVar EndVal)AnyIntArray FName(AnyIntVar StartVal, AnyIntVar StepVal, AnyIntVar EndVal)

Page 127: Any Script Ref Manual

114

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction Function1 AnyIntArray FName(AnyIntVar StartVal,

AnyIntVar EndVal)AnyMonoFunction Function2 AnyIntArray FName(AnyIntVar StartVal,

AnyIntVar StepVal, AnyIntVar EndVal)

AnyFunArrayCatType: HiddenBase Class: AnyFunInit (see p. 113)

Description:Function for appending two arrays.

The arrays can be data structures of more higher dimensioanlity than one such as matrices or higherorder tensors. For instance a matrix is then interpretated as an array of rows. This follows thestandard AnyScript interpretation of data structures.

Function versions:AnyFloat FName(AnyFloat Arg1, AnyFloat Arg2)AnyInt FName(AnyInt Arg1, AnyInt Arg2)AnyString FName(AnyString Arg1, AnyString Arg2)AnyFile FName(AnyFile Arg1, AnyFile Arg2)AnyEnum FName(AnyEnum Arg1, AnyEnum Arg2)

Object Members:Denied-Access Members

Class Name DescriptionAnyMonoFunction FloatFunction AnyFloat FName(AnyFloat Arg1, AnyFloat

Arg2)AnyMonoFunction IntFunction AnyInt FName(AnyInt Arg1, AnyInt Arg2)AnyMonoFunction StringFunction AnyString FName(AnyString Arg1, AnyString

Arg2)AnyMonoFunction FileFunction AnyFile FName(AnyFile Arg1, AnyFile Arg2)AnyMonoFunction EnumFunction AnyEnum FName(AnyEnum Arg1, AnyEnum

Arg2)

Page 128: Any Script Ref Manual

115

AnyMonoFunctionType: HiddenBase Class: AnyFolder (see p. 24)

Description:This is the base class for function definitions. Classes derived from this are used to defined a func-tions return type, argument list, and the function body. Multiple such (monomorfic) function can beassembled in one AnyFunction, which them becomes a polymorfic function (i.e., one function withmultiple definitions).

Object Members:Denied-Access Members

Class Name DescriptionAnyFunctionArgList ArgList A special folder containing the argument list of

the function.

Page 129: Any Script Ref Manual

Chapter 4

Mechanical Objects

This chapter contains the descriptions for mechanical elements that are all derived from the classAnyMechObject. The following sections contain the class tree.

116

Page 130: Any Script Ref Manual

117

AnyMechObjectType: AbstractBase Class: Any3DObject (see p. 25)

Description:This is the abstract base class from which all mechanical components should be derived.

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)

Page 131: Any Script Ref Manual

118

AnySurfaceType: AbstractBase Class: AnyMechObject (see p. 117)

Description:This is a base class for geometrical (mechanically rigid) surfaces. A surface must be declared insidea reference frame in order to position it in space. This reference can indeed be a moving referenceframe such as a segment or a node attached to a segment.

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)

Page 132: Any Script Ref Manual

119

AnySurfSTLType: CreatableBase Class: AnySurface (see p. 118)

Description:This class contains the description of a geometrical surface based on triangle discretization.

The input is files of either standard STL or AnyBodyTM’s own ANYSURF format. Actually, theANYSURF format is always used, so if an STL file is supplied, a new ANYSURF file is automat-ically created and updated when the STL file is changed. Providing the filename without extensionmakes the system assume the ".stl" extension; however, if the file is specified with the ".anysurf"extension then any STL file is ignored, i.e., the ANYSURF file is not updated automatically.

The surface can be transformed during loading. This is done with a 3D transformation (class Any-FunTransform3D). You can enter a single transformation function, either by declaration or by ref-erence, in an AnySurfSTL object. Using the derived class AnyFunTransform3DLin function lineartransformations including translations and rotations can be employed.

Object Members:Expected Members

Class Number DescriptionAnyFunTransform3D [0..1] Scaling function that transforms the surface

during loading.

Obligatory-Initialization MembersClass Name DescriptionAnySurfFile FileName The STL or ANYSURF file name, incl. proper

extension.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 133: Any Script Ref Manual

120

AnyParamSurfType: AbstractBase Class: AnySurface (see p. 118)

Description:This is a base class for parameterized surfaces.

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)

Page 134: Any Script Ref Manual

121

AnyParamSurfAnalyticalType: AbstractBase Class: AnyParamSurf (see p. 120)

Description:This is a base class for parameterized surfaces, which are using analytical instead of numericalmethods. This leads typically to increased efficiency and robustness when used in the kinematicalanalysis or the like.

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)

Page 135: Any Script Ref Manual

122

AnySurfEllipsoidType: CreatableBase Class: AnyParamSurfAnalytical (see p. 121)

Description:This class contains a parameterized ellipsoid surface. It uses normalized longitude and latitude asparameters and the poles are located on the z axis.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVec3 Radius Radius is a vector with three components defin-

ing extension of the ellipsoid along the threeaxes of the reference frame.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 136: Any Script Ref Manual

123

AnySurfSphereType: CreatableBase Class: AnyParamSurfAnalytical (see p. 121)

Description:This class contains a parameterized sphere surface. It uses normalized longitude and latitude asparameters and the poles are located on the z axis.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar Radius Radius of the sphere.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 137: Any Script Ref Manual

124

AnySurfCylinderType: CreatableBase Class: AnyParamSurfAnalytical (see p. 121)

Description:This class contains a parameterized cylinder surface. The cylinder endpoint is located at the originof the reference frame and it stretches a specified length along Z axis.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar Radius Radius of the cylinder.AnyVar Length Length of the cylinder.

Optional-Initialization MembersClass Name DescriptionAnyVar CapRatio Ration between the height of ellipsoidal caps on

the ends and the radius. (=0.1)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 138: Any Script Ref Manual

125

AnyRefFrameType: AbstractBase Class: AnyMechObject (see p. 117)

Description:This is an abstract class that defines 3-D reference frames.

It is the base class for other important classes in the mechanical system modeling, such classesrepresenting segments, grounding frames, and nodes on segments for attachment of other elements.

Notice that AnyRefFrame and derived classes use rotational transformation matices. These aredefined as orthogonal three by three matrices containing the direction cosines of the frame’s basisvectors. In other words, the three columns of the rotational transformation matrix are the threebasis vectors of the frame. Denoting a Rotational Transformation matrix A, we can write thismathematically as

A = [i j k] =

cos(X, x) cos(X, y) cos(X, z)cos(Y, x) cos(Y, y) cos(Y, z)cos(Z, x) cos(Z, y) cos(Z, z)

(4.1)

where X, Y, and Z denote global axes, x, y, and z denote the axes of the AnyRefFrame system, thelocal frame, and i, j, and k are the basis vectors in global coordinates.

The rotational transformation matrix can be used to transform components of a vector specified inlocal coordinates, i.e., coordinates associated with the axes of an AnyRefFrame, to global coordi-nates. This is done as

v = A vl (4.2)

where v is a vector containing the global coordinates and vl is the vector with the local coordinates.

Notice that AnyBody stores all vectors in row format, so they must be transposed before the trans-formation and the expression must be turned around. In AnyScript syntax this looks like

GlobalVector = (Axes * LocalVector’)’;

or

GlobalVector = LocalVector * Axes’;

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)

Page 139: Any Script Ref Manual

126

AnyFixedRefFrameType: CreatableBase Class: AnyRefFrame (see p. 125)

Description:A fixed reference frame, which for instance can be used for modeling "ground" of a mechanicalsystem.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVec3 Origin Position vector of the origin. (={0, 0, 0})AnyMat33 Axes Rotational transformation matrix (see class

AnyRefFrame for a mathematical definition).(={{1, 0, 0}, {0, 1, 0}, {0, 0, 1}})

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 140: Any Script Ref Manual

127

AnyPositionedRefFrameType: AbstractBase Class: AnyRefFrame (see p. 125)

Description:This is the abstract base class for moving reference frames. It supplies the translation as output,given in the vector r.

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)AnyVec3 r Position vector of the origin. (={0, 0, 0})AnyVec3 rDot The velocity vector. (={0, 0, 0})AnyVec3 rDDot The acceleration vector. (={0, 0, 0})

Page 141: Any Script Ref Manual

128

AnyRefNodeType: CreatableBase Class: AnyPositionedRefFrame (see p. 127)

Description:The reference node is a reference frame rigidly attached to another one. Thus, its position andorientation are specified relatively to its owner. The node’s angular velocity and acceleration are thesame as the owner’s (global representations).

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVec3 sRel Relative position vector. (={0, 0, 0})AnyMat33 ARel Relative rotational transformation matrix (see

class AnyRefFrame for a mathematical defini-tion). (={{1, 0, 0}, {0, 1, 0}, {0, 0, 1}})

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVec3 r Position vector of the origin. (={0, 0, 0})AnyVec3 rDot The velocity vector. (={0, 0, 0})AnyVec3 rDDot The acceleration vector. (={0, 0, 0})AnyMat33 Axes Rotational transformation matrix (see class

AnyRefFrame for a mathematical definition).(={{0, 0, 0}, {0, 0, 0}, {0, 0, 0}})

Page 142: Any Script Ref Manual

129

AnyMovingRefFrameType: AbstractBase Class: AnyPositionedRefFrame (see p. 127)

Description:This is the abstract base class for generally moving reference frames. It is derived from Any-PositionedRefFrame and in addition to this, it also supplies the orientation and rotation of the axes.

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)AnyVec3 r Position vector of the origin. (={0, 0, 0})AnyVec3 rDot The velocity vector. (={0, 0, 0})AnyVec3 rDDot The acceleration vector. (={0, 0, 0})AnyMat33 Axes Rotational transformation matrix (see class

AnyRefFrame for a mathematical definition).(={{1, 0, 0}, {0, 1, 0}, {0, 0, 1}})

AnyVec3 omega Angular velocity vector (global representation).(={0, 0, 0})

AnyVec3 omegaDot Angular acceleration vector. (={0, 0, 0})

Page 143: Any Script Ref Manual

130

AnySegType: CreatableBase Class: AnyMovingRefFrame (see p. 129)

Description:This class represents a rigid body in the mechanical model. This also referred to as a segment.

The segment has a local (body-fixed) coordinate system and all local parameters are in principlerelated to this. The postion and orientation of the local coordinate frame are described by parametersin the class. Moreover, local properties, such as inertia properties, are referring to this system (ifnothing else is stated).

The segments can be equipped with nodes, i.e., rigidly attached points, that can be used to connectthe segment to other mechnical elements. This is done by adding member objects of the classAnyRefNode. The local properties of such members also refer to the local system of the segment.

By default the local system is assumed to be located at the center of mass (CoM) of the segmentsand its axes are directed along the principal axes of inertia. This is the case when entering mass datain the members Mass and Jii, the latter being the principal moments of inertia, i.e., the diagonalelements of the inertia matrix.

If these assumptions do not hold for your available input values you can specify a new location ofthe CoM by sCoM and off-diagonal elements of the inertia matrix in Jij. These entries will alsorefer to the local segment coordinate system. This means that by default the moments of inertia inJii and Jij must be calculated about the segment’s coordinate axes and must therefore include thecontributions arising from an eventual non-zero CoM position. However, by means of the switchJaboutCoMOnOff this default behavior can be changed so that Jii and Jij refer to axes with CoMas their origin. This implies that the translational contribution due to CoM are calculated by thesystem in this case. It must be emphasized that these axes are still aligned with the segment’smain coordinate system. The Jmatrix member is an output variable (3 by 3 matrix) containing theresulting inertia matrix about the segment coordinate system. This shows result of the calculationdone by the system.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar Mass The total mass of the segment.AnyVec3 Jii Principal moments of inertia in a vector

{Ixx,Iyy,Izz}.

Optional-Initialization MembersClass Name DescriptionAnyVec3 r0 Initial position. (={0, 0, 0})AnyVec3 rDot0 Initial velocity. (={0, 0, 0})

Page 144: Any Script Ref Manual

131

AnyMat33 Axes0 Initial orientation as rotational transformationmatrix (see class AnyRefFrame for a mathemat-ical definition). (={{1, 0, 0}, {0, 1, 0}, {0, 0,1}})

AnyVec3 omega0 Initial angular velocity.(={0, 0, 0})

AnyVec3 Jij Deviation moments of inertia {Ixy,Iyz,Ixz}.(={0, 0, 0})

AnyVec3 sCoM Relative location of the center of mass (CoM).(={0, 0, 0})

AnySwitchVar JaboutCoMOnOff Switch for whether the inputted moments of in-ertia in Jii and Jij are related to the segment co-ordinate system (Off) or a parallel system lo-cated at the CoM (On). (=Off, Options: Off |On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVec3 r Position vector of the origin. (={0, 0, 0})AnyVec3 rDot The velocity vector. (={0, 0, 0})AnyVec3 rDDot The acceleration vector. (={0, 0, 0})AnyMat33 Axes Rotational transformation matrix (see class

AnyRefFrame for a mathematical definition).(={{1, 0, 0}, {0, 1, 0}, {0, 0, 1}})

AnyVec3 omega Angular velocity vector (global representation).(={0, 0, 0})

AnyVec3 omegaDot Angular acceleration vector. (={0, 0, 0})AnyMat33 Jmatrix The actual inertia matrix referring the body-

fixed segment coordinate system. (={{0, 0, 0},{0, 0, 0}, {0, 0, 0}})

Page 145: Any Script Ref Manual

132

AnyForceMeasureType: AbstractBase Class: AnyMechObject (see p. 117)

Description:This class is the (abstract) base class for a branch of classes that are aimed at retrieving meaningfuland practical output about the loads and reaction forces in the mechanical model.

The forces that we apply to the model are either applied loads (AnyForce or derived classes) orreaction forces (AnyReacForce or derived). These are all generalized forces in the sense that theycan be associated with any kinematic measure and the actual effect of the force is determined by theprinciple of virtual work. This definition is the foundation for AnyForceBase, i.e., the base class forall forces.

These general force definitions can be hard to understand, except for certain simple cases, andtherefore, it is the idea to provide some general tools for converting these forces into more usefulquantities. The convertion is the role of AnyForceMeasure (and derived classes) shall play. How-ever, beware that AnyForceMeasure only "measures" the forces; it does not affects the dynamics ofthe model in any way.

Future releases:It is possible to provide several derived classes with special "measurement" functionality infuture versions, but at this stage we only provide a single one for retrieving equivalent pointforces and moments vectors. Please let us know if you have ideas for other convenient forcemeasures.

Object Members:Expected Members

Class Number DescriptionAnyForceBase [1..Inf] The generalized forces that will added in this

object.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 146: Any Script Ref Manual

133

AnyForceMomentMeasureType: CreatableBase Class: AnyForceMeasure (see p. 132)

Description:This particular class "measures" forces as an equivalent point force and moment, i.e., geometricalvector quantities. The effect of all forces specified inside an instance of this class will be summedup automatically to a single force and moment vector.

You specify the point of interest by a reference frame (i.e. AnyRefFrame or derived). Only forcesthat are applied directly to this reference frame will be included. This can be practical since youcan insert forces in the measurement if you are in doubt about their precise application points andinvestigate their effect.

This functionality comes from the fact that the summation is done by means of the principle of vir-tual work using virtual displacements of the reference frame of interest. The rest of the mechanicalsystem is not moved by this displacement, which then may violate kinematic constraints in joints,etc.. Therefore, forces transmitted by the joints are neglected, unless the joint is attached to thepoint of interest.

Notice that this does not allow you to investigate the effects of a given force at a point of interest faraway from the application point, but you can investigate the reaction forces that arise due to all ofthe applied loads.

Object Members:Expected Members

Class Number DescriptionAnyForceBase [1..Inf] The generalized forces that will added in this

object.AnyRefFrame [1] The reference frame that defines the point of in-

terest and thereby the output.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVec3 F Equivalent point force vector in global coordi-

nates. (={0, 0, 0})AnyVec3 M Equivalent point moment/torque vector in

global coordinates. (={0, 0, 0})

Page 147: Any Script Ref Manual

134

AnyForceMomentMeasure2Type: CreatableBase Class: AnyForceMomentMeasure (see p. 133)

Description:As its parent class, AnyForceMomentMeasure, this force-measure class "measures" forces as anequivalent point force and moment, i.e., geometrical vector quantities. However, the way the forcecontributions are assembled are significantly different.

As in the parent class as point of interest is specified as the first AnyRefFrame member. The equiva-lent force and moment refers to the position of origin of this reference at any given time. The equiv-alent force and moment are assembled of contribution from all the force (AnyForceBase) membersin the objects, however in contrast to the AnyForceMomentMeasure, contributions do not dependwhether the force is actually applied to the "point-of-interest". In AnyForceMomentMeasure2, con-tributions from a given force depend on whether it is applied to one (or more) of the segments(AnySeg) specified for the force measure. All AnySeg members in the AnyForceMomentMeasure2object are part of system

This functionality of AnyForceMomentMeasure2 can be interpreted a bit like a free-body diagram:Your system is the segments you have specified in the AnyForceMomentMeasure2 object. Theforces, you have included, are the ones that have your current attention, and the ouput is the totalequivalent force and moment (with reperence to a specific point).

Notice that including all forces on a segment or a system of segments should ideally give zeroequivalent force and moment due to equilibrium, but this must indeed include all forces includingreactions, forces of gravity, and inertia forces.

Notice also that an AnySeg objects are also an AnyRefFrame, so if you have an AnySeg objectbefore the AnyRefFrame you intended to be your point-of-interst it will fail to work as you intended.The AnySeg object will be taken as point-of-interest, i.e., the the origin of segment’s body-fixedframe.

Object Members:Expected Members

Class Number DescriptionAnyForceBase [0..Inf] The generalized forces that will added in this

object.AnyRefFrame [1..Inf] The reference frame that defines the point of in-

terest and thereby the output.AnySeg [1..Inf] Segments that defines the mechanical sub-

system for which the force contributions are as-sembled.

Optional-Initialization MembersClass Name Description

Page 148: Any Script Ref Manual

135

AnySwitchVar IncludeGravity When set to ’On’, gravitational forces on thesegments are included in the summation offorces. (=Off, Options: Off | On)

AnySwitchVar IncludeInertiaForces When set to ’On’, inertia forces on the segmentsare included in the summation of forces. (=Off,Options: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVec3 F Equivalent point force vector in global coordi-

nates. (={0, 0, 0})AnyVec3 M Equivalent point moment/torque vector in

global coordinates. (={0, 0, 0})

Page 149: Any Script Ref Manual

136

AnyMuscleModelType: CreatableBase Class: AnyMechObject (see p. 117)

Description:This class is the base class for all muscle models, i.e., the constitutive model of a muscle. A musclemodel object provides the muscle objects with information about the muscle strength, passive forces,and the assumed relationship between passive and active forces.

AnyMuscleModel is not an abstract base class. It contains the simplest possible model havingconstant strength and no passive element properties.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar F0 The nominal strength, i.e., the maximal isomet-

ric muscle force.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 150: Any Script Ref Manual

137

AnyMuscleModel3EType: CreatableBase Class: AnyMuscleModel (see p. 136)

Description:This class contains a three element, Hill-type muscle model. It comprises a contractile element (theactive muscle fibers), a non-linear serial elastic element (the tendon) and a non-linear parallel elasticelement (the passive part of the fibers). The contractile element is characterized by the force-lengthand the force-velocity relationship.

Future releases:More details will follow in a future version of the text, including references for further infor-mation.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar F0 The nominal strength, i.e., the maximal isomet-

ric muscle force.AnyVar Lfbar Nominal fiber length.AnyVar Gammabar Nominal pennation angle.AnyVar Epsilonbar Nominal tendon strain, i.e., the strain at the iso-

metric muscle force in the serial elastic element.

AnyVar Lt0 Nominal tendon length.AnyVar Fcfast Relative amount of fast fibers (0<=Fcfast<=1).

Optional-Initialization MembersClass Name DescriptionAnyVar Jt Shape constant for the tendon (serial elastic) el-

ement force relationsship. (=3)AnyVar Jpe Shape constant for the parallel elastic element

force relationsship. (=3)AnyVar K1 Normalized maximum contraction velocity. V0

is basically K1 times Lfbar (for K2=0). (=2)AnyVar K2 Constribution to normalized maximum velocity

for fast fibers. K2 adds to V0’s component fromK1; K2’s contribution is K2 times Lfbar timesFcfast. (=8)

Page 151: Any Script Ref Manual

138

AnyVar PEFactor Relative stiffness parameter for the parallelelastic element. PEFactor times Lfbaris thefiber lenght at which the parallel elastic ele-ments produce a force of F0. (=5)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 152: Any Script Ref Manual

139

AnyMuscleModel2ELinType: CreatableBase Class: AnyMuscleModel (see p. 136)

Description:This class contains a two element, Hill-type muscle model. The two elements are the contractileelement (the muscle fibers) and the serial elastic element (the tendon). The contractile element ismodeled by a bi-linear function, i.e., the force-length and the force-velocity relationships are linear.The elastic tendon force is also modeled by a linear relationsship.

Future releases:More details will follow in a future version of the text, including references for further infor-mation.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar F0 The nominal strength, i.e., the maximal isomet-

ric muscle force.AnyVar Lfbar Nominal fiber length.AnyVar Lt0 Nominal tendon length.AnyVar Epsilonbar Nominal tendon strain, i.e., the strain at the iso-

metric muscle force in the serial elastic element.

AnyVar V0 Maximum contraction velocity.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 153: Any Script Ref Manual

140

AnyMuscleModelUsr1Type: CreatableBase Class: AnyMuscleModel (see p. 136)

Description:This class gives the possibility to make simple user-defined muscle models. The strength of themuscle can be defined by an explicit expression. This expression is evaluated be used in the musclerecruitment analyses.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar F0 The nominal strength, i.e., the maximal isomet-

ric muscle force.AnyVar S Strength of the muscle. This must be initialized

with an explicit expression governing the mus-cle strength.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 154: Any Script Ref Manual

141

AnyKinMeasureBaseType: HiddenBase Class: AnyMechObject (see p. 117)

Description:This class is the abstract base class for all "kinematic measures" and "user classes" that directlyuse "kinematic measures". A "kinematic measure" measures some geometrical quantities based onAnyRefFrame-objects and occasionally on other object types. "User classes" use such geometricalinformation to define other related quantities, for instance forces that are applied to the model uisngthe principle of virtual work with the kinematics defined by "kinematic measure".

Real "kinematic measures" that actually hold some geometric information are derived from Any-KinMeasure, the most important child of AnyKinMeasaureBase. "User classes" that do not defineany kinematic measure themselves but merely use them are derived from AnyKinMeasureUsr, theother important child of AnyKinMeasureBase. Please study these derived classes for more detailedinformation about kinematic measures.

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)

Page 155: Any Script Ref Manual

142

AnyKinMeasureUsrType: AbstractBase Class: AnyKinMeasureBase (see p. 141)

Description:This class is an abstract base class for users of "kinematic measures". It uses the measures fromboth owner or members in the following order:

1. Members that are kinematic measures are assembled into one measure.

2. The owner, if it is a kinematic measure and none of the members are kinematic measures.

The assembly of kinematic measures happens in the order the member-measures are added into theAnyKinMeasureUsr object. For instance if a kinematic measure with 3 components and one with 4components are supplied in this order, the AnyKinMeasureUsr treats this as a single measure with7 components, the former 3 from the first measure and the latter 4 from second measure.

Notice that AnyKinMeasureUsr is not a measure in the sense that a measured quantity is providedas output; however, classes derived from this one can use the kinematic measures supplied to applyforces etc. to the mechanical system. An important derived class is AnyForceBase, which is theparent of AnyMuscle and other important classes.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 156: Any Script Ref Manual

143

AnyForceBaseType: AbstractBase Class: AnyKinMeasureUsr (see p. 142)

Description:This class is the base class for all forces. Forces are associated with a kinematic measure, so theymust be considered as generalized forces in the sense that they can have different units. This alsoimplies that it is a vector quantity even if it contains only one components when appied to a scalarkinematic measure.

In general, the unit is Watts (W) divided by the velocity unit of the kinematic measure. This impliesthat a kinematic measure in meters (m), i.e. velocity in m/s, yield force in Newton (N), and akinematic measure in radians (rad), i.e. velocity in rad/s, yield force in Nm, i.e. moment.

This base class of all forces suplies two important vector quantities, Fin and Fout, which can be readas "input" and "output" from a given dynamics analysis applied from a mechanical study.

Fin is also what may be known as "applied loads" or "known loads", when considering as givenmechanical study and typically, Fin functions the direct contribution from the AnyForceBase objectto the right-hand side of the dynamics equilibrium equations. On contrast to this, Fout contains thetotal force calculated during the analysis.

Often AnyForceBase elements (i.e. derived classes) are either "applied/known" or "unknown" forcesin the analysis and for such force elements, either Fin or Fout will be zero.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

Page 157: Any Script Ref Manual

144

AnyAppliedForceType: AbstractBase Class: AnyForceBase (see p. 143)

Description:This class is the abstract base class for all applied forces, i.e., forces that are explicit functions ofthe model state (position and velocity) and time. It is a generalized force in the sense that it can beapplied to any kinematic measure or even an assembly of such.

Refer to the parent class AnyForceBase and its parent AnyKinMeasureUsr for further informationon how the force is defined (units) and how several kinematic measures are assembled.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

Page 158: Any Script Ref Manual

145

AnyMuscleType: AbstractBase Class: AnyAppliedForce (see p. 144)

Description:This class is the base class for all muscles. It is an abstract base class for all muscle classes, whichmeans that it actually contains most functionality for muscles but it has no definition of geometry.The geometrical information is supplied by "kinematic measures".

Derived classes typically contain predetermined kinematic information (kinematic measures) whichsimplifies the use in most cases.

Muscle objects can use a variety muscle models given by an AnyMuscleModel object. In general,muscle models describe the relationship between the contractile unit, the tendon unit, and the pas-sive elements of the muscle using in Hill-type models. It is used to estimate muscle strength andpassive forces. The muscle class contains output quantities that are related to the muscle models,however, not all of these quantities are estimated by all muscle models; typically simpler modelscannot estimate all quantities. In such cases it is sought to provide as meaningful values as possible(typically the default value shown in the tables below).

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [1] A kinematic measure that provide the geometric

description for the muscle path. It must onlymeasure a single geometric quantity.

AnyMuscleModel [1] A muscle model that defines the strength andpassive properties of this muscle.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

AnyVar Lmt Length of the muscle-tendon unit. (=0)AnyVar Lm Length of themuscle unit. This is not the fiber

length when the pennation angle is differentfrom zero. (=0)

Page 159: Any Script Ref Manual

146

AnyVar Lt Length of the tendon unit. (=0)AnyVar LmtDot Time-derivative of the muscle-tendon unit

length. (=0)AnyVar LmDot Time-derivative of the muscle unit length. (=0)AnyVar Activity Muscle activity, i.e., normalized muscle force.

(=0)AnyVar CorrectedActivity Corrected activity, which may be slightly dif-

ferent from Activity for muscle models that in-volve linearization. (=0)

AnyVar Fm Force in the muscle unit. Not projected ontothe fiber direction for pennation angles differentfrom zero. (=0)

AnyVar Ft Force in the tendon unit. (=0)AnyVar Fp Force in the parallel elastic element. Not pro-

jected onto the fiber direction for pennation an-gles different from zero. (=0)

AnyVar Strength Current muscle strength. (=0)AnyVar Ft0 Tendon force at zero activity. (=0)AnyVar Ft0Grad Tendon force gradient. with respect to the ac-

tivity (=0)AnyVar PennationAngle Pennation angle. (=0)AnyVar EPOTt Potential energy in the tendon. (=0)AnyVar EPOTp Potential energy in the parallel elastic element.

(=0)AnyVar EPOTmt Total potential energy in the muscle-tendon

unit. (=0)AnyVar Pt Power of the tendon unit on the segments,

Pt=Ft*LtDot. (=0)AnyVar Pm Power of the muscle unit on the segments,

Pm=Fm*LmDot. (=0)AnyVar Pmt Power of the muscle-tendon unit on the seg-

ments, Pmt=Fmt*LmtDot. (=0)AnyVar Pmet Metabolic power. (=0)

Page 160: Any Script Ref Manual

147

AnyGeneralMuscleType: CreatableBase Class: AnyMuscle (see p. 145)

Description:This muscle class is more general than other classes derived from AnyMuscle. The muscle doesnot work along a particular path given by a predefined kinematic measure but rather attaches toany kinematic measure. This means that AnyGeneralMuscle can provide moment as well as forcedepending on the nature of its kinematic measure. The kinematic measure is supplied by the user.For instance you can make a "rotational" muscle by applying a revolute joint as kinematic measurein your muscle object.

Additionally, you can in this class control the force direction. The muscle is still a unidirectionalelement, which can only provide force in one direction, but you decide which. This implies that youcan make muscles capable of pushing.

This general nature of the muscle definition in this class makes it suitable for advanced use, butalso somewhat more difficult to manage properly. The output quantities are inherited from the basicmuscle class, AnyMuscle, which assumes the muscle geometry to be a linear measure. Therefore,some of these quantities must be interpreted in this view to be meaningful for the more generalkinematics intrepretation of this derived class. For instance length quantities for this muscle must beinterpreted rather as magnitudes of position in the unit of the kinematic measure. Similarly, forcesmust be interpreted in a generalized sense, for instance as a moment if we deal with a rotationalkinematic measure. (Please refer to the concept of kinematic measures for details on the relationshipbeteeen force and position of kinematic measures in general.)

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [1] A kinematic measure that provide the geometric

description for the muscle path. It must onlymeasure a single geometric quantity.

AnyMuscleModel [1] A muscle model that defines the strength andpassive properties of this muscle.

Optional-Initialization MembersClass Name DescriptionAnyVar ForceDirection Direction of the force. (=-1)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 161: Any Script Ref Manual

148

AnyVector Fin The generalized force vector of input loads tothe given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

AnyVar Lmt Length of the muscle-tendon unit. (=0)AnyVar Lm Length of themuscle unit. This is not the fiber

length when the pennation angle is differentfrom zero. (=0)

AnyVar Lt Length of the tendon unit. (=0)AnyVar LmtDot Time-derivative of the muscle-tendon unit

length. (=0)AnyVar LmDot Time-derivative of the muscle unit length. (=0)AnyVar Activity Muscle activity, i.e., normalized muscle force.

(=0)AnyVar CorrectedActivity Corrected activity, which may be slightly dif-

ferent from Activity for muscle models that in-volve linearization. (=0)

AnyVar Fm Force in the muscle unit. Not projected ontothe fiber direction for pennation angles differentfrom zero. (=0)

AnyVar Ft Force in the tendon unit. (=0)AnyVar Fp Force in the parallel elastic element. Not pro-

jected onto the fiber direction for pennation an-gles different from zero. (=0)

AnyVar Strength Current muscle strength. (=0)AnyVar Ft0 Tendon force at zero activity. (=0)AnyVar Ft0Grad Tendon force gradient. with respect to the ac-

tivity (=0)AnyVar PennationAngle Pennation angle. (=0)AnyVar EPOTt Potential energy in the tendon. (=0)AnyVar EPOTp Potential energy in the parallel elastic element.

(=0)AnyVar EPOTmt Total potential energy in the muscle-tendon

unit. (=0)AnyVar Pt Power of the tendon unit on the segments,

Pt=Ft*LtDot. (=0)AnyVar Pm Power of the muscle unit on the segments,

Pm=Fm*LmDot. (=0)AnyVar Pmt Power of the muscle-tendon unit on the seg-

ments, Pmt=Fmt*LmtDot. (=0)AnyVar Pmet Metabolic power. (=0)

Page 162: Any Script Ref Manual

149

AnyViaPointMuscleType: CreatableBase Class: AnyMuscle (see p. 145)

Description:This is a specilization of the general muscle class, AnyMuscle, that connects two or more so-calledvia points. The via points are specified as reference frames put into the object as members.

Notice that this muscle’s kinematics assumes the muscle to be a string that can wrap over edges;however, it will also stick to such edges, when the normal forces become negative. More sophisti-cated wrapping is provided by the AnyShortestPathMuscle.

Object Members:Expected Members

Class Number DescriptionAnyMuscleModel [1] A muscle model that defines the strength and

passive properties of this muscle.AnyRefFrame [2..Inf] Reference frames that define the via-points.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

AnyVar Lmt Length of the muscle-tendon unit. (=0)AnyVar Lm Length of themuscle unit. This is not the fiber

length when the pennation angle is differentfrom zero. (=0)

AnyVar Lt Length of the tendon unit. (=0)AnyVar LmtDot Time-derivative of the muscle-tendon unit

length. (=0)AnyVar LmDot Time-derivative of the muscle unit length. (=0)AnyVar Activity Muscle activity, i.e., normalized muscle force.

(=0)AnyVar CorrectedActivity Corrected activity, which may be slightly dif-

ferent from Activity for muscle models that in-volve linearization. (=0)

Page 163: Any Script Ref Manual

150

AnyVar Fm Force in the muscle unit. Not projected ontothe fiber direction for pennation angles differentfrom zero. (=0)

AnyVar Ft Force in the tendon unit. (=0)AnyVar Fp Force in the parallel elastic element. Not pro-

jected onto the fiber direction for pennation an-gles different from zero. (=0)

AnyVar Strength Current muscle strength. (=0)AnyVar Ft0 Tendon force at zero activity. (=0)AnyVar Ft0Grad Tendon force gradient. with respect to the ac-

tivity (=0)AnyVar PennationAngle Pennation angle. (=0)AnyVar EPOTt Potential energy in the tendon. (=0)AnyVar EPOTp Potential energy in the parallel elastic element.

(=0)AnyVar EPOTmt Total potential energy in the muscle-tendon

unit. (=0)AnyVar Pt Power of the tendon unit on the segments,

Pt=Ft*LtDot. (=0)AnyVar Pm Power of the muscle unit on the segments,

Pm=Fm*LmDot. (=0)AnyVar Pmt Power of the muscle-tendon unit on the seg-

ments, Pmt=Fmt*LmtDot. (=0)AnyVar Pmet Metabolic power. (=0)AnyKinPLine Line Kinematic measure that defines the muscle ge-

ometry to being a piecewise straigth line be-tween the via points.

Page 164: Any Script Ref Manual

151

AnyShortestPathMuscleType: CreatableBase Class: AnyMuscle (see p. 145)

Description:This is a specialization of the general muscle class, AnyMuscle, the muscle finds the shortest pathbewteen two points, The shortest path may involve wrapping, i.e., finding the shortest path aroundobstacles. In addition, the muscle may have via-points that are rigidly fixed to segments, similarlyto the AnyViaPointMuscle.

The muscle class utilizes the kinematic measure AnyKinSPLine. The muscle path is by this class es-timated using a numerical solution of a contact problem of a string and the rigid surfaces. Improperdefinition of this contact problem can lead to numerical exceptions or inaccurate results. Thereforeplease study the class AnyKinSPLine for details.

Object Members:Expected Members

Class Number DescriptionAnyMuscleModel [1] A muscle model that defines the strength and

passive properties of this muscle.AnySurface [0..Inf] The surfaces that may be obstacles on the mus-

cle’s path.AnyRefFrame [2..Inf] Reference frames that define the fixed via-

points.

Obligatory-Initialization MembersClass Name DescriptionAnyVar SPLine.StringMesh Number of discretization points on each string

segment.

Optional-Initialization MembersClass Name DescriptionAnyMatrix SPLine.InitWrapPos-

VectorsAn array of 3-D vectors that specify the initialshape of the string. The vectors are ordered asrows of a matrix. For each line segment twovectors must be specified. They are definingtwo points relative to the line segment’s originand insertion nodes and the curve’s initial shapewill be three straight lines; from the origin tothe first point, then to the second, and finally tothe insertion point. (="No values given")

Page 165: Any Script Ref Manual

152

AnyVar SPLine.RelTol Relative tolerance that is used to determinewhether the solution is acceptable. The stringlength is used for normalization of the displace-ment. (=1e-008)

AnyVar SPLine.AugLagCoef Coefficient for penalty term in the AugmentedLagragian method. Increasing this value can insome cases remove problems of negative pivotsin the velocity analysis. (=1000)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

AnyVar Lmt Length of the muscle-tendon unit. (=0)AnyVar Lm Length of themuscle unit. This is not the fiber

length when the pennation angle is differentfrom zero. (=0)

AnyVar Lt Length of the tendon unit. (=0)AnyVar LmtDot Time-derivative of the muscle-tendon unit

length. (=0)AnyVar LmDot Time-derivative of the muscle unit length. (=0)AnyVar Activity Muscle activity, i.e., normalized muscle force.

(=0)AnyVar CorrectedActivity Corrected activity, which may be slightly dif-

ferent from Activity for muscle models that in-volve linearization. (=0)

AnyVar Fm Force in the muscle unit. Not projected ontothe fiber direction for pennation angles differentfrom zero. (=0)

AnyVar Ft Force in the tendon unit. (=0)AnyVar Fp Force in the parallel elastic element. Not pro-

jected onto the fiber direction for pennation an-gles different from zero. (=0)

AnyVar Strength Current muscle strength. (=0)AnyVar Ft0 Tendon force at zero activity. (=0)AnyVar Ft0Grad Tendon force gradient. with respect to the ac-

tivity (=0)AnyVar PennationAngle Pennation angle. (=0)AnyVar EPOTt Potential energy in the tendon. (=0)

Page 166: Any Script Ref Manual

153

AnyVar EPOTp Potential energy in the parallel elastic element.(=0)

AnyVar EPOTmt Total potential energy in the muscle-tendonunit. (=0)

AnyVar Pt Power of the tendon unit on the segments,Pt=Ft*LtDot. (=0)

AnyVar Pm Power of the muscle unit on the segments,Pm=Fm*LmDot. (=0)

AnyVar Pmt Power of the muscle-tendon unit on the seg-ments, Pmt=Fmt*LmtDot. (=0)

AnyVar Pmet Metabolic power. (=0)AnyKinSPLine SPLine Kinematic measure of the length of the muscle

tendon unit.

Page 167: Any Script Ref Manual

154

AnyShortestPathMuscle2Type: CreatableBase Class: AnyMuscle (see p. 145)

Description:This is a specialization of the general muscle class, AnyMuscle, the muscle finds the shortest pathbewteen two points, The shortest path may involve wrapping, i.e., finding the shortest path aroundobstacles. In addition, the muscle may have via-points that are rigidly fixed to segments, similarlyto the AnyViaPointMuscle.

The muscle class utilizes the kinematic measure AnyKinSPLine. The muscle path is by this class es-timated using a numerical solution of a contact problem of a string and the rigid surfaces. Improperdefinition of this contact problem can lead to numerical exceptions or inaccurate results. Thereforeplease study the class AnyKinSPLine for details.

Object Members:Expected Members

Class Number DescriptionAnyMuscleModel [1] A muscle model that defines the strength and

passive properties of this muscle.AnySurface [0..Inf] The surfaces that may be obstacles on the mus-

cle’s path.AnyRefFrame [2..Inf] Reference frames that define the fixed via-

points.

Obligatory-Initialization MembersClass Name DescriptionAnyVar SPLine.StringMesh Number of discretization points on each string

segment.

Optional-Initialization MembersClass Name DescriptionAnyIntVar SPLine.SolverType Solver type. (=2)AnyMatrix SPLine.InitWrapPos-

VectorsAn array of 3-D vectors that specify the initialshape of the string. The vectors are ordered asrows of a matrix. For each line segment twovectors must be specified. They are definingtwo points relative to the line segment’s originand insertion nodes and the curve’s initial shapewill be three straight lines; from the origin tothe first point, then to the second, and finally tothe insertion point. (="No values given")

Page 168: Any Script Ref Manual

155

AnyIntVar SPLine.MaxIter Maximum number of allowed iterations duringposition analysis of the contact problem. (=100)

AnyVar SPLine.RelTol Relative tolerance that is used to determinewhether the solution has converged. The stringlength is used for normalization of the displace-ment. (=1e-008)

AnyVar SPLine.AbsTol Absolute tolerance (in meters) that is used todetermine whether the solution has converged.(=0)

AnyVar SPLine.AugLagCoef Coefficient for penalty term in the AugmentedLagragian method. Increasing this value can insome cases remove problems of negative pivotsin the velocity analysis. (=1000)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

AnyVar Lmt Length of the muscle-tendon unit. (=0)AnyVar Lm Length of themuscle unit. This is not the fiber

length when the pennation angle is differentfrom zero. (=0)

AnyVar Lt Length of the tendon unit. (=0)AnyVar LmtDot Time-derivative of the muscle-tendon unit

length. (=0)AnyVar LmDot Time-derivative of the muscle unit length. (=0)AnyVar Activity Muscle activity, i.e., normalized muscle force.

(=0)AnyVar CorrectedActivity Corrected activity, which may be slightly dif-

ferent from Activity for muscle models that in-volve linearization. (=0)

AnyVar Fm Force in the muscle unit. Not projected ontothe fiber direction for pennation angles differentfrom zero. (=0)

AnyVar Ft Force in the tendon unit. (=0)AnyVar Fp Force in the parallel elastic element. Not pro-

jected onto the fiber direction for pennation an-gles different from zero. (=0)

AnyVar Strength Current muscle strength. (=0)

Page 169: Any Script Ref Manual

156

AnyVar Ft0 Tendon force at zero activity. (=0)AnyVar Ft0Grad Tendon force gradient. with respect to the ac-

tivity (=0)AnyVar PennationAngle Pennation angle. (=0)AnyVar EPOTt Potential energy in the tendon. (=0)AnyVar EPOTp Potential energy in the parallel elastic element.

(=0)AnyVar EPOTmt Total potential energy in the muscle-tendon

unit. (=0)AnyVar Pt Power of the tendon unit on the segments,

Pt=Ft*LtDot. (=0)AnyVar Pm Power of the muscle unit on the segments,

Pm=Fm*LmDot. (=0)AnyVar Pmt Power of the muscle-tendon unit on the seg-

ments, Pmt=Fmt*LmtDot. (=0)AnyVar Pmet Metabolic power. (=0)AnyKinSPLine2 SPLine Kinematic measure of the length of the muscle

tendon unit.

Page 170: Any Script Ref Manual

157

AnyLigamentType: AbstractBase Class: AnyAppliedForce (see p. 144)

Description:This class is the base class for all ligaments.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

AnyVar Pos Generalized position of the ligament, for in-stance the length when a string measure is used.(=0)

Page 171: Any Script Ref Manual

158

AnyViaPointLigamentType: CreatableBase Class: AnyLigament (see p. 157)

Description:This is a specilization of the general ligament class, AnyLigament, that connects two or more so-called via points. The via points are specified as reference frames put into the object as members.

Notice that this ligaments kinematics assumes the muscle to be a string that can wrap over edges,but it will also stick to such edges, so that the normal forces can become negative.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2..Inf] Reference frames that define the via-points.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

AnyVar Pos Generalized position of the ligament, for in-stance the length when a string measure is used.(=0)

AnyKinPLine Line Kinematic measure that defines the ligament ge-ometry to being a piecewise straigth line be-tween the via points.

Page 172: Any Script Ref Manual

159

AnyForceType: CreatableBase Class: AnyAppliedForce (see p. 144)

Description:This class function to create a generalized applied load. It is a generalized force in the sense thatit can be applied to any kinematic measure or even an assembly of such. Therefore, it is a vectorquantity The term "applied load" refers to that the force vector must be an explicit function of themodel state (position and velocity) and time.

Refer to the parent class AnyForceBase and its parent AnyKinMeasureUsr for further informationon how the force is defined (units) and how several kinematic measures are assembled.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Obligatory-Initialization MembersClass Name DescriptionAnyVector F Vector of generalized forces.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

Page 173: Any Script Ref Manual

160

AnyForce3DType: CreatableBase Class: AnyAppliedForce (see p. 144)

Description:A three-dimensional concentrated force (a vector). The force can be specified in both global andlocal coordinates but not simulataneously.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [1] The reference frame to which the force is ap-

plied.

Optional-Initialization MembersClass Name DescriptionAnyVec3 F Force vector in global coordinates. (={0, 0, 0})AnyVec3 Flocal Force vector in local coordinates (not computed

when a global force is specified). (={0, 0, 0})

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

Page 174: Any Script Ref Manual

161

AnyMoment3DType: CreatableBase Class: AnyAppliedForce (see p. 144)

Description:A three-dimensional moment applied to a reference frame. The moment can be specified in bothglobal and local coordinates but not simulataneously.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [1] The reference frame to which the moment is ap-

plied.

Optional-Initialization MembersClass Name DescriptionAnyVec3 M Moment vector in global coordinates. (not com-

puted when a local moment is specified). (={0,0, 0})

AnyVec3 Mlocal Moment vector in local coordinates (not com-puted when a global moment is specified).(={0, 0, 0})

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin The generalized force vector of input loads to

the given type of analysis, i.e., to the right-handside of the equations of motion.(="No values given")

AnyVector Fout The generalized force vector of outputs fromthe given type of analysis. This is the total forcein the element after the analysis is executed.(="No values given")

Page 175: Any Script Ref Manual

162

AnyReacForceType: CreatableBase Class: AnyForceBase (see p. 143)

Description:This class is the base class for all reaction forces, i.e., forces that are unknown and must be deter-mined by solving the equilibrium equations.

Reaction forces are typically connected with kinematic constraints and are created for each suchconstraint in the class AnyKinEq or derived classes. A reaction force can also be created withoutthe presence of kinematic constraints. In that case, the reaction is an unknown actuator force similarto the reaction forces for a kinematic driver. The components of a reaction force can be controlled,for instance made inactive (switched off), by settings of its Type member.

Notice that a reaction force is a vector quantity with as many components as the associated kinematicmeasure. It is also a vector in the data structure in cases where there are only one component inthe measure. This also makes Type a vector so that each component of the reaction force can becontrolled individually.

Future releases:In Version 1.x of AnyBodyTM, Type was a vector were values of ’0’ is ’Off’ and ’1’ is ’On’,respectively. This was merely due to historical reasons, and it has been changed an AnySwitchin version 2.0. Old-style type settings are accepted with a warning and it is recommended tochange these settings.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Optional-Initialization MembersClass Name DescriptionAnySwitch Type Type specification of the reaction forces. See

AnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Fin Input forces inherited from base class; zero vec-

tor for reaction forces. (="No values given")

Page 176: Any Script Ref Manual

163

AnyVector Fout The generalized reaction force, which is out-put from a mechanical analysis. (="No valuesgiven")

Page 177: Any Script Ref Manual

164

AnyKinMeasureType: AbstractBase Class: AnyKinMeasureBase (see p. 141)

Description:This class is the abstract base class for all real "kinematic measures". A "kinematic measure"measures some geometrical quantities based on reference, i.e., AnyRefFrame objects. The maindifference to AnyKinMeasureBase is that AnyKinMeasure supplies some output, such as the vectorsPos, Vel, and Acc that contain current values of the measured quantity, see description below.

Notice that the measure is a vector quantity also in cases where it has only one component.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [0..Inf] The reference frames that are input for the mea-

sure.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 178: Any Script Ref Manual

165

AnyKinMeasureRealType: AbstractBase Class: AnyKinMeasure (see p. 164)

Description:This class is the abstract base class for real "kinematic measures" with a basic mathematical defini-tion. These are the basic building blocks of the model kinematics. Other kinematic measures canbe composed from these by AnyKinMeasureOrg, which can assemble and reorganize measures.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [0..Inf] The reference frames that are input for the mea-

sure.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 179: Any Script Ref Manual

166

AnyKinLinearType: CreatableBase Class: AnyKinMeasureReal (see p. 165)

Description:This "kinematic measure" measures translation, i.e., a 3-D vector. It is either the position of onereference frame with respect to the global frame or the relative vector between two frames. Bydefault the measure output consists of the three global components of the vector, but by the Ref youmay specify another reference frame as basis for the vector output.

This measure is used in the standard joints as well as for describing external loads, such as pointloads. The measure can also be used for driving a motion of a point, by adding a kinematic driverto an AnyKinLinear object.

Equivalent forces:Forces can be applied to AnyKinLinear objects by AnyForce objects, and they come implicitly frommany other objects such kinematic constraints. The principle of virtual work tells us intuitively thatforces associated with an AnyKinLinear object must be a linear force, i.e., a 3-d vector, a point load.The kinematic measure is a vector from frame origin ’0’ to ’1’. This implies that the componentsof the generalized force (F in AnyForce) is equal to the force applied on frame ’1’ from frame ’0’.However, there are more loads associated with the generalized force.

A mechanical explanation of these loads can be given by considering the AnyForce applied to theAnyKinLinear as rigid bar from frame ’0’ to frame ’1’. In order to control the force on frame ’1’, therotation of the bar must be controlled by some (virtual) rotational actuators; indeed these will applymoment reactions on some part in the system. From the principle of virtual work it follows that thispart is the reference frame that is the basis of the measure. Notice that this frame by default is theglobal frame; in other words there could be transfered a torque to the global frame in this case, orone of frame ’0’ or ’1’ if local components of one of these frames are used to measure the positionvector of the AnyKinLinear. This issue is known to cause some confusion about the force appliedto an AnyKinLinear object; however, this mechanism also makes sure that over all equilibrium isensured.

Future releases:In the current version of AnyBodyTM, AnyKinLinear only supplies the typical Cartesian vectordescription. However, it is feasible to extend its capabilities to comprise other coordinatetypes, such as cylindrical and spherical coordinates. This will be considered depending on theuser demand for such facilities. Please let us know if you find any such extensions valuable.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [1..2] The reference frames that define the vector.

Page 180: Any Script Ref Manual

167

Optional-Initialization MembersClass Name DescriptionAnyVar Ref Integer numbers that specify the reference sys-

tem in which the vector is measured. ’-1’ is de-fault meaning the global system, 0 or 1 mean re-spectively the first or the second reference sys-tem that have been added to the object. (=-1)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 181: Any Script Ref Manual

168

AnyKinCoMType: CreatableBase Class: AnyKinLinear (see p. 166)

Description:This measures the center of mass (CoM) of a collection of rigid bodies (AnySeg).

Object Members:Expected Members

Class Number DescriptionAnySeg [1..Inf] Any postive number of segments can be added

to objects of this class. All of them are includedin the center of mass calculation.

Optional-Initialization MembersClass Name DescriptionAnyVar Ref Integer numbers that specify the reference sys-

tem in which the vector is measured. ’-1’ is de-fault meaning the global system, 0 or 1 mean re-spectively the first or the second reference sys-tem that have been added to the object. (=-1)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyString SegNames A string array containing the names of the seg-

ments the measure uses. (="No values given")

Page 182: Any Script Ref Manual

169

AnyKinPLineType: CreatableBase Class: AnyKinMeasureReal (see p. 165)

Description:This "kinematic measure" measures the distance between points. The points on the polyline aredefined by the members of the type AnyRefFrame. The measure is the length of the polyline startingfrom the firstly defined AnyRefFrame proceeding to the last.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2..Inf] The reference frames that are input for the mea-

sure.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 183: Any Script Ref Manual

170

AnyKinSPLine2Type: CreatableBase Class: AnyKinPLine (see p. 169)

Description:This "kinematic measure" measures the length of the shortest path (SP) of a string that may be incontact with surfaces. The string is defined as a polyline (see AnyKinPLine) where the connectingline segment can be in contact with and wrap over rigid surfaces (AnySurface).

The contact between line and surfaces is considered as frictionless and is governed by static equi-librium, i.e., minimum potential elastic energy of the string.

The contact problem is solved iteratively until the displacement of the string between iteration stepsis less than a given tolerance.

Known issues:This is a very challenging functionality to implement and the numerical and iterative nature ofthe evaluation of this kinematic measure means that it is not a 100 percent stable. Moreover, itdemands relatively much computer power compared to typical "kinematic measures" that are basedon simple mathematical expressions that are straight forward to evaluate. AnyKinSPLine objectscan slow down models significantly.

Large time step, i.e., steps where large motion has occured, can cause problems. The numericalsolution relies on initial guesses for the position of the string. These are entered manually for thestarting point in time, but during an time analysis, the previous time step and information about themotion is used to create the guess of the position for the next step. Large time steps can thereforecause these guesses to be inadequate, which can make the position analysis fail to converge orconverge to an unexpected solution causing jumps of the string position.

The velocity analysis may fail with an exception reporting "negative pivot" during a factorization.This can happen when the wrapping geometry is not defined properly and segments of the polylinepenetrates a surface too much. The direct cause of this can be that an endpoint or via-point of thestring penetrates the surface or that the mesh of the string is too coarse. In the former case a warningabout the penetration will be given, however, the penetration is accepted by the system unless the"negative pivot" occurs.

Due to the complexity of the underlying mathematical problem, the acceleration analysis for thismeasure is not implemented. This implies that this measure cannot be used for kinematic drivers,however it is sufficiently equipped to function for definition of forces and thereby muscles, whichis the primary objective of the kinematic measure.

Future releases:This class and the underlying numerical solver routines are still undergoing development.Increased robustness, easier user control, and increased efficiency are areas of the continousresearch and development in this area.This implies that changes of this class must be expected in future versions of AnyBodyTM.

Page 184: Any Script Ref Manual

171

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2..Inf] The reference frames that are input for the mea-

sure.

Obligatory-Initialization MembersClass Name DescriptionAnyVar StringMesh Number of discretization points on each string

segment.

Optional-Initialization MembersClass Name DescriptionAnyIntVar SolverType Solver type. (=2)AnyMatrix InitWrapPosVectors An array of 3-D vectors that specify the initial

shape of the string. The vectors are ordered asrows of a matrix. For each line segment twovectors must be specified. They are definingtwo points relative to the line segment’s originand insertion nodes and the curve’s initial shapewill be three straight lines; from the origin tothe first point, then to the second, and finally tothe insertion point. (="No values given")

AnyIntVar MaxIter Maximum number of allowed iterations duringposition analysis of the contact problem. (=100)

AnyVar RelTol Relative tolerance that is used to determinewhether the solution has converged. The stringlength is used for normalization of the displace-ment. (=1e-008)

AnyVar AbsTol Absolute tolerance (in meters) that is used todetermine whether the solution has converged.(=0)

AnyVar AugLagCoef Coefficient for penalty term in the AugmentedLagragian method. Increasing this value can insome cases remove problems of negative pivotsin the velocity analysis. (=1000)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 185: Any Script Ref Manual

172

Page 186: Any Script Ref Manual

173

AnyKinSPLineType: CreatableBase Class: AnyKinPLine (see p. 169)

Description:This "kinematic measure" measures the length of the shortest path (SP) of a string that may be incontact with surfaces. The string is defined as a polyline (see AnyKinPLine) where the connectingline segment can be in contact with and wrap over rigid surfaces (AnySurface).

The contact between line and surfaces is considered as frictionless and is governed by static equi-librium, i.e., minimum potential elastic energy of the string.

The contact problem is solved iteratively until the displacement of the string between iteration stepsis less than a given tolerance.

Known issues:This is a very challenging functionality to implement and the numerical and iterative nature ofthe evaluation of this kinematic measure means that it is not a 100 percent stable. Moreover, itdemands relatively much computer power compared to typical "kinematic measures" that are basedon simple mathematical expressions that are straight forward to evaluate. AnyKinSPLine objectscan slow down models significantly.

Large time step, i.e., steps where large motion has occured, can cause problems. The numericalsolution relies on initial guesses for the position of the string. These are entered manually for thestarting point in time, but during an time analysis, the previous time step and information about themotion is used to create the guess of the position for the next step. Large time steps can thereforecause these guesses to be inadequate, which can make the position analysis fail to converge orconverge to an unexpected solution causing jumps of the string position.

The velocity analysis may fail with an exception reporting "negative pivot" during a factorization.This can happen when the wrapping geometry is not defined properly and segments of the polylinepenetrates a surface too much. The direct cause of this can be that an endpoint or via-point of thestring penetrates the surface or that the mesh of the string is too coarse. In the former case a warningabout the penetration will be given, however, the penetration is accepted by the system unless the"negative pivot" occurs.

Due to the complexity of the underlying mathematical problem, the acceleration analysis for thismeasure is not implemented. This implies that this measure cannot be used for kinematic drivers,however it is sufficiently equipped to function for definition of forces and thereby muscles, whichis the primary objective of the kinematic measure.

Future releases:This class and the underlying numerical solver routines are still undergoing development.Increased robustness, easier user control, and increased efficiency are areas of the continousresearch and development in this area.This implies that changes of this class must be expected in future versions of AnyBodyTM.

Page 187: Any Script Ref Manual

174

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2..Inf] The reference frames that are input for the mea-

sure.

Obligatory-Initialization MembersClass Name DescriptionAnyVar StringMesh Number of discretization points on each string

segment.

Optional-Initialization MembersClass Name DescriptionAnyMatrix InitWrapPosVectors An array of 3-D vectors that specify the initial

shape of the string. The vectors are ordered asrows of a matrix. For each line segment twovectors must be specified. They are definingtwo points relative to the line segment’s originand insertion nodes and the curve’s initial shapewill be three straight lines; from the origin tothe first point, then to the second, and finally tothe insertion point. (="No values given")

AnyVar RelTol Relative tolerance that is used to determinewhether the solution is acceptable. The stringlength is used for normalization of the displace-ment. (=1e-008)

AnyVar AugLagCoef Coefficient for penalty term in the AugmentedLagragian method. Increasing this value can insome cases remove problems of negative pivotsin the velocity analysis. (=1000)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 188: Any Script Ref Manual

175

AnyKinRotationalType: CreatableBase Class: AnyKinMeasureReal (see p. 165)

Description:This "kinematic measure" measures 3-D orientation/rotations. It measures either the rotation of asingle reference frame with respect to the global frame or the relative rotation one frame, frame ’1’,with respect to another, frame ’0’.

Possible rotational quantities are determined by the member Type, which is an enum of AnyKin-RotationalType. This allows you to chose the following quantities as output:

Cardan angles (Type = RotAxesAngles): Cardan angles measure a 3-D rotation by three anglesof planar rotation about the reference system’s axes. One should be aware that the sequenceof these rotations is important, and that any rotation subsequent to the first is a rotation abouta local axis arising from the previous rotation(s). Typical examples of such coordinates areEuler angles and Bryant angles, which are described in the literature and both defined by aspecific sequence of rotations. In this class, the members Axis1, Axis2, and Axis3 can beused to specify any particular sequence of rotations.

One should notice that Cardan angles for any rotation sequence has the inherent problem ofsingular rotations, i.e., rotations where the middle rotation has made the first and the last axesto be parallel; this makes the measure indeterminate and close to such positions it will beinaccurate. This problem is also known as "Gimbal Lock".

Cartesian rotation vector (Type = RotVector): The Cartesian rotation vector measures a general3-D orientation as a single rotation about a given axis. The rotation vector is a geometricvector that is parallel with this axis of rotation and its length is equal to angle of rotation. Inmust be emphasized that the velocity of the rotation vector is not equal to the angular velocityvector, except in the planar case where the axis of rotation is constant.

Euler parameters (Type = EulerParam): Euler parameters is a special form of quaternions, i.e.,four parameters that uniquely specify any orientation. The presense of four parameters im-plies that they are not independent. Indeed they must honor the constraint that the vectorof the four parameters must be a unit vector. Notice that this constraint makes it difficult touse Euler parameters for driving angular motion generally using the Euler parameters setting,eventhough it is tempting due their unique description of the rotation. Driving all four Eulerparameters requires the driver functions to obey the Euler parameters constraint. This wouldlead to one redundant (but solvable) kinematic constraint. Standard kinematical solvers inAnyBody do however not handle this case nicely.

Angular velocity vector(AngVelOnOff = On): For any set of rotational coordinates, you can op-tionally choose to use the angular velocity vector as output for velocities and its derivatives forthe accelerations. This can be used to define angular measures useful for making AnyForceobjects that are equivalent to torques. However, this implies a general inconsistency betweenpositions and velocities, which means that the measure cannot be applied in kinematic con-straints, including kinematic drivers.

Page 189: Any Script Ref Manual

176

Known issues:3-D orientation is more complex issue than it might seem. Coordinates for measuring orientationoften suffers from multiple solutions. This may arise because the same angles can be given in severalways adding full rotations or they may arise due to other indeterminacies (singularities). Differentsets of rotational coordinates have different properties in this regard.

In order to resolve some indeterminacies, the AnyKinRotational class will try to estimate the propersolution in case where there a multiple. This is done by comparison to the values in the prior timestep, if in the middle of a time analysis.

Future releases:Many other measures of 3-D rotation can be considered and AnyBodyTM is certainly preparedfor inclusion of more sets here in AnyKinRotational. Therefore, this class may be the subjectto changes in future versions. This will be considered depending on the user demand for suchfacilities. Please let us know if you find any such extensions valuable.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [1..2] The reference frames that are input for the mea-

sure.

Obligatory-Initialization MembersClass Name DescriptionAnyKinRotationalType Type Coordinate type specification.

Optional-Initialization MembersClass Name DescriptionAnyRefFrameAxis Axis1 First axis of rotation for RotAxesAngles. (=z,

Options: x | y | z)AnyRefFrameAxis Axis2 Second axis of rotation for RotAxesAngles.

(=y, Options: x | y | z)AnyRefFrameAxis Axis3 Third axis of rotation for RotAxesAngles. (=x,

Options: x | y | z)

Page 190: Any Script Ref Manual

177

AnyVar Ref IMPORTANT: The functionality of ’Ref’ hasbeen removed, in order to avoid misunderstand-ings and confusion with ’Ref’ in AnyKinLinear.Please modify your model to remove initializa-tion of ’Ref’. In future versions, ’Ref’ will beremoved entirely. Previous description of thismember was: Integer numbers that specify thereference system in which geometric vectors aremeasured, e.g. the angular velocity vector. ’-1’ is default meaning the global system, 0 or 1mean respectively the first or the second refer-ence system that have been added to the object.(=0)

AnySwitchVar AngVelOnOff Switch for using angular velocity vector at ve-locity and acceleration level. (=Off, Options:Off | On)

AnySwitchVar AngVelGlobal Switch for using angular velocity vector inglobal coordinates at velocity and accelerationlevel. This requires ’AngVelOnOff = On’.(=Off, Options: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 191: Any Script Ref Manual

178

AnyKinMeasureCombBaseType: CreatableBase Class: AnyKinMeasure (see p. 164)

Description:This class is a base class for all kinematic measures that combines other measures into a new mea-sure.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 192: Any Script Ref Manual

179

AnyKinMeasureNormCombType: CreatableBase Class: AnyKinMeasureCombBase (see p. 178)

Description:The norm combination measure contined in this class produce a single measure by calculating anorm-like quantity of the inputs. In addition to a traditional norm, this expression introduce aweight factor for each input as well as an offset value. The output value is defined as by

OUTPUT =

(∑i

(wi ∗ INPUTi + Offset)p

)1/p

−Offset (4.3)

where i is the index of the inputs and the sum contains all inputs of the measure.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Optional-Initialization MembersClass Name DescriptionAnyVar Order Order of the norm, i.e., power. (=2)AnyVar Offset Offset. (=0)AnyVector Weight Vector of weight factors. (="No values given")

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 193: Any Script Ref Manual

180

AnyKinMeasureLinCombType: CreatableBase Class: AnyKinMeasureCombBase (see p. 178)

Description:This class is a composer of new kinematic measures as a linear combination of existing ones. Tosome extent, it is similar to AnyKinMeasureOrg, but the way it composes the new measure is dif-ferent. Please refer also to AnyKinMeasureOrg for details of organizing kinematic measures.

The linear combination is defined by a coefficient matrix, Coef, and constant terms in the vectorConst. Each row in Coef and Const defines one component of the new kinematic measure. Eachcolumn of Coef contains the coefficients associated with one component of the existing measuresthat have been entered into this new measure (either directly or typically by references).

By default the number of rows in Coef defines the number of elements in the new measue. However,the integer OutDim can alternatively be used to specify the directly. This is a patch to cases whereCoef depends Evaluation Moments later than the configuration step and therefore is undefinedduring the configuration. For such cases, OutDim must be set, and the dimensions of Coef isvalidated against this setting.

All the components of the entered measures (sub-measures) can be assembled into one vector as forAnyKinMeasureOrg. The firstly defined sub-measure occupies the first places of the vector and soon. The new measure is defined mathematically as the coefficient matrix, Coef, times this vectorplus the constants in Const.

Example:If we for instance assemble (include) two measures with respectively 2 and 3 components, the as-sembled measure will have 5, with indices from 0 to 4. We can define Coef = {{1,-1,0,0,0},{0,0,1,1,1}}and Const = {0,0}. This yields a new measure with two components: the former is the differencebetween the components of the first sub-measure and the latter the sum of the components in thelatter sub-measure.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Obligatory-Initialization MembersClass Name DescriptionAnyMatrix Coef Matrix of coefficients for the linear combina-

tion. Each column corresponds to one compo-nent in the sub-measures and each row definesone of the new measures.

Page 194: Any Script Ref Manual

181

Optional-Initialization MembersClass Name DescriptionAnyIntVar OutDim Dimension of the output measure. This optional

setting can be used to specify the dimension thatalternatively is defined by the number of rows inCoef. (=0)

AnyVector Const Vector of constant. (="No values given")

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 195: Any Script Ref Manual

182

AnyKinMeasureOrgType: CreatableBase Class: AnyKinMeasureCombBase (see p. 178)

Description:This class is a composer of new kinematic measures from existing ones. Two options exist:

1. Default, it transfers and combines all input measures directly.

2. Otherwise, it may be reorganized by setting indices in the array ’MeasureOrganizer’

It is important to keep track of the organization hereunder the sub-measures, because the configura-tion of the new measure is essential to understand the loads and/or constraints that may be appliedto the organized measure.

At this point, the ’MeasureOrganizer’ is a simple collection of indices. An index refers to the placeof a coordinate in the vector of coordinates arising when assembling all sub-measures in the object.The firstly defined sub-measure occupies the first places of the vector and so on.

Example:If we for instance assemble (include) two measures with respectively 2 and 3 components the as-sembled measure will have 5, with indices from 0 to 4. MeasureOrganizer = {1,2}; will extract twoof these 5 components to the organized measure, which then will consist of the 2nd component ofthe 1st measure and the 1st of the 2nd measure.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Optional-Initialization MembersClass Name DescriptionAnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")

Page 196: Any Script Ref Manual

183

AnyVector Acc The acceleration vector, typically the time-derivative of Vel. (="No values given")

Page 197: Any Script Ref Manual

184

AnyJointType: AbstractBase Class: AnyKinMeasureOrg (see p. 182)

Description:This class is the base class of all joints. A joint has, in addition to the kinematic constraints and theassociated reaction forces, a set of joint coordinates defined. The joint class is indeed a kinematicmeasure itself and it measures the joint coordinates.

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitch Constraints.-

Reaction.TypeType specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector of the joint coordinates.

(="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnyKinEq Constraints AnyKinEq measure that specifies the kinematicconstraints of the joint.

Page 198: Any Script Ref Manual

185

AnyStdJointType: CreatableBase Class: AnyJoint (see p. 184)

Description:This is the base class for the standard joints, such as spherical and revolute joints. Common for allthese standard joints is that the relative motion and the constraints can be defined by a linear and arotational measure, i.e., AnyKinLinear (p. 166) and AnyKinRotational (p. 175), respectively. Apartfrom being a base class, this class also functions as a rigid joint, i.e., fully constrained rigid-bodymotion.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2] The two reference frames to be joined. Notice

that a least one has to be movable.

Optional-Initialization MembersClass Name DescriptionAnySwitch Constraints.-

Reaction.TypeType specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector of the joint coordinates.

(="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnyKinEq Constraints AnyKinEq measure that specifies the kinematicconstraints of the joint.

AnyKinLinear Linear The measure of translation.AnyKinRotational Orientation The measure of rotation.

Page 199: Any Script Ref Manual

186

AnySphericalJointType: CreatableBase Class: AnyStdJoint (see p. 185)

Description:A spherical joint is a point constraint, also known as a ball-and-socket joint. The joint coordinatesmust specify the three-dimensional orientation completely and there are several options for this inthe AnyKinRotational that is used internally in the joint.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2] The two reference frames to be joined. Notice

that a least one has to be movable.

Optional-Initialization MembersClass Name DescriptionAnySwitch Constraints.-

Reaction.TypeType specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

AnyVar Linear.Ref Integer numbers that specify the reference sys-tem in which the vector is measured. ’-1’ is de-fault meaning the global system, 0 or 1 mean re-spectively the first or the second reference sys-tem that have been added to the object. (=-1)

AnyKinRotationalType Orientation.Type Coordinate type specification.(=RotAxesAngles, Options: RotAxesAngles |RotVector | EulerParam)

AnyRefFrameAxis Orientation.Axis1 First axis of rotation for RotAxesAngles. (=z,Options: x | y | z)

AnyRefFrameAxis Orientation.Axis2 Second axis of rotation for RotAxesAngles.(=y, Options: x | y | z)

AnyRefFrameAxis Orientation.Axis3 Third axis of rotation for RotAxesAngles. (=x,Options: x | y | z)

AnySwitchVar Orientation.AngVel-OnOff

Switch for using angular velocity vector at ve-locity and acceleration level. (=Off, Options:Off | On)

AnySwitchVar Orientation.AngVel-Global

Switch for using angular velocity vector inglobal coordinates at velocity and accelerationlevel. This requires ’AngVelOnOff = On’.(=Off, Options: Off | On)

Page 200: Any Script Ref Manual

187

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector of the joint coordinates.

(="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnyKinEq Constraints AnyKinEq measure that specifies the kinematicconstraints of the joint.

AnyKinLinear Linear The measure of translation.AnyKinRotational Orientation The measure of rotation.

Page 201: Any Script Ref Manual

188

AnyTransSphericalJointType: CreatableBase Class: AnySphericalJoint (see p. 186)

Description:The AnyTransSphericalJoint is basically a spherical joint with one of the translational constraintsremoved. This makes it a ball-in-a-straight-rail.

The joint coordinates consist of three rotations similar to the spherical joint, but with an additionaltranslational coordinate appended as the first entrie of the Pos vector.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2] The two reference frames to be joined. Notice

that a least one has to be movable.

Optional-Initialization MembersClass Name DescriptionAnySwitch Constraints.-

Reaction.TypeType specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

AnyVar Linear.Ref Integer numbers that specify the reference sys-tem in which the vector is measured. ’-1’ is de-fault meaning the global system, 0 or 1 mean re-spectively the first or the second reference sys-tem that have been added to the object. (=-1)

AnyKinRotationalType Orientation.Type Coordinate type specification.(=RotAxesAngles, Options: RotAxesAngles |RotVector | EulerParam)

AnyRefFrameAxis Orientation.Axis1 First axis of rotation for RotAxesAngles. (=z,Options: x | y | z)

AnyRefFrameAxis Orientation.Axis2 Second axis of rotation for RotAxesAngles.(=y, Options: x | y | z)

AnyRefFrameAxis Orientation.Axis3 Third axis of rotation for RotAxesAngles. (=x,Options: x | y | z)

AnySwitchVar Orientation.AngVel-OnOff

Switch for using angular velocity vector at ve-locity and acceleration level. (=Off, Options:Off | On)

Page 202: Any Script Ref Manual

189

AnySwitchVar Orientation.AngVel-Global

Switch for using angular velocity vector inglobal coordinates at velocity and accelerationlevel. This requires ’AngVelOnOff = On’.(=Off, Options: Off | On)

AnyRefFrameAxis Axis The axis of translation on the first of the con-nected reference frames. (=z, Options: x | y |z)

AnyIntVar Ref Index of the reference system to use a base;value of ’0’ or ’1’ referring to the either of twoincluded AnyRefFrames. (=0)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector of the joint coordinates.

(="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnyKinEq Constraints AnyKinEq measure that specifies the kinematicconstraints of the joint.

AnyKinLinear Linear The measure of translation.AnyKinRotational Orientation The measure of rotation.

Page 203: Any Script Ref Manual

190

AnyCylindricalJointType: CreatableBase Class: AnyStdJoint (see p. 185)

Description:A cylindrical joint allows rotation about a given axis and translation along the axis, i.e., a combinedhinge and translational joint. The joint coordinate vector consists of the relative translation androtation.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2] The two reference frames to be joined. Notice

that a least one has to be movable.

Optional-Initialization MembersClass Name DescriptionAnySwitch Constraints.-

Reaction.TypeType specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

AnyRefFrameAxis Axis The axis of translation, which will also be thecommon axis for the two connected referenceframes. (=z, Options: x | y | z)

AnyIntVar Ref Index of the reference system to use, either ’0’or ’1’, referring to either of the two includedAnyRefFrames. (=0)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector of the joint coordinates.

(="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnyKinEq Constraints AnyKinEq measure that specifies the kinematicconstraints of the joint.

AnyKinLinear Linear The measure of translation.

Page 204: Any Script Ref Manual

191

AnyKinRotational Orientation The measure of rotation.

Page 205: Any Script Ref Manual

192

AnyRevoluteJointType: CreatableBase Class: AnyCylindricalJoint (see p. 190)

Description:A revolute joint is an ideal hinge that only allows rotation about one axis. The joint coordinatevector consists of one entry, the relative rotation.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2] The two reference frames to be joined. Notice

that a least one has to be movable.

Optional-Initialization MembersClass Name DescriptionAnySwitch Constraints.-

Reaction.TypeType specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

AnyRefFrameAxis Axis The axis of translation, which will also be thecommon axis for the two connected referenceframes. (=z, Options: x | y | z)

AnyIntVar Ref Index of the reference system to use, either ’0’or ’1’, referring to either of the two includedAnyRefFrames. (=0)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector of the joint coordinates.

(="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnyKinEq Constraints AnyKinEq measure that specifies the kinematicconstraints of the joint.

AnyKinLinear Linear The measure of translation.AnyKinRotational Orientation The measure of rotation.

Page 206: Any Script Ref Manual

193

Page 207: Any Script Ref Manual

194

AnyPrismaticJointType: CreatableBase Class: AnyCylindricalJoint (see p. 190)

Description:A prismatic joint is a translational joint that does not allow rotation about the axis. The joint coor-dinate vector consists of one entry, the relative translation.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2] The two reference frames to be joined. Notice

that a least one has to be movable.

Optional-Initialization MembersClass Name DescriptionAnySwitch Constraints.-

Reaction.TypeType specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

AnyRefFrameAxis Axis The axis of translation, which will also be thecommon axis for the two connected referenceframes. (=z, Options: x | y | z)

AnyIntVar Ref Index of the reference system to use, either ’0’or ’1’, referring to either of the two includedAnyRefFrames. (=0)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector of the joint coordinates.

(="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnyKinEq Constraints AnyKinEq measure that specifies the kinematicconstraints of the joint.

AnyKinLinear Linear The measure of translation.AnyKinRotational Orientation The measure of rotation.

Page 208: Any Script Ref Manual

195

Page 209: Any Script Ref Manual

196

AnyUniversalJointType: CreatableBase Class: AnyStdJoint (see p. 185)

Description:A universal joint allows rotation about two perpendicular axes. The joint coordinate vector consistsof two angles that are the relative rotation angles about the two specified axes.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [2] The two reference frames to be joined. Notice

that a least one has to be movable.

Obligatory-Initialization MembersClass Name DescriptionAnyRefFrameAxis Axis1 Rotation axis on the 1st AnyRefFrame.AnyRefFrameAxis Axis2 Rotation axis on the 2nd AnyRefFrame.

Optional-Initialization MembersClass Name DescriptionAnySwitch Constraints.-

Reaction.TypeType specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector of the joint coordinates.

(="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnyKinEq Constraints AnyKinEq measure that specifies the kinematicconstraints of the joint.

AnyKinLinear Linear The measure of translation.AnyKinRotational Orientation The measure of rotation.

Page 210: Any Script Ref Manual

197

Page 211: Any Script Ref Manual

198

AnyKinEqType: CreatableBase Class: AnyKinMeasureOrg (see p. 182)

Description:This class is the base class for all types of kinematic constraints. Moreover, it functions as a setof equality constraints. An AnyKinEq object can hold several kinematic measures, which can beassembled and reorganized by the functionality in the parent class, AnyKinMeasureOrg (p. 182).

The equality constraints set all components in the organized measure to zero, but this can changein derived classes. Notice that AnyKinEq is a kinematic measure itself that measure the violationof the constraints. This implies that Pos, Vel, and Acc should be zero when the kinematic analysishas been performed successfully.

It is the basic constraint class used by joints derived from AnyJoint.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Optional-Initialization MembersClass Name DescriptionAnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnySwitch Reaction.Type Type specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyReacForce Reaction Reaction forces associated with the constraints.

Page 212: Any Script Ref Manual

199

AnyKinEqDriverType: CreatableBase Class: AnyKinEq (see p. 198)

Description:This class is the basic kinematical driver.

Future releases:In this version of AnyBodyTM, this class can actually be considered as an abstract base class,but planned extensions of the facilities for driving the kinematics of models will make thisclass play a more central role. This however implies that some changes of this class and inparticular of derived classes must be expected in future version.Extensions will include a library of mathematical functions that can be used for definingkinematic driver functions, as well as other time dependent model input.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Optional-Initialization MembersClass Name DescriptionAnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnySwitch Reaction.Type Type specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyReacForce Reaction Reaction forces associated with the driving con-

straints, i.e., the driver actuator forces in a gen-eral sense.

Page 213: Any Script Ref Manual

200

AnyKinEqSimpleDriverType: CreatableBase Class: AnyKinEqDriver (see p. 199)

Description:This class contains a simple driver function that provides motion with constant acceleration.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Obligatory-Initialization MembersClass Name DescriptionAnyVector DriverVel Velocities of the driven coordinates at t=0;

Optional-Initialization MembersClass Name DescriptionAnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnySwitch Reaction.Type Type specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

AnyVector DriverPos Positions of the driven coordinates at t=0;(="No values given")

AnyVector DriverAcc Accelerations of the driven coordinates(constant); (="No values given")

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")

Page 214: Any Script Ref Manual

201

AnyReacForce Reaction Reaction forces associated with the driving con-straints, i.e., the driver actuator forces in a gen-eral sense.

Page 215: Any Script Ref Manual

202

AnyKinEqPolynomialDriverType: CreatableBase Class: AnyKinEqDriver (see p. 199)

Description:This class contains a polynomial driver function, i.e., a polynomial in time, with the coefficients ofthe polynomial assembled in the matrix PolyCoef. The i’th column contains the coefficients for thei’th term of the polynomial, whereas the j’th row contains the coefficients for the j’th coordinate tobe driven.

Posi =n∑

j=1

PolyCoefij t(j−1) (4.4)

where Posi is the i’th components of the measure in Pos, and PolyCoef and t are described in thelist of members.

Future releases:Notice that this driver is derived from AnyKinEqDriver. However, in the future drivers will behandled by a single driver class and a library of general functions and mathematical expres-sions, which can be used to specify the motion.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Obligatory-Initialization MembersClass Name DescriptionAnyMatrix PolyCoef Matrix of polynomial coefficients, each row

specifies a polynomial function for one compo-nent of the measure.

Optional-Initialization MembersClass Name DescriptionAnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnySwitch Reaction.Type Type specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

Page 216: Any Script Ref Manual

203

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyReacForce Reaction Reaction forces associated with the driving con-

straints, i.e., the driver actuator forces in a gen-eral sense.

Page 217: Any Script Ref Manual

204

AnyKinEqFourierDriverType: CreatableBase Class: AnyKinEqDriver (see p. 199)

Description:This class provides a Fourier expansion as driver function. It can take the following forms:

Posi =∑

Ajcos(wjt + Bj) (4.5)

Posi =∑

Ajsin(wjt + Bj) (4.6)

Posi =∑

[Ajcos(wjt) + Bjsin(wjt)] (4.7)

where Posi is the position of the i’th driven coordinate in the measure, and A and B are the Fouriercoefficients, i.e., amplitudes and phase angles. wj are the frequencies given by

wj = (j − 1) 2πFreq [rad/s] (4.8)

where Freq is the fundamental frequency in Hz. Notice that Pos can be a vector, implying that Aand B then are matrices.

Future releases:Notice that this driver is derived from AnyKinEqDriver. However, in the future drivers will behandled by a single driver class and a library of general functions and mathematical expres-sions, which can be used to specify the motion.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Obligatory-Initialization MembersClass Name DescriptionAnyEnumFourierSerie-Type

Type Expansion type setting.

AnyVar Freq Fundamental frequency in Hz.AnyMatrix A Matrix of Fourier coefficients (amplitudes),

each row specifies values for a single functionfor one component of the measure.

AnyMatrix B Matrix of Fourier coefficients similar to A. Am-plitudes or phase angles depending on the set-tings.

Page 218: Any Script Ref Manual

205

Optional-Initialization MembersClass Name DescriptionAnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

AnySwitch Reaction.Type Type specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyReacForce Reaction Reaction forces associated with the driving con-

straints, i.e., the driver actuator forces in a gen-eral sense.

Page 219: Any Script Ref Manual

206

AnyKinEqInterPolDriverType: CreatableBase Class: AnyKinEqDriver (see p. 199)

Description:This class provides a driver function that interpolates between data points spaced in time. Thefollowing types of interpolation are available:

• Piecewise linear function (Notice that accelerations are zero for all times).

• Bezier interpolation.

• B-Spline interpolation of variable order.

The data points can be entered in the designated data structure or they can be read from a data textfile.

The data file must be an ascii file holding space-separated values. The first column must be theparameter values, whereas the remaining must hold the data points; as many as there are componentsin the kinematic measure to be driven. All lines of the file that does begin with a floating-pointnumber are ignored and so is any contents on a line after the expected number floating-point values.Too few values on a line give an error, whereas too many produce a warning.

Future releases:Notice that this driver is derived from AnyKinEqDriver. However, in the future drivers will behandled by a single driver class and a library of general functions and mathematical expres-sions, which can be used to specify the motion.

Object Members:Expected Members

Class Number DescriptionAnyKinMeasure [0..Inf] Kinematic measures that should be used by this

object.

Obligatory-Initialization MembersClass Name DescriptionAnyInterPolType Type Interpolation type.

Optional-Initialization MembersClass Name DescriptionAnyIntArray MeasureOrganizer List of indices of components from the assem-

bled measures to be included in the new (orga-nized) measure. (="No values given")

Page 220: Any Script Ref Manual

207

AnySwitch Reaction.Type Type specification of the reaction forces. SeeAnyReacForce class description for further de-tails. Default is ’On’ for all components. (Op-tions: Off | On)

AnyIntVar BsplineOrder Order of B-spline interpolation. Must be largerthan or equal to 4 for kinematic drivers to ensuresufficiently high order of continuity. (=4)

AnyVector T Time data points. (="No values given")AnyMatrix Data Matrix of data points. Each row contains the

data points for one component of the measurein Pos. (="No values given")

AnyFileVar FileName Name of a text file with data points in space-separated columns. The first column must holdT and the following must correspond to the rowsof Data. Comments can be entered into the datafile in lines that do not start with a number andafter the correct number of values (="")

AnySwitchVar FileErrorContinue-OnOff

’On’ allows data file loading to continue onsome errors. These are typically when the num-ber data points does not match the expectednumber. Error messages are send anyway andyou should not expect data to work properly.(=Off, Options: Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)AnyVector Pos The position vector, i.e., the current values of

the measured quantity. (="No values given")AnyVector Vel The velocity vector, typically the time-

derivative of Pos. (="No values given")AnyVector Acc The acceleration vector, typically the time-

derivative of Vel. (="No values given")AnyReacForce Reaction Reaction forces associated with the driving con-

straints, i.e., the driver actuator forces in a gen-eral sense.

Page 221: Any Script Ref Manual

208

AnyLigamentModelType: AbstractBase Class: AnyMechObject (see p. 117)

Description:This class is the base class for ligament models. A ligament model contains the constitutive law fora ligament, i.e., the force-length relationship. The constitutive model is a one-dimensional modelwhich implies that ligaments can only have one degree of freedom.

Object Members:Denied-Access Members

Class Name DescriptionAnyVar t Object-time variable. (=0)

Page 222: Any Script Ref Manual

209

AnyLigamentModelPolType: CreatableBase Class: AnyLigamentModel (see p. 208)

Description:This ligament model provides a constitutive force-length equation having a polynomial form. Theparameters of the function are the slack length, the initial stiffness at this length, together withone point on the curve and the gradient at this point, i.e., the tangent stiffness. This provides anadjustable non-linear form of the constitutive (force-length) relationship. We shall refer to the valuesat this point as the nominal value: the nominal strain, force and stiffness.

The two stiffness values must be supplied as relative values referring to the nominal (mean) stiffnessgiven by the two points. This nominal stiffness is F1/(eps1*L0) in N/m.

The polynomial function consists of constant, first, second, and fourth order terms.

It is possible to make the function continue as a linear function for deformations above the nominalstrain. This can be used for defining linear constitutive relationships with a slack region.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar L0 Slack length or undeformed length, i.e., length

for zero force.AnyVar eps1 Nominal strain (relative elongation, i.e.,

L1=(1+eps1)*L0).AnyVar F1 Nominal force (N), i.e., force at the nominal

strain.

Optional-Initialization MembersClass Name DescriptionAnyVar a0 Relative initial stiffness. (=1)AnyVar a1 Relative stiffness at nominal strain. (=1)AnySwitch LinRegionOnOff Switch for controlling the lineraity of the rela-

tionship above nominal strain. (=On, Options:Off | On)

Denied-Access MembersClass Name DescriptionAnyVar t Object-time variable. (=0)

Page 223: Any Script Ref Manual

210

4.1 Class Tree for AnyMechObject

Notice that due to the amount classes derived from AnyMechObject, the class tree has been split up.Two major branches with respectively AnyKinMeasureUsr and AnyKinMeasure as base classes areshown in separate trees in the following sections.

AnyMechObject (see p. 117)AnySurface (see p. 118)

AnySurfSTL (see p. 119)AnyParamSurf (see p. 120)

AnyParamSurfAnalytical (see p. 121)AnySurfEllipsoid (see p. 122)AnySurfSphere (see p. 123)AnySurfCylinder (see p. 124)

AnyRefFrame (see p. 125)AnyFixedRefFrame (see p. 126)AnyPositionedRefFrame (see p. 127)

AnyRefNode (see p. 128)AnyMovingRefFrame (see p. 129)

AnySeg (see p. 130)AnyForceMeasure (see p. 132)

AnyForceMomentMeasure (see p. 133)AnyForceMomentMeasure2 (see p. 134)

AnyMuscleModel (see p. 136)AnyMuscleModel3E (see p. 137)AnyMuscleModel2ELin (see p. 139)AnyMuscleModelUsr1 (see p. 140)

AnyKinMeasureBase (see p. 141)AnyKinMeasureUsr (see p. 142)–>AnyKinMeasure (see p. 164)–>

AnyLigamentModel (see p. 208)AnyLigamentModelPol (see p. 209)

4.2 Class Tree for AnyKinMeasureUsr

AnyKinMeasureUsr (see p. 142)AnyForceBase (see p. 143)

AnyAppliedForce (see p. 144)AnyMuscle (see p. 145)

AnyGeneralMuscle (see p. 147)AnyViaPointMuscle (see p. 149)AnyShortestPathMuscle (see p. 151)AnyShortestPathMuscle2 (see p. 154)

AnyLigament (see p. 157)

Page 224: Any Script Ref Manual

211

AnyViaPointLigament (see p. 158)AnyForce (see p. 159)AnyForce3D (see p. 160)AnyMoment3D (see p. 161)

AnyReacForce (see p. 162)

4.3 Class Tree for AnyKinMeasure

AnyKinMeasure (see p. 164)AnyKinMeasureReal (see p. 165)

AnyKinLinear (see p. 166)AnyKinCoM (see p. 168)

AnyKinPLine (see p. 169)AnyKinSPLine2 (see p. 170)AnyKinSPLine (see p. 173)

AnyKinRotational (see p. 175)AnyKinMeasureCombBase (see p. 178)

AnyKinMeasureNormComb (see p. 179)AnyKinMeasureLinComb (see p. 180)AnyKinMeasureOrg (see p. 182)

AnyJoint (see p. 184)AnyStdJoint (see p. 185)

AnySphericalJoint (see p. 186)AnyTransSphericalJoint (see p. 188)

AnyCylindricalJoint (see p. 190)AnyRevoluteJoint (see p. 192)AnyPrismaticJoint (see p. 194)

AnyUniversalJoint (see p. 196)AnyKinEq (see p. 198)

AnyKinEqDriver (see p. 199)AnyKinEqSimpleDriver (see p. 200)AnyKinEqPolynomialDriver (see p. 202)AnyKinEqFourierDriver (see p. 204)AnyKinEqInterPolDriver (see p. 206)

Page 225: Any Script Ref Manual

Chapter 5

Drawing and Styling Objects

In this chapter you can find descriptions of drawing objects and styling objects.

Drawing objects are objects that are visible in Model View Window of the AnyBodyTM program.Drawing objects are often related to certain mechanical objects. You could say they are the graphicalrepresentations of certain objects, for instance AnyDrawSeg is a standard drawing utility for drawingrigid segments, i.e., AnySeg.

Styling objects are objects that defines style and appearances. This can be related to drawing objectbut styling objects are also used in other relations. Basic style classes are for instance classesdefining fonts, line types, and the like.

5.1 Drawing Objects

AnyDrawObject (see p. 213)AnyDrawObjectRigid (see p. 214)

AnyDrawObjectRigidFormatted (see p. 215)AnyDrawRefFrame (see p. 216)

AnyDrawSeg (see p. 217)AnyDrawNode (see p. 218)

AnyDrawNodes (see p. 219)AnyDrawSurf (see p. 220)AnyDrawSTL (see p. 222)AnyDrawParamSurf (see p. 223)AnyDrawCamera (see p. 224)

AnyChart (see p. 225)AnyDrawVector (see p. 233)AnyDrawLine (see p. 235)AnyDrawPLine (see p. 237)

AnyDrawViaPointMuscle (see p. 238)AnyDrawMuscle (see p. 239)

212

Page 226: Any Script Ref Manual

213

AnyDrawObjectType: AbstractBase Class: AnyConfigFolder (see p. 24)

Description:This is the base class for all drawing object classes. A drawing object is a 3-D object that is visible inthe Model View window. This base class is abstract, but derived classes are creatable and define theappearances in the Model View of AnyBodyTM’s GUI. The appearance of some objects are controlledby parameters and typically the appearance is highly linked to the owner object. Actually manycreatable drawing objects are only allowed inside certain types of objects.

Page 227: Any Script Ref Manual

214

AnyDrawObjectRigidType: AbstractBase Class: AnyDrawObject (see p. 213)

Description:This drawing object class is the base class for all geometrically rigid objects. This means thatdrawing object classes derived from this class define objects that do not change shape during motionof the mechanical elements of the model.

Page 228: Any Script Ref Manual

215

AnyDrawObjectRigidFormattedType: AbstractBase Class: AnyDrawObjectRigid (see p. 214)

Description:This drawing object class is the base class for all geometrically rigid objects. This means thatdrawing object classes derived from this class define objects that do not change shape during motionof the mechanical elements of the model.

This extends its parent by facilities for controlling the appearance of the drawing, such as coloringand scaling.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})AnyVar Transparency Object transparency parameter. Values must be

in the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyVar Face Normal direction specification. Outwards nor-mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Page 229: Any Script Ref Manual

216

AnyDrawRefFrameType: CreatableBase Class: AnyDrawObjectRigidFormatted (see p. 215)

Description:This is an object for drawing reference frames. The default size in 1 x 1 x 1 length unit.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})AnyVar Transparency Object transparency parameter. Values must be

in the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Denied-Access MembersClass Name DescriptionAnyVar Face Normal direction specification. Outwards nor-

mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

Page 230: Any Script Ref Manual

217

AnyDrawSegType: CreatableBase Class: AnyDrawRefFrame (see p. 216)

Description:This is an object for drawing a segment. It makes a symbolic stick drawing consisting of an ellip-soid that represents the inertia distribution and sticks connecting the nodes (AnyRefNode) that areattached to the segment.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVar Transparency Object transparency parameter. Values must be

in the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)AnyVar InertiaScale Scaling factor for the graphical representation

of the inertia distribution. (=1)

Denied-Access MembersClass Name DescriptionAnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})AnyVar Face Normal direction specification. Outwards nor-

mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

Page 231: Any Script Ref Manual

218

AnyDrawNodeType: CreatableBase Class: AnyDrawObjectRigidFormatted (see p. 215)

Description:This object draws a single node (AnyRefFrame) if it is put inside it.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})AnyVar Transparency Object transparency parameter. Values must be

in the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Denied-Access MembersClass Name DescriptionAnyVar Face Normal direction specification. Outwards nor-

mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

Page 232: Any Script Ref Manual

219

AnyDrawNodesType: CreatableBase Class: AnyDrawNode (see p. 218)

Description:This object draws all the nodes (AnyRefFrames) in a certain folder, including the folder itself if itis an AnyRefFrame. This is an easy way to display all nodes on a segment without displaying thesegment itself. This can be a practical alternative to AnyDrawSeg.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})AnyVar Transparency Object transparency parameter. Values must be

in the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Denied-Access MembersClass Name DescriptionAnyVar Face Normal direction specification. Outwards nor-

mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

Page 233: Any Script Ref Manual

220

AnyDrawSurfType: CreatableBase Class: AnyDrawObjectRigidFormatted (see p. 215)

Description:This object draws a 3-D CAD model in the reference frame (AnyRefFrame) in which it is located.

The input is files of either standard STL or AnyBodyTM’s own ANYSURF format. Actually, theANYSURF format is always used, so if an STL file is supplied, a new ANYSURF file is automat-ically created and updated when the STL file is changed. Providing the filename without extensionmakes the system assume the ".stl" extension; however, if the file is specified with the ".anysurf"extension then any STL file is ignored, i.e., the ANYSURF file is not updated automatically.

The surface can be transformed during loading. This is done with a 3D transformation (class Any-FunTransform3D). You can enter a single transformation function, either by declaration or by refer-ence, in an AnyDrawSurf object. Using the derived class AnyFunTransform3DLin function lineartransformations including translations and rotations can be employed.

The ScaleXYZ member can still be used to produce pure size scaling and mirroring along thereference axes. This transformation is done during visualization, i.e. after the transformation usingthe scaling function.

Both scaling/transformation methods can conveniently be used together. For instance the drawingof an object can follow the scaling of the geometry of a human body model using generally definedscaling functions, whereas mirroring of the drawing for left-to-right-side reuse can be obtained witha simultanous ScaleXYZ definition.

Object Members:Expected Members

Class Number DescriptionAnyFunTransform3D [0..1] Scaling function that transforms the surface

during loading.

Obligatory-Initialization MembersClass Name DescriptionAnySurfFile FileName The STL or ANYSURF file name, incl. proper

extension.

Optional-Initialization MembersClass Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})

Page 234: Any Script Ref Manual

221

AnyVar Transparency Object transparency parameter. Values must bein the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyVar Face Normal direction specification. Outwards nor-mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Page 235: Any Script Ref Manual

222

AnyDrawSTLType: CreatableBase Class: AnyDrawObjectRigidFormatted (see p. 215)

Description:This object draws a 3-D CAD model in the reference frame (AnyRefFrame) in which it is located.The CAD model must be in ASCII STL-file format.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Name of the STL file.

Optional-Initialization MembersClass Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})AnyVar Transparency Object transparency parameter. Values must be

in the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyVar Face Normal direction specification. Outwards nor-mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Page 236: Any Script Ref Manual

223

AnyDrawParamSurfType: CreatableBase Class: AnyDrawObjectRigidFormatted (see p. 215)

Description:This is a drawing object for parameterized surfaces (see class AnyParamSurf).

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})AnyVar Transparency Object transparency parameter. Values must be

in the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyVar Face Normal direction specification. Outwards nor-mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)AnySwitchVar WireFrameOnOff Switch for showing wireframe on the surface.

The wire frame is shown as iso-parametriccurves. (=Off, Options: Off | On)

Page 237: Any Script Ref Manual

224

AnyDrawCameraType: CreatableBase Class: AnyDrawObjectRigidFormatted (see p. 215)

Description:Drawing object for visualizing a camera in the model.

Future releases:Please notice that this is a beta release of the object. The visuallization is still fairly primitivebeing just a simple cone indicating the lense. The will be improved in a future version.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB RGB Object color in RGB values between 0 and 1.

(={0.65, 0.65, 0.65})AnyVec3 ScaleXYZ Scaling factors for each reference system axis.

(={1, 1, 1})AnyVar Transparency Object transparency parameter. Values must be

in the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyVar Face Normal direction specification. Outwards nor-mal is defined by the surface triangles’ vertexnumbering as ’0’ means clockwise, ’1’ meanscounter-clockwise, ’-1’ means both sides willbe drawn on all object surfaces. Any other valueimplies automatic selection. (=2)

AnyStyleFont TextFont General font setting for the object’s text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Page 238: Any Script Ref Manual

225

AnyChartType: CreatableBase Class: AnyDrawObjectRigid (see p. 214)

Description:Class that defines a chart showing output.

AnyChart is a general 2D and 3D charting facility. In principle, all charts are drawn as 3D objects,but planar chart are spanning only 2 dimensions. Typically, these two directions will be x and zdirections of the associated reference frame, whereas the y direction is used only for 3D plots.

AnyChart has many options like standard charting facilities known from other softwares. All ofthem are configurable from the AnyScriptTM code; please refer to the tables below and the classes ofthe member folder objects for further detail.

AbsAxis, AbsAxis2, and ValueAxis contain setting for the first, secondary, and value axes, re-specitvely. Two dimensional charts, only use settings from the former and the latter. Style containsgeneral settings of the appearance of the chart, and Legend contains settings for legends.

Data to be displayed in the AnyChart object is defined in series (AnyChartSerie), which must be de-clared inside the Series folder. Please refer to the classes AnyChartSerieFolder and AnyChartSeriefor details.

AnyChart is a drawing object and can as such be included in the Model View of a model. AnAnyChart object can simply be defined inside any reference frame (AnyRefFrame of derived) andwill thereafter be attached to this frame with x and y axes as abscissae axes and z as the value axis.

Additionally, AnyBodyTM’s GUI application uses AnyChart as one of its charting facilities. Thisimplies that the options you find in the tables below are also available for the AnyChart View inAnyBodyTM. They are accessible from the Properties View of the AnyChart View. Both PropertiesView (general for all views with associated properties) and AnyChart View can be opened from theAnyBodyTM Windows menu, and the Properties View for AnyChart View can also be opened by theProperties Button in the AnyChart View toolbar.

Future releases:Some facilities in AnyChart are still relatively primitive, compared to standard chart solutionsyou may find in other software. We will try to improve the AnyChart according to arisingneeds and user demands. Until AnyChart is adequately functional, the old chart module inAnyBodyTM will still be available in the GUI application. We sincerely appreciate any feedbackon the AnyChart features that may help us in the process of improving AnyChart.

Object Members:

Page 239: Any Script Ref Manual

226

Expected MembersClass Number DescriptionAnyChartSerie [0..Inf] Expected members holding data serie defini-

tions. These objects should be put in the Seriesfolder and not in the root scope of AnyChart,where they will have no effect.

Obligatory-Initialization MembersClass Name DescriptionAnyChartSeriesFolder Series Folder holding the series definitions.

Optional-Initialization MembersClass Name DescriptionAnyRGBs Series.RGBdef List holding default color sequence for data

curves. It must be a matrix where each row con-tains three (RGB) values. (={{1, 0, 0}, {0, 1,0}, {0, 0, 1}, {1, 1, 0}, {0, 1, 1}, {1, 1, 1}, {0,0, 0}})

AnyChartStyleFolder Style Folder holding general style settings for thechart.

AnyChartStyle Style.Style Style of the plotting area.(=CartesianChart3D, Options: Cartesian-Chart2D | CartesianChart3D)

AnyVec3 Style.Sizes Sizes of three dimensions of the plotting area.(={1, 1, 1})

AnyStyleDrawLine Style.Axes Line style for axes.AnyEnumLine3DStyle Style.Axes.Style Line style. (=Line3DStyleFull, Options:

Line3DStyleFull)AnyVar Style.Axes.Thickness Line thickness. (=1)AnyRGB Style.Axes.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyChartTextField Style.Title Title text field.AnySwitchVar Style.Title.Visible Switch for visiblity. (=On, Options: Off | On)AnyStyleFont Style.Title.Font Font settings.AnyRGB Style.Title.Font.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar Style.Title.Font.-

FontNameFont name (Windows fonts). (="Times NewRoman")

AnyIntVar Style.Title.Font.-Height

Font height. (=10)

AnyIntVar Style.Title.Font.Width Font width. (=4)AnySwitchVar Style.Title.Font.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar Style.Title.Font.Italic Switch for italic type setting. (=Off, Options:

Off | On)AnyStringVar Style.Title.Text Text string. (="")

Page 240: Any Script Ref Manual

227

AnyStyleFont Style.MessageFont Font used for messages dispalyed inside in chartarear.

AnyRGB Style.MessageFont.-RGB

Color in RGB values between 0 and 1. (={0, 0,0})

AnyStringVar Style.MessageFont.-FontName

Font name (Windows fonts). (="Times NewRoman")

AnyIntVar Style.MessageFont.-Height

Font height. (=10)

AnyIntVar Style.MessageFont.-Width

Font width. (=4)

AnySwitchVar Style.MessageFont.-Bold

Switch for bold face type setting. (=Off, Op-tions: Off | On)

AnySwitchVar Style.MessageFont.-Italic

Switch for italic type setting. (=Off, Options:Off | On)

AnyChartLegend-Folder

Legend Folder holding the definition of the legend ap-pearance.

AnySwitch Legend.Visible Switch for visiblity. (=Off, Options: Off | On)AnyChartAxis AbsAxis Primary abscissa axis definition.AnySwitchVar AbsAxis.Visible Switch for visiblity. (=On, Options: Off | On)AnyVar AbsAxis.Min Minimum value on the axis. If not set, it is au-

tomatically determined. (=0)AnyVar AbsAxis.Max Maximum value on the axis. If not set, it is au-

tomatically determined. (=1)AnySwitchVar AbsAxis.AutoMin Switch for automatic determination of mini-

mum value on axis. (=On, Options: Off | On)AnySwitchVar AbsAxis.AutoMax Switch for automatic determination of maxi-

mum value on axis. (=On, Options: Off | On)AnyChartTextField AbsAxis.Title Axis title.AnySwitchVar AbsAxis.Title.Visible Switch for visiblity. (=On, Options: Off | On)AnyStyleFont AbsAxis.Title.Font Font settings.AnyRGB AbsAxis.Title.Font.-

RGBColor in RGB values between 0 and 1. (={0, 0,0})

AnyStringVar AbsAxis.Title.Font.-FontName

Font name (Windows fonts). (="Times NewRoman")

AnyIntVar AbsAxis.Title.Font.-Height

Font height. (=10)

AnyIntVar AbsAxis.Title.Font.-Width

Font width. (=4)

AnySwitchVar AbsAxis.Title.Font.-Bold

Switch for bold face type setting. (=Off, Op-tions: Off | On)

AnySwitchVar AbsAxis.Title.Font.-Italic

Switch for italic type setting. (=Off, Options:Off | On)

AnyStringVar AbsAxis.Title.Text Text string. (="")AnyChartAxisUnit AbsAxis.Unit1 Primary unit definition (major units).AnySwitchVar AbsAxis.Unit1.Visible Switch for visibility. (=On, Options: Off | On)

Page 241: Any Script Ref Manual

228

AnySwitchVar AbsAxis.Unit1.-AutoUnit

Switch for automatic determination of the unitsize. (=On, Options: Off | On)

AnyIntVar AbsAxis.Unit1.-Divisions

Size of the unit specified by a requested num-ber of divisions of the axis’ data range. Thisis used for the automatical determination of theunit size. (=10)

AnyVar AbsAxis.Unit1.Unit Size of the unit. If AutoUnit is On specified,it will be automatically determined from Divi-sions and the data range. (=0.2)

AnyVar AbsAxis.Unit1.Tick-Inside

Size of tick inside the plotting area. (=0)

AnyVar AbsAxis.Unit1.Tick-Outside

Size of tick outside the plotting area. (=0)

AnySwitchVar AbsAxis.Unit1.-GridLines

Switch for visibility of the grid lines. (=Off,Options: Off | On)

AnyStyleDrawLine AbsAxis.Unit1.Grid-LineStyle

Style settings for the grid lines.

AnyEnumLine3DStyle AbsAxis.Unit1.Grid-LineStyle.Style

Line style. (=Line3DStyleFull, Options:Line3DStyleFull)

AnyVar AbsAxis.Unit1.Grid-LineStyle.Thickness

Line thickness. (=1)

AnyRGB AbsAxis.Unit1.Grid-LineStyle.RGB

Color in RGB values between 0 and 1. (={0, 0,0})

AnySwitchVar AbsAxis.Unit1.Text Switch for visibility of the unit text. (=On, Op-tions: Off | On)

AnyStyleFont AbsAxis.Unit1.-TextFont

Font settings for the unit text.

AnyRGB AbsAxis.Unit1.Text-Font.RGB

Color in RGB values between 0 and 1. (={0, 0,0})

AnyStringVar AbsAxis.Unit1.Text-Font.FontName

Font name (Windows fonts). (="Times NewRoman")

AnyIntVar AbsAxis.Unit1.Text-Font.Height

Font height. (=10)

AnyIntVar AbsAxis.Unit1.Text-Font.Width

Font width. (=4)

AnySwitchVar AbsAxis.Unit1.Text-Font.Bold

Switch for bold face type setting. (=Off, Op-tions: Off | On)

AnySwitchVar AbsAxis.Unit1.Text-Font.Italic

Switch for italic type setting. (=Off, Options:Off | On)

AnyVar AbsAxis.Unit1.-TextSpace

Space between the unit text and the axis. (=0)

AnyStyleNumeric2 AbsAxis.Unit1.-NumberFormat

Format settings for the unit text.

AnyIntVar AbsAxis.Unit1.-NumberFormat.-Digits

Number of digits in output. Disregarded ifsmaller than one. (=8)

Page 242: Any Script Ref Manual

229

AnyIntVar AbsAxis.Unit1.-NumberFormat.Style

Style of the numeric output. (=0)

AnySwitchVar AbsAxis.Unit1.-NumberFormat.-Scale

Switch for scaling. (=Off, Options: Off | On)

AnyVar AbsAxis.Unit1.-NumberFormat.-ScaleVal

Scaling factor. (=1)

AnyChartAxis AbsAxis2 Secondary abscissa axis definition.AnySwitchVar AbsAxis2.Visible Switch for visiblity. (=On, Options: Off | On)AnyVar AbsAxis2.Min Minimum value on the axis. If not set, it is au-

tomatically determined. (=0)AnyVar AbsAxis2.Max Maximum value on the axis. If not set, it is au-

tomatically determined. (=1)AnySwitchVar AbsAxis2.AutoMin Switch for automatic determination of mini-

mum value on axis. (=On, Options: Off | On)AnySwitchVar AbsAxis2.AutoMax Switch for automatic determination of maxi-

mum value on axis. (=On, Options: Off | On)AnyChartTextField AbsAxis2.Title Axis title.AnySwitchVar AbsAxis2.Title.-

VisibleSwitch for visiblity. (=On, Options: Off | On)

AnyStyleFont AbsAxis2.Title.Font Font settings.AnyRGB AbsAxis2.Title.Font.-

RGBColor in RGB values between 0 and 1. (={0, 0,0})

AnyStringVar AbsAxis2.Title.Font.-FontName

Font name (Windows fonts). (="Times NewRoman")

AnyIntVar AbsAxis2.Title.Font.-Height

Font height. (=10)

AnyIntVar AbsAxis2.Title.Font.-Width

Font width. (=4)

AnySwitchVar AbsAxis2.Title.Font.-Bold

Switch for bold face type setting. (=Off, Op-tions: Off | On)

AnySwitchVar AbsAxis2.Title.Font.-Italic

Switch for italic type setting. (=Off, Options:Off | On)

AnyStringVar AbsAxis2.Title.Text Text string. (="")AnyChartAxisUnit AbsAxis2.Unit1 Primary unit definition (major units).AnySwitchVar AbsAxis2.Unit1.-

VisibleSwitch for visibility. (=On, Options: Off | On)

AnySwitchVar AbsAxis2.Unit1.-AutoUnit

Switch for automatic determination of the unitsize. (=On, Options: Off | On)

AnyIntVar AbsAxis2.Unit1.-Divisions

Size of the unit specified by a requested num-ber of divisions of the axis’ data range. Thisis used for the automatical determination of theunit size. (=10)

Page 243: Any Script Ref Manual

230

AnyVar AbsAxis2.Unit1.Unit Size of the unit. If AutoUnit is On specified,it will be automatically determined from Divi-sions and the data range. (=0.2)

AnyVar AbsAxis2.Unit1.Tick-Inside

Size of tick inside the plotting area. (=0)

AnyVar AbsAxis2.Unit1.Tick-Outside

Size of tick outside the plotting area. (=0)

AnySwitchVar AbsAxis2.Unit1.-GridLines

Switch for visibility of the grid lines. (=Off,Options: Off | On)

AnyStyleDrawLine AbsAxis2.Unit1.Grid-LineStyle

Style settings for the grid lines.

AnyEnumLine3DStyle AbsAxis2.Unit1.Grid-LineStyle.Style

Line style. (=Line3DStyleFull, Options:Line3DStyleFull)

AnyVar AbsAxis2.Unit1.Grid-LineStyle.Thickness

Line thickness. (=1)

AnyRGB AbsAxis2.Unit1.Grid-LineStyle.RGB

Color in RGB values between 0 and 1. (={0, 0,0})

AnySwitchVar AbsAxis2.Unit1.Text Switch for visibility of the unit text. (=On, Op-tions: Off | On)

AnyStyleFont AbsAxis2.Unit1.-TextFont

Font settings for the unit text.

AnyRGB AbsAxis2.Unit1.Text-Font.RGB

Color in RGB values between 0 and 1. (={0, 0,0})

AnyStringVar AbsAxis2.Unit1.Text-Font.FontName

Font name (Windows fonts). (="Times NewRoman")

AnyIntVar AbsAxis2.Unit1.Text-Font.Height

Font height. (=10)

AnyIntVar AbsAxis2.Unit1.Text-Font.Width

Font width. (=4)

AnySwitchVar AbsAxis2.Unit1.Text-Font.Bold

Switch for bold face type setting. (=Off, Op-tions: Off | On)

AnySwitchVar AbsAxis2.Unit1.Text-Font.Italic

Switch for italic type setting. (=Off, Options:Off | On)

AnyVar AbsAxis2.Unit1.-TextSpace

Space between the unit text and the axis. (=0)

AnyStyleNumeric2 AbsAxis2.Unit1.-NumberFormat

Format settings for the unit text.

AnyIntVar AbsAxis2.Unit1.-NumberFormat.-Digits

Number of digits in output. Disregarded ifsmaller than one. (=8)

AnyIntVar AbsAxis2.Unit1.-NumberFormat.Style

Style of the numeric output. (=0)

AnySwitchVar AbsAxis2.Unit1.-NumberFormat.-Scale

Switch for scaling. (=Off, Options: Off | On)

Page 244: Any Script Ref Manual

231

AnyVar AbsAxis2.Unit1.-NumberFormat.-ScaleVal

Scaling factor. (=1)

AnyChartAxis ValueAxis Value axis definition.AnySwitchVar ValueAxis.Visible Switch for visiblity. (=On, Options: Off | On)AnyVar ValueAxis.Min Minimum value on the axis. If not set, it is au-

tomatically determined. (=0)AnyVar ValueAxis.Max Maximum value on the axis. If not set, it is au-

tomatically determined. (=1)AnySwitchVar ValueAxis.AutoMin Switch for automatic determination of mini-

mum value on axis. (=On, Options: Off | On)AnySwitchVar ValueAxis.AutoMax Switch for automatic determination of maxi-

mum value on axis. (=On, Options: Off | On)AnyChartTextField ValueAxis.Title Axis title.AnySwitchVar ValueAxis.Title.-

VisibleSwitch for visiblity. (=On, Options: Off | On)

AnyStyleFont ValueAxis.Title.Font Font settings.AnyRGB ValueAxis.Title.Font.-

RGBColor in RGB values between 0 and 1. (={0, 0,0})

AnyStringVar ValueAxis.Title.Font.-FontName

Font name (Windows fonts). (="Times NewRoman")

AnyIntVar ValueAxis.Title.Font.-Height

Font height. (=10)

AnyIntVar ValueAxis.Title.Font.-Width

Font width. (=4)

AnySwitchVar ValueAxis.Title.Font.-Bold

Switch for bold face type setting. (=Off, Op-tions: Off | On)

AnySwitchVar ValueAxis.Title.Font.-Italic

Switch for italic type setting. (=Off, Options:Off | On)

AnyStringVar ValueAxis.Title.Text Text string. (="")AnyChartAxisUnit ValueAxis.Unit1 Primary unit definition (major units).AnySwitchVar ValueAxis.Unit1.-

VisibleSwitch for visibility. (=On, Options: Off | On)

AnySwitchVar ValueAxis.Unit1.-AutoUnit

Switch for automatic determination of the unitsize. (=On, Options: Off | On)

AnyIntVar ValueAxis.Unit1.-Divisions

Size of the unit specified by a requested num-ber of divisions of the axis’ data range. Thisis used for the automatical determination of theunit size. (=10)

AnyVar ValueAxis.Unit1.Unit Size of the unit. If AutoUnit is On specified,it will be automatically determined from Divi-sions and the data range. (=0.2)

AnyVar ValueAxis.Unit1.Tick-Inside

Size of tick inside the plotting area. (=0)

AnyVar ValueAxis.Unit1.Tick-Outside

Size of tick outside the plotting area. (=0)

Page 245: Any Script Ref Manual

232

AnySwitchVar ValueAxis.Unit1.-GridLines

Switch for visibility of the grid lines. (=Off,Options: Off | On)

AnyStyleDrawLine ValueAxis.Unit1.-GridLineStyle

Style settings for the grid lines.

AnyEnumLine3DStyle ValueAxis.Unit1.-GridLineStyle.Style

Line style. (=Line3DStyleFull, Options:Line3DStyleFull)

AnyVar ValueAxis.Unit1.-GridLineStyle.-Thickness

Line thickness. (=1)

AnyRGB ValueAxis.Unit1.-GridLineStyle.RGB

Color in RGB values between 0 and 1. (={0, 0,0})

AnySwitchVar ValueAxis.Unit1.Text Switch for visibility of the unit text. (=On, Op-tions: Off | On)

AnyStyleFont ValueAxis.Unit1.-TextFont

Font settings for the unit text.

AnyRGB ValueAxis.Unit1.Text-Font.RGB

Color in RGB values between 0 and 1. (={0, 0,0})

AnyStringVar ValueAxis.Unit1.Text-Font.FontName

Font name (Windows fonts). (="Times NewRoman")

AnyIntVar ValueAxis.Unit1.Text-Font.Height

Font height. (=10)

AnyIntVar ValueAxis.Unit1.Text-Font.Width

Font width. (=4)

AnySwitchVar ValueAxis.Unit1.Text-Font.Bold

Switch for bold face type setting. (=Off, Op-tions: Off | On)

AnySwitchVar ValueAxis.Unit1.Text-Font.Italic

Switch for italic type setting. (=Off, Options:Off | On)

AnyVar ValueAxis.Unit1.-TextSpace

Space between the unit text and the axis. (=0)

AnyStyleNumeric2 ValueAxis.Unit1.-NumberFormat

Format settings for the unit text.

AnyIntVar ValueAxis.Unit1.-NumberFormat.-Digits

Number of digits in output. Disregarded ifsmaller than one. (=8)

AnyIntVar ValueAxis.Unit1.-NumberFormat.Style

Style of the numeric output. (=0)

AnySwitchVar ValueAxis.Unit1.-NumberFormat.-Scale

Switch for scaling. (=Off, Options: Off | On)

AnyVar ValueAxis.Unit1.-NumberFormat.-ScaleVal

Scaling factor. (=1)

Page 246: Any Script Ref Manual

233

AnyDrawVectorType: CreatableBase Class: AnyDrawObject (see p. 213)

Description:A general vector drawing object. You can specify the 3D vector to be drawn by a mathematical ex-pression, and similarly you can specify varying thickness, etc. The vector is attached to a referenceframe (AnyRefFrame or derived class).

The reference frame is defined as either a member or the owner of the AnyDrawVector object. Firstpriority is given to AnyRefFrame members and if none such exists the owner is taken. If neitherare found it is an error.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [0..1] Definition of the reference frame the vector is

attached to.

Obligatory-Initialization MembersClass Name DescriptionAnyVec3 Vec The vector to be drawn.AnyVar Line.Thickness Line thickness.

Optional-Initialization MembersClass Name DescriptionAnySwitchVar PointAway Specifies whether the vector points away from

reference frame or alternative points towards it.(=On, Options: Off | On)

AnySwitchVar GlobalCoord Specifies whether the vector is given in globalcoordinates or alternatively in local coordinatesof the reference frame. (=On, Options: Off |On)

AnyStyleDrawLine-WithCaps

Line Line style folder.

AnyEnumLine3DStyle Line.Style Line style. (=Line3DStyleFull, Options:Line3DStyleFull)

AnyRGB Line.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyStyleDrawLineCap Line.Start Style folder for starting cap of line.

Page 247: Any Script Ref Manual

234

AnyEnumLine3DCap-Style

Line.Start.Style Cap style. This can optionally be an arrayproducing a line cap composed of multiplesimple caps styles, one for each element ofthe array. (Options: Line3DCapStyleVoid |Line3DCapStyleNone | Line3DCapStyleDisk| Line3DCapStyleCylinder |Line3DCapStyleEllipsoid |Line3DCapStyleArrow)

AnyRGB Line.Start.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyVar Line.Start.Thickness Cap thickness (must be larger than line thick-ness). (=0)

AnyVar Line.Start.Length Cap length. (=0)AnyStyleDrawLineCap Line.End Style folder for ending cap of line.AnyEnumLine3DCap-Style

Line.End.Style Cap style. This can optionally be an arrayproducing a line cap composed of multiplesimple caps styles, one for each element ofthe array. (Options: Line3DCapStyleVoid |Line3DCapStyleNone | Line3DCapStyleDisk| Line3DCapStyleCylinder |Line3DCapStyleEllipsoid |Line3DCapStyleArrow)

AnyRGB Line.End.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyVar Line.End.Thickness Cap thickness (must be larger than line thick-ness). (=0)

AnyVar Line.End.Length Cap length. (=0)AnyStringVar Text Text to be associated with the object. (="")AnyVar TextRelPos Relative position of text. Typical values should

be between 0 and 1, which will position the textaccordingly along the line. (=1)

AnyStyleFont TextFont Font settings for text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)AnySwitchVar DrawCoord Switch for activating drawing of coordinate in-

dicators.(=Off, Options: Off | On)

Page 248: Any Script Ref Manual

235

AnyDrawLineType: CreatableBase Class: AnyDrawObject (see p. 213)

Description:A general line drawing object. You can specify the 3D line by a mathematical expressions of itsendpoints and similarly you can specify varying thickness, etc.

The line is attached to a local reference frame (AnyRefFrame or derived class). The referenceframe is defined as either a member or the owner of the AnyDrawLine object. First priority is givento AnyRefFrame members and if none such exists the owner is taken. If neither are found it is anerror. Moreover, it can be specified to show a projection onto the axes of this system only.

Object Members:Expected Members

Class Number DescriptionAnyRefFrame [0..1] Definition of the reference frame the endpoints

are attached to.

Obligatory-Initialization MembersClass Name DescriptionAnyVec3 p0 The starting point of the line.AnyVec3 p1 The ending point of the line.AnyVar Line.Thickness Line thickness.

Optional-Initialization MembersClass Name DescriptionAnyVec3 Offset A vector that specifies. (={0, 0, 0})AnySwitchVar GlobalCoord Specifies whether the endpoints are given in

global coordinates or alternatively in local coor-dinates of the reference frame. (=On, Options:Off | On)

AnyRefFrameAxis DirAxis Projection axes, i.e., visible coordinates for pro-jections. This can be an array of multiple axes.By default all three dimensions are shown. (Op-tions: x | y | z)

AnyStyleDrawLine-WithCaps

Line Line style folder.

AnyEnumLine3DStyle Line.Style Line style. (=Line3DStyleFull, Options:Line3DStyleFull)

AnyRGB Line.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyStyleDrawLineCap Line.Start Style folder for starting cap of line.

Page 249: Any Script Ref Manual

236

AnyEnumLine3DCap-Style

Line.Start.Style Cap style. This can optionally be an arrayproducing a line cap composed of multiplesimple caps styles, one for each element ofthe array. (Options: Line3DCapStyleVoid |Line3DCapStyleNone | Line3DCapStyleDisk| Line3DCapStyleCylinder |Line3DCapStyleEllipsoid |Line3DCapStyleArrow)

AnyRGB Line.Start.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyVar Line.Start.Thickness Cap thickness (must be larger than line thick-ness). (=0)

AnyVar Line.Start.Length Cap length. (=0)AnyStyleDrawLineCap Line.End Style folder for ending cap of line.AnyEnumLine3DCap-Style

Line.End.Style Cap style. This can optionally be an arrayproducing a line cap composed of multiplesimple caps styles, one for each element ofthe array. (Options: Line3DCapStyleVoid |Line3DCapStyleNone | Line3DCapStyleDisk| Line3DCapStyleCylinder |Line3DCapStyleEllipsoid |Line3DCapStyleArrow)

AnyRGB Line.End.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyVar Line.End.Thickness Cap thickness (must be larger than line thick-ness). (=0)

AnyVar Line.End.Length Cap length. (=0)AnyStringVar Text Text to be associated with the object. (="")AnyVar TextRelPos Relative position of text. Typical values should

be between 0 and 1, which will position the textaccordingly along the line. (=0.5)

AnyStyleFont TextFont Font settings for text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Page 250: Any Script Ref Manual

237

AnyDrawPLineType: CreatableBase Class: AnyDrawObject (see p. 213)

Description:An object of this class defines and draws a polyline between the origins of the reference frames(AnyRefFrames) in the folder, where the object is located. The sequence of the points on the line isthe same as the sequence in which the reference frames are defined.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFloat Thickness Line thickness. This must either hold one value

valid for all line segments or an array of values.For an array each element will be valid for asegment of the line and the last value will validall remaining segments of the line.

AnyRGBs RGB Color in RGB values between 0 and 1. Thismust either be an array with 3 values, i.e., onecolor for all line segments, or an array of RGBvalue sets, i.e., a matrix with three columns.Multiple colors are handled similarly to themultiple thickness values.

Page 251: Any Script Ref Manual

238

AnyDrawViaPointMuscleType: CreatableBase Class: AnyDrawPLine (see p. 237)

Description:This is a class for drawing a via point muscle.

Future releases:This class will vanish in a future version, but please refer to AnyDrawMuscle, which containsimproved capabilities for drawing muscles.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFloat Thickness Line thickness. This must either hold one value

valid for all line segments or an array of values.For an array each element will be valid for asegment of the line and the last value will validall remaining segments of the line.

AnyRGBs RGB Color in RGB values between 0 and 1. Thismust either be an array with 3 values, i.e., onecolor for all line segments, or an array of RGBvalue sets, i.e., a matrix with three columns.Multiple colors are handled similarly to themultiple thickness values.

Page 252: Any Script Ref Manual

239

AnyDrawMuscleType: CreatableBase Class: AnyDrawPLine (see p. 237)

Description:This is a class for drawing a muscle. The muscle appearance can graphically illustrate variousproperties of the muscle such as the strength, the current strength, the force, or the activity. Thesethings can be illustrated by the muscle thickness (bulging) and its color.

The bulging feature varies the radius according to a relative measure between zero and one. Thedefault (maximum) radius is determined by the strength of the muscle and a value of the maximumallowed stress in the muscle, which can be specified by the property MaxStress.

With the coloring feature, the color can be varied between two colors according to a similar relativemeasure as for the bulging. The endpoints of the color scale is given by the color of the drawingobject, RGB, and the RGB values in RGBColorScale. The former represents the maximum valueand RGBColorScale represents the minimum value of relative measure.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGBs RGB Color of the muscle. This must be an ar-

ray of sets of RGB values between 0 and 1(={0.5546875, 0.1015625, 0.1171875})

AnyVar Transparency Object transparency parameter. Values must bein the range from 0.0 (completely transparent)to 1.0 (completely opaque). (=1)

AnyVar DrawOnOff Integer value that controls if to draw the muscleor not Options are: 0: Do not draw the muscle1: Draw the muscle (=1)

AnyVar Bulging Integer value that specifies that the musclebulges according to: 1: The muscle activity.2: The current strength relative to the nomi-nal strength. 3: The actual force compared tothe nominal strength. 4: Obtaining constantvolume of the muscle. Otherwise, the musclewill have constant radius given by the nom-inal strength of the muscle and the memberMaxStress. (=0)

Page 253: Any Script Ref Manual

240

AnyVar ColorScale Integer value that controls the color interpo-lation between the color in RGBColorScaleand RGB. Options are: 1: The muscle activity.2: The current strength relative to the nominalstrength. 3: The actual force compared to thenominal strength. Otherwise, the muscle willhave the color given in RGB. (=0)

AnyRGB RGBColorScale Color used for color scaling, values should begiven in the range 0 to 1. (={0.95703125,0.78515625, 0.78515625})

AnyVar MaxStress MaxStress is the maximum allowed stress in themuscle used for estimating the visual thicknessof the muscles. The default radius of the mus-cle is determined based on the strength and thisMaxStress value. (=250000)

Denied-Access MembersClass Name DescriptionAnyFloat Thickness The thickness setting has no effect in this class.

(=0.001)

Page 254: Any Script Ref Manual

241

5.2 Scene Objects

AnySceneObject (see p. 242)AnyScene (see p. 243)AnySceneViewer (see p. 244)

Page 255: Any Script Ref Manual

242

AnySceneObjectType: AbstractBase Class: AnyConfigFolder (see p. 24)

Description:This is the base class for all object that in some way define the model scene.

This includes object containing scene settings (AnyScene), light objects (AnyLight), ...

Page 256: Any Script Ref Manual

243

AnySceneType: CreatableBase Class: AnySceneObject (see p. 242)

Description:This class comprises scene settings.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB BackgroundColor Background color of the scene. (={0.9, 0.9,

0.94})

Page 257: Any Script Ref Manual

244

AnySceneViewerType: CreatableBase Class: AnySceneObject (see p. 242)

Description:This class comprises scene viewer settings.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVar OrthograficEyeDist-

AddAn additional eye distance added to orthograficviews. A large number allows to avoid near-clipping of elements when changing betweenorthografic and perspective viewing.(=1000)

AnySwitchVar ShowRefFrame Switch for global reference frame appearance.(=Off, Options: Off | On)

AnySwitchVar ShowTrackBall Switch for track ball appearance during rotationoperations. (=On, Options: Off | On)

AnySwitchVar ShowFocalPlane Switch for focal plane appearance. (=Off, Op-tions: Off | On)

Page 258: Any Script Ref Manual

245

5.3 Style Defining Classes

AnyStyle (see p. 246)AnyStyleDraw (see p. 247)

AnyChartObject (see p. 248)AnyChartSerie (see p. 249)AnyChartText (see p. 251)

AnyChartTextField (see p. 252)AnyChartStyleFolder (see p. 253)AnyChartLegendFolder (see p. 255)AnyChartSeriesFolder (see p. 256)AnyChartAxisUnit (see p. 257)AnyChartAxis (see p. 259)

AnyStyleDrawLine (see p. 261)AnyStyleDrawLineWithCaps (see p. 262)

AnyStyleDrawPointMarkers (see p. 264)AnyStyleDrawLines (see p. 265)AnyStyleDrawLineCap (see p. 266)

AnyStyleNumeric (see p. 267)AnyStyleNumeric1 (see p. 268)

AnyStyleNumeric1f (see p. 269)AnyStyleNumeric2 (see p. 271)

AnyStyleFont (see p. 272)AnyOutputFileHeaderFormat (see p. 273)

Page 259: Any Script Ref Manual

246

AnyStyleType: AbstractBase Class: AnyFolder (see p. 24)

Description:Base class for all style setting classes.

Page 260: Any Script Ref Manual

247

AnyStyleDrawType: AbstractBase Class: AnyStyle (see p. 246)

Description:Base class for all drawing style classes.

Page 261: Any Script Ref Manual

248

AnyChartObjectType: AbstractBase Class: AnyStyleDraw (see p. 247)

Description:Base class for objects used in AnyChart.

Page 262: Any Script Ref Manual

249

AnyChartSerieType: CreatableBase Class: AnyChartObject (see p. 248)

Description:Class defining a data serie of a chart (AnyChart).

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyStringVar Value Search string for value axis (for more info.

on search strings, see class AnyObjectSearch-String).

AnyStyleDrawLines Lines Line style definitions. For series with multi-ple value data sets, i.e., multiple curves, mul-tiple values of each style-defining attribute canbe specified.

AnyStyleDrawPoint-Markers

PointMarkers Style definitions for data point markers. For se-ries with multiple value data sets, i.e., multiplecurves, multiple values of each style-definingattribute can be specified.

Optional-Initialization MembersClass Name DescriptionAnyChartSerieTitle Title Name string (default value is the name of the

AnyChartSerie object). (="AnyChartSerie")AnyStringVar Abscissa Search string for primary abscissa (for more

info. on search strings, see class AnyObject-SearchString). (="")

AnyStringVar Abscissa2 Search string for secondary abscissa (3D plotsonly) (for more info. on search strings, see classAnyObjectSearchString). (="")

AnySwitchVar Lines.Visible Switch for lines to be shown or not. (=On, Op-tions: Off | On)

AnyEnumLineStyle Lines.Style Line style. (Options: LineStyleNone | Line-StyleFull | LineStyleHidden)

AnyRGBs Lines.RGB Color in RGB values between 0 and 1. A matrixwith 3 columns holding the RGB values and arow for each color (="No values given")

AnyFloat Lines.Thickness Line thickness. (="No values given")AnySwitchVar PointMarkers.Visible Switch for markers to be shown or not. (=On,

Options: Off | On)

Page 263: Any Script Ref Manual

250

AnyEnumPointMarker-Style

PointMarkers.Style Marker style. (Options: PointStyleNone |PointStyleBox | PointStyleSphere | PointStyle-Star | PointStyleCross | PointStyleCross2)

AnyFloat PointMarkers.Size Size of markers. (="No values given")AnyInt PointMarkers.Skip-

PointsAmount of points between every visible marker.(="No values given")

Page 264: Any Script Ref Manual

251

AnyChartTextType: AbstractBase Class: AnyChartObject (see p. 248)

Description:Base class for text objects in the chart.

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitchVar Visible Switch for visiblity. (=On, Options: Off | On)AnyStyleFont Font Font settings.AnyRGB Font.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar Font.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar Font.Height Font height. (=10)AnyIntVar Font.Width Font width. (=4)AnySwitchVar Font.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar Font.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Page 265: Any Script Ref Manual

252

AnyChartTextFieldType: AbstractBase Class: AnyChartText (see p. 251)

Description:Class for text fields in the chart.

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitchVar Visible Switch for visiblity. (=On, Options: Off | On)AnyStyleFont Font Font settings.AnyRGB Font.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar Font.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar Font.Height Font height. (=10)AnyIntVar Font.Width Font width. (=4)AnySwitchVar Font.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar Font.Italic Switch for italic type setting. (=Off, Options:

Off | On)AnyStringVar Text Text string. (="")

Page 266: Any Script Ref Manual

253

AnyChartStyleFolderType: HiddenBase Class: AnyChartObject (see p. 248)

Description:Class that defines a chart showing output.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyChartStyle Style Style of the plotting area.

(=CartesianChart3D, Options: Cartesian-Chart2D | CartesianChart3D)

AnyVec3 Sizes Sizes of three dimensions of the plotting area.(={1, 1, 1})

AnyStyleDrawLine Axes Line style for axes.AnyEnumLine3DStyle Axes.Style Line style. (=Line3DStyleFull, Options:

Line3DStyleFull)AnyVar Axes.Thickness Line thickness. (=1)AnyRGB Axes.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyChartTextField Title Title text field.AnySwitchVar Title.Visible Switch for visiblity. (=On, Options: Off | On)AnyStyleFont Title.Font Font settings.AnyRGB Title.Font.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar Title.Font.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar Title.Font.Height Font height. (=10)AnyIntVar Title.Font.Width Font width. (=4)AnySwitchVar Title.Font.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar Title.Font.Italic Switch for italic type setting. (=Off, Options:

Off | On)AnyStringVar Title.Text Text string. (="")AnyStyleFont MessageFont Font used for messages dispalyed inside in chart

arear.AnyRGB MessageFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar MessageFont.-

FontNameFont name (Windows fonts). (="Times NewRoman")

AnyIntVar MessageFont.Height Font height. (=10)

Page 267: Any Script Ref Manual

254

AnyIntVar MessageFont.Width Font width. (=4)AnySwitchVar MessageFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar MessageFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)

Page 268: Any Script Ref Manual

255

AnyChartLegendFolderType: HiddenBase Class: AnyChartObject (see p. 248)

Description:Class that defines a chart showing output.

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitch Visible Switch for visiblity. (=Off, Options: Off | On)

Page 269: Any Script Ref Manual

256

AnyChartSeriesFolderType: HiddenBase Class: AnyChartObject (see p. 248)

Description:Folder for holding series definitions in charts (AnyChart).

Object Members:Expected Members

Class Number DescriptionAnyChartSerie [0..Inf] Members holding data serie definitions.

Optional-Initialization MembersClass Name DescriptionAnyRGBs RGBdef List holding default color sequence for data

curves. It must be a matrix where each row con-tains three (RGB) values. (={{1, 0, 0}, {0, 1,0}, {0, 0, 1}, {1, 1, 0}, {0, 1, 1}, {1, 1, 1}, {0,0, 0}})

Page 270: Any Script Ref Manual

257

AnyChartAxisUnitType: HiddenBase Class: AnyChartObject (see p. 248)

Description:Class containing unit definitons for axes in a chart (AnyChart).

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitchVar Visible Switch for visibility. (=On, Options: Off | On)AnySwitchVar AutoUnit Switch for automatic determination of the unit

size. (=On, Options: Off | On)AnyIntVar Divisions Size of the unit specified by a requested num-

ber of divisions of the axis’ data range. Thisis used for the automatical determination of theunit size. (=10)

AnyVar Unit Size of the unit. If AutoUnit is On specified,it will be automatically determined from Divi-sions and the data range. (=0.2)

AnyVar TickInside Size of tick inside the plotting area. (=0)AnyVar TickOutside Size of tick outside the plotting area. (=0)AnySwitchVar GridLines Switch for visibility of the grid lines. (=Off,

Options: Off | On)AnyStyleDrawLine GridLineStyle Style settings for the grid lines.AnyEnumLine3DStyle GridLineStyle.Style Line style. (=Line3DStyleFull, Options:

Line3DStyleFull)AnyVar GridLineStyle.-

ThicknessLine thickness. (=1)

AnyRGB GridLineStyle.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnySwitchVar Text Switch for visibility of the unit text. (=On, Op-tions: Off | On)

AnyStyleFont TextFont Font settings for the unit text.AnyRGB TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar TextFont.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar TextFont.Height Font height. (=10)AnyIntVar TextFont.Width Font width. (=4)AnySwitchVar TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)

Page 271: Any Script Ref Manual

258

AnySwitchVar TextFont.Italic Switch for italic type setting. (=Off, Options:Off | On)

AnyVar TextSpace Space between the unit text and the axis. (=0)AnyStyleNumeric2 NumberFormat Format settings for the unit text.AnyIntVar NumberFormat.-

DigitsNumber of digits in output. Disregarded ifsmaller than one. (=8)

AnyIntVar NumberFormat.Style Style of the numeric output. (=0)AnySwitchVar NumberFormat.-

ScaleSwitch for scaling. (=Off, Options: Off | On)

AnyVar NumberFormat.-ScaleVal

Scaling factor. (=1)

Page 272: Any Script Ref Manual

259

AnyChartAxisType: HiddenBase Class: AnyChartObject (see p. 248)

Description:Class containing axis definitons for a chart (AnyChart).

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitchVar Visible Switch for visiblity. (=On, Options: Off | On)AnyVar Min Minimum value on the axis. If not set, it is au-

tomatically determined. (=0)AnyVar Max Maximum value on the axis. If not set, it is au-

tomatically determined. (=1)AnySwitchVar AutoMin Switch for automatic determination of mini-

mum value on axis. (=On, Options: Off | On)AnySwitchVar AutoMax Switch for automatic determination of maxi-

mum value on axis. (=On, Options: Off | On)AnyChartTextField Title Axis title.AnySwitchVar Title.Visible Switch for visiblity. (=On, Options: Off | On)AnyStyleFont Title.Font Font settings.AnyRGB Title.Font.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar Title.Font.FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar Title.Font.Height Font height. (=10)AnyIntVar Title.Font.Width Font width. (=4)AnySwitchVar Title.Font.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar Title.Font.Italic Switch for italic type setting. (=Off, Options:

Off | On)AnyStringVar Title.Text Text string. (="")AnyChartAxisUnit Unit1 Primary unit definition (major units).AnySwitchVar Unit1.Visible Switch for visibility. (=On, Options: Off | On)AnySwitchVar Unit1.AutoUnit Switch for automatic determination of the unit

size. (=On, Options: Off | On)AnyIntVar Unit1.Divisions Size of the unit specified by a requested num-

ber of divisions of the axis’ data range. Thisis used for the automatical determination of theunit size. (=10)

Page 273: Any Script Ref Manual

260

AnyVar Unit1.Unit Size of the unit. If AutoUnit is On specified,it will be automatically determined from Divi-sions and the data range. (=0.2)

AnyVar Unit1.TickInside Size of tick inside the plotting area. (=0)AnyVar Unit1.TickOutside Size of tick outside the plotting area. (=0)AnySwitchVar Unit1.GridLines Switch for visibility of the grid lines. (=Off,

Options: Off | On)AnyStyleDrawLine Unit1.GridLineStyle Style settings for the grid lines.AnyEnumLine3DStyle Unit1.GridLineStyle.-

StyleLine style. (=Line3DStyleFull, Options:Line3DStyleFull)

AnyVar Unit1.GridLineStyle.-Thickness

Line thickness. (=1)

AnyRGB Unit1.GridLineStyle.-RGB

Color in RGB values between 0 and 1. (={0, 0,0})

AnySwitchVar Unit1.Text Switch for visibility of the unit text. (=On, Op-tions: Off | On)

AnyStyleFont Unit1.TextFont Font settings for the unit text.AnyRGB Unit1.TextFont.RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar Unit1.TextFont.-

FontNameFont name (Windows fonts). (="Times NewRoman")

AnyIntVar Unit1.TextFont.-Height

Font height. (=10)

AnyIntVar Unit1.TextFont.Width Font width. (=4)AnySwitchVar Unit1.TextFont.Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar Unit1.TextFont.Italic Switch for italic type setting. (=Off, Options:

Off | On)AnyVar Unit1.TextSpace Space between the unit text and the axis. (=0)AnyStyleNumeric2 Unit1.NumberFormat Format settings for the unit text.AnyIntVar Unit1.Number-

Format.DigitsNumber of digits in output. Disregarded ifsmaller than one. (=8)

AnyIntVar Unit1.Number-Format.Style

Style of the numeric output. (=0)

AnySwitchVar Unit1.Number-Format.Scale

Switch for scaling. (=Off, Options: Off | On)

AnyVar Unit1.Number-Format.ScaleVal

Scaling factor. (=1)

Page 274: Any Script Ref Manual

261

AnyStyleDrawLineType: AbstractBase Class: AnyStyleDraw (see p. 247)

Description:Class that holds a line style definition.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyEnumLine3DStyle Style Line style. (=Line3DStyleFull, Options:

Line3DStyleFull)AnyVar Thickness Line thickness. (=1)AnyRGB RGB Color in RGB values between 0 and 1. (={0, 0,

0})

Page 275: Any Script Ref Manual

262

AnyStyleDrawLineWithCapsType: AbstractBase Class: AnyStyleDrawLine (see p. 261)

Description:Class that holds a line style definition for lines with ending caps.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVar Thickness Line thickness.

Optional-Initialization MembersClass Name DescriptionAnyEnumLine3DStyle Style Line style. (=Line3DStyleFull, Options:

Line3DStyleFull)AnyRGB RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStyleDrawLineCap Start Style folder for starting cap of line.AnyEnumLine3DCap-Style

Start.Style Cap style. This can optionally be an arrayproducing a line cap composed of multiplesimple caps styles, one for each element ofthe array. (Options: Line3DCapStyleVoid |Line3DCapStyleNone | Line3DCapStyleDisk| Line3DCapStyleCylinder |Line3DCapStyleEllipsoid |Line3DCapStyleArrow)

AnyRGB Start.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyVar Start.Thickness Cap thickness (must be larger than line thick-ness). (=0)

AnyVar Start.Length Cap length. (=0)AnyStyleDrawLineCap End Style folder for ending cap of line.AnyEnumLine3DCap-Style

End.Style Cap style. This can optionally be an arrayproducing a line cap composed of multiplesimple caps styles, one for each element ofthe array. (Options: Line3DCapStyleVoid |Line3DCapStyleNone | Line3DCapStyleDisk| Line3DCapStyleCylinder |Line3DCapStyleEllipsoid |Line3DCapStyleArrow)

Page 276: Any Script Ref Manual

263

AnyRGB End.RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyVar End.Thickness Cap thickness (must be larger than line thick-ness). (=0)

AnyVar End.Length Cap length. (=0)

Page 277: Any Script Ref Manual

264

AnyStyleDrawPointMarkersType: AbstractBase Class: AnyStyleDraw (see p. 247)

Description:Class that holds style definitions for one or multiple sets of point markers for curves.

Each style-defining member of this class can hold several values, each of them defining an attributefor one line. Exceeding amount of values are disregarded and in case of to few values, the valuesare reused cyclicly. For instance the definition of three colors for six lines results in 2 lines of eachcolor, and three colors for two lines results in the last color not being used.

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitchVar Visible Switch for markers to be shown or not. (=On,

Options: Off | On)AnyEnumPointMarker-Style

Style Marker style. (Options: PointStyleNone |PointStyleBox | PointStyleSphere | PointStyle-Star | PointStyleCross | PointStyleCross2)

AnyFloat Size Size of markers. (="No values given")AnyInt SkipPoints Amount of points between every visible marker.

(="No values given")

Page 278: Any Script Ref Manual

265

AnyStyleDrawLinesType: AbstractBase Class: AnyStyleDraw (see p. 247)

Description:Class that holds style definitions for multiple lines.

Each style-defining member of this class can hold several values, each of them defining an attributefor one line. Exceeding amount of values are disregarded and in case of to few values, the valuesare reused cyclicly. For instance the definition of three colors for six lines results in 2 lines of eachcolor, and three colors for two lines results in the last color not being used.

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitchVar Visible Switch for lines to be shown or not. (=On, Op-

tions: Off | On)AnyEnumLineStyle Style Line style. (Options: LineStyleNone | Line-

StyleFull | LineStyleHidden)AnyRGBs RGB Color in RGB values between 0 and 1. A matrix

with 3 columns holding the RGB values and arow for each color (="No values given")

AnyFloat Thickness Line thickness. (="No values given")

Page 279: Any Script Ref Manual

266

AnyStyleDrawLineCapType: AbstractBase Class: AnyStyleDraw (see p. 247)

Description:Class that holds a line-end style definition.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyEnumLine3DCap-Style

Style Cap style. This can optionally be an arrayproducing a line cap composed of multiplesimple caps styles, one for each element ofthe array. (Options: Line3DCapStyleVoid |Line3DCapStyleNone | Line3DCapStyleDisk| Line3DCapStyleCylinder |Line3DCapStyleEllipsoid |Line3DCapStyleArrow)

AnyRGB RGB Color in RGB values between 0 and 1. (={0, 0,0})

AnyVar Thickness Cap thickness (must be larger than line thick-ness). (=0)

AnyVar Length Cap length. (=0)

Page 280: Any Script Ref Manual

267

AnyStyleNumericType: AbstractBase Class: AnyStyle (see p. 246)

Description:Base class for all classes containing numeric style definitions.

Page 281: Any Script Ref Manual

268

AnyStyleNumeric1Type: AbstractBase Class: AnyStyleNumeric (see p. 267)

Description:Class defining number formats for output.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyIntVar Digits Number of digits in output. Disregarded if

smaller than one. (=8)

Page 282: Any Script Ref Manual

269

AnyStyleNumeric1fType: AbstractBase Class: AnyStyleNumeric1 (see p. 268)

Description:Class defining number formats for output. This class contains extended formatting capabilitiescompared to the parent class, AnyStyleNumeric1. A fixed amount of space, the width, and a style,decimal or scientific notation, can be assigned to the output, in addition to the precission alreadygiven by the number of digits after the decimal point.

A more detailed and versatile formatting can achieved with C-style formatting specification knownfrom the printf() function. This is done by the FormatStr member, which overrides any otherspecification.

FormatStr = "%[flags] [width] [.precision] [{h | l | ll | I | I32 | I64}]type"

type: f: Signed value having the form [ ?]d.d, where d is one or more decimal digits. The numberof digits before the decimal point depends on the magnitude of the number, and thenumber of digits after the decimal point depends on the requested precision.

e: Signed value having the form [ ?]d.d e [sign]d where d is one or more decimal digits,depending on the output format and size of the exponent, and sign is + or ?

E: Identical to e, but using uppercase ’E’ instead of lowercase ’e’.

g: Signed value printed in f or e format, whichever is more compact for the given value andprecision. The e format is used only when the exponent of the value is less than ? orgreater than or equal to the precision argument. Trailing zeros are truncated, and thedecimal point appears only if one or more digits follow it.

G: Identical to g, but using the E format instead of e.

flags: -: Left align the result within the given field width.

+: Prefix the output value with a sign (+ or ? if the output value is of a signed type.

0: If width is prefixed with 0, zeros are added until the minimum width is reached. If 0 and?appear, the 0 is ignored. If 0 is specified with an integer format (i, u, x, X, o, d) and aprecision specification is also present (for example, %04.d), the 0 is ignored.

Blank ”: Prefix the output value with a blank if the output value is signed and positive; theblank is ignored if both the blank and + flags appear.

#: When used with the o, x, or X format, the # flag prefixes any nonzero output value with 0,0x, or 0X, respectively.

When used with the e, E, f, a or A format, the # flag forces the output value to contain adecimal point in all cases.

When used with the g or G format, the # flag forces the output value to contain a decimalpoint in all cases and prevents the truncation of trailing zeros.

Ignored when used with c, d, i, u, or s.

Page 283: Any Script Ref Manual

270

width: The width argument is a nonnegative decimal integer controlling the minimum number ofcharacters printed. If the number of characters in the output value is less than the specifiedwidth, blanks are added to the left or the right of the values ?depending on whether the ?flag(for left alignment) is specified ?until the minimum width is reached. If width is prefixed with0, zeros are added until the minimum width is reached (not useful for left-aligned numbers).

The width specification never causes a value to be truncated. If the number of characters inthe output value is greater than the specified width, or if width is not given, all characters ofthe value are printed (subject to the precision specification).

precision: f: The precision value specifies the number of digits after the decimal point. If a decimalpoint appears, at least one digit appears before it. The value is rounded to the appropriatenumber of digits.

e,E: The precision specifies the number of digits to be printed after the decimal point. Thelast printed digit is rounded.

g,G: The precision specifies the maximum number of significant digits printed.

Notice that not some output functions may not support all possible formats in FormatStr, dependingon their implementation.

Notice also that FormatStr has higher priority that Digits, Width, and Style; the lower prioritiesattributes cannot be initialized togther with FormatStr, but their values are set from FormatStr, ifpossible.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyIntVar Digits Number of digits in output. Disregarded if

smaller than one. (=8)AnyIntVar Width Number of character spaces reserved for the

number in output. Disregarded if smaller thanone. (=0)

AnyEnumFloat-NumberStyle

Style Style specification. (=CompactNumber, Op-tions: DecimalNumber | ScientificNumber |CompactNumber)

AnyStringVar FormatStr Complete format specification using C-stylecharacter specification known from the printf()function. This overrides the any other specifi-cation. If not specified by the user it is deter-mined automatically from the other specifica-tion. (="")

Page 284: Any Script Ref Manual

271

AnyStyleNumeric2Type: AbstractBase Class: AnyStyleNumeric1 (see p. 268)

Description:Class defining number formats for output.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyIntVar Digits Number of digits in output. Disregarded if

smaller than one. (=8)AnyIntVar Style Style of the numeric output. (=0)AnySwitchVar Scale Switch for scaling. (=Off, Options: Off | On)AnyVar ScaleVal Scaling factor. (=1)

Page 285: Any Script Ref Manual

272

AnyStyleFontType: AbstractBase Class: AnyStyle (see p. 246)

Description:Base class for all drawing style classes.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyRGB RGB Color in RGB values between 0 and 1. (={0, 0,

0})AnyStringVar FontName Font name (Windows fonts). (="Times New

Roman")AnyIntVar Height Font height. (=10)AnyIntVar Width Font width. (=4)AnySwitchVar Bold Switch for bold face type setting. (=Off, Op-

tions: Off | On)AnySwitchVar Italic Switch for italic type setting. (=Off, Options:

Off | On)

Page 286: Any Script Ref Manual

273

AnyOutputFileHeaderFormatType: HiddenBase Class: AnyStyle (see p. 246)

Description:

Object Members:Optional-Initialization Members

Class Name DescriptionAnySwitchVar TitleSectionOnOff Switch for the title section. (=On, Options: Off

| On)AnySwitchVar ConstSectionOnOff Switch for the header section containing

constant variables. (=On, Options: Off | On)AnySwitchVar VarSectionOnOff Switch for the variable description section.

(=On, Options: Off | On)AnySwitchVar ColumnNamesOnOff Switch for the row containing the column

names in the data section. (=On, Options: Off |On)

AnyStringVar LinePrefix String containing a line prefix used for all linesof the header section. (="")

Page 287: Any Script Ref Manual

Chapter 6

Studies and Operations

This chapter holds descriptions of studies and the interfaces to their functionality, operations. A’study’ in AnyBodyTM is a class that can analyze the objects supplied to it. ’Studies’ are essentialto any modeling in AnyBodyTM, since they produce the actual output. Each ’study’ has specificfunctionalities, for instance the AnyMechStudy, which is the fundamental study for kinematic anddynamic analysis of mechanical systems, and the AnyBodyStudy, which is a derived class withextended functionality for body modeling. An ’operation’ is a class that can execute functions inthe ’studies’. All ’operations’ are available in the operation window, typically located in the lowerleft part of main window of AnyBodyTM’s GUI, from where they can be controlled.

Numerical output is typically stored in a special folder of type AnyOutputFolder with the objectname Output. Notice that several studies can exist in the same model (.any file) and they can evenwork on the same objects, i.e., the same model elements. Thereby they can to some extent exchangedata since a function in one study leaves the objects in new states, which then can be the startingpoint for another study. If used carefully this can exploited in advanced combined modeling tasks.

In this chapter we shall consider two other branches for classes. The AnyOprSet classes are classesthat provide interfaces to operation settings. These are typical members of ’studies’ and ’operations’.The second branch is classes derived from AnyDataFileBase that contain interfaces to external datasuch as data files and databases. These classes are typically used together with ’studies’ to importdata to be analyzed and to export the results obtained by the ’study’.

In the following, sections covering ’studies’, ’operations’, ’operation settings’ and external datainterface classes are found.

6.1 Studies

AnyStudy (see p. 276)AnyDesStudy (see p. 277)

AnyDesEvalStudy (see p. 279)AnyParamStudyBase (see p. 280)

AnyParamStudy1D (see p. 281)AnyParamStudy (see p. 283)

274

Page 288: Any Script Ref Manual

275

AnyOptStudy (see p. 285)AnyTimeStudy (see p. 288)

AnyMechStudyBase (see p. 289)AnyKinStudy (see p. 291)

AnyBodyCalibrationStudy (see p. 294)AnyBodyStudy (see p. 298)AnyMechStudy (see p. 304)

AnyMechStudy1 (see p. 308)AnyBodyStudy1 (see p. 311)

Page 289: Any Script Ref Manual

276

AnyStudyType: AbstractBase Class: AnyConfigFolder (see p. 24)

Description:This is the base class from which all studies are derived. A "study" is a class that contains a certaintype of investigation of the model. This implies that it is a combination of mathematical problemand task definitions, solver procedures, and storage of results. Tasks can be performed by executing(running) associated operations (objects of AnyOperation-derived classes), which appear as memberobjects in the study. Occasionally, the operations are refered to as "analyses."

All studies have a member (folder) called Output defined in AnyStudy. This folder contains theresults that are computed during the executed operations. Only one set of output is stored; thus,executing a new operation after another will typically overwrite the previously stored results.

The output typically consist of variations of certain quantities over one or more parameters. A par-ticular, AnyStudy-derived study class defines these basic parameters (also referred to as independentor abscissa values) as well as which dependent quantities to be inluded in the output; rules to deter-mine the dependent quantities are implemented an integral part of the study. For instance a simplerule could be to include all quantities (AnyFloats) that dependent on the independent parameters.The independent (abscissa) parameter values can be found in Output.Abscissa folder.

A study does normally not operate on "the whole model", i.e., on everything inside Main; it onlyoperates on what is inside the study scope. Typically, a model is created in the script in its ownfolder. In order to include it in the study, a reference from the scope of the study to the modelfolder must then be made. The model could be made directly inside the study, but keeping it outsideprovides a nice separation in particular for case where the model or parts of it must subjected toseveral studies.

Notice that a study that operates on a model (also if just through a reference as described above)changes values in the objects of the model, even though the objects are located outside the study.A subsequent study/operation will then operate on these altered values. This implies the the se-qeuence of operations/study analyses does matter. This is typically exploited by using one study tosystematically prepare the model data for a another study that is the real objective of your work.

Object Members:Denied-Access Members

Class Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).

Page 290: Any Script Ref Manual

277

AnyDesStudyType: AbstractBase Class: AnyStudy (see p. 276)

Description:This class is the (abstract) base class of all "design studies". A design study is a study that system-atically changes parameters (design variables) in the model and analyses their effects.

The design variables are defined by the user by declaration of AnyDesVar-members. The effect ofthe design variables is measured ("design measures") by objects of the type AnyDesMeasure. Thesemust also be declared in the study for it to be meaningful.

You can declare multiple design variables as well as multiple design measures. Notice that AnyDesVar-members are equipped with a range specification for the design variable. Notice also that designmeasures can be type-specified. These range and type specifications may give the particular mem-bers special significances in the various AnyDesStudy-derived classes.

Design variables (by AnyDesVar objects) will typically link to real quantities inside objects of themodel. By means of these links, the design studies can actually change the values of the realvariables in the model. This implies that the model data will actually change during execution ofoperations and the model data may end up in a different state than before the operation.

Apart from the AnyDesVar and AnyDesMeasure members, which are to be declared by the user, adesign study contains one more important member. This is the analysis operation called Analysis.It is the operation that is executed by the AnyDesStudy-derived studies after changing the designvariable and before measuring their effect. Analysis is an AnyOperationSequence, which, upondeclaration of the study, is empty. It must be filled by the user in order for the study to haveanything to measure on. Here you can enter one or more anlysis operations from other studies, butplease notice that the sequence may be important.

The design study contains Class Operations for saving and loading values of the design variables.The file format is a simple text based format where each line contain the variable name (short name)followed by the value. Saving design variables will write such a file for you. Loading design valueswill load and update the design variables’ values, but only when the found values are within thebounds specified by the associated AnyDesVar-member. Design variables that are not found in thefile are not updated and design variable entries in the file, that does not match any variable in thestudy, have no effect. This rather low-level functionality allows the user to load files saved by onestudy from another study. This can be useful, but it is the sole responsibility of the user to take careabout proper matching between the definitions in the files and studies.

Object Members:

Page 291: Any Script Ref Manual

278

Expected MembersClass Number DescriptionAnyDesVar [1..Inf] Design variables of the study are defined as

AnyDesVar objects.AnyDesMeasure [1..Inf] Design performance measures are defined as

AnyDesMeasure objects.

Optional-Initialization MembersClass Name DescriptionAnyFileVar LogFile Optional log file for use by the numerical rou-

tines in the operations. It may not be used byall type of AnyDesStudy; the file will be emptywhen not used by the study. (="")

AnyOperation-Sequence

Analysis This analysis operation.

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).

Page 292: Any Script Ref Manual

279

AnyDesEvalStudyType: CreatableBase Class: AnyDesStudy (see p. 277)

Description:This class can evaluate design variable values based the output of other studies.

In this specialization of the AnyDesStudy, you must define as many design measures (AnyDes-Measure) as you have defined design variables (AnyDesVar).

The study computes the value of the design measures and set the value of design variables equal tothese. The only restriction is that the computed values have to obey the boundaries on the designvariables; otherwise the closest bound valueis adopted as the final result. The sequence of the dec-laration of design variable and measures determine which variable are equalled to which measuredvalues.

Object Members:Expected Members

Class Number DescriptionAnyDesVar [1..Inf] Design variables of the study are defined as

AnyDesVar objects.AnyDesMeasure [1..Inf] Design performance measures are defined as

AnyDesMeasure objects.

Optional-Initialization MembersClass Name DescriptionAnyFileVar LogFile Optional log file for use by the numerical rou-

tines in the operations. It may not be used byall type of AnyDesStudy; the file will be emptywhen not used by the study. (="")

AnyOperation-Sequence

Analysis This analysis operation.

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyDesEvalStudyOpr UpdateDesign Operation that executes the analysis and up-

dates the values of the design variables.

Page 293: Any Script Ref Manual

280

AnyParamStudyBaseType: AbstractBase Class: AnyDesStudy (see p. 277)

Description:This is an abstract base-class for parameter studies. Parameter studies are classes that can performsystematic variations of the parameters in a design model. Plese refer to the derived classes for moreinformation about the possible parameter variation schemes.

After the parameter study is completed, the design variables are reset to the original values, so thestudy does not alter the design state except during the analysis. Design variable expressions areupdated with the original design values, but there is not run any further analyses routines, whichimplies that computed values, hereunder design measures, are not updated after the last step in theparameters study; they still hold the final values from this step.

Object Members:Expected Members

Class Number DescriptionAnyDesVar [1..Inf] Design variables of the study are defined as

AnyDesVar objects.AnyDesMeasure [1..Inf] Design performance measures are defined as

AnyDesMeasure objects.

Optional-Initialization MembersClass Name DescriptionAnyFileVar LogFile Optional log file for use by the numerical rou-

tines in the operations. It may not be used byall type of AnyDesStudy; the file will be emptywhen not used by the study. (="")

AnyOperation-Sequence

Analysis This analysis operation.

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyParamStudyOpr ParameterStudy Operation that executes the parameter study.

Page 294: Any Script Ref Manual

281

AnyParamStudy1DType: CreatableBase Class: AnyParamStudyBase (see p. 280)

Description:This class can perform a systematic variation of the parameters in a design model. The class nameending, 1D, refers to that thi parameters study is a one-dimensional study. It simply executes asequence of analyses and stores the design analysis results after each step.

The values of the design variables can, without regards of their bounds, be specified in the Design-Value table (matrix).

Object Members:Expected Members

Class Number DescriptionAnyDesVar [1..Inf] Design variables of the study are defined as

AnyDesVar objects.AnyDesMeasure [1..Inf] Design performance measures are defined as

AnyDesMeasure objects.

Obligatory-Initialization MembersClass Name DescriptionAnyMatrix DesignValues Matrix (or table) of the values of the design

variables. Each row in the matrix in one designvector and its length must therefore match thenumber of design variables.

Optional-Initialization MembersClass Name DescriptionAnyFileVar LogFile Optional log file for use by the numerical rou-

tines in the operations. It may not be used byall type of AnyDesStudy; the file will be emptywhen not used by the study. (="")

AnyOperation-Sequence

Analysis This analysis operation.

AnySwitchVar EnforceBounds Switch for whether to enforce design variableupper and lower bounds. If On the design val-ues outside the given bounds are moved to near-est bound; if Off the design bounds are disre-garded. (=Off, Options: Off | On)

Denied-Access MembersClass Name Description

Page 295: Any Script Ref Manual

282

AnyOutputFolder Output Folder that holds the result of the latest executedanalysis (operation).

AnyParamStudyOpr ParameterStudy Operation that executes the parameter study.AnyFloatVar IterationStep Step counter of the analysis sequence. (=0)

Page 296: Any Script Ref Manual

283

AnyParamStudyType: CreatableBase Class: AnyParamStudyBase (see p. 280)

Description:This class can perform a systematic variation of the parameters in a design model.

The parameter variation is performed in a simple rectangular grid between the bounds of the designvariables (AnyDesVar-members). The nStep is a vector that specifies the density of this grid; eachcomponent of the vector is the number of resolution step for each dimension of the design space.This implies that nStep must have the same number of components as there are design variables(AnyDesVar-members).

Future releases:We are aware that the rectangular grid is a very simple and crude functionality for makinggeneral parameter studies that may even be even prohibitive for some practical applicationsdue inflexible control and/or computational cost. We are therefore prepared to consider ex-tensions of these facilities depending on demand and will be grateful for any requests andcomments from the users.

Object Members:Expected Members

Class Number DescriptionAnyDesVar [1..Inf] Design variables of the study are defined as

AnyDesVar objects.AnyDesMeasure [1..Inf] Design performance measures are defined as

AnyDesMeasure objects.

Obligatory-Initialization MembersClass Name DescriptionAnyIntArray nStep Number of steps in the parameter variation.

Each component in the vector corresponds toone parameter to be varied.

Optional-Initialization MembersClass Name DescriptionAnyFileVar LogFile Optional log file for use by the numerical rou-

tines in the operations. It may not be used byall type of AnyDesStudy; the file will be emptywhen not used by the study. (="")

AnyOperation-Sequence

Analysis This analysis operation.

Page 297: Any Script Ref Manual

284

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyParamStudyOpr ParameterStudy Operation that executes the parameter study.

Page 298: Any Script Ref Manual

285

AnyOptStudyType: CreatableBase Class: AnyDesStudy (see p. 277)

Description:This study does optimization. It varies design parameters systematically with the aim of optimizinga certain criterion. Additionally, constraints can be applied to the process.

Mathematically, the optimization can be formulated as

minimize F (x)x

subject to gj(x) ≤ 0, j = 1,mhk(x) = 0, k = 1, l

x(l)i ≤ xi ≤ x

(u)i , i = 1, n

(6.1)

where x is a vector of the n design variable defined by AnyDesVar objects. F is the so-calledobjective function, which is defined by correct type specification of one of the AnyDesMeasureobjects. The constraints, gj and hk, are also defined proper type specification of the remainingAnyDesMeasure objects. The final row is the simple bounds on the design variable xi; the lowerand upper bounds, x

(l)i and x

(u)i , are defined for each design variable in the AnyDesVar objects.

Please notice that none of the current solvers handle equality constraints, so this option in the Any-DesMeasure is currently only a preparation of the system for future use.

The optimization processes inside AnyOptStudy is handled as a sequential process doing repetitivestep, each improving (or trying to improve) the design. The basic independent parameter (abscissavalue) in the optimization operation is the iteration step and the output of design variable values anddesign measures are stored for each such design step in the Output folder.

The optimization solver is configured in the operation member, Optimization. Current AnyOpt-Study provides the following solvers.

Simple search: (Optimization.Solver = OptSimpleSearch) This method employs a simple schemesearching in the direction of each of the design variables in turn. A golden-section line searchis used in each direction.

Steepest descent based feasible direction search method: (Optimization.Solver = OptFeasible-DirSearch1) This method is based on the steepest descent search method approach for un-constrained optimization problems. In order to account for constraints, the search direction ismodified to avoid constraint violations. A golden-section line search is used in the obtainedsearch direction to improve the design point.

The method is based on numerical sensitivity analysis for finding gradient; the perturbationis configurable in the solver settings. Furthermore, settings for convergence control and con-straint activation handling is available in the settings.

Page 299: Any Script Ref Manual

286

Conjugate direction based feasible direction search method: (Optimization.Solver = OptFeasible-DirSearch2) This method is the same as the previously mentioned, but with the small modifi-cation that it employ the well-known conjugate direction modifications of the search directionto increase the speed of convergence in ill-conditioned problems. This modification is onlyapplied to regions where steepest descent method is previously used, i.e., regions with noactive constraints.

Future releases:We acknowledge that the currently available facilities in the AnyOptStudy are limited and wemust emphazise that they may not solve any possible optimization problem. Optimization isa complicated field and indeed mechanical and biomechanical problems can be particularlydifficult to deal with. The AnyOptStudy has been made available in AnyBodyTM version 2.0for the first time and depending on the experiences, we will aim at developing it further infuture releases.An alternative option to the facilities in AnyOptStudy is to use AnyBodyTM’s console applica-tion together with an external optimization routine.We are always prepared to consider extentions of these optimization facilities arising fromactual demands and will be grateful for any requests and comments from the users.

Object Members:Expected Members

Class Number DescriptionAnyDesVar [1..Inf] Design variables of the study are defined as

AnyDesVar objects.AnyDesMeasure [1..Inf] Design performance measures are defined as

AnyDesMeasure objects.

Optional-Initialization MembersClass Name DescriptionAnyFileVar LogFile Optional log file for use by the numerical rou-

tines in the operations. It may not be used byall type of AnyDesStudy; the file will be emptywhen not used by the study. (="")

AnyOperation-Sequence

Analysis This analysis operation.

AnyIntVar MaxIterationStep Maximal number of iterations allowed. (=100)AnyEnumOptSolver Optimization.Solver Solver type setting.

(=OptFeasibleDirSearch1, Options: Opt-SimpleSearch | OptFeasibleDirSearch1 | Opt-FeasibleDirSearch2)

AnyVar Optimization.-Convergence-ObjectiveTol

Absolute tolerance on objective functionchange in convergence criterion. (=1e-005)

Page 300: Any Script Ref Manual

287

AnyVar Optimization.-ConvergenceDesign-Tol

Relative tolerance on design variable change inconvergence criterion. (=1e-005)

AnyVector Optimization.-ConvergenceDesign-TolArr

Similar to ConvergenceObjectiveTol, but an ar-ray with one element for each design variable.Default is all values equal to ConvergenceOb-jectiveTol. (="No values given")

AnyVar Optimization.-ConstraintActivation-Tol

Absolute tolerance for activating constraints.(=0.0001)

AnyVector Optimization.-ConstraintActivation-TolArr

Similar to ConstraintActivationTol, but an arraywith one element for each constraint. Defaultis all values equal to ConstraintActivationTol.(="No values given")

AnyVar Optimization.-NumSensitivity-Perturbation

Absolute perturbation use in numerical sensitiv-ity analyses. (=1e-005)

AnyVector Optimization.-NumSensitivity-PerturbationArr

Similar to NumSensitivityPerturbation, but anarray with one element for each design variable.Default is all values equal to NumSensitivityPe-rturbation. (="No values given")

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyFloatVar IterationStep Current iteration step. (=0)AnyOptStudyOpr Optimization Operation that executes the optimization.

Page 301: Any Script Ref Manual

288

AnyTimeStudyType: AbstractBase Class: AnyStudy (see p. 276)

Description:This is the base class for all studies with time, t, as independent variable, for instance studies ofordinary differential equations in time.

In AnyBodyTM today, this is the parent for mechanical studies (AnyMechStudyBase), which "studies"the mechanical (differential) equations of motion of rigid body systems and the derived study formusculoskeletal systems called AnyBodyStudy.

In principle, this class can be used for other independent quantities than time, provided that it is ascalar.

Object Members:Denied-Access Members

Class Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyVar t Time. (=0)

Page 302: Any Script Ref Manual

289

AnyMechStudyBaseType: CreatableBase Class: AnyTimeStudy (see p. 288)

Description:This is the base class from which all mechanical models (studies) are derived.

Notice that the Object Description is extended with Mechanical System Information that providesan overview of system degrees of freedom as well as kinematical and kinetical constraints.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVec3 Gravity The acceleration of gravity.

Optional-Initialization MembersClass Name DescriptionAnyVar tStart Initial time. (=0)AnyVar tEnd Final time. (=1)AnyIntVar nStep Number of equally spaced time steps (plus one).

Both tStart and tEnd are counted as time steps.(=101)

AnyVector tArray Array of output-time values. This provides analternative input to even spacing obtained bysetting nStep. (={0, 0.01, 0.02, 0.03, 0.04,0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12,0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2,0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28,0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36,0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44,0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52,0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6,0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68,0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76,0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84,0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92,0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1})

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyVar t Time. (=0)

Page 303: Any Script Ref Manual

290

AnyVar KinematicError Current value of the kinematic error. (=0)AnyVar Ekin Current kinematic energy of the system. (=0)AnyVar Epot Current potential energy of the system. (=0)AnyVar Emech Current mechanical energy of the system

(=Ekin+Epot). (=0)AnyVar Pmech Current mechanical power applied to the sys-

tem.(=0)

Page 304: Any Script Ref Manual

291

AnyKinStudyType: CreatableBase Class: AnyMechStudyBase (see p. 289)

Description:This study class comprises operations for kinematical analysis.

The kinematical analysis requires the system to be kinematically determinate, implying that theremust be enough kinemtical constraints to determine all degrees of freedom in the system.

The kinematical analysis is carried out by operations of the class AnyMechOprKinAnl. The Initial-Conditions operation is a single step kinematical analysis that is aimed at assembling the mecha-nism for initial positioning.

The Kinematics operation performs sequentiel analysis of all time steps defined in the study. TheKinematics operation uses InitialConditions as pre-process, so the mechanism is assembled ro-bustly before starting the analysis.

Please study the AnyMechOprKinAnl class for more details on the kinematic analysis.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVec3 Gravity The acceleration of gravity.

Optional-Initialization MembersClass Name DescriptionAnyVar tStart Initial time. (=0)AnyVar tEnd Final time. (=1)AnyIntVar nStep Number of equally spaced time steps (plus one).

Both tStart and tEnd are counted as time steps.(=101)

Page 305: Any Script Ref Manual

292

AnyVector tArray Array of output-time values. This provides analternative input to even spacing obtained bysetting nStep. (={0, 0.01, 0.02, 0.03, 0.04,0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12,0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2,0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28,0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36,0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44,0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52,0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6,0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68,0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76,0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84,0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92,0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1})

AnyMechOprKinAnl InitialConditions Operation that sets initial conditions, i.e., as-sembles the mechanism etc., according to thefirst time step of the study.

AnyMechOprSub-Process

InitialConditions.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

InitialConditions.-PostOperation

Post-process operation.

AnyVar InitialConditions.-KinematicTol

Tolerance for the kinematic analysis. (=1e-006)

AnyIntVar InitialConditions.-MaxIteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar InitialConditions.-Relax

Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar InitialConditions.-SingleStepOnOff

Switch for the single-step analysis. (=Off, Op-tions: Off | On)

AnyIntVar InitialConditions.-SingleStepNo

Zero-based index for the time step to use in thesingle-step analysis. (=0)

AnyMechOprKinAnl Kinematics Kinematic analysis operation that processesall time steps of the study. It uses Ini-tial_Conditions as pre-process (only for kine-matically determinate system).

AnyMechOprSub-Process

Kinematics.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

Kinematics.Post-Operation

Post-process operation.

AnyVar Kinematics.-KinematicTol

Tolerance for the kinematic analysis. (=1e-006)

AnyIntVar Kinematics.Max-Iteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

Page 306: Any Script Ref Manual

293

AnyVar Kinematics.Relax Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar Kinematics.Single-StepOnOff

Switch for the single-step analysis. (=Off, Op-tions: Off | On)

AnyIntVar Kinematics.Single-StepNo

Zero-based index for the time step to use in thesingle-step analysis. (=0)

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyVar t Time. (=0)AnyVar KinematicError Current value of the kinematic error. (=0)AnyVar Ekin Current kinematic energy of the system. (=0)AnyVar Epot Current potential energy of the system. (=0)AnyVar Emech Current mechanical energy of the system

(=Ekin+Epot). (=0)AnyVar Pmech Current mechanical power applied to the sys-

tem.(=0)

Page 307: Any Script Ref Manual

294

AnyBodyCalibrationStudyType: CreatableBase Class: AnyKinStudy (see p. 291)

Description:The AnyBodyCalibrationStudy contains functionality for adjusting the musculoskeletal models sys-tematically. We refer to this as a calibration of the model, therefrom the origin of class name.

Often the parameters of such models are many, so that manual adjustment is exhaustive or impossi-ble. Moreover adjustment of parameters for given parts of the model, such as muscles or ligaments,are typically based on some global measures of the whole body or the particular limb. For instance,one may know fairly accurately in which position of the knee, the thigh muscles have the optimalposition, but converting this into an accurate adjustment of the muscle and tendon length requiresdetailed information about the muscle kinematics.

This study provides general and easy applicable parameter adjustment schemes of this sort. Yousupply a kinematically determinate model to the study (i.e. drivers of all degrees of freedom), sim-ilarly to when using the AnyBodyStudy for kinematic or inverse dynamic analyses. The definitionof the kinematics, as either a fixed position or a motion, defines the positions for which the model’sparameters are adjusted.

The model needs only include the elements that are needed to define the elements to be calibrated.Thus only the muscles and ligaments to be calibrated by this study should be included, along withthe mechanical parts they are attached to, i.e., segments, joints, and drivers.

The following types of calibrations are available:

Muscle Tendon Length Calibration In this calibration method, the length of the muscle tendonsare adjusted so that the muscle’s fiber length coincide with the optimal fiber length for thegiven position of the system.

Ligament Length Calibration In this calibration method, the length of the ligaments are adjustedso that the given position of the system corresponds to the undeformed ligament, i.e., the zeroforce position.

Notice that if motion has be specified for the system, then the average of the bounds of the range ofmotion for each muscle or ligament is used as the "given position".

Notice also that not all types of muscle models (AnyMuscleModel) and ligament models (Any-LigamentModel) necessarily are handled by these calibrations.

Future releases:This type of calibration of musculoskeletal models is an area of research and it must expectedthat the functionality will change and be extended along with appearance of new methods. Wewill be happy for any suggestions for suitable methods that could improve the functionality inthis class.

Page 308: Any Script Ref Manual

295

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVar tStart Initial time. (=0)AnyVar tEnd Final time. (=1)AnyIntVar nStep Number of equally spaced time steps (plus one).

Both tStart and tEnd are counted as time steps.(=101)

AnyVector tArray Array of output-time values. This provides analternative input to even spacing obtained bysetting nStep. (={0, 0.01, 0.02, 0.03, 0.04,0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12,0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2,0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28,0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36,0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44,0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52,0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6,0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68,0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76,0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84,0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92,0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1})

AnyMechOprKinAnl InitialConditions Operation that sets initial conditions, i.e., as-sembles the mechanism etc., according to thefirst time step of the study.

AnyMechOprSub-Process

InitialConditions.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

InitialConditions.-PostOperation

Post-process operation.

AnyVar InitialConditions.-KinematicTol

Tolerance for the kinematic analysis. (=1e-006)

AnyIntVar InitialConditions.-MaxIteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar InitialConditions.-Relax

Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar InitialConditions.-SingleStepOnOff

Switch for the single-step analysis. (=Off, Op-tions: Off | On)

AnyIntVar InitialConditions.-SingleStepNo

Zero-based index for the time step to use in thesingle-step analysis. (=0)

AnyMechOprKinAnl Kinematics Kinematic analysis operation that processesall time steps of the study. It uses Ini-tial_Conditions as pre-process (only for kine-matically determinate system).

Page 309: Any Script Ref Manual

296

AnyMechOprSub-Process

Kinematics.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

Kinematics.Post-Operation

Post-process operation.

AnyVar Kinematics.-KinematicTol

Tolerance for the kinematic analysis. (=1e-006)

AnyIntVar Kinematics.Max-Iteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar Kinematics.Relax Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar Kinematics.Single-StepOnOff

Switch for the single-step analysis. (=Off, Op-tions: Off | On)

AnyIntVar Kinematics.Single-StepNo

Zero-based index for the time step to use in thesingle-step analysis. (=0)

AnyVar KinematicTol Tolerance for the kinematic analysis (DEPRE-CATED). (=0)

AnyVar KinematicMax-Iteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis (DEPRECATED). (=0)

AnyVar KinematicRelax Initial relaxation coefficient for the Newton it-eration (DEPRECATED). (=0)

AnyMechOprSub-Process

TendonLength-Adjustment.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

TendonLength-Adjustment.Post-Operation

Post-process operation.

AnyMechOprSub-Process

LigamentLength-Adjustment.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

LigamentLength-Adjustment.Post-Operation

Post-process operation.

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyVar t Time. (=0)AnyVec3 Gravity The acceleration of gravity. (={0, 0, 0})AnyVar KinematicError Current value of the kinematic error. (=0)AnyVar Ekin Current kinematic energy of the system. (=0)AnyVar Epot Current potential energy of the system. (=0)AnyVar Emech Current mechanical energy of the system

(=Ekin+Epot). (=0)

Page 310: Any Script Ref Manual

297

AnyVar Pmech Current mechanical power applied to the sys-tem.(=0)

AnyMechStudyModel-Info

ModelInformation Operation that provides information about themodel topology (DEPRECATED).

AnyMechOpr-Deprecated

SetInitialConditions Operation for setting initial conditions.

AnyMechOpr-Deprecated

KinematicAnalysis Operation for performing kinematic analysis(only for kinematically determinate system)(DEPRECATED).

AnyMechOpr-Deprecated

InverseDynamic-Analysis

Operation for performing inverse dynamic anal-ysis (only for kinematically determinate sys-tem) (DEPRECATED).

AnyBodyMusTenLen-CalOpr

TendonLength-Adjustment

Operation for calibration of the muscles by ad-justment of their tendon length.

AnyBodyLigament-LenCalOpr

LigamentLength-Adjustment

Operation for calibration of the ligaments byadjustment of their undeformed length.

Page 311: Any Script Ref Manual

298

AnyBodyStudyType: CreatableBase Class: AnyKinStudy (see p. 291)

Description:The AnyBodyStudy is a study-class for doing analysis on a musculoskeletal system (a body andits boundary conditions). Its primary function is to do inverse dynamic analysis of a kinematicallydeterminate mechanical system. The class is derived from AnyKinStudy from which it inheritsoperations for doing kinematic analysis.

The study can be extended by the user with further mechanical operations as any AnyMechStudyBase-derived class can; but by default the class is equipped with the following:

InitialConditions: A kinematic analysis specially aimed at assembling the mechanism of the me-chanical system in its start positions. It is inherited from AnyKinStudy and it does onlyanalyze one time step, typically the first.

Kinematics: Kinematical analysis of all time steps, which is an operation also inherited from Any-KinStudy.

InverseDynamics: The inverse dynamics analysis is an operation that extends the kinematical anal-ysis, Kinematics, with a muscle recruitment solver that distributes the loads arising fromboundary conditions and the prescribed motion.

The inverse dynamics problem is solved by an optimization approach that minimizes somemuscle performance criterion with respect to the unknown forces of the system. The equationsof motion, i.e., the dynamic equilibrium equations, enter the problem as constraints, as wellas the condition that the muscles cannot push.

For more information on how to specify the muscle recruitment criterion, please refer to theInverseDynamics member (see class AnyMechOprInvMuscleDynAnl) and in particular itsmember Criterion (see class AnyOprSetMuscleRecruitment).

Muscle and ligament calibration are an associated features which are available in the AnyBody-CalibrationStudy. These functions assist in adjusting the complicated parameters sets of mus-cles and ligaments according to general kinematical input. For the more advanced muscle models,calibration of muscle parameters is an important step before performing dynamic analysis of themusculo skeletal system.

Future releases:Notice that the AnyBodyStudy was redesigned for AnyBodyTM version 4.0. Therefore, it con-tains a number of deprecated members that serve the sole purpose of providing some backwardcompatibility during loading. The old functionality of AnyBodyStudy has been transferredto the class AnyBodyStudy1. This class is however deprecated and will be removed in a fu-ture version of AnyBodyTM. All muscle recruitment criteria available in the AnyBodyStudy1is also available in AnyBodyStudy, but the numerical solver capabilities are much enhancedin AnyBodyStudy. It it strongly recommended to shift to using AnyBodyStudy for anypurpose.

Page 312: Any Script Ref Manual

299

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVec3 Gravity The acceleration of gravity.

Optional-Initialization MembersClass Name DescriptionAnyVar tStart Initial time. (=0)AnyVar tEnd Final time. (=1)AnyIntVar nStep Number of equally spaced time steps (plus one).

Both tStart and tEnd are counted as time steps.(=101)

AnyVector tArray Array of output-time values. This provides analternative input to even spacing obtained bysetting nStep. (={0, 0.01, 0.02, 0.03, 0.04,0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12,0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2,0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28,0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36,0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44,0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52,0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6,0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68,0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76,0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84,0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92,0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1})

AnyMechOprKinAnl InitialConditions Operation that sets initial conditions, i.e., as-sembles the mechanism etc., according to thefirst time step of the study.

AnyMechOprSub-Process

InitialConditions.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

InitialConditions.-PostOperation

Post-process operation.

AnyVar InitialConditions.-KinematicTol

Tolerance for the kinematic analysis. (=1e-006)

AnyIntVar InitialConditions.-MaxIteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar InitialConditions.-Relax

Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar InitialConditions.-SingleStepOnOff

Switch for the single-step analysis. (=Off, Op-tions: Off | On)

Page 313: Any Script Ref Manual

300

AnyIntVar InitialConditions.-SingleStepNo

Zero-based index for the time step to use in thesingle-step analysis. (=0)

AnyMechOprKinAnl Kinematics Kinematic analysis operation that processesall time steps of the study. It uses Ini-tial_Conditions as pre-process (only for kine-matically determinate system).

AnyMechOprSub-Process

Kinematics.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

Kinematics.Post-Operation

Post-process operation.

AnyVar Kinematics.-KinematicTol

Tolerance for the kinematic analysis. (=1e-006)

AnyIntVar Kinematics.Max-Iteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar Kinematics.Relax Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar Kinematics.Single-StepOnOff

Switch for the single-step analysis. (=Off, Op-tions: Off | On)

AnyIntVar Kinematics.Single-StepNo

Zero-based index for the time step to use in thesingle-step analysis. (=0)

AnyMechOprInv-MuscleDynAnl

InverseDynamics Operation for performing inverse dynamic anal-ysis (only for kinematically determinate sys-tem).

AnyMechOprSub-Process

InverseDynamics.-PreOperation

Pre-process operation.

AnyMechOprSub-Process

InverseDynamics.-PostOperation

Post-process operation.

AnyOprSetMuscle-Recruitment

InverseDynamics.-Criterion

Setting folder for specifying the muscle recruit-ment criterion.

AnyEnumMuscle-RecruitmentType

InverseDynamics.-Criterion.Type

Muscle recruitment criterion type.(=MR_Polynomial, Options:MR_MinMaxStrict | MR_MinMaxAux| MR_Linear | MR_Quadratic |MR_QuadraticAux | MR_Polynomial)

AnySwitchVar InverseDynamics.-Criterion.Upper-BoundOnOff

Switch for whether the upper bound on muscleactivity is active in the criterion. (=On, Op-tions: Off | On)

AnyVar InverseDynamics.-Criterion.Upper-Bound

Value of the upper bound on muscle activity.Typically it is 1.0 implying complete saturationof the muscle capability (=1)

AnyVar InverseDynamics.-Criterion.Power

Power for the MR_Polynomial criterion. (=3)

AnyOprSetMuscle-Recruitment-Normalization

InverseDynamics.-Criterion.Primary-Term

Folder with settings for primary term of themuscle recruitment criterion. The primary termdepends on the Type.

Page 314: Any Script Ref Manual

301

AnyEnumMuscle-Recruitment-NormalizationType

InverseDynamics.-Criterion.Primary-Term.Type

Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar InverseDynamics.-Criterion.Primary-Term.Weight

Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar InverseDynamics.-Criterion.Primary-Term.LowerLimit

Lower bound for muscle quantities entering theterm. (=1)

AnyOprSetMuscle-Recruitment-Normalization

InverseDynamics.-Criterion.AuxLinear-Term

Folder with settings for the auxillary linear termthat is appended to the primary term in somecases.

AnyEnumMuscle-Recruitment-NormalizationType

InverseDynamics.-Criterion.AuxLinear-Term.Type

Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar InverseDynamics.-Criterion.AuxLinear-Term.Weight

Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar InverseDynamics.-Criterion.AuxLinear-Term.LowerLimit

Lower bound for muscle quantities entering theterm. (=1)

AnyOprSetMuscle-Recruitment-Normalization

InverseDynamics.-Criterion.Aux-QuadraticTerm

Folder with settings for the auxillary quadraticterm that is appended to the primary term insome cases.

AnyEnumMuscle-Recruitment-NormalizationType

InverseDynamics.-Criterion.Aux-QuadraticTerm.Type

Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar InverseDynamics.-Criterion.Aux-QuadraticTerm.-Weight

Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar InverseDynamics.-Criterion.Aux-QuadraticTerm.-LowerLimit

Lower bound for muscle quantities entering theterm. (=1)

AnyVar KinematicTol Tolerance for the kinematic analysis (DEPRE-CATED). (=0)

Page 315: Any Script Ref Manual

302

AnyVar KinematicMax-Iteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis (DEPRECATED). (=0)

AnyVar KinematicRelax Initial relaxation coefficient for the Newton it-eration (DEPRECATED). (=0)

AnyMuscle-RecruitmentSolver

RecruitmentSolver Muscle recruitment objective and solver type(DEPRECATED). (=MinMaxSimplex, Op-tions: MinMaxSimplex | MinMaxOOSol-Simplex | MinMaxOOSolQP | MinMaxNR-Simplex | MinMaxAQP)

AnySwitch RecruitmentIterative-Method

Switch for iterative method in the muscle re-cruitment solver (DEPRECATED). (=On, Op-tions: Off | On)

AnyVar RecruitmentLp-Penalty

Linear penalty coefficient in the muscle recruit-ment objective when using linear optimizers(DEPRECATED). (=0)

AnyVar RecruitmentQp-Penalty

Quadratic penalty coefficient in the muscle re-cruitment objective when using quadratic opti-mizers (DEPRECATED). (=0.0001)

AnySwitch ReduceEquilEq Switch for reduction of the number of equi-librium equations in the muscle recruitment.With reduction the reaction forces are elimi-nated (DEPRECATED). (=On, Options: Off |On)

AnyVar ReactionForceLimit Translation value used in the muscle recruit-ment to allow optimizer algorithms that onlyfind positive values to find negative value. Thetranslation value must be larger than the largestnegative value reaction force (DEPRECATED).(=100000)

AnyVar StrongMuscleLimit The lower muscle strength limit (in Newton) formuscles that are included in the muscle recruit-ment. Muscles with strength below this limitare disregarded and their activity is canceled.(=1)

AnyVar MuscleEliminationTol A tolerance that is used during iterative musclerecruitment algorithms for determination of themuscles that can eliminated in a given iterationstep (DEPRECATED). (=0.0001)

AnyVar ActivityLowerLimit Lower limit of muscle activity. This can be usedas a termination criterion of iterative muscle re-cruitment algorithms. (=1e-005)

AnyOprSetNRSimplex NRSimplex Folder with settings for the simplex solverbased on Numerical Recipies, i.e., the solverused in MinMaxNRSimplex option (DEPRE-CATED).

Page 316: Any Script Ref Manual

303

AnyVar NRSimplex.Zero General tolerance for zero testing. (=1e-006)AnyVar NRSimplex.Coef-

ZeroRelRelative zero testing tolerance used while find-ing pivot coefficient. It is the fraction betweenthe real tolerance and the general tolerance,Zero. (=100)

AnyOprSetOOSol-Simplex

OOSolSimplex Folder with settings for the simplex solver fromOOSol, i.e., the solver used in MinMaxOOSol-Simplex option (DEPRECATED).

AnyVar OOSolSimplex.Zero Tolerance for zero testing. (=1e-006)AnyOprSetOOSolQP OOSolQP Folder with settings for the QP solver from

OOSol, i.e., the solver used in MinMaxOO-SolQP option (DEPRECATED).

AnyVar OOSolQP.Zero Tolerance for zero testing. (=1e-006)AnyVar OOSolQP.Pert Numerical gap for equalty constraints entered

as two opposite inequalities. (=0)AnyFileVar EquilEqExportFile-

NameFile for export of the coefficients of the equa-tions of motion for each time step (DEPRE-CATED). (="")

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyVar t Time. (=0)AnyVar KinematicError Current value of the kinematic error. (=0)AnyVar Ekin Current kinematic energy of the system. (=0)AnyVar Epot Current potential energy of the system. (=0)AnyVar Emech Current mechanical energy of the system

(=Ekin+Epot). (=0)AnyVar Pmech Current mechanical power applied to the sys-

tem.(=0)

AnyMechStudyModel-Info

ModelInformation Operation that provides information about themodel topology (DEPRECATED).

AnyMechOpr-Deprecated

SetInitialConditions Operation for setting initial conditions.

AnyMechOpr-Deprecated

KinematicAnalysis Operation for performing kinematic analysis(only for kinematically determinate system)(DEPRECATED).

AnyMechOpr-Deprecated

InverseDynamic-Analysis

Operation for performing inverse dynamic anal-ysis (only for kinematically determinate sys-tem) (DEPRECATED).

AnyVar MaxMuscleActivity The maximal muscle activity for the currenttime step (the envolope of the muscle activities).(=0)

Page 317: Any Script Ref Manual

304

AnyMechStudyType: CreatableBase Class: AnyKinStudy (see p. 291)

Description:This class extends the kinematical analysis functions from the base class, AnyKinStudy with func-tions for kinetic (dynamic) analysis.

For more information about the kinematical analysis functionality, please refer to the AnyKinStudybase class and the kinematics operations of class AnyMechOprKinAnl.

Inverse dynamic analysis of kinematical and kinetical (=statical) determinate mechanical systemis carried out by the InverseDynamics operation. This operation uses the Kinematics operationto solve the kinemtics, but each time step is extended with a kinetical analysis of the forces. Theequations of motion (dynamic equations of equlibrium) are set up and the unknown (reaction) forcesare determined. The equations contain all known (applied) forces and inertial forces arising fromthe prescribed motion.

This inverse dynamics solver assumes the system to be kinetically determinate, i.e., the system hasas many unknown forces as there are equations of equlibrium. This implies that statical indeter-minate systems cannot be handled by this operation including the typical musculoskeletal systems.For analysis of musculoskeletal system, please refer to AnyBodyStudy.

Please also refer to the class AnyMechOprInvDynAnl for more details on the InverseDynamicsoperations.

Future releases:Notice that the AnyMechStudy was redesigned for AnyBodyTM version 4.0. Therefore, it con-tains a number of deprecated members that serve the sole purpose of providing some backwardcompatibility during loading. The old functionality of AnyMechStudy has been transferredto the class AnyMechStudy1. This class is, however, deprecated and will be removed in afuture version of AnyBodyTM. It it strongly recommended to shift to using AnyMechStudy.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVec3 Gravity The acceleration of gravity.

Optional-Initialization MembersClass Name DescriptionAnyVar tStart Initial time. (=0)AnyVar tEnd Final time. (=1)

Page 318: Any Script Ref Manual

305

AnyIntVar nStep Number of equally spaced time steps (plus one).Both tStart and tEnd are counted as time steps.(=101)

AnyVector tArray Array of output-time values. This provides analternative input to even spacing obtained bysetting nStep. (={0, 0.01, 0.02, 0.03, 0.04,0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12,0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2,0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28,0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36,0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44,0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52,0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6,0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68,0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76,0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84,0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92,0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1})

AnyMechOprKinAnl InitialConditions Operation that sets initial conditions, i.e., as-sembles the mechanism etc., according to thefirst time step of the study.

AnyMechOprSub-Process

InitialConditions.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

InitialConditions.-PostOperation

Post-process operation.

AnyVar InitialConditions.-KinematicTol

Tolerance for the kinematic analysis. (=1e-006)

AnyIntVar InitialConditions.-MaxIteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar InitialConditions.-Relax

Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar InitialConditions.-SingleStepOnOff

Switch for the single-step analysis. (=Off, Op-tions: Off | On)

AnyIntVar InitialConditions.-SingleStepNo

Zero-based index for the time step to use in thesingle-step analysis. (=0)

AnyMechOprKinAnl Kinematics Kinematic analysis operation that processesall time steps of the study. It uses Ini-tial_Conditions as pre-process (only for kine-matically determinate system).

AnyMechOprSub-Process

Kinematics.Pre-Operation

Pre-process operation.

AnyMechOprSub-Process

Kinematics.Post-Operation

Post-process operation.

AnyVar Kinematics.-KinematicTol

Tolerance for the kinematic analysis. (=1e-006)

Page 319: Any Script Ref Manual

306

AnyIntVar Kinematics.Max-Iteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar Kinematics.Relax Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar Kinematics.Single-StepOnOff

Switch for the single-step analysis. (=Off, Op-tions: Off | On)

AnyIntVar Kinematics.Single-StepNo

Zero-based index for the time step to use in thesingle-step analysis. (=0)

AnyMechOprInvDyn-Anl

InverseDynamics Operation for performing inverse dynamic anal-ysis (only for kinematically determinate sys-tem).

AnyMechOprSub-Process

InverseDynamics.-PreOperation

Pre-process operation.

AnyMechOprSub-Process

InverseDynamics.-PostOperation

Post-process operation.

AnyVar KinematicTol Tolerance for the kinematic analysis (DEPRE-CATED). (=0)

AnyVar KinematicMax-Iteration

Maximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis (DEPRECATED). (=0)

AnyVar KinematicRelax Initial relaxation coefficient for the Newton it-eration (DEPRECATED).(=0)

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyVar t Time. (=0)AnyVar KinematicError Current value of the kinematic error. (=0)AnyVar Ekin Current kinematic energy of the system. (=0)AnyVar Epot Current potential energy of the system. (=0)AnyVar Emech Current mechanical energy of the system

(=Ekin+Epot). (=0)AnyVar Pmech Current mechanical power applied to the sys-

tem.(=0)

AnyMechStudyModel-Info

ModelInformation Operation that provides information about themodel topology (DEPRECATED).

AnyMechOpr-Deprecated

SetInitialConditions Operation for setting initial conditions.

AnyMechOpr-Deprecated

KinematicAnalysis Operation for performing kinematic analysis(only for kinematically determinate system)(DEPRECATED).

Page 320: Any Script Ref Manual

307

AnyMechOpr-Deprecated

InverseDynamic-Analysis

Operation for performing inverse dynamic anal-ysis (only for kinematically determinate sys-tem) (DEPRECATED).

Page 321: Any Script Ref Manual

308

AnyMechStudy1Type: CreatableBase Class: AnyMechStudyBase (see p. 289)

Description:This is the base class from which all mechanical models are derived.

Its functionality comprises

Mechanism topology description: Some information is reported in the Operation Report Viewof AnyBodyTM when executing the ModelInformation operation. This includes overview ofthe various mechanical elements such as segments, kinematic constraints and forces. Thisinformation can be used to analyze the system topology.

Kinematic analysis: The kinematical analysis requires the system to be kinematically determinate.For such cases, the analysis assembles and solves the kinematic constraints for each requestedtime step. The position analysis solves the non-linear constraints by a Newton-Raphson likemethod. This means that it to some extend relies on the initial configuration of the system. Inthe first step of an analysis, this is the loading time positions of the segments, whereas in allsubsequent time steps the guessed position values are based on the previous known values ofpositions, velocities, and accelerations.

Velocity and acceleration analysis are also carried out. These are linear systems of equations.

The equation solver handles redundant kinematic constraints, which means that the systemcan appear to be over determined, but if the excess of equations are dependent of the othersthe system can be accepted.

Generation of equations of motion: AnyMechObject generates equations of motion (for internaluse only) for each segment and including the contribution of all applied forces and forcesloads in the form of reaction forces. Basically all forces are treated the same in this process;they are all based on kinematic measures from which the coefficients of the influence ofthe mechanical system can be deduced using the principle of virtual work (or rather virtualpower). Hereafter the coefficients can be used to compute the influence of known forces or toset up the coefficient matrix of unknown forces.

Inverse dynamics of kinematically determinate systems: The inverse dynamic analysis is basedon the kinematic analysis and as such it also requires the mechanical system to be kinemati-cally determinate. In addition, the system must be what we could call statically determinateeven though it can move. This means that the number of unknown reaction forces must matchthe number of degrees of freedom. The equations of motion are solved for the unknownreaction forces during the inverse dynamic analysis.

Object Members:Obligatory-Initialization Members

Class Name Description

Page 322: Any Script Ref Manual

309

AnyVec3 Gravity The acceleration of gravity.

Optional-Initialization MembersClass Name DescriptionAnyVar tStart Initial time. (=0)AnyVar tEnd Final time. (=1)AnyIntVar nStep Number of equally spaced time steps (plus one).

Both tStart and tEnd are counted as time steps.(=101)

AnyVector tArray Array of output-time values. This provides analternative input to even spacing obtained bysetting nStep. (={0, 0.01, 0.02, 0.03, 0.04,0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12,0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2,0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28,0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36,0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44,0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52,0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6,0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68,0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76,0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84,0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92,0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1})

AnyVar KinematicTol Tolerance for the kinematic analysis. (=1e-006)AnyVar KinematicMax-

IterationMaximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar KinematicRelax Initial relaxation coefficient for the Newton it-eration. (=1)

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyVar t Time. (=0)AnyVar KinematicError Current value of the kinematic error. (=0)AnyVar Ekin Current kinematic energy of the system. (=0)AnyVar Epot Current potential energy of the system. (=0)AnyVar Emech Current mechanical energy of the system

(=Ekin+Epot). (=0)AnyVar Pmech Current mechanical power applied to the sys-

tem.(=0)

AnyMechStudy1-ModelInfo

ModelInformation Operation that provides information about themodel topology.

Page 323: Any Script Ref Manual

310

AnyMechStudy1Set-InitCond

SetInitialConditions Operation for setting initial conditions.

AnyMechStudy1Kin-Anl

KinematicAnalysis Operation for performing kinematic analysis(only for kinematically determinate system).

AnyMechStudy1Inv-DynAnl

InverseDynamic-Analysis

Operation for performing inverse dynamic anal-ysis (only for kinematically determinate sys-tem).

Page 324: Any Script Ref Manual

311

AnyBodyStudy1Type: CreatableBase Class: AnyMechStudy1 (see p. 308)

Description:The AnyBodyStudy1 performs inverse dynamic analysis of a musculoskeletal system (a body). It isderived from AnyMechStudy1 and the operations in that class are overloaded with algorithms thatcan deal with the redundancy in the muscle recruitment problem.

Inverse Dynamics: The inverse dynamics problem is solved by an optimization approach that min-imizes some muscle performance criterion with respect to the unknown forces of the system.The equations of motion, i.e., the dynamic equilibrium equations, enter the problem as con-straints, as well as the condition that the muscles cannot push.

In AnyBodyTM the basic performance criterion is the maximal muscle activity, where the mus-cle activity is defined as the muscle force divided by the current muscle strength. The problemis solved iteratively eliminating uniguely determined muscles and redundant equations aftereach step of the iteration. The optimization in each step can be handled with different solversaccording to the RecruitmentSolver attribute. Basically these solvers can be divided intolinear programming (Simplex) and quadratic programming (QP) algorithms. The numericallibrary OOSol, which is used by AnyBodyTM contains both a Simplex and a QP algorithm.Furthermore, a simplex algorithm based on algorithms in the book Numerical Recipes in C++by Press et. al. The attribute RecruitmentSolver allows you to select either of these threealgoritms with value names composed of the library name (OOSol or NR) and the algorithmtype (simplex or QP). The MinMaxSimplex is the default simplex solver, which currently isMinMaxOOSolSimplex.

Both types of algoritms feature a penalty setting that can assist in making the problem betterconditioned. In addition these penalties can be used to change the appearance of the problem:A large penalty in the linear formulation of the problem makes the problem converge towardsa linear problem, i.e., minimization of the sum of muscle activities. A large penalty in thequadratic formulation makes it a minimization of the sum of squares of muscle activities.

Solution in terms of muscle forces can be obtained using a model where all muscle modelshave constant strength equal to one.

Muscle calibration: Muscle calibration was previously a function in the AnyBodyStudy1. It hasnow been moved to its own study, AnyBodyCalibrationStudy, where also extended func-tionality exists. The operation MuscleCalibrationAnalysis is therefore no longer present inAnyBodyStudy1

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyVec3 Gravity The acceleration of gravity.

Page 325: Any Script Ref Manual

312

AnyMuscle-RecruitmentSolver

RecruitmentSolver Muscle recruitment objective and solver type.

Optional-Initialization MembersClass Name DescriptionAnyVar tStart Initial time. (=0)AnyVar tEnd Final time. (=1)AnyIntVar nStep Number of equally spaced time steps (plus one).

Both tStart and tEnd are counted as time steps.(=101)

AnyVector tArray Array of output-time values. This provides analternative input to even spacing obtained bysetting nStep. (={0, 0.01, 0.02, 0.03, 0.04,0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11, 0.12,0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2,0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28,0.29, 0.3, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36,0.37, 0.38, 0.39, 0.4, 0.41, 0.42, 0.43, 0.44,0.45, 0.46, 0.47, 0.48, 0.49, 0.5, 0.51, 0.52,0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.6,0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68,0.69, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76,0.77, 0.78, 0.79, 0.8, 0.81, 0.82, 0.83, 0.84,0.85, 0.86, 0.87, 0.88, 0.89, 0.9, 0.91, 0.92,0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1})

AnyVar KinematicTol Tolerance for the kinematic analysis. (=1e-006)AnyVar KinematicMax-

IterationMaximal number of Newton iterations in the so-lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar KinematicRelax Initial relaxation coefficient for the Newton it-eration. (=1)

AnySwitch RecruitmentIterative-Method

Switch for iterative method in the muscle re-cruitment solver. (=On, Options: Off | On)

AnyVar RecruitmentLp-Penalty

Linear penalty coefficient in the muscle recruit-ment objective when using linear optimizers.(=0)

AnyVar RecruitmentQp-Penalty

Quadratic penalty coefficient in the muscle re-cruitment objective when using quadratic opti-mizers. (=0.0001)

AnySwitch ReduceEquilEq Switch for reduction of the number of equilib-rium equations in the muscle recruitment. Withreduction the reaction forces are eliminated.(=On, Options: Off | On)

Page 326: Any Script Ref Manual

313

AnyVar ReactionForceLimit Translation value used in the muscle recruit-ment to allow optimizer algorithms that onlyfind positive values to find negative value. Thetranslation value must be larger than the largestnegative value reaction force. (=100000)

AnyVar StrongMuscleLimit The lower muscle strength limit (in Newton) formuscles that are included in the muscle recruit-ment. Muscles with strength below this limitare disregarded and their activity is canceled.(=1)

AnyVar MuscleEliminationTol A tolerance that is used during iterative musclerecruitment algorithms for determination of themuscles that can eliminated in a given iterationstep. (=0.0001)

AnyVar ActivityLowerLimit Lower limit of muscle activity. This can be usedas a termination criterion of iterative muscle re-cruitment algorithms. (=1e-005)

AnyFileVar EquilEqExportFile-Name

File for export of the coefficients of the equa-tions of motion for each time step. (="")

AnyOprSetNRSimplex NRSimplex Folder with settings for the simplex solverbased on Numerical Recipies, i.e., the solverused in MinMaxNRSimplex option.

AnyVar NRSimplex.Zero General tolerance for zero testing. (=1e-006)AnyVar NRSimplex.Coef-

ZeroRelRelative zero testing tolerance used while find-ing pivot coefficient. It is the fraction betweenthe real tolerance and the general tolerance,Zero. (=100)

AnyOprSetOOSol-Simplex

OOSolSimplex Folder with settings for the simplex solver fromOOSol, i.e., the solver used in MinMaxOOSol-Simplex option.

AnyVar OOSolSimplex.Zero Tolerance for zero testing. (=1e-006)AnyOprSetOOSolQP OOSolQP Folder with settings for the QP solver from

OOSol, i.e., the solver used in MinMaxOO-SolQP option.

AnyVar OOSolQP.Zero Tolerance for zero testing. (=1e-006)AnyVar OOSolQP.Pert Numerical gap for equalty constraints entered

as two opposite inequalities. (=0)

Denied-Access MembersClass Name DescriptionAnyOutputFolder Output Folder that holds the result of the latest executed

analysis (operation).AnyVar t Time. (=0)AnyVar KinematicError Current value of the kinematic error. (=0)AnyVar Ekin Current kinematic energy of the system. (=0)AnyVar Epot Current potential energy of the system. (=0)

Page 327: Any Script Ref Manual

314

AnyVar Emech Current mechanical energy of the system(=Ekin+Epot). (=0)

AnyVar Pmech Current mechanical power applied to the sys-tem.(=0)

AnyMechStudy1-ModelInfo

ModelInformation Operation that provides information about themodel topology.

AnyMechStudy1Set-InitCond

SetInitialConditions Operation for setting initial conditions.

AnyMechStudy1Kin-Anl

KinematicAnalysis Operation for performing kinematic analysis(only for kinematically determinate system).

AnyMechStudy1Inv-DynAnl

InverseDynamic-Analysis

Operation for performing inverse dynamic anal-ysis (only for kinematically determinate sys-tem).

AnyVar MaxMuscleActivity The maximal muscle activity for the currenttime step (the envolope of the muscle activities).(=0)

Page 328: Any Script Ref Manual

315

6.2 Operations

AnyOperation (see p. 316)AnyOperationDummy (see p. 317)AnyMechOprBase (see p. 318)

AnyMechOpr (see p. 319)AnyMechOprKinAnl (see p. 320)AnyMechOprInvDynAnl (see p. 322)

AnyMechOprInvMuscleDynAnl (see p. 323)AnyBodyMusTenLenCalOpr (see p. 325)AnyBodyLigamentLenCalOpr (see p. 326)

AnyMechOprDeprecated (see p. 327)AnyMechOprSubProcess (see p. 328)

AnyOperationSequence (see p. 329)AnyDesEvalStudyOpr (see p. 330)AnyParamStudyOpr (see p. 331)AnyOptStudyOpr (see p. 332)AnyMechStudy1ModelInfo (see p. 333)AnyMechStudy1SetInitCond (see p. 334)AnyMechStudy1KinAnl (see p. 335)AnyMechStudy1InvDynAnl (see p. 336)AnyMechStudyModelInfo (see p. 337)

Page 329: Any Script Ref Manual

316

AnyOperationType: AbstractBase Class: AnyConfigFolder (see p. 24)

Description:The base class for all operations.

Operations are objects that can execute (run) functions in studies (anyStudy). Execution is possiblefrom the Operation window in the graphical user interface.

Page 330: Any Script Ref Manual

317

AnyOperationDummyType: CreatableBase Class: AnyOperation (see p. 316)

Description:This is an operation that does not do anything. It can be used to replace a real operation in caseswhere it are not needed, but that same model structure and appearant functionality is needed byother parts of the code: for instance a super operation may be calling it.

Page 331: Any Script Ref Manual

318

AnyMechOprBaseType: AbstractBase Class: AnyOperation (see p. 316)

Description:Base class for operations associated with the basic mechanical studies, i.e. AnyMechStudyBaseclasses.

Page 332: Any Script Ref Manual

319

AnyMechOprType: AbstractBase Class: AnyMechOprBase (see p. 318)

Description:Base class for operations associated with the basic mechanical studies, i.e. AnyMechStudyBaseclasses. This base-class is derived from AnyMechStudyBase and extended with pre- and post-process operations.

The PreOperation is executed before the body part of the AnyMechOpr itself, any PostOperationis executed after. Both operations are, by default, empty operations, which called be filled by theuser e.g. with references to other operations (AnyOperation)

Object Members:Optional-Initialization Members

Class Name DescriptionAnyMechOprSub-Process

PreOperation Pre-process operation.

AnyMechOprSub-Process

PostOperation Post-process operation.

Page 333: Any Script Ref Manual

320

AnyMechOprKinAnlType: CreatableBase Class: AnyMechOpr (see p. 319)

Description:This operation class performs kinematical analysis of a mechanical systems.

The kinematical analysis requires the system to be kinematically determinate, implying that theremust be enough kinemtical constraints to determine all degrees of freedom of the system.

For such cases, the analysis assembles and solves the kinematic constraints for each requested timestep. The position analysis solves the non-linear constraint equations by a Newton-Raphson likemethod. This means that it, to some extend, relies on the initial configuration of the system. In thefirst step of an analysis, this is the loading time positions of the segments, whereas in all subsequenttime steps, the initially guess is based on the previous known values of positions, velocities, andaccelerations of the model segments.

Velocity and acceleration analysis are also carried out. These are linear systems of equations.

The equation solver handles redundant kinematic constraints, which means that the system can ap-pear to be over-determinate, but only if the excess of equations are dependent of the other equationsthe system can be accepted.

The AnyMechOprKinAnl can be executed in two modes controlled by the switch SingleStepOnOff:A single step mode, where the analysis is performed for a single time step of the study (by defaultthe first step), and a multi-step mode, where it sequentially solves the kinematical equations for eachtime step defined in the study.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyMechOprSub-Process

PreOperation Pre-process operation.

AnyMechOprSub-Process

PostOperation Post-process operation.

AnyVar KinematicTol Tolerance for the kinematic analysis. (=1e-006)AnyIntVar MaxIteration Maximal number of Newton iterations in the so-

lution of the non-linear equations in the kine-matic position analysis. (=100)

AnyVar Relax Initial value of relaxation coefficient for theNewton iteration. (=1)

AnySwitchVar SingleStepOnOff Switch for the single-step analysis. (=Off, Op-tions: Off | On)

AnyIntVar SingleStepNo Zero-based index for the time step to use in thesingle-step analysis. (=0)

Page 334: Any Script Ref Manual

321

Denied-Access MembersClass Name DescriptionAnyVar KinematicError Value of the kinematic error.

(=0)

Page 335: Any Script Ref Manual

322

AnyMechOprInvDynAnlType: CreatableBase Class: AnyMechOpr (see p. 319)

Description:This operation performs inverse dynamic analysis of a kinematical and kinetical (statical) determi-nate mechanical system.

For each time-step of the analysis, the operation performs a kinematical analysis to determine posi-tion, velocities, and accelerations of the prescribed motion. The kinematical analysis is carried outby a kinematical operation (AnyMechOprKinAnl) that must be supplied by the user.

The kinetical (dynamic) analysis generates equations of motion for each segment and includes thecontribution of all known (applied) forces and unknown (reaction) forces. In principle, all forces aretreated the same in this part of the analysis; they are all based on kinematic measures from whichthe coefficients of the influence on the mechanical system can be deduced using the principle ofvirtual work (or actually virtual power). Hereafter the coefficients are used to compute the actualinfluence of known forces and to set up the coefficient matrix of unknown reaction forces.

After setting up the equations, they are solved to find the unknown reaction forces. It is a require-ment that there as many unknown reaction forces as there are equations of dynamical equalibrium(i.e. equations of motion). This implies that the number of unknown reaction forces must match thenumber of degrees of freedom of the segments (if all segments were considered free in space).

Object Members:Expected Members

Class Number DescriptionAnyMechOprKinAnl [1] A expected member defining the kinematical

analysis to be used inside each of the inversedynamic analysis step

Optional-Initialization MembersClass Name DescriptionAnyMechOprSub-Process

PreOperation Pre-process operation.

AnyMechOprSub-Process

PostOperation Post-process operation.

Page 336: Any Script Ref Manual

323

AnyMechOprInvMuscleDynAnlType: CreatableBase Class: AnyMechOprInvDynAnl (see p. 322)

Description:This operation performs inverse dynamic analysis of musculoskeletal systems, i.e., mechanical sys-tems including muscle. The inverse dynamics problem for this case is also called a muscle recruit-ment problem.

Please refer to the member Criterion, see class AnyOprSetMuscleRecruitment for more informa-tions about the muscle recruitment criteria.

Object Members:Expected Members

Class Number DescriptionAnyMechOprKinAnl [1] A expected member defining the kinematical

analysis to be used inside each of the inversedynamic analysis step

Optional-Initialization MembersClass Name DescriptionAnyMechOprSub-Process

PreOperation Pre-process operation.

AnyMechOprSub-Process

PostOperation Post-process operation.

AnyOprSetMuscle-Recruitment

Criterion Setting folder for specifying the muscle recruit-ment criterion.

AnyEnumMuscle-RecruitmentType

Criterion.Type Muscle recruitment criterion type.(=MR_Polynomial, Options:MR_MinMaxStrict | MR_MinMaxAux| MR_Linear | MR_Quadratic |MR_QuadraticAux | MR_Polynomial)

AnySwitchVar Criterion.Upper-BoundOnOff

Switch for whether the upper bound on muscleactivity is active in the criterion. (=On, Op-tions: Off | On)

AnyVar Criterion.Upper-Bound

Value of the upper bound on muscle activity.Typically it is 1.0 implying complete saturationof the muscle capability (=1)

AnyVar Criterion.Power Power for the MR_Polynomial criterion. (=3)AnyOprSetMuscle-Recruitment-Normalization

Criterion.Primary-Term

Folder with settings for primary term of themuscle recruitment criterion. The primary termdepends on the Type.

Page 337: Any Script Ref Manual

324

AnyEnumMuscle-Recruitment-NormalizationType

Criterion.Primary-Term.Type

Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar Criterion.Primary-Term.Weight

Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar Criterion.Primary-Term.LowerLimit

Lower bound for muscle quantities entering theterm. (=1)

AnyOprSetMuscle-Recruitment-Normalization

Criterion.AuxLinear-Term

Folder with settings for the auxillary linear termthat is appended to the primary term in somecases.

AnyEnumMuscle-Recruitment-NormalizationType

Criterion.AuxLinear-Term.Type

Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar Criterion.AuxLinear-Term.Weight

Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar Criterion.AuxLinear-Term.LowerLimit

Lower bound for muscle quantities entering theterm. (=1)

AnyOprSetMuscle-Recruitment-Normalization

Criterion.Aux-QuadraticTerm

Folder with settings for the auxillary quadraticterm that is appended to the primary term insome cases.

AnyEnumMuscle-Recruitment-NormalizationType

Criterion.Aux-QuadraticTerm.Type

Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar Criterion.Aux-QuadraticTerm.-Weight

Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar Criterion.Aux-QuadraticTerm.-LowerLimit

Lower bound for muscle quantities entering theterm. (=1)

Page 338: Any Script Ref Manual

325

AnyBodyMusTenLenCalOprType: AbstractBase Class: AnyMechOpr (see p. 319)

Description:Class for tendon length calibration operation in AnyBodyCalibrationStudy.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyMechOprSub-Process

PreOperation Pre-process operation.

AnyMechOprSub-Process

PostOperation Post-process operation.

Page 339: Any Script Ref Manual

326

AnyBodyLigamentLenCalOprType: AbstractBase Class: AnyMechOpr (see p. 319)

Description:Class for ligament length calibration operation in AnyBodyCalibrationStudy.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyMechOprSub-Process

PreOperation Pre-process operation.

AnyMechOprSub-Process

PostOperation Post-process operation.

Page 340: Any Script Ref Manual

327

AnyMechOprDeprecatedType: AbstractBase Class: AnyMechOprBase (see p. 318)

Description:Deprecated mechanical operations.

Page 341: Any Script Ref Manual

328

AnyMechOprSubProcessType: AbstractBase Class: AnyMechOprBase (see p. 318)

Description:This is a special (abstract) operation class used for defining sub-processes, such as pre- and post-processes, inside the real user-accessible operations for doing mechanical analyses in AnyMech-StudyBase and derived classes.

This class works much like the AnyOperationSequence, but it is equipped with some additional(internal) functionality.

Page 342: Any Script Ref Manual

329

AnyOperationSequenceType: CreatableBase Class: AnyOperation (see p. 316)

Description:This operation can hold a number of other operations and execute them in a sequence. The op-erations to be executed are the members and they will be executed in the sequence in which theyhave been declared. Typically, they will be defined as references to existing operations, for instancemembers of studies.

Future releases:This operation is the first step towards more general macro facilities in AnyScriptTM models. Afuture version of AnyBodyTM will allow macro specifications that use the same macro languageas the AnyBodyTM console application.

Page 343: Any Script Ref Manual

330

AnyDesEvalStudyOprType: AbstractBase Class: AnyOperation (see p. 316)

Description:Operation that executes the update function in AnyDesEvalStudyOpr.

Page 344: Any Script Ref Manual

331

AnyParamStudyOprType: AbstractBase Class: AnyOperation (see p. 316)

Description:Operation that executes a parameter study in AnyParamStudy.

Page 345: Any Script Ref Manual

332

AnyOptStudyOprType: AbstractBase Class: AnyOperation (see p. 316)

Description:Operation that executes the optimization process in AnyOptStudy.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyEnumOptSolver Solver Solver type setting.

(=OptFeasibleDirSearch1, Options: Opt-SimpleSearch | OptFeasibleDirSearch1 | Opt-FeasibleDirSearch2)

AnyVar Convergence-ObjectiveTol

Absolute tolerance on objective functionchange in convergence criterion. (=1e-005)

AnyVar ConvergenceDesign-Tol

Relative tolerance on design variable change inconvergence criterion. (=1e-005)

AnyVector ConvergenceDesign-TolArr

Similar to ConvergenceObjectiveTol, but an ar-ray with one element for each design variable.Default is all values equal to ConvergenceOb-jectiveTol. (="No values given")

AnyVar ConstraintActivation-Tol

Absolute tolerance for activating constraints.(=0.0001)

AnyVector ConstraintActivation-TolArr

Similar to ConstraintActivationTol, but an arraywith one element for each constraint. Defaultis all values equal to ConstraintActivationTol.(="No values given")

AnyVar NumSensitivity-Perturbation

Absolute perturbation use in numerical sensitiv-ity analyses. (=1e-005)

AnyVector NumSensitivity-PerturbationArr

Similar to NumSensitivityPerturbation, but anarray with one element for each design variable.Default is all values equal to NumSensitivityPe-rturbation. (="No values given")

Page 346: Any Script Ref Manual

333

AnyMechStudy1ModelInfoType: AbstractBase Class: AnyOperation (see p. 316)

Description:Operation for analyzing the mechanical model topology. This operation will provide informationabout model as text in the report view.

This information will divided into sections; each section corresponding to one step of the operation.

Page 347: Any Script Ref Manual

334

AnyMechStudy1SetInitCondType: AbstractBase Class: AnyOperation (see p. 316)

Description:Operation for analyzing the given initial conditions of a mechanical model.

Page 348: Any Script Ref Manual

335

AnyMechStudy1KinAnlType: AbstractBase Class: AnyOperation (see p. 316)

Description:Operation that performs kinematic analysis of a kinematically determinate system.

Page 349: Any Script Ref Manual

336

AnyMechStudy1InvDynAnlType: AbstractBase Class: AnyOperation (see p. 316)

Description:Operation that performs inverse dynamic analysis of a kinematically determinate system.

Page 350: Any Script Ref Manual

337

AnyMechStudyModelInfoType: AbstractBase Class: AnyOperation (see p. 316)

Description:Operation for analyzing the mechanical model topology. This operation will provide informationabout model as text in the report view.

This information will divided into sections; each section corresponding to one step of the operation.

Page 351: Any Script Ref Manual

338

6.3 Operation Settings Classes

AnyOprSet (see p. 339)AnyOprSetOptim (see p. 340)

AnyOprSetNRSimplex (see p. 341)AnyOprSetOOSolSimplex (see p. 342)

AnyOprSetOOSolQP (see p. 343)AnyOprSetMuscleRecruitment (see p. 344)AnyOprSetMuscleRecruitmentNormalization (see p. 346)

Page 352: Any Script Ref Manual

339

AnyOprSetType: AbstractBase Class: AnyFolder (see p. 24)

Description:Base class for folders containing solver settings.

Page 353: Any Script Ref Manual

340

AnyOprSetOptimType: AbstractBase Class: AnyOprSet (see p. 339)

Description:Base class for optimization solver settings.

Page 354: Any Script Ref Manual

341

AnyOprSetNRSimplexType: AbstractBase Class: AnyOprSetOptim (see p. 340)

Description:Settings for a simplex solver based on the algorithm from the book Numerical Recipices.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVar Zero General tolerance for zero testing. (=1e-006)AnyVar CoefZeroRel Relative zero testing tolerance used while find-

ing pivot coefficient. It is the fraction betweenthe real tolerance and the general tolerance,Zero. (=100)

Page 355: Any Script Ref Manual

342

AnyOprSetOOSolSimplexType: AbstractBase Class: AnyOprSetNRSimplex (see p. 341)

Description:Settings for a simplex solver from the OOSol library.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVar Zero Tolerance for zero testing. (=1e-006)

Page 356: Any Script Ref Manual

343

AnyOprSetOOSolQPType: AbstractBase Class: AnyOprSetOptim (see p. 340)

Description:Setting for a QP solver from the OOSol library (QP = Quadratic programming).

Object Members:Optional-Initialization Members

Class Name DescriptionAnyVar Zero Tolerance for zero testing. (=1e-006)AnyVar Pert Numerical gap for equalty constraints entered

as two opposite inequalities. (=0)

Page 357: Any Script Ref Manual

344

AnyOprSetMuscleRecruitmentType: AbstractBase Class: AnyOprSet (see p. 339)

Description:Class specifying the optimization criterion for a muscle recruitment problem, typically solved withinan AnyBodyStudy by operations of class AnyMechOprInvMuscleDynAnl.

The muscle recruitment problem specified by the members of this class can generally be formulatedas

minimize “Primary Term” + “Auxiliary Terms”

subject to “Equilibrium equations”“Muscle forces cannot push”“Limits on exerted muscle forces”

The primary specification is the type of the criterion. The table below provide an overview of thecriterion types available, where the left column is possible values for the Type member variable.The auxillary terms of the objective function, that can be either linear or quadratic, is not availablefor all criterion types. The availability is also indicated in the table.

Primary Term Auxiliary Linear Term Auxiliary Quadratic Termw1

∑ |xi| w2

∑x2

i

MR_MinMaxStrict max |xi|∗ N/A N/AMR_MinMaxAux max |xi|† + +MR_Linear

∑ |xi| N/A N/AMR_Quadratic

∑x2

i N/A N/AMR_QuadraticAux

∑x2

i + N/AMR_Polynomial

∑ |xi|p‡ N/A N/A∗ Solution is unique and equivalent to limp→∞(

∑ |xi|p)1/p.† With the primary term alone, the solution is indeterminant.‡ The power p is limited to p ∈ [2, 5].

Table 6.1: Overview of different solver criteria.

Object Members:Optional-Initialization Members

Class Name DescriptionAnyEnumMuscle-RecruitmentType

Type Muscle recruitment criterion type.(=MR_Polynomial, Options:MR_MinMaxStrict | MR_MinMaxAux| MR_Linear | MR_Quadratic |MR_QuadraticAux | MR_Polynomial)

Page 358: Any Script Ref Manual

345

AnySwitchVar UpperBoundOnOff Switch for whether the upper bound on muscleactivity is active in the criterion. (=On, Op-tions: Off | On)

AnyVar UpperBound Value of the upper bound on muscle activity.Typically it is 1.0 implying complete saturationof the muscle capability (=1)

AnyVar Power Power for the MR_Polynomial criterion. (=3)AnyOprSetMuscle-Recruitment-Normalization

PrimaryTerm Folder with settings for primary term of themuscle recruitment criterion. The primary termdepends on the Type.

AnyEnumMuscle-Recruitment-NormalizationType

PrimaryTerm.Type Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar PrimaryTerm.Weight Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar PrimaryTerm.Lower-Limit

Lower bound for muscle quantities entering theterm. (=1)

AnyOprSetMuscle-Recruitment-Normalization

AuxLinearTerm Folder with settings for the auxillary linear termthat is appended to the primary term in somecases.

AnyEnumMuscle-Recruitment-NormalizationType

AuxLinearTerm.Type Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar AuxLinearTerm.-Weight

Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar AuxLinearTerm.-LowerLimit

Lower bound for muscle quantities entering theterm. (=1)

AnyOprSetMuscle-Recruitment-Normalization

AuxQuadraticTerm Folder with settings for the auxillary quadraticterm that is appended to the primary term insome cases.

AnyEnumMuscle-Recruitment-NormalizationType

AuxQuadraticTerm.-Type

Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar AuxQuadraticTerm.-Weight

Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar AuxQuadraticTerm.-LowerLimit

Lower bound for muscle quantities entering theterm. (=1)

Page 359: Any Script Ref Manual

346

AnyOprSetMuscleRecruitmentNormalizationType: AbstractBase Class: AnyOprSet (see p. 339)

Description:Class specifying the optimization criterion for muscle recruitment problem, typically solved wihtinan AnyBodyStudy with operations of class AnyMechOprInvMuscleDynAnl

Object Members:Optional-Initialization Members

Class Name DescriptionAnyEnumMuscle-Recruitment-NormalizationType

Type Normalization type used to define themuscle quantities entering the term.(=MR_CurrentStrength, Options:MR_Constant | MR_CurrentStrength |MR_NominalStrength)

AnyVar Weight Weight (or scaling) of the term in the total cri-terion. (=1)

AnyVar LowerLimit Lower bound for muscle quantities entering theterm. (=1)

Page 360: Any Script Ref Manual

347

6.4 External Data Interfaces

AnyDataFileBase (see p. 348)AnyOutputFileBase (see p. 349)

AnyOutputFile (see p. 350)AnyMechOutputFileBase (see p. 353)

AnyMechOutputFileEquilEqExport (see p. 354)AnyMechOutputFileForceExport (see p. 355)

AnyInputDB (see p. 357)AnyInputBVH (see p. 359)AnyInputC3D (see p. 361)AnyInputFile (see p. 364)

Page 361: Any Script Ref Manual

348

AnyDataFileBaseType: AbstractBase Class: AnyFolder (see p. 24)

Description:Abstract base class for all inputs from files.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Name of the file.

Page 362: Any Script Ref Manual

349

AnyOutputFileBaseType: AbstractBase Class: AnyDataFileBase (see p. 348)

Description:Abstract base class for a number of output file classes.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Name of the file.

Optional-Initialization MembersClass Name DescriptionAnyStyleNumeric1f NumberFormat Format settings for numerical values in text for-

matted files. Applies to floating-point numbers(AnyFloat) only.

AnyIntVar NumberFormat.-Digits

Number of digits in output. Disregarded ifsmaller than one. (=8)

AnyIntVar NumberFormat.-Width

Number of character spaces reserved for thenumber in output. Disregarded if smaller thanone. (=0)

AnyEnumFloat-NumberStyle

NumberFormat.Style Style specification. (=CompactNumber, Op-tions: DecimalNumber | ScientificNumber |CompactNumber)

AnyStringVar NumberFormat.-FormatStr

Complete format specification using C-stylecharacter specification known from the printf()function. This overrides the any other specifi-cation. If not specified by the user it is deter-mined automatically from the other specifica-tion. (="")

Page 363: Any Script Ref Manual

350

AnyOutputFileType: CreatableBase Class: AnyOutputFileBase (see p. 349)

Description:This class provides functionality for saving output data to a file from a study (AnyStudy or derived)during execution of one of its operations. The members of this class are used to define the file name,its format, and the variables that should be reported in the file.

Notice that the AnyOutputFile object must declared inside the study in order for the study to createthe file. If you wish to use the same output file specification in mulitple studies, you can do this byreferences from studies to output file declarations outside the studies. Such references will makethe studies treat the output file objects as being declared inside the studies.

You can specify the output in two ways. Basically, all variables in an object of this class will beincluded into the list of output.

Alternatively, values can be found by a variable search similarly to the one available the ChartView of the AnyBodyTM GUI. The ’Search’ member is an AnyString that can hold one or more ofsuch complete name variable-search strings. Wild-characters (*) can be used to perform advancedmultiselections.

The output-file object distinguishes between values that change during the operation and constants.Constants will be reported only once for instance in the header of the file whereas changing val-ues will be reported for each step of the operation. The study that owns the executed operationautomatically defines which values are changing and which are constant similarly to the automaticidentification of values in the study’s ’Output’ folder.

The following formats are currently supported:

filename.csv: Standard column formatted text output. Variables are reported in columns with onerow for each operation step. The file header contains constants and column descriptions.Column separation sign is specified with the ’SepSign’.

Notice: "filename.csv" update for AnyBodyTM version 2.0.0The filename.csv format has been updated slightly in order to allow direct import of Any-OutputFile generated files to other AnyScript classes. The header section does no longer con-tain numbers as the first character so these lines can automatically be filtered out by importingroutines in for instance AnyFunInterpol. Moreover, a line containing all column names havebeen added before the data columns; this improves imports to spread sheets such as Excel.

Page 364: Any Script Ref Manual

351

Future releases:It is considered to include other output formats in a future version. The following formats arebeing considered:

filename.dat: Standard binary format.

filename.any: AnyScript formatted file, which can directly be used as an include file.

filename.m: Matlab M-file format that makes the data directly accessible from Matlab.

Suggestions are very welcome from users who miss functionality from the AnyOutputFile.

Object Members:Expected Members

Class Number DescriptionAnyValue [1..Inf] All values (i.e. all AnyValue-derived members)

can be reported in the output file depending onthe file format settings.

Obligatory-Initialization MembersClass Name DescriptionAnyFileVar FileName Name of the file.

Optional-Initialization MembersClass Name DescriptionAnyStyleNumeric1f NumberFormat Format settings for numerical values in text for-

matted files. Applies to floating-point numbers(AnyFloat) only.

AnyIntVar NumberFormat.-Digits

Number of digits in output. Disregarded ifsmaller than one. (=8)

AnyIntVar NumberFormat.-Width

Number of character spaces reserved for thenumber in output. Disregarded if smaller thanone. (=0)

AnyEnumFloat-NumberStyle

NumberFormat.Style Style specification. (=CompactNumber, Op-tions: DecimalNumber | ScientificNumber |CompactNumber)

AnyStringVar NumberFormat.-FormatStr

Complete format specification using C-stylecharacter specification known from the printf()function. This overrides the any other specifi-cation. If not specified by the user it is deter-mined automatically from the other specifica-tion. (="")

AnyString Search Array of objects search strings (for more info.on search-strings, see class AnyObjectSearch-String). (="No values given")

AnyStringVar SepSign Separator sign for the standard format. (=",")

Page 365: Any Script Ref Manual

352

AnyStringVar LineSepSign Line separator sign for the standard format.(="")

AnyOutputFileHeader-Format

Header Header formatting settings for the standard for-mat.

AnySwitchVar Header.TitleSection-OnOff

Switch for the title section. (=On, Options: Off| On)

AnySwitchVar Header.Const-SectionOnOff

Switch for the header section containingconstant variables. (=On, Options: Off | On)

AnySwitchVar Header.VarSection-OnOff

Switch for the variable description section.(=On, Options: Off | On)

AnySwitchVar Header.Column-NamesOnOff

Switch for the row containing the columnnames in the data section. (=On, Options: Off |On)

AnyStringVar Header.LinePrefix String containing a line prefix used for all linesof the header section. (="")

Page 366: Any Script Ref Manual

353

AnyMechOutputFileBaseType: AbstractBase Class: AnyOutputFileBase (see p. 349)

Description:Base class for a number of data-file classes that produce special output from mechanical studies(AnyMechStudy)

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Name of the file.

Optional-Initialization MembersClass Name DescriptionAnyStyleNumeric1f NumberFormat Format settings for numerical values in text for-

matted files. Applies to floating-point numbers(AnyFloat) only.

AnyIntVar NumberFormat.-Digits

Number of digits in output. Disregarded ifsmaller than one. (=8)

AnyIntVar NumberFormat.-Width

Number of character spaces reserved for thenumber in output. Disregarded if smaller thanone. (=0)

AnyEnumFloat-NumberStyle

NumberFormat.Style Style specification. (=CompactNumber, Op-tions: DecimalNumber | ScientificNumber |CompactNumber)

AnyStringVar NumberFormat.-FormatStr

Complete format specification using C-stylecharacter specification known from the printf()function. This overrides the any other specifi-cation. If not specified by the user it is deter-mined automatically from the other specifica-tion. (="")

Page 367: Any Script Ref Manual

354

AnyMechOutputFileEquilEqExportType: CreatableBase Class: AnyMechOutputFileBase (see p. 353)

Description:Output file for mechanical system export. It is exporting the mechanical system of equilibriumequations during the dynamic analyses in AnyMechStudy objects.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Name of the file.

Optional-Initialization MembersClass Name DescriptionAnyStyleNumeric1f NumberFormat Format settings for numerical values in text for-

matted files. Applies to floating-point numbers(AnyFloat) only.

AnyIntVar NumberFormat.-Digits

Number of digits in output. Disregarded ifsmaller than one. (=8)

AnyIntVar NumberFormat.-Width

Number of character spaces reserved for thenumber in output. Disregarded if smaller thanone. (=0)

AnyEnumFloat-NumberStyle

NumberFormat.Style Style specification. (=CompactNumber, Op-tions: DecimalNumber | ScientificNumber |CompactNumber)

AnyStringVar NumberFormat.-FormatStr

Complete format specification using C-stylecharacter specification known from the printf()function. This overrides the any other specifi-cation. If not specified by the user it is deter-mined automatically from the other specifica-tion. (="")

Page 368: Any Script Ref Manual

355

AnyMechOutputFileForceExportType: CreatableBase Class: AnyMechOutputFileBase (see p. 353)

Description:This class is an output file class particularly related to mechnical studies (AnyMechStudy and de-rived classes). It outputs files with information about the loads that are applied to a given segment, anumber of selected segments, or all segments in the study. The load information is aimed at externalpost-processing such as structural analysis, for instance by the finite elements method.

The loads comprise both applied loads and computed reaction forces, i.e., all AnyForceBase objectsand they are all converted into a simple general format aimed at application in structural analysis.

All loads are ordered according to their points of application and the actual load is given are as a 3Dforce vector and a 3D torque vector. Each AnyForceBase object can output multiple componentsof force, i.e., multiple sets of force and torque vectors, for instance if it is based on a multiplecomponent kinematic measure (i.e. multiple components in Fout and Fout).

Together with the force information, the current global position of the application point is outputted,along with information about force association with segments and type of force (class information).

Future releases:This output file class is in a beta testing phase. Changes of the file format and other classfunctionality must be expected. More detailed description may be included when the formathas reached a mature level.

Object Members:Expected Members

Class Number DescriptionAnySeg [0..Inf] Selected segments for which the output may be

prepared depending on AllSegmentsInStudy-OnOff.

Obligatory-Initialization MembersClass Name DescriptionAnyFileVar FileName Name of the file.

Optional-Initialization MembersClass Name DescriptionAnyStyleNumeric1f NumberFormat Format settings for numerical values in text for-

matted files. Applies to floating-point numbers(AnyFloat) only.

AnyIntVar NumberFormat.-Digits

Number of digits in output. Disregarded ifsmaller than one. (=8)

Page 369: Any Script Ref Manual

356

AnyIntVar NumberFormat.-Width

Number of character spaces reserved for thenumber in output. Disregarded if smaller thanone. (=0)

AnyEnumFloat-NumberStyle

NumberFormat.Style Style specification. (=CompactNumber, Op-tions: DecimalNumber | ScientificNumber |CompactNumber)

AnyStringVar NumberFormat.-FormatStr

Complete format specification using C-stylecharacter specification known from the printf()function. This overrides the any other specifi-cation. If not specified by the user it is deter-mined automatically from the other specifica-tion. (="")

AnySwitchVar AllSegmentsInStudy-OnOff

Switch that controls whether the output is pre-pared for all segments in the current study be-ing analyzed, or for selected segments. Selectedsegments (=Off, Options: Off | On)

Page 370: Any Script Ref Manual

357

AnyInputDBType: CreatableBase Class: AnyDataFileBase (see p. 348)

Description:This class can import data from a external SQL database. Currently supported types of databasesare

• MS SQL Server 2000

• MS SQL Server 2005

• MySQL

• OracleXE

• MS Access

By means of the class members you can specify the database type and connection information suchas database name, filename, user name, password and other authetication options. All this will beassembled in the connection string, which you can inspects in ConnectString. Notice that not alloptions apply to all database types.

Data is imported from the database according to an SQL command that must be specified in thestring SQLCommand. Notice that this is a string structure that can hold more than one string andif multiple strings are supplied, all of them will be executed as independent SQL commands againstthe database.

Each SQL command will create its own folder under the Data folder. These folder will be givendefault names if you do not do anything else, but you can specify names of your own choice foreasier retrieval of you data. SQLCommandTag is a string structure that optionally can be filledwith a similar amount of strings as the SQLCommand. These strings will be used as tags for theassociated SQL command in SQLCommand. If a suitable tag is given, it will be used as the foldername for the tagged SQL command.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName The name of the database file (when applica-

ble).AnyDBType DatabaseType String specifying the database type.AnyString SQLCommand A string holding one or many SQL commands

to be executed on the database during the modelloading.

Page 371: Any Script Ref Manual

358

Optional-Initialization MembersClass Name DescriptionAnyStringVar ServerName Server name (not used for connections to MS

Access). (="")AnyStringVar DatabaseName The database name (when applicable). (="")AnyStringVar UserName The name of user accessing the database. (="")AnyStringVar Password Password for the user name. (="")AnySwitchVar Windows-

AuthenticationUse windows authentication, as opposed todatabase authentication (Only used for MS SQLServer) (=Off, Options: Off | On)

AnySwitchVar OracleClientAccess Client aceess to Oracle databases (Only used forOracle Server) (=Off, Options: Off | On)

AnyString SQLCommandTag A string holding tags associated with the en-tries of the SQLCommand. In principle, thetags and the commands should match in dimen-sionality; if not tags are autogenerated. (="Novalues given")

Page 372: Any Script Ref Manual

359

AnyInputBVHType: CreatableBase Class: AnyDataFileBase (see p. 348)

Description:Class to read files in BVH format (see.

The class allows you to read the data in the file and it optionally can create a model with segmentsresembling the kinematical hierarchy in the file.

The data import can apply scaling parameters to the translation and rotations independently. This isuseful for files using other units than meters and radians, since these units are used by the generatedmodel. The scaling is only applied to that data in the Model section so the original data can be foundin the Motion section.

Additionally, it is also possible to define filters for the translation as well as rotational data containedin the file. By default, one filter is included in the object, but additional filters can also be definedsimply by constructing them inside the object or by creating references. Specification of whichfilter to use is made using ranslationalDataFilterIndex and RotationalDataFilterIndex for thetranslational and rotational data, respectively.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Name of the file.

Optional-Initialization MembersClass Name DescriptionAnyVar TranslationScale Scaling parameter applied to all translations

used in the model drivers. (=1)AnyVar RotationScale Scaling parameter applied to all rotations used

in the model drivers (=1)AnySwitchVar ConstructModelOn-

OffSwitch for whether the kinematic model is con-structed or not. (=On, Options: Off | On)

AnySwitchVar ModelDrawOnOff Switch for whether the model is equippedwith drawing objects for visualization in ModelView. (=On, Options: Off | On)

AnyRGBs ModelDrawRGBs Array of colors to be used in the model draw-ing. Each color entrie is used for the associatedlevel in the kinematical hierarchy (="No valuesgiven")

AnyVar ModelDrawScale Uniform scaling applied to the elements ofmodel drawing. (=0.05)

Page 373: Any Script Ref Manual

360

AnyInterPolType InterPolType Type of the interpolation drivers (AnyKinEq-InterPolDriver) in the model. (=Bspline, Op-tions: PiecewiseLinear | Bezier | Bspline)

AnyIntVar InterPolBsplineOrder Order information used for the interpolationdrivers in the model. (=4)

AnyIntVar TranslationalData-FilterIndex

Index of the filter to be used for the transla-tional data. Zero is the default filter in memberFilter. Negative numbers means that no filteris applied. Positive numbers refer to filters en-tered by declaration of new objects in the BVHobject. (=0)

AnyIntVar RotationalDataFilter-Index

Index of the filter to be used for the rotationaldata. Zero is the default filter in member Fil-ter. Negative numbers means that no filter isapplied. Positive numbers refer to filters enteredby declaration of new objects in the BVH ob-ject. (=0)

AnyFunButterworth-Filter

Filter Standard (default) filter (Butterworth type fil-ter).

AnyVector Filter.z0 Initial condition vector. (="No values given")AnySwitchVar Filter.Automatic-

InitialConditionOnOffSwitch to specify whether or not the initial con-ditions are calculated automatically. (=Off, Op-tions: Off | On)

AnySwitchVar Filter.FilterForward-BackwardOnOff

Switch to specify if filtering should only be per-formed in the forward direction or both in theforward and backward direction.(=Off, Options: Off | On)

AnyIntVar Filter.N The filter order. (=2)AnyVector Filter.Fc The cut-off frequency(ies). (="No values

given")AnyFilterType Filter.Type The filter type.

(Options: LowPass | HighPass | BandPass |BandStop)

Page 374: Any Script Ref Manual

361

AnyInputC3DType: CreatableBase Class: AnyDataFileBase (see p. 348)

Description:Class to read files in C3D format. The class allows you to import the whole c3d file or only theheader and parameter section.

C3D is standard file format for containing movement analysis data such as marker trajectories, jointangles, measured forces or EMG. For more information about C3D files, please see http://c3d.org.

The class also allows you to have a basic model defined, where each measured 3D point are definedas a segment and the position is driven using an interpolation driver of the specified type using themeasured data for the 3D point, and the orientation is driven to zero. In the model, only the part ofthe points section that is measured data is used. This is by default judged based on the content of thecamera bytes in the C3D datafile but it is also possible to define which 3D trajectories that are mark-ers using the members MarkerUseAllPointsOnOff, MarkerUseCamMaskOnOff,MarkerIndicesor MarkerLabels.

Additionally, it is also possible to apply filtering to the markers, processed data, and analog data. Bydefault, the marker trajectories are filtered using a second-order, zero-phase, lowpass Butterworthfilter with a cutoff frequency at 10 Hz. Processed data and analog data are not filtered by default.

The class also has a class operation defined that allows you to right-click the C3D object in the modeltree and save the C3D file to AnyScriptTM files.This will produce a series of AnyScript files whichcontain the data in the C3D file. These are: <output_filename>.any <output_filename>.Header.any<output_filename>.Analog.any <output_filename>.Points.Markers.any <output_filename>.Points.Processed.any<output_filename>.MarkerMover.any <output_filename>.MarkerListMover.any <output_filename>.ProcessedListMover.any

The Header, Analog and Points directly contain the data in these parts of the C3D file MarkerMoverincludes the definition of a segment including drivers. Finally, MarkerListMover and ProcessedList-Mover contain list of the markers to be driven. <output_filename>.any is the main file, which, ifloaded, will setup the model.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Name of the file.

Optional-Initialization MembersClass Name DescriptionAnySwitchVar ReadAllDataOnOff Switch to specify if all data should be read or

not (=On, Options: Off | On)

Page 375: Any Script Ref Manual

362

AnySwitchVar TruncateExtraChars-InNamesOnOff

Switch to specify whether extra characters ingroup, parameter, points, or analog data namesshould be truncated. (=On, Options: Off | On)

AnyVar PointsScaleFactor A scale factor to be multiplied to all 3D datapoints. (=1)

AnySwitchVar ConstructModelOn-Off

Switch to specify if a model should be con-structed from the measured 3D data points.(=On, Options: Off | On)

AnySwitchVar MarkerUseAllPoints-OnOff

Switch for using all point data as 3D markerdata. (=Off, Options: Off | On)

AnySwitchVar MarkerUseCam-MaskOnOff

Switch for using the Camera Mask for decidingwhich point data as 3D marker data. Non-zerocamera mask is interpreted as 3D marker data.(=On, Options: Off | On)

AnyIntArray MarkerIndices Array of point indices to be used as 3D markerdata. (="No values given")

AnyStringArray MarkerLabels Array of point labels to be used as 3D markerdata.(="No values given")

AnyIntVar MarkerFilterIndex Index of the filter to be used for the marker data.Zero is the default filter in member Filter. Neg-ative numbers means that no filter is applied.Positive numbers refer to filters entered by dec-laration of new objects in C3D object.(=0)

AnyIntVar ProcessedDataFilter-Index

Index of the filter to be used for the "processed"point data. Zero is the default filter in memberFilter. Negative numbers means that no filter isapplied. Positive numbers refer to filters enteredby declaration of new objects in C3D object.(=0)

AnyIntVar AnalogFilterIndex Index of the filter to be used for the data in theanalog section. Zero is the default filter in mem-ber Filter. Negative numbers means that no fil-ter is applied. Positive numbers refer to filtersentered by declaration of new objects in C3Dobject. (=-1)

AnyFunButterworth-Filter

Filter Standard (default) filter (Butterworth type fil-ter).

AnyVector Filter.z0 Initial condition vector. (="No values given")AnySwitchVar Filter.Automatic-

InitialConditionOnOffSwitch to specify whether or not the initial con-ditions are calculated automatically. (=Off, Op-tions: Off | On)

Page 376: Any Script Ref Manual

363

AnySwitchVar Filter.FilterForward-BackwardOnOff

Switch to specify if filtering should only be per-formed in the forward direction or both in theforward and backward direction.(=Off, Options: Off | On)

AnyIntVar Filter.N The filter order. (=2)AnyVector Filter.W The normalized cut-off frequency(ies). (="No

values given")AnyVar Filter.Fs The sample frequency of the data to be filtered.

(=0)AnyVector Filter.Fc The cut-off frequency(ies). (="No values

given")AnyFilterType Filter.Type The filter type.

(Options: LowPass | HighPass | BandPass |BandStop)

AnySwitchVar WriteMarkerDataTo-FilesOnOff

A switch to specify whether or not the markerdata should be written to text files. If thisis set to on, three output files are createdper marker, i.e. one with position data, onewith velocity data and one with accelerationdata. The output files are named <Mark-erName>_pos.txt, <MarkerName>_vel.txt and<MarkerName>_acc.txt. (=Off, Options: Off| On)

AnyVec3 MarkerScaleXYZ Scale factor used when drawing the marker.(={0.025, 0.025, 0.025})

AnyRGB MarkerRGB The color of a marker. (={0.65, 0.65, 0.65})AnySwitchVar MarkerDrawOnOff A switch to specify if markers should be drawn

or not. (=On, Options: Off | On)AnyInterPolType MarkerInterPolType The interpolation type used in the linear drivers

of the 3D data points. (=Bspline, Options:PiecewiseLinear | Bezier | Bspline)

AnyIntVar MarkerBsplineOrder Specification of the B-spline order. Only usedif MarkerInterPolType = Bspline.(=8)

Denied-Access MembersClass Name DescriptionAnyStringArray PointLabels (="No values given")AnyStringArray PointLabelsOriginal (="No values given")AnyStringArray AnalogLabels (="No values given")AnyStringArray AnalogLabels-

Original(="No values given")

Page 377: Any Script Ref Manual

364

AnyInputFileType: CreatableBase Class: AnyDataFileBase (see p. 348)

Description:Class to read a space seperated ASCII file. In the future, this class shoule be able to read anycharacter separated ASCII file.

Object Members:Obligatory-Initialization Members

Class Name DescriptionAnyFileVar FileName Name of the file.

Optional-Initialization MembersClass Name DescriptionAnySwitchVar FileErrorContinue-

OnOffA switch to indice whether reading of the datashould continue eventhough the file contains er-rors.(=Off, Options: Off | On)

Denied-Access MembersClass Name DescriptionAnyVector T The time axis. (="No values given")AnyMatrix Data The data. (="No values given")