cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
Sop
This widget could not be displayed.
" alt = "Level III"/> Sop
Level III

DOE with two type of constraints

Hello,

I work on a DOE with two cont. factors and two categorical

Factor Low Level   High Level
CB Angle 1 (continuous) 10   60
CB Angle 2 (continuous) 10   60
Cross Bar 1 (Categorical) Soft   Hard
Cross Bar 2 (Categorical) Red Yellow Blue

Now to the constraints:

CB Angle 1 and CB Angle 2 <= 70

AND

For Cross Bar 1 == Hard, CB Angle 1 == 25

1) If I try linear constraint and non-allowed combinations one at a time it works (Script part 1 and 2), but if if include both constraints (script part 3) the linear constraint disappears.

2) The run balance between Cross Bar 1 soft and hard is heavily skewed towards soft. How do I fix that. 

If you have a solution to this it would be highly appreciated, thanks.

3 ACCEPTED SOLUTIONS

Accepted Solutions

Re: DOE with two type of constraints

Hi,

 

If you need disallowed combinations constraints and linear constraints for the same design, you can write the linear constraints as disallowed combinations.  Here is some example code that might work for your case:

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 10, 60, "CB Angle 1", 0 ),
	Add Factor( Continuous, 10, 60, "CB Angle 2", 0 ),
	Add Factor( Categorical, {"Red", "Yellow", "Blue"}, "CB 2", 0 ),
	Add Factor( Categorical, {"Soft", "Hard"}, "CB 1", 0 ),
	Set Random Seed( 277794177 ), Number of Starts( 7637 ), Add Term( {1, 0} ),
	Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ),
	Add Term( {1, 2} ), Add Term( {2, 2} ), Add Alias Term( {1, 1}, {2, 1} ),
	Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ),
	Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ),
	Add Alias Term( {3, 1}, {4, 1} ), Set Sample Size( 12 ),
	Disallowed Combinations(
		CB 1 == "Hard" & CB Angle 1 <= 24.5 | CB 1 == "Hard" & CB Angle 1 >= 25.5 |
		CB Angle 1 + CB Angle 2 > 70
	), Simulate Responses( 0 ), Save X Matrix( 0 ), Make Design,
	Set Run Order( Randomize ), Make Table}
);

Notice that I changed the "<=" to ">" to make the linear constraint a "disallowed" constraint.

 

I hope this helps.

View solution in original post

Victor_G
Super User

Re: DOE with two type of constraints

Hi Søren,

 

Typically, when a design involves several and different types of constraints, my go-to solution would be to use a Candidate set approach, and use the Custom design platform based on this candidate set.

 

One way to create it is to know which is the minimum incremental size between levels of factor (specifically for angle, are you able to set angle with a precision of 1° ? More ? Less ?), and create a table of all combinations.

  1. I first created two tables for each of the continuous factor, with a sequence data initialization from 10 to 60 with a step of 1 :
    Victor_G_0-1749730272526.png
  2. Then I do a cartesian join of these two tables (2601 unique possible combinations in the resulting table). I filter every combination where Angle 1 + Angle 2 > 70 (1326 remaining rows).
  3. I create two tables for the categorical factors and do a Cartesian join between the two (6 unique combinations) :
    Victor_G_1-1749730552064.png
  4. Finally, a cartesian join between this categorical factors table and the filtered continuous one lead us closely to the final candidate set (7956 rows).
  5. I then apply on this final table the last remaining constraint only for "hard" Cross bar 1 to exclude rows non respecting the constraint : For Cross Bar 1 == Hard, CB Angle 1 == 25 (4086 remaining rows).

You can find this candidate set attached.

You can then use this candidate set with the Custom Design platform, by selecting covariate factors runs from your table, specify the desired model and an appropriate number of runs :

Victor_G_3-1749731437153.png

You can then have an optimal design built only with feasible runs from your candidate set table :

Victor_G_4-1749731488513.png

Attached is the design table proposed with 24 runs, as in your use case.

I don't expect the balance between the two levels of Cross Bar 1 to be "fixed", as the experimental space for level Soft is a lot larger than the one for level Hard (due to its constraint). Trying to force balance between the two levels with the constraint you mentioned might result in "less optimal" design and less precise terms estimations for other terms.

 

 

EDIT: You'll obtain the same or a similar design with same performance if you're using the approach from @Laura_Lancaster or this one with the same run size.

 

Hope this solution may work for you,

Victor GUILLER

