cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Sop
Sop
Level III

2 constraints in custom DOE where the sum of two factors should be below 8 or greater than 18 hours

Hi,

I would like to run a custom DOE with 5 factors. 2 factors are related to time and due to work hours I have to ensure that the sum of those two factors either are below 8 hours OR greater than 18 hours. The first factor has 0.3 h as low level and 6 h as high whereas the second has 1 h and 20 h. The script below does not work, perhaps because there is an AND hidden...? thanks in advance

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 0.3, 6, "Time 1", 0 ),
	Add Factor( Continuous, 1, 20, "Time 2", 0 ), Set Random Seed( 979298838 ),
	Add Constraint( [1 1 8, -1 -1 -18] ), Add Term( {1, 0} ), Add Term( {1, 1} ),
	Add Term( {2, 1} ), Add Term( {1, 2} ), Add Term( {1, 1}, {2, 1} ),
	Add Term( {2, 2} ), Set Sample Size( 12 ), Optimality Criterion( 2 ),
	Simulate Responses( 0 ), Save X Matrix( 0 )}
);
1 ACCEPTED SOLUTION

Accepted Solutions

Re: 2 constraints in custom DOE where the sum of two factors should be below 8 or greater than 18 hours

Hi,

Try using a disallowed combinations constraint instead of linear inequality constraints.  I believe the following script may give you the design you want.

 

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 0.3, 6, "Time 1", 0 ),
	Add Factor( Continuous, 1, 20, "Time 2", 0 ), Set Random Seed( 979298838 ),
	Add Term( {1, 0} ), Add Term( {1, 1} ),
	Add Term( {2, 1} ), Add Term( {1, 2} ), Add Term( {1, 1}, {2, 1} ),
	Add Term( {2, 2} ), Set Sample Size( 12 ),
	Disallowed Combinations( Time 1 + Time 2 >= 8 & Time 1 + Time 2 <= 18 ),
	 Optimality Criterion( 2 ),
	Simulate Responses( 0 ), Save X Matrix( 0 )}
);

 

Laura

View solution in original post

2 REPLIES 2

Re: 2 constraints in custom DOE where the sum of two factors should be below 8 or greater than 18 hours

Hi,

Try using a disallowed combinations constraint instead of linear inequality constraints.  I believe the following script may give you the design you want.

 

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 0.3, 6, "Time 1", 0 ),
	Add Factor( Continuous, 1, 20, "Time 2", 0 ), Set Random Seed( 979298838 ),
	Add Term( {1, 0} ), Add Term( {1, 1} ),
	Add Term( {2, 1} ), Add Term( {1, 2} ), Add Term( {1, 1}, {2, 1} ),
	Add Term( {2, 2} ), Set Sample Size( 12 ),
	Disallowed Combinations( Time 1 + Time 2 >= 8 & Time 1 + Time 2 <= 18 ),
	 Optimality Criterion( 2 ),
	Simulate Responses( 0 ), Save X Matrix( 0 )}
);

 

Laura

Sop
Sop
Level III

Re: 2 constraints in custom DOE where the sum of two factors should be below 8 or greater than 18 hours

Thanks Laura, it works fine. Appreciate!

Recommended Articles