- JMP User Community
- :
- Discussions
- :
- Get Calculated Number of Runs fields from Custom Design (Automation)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 4, 2019 10:33 AM
(3358 views)

Using JMP 14.1. I am automating the creation of a DOE/JMP table from Python using JSL. I can automate the custom design and DOE/JMP table just fine, but must prompt the user for the number of runs (sample size). What my user's would like is for my application to generate the custom design, and then obtain the Number of Runs fields from JMP (e.g., the *Minimum* and *Default* values as calculated by JMP). Then, I can give the user the choice of selecting the Minimum or Default values, or a user specfied value, before invoking JMP again to create the final DOE/JMP table using this value for the Sample Size (e.g., Set Sample Size( n )).

So my question is there anyway to programatically retrieve the calculated Minimum and Default values from the Number of Runs section within the Custom Design page? If not, is there a way I can calculate myself what these values would be as calculated by JMP? I have scoured the JMP Automation and JSL manuals and have not found anything.

Thanks for any insight/advice.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

This example gives you the idea.

```
design = DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Continuous, -1, 1, "X1", 0 ),
Add Factor( Continuous, -1, 1, "X2", 0 ), Set Random Seed( 1314847 ),
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 )}
);
design window = design << Report;
min number of runs = design window["Design Generation"][NumberColBox(1)] << Get( 1 );
def number of runs = design window["Design Generation"][NumberColBox(1)] << Get( 2 );
design window["Design Generation"][NumberColEditBox(4)] << Set( { 99 } );
Show(
min number of runs,
def number of runs
);
```

Learn it once, use it forever!

3 REPLIES 3

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

This example gives you the idea.

```
design = DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Continuous, -1, 1, "X1", 0 ),
Add Factor( Continuous, -1, 1, "X2", 0 ), Set Random Seed( 1314847 ),
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 )}
);
design window = design << Report;
min number of runs = design window["Design Generation"][NumberColBox(1)] << Get( 1 );
def number of runs = design window["Design Generation"][NumberColBox(1)] << Get( 2 );
design window["Design Generation"][NumberColEditBox(4)] << Set( { 99 } );
Show(
min number of runs,
def number of runs
);
```

Learn it once, use it forever!

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Get Calculated Number of Runs fields from Custom Design (Automation)

Thank you for the example! I will work with this and post my results.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Get Calculated Number of Runs fields from Custom Design (Automation)

Thank you for the example - I was able to use parts of it and find a solution. I basically found obtained the values as you said, and then saved them to a log file. Then my Python application was able to read the log file, get the values and let the user choose before re-launching JMP to generate the table - JSL snippet below:

```
design window = doe_app << Report;
minimum = design window["Design Generation"][NumberColBox(1)] << Get( 1 );
default = design window["Design Generation"][NumberColBox(1)] << Get( 2 );
show (minimum);
show (default);
// save log file to get minimum and default values
save log("log_file_name.log");
```

Article Labels

There are no labels assigned to this post.