"It is not unusual for a well-designed experiment to analyze itself" (Box, Hunter and Hunter)

View solution in original post

Sop
This widget could not be displayed.
" alt = "Level III"/> Sop
Level III

Re: DOE with two type of constraints

Hi Victor, this is amazing! This will give me back the control of all my colleagues constraints! Thanks a lot for sharing

View solution in original post

4 REPLIES 4

Re: DOE with two type of constraints

Hi,

 

If you need disallowed combinations constraints and linear constraints for the same design, you can write the linear constraints as disallowed combinations.  Here is some example code that might work for your case:

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 10, 60, "CB Angle 1", 0 ),
	Add Factor( Continuous, 10, 60, "CB Angle 2", 0 ),
	Add Factor( Categorical, {"Red", "Yellow", "Blue"}, "CB 2", 0 ),
	Add Factor( Categorical, {"Soft", "Hard"}, "CB 1", 0 ),
	Set Random Seed( 277794177 ), Number of Starts( 7637 ), Add Term( {1, 0} ),
	Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ),
	Add Term( {1, 2} ), Add Term( {2, 2} ), Add Alias Term( {1, 1}, {2, 1} ),
	Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ),
	Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ),
	Add Alias Term( {3, 1}, {4, 1} ), Set Sample Size( 12 ),
	Disallowed Combinations(
		CB 1 == "Hard" & CB Angle 1 <= 24.5 | CB 1 == "Hard" & CB Angle 1 >= 25.5 |
		CB Angle 1 + CB Angle 2 > 70
	), Simulate Responses( 0 ), Save X Matrix( 0 ), Make Design,
	Set Run Order( Randomize ), Make Table}
);

Notice that I changed the "<=" to ">" to make the linear constraint a "disallowed" constraint.

 

I hope this helps.

Sop
This widget could not be displayed.
" alt = "Level III"/> Sop
Level III

Re: DOE with two type of constraints

Thank you Laura. It works. Why it works with with the "or" command within the disallowed combinations, I do not understand and would probably never have tried myself. Thanks.

Victor_G
Super User

Re: DOE with two type of constraints

Hi Søren,

 

Typically, when a design involves several and different types of constraints, my go-to solution would be to use a Candidate set approach, and use the Custom design platform based on this candidate set.

 

One way to create it is to know which is the minimum incremental size between levels of factor (specifically for angle, are you able to set angle with a precision of 1° ? More ? Less ?), and create a table of all combinations.

  1. I first created two tables for each of the continuous factor, with a sequence data initialization from 10 to 60 with a step of 1 :
    Victor_G_0-1749730272526.png
  2. Then I do a cartesian join of these two tables (2601 unique possible combinations in the resulting table). I filter every combination where Angle 1 + Angle 2 > 70 (1326 remaining rows).
  3. I create two tables for the categorical factors and do a Cartesian join between the two (6 unique combinations) :
    Victor_G_1-1749730552064.png
  4. Finally, a cartesian join between this categorical factors table and the filtered continuous one lead us closely to the final candidate set (7956 rows).
  5. I then apply on this final table the last remaining constraint only for "hard" Cross bar 1 to exclude rows non respecting the constraint : For Cross Bar 1 == Hard, CB Angle 1 == 25 (4086 remaining rows).

You can find this candidate set attached.

You can then use this candidate set with the Custom Design platform, by selecting covariate factors runs from your table, specify the desired model and an appropriate number of runs :

Victor_G_3-1749731437153.png

You can then have an optimal design built only with feasible runs from your candidate set table :

Victor_G_4-1749731488513.png

Attached is the design table proposed with 24 runs, as in your use case.

I don't expect the balance between the two levels of Cross Bar 1 to be "fixed", as the experimental space for level Soft is a lot larger than the one for level Hard (due to its constraint). Trying to force balance between the two levels with the constraint you mentioned might result in "less optimal" design and less precise terms estimations for other terms.

 

 

EDIT: You'll obtain the same or a similar design with same performance if you're using the approach from @Laura_Lancaster or this one with the same run size.

 

Hope this solution may work for you,

Victor GUILLER

"It is not unusual for a well-designed experiment to analyze itself" (Box, Hunter and Hunter)
Sop
This widget could not be displayed.
" alt = "Level III"/> Sop
Level III

Re: DOE with two type of constraints

Hi Victor, this is amazing! This will give me back the control of all my colleagues constraints! Thanks a lot for sharing

Recommended Articles