<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Robust Optimization - maximize desirability based on feedback from simulation? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Robust-Optimization-maximize-desirability-based-on-feedback-from/m-p/411323#M66088</link>
    <description>&lt;P&gt;The detail I was looking for was to simulate each point requested by the optimizer instead of having to simulate the entire model space and then represent the simulation results using another model.&amp;nbsp; For small problems this does not matter, but as more dimensions are added, the simulation experiment starts to act like brute force method.&amp;nbsp; I came to the conclusion that this is not possible though.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Aug 2021 18:59:44 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2021-08-19T18:59:44Z</dc:date>
    <item>
      <title>Robust Optimization - maximize desirability based on feedback from simulation?</title>
      <link>https://community.jmp.com/t5/Discussions/Robust-Optimization-maximize-desirability-based-on-feedback-from/m-p/393751#M64413</link>
      <description>&lt;P&gt;Consider a system where an optimal point is at the edge of an acceptable operating envelope.&amp;nbsp; If attempting to run there, small changes in controlled variables can lead to poor results in some fraction of the total runs.&amp;nbsp; It is possible to use the optimization built into the profiler to find optimal conditions, and to use simulation to find more robust target operating conditions, but can they be used together?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see several papers describing the use of simulation alone to find robust optimal points, including simulation for points in a grid and picking the best.&amp;nbsp; Instead, can I specify a simulation to do at each point and some passing criteria, and have the optimizer use that to find optimal solutions without having to calculate a grid across the entire potential operating space?&amp;nbsp; Is there a better method?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Today I typically use the optimizer first and then do simulations around those points to find more robust operating ranges. This is a pretty manual process and can be time intensive for complex desirability functions in many dimensions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Here the optimal conditions for a system were identified, but simulation at those points shows a high number of low desirability results.&amp;nbsp; Here the 0.05 standard deviation is meant to represent how accurately X1 and X2 can be controlled.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ih_1-1623862861235.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33585iE02A43B10D0EEB34/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_1-1623862861235.png" alt="ih_1-1623862861235.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By manually moving X2 away from the 'cliff', the majority of results are good, even though the median desirability is lower:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ih_2-1623862907379.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33586iBAEB12094E10AEF3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_2-1623862907379.png" alt="ih_2-1623862907379.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Visualized in a contour plot, here are operating ranges around the optimal solution and the robust solution:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ih_0-1623862714421.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33584i1D76C052EEE9E217/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_0-1623862714421.png" alt="ih_0-1623862714421.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Script to recreate example data and profilers:&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

dt = New Table( "Robust Simulation Example",
	Add Rows( 1000 ),
	New Column( "x1",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Random Uniform( -1, 1 ) )
	),
	New Column( "x2",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Random Uniform( -1, 1 ) )
	),
	New Column( "y",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( -(:x1 ^ 2 + :x2 ^ 2) )
	),
	New Column( "Feasible Solution",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( If( :x2 &amp;gt; 0.1, 1, 0 ) ),
		Set Selected
	),
	New Column( "Desirability",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( If( If( :x2 &amp;gt; 0.1, 1, 0 ) == 1, -(:x1 ^ 2 + :x2 ^ 2), -2 ) )
	)

);


