cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
basti41aa
Level I

Custom DoE: How to set up Factor Constraints with Script

Hello,

 

I´m trying to play around with the Catapult from Sigmazone (https://sigmazone.com/catapult/) and practice my DoE skills, but I´m having trouble setting up the factor constraints.

basti41aa_3-1716897872598.png

 

 

 

 

Basically I´m having 5 continous factors with the following levels:

  • Release Angle --> 90 - 185
  • Firing Angle --> 90 - 140
  • Cup Elevation --> 200 - 300
  • Pin Elevation --> 100 - 200
  • Bungee Position --> 100 - 200

The problem is, that the Release Angle has to be always to be 5 units higher than the Firing Angle, otherwise the catapult won´t shoot.

I found it hard to find any documentation on how to use this script correctly, so I´m asking this questions here now. 

I tried this, but this does not work unfortunately:

 

 

Release Angle - Firing Angle >= 5

 

 

E.g. this will result in this, where Run 5 is not possible to perform.

basti41aa_1-1716897652403.png

 

I found a couple of youtube Videos, where they tried to solve this catapult, but they will always ignore this constraint and due to simplicity just keep the firing Angle at a constant (e.g. 110) and then set the Release Angle from 115-185.

Can you help me with this? Thank you very much in advance!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Victor_G
Super User

Re: Custom DoE: How to set up Factor Constraints with Script

Hi @basti41aa,

 

Welcome in the Community !

 

Your constraint is ok mathematically, but may not be correct regarding scripting language JSL.
I have good results defining the constraint using "Specify linear constraints" panel and this expression :

{1 * :RA + -1 * :FA >= 5}

I obtain this design (when specifying only main effects in the model using Custom Design platform) :

Victor_G_0-1716898662976.png

Here is the script to generate the design (and datatable attached) :

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 90, 185, "RA", 0 ),
	Add Factor( Continuous, 90, 140, "FA", 0 ),
	Add Factor( Continuous, 200, 300, "CE", 0 ),
	Add Factor( Continuous, 100, 200, "PE", 0 ),
	Add Factor( Continuous, 100, 200, "BP", 0 ), Set Random Seed( 5840095 ),
	Number of Starts( 51664 ), Add Constraint( [-1 1 0 0 0 -5] ), 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 Alias Term( {1, 1}, {2, 1} ),
	Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ),
	Add Alias Term( {1, 1}, {5, 1} ), Add Alias Term( {2, 1}, {3, 1} ),
	Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {2, 1}, {5, 1} ),
	Add Alias Term( {3, 1}, {4, 1} ), Add Alias Term( {3, 1}, {5, 1} ),
	Add Alias Term( {4, 1}, {5, 1} ), Set Sample Size( 12 ), Simulate Responses( 0 ),
	Save X Matrix( 0 ), Make Design}
)

I highly recommend reading the great blog post by @Jed_Campbell regarding factor constraints : Demystifying Factor Constraints 

Victor GUILLER
Scientific Expertise Engineer
L'Oréal - Data & Analytics

View solution in original post

Victor_G
Super User

Re: Custom DoE: How to set up Factor Constraints with Script

Try to specify your constraint using the "Specify Linear Constraints" instead of the "Disallowed Combinations Script".

 

Victor GUILLER
Scientific Expertise Engineer
L'Oréal - Data & Analytics

View solution in original post

3 REPLIES 3
Victor_G
Super User

Re: Custom DoE: How to set up Factor Constraints with Script

Hi @basti41aa,

 

Welcome in the Community !

 

Your constraint is ok mathematically, but may not be correct regarding scripting language JSL.
I have good results defining the constraint using "Specify linear constraints" panel and this expression :

{1 * :RA + -1 * :FA >= 5}

I obtain this design (when specifying only main effects in the model using Custom Design platform) :

Victor_G_0-1716898662976.png

Here is the script to generate the design (and datatable attached) :

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 90, 185, "RA", 0 ),
	Add Factor( Continuous, 90, 140, "FA", 0 ),
	Add Factor( Continuous, 200, 300, "CE", 0 ),
	Add Factor( Continuous, 100, 200, "PE", 0 ),
	Add Factor( Continuous, 100, 200, "BP", 0 ), Set Random Seed( 5840095 ),
	Number of Starts( 51664 ), Add Constraint( [-1 1 0 0 0 -5] ), 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 Alias Term( {1, 1}, {2, 1} ),
	Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ),
	Add Alias Term( {1, 1}, {5, 1} ), Add Alias Term( {2, 1}, {3, 1} ),
	Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {2, 1}, {5, 1} ),
	Add Alias Term( {3, 1}, {4, 1} ), Add Alias Term( {3, 1}, {5, 1} ),
	Add Alias Term( {4, 1}, {5, 1} ), Set Sample Size( 12 ), Simulate Responses( 0 ),
	Save X Matrix( 0 ), Make Design}
)

I highly recommend reading the great blog post by @Jed_Campbell regarding factor constraints : Demystifying Factor Constraints 

Victor GUILLER
Scientific Expertise Engineer
L'Oréal - Data & Analytics
basti41aa
Level I

Re: Custom DoE: How to set up Factor Constraints with Script

Hello @Victor_G,

thank you very much for the quick response!

Thank you also for the additional information.

Sadly if I try to run this expression now, I´m running into an error. I even renamed the factors and copied your line into my script and set up only the main interactions, but I still do get this message.

What could be the reason for this? I´m using JMP17.

 

basti41aa_0-1716899488395.png

Thanks in Advance!

Victor_G
Super User

Re: Custom DoE: How to set up Factor Constraints with Script

Try to specify your constraint using the "Specify Linear Constraints" instead of the "Disallowed Combinations Script".

 

Victor GUILLER
Scientific Expertise Engineer
L'Oréal - Data & Analytics