Specifications
232
The next specification deals with the parameters to vary:
nStep = ;
AnyDesVar SaddleHeight = {
Val = Main.BikeParameters.SaddleHeight;
Min = Val - 0.05;
Max = Val + 0.03;
};
AnyDesVar SaddlePos = {
Val = Main.BikeParameters.SaddlePos;
Min = Val - 0.07;
Max = Val + 0.10;
};
AnyDesMeasure &<Insert name0> = <Insert object reference (or full object definition)>;
//AnyDesMeasure &<Insert name1> = <Insert object reference (or full object
definition)>;
};
Please notice here that we have removed the '&'s that were inserted in the template in front of the variable
names. Instead of pointing at AnyDesVars defined elsewhere we include the entire definition right here in
the study, and this is actually the usual way to do it. Each AnyDesVar gets three properties set. The first one
is called 'Val' and is simply set equal to an existing parameter in the model. The best way to understand this
statement is to think of Val as a reference variable that is equalized in the first case with the SaddleHeight,
which is a parameter defined at the top of the main file. At any time in the parameter study, Val will be
equal to the saddle height as one should expect from the assignment. But in this special case, the
assignment also goes the other way: It lets the parameter study control the value of what is on the right
hand side of the equality sign, in this case the SaddleHeight parameter. We have similarly defined a second
parameter, SaddlePos, which allows the parameter study to vary the horizontal saddle position. This two-
way linkage between Val and another variable in the model implies certain restrictions on what assignments
AnyScript allows for this particular case. The referred variable must be a scalar quantity, i.e. either a scalar
or an element of a larger structure (e.g. vector or matrix). Secondly, it must be an independent scalar
quantity, i.e., it cannot depend (by expressions) on other variables; otherwise there would exist an
ambiguity. Alternatively to linking another independent variable in the model, Val can be initialized with
constants. In this case, Val will be the only instance of the design variable and the model must depend
directly on Val. This latter use is a somewhat restricted exploitation of AnyDesVar and is typically not
practical when studies of existing models are to be carried out.
The next step is to define the properties we wish to study, i.e. the dependent parameters or "design
measures" of the model. As you know, after running an operation from a study the results are available in
the Output branch of the tree view of the operation and they can be plotted, dumped and copied to the
clipboard and so on. Now we are defining a study that will execute operations from other studies and
assemble the results for later investigation. We might even want to make mathematical operations on these
results, combine results from different operations, and so on. To do this we must refer to the result we wish
to store for further processing. There is just one semantic problem: The results do not exist until we have
performed the analysis, but we must refer to them already when we author (and load) the model.
To solve this problem we must go back to the AnyBodyStudy Study, from where we want to lift the results,
and declare an object that will allow us to refer to computational results before they are actually made. The
object is of class AnyOutputFun, and we shall add it to the existing AnyBodyStudy:
// The study: Operations to be performed on the model
AnyBodyStudy Study = {
AnyFolder &Model = .Model;
RecruitmentSolver = MinMaxOOSolSimplex;
Gravity = {0.0, -9.81, 0.0};
tEnd = Main.BikeParameters.T;
nStep = 50;










