Names default to here(1);
dt = New Table( "WithFormula",
Add Rows( 1 ),
New Column( "X",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1] )
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( 15 - (:X-3) ^ 2 )
)
);
// show the interaction
dt << Graph Builder(
Size( 533, 456 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ) ),
Elements( Formula( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"X",
ScaleBox,
{Format( "Best", 12 ), Min( -5.83914231679298 ), Max( 5.61125768320702 ),
Inc( 2 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"Y",
ScaleBox,
{Format( "Best", 12 ), Min( -22.4207925102041 ), Max( 16.6726794897959 ),
Inc( 10 ), Minor Ticks( 0 )}
)
)
);
// Use the profiler with a desirability function to indicate that the Y variable should
// be maximized and give a range in which to maximize it
prof = dt << Profiler(
Y( :Y ),
Profiler(
1,
Desirability Functions( 1 ),
Y << Response Limits(
{Lower( -100, 0.066 ), Middle( 0, 0.5 ), Upper( 100, 0.9819 ),
Goal( "Maximize" ), Importance( 1 )}
),
Term Value(
X(
0,
Min( -10 ),
Max( 10 ),
Lock( 0 ),
Show( 1 )
)
)
)
);
prof << Maximize Desirability;
Names default to here(1);
dt = New Table( "WithFormula",
Add Rows( 1 ),
New Column( "X",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1] )
),
New Column( "Y",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( 15 - (:X-3) ^ 2 )
)
);
// show the interaction
dt << Graph Builder(
Size( 533, 456 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ) ),
Elements( Formula( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"X",
ScaleBox,
{Format( "Best", 12 ), Min( -5.83914231679298 ), Max( 5.61125768320702 ),
Inc( 2 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"Y",
ScaleBox,
{Format( "Best", 12 ), Min( -22.4207925102041 ), Max( 16.6726794897959 ),
Inc( 10 ), Minor Ticks( 0 )}
)
)
);
// Use the profiler with a desirability function to indicate that the Y variable should
// be maximized and give a range in which to maximize it
prof = dt << Profiler(
Y( :Y ),
Profiler(
1,
Desirability Functions( 1 ),
Y << Response Limits(
{Lower( -100, 0.066 ), Middle( 0, 0.5 ), Upper( 100, 0.9819 ),
Goal( "Maximize" ), Importance( 1 )}
),
Term Value(
X(
0,
Min( -10 ),
Max( 10 ),
Lock( 0 ),
Show( 1 )
)
)
)
);
prof << Maximize Desirability;