cancel
Showing results for
Show  only  | Search instead for
Did you mean:
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
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
Staff

## 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( {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

2 REPLIES 2
Staff

## 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( {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

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!