How to use a variable in JSL to set the levels of a DOE factor?I'm trying to add a factor to a DOE using a variable instead of hard coding the levels. The end goal is to provide the user with a simple interface set the levels for one of the factors.
The following code doesn't work and the factor just ends up with L1 and L2 as levels.
Names Default To Here( 1 );
levels = List(1,2,3);
d = DOE(
Custom Design,
Add factor(Discrete Numeric, levels)
);
d << Make Design;
d << Make Table;
Automation and ScriptingDesign of ExperimentsRe: How to use a variable in JSL to set the levels of a DOE factor?Here is an example I created interactively with a Continous factor and a Discrete Numeric factor.
levels = {1, 2, 3};
obj = DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Continuous, -1, 1, "X1", 0 )}
);
Eval(
Substitute(
Expr( obj << Add Factor( Discrete Numeric, LLL, "X2", 0 ) ),
Expr( LLL ),
levels
)
);Re: How to use a variable in JSL to set the levels of a DOE factor?Hello~
According to the example that you created, how to use variables for the "levels", and then add a "Categorical" factor to obj?
For example:
value = "11";
value = "21";
value = "31";
levels = {value1, value2, value3};
Thanks!