DOE with lots of constraints cannot be set up<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />My customer has the following situation to set up a DOE:
3 components of a mixture (S, X, M, could be treated as mixture or continous) plus a filler component (W), as well two suppliers for each of the ingredients S and X, called OS and OX (each categorical with two levels).
The difficulties raise with the constraints, first the ranges:
Range S 0 -0.04
Range X 0-0.006
Range M 0-0.07
Range W 0.884-1
OS L1, L2
OX L1, L2
Or as continuous, where the range expresses the percentage and the filler is not necessary anymore as they are not interested at all in the effect of the filler itself
Range S 0 -4 [%]
Range X 0-0.6 [%]
Range M 0-7 [%]
OS L1, L2
OX L1, L2
In addition there are the following requirements:
- S+X >0, so that S and X cannot be 0 at the same time
- If X==0, S must be >0.5% (but if X!=0, S can be 0)
- If S ==0, X must be >0.05% (but if S!=0, X can be 0)
- If S==0, OS is not allowed/makes no sense
- If X==0, OX is not allowed/makes no sense
The issue is that there cannot be constraints with the mixture factors other than the ranges or a simple linear constraint to ensure S+X>0. And in the continuous case we could not manage to set the constraints in a way to fulfill all constraints. Not with linear ones, nor with disallowed combinations, and a mixture of both is not possible either.
Any ideas how I could create a design with the above settings?
Attached some things I tried so far. In one I have created a design close to the requirements but thought itâs not balanced enough as there is no run where S or X alone occurs. Please see the three scripts to illustrate the behaviours, and especial the one with the 3 level categorical, as there are multiple designs included. Factors are saved in tables to your convenience
Thanks for your support,
Martin
Re: DOE with lots of constraints cannot be set upOK, thanks a lot Ryan!
Re: DOE with lots of constraints cannot be set upHi Martin,
Nothing jumps out to me - and it's not unusual to see diagnostics that can seem bad with disallowed combinations, simply because of the restricted space.
As for forcing in the inner levels, if you add some of the powers as Necessary, that's one option, or you could try keeping in at least some of the powers as If Possible.
If you use the simpler model (with the powers as necessary) design as the reference design in Compare Designs, you can get a more direct comparison to get a since as to which design might be preferred.
Cheers,
Ryan
Re: DOE with lots of constraints cannot be set upHi Ryan,
May you do not need to answer my above reply.
I tried some more things with the customer and came up with a non-splot-plot design just by removing the effects S*OS, X*OX and OS*OX:
DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Discrete Numeric, {0, 1, 2, 3, 4}, "S", 0 ),
Add Factor( Discrete Numeric, {0, 0.15, 0.3, 0.45, 0.6}, "X", 0 ),
Add Factor( Discrete Numeric, {0, 1.75, 3.5, 5.25, 7}, "M", 0 ),
Add Factor( Categorical, {"L1", "L2", "None"}, "OS", 0 ),
Add Factor( Categorical, {"L1", "L2", "None"}, "OX", 0 ),
Set Random Seed( 695079790 ), Number of Starts( 1000 ), Add Term( {1, 0} ),
Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ),
Add Term( {5, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ),
Add Term( {2, 1}, {4, 1} ), Add Term( {3, 1}, {4, 1} ),
Add Term( {3, 1}, {5, 1} ), Set Sample Size( 36 ),
Disallowed Combinations(
s == 0 & X == 0 | 0 < S <= 0.5 | S > 0 & OS == 3 | S == 0 & (OS == 1 | OS
== 2) | X > 0 & OX == 3 | X == 0 & (OX == 1 | OX == 2)
)}
);
This seems to be fairly good prediction variance and FDS plot looks also ok. the power is quite good for most effects and the correlation is fine too. Of course the Alias effect is larger for S*OS and X*OX.
Would you go with that design or is there anything you would say makes you feel nerveous?
And a final question: is there a way to force having the inner levels for S and X in the design, too? sometimes the lower half of concentrations might follow a different pattern than the higher ones
thanks,
Martin
Re: DOE with lots of constraints cannot be set upHi Ryan,
please read first the second reply as that one probably makes this one obsolete.
So here is my final script which has decent power and prediction variance if one adds more runs to it (e.g. 36):
// 24 runs
DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Discrete Numeric, {0, 1, 2, 3, 4}, "S", 0 ),
Add Factor( Discrete Numeric, {0, 0.15, 0.3, 0.45, 0.6}, "X", 0 ),
Add Factor( Discrete Numeric, {0, 1.75, 3.5, 5.25, 7}, "M", 0 ),
Add Factor( Categorical, {"L1", "L2", "None"}, "OS", 0 ),
Add Factor( Categorical, {"L1", "L2"}, "OX", 1 ), Set Random Seed( 984492505 ),
Number of Starts( 1000 ), Add Term( {1, 0} ), Add Term( {1, 1} ),
Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ),
Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ),
Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ),
Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ),
Add Term( {4, 1}, {5, 1} ), Optimize Number of Whole Plots,
Set Sample Size( 24 ), Disallowed Combinations(
0 < S <= 0.5 | S > 0 & OS == 3 | S == 0 & (OS == 1 | OS == 2) | X < 0.05
)}
);
// 36 runs, has much more power and less prediction variance
DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Discrete Numeric, {0, 1, 2, 3, 4}, "S", 0 ),
Add Factor( Discrete Numeric, {0, 0.15, 0.3, 0.45, 0.6}, "X", 0 ),
Add Factor( Discrete Numeric, {0, 1.75, 3.5, 5.25, 7}, "M", 0 ),
Add Factor( Categorical, {"L1", "L2", "None"}, "OS", 0 ),
Add Factor( Categorical, {"L1", "L2"}, "OX", 1 ), Set Random Seed( 1173606031 ),
Number of Starts( 1000 ), Add Term( {1, 0} ), Add Term( {1, 1} ),
Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ),
Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ),
Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ),
Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ),
Add Term( {4, 1}, {5, 1} ), Add Alias Term( {1, 1}, {4, 1} ),
Set N Whole Plots( 4 ), Set Sample Size( 36 ),
Disallowed Combinations(
0 < S <= 0.5 | S > 0 & OS == 3 | S == 0 & (OS == 1 | OS == 2) | X < 0.05
)}
);
As you suggested I removed manually the higher order terms as well the S*OS interaction. Thanks for that.
I have two add-on questions:
- 1) I just got a reply. with the Split Plot set up as it is we are constrained to have X always in. But they would like to have also the estimation for X == 0 but S >0.5. I tried to set up a new design with OX having 3 levels. I'm having troubles to force OX "None" when X == 0 , as well if X > 0 forcing OX != "None" (3) and still getting power calculations, So I removed the interaction effect X*OX and OS*OX. Here is my design I finally came up with:
DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Discrete Numeric, {0, 1, 2, 3, 4}, "S", 0 ),
Add Factor( Discrete Numeric, {0, 0.15, 0.3, 0.45, 0.6}, "X", 0 ),
Add Factor( Discrete Numeric, {0, 1.75, 3.5, 5.25, 7}, "M", 0 ),
Add Factor( Categorical, {"L1", "L2", "None"}, "OS", 0 ),
Add Factor( Categorical, {"L1", "L2", "None"}, "OX", 1 ),
Set Random Seed( 1317349002 ), Number of Starts( 1000 ), Add Term( {1, 0} ),
Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ),
Add Term( {5, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ),
Add Term( {2, 1}, {4, 1} ), Add Term( {3, 1}, {4, 1} ),
Add Term( {3, 1}, {5, 1} ), Add Alias Term( {1, 1}, {4, 1} ),
Set N Whole Plots( 6 ), Set Sample Size( 36 ),
Disallowed Combinations(
0 < S <= 0.5 | S > 0 & OS == 3 | S == 0 & (OS == 1 | OS == 2) | X > 0 & OX
== 3 | X == 0 & (OX == 1 | OX == 2)
)}
);
Is there anything that should me keep away from using this design? Except the fraction of design space plot all seems to be ok. And even the FDS plot is not toooo bad, I think. Would you change anything.
2) Would it make sense to keep the initial split plot design and do another for S/OS instead of X/OX to get an estimate also for the X==0 option? I donât think itâs a good idea to combine both results to answer the question if there are significant differences in the suppliers for the different combinations on a whole, do you agree?
Re: DOE with lots of constraints cannot be set upOops, I hadn't looked closely enough before... I think there's a couple of things going on here - first, the discrete numeric terms for higher orders are being added as If Possible (these have to be removed manually). The bigger issue is the S*OS interaction term, as it can't be estimated with the disallowed combinations. The designer should have caught this, but didn't, I'll have to look into it further. Running the below and removing those if possible terms, things should look better. I'll see if we can fix up these issues in a future release.
You could try removing that interaction and returning to the continuous route... but instead of using S==0, you might want something like S < 0.01. (n.b. this can also be an issue with discrete numeric, due to the storage of doubles, so even then I've needed to use abs(S)<.0001 instead of S==0).
Cheers,
Ryan
DOE(Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Discrete Numeric, {0, 1, 2, 3, 4}, "S", 0 ),
Add Factor( Discrete Numeric, {0, 0.15, 0.3, 0.45, 0.6}, "X", 0 ),
Add Factor( Discrete Numeric, {0, 1.75, 3.5, 5.25, 7}, "M", 0 ),
Add Factor( Categorical, {"L1", "L2", "None"}, "OS", 0 ),
Add Factor( Categorical, {"L1", "L2"}, "OX", 1 ), Set Random Seed( 891554152 ),
Number of Starts( 1000 ), Add Term( {1, 0} ), Add Term( {1, 1} ),
Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ),
Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ),
Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ),
Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ),
Add Term( {4, 1}, {5, 1} ), Add Alias Term( {1, 1}, {4, 1} ),
Set N Whole Plots( 4 ), Set Sample Size( 28 ),
0 < S <= 0.5 | S > 0 & OS == 3 | S == 0 & (OS == 1 | OS == 2))});
Re: DOE with lots of constraints cannot be set upHi Ryan,
no, I haven't. It seems to work, I will have to check with the customer if that's good enough and ok to use the discrete values.
One thing I got looking at the design evaluation and power analysis, I cannot estimate the power, but I guess this is due to the discrete numeric, right? The colormap looks quite ok to me :
The Fraction of Design Space Plot looks strange after 0,6:

Is that because of the constraints set?
Thanks,
Martin
Re: DOE with lots of constraints cannot be set upI think you're running into problems using the disallowed combinations with equalities on continuous factors. In particular, when using X==0 or S==0, something that's really close to 0 (even displayed as 0) can end up being used. Have you tried with discrete numeric for the continuous? Using one of your last scripts, something like this:
DOE(
{Add Response( Maximize, "Y", ., ., . ),
//Add Factor( Continuous, 0, 4, "S", 0 ),
//Add Factor( Continuous, 0, 0.6, "X", 0 ), Add Factor( Continuous, 0, 7, "M", 0 ),
Add Factor( Discrete Numeric, {0, 1, 2, 3, 4}, "S", 0),
Add Factor( Discrete Numeric, {0, .15, .3, .45, .6}, "X", 0),
Add Factor( Discrete Numeric, {0, 1.75, 3.5, 5.25, 7}, "M", 0),
Add Factor( Categorical, {"L1", "L2", "None"}, "OS", 0 ),
Add Factor( Categorical, {"L1", "L2"}, "OX", 1 ), Set Random Seed( 513965188 ),
Number of Starts( 1000 ), Add Term( {1, 0} ), Add Term( {1, 1} ),
Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ),
Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
Add Term( {1, 1}, {4, 1} ), Add Term( {1, 1}, {5, 1} ),
Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ),
Add Term( {2, 1}, {5, 1} ), Add Term( {3, 1}, {4, 1} ),
Add Term( {3, 1}, {5, 1} ), Add Term( {4, 1}, {5, 1} ), Set N Whole Plots( 4 ),
Set Sample Size( 28 ), Disallowed Combinations(
X < 0.05 | 0 < S <= 0.5 | S > 0 & OS == 3 | S == 0 & (OS == 1 | OS == 2)
Re: DOE with lots of constraints cannot be set upHi Martin,
Have you tried using Disallowed Combinations Script? This gives you more flexibility for defining constraints.
http://www.jmp.com/support/help/Define_Factor_Constraints.shtml#205355
Regards,
Phil