New Window("Finding robust solution",
	(
		H List Box(
			dt &amp;lt;&amp;lt; Profiler(
				Y( :y, :Feasible Solution ),
				Profiler(
					1,
					Desirability Functions( 1 ),
					Term Value(
						x1( -0.0000000003269293581, Lock( 0 ), Show( 1 ) ),
						x2( 0.100000001061837, Lock( 0 ), Show( 1 ) )
					)
				),
				SendToReport(
					Dispatch( {}, "Profiler", OutlineBox, {Set Title( "Optimized Solution" )} )
				)
			),
			dt &amp;lt;&amp;lt; Profiler(
				Y( :y, :Feasible Solution ),
				Profiler(
					1,
					Desirability Functions( 1 ),
					Term Value(
						x1( -0.0000000003269293581, Lock( 0 ), Show( 1 ) ),
						x2( 0.100000001061837, Lock( 0 ), Show( 1 ) )
					),
					Simulator(
						1,
						Factors(
							x1 &amp;lt;&amp;lt; Random( Normal( -0.0000000003269293581, 0.05 ) ),
							x2 &amp;lt;&amp;lt; Random( Normal( 0.100000001061837, 0.05 ) )
						),
						Responses( y &amp;lt;&amp;lt; No Noise, Feasible Solution &amp;lt;&amp;lt; No Noise ),
						Resimulate
					)
				),
				SendToReport(
					Dispatch(
						{},
						"Profiler",
						OutlineBox,
						{Set Title(
							"Simulation of optimized solution if only able to control each x to have standard deviation of 0.05, note the large number of infeasible solution"
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profile Simulator Histogram",
						FrameBox,
						{DispatchSeg(
							Hist Seg( 1 ),
							{Line Color( {65, 104, 68} ), Fill Color( "Green" ),
							Bin Span( 2, 0 )}
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profile Simulator Histogram",
						FrameBox( 2 ),
						{DispatchSeg(
							Hist Seg( 1 ),
							{Line Color( {65, 104, 68} ), Fill Color( "Green" ),
							Bin Span( 2, 0 )}
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profile Simulator Histogram",
						FrameBox( 3 ),
						{DispatchSeg(
							Hist Seg( 1 ),
							{Line Color( {65, 104, 68} ), Fill Color( "Green" ),
							Bin Span( 2, 0 )}
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"",
						Border Box( 21 ),
						Add Text Annotation(
							Text( "Lots of Low
	Desirability
	Results" ),
							Fixed Size( 0 ),
							Text Box( {-104, 38, -15, 133} ),
							Filled( 0 ),
							Text Color( "Medium Dark Magenta" ),
							"Font"("Segoe UI", 10, "Bold")
						)
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profile Simulator Histogram",
						FrameBox( 3 ),
						{DispatchSeg(
							Hist Seg( 1 ),
							{Line Color( {65, 104, 68} ), Fill Color( "Green" ),
							Bin Span( 2, 0 )}
						), Add Line Annotation(
							Line( {-8, 68}, {-22, 65} ),
							Color( "Medium Dark Magenta" ),
							Thick( 1 )
						)}
					)
				)
			),
			dt &amp;lt;&amp;lt; Profiler(
				Y( :y, :Feasible Solution ),
				Profiler(
					1,
					Desirability Functions( 1 ),
					Term Value(
						x1( -0.0000000003269293581, Lock( 0 ), Show( 1 ) ),
						x2( 0.203, Lock( 0 ), Show( 1 ) )
					),
					Simulator(
						1,
						Factors(
							x1 &amp;lt;&amp;lt; Random( Normal( -0.0000000003269293581, 0.05 ) ),
							x2 &amp;lt;&amp;lt; Random( Normal( 0.203, 0.05 ) )
						),
						Responses( y &amp;lt;&amp;lt; No Noise, Feasible Solution &amp;lt;&amp;lt; No Noise ),
						Resimulate
					)
				),
				SendToReport(
					Dispatch(
						{},
						"Profiler",
						OutlineBox,
						{Set Title(
							"Solution moved away from the 'edge' so an acceptable fraction of simulated solutions are infeasible"
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profile Simulator Histogram",
						FrameBox,
						{DispatchSeg(
							Hist Seg( 1 ),
							{Line Color( {65, 104, 68} ), Fill Color( "Green" ),
							Bin Span( 2, 0 )}
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profile Simulator Histogram",
						FrameBox( 2 ),
						{DispatchSeg(
							Hist Seg( 1 ),
							{Line Color( {65, 104, 68} ), Fill Color( "Green" ),
							Bin Span( 2, 0 )}
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profile Simulator Histogram",
						FrameBox( 3 ),
						{DispatchSeg(
							Hist Seg( 1 ),
							{Line Color( {65, 104, 68} ), Fill Color( "Green" ),
							Bin Span( 2, 0 )}
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"",
						Border Box( 21 ),
						Add Text Annotation(
							Text( "Acceptable
	fraction of low
	Desirability
	Results" ),
							Fixed Size( 0 ),
							Text Box( {-111, 25, 8, 108} ),
							Filled( 0 ),
							Text Color( "Medium Dark Magenta" ),
							"Font"("Segoe UI", 10, "Bold")
						)
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profile Simulator Histogram",
						FrameBox( 3 ),
						{DispatchSeg(
							Hist Seg( 1 ),
							{Line Color( {65, 104, 68} ), Fill Color( "Green" ),
							Bin Span( 2, 0 )}
						), Add Line Annotation(
							Line( {-8, 68}, {-22, 65} ),
							Color( "Medium Dark Magenta" ),
							Thick( 1 )
						)}
					),
					Dispatch(
						{"Prediction Profiler"},
						"Profiler",
						FrameBox( 6 ),
						Add Text Annotation(
							Text( "Moved from 0.1 to 0.2" ),
							Fixed Size( 1 ),
							Text Box( {7, 20, 72, 89} ),
							Filled( 0 ),
							Text Color( "Medium Dark Magenta" ),
							"Font"("Segoe UI", 10, "Bold")
						)
					)
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Fri, 09 Jun 2023 00:34:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Robust-Optimization-maximize-desirability-based-on-feedback-from/m-p/393751#M64413</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2023-06-09T00:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Robust Optimization - maximize desirability based on feedback from simulation?</title>
      <link>https://community.jmp.com/t5/Discussions/Robust-Optimization-maximize-desirability-based-on-feedback-from/m-p/393852#M64425</link>
      <description>&lt;P&gt;JMP Pro has some good tools to help you out here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Specifically, you can build your model in any of the modeling platforms. Then, in the &lt;A href="https://www.jmp.com/support/help/en/16.0/#page/jmp/profiler.shtml#" target="_self"&gt;Profiler&lt;/A&gt; you can (as you described) use a &lt;A href="https://www.jmp.com/support/help/en/16.0/#page/jmp/simulation-experiment.shtml#" target="_self"&gt;Simulation Experiment&lt;/A&gt; to run multiple Monte Carlo simulations across the factor space. In the resulting table you'll have a defect (out of spec) rate column for each simulation. There's a script attached to that table that will use the &lt;A href="https://www.jmp.com/support/help/en/16.0/jmp/gaussian-process.shtml#ww1019265" target="_self"&gt;Gaussian Process&lt;/A&gt; platform to model that defect rate. You can use that model to optimize and get the minimal expected defect rate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check out these resources to learn more and see it in action:&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Robust Optimisation of Processes and Products by Using Monte Carlo Simulation Experiments" uid="23746" url="https://community.jmp.com/t5/Discovery-Summit-Europe-2016/Robust-Optimisation-of-Processes-and-Products-by-Using-Monte/m-p/23746#U23746" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/16.0/#page/jmp/example-of-stochastic-optimization.shtml#ww375920" target="_self"&gt;Example of Stochastic Optimization&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does that point you in the right direction or is there a detail that I missed in your original question?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 20:36:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Robust-Optimization-maximize-desirability-based-on-feedback-from/m-p/393852#M64425</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2021-06-16T20:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Robust Optimization - maximize desirability based on feedback from simulation?</title>
      <link>https://community.jmp.com/t5/Discussions/Robust-Optimization-maximize-desirability-based-on-feedback-from/m-p/411323#M66088</link>
      <description>&lt;P&gt;The detail I was looking for was to simulate each point requested by the optimizer instead of having to simulate the entire model space and then represent the simulation results using another model.&amp;nbsp; For small problems this does not matter, but as more dimensions are added, the simulation experiment starts to act like brute force method.&amp;nbsp; I came to the conclusion that this is not possible though.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 18:59:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Robust-Optimization-maximize-desirability-based-on-feedback-from/m-p/411323#M66088</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-08-19T18:59:44Z</dc:date>
    </item>
  </channel>
</rss>

