cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Byron_JMP
Staff
Automating Design Generation

Imagine if you had a system that could execute a set of experiments in a nearly automated way, like maybe a hight throughput assay system. Wouldn't it be nice if you could just send tables of factors and ranges to JMP and have JMP respond with experiment tables to feed the system.

 

With a little of the JMP Scripting Language (JSL) and the Scripting Index for examples, a simple system is relatively easy to code.

 

In this example we are going to start with a factor table that is formatted as a CSV file. 

We open the CSV, in JMP format it so that the Custom Design tool recognizes it, add an RSM model and then output the design table.  In this first iteration, all the factors are continuous, although expanding this categorical factors should be possible too.

 

Names Default To Here( 1 );
dt=Open(
	"your file path goes here/Factors.csv",
Import Settings(
		Labels( 1 ),
		Column Names Start( 1 ),
		Data Starts( 2 ),
		Lines To Read( "All" )
	)
);// this opens the CSV file
dt<<run formulas();
cont_cols=dt<<get column names("Continuous"); // get a list of the continuous columns
for(i=1, i<=nitems(cont_cols), i++,
	column(cont_cols[i])<<Set Property( "Design Role", Design Role( Continuous ) )	
	);// give all the continuous columns a design role
dt<<new table variable("Table Type","DOE Factor Table"); //just for pretty

obj_doe=DOE( Custom Design, Load Factors ); //loads the factor table into the DOE platform 
close(dt,nosave);// don't need the factor table, so closing it.
obj_doe<< Make Model( RSM ); //add an RSM model to the DOE platform
obj_doe<< Make Design; // same as clicking the "Make Design" button
dt2=obj_doe<<make table; // same as clicking the "Make Table" button
dt2 << Save( "your file path goes here/Design.csv" ); // convert to CSV format
Close( dt2, "NoSave" );// the design table is saved, closing it
obj_doe<<close window; //closing the DOE design window to clean it all up

The factor table used for the input is very simple.  The first row are the factor levels, the second row is the minimum value and the third row is the maximum value.  Since the model type is RSM, all the two-way interactions and quadratic terms are automatically added to the design, which includes the mid-point, (0) for each of the factors.

 

Screen Shot 2021-08-04 at 1.48.15 PM.png

 

One last thing.  If the very first line of the above script it edited to contain,  //! then the script will automatically execute.  So like if another program ran the script JMP would open and generate the table.  Adding Exit() as the last line would close JMP.  (it might also close the session of JMP you are in too, so be a little careful with "exit")

 

 

Last Modified: Aug 4, 2021 1:55 PM