<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://tomwiki.com/index.php?action=history&amp;feed=atom&amp;title=Models_Planning</id>
	<title>Models Planning - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://tomwiki.com/index.php?action=history&amp;feed=atom&amp;title=Models_Planning"/>
	<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=Models_Planning&amp;action=history"/>
	<updated>2026-11-01T23:20:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>http://tomwiki.com/index.php?title=Models_Planning&amp;diff=2557&amp;oldid=prev</id>
		<title>Elias at 22:57, 17 January 2012</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=Models_Planning&amp;diff=2557&amp;oldid=prev"/>
		<updated>2012-01-17T22:57:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:57, 17 January 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Planning the production of bicycles==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Planning the production of bicycles==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight &lt;/del&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source &lt;/ins&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = planningtheprodofbicyclesEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = planningtheprodofbicyclesEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l106&quot;&gt;Line 106:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 106:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060110 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060110 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Production of drinking glasses==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Production of drinking glasses==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight &lt;/del&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source &lt;/ins&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = productionofdrinkingglassesEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = productionofdrinkingglassesEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l253&quot;&gt;Line 253:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 253:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060109 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060109 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Material Requirement Planning==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Material Requirement Planning==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight &lt;/del&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source &lt;/ins&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = materialrequirementplanningEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = materialrequirementplanningEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l444&quot;&gt;Line 444:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 444:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060110 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060110 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Planning the production of electronic components==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Planning the production of electronic components==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight &lt;/del&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source &lt;/ins&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = planningtheprodofeleccompEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = planningtheprodofeleccompEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l573&quot;&gt;Line 573:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 573:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060203 med   Removed printing of temp&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060203 med   Removed printing of temp&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Planning the Production of Fiberglass==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Planning the Production of Fiberglass==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight &lt;/del&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source &lt;/ins&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = planningtheprodoffiberglassEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = planningtheprodoffiberglassEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l675&quot;&gt;Line 675:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 675:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060110 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060110 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Assignment of production batches to machines==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Assignment of production batches to machines==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight &lt;/del&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source &lt;/ins&gt;lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = assignmentofprodbatchestomEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% function Result = assignmentofprodbatchestomEx(PriLev)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;%&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l799&quot;&gt;Line 799:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 799:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060111 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060111 per   Added documentation.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;% 060125 per   Moved disp to end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Elias</name></author>
	</entry>
	<entry>
		<id>http://tomwiki.com/index.php?title=Models_Planning&amp;diff=924&amp;oldid=prev</id>
		<title>Elias: Created page with &quot;{{Part Of Manual|title=TOMLAB Models|link=TOMLAB Models}} ==Planning the production of bicycles==  &lt;syntaxhighlight lang=&quot;matlab&quot;&gt; % function Result = planningtheprodo...&quot;</title>
		<link rel="alternate" type="text/html" href="http://tomwiki.com/index.php?title=Models_Planning&amp;diff=924&amp;oldid=prev"/>
		<updated>2011-08-12T12:54:29Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Part Of Manual|title=TOMLAB Models|link=&lt;a href=&quot;/index.php?title=Models&quot; title=&quot;Models&quot;&gt;TOMLAB Models&lt;/a&gt;}} ==Planning the production of bicycles==  &amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt; % function Result = planningtheprodo...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Part Of Manual|title=TOMLAB Models|link=[[Models|TOMLAB Models]]}}&lt;br /&gt;
==Planning the production of bicycles==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% function Result = planningtheprodofbicyclesEx(PriLev)&lt;br /&gt;
%&lt;br /&gt;
% Creates a TOMLAB MIP problem for planning the production of bicycles&lt;br /&gt;
%&lt;br /&gt;
% PLANNING THE PRODUCTION OF BICYCLES&lt;br /&gt;
%&lt;br /&gt;
% A company produces bicycles for children. The sales forecast in&lt;br /&gt;
% thousand of units for the coming year are given in the following&lt;br /&gt;
% table. The company has a capacity of 30,000 bicycles per month.&lt;br /&gt;
% It is possible to augment the production by up to 50% through&lt;br /&gt;
% overtime working, but this increases the production cost for a&lt;br /&gt;
% bicycle from the usual $ 32 to $ 40.&lt;br /&gt;
%&lt;br /&gt;
% Sales forecasts for the coming year in thousand units&lt;br /&gt;
%&lt;br /&gt;
% +---+---+---+---+---+---+---+---+---+---+---+---+&lt;br /&gt;
% |Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|&lt;br /&gt;
% +---+---+---+---+---+---+---+---+---+---+---+---+&lt;br /&gt;
% | 30| 15| 15| 25| 33| 40| 45| 45| 26| 14| 25| 30|&lt;br /&gt;
% +---+---+---+---+---+---+---+---+---+---+---+---+&lt;br /&gt;
%&lt;br /&gt;
% Currently there are 2,000 bicycles in stock. The storage costs have&lt;br /&gt;
% been calculated as $ 5 per unit held in stock at the end of a month.&lt;br /&gt;
% We assume that the storage capacity at the company is virtually&lt;br /&gt;
% unlimited (in practice this means that the real capacity, that is&lt;br /&gt;
% quite obviously limited, does not impose any limits in our case).&lt;br /&gt;
% We are at the first of January. Which quantities need to be&lt;br /&gt;
% produced and stored in the course of the next twelve months in order&lt;br /&gt;
% to satisfy the forecast demand and minimize the total cost?&lt;br /&gt;
%&lt;br /&gt;
% VARIABLES&lt;br /&gt;
%&lt;br /&gt;
% normcapacity               the normal production capacity&lt;br /&gt;
% extracapacity              extra capacity&lt;br /&gt;
% normcost                   normal cost&lt;br /&gt;
% extracost                  cost per bike if overtime&lt;br /&gt;
% demand                     bikes wanted per month&lt;br /&gt;
% startstock                 bikes in store&lt;br /&gt;
% storagecost                cost to have a bike in store one month&lt;br /&gt;
%&lt;br /&gt;
% RESULTS&lt;br /&gt;
%&lt;br /&gt;
% For an interpretation of the results, try this:&lt;br /&gt;
% Result = planningtheprodofbicyclesEx(2);&lt;br /&gt;
%&lt;br /&gt;
% REFERENCES&lt;br /&gt;
%&lt;br /&gt;
% Applications of optimization... Gueret, Prins, Seveaux&lt;br /&gt;
% http://web.univ-ubs.fr/lester/~sevaux/pl/index.php&lt;br /&gt;
%&lt;br /&gt;
% INPUT PARAMETERS&lt;br /&gt;
% PriLev       Print Level&lt;br /&gt;
%&lt;br /&gt;
% OUTPUT PARAMETERS&lt;br /&gt;
% Result       Result structure.&lt;br /&gt;
&lt;br /&gt;
% Marcus Edvall, Tomlab Optimization Inc, E-mail: tomlab@tomopt.com&lt;br /&gt;
% Copyright (c) 2005-2005 by Tomlab Optimization Inc., $Release: 5.0.0$&lt;br /&gt;
% Written Oct 17, 2005.   Last modified Oct 17, 2005.&lt;br /&gt;
&lt;br /&gt;
function Result = planningtheprodofbicyclesEx(PriLev)&lt;br /&gt;
&lt;br /&gt;
if nargin &amp;lt; 1&lt;br /&gt;
   PriLev = 1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
normcapacity    = 30000;&lt;br /&gt;
extracapacity   = 15000;&lt;br /&gt;
normcost        = 32;&lt;br /&gt;
extracost       = 40;&lt;br /&gt;
demand          = [30;15;15;25;33;40;45;45;26;14;25;30]*1000;&lt;br /&gt;
startstock      = 2000;&lt;br /&gt;
storagecost     = 5;&lt;br /&gt;
&lt;br /&gt;
Prob = planningtheprodofbicycles(normcapacity, extracapacity, normcost,...&lt;br /&gt;
   extracost, demand, startstock, storagecost);&lt;br /&gt;
&lt;br /&gt;
Result = tomRun(&amp;#039;cplex&amp;#039;, Prob, PriLev);&lt;br /&gt;
&lt;br /&gt;
if PriLev &amp;gt; 1,&lt;br /&gt;
   months = length(demand);&lt;br /&gt;
   temp = reshape(Result.x_k,months,3);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   for i = 1:months,&lt;br /&gt;
      disp([&amp;#039;Month &amp;#039; num2str(i) &amp;#039;:&amp;#039;])&lt;br /&gt;
      disp([&amp;#039;   produce &amp;#039; num2str(temp(i,1)) &amp;#039; regular bikes&amp;#039; ])&lt;br /&gt;
      if temp(i,2) &amp;gt; 0,&lt;br /&gt;
         disp([&amp;#039;   and     &amp;#039; num2str(temp(i,2)) &amp;#039; extras&amp;#039; ])&lt;br /&gt;
      end&lt;br /&gt;
      if temp(i,3) &amp;gt; 0,&lt;br /&gt;
         disp([&amp;#039;   let     &amp;#039; num2str(temp(i,3)) &amp;#039; be stored&amp;#039; ])&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
% MODIFICATION LOG&lt;br /&gt;
%&lt;br /&gt;
% 051017 med   Created.&lt;br /&gt;
% 060110 per   Added documentation.&lt;br /&gt;
% 060125 per   Moved disp to end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Production of drinking glasses==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% function Result = productionofdrinkingglassesEx(PriLev)&lt;br /&gt;
%&lt;br /&gt;
% Creates a TOMLAB MIP problem for production of drinking glasses&lt;br /&gt;
%&lt;br /&gt;
% PRODUCTION OF DRINKING GLASSES&lt;br /&gt;
%&lt;br /&gt;
% The main activity of a company in northern France is the production&lt;br /&gt;
% of drinking glasses. It currently sells six different types&lt;br /&gt;
% (V1 to V6), that are produced in batches of 1000 glasses, and wishes&lt;br /&gt;
% to plan its production for the next 12 weeks. The batches may be&lt;br /&gt;
% incomplete (fewer than 1000 glasses). The demand in thousands for&lt;br /&gt;
% the 12 coming weeks and for every glass type is given in the&lt;br /&gt;
% following table.&lt;br /&gt;
%&lt;br /&gt;
% Demands for the planning period (batches of 1000 glasses)&lt;br /&gt;
%&lt;br /&gt;
% +----+--+--+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
% |Week| 1| 2| 3| 4| 5| 6| 7| 8| 9|10|11|12|&lt;br /&gt;
% +----+--+--+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
% |V1  |20|22|18|35|17|19|23|20|29|30|28|32|&lt;br /&gt;
% |V2  |17|19|23|20|11|10|12|34|21|23|30|12|&lt;br /&gt;
% |V3  |18|35|17|10| 9|21|23|15|10| 0|13|17|&lt;br /&gt;
% |V4  |31|45|24|38|41|20|19|37|28|12|30|37|&lt;br /&gt;
% |V5  |23|20|23|15|10|22|18|30|28| 7|15|10|&lt;br /&gt;
% |V6  |22|18|20|19|18|35| 0|28|12|30|21|23|&lt;br /&gt;
% +----+--+--+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
%&lt;br /&gt;
% For every glass type the initial stock is known, as well as the&lt;br /&gt;
% required final stock level (in thousands). Per batch of every glass&lt;br /&gt;
% type, the production and storage costs in $ are given, together&lt;br /&gt;
% with the required working time for workers and machines (in hours),&lt;br /&gt;
% and the required storage space (measured in numbers of trays).&lt;br /&gt;
%&lt;br /&gt;
% The number of working hours of the personnel is limited to 450&lt;br /&gt;
% hours per week, and the machines have a weekly capacity of 850&lt;br /&gt;
% hours. Storage space for up to 1000 trays is available. Which&lt;br /&gt;
% quantities of the different glass types need to be produced in&lt;br /&gt;
% every period to minimize the total cost of production and storage?&lt;br /&gt;
%&lt;br /&gt;
% Data for the six glass types&lt;br /&gt;
%&lt;br /&gt;
% +--+----------+-------+-------+-----+----------+-----------+-------+&lt;br /&gt;
% |  |Production|Storage|Initial|Final|          |           |Storage|&lt;br /&gt;
% |  |  cost    |  cost | stock |stock|Timeworker|Timemachine| space |&lt;br /&gt;
% +--+----------+-------+-------+-----+----------+-----------+-------+&lt;br /&gt;
% |V1|   100    |   25  |   50  | 10  |    3     |    2      |   4   |&lt;br /&gt;
% |V2|    80    |   28  |   20  | 10  |    3     |    1      |   5   |&lt;br /&gt;
% |V3|   110    |   25  |    0  | 10  |    3     |    4      |   5   |&lt;br /&gt;
% |V4|    90    |   27  |   15  | 10  |    2     |    8      |   6   |&lt;br /&gt;
% |V5|   200    |   10  |    0  | 10  |    4     |   11      |   4   |&lt;br /&gt;
% |V6|   140    |   20  |   10  | 10  |    4     |    9      |   9   |&lt;br /&gt;
% +--+----------+-------+-------+-----+----------+-----------+-------+&lt;br /&gt;
%&lt;br /&gt;
% VARIABLES&lt;br /&gt;
%&lt;br /&gt;
% demand                     Weekly demand of V1-V6&lt;br /&gt;
% workermax                  The staffs weekly capacity in hours&lt;br /&gt;
% machinemax                 The machines weekly capacity in hours&lt;br /&gt;
% maxstorage                 Maximal storage space&lt;br /&gt;
% productioncost             Cost to produce a batch of a glasstype.&lt;br /&gt;
% storagecost                Cost to store a batch of a glasstype&lt;br /&gt;
% initialstock               Initial stock of glasstypes&lt;br /&gt;
% finalstock                 Required final stock&lt;br /&gt;
% timeworker                 Personnel-time required for a batch&lt;br /&gt;
% timemachine                Machine-time required for a batch&lt;br /&gt;
% storagespace               Space required by batch in storage&lt;br /&gt;
%&lt;br /&gt;
% RESULTS&lt;br /&gt;
%&lt;br /&gt;
% for an interpretation of the results, try&lt;br /&gt;
% Result = productionofdrinkingglassesEx(2);&lt;br /&gt;
%&lt;br /&gt;
% REFERENCES&lt;br /&gt;
%&lt;br /&gt;
% Applications of optimization... Gueret, Prins, Seveaux&lt;br /&gt;
% http://web.univ-ubs.fr/lester/~sevaux/pl/index.php&lt;br /&gt;
%&lt;br /&gt;
% INPUT PARAMETERS&lt;br /&gt;
% PriLev       Print Level&lt;br /&gt;
%&lt;br /&gt;
% OUTPUT PARAMETERS&lt;br /&gt;
% Result       Result structure.&lt;br /&gt;
&lt;br /&gt;
% Marcus Edvall, Tomlab Optimization Inc, E-mail: tomlab@tomopt.com&lt;br /&gt;
% Copyright (c) 2005-2005 by Tomlab Optimization Inc., $Release: 5.0.0$&lt;br /&gt;
% Written Oct 17, 2005.   Last modified Oct 17, 2005.&lt;br /&gt;
&lt;br /&gt;
function Result = productionofdrinkingglassesEx(PriLev)&lt;br /&gt;
&lt;br /&gt;
if nargin &amp;lt; 1&lt;br /&gt;
   PriLev = 1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
demand          = [20 22 18 35 17 19 23 20 29 30 28 32;...&lt;br /&gt;
      17 19 23 20 11 10 12 34 21 23 30 12;...&lt;br /&gt;
      18 35 17 10  9 21 23 15 10  0 13 17;...&lt;br /&gt;
      31 45 24 38 41 20 19 37 28 12 30 37;...&lt;br /&gt;
      23 20 23 15 10 22 18 30 28  7 15 10;...&lt;br /&gt;
      22 18 20 19 18 35  0 28 12 30 21 23];&lt;br /&gt;
&lt;br /&gt;
workermax       = 450; % Modified from 390, otherwise infeasible&lt;br /&gt;
machinemax      = 850;&lt;br /&gt;
maxstorage      = 1000;&lt;br /&gt;
&lt;br /&gt;
productioncost  = [100;80;110;90;200;140];&lt;br /&gt;
storagecost     = [25;28;25;27;10;20];&lt;br /&gt;
initialstock    = [50;20;0;15;0;10];&lt;br /&gt;
finalstock      = [10;10;10;10;10;10];&lt;br /&gt;
timeworker      = [3;3;3;2;4;4];&lt;br /&gt;
timemachine     = [2;1;4;8;11;9];&lt;br /&gt;
storagespace    = [4;5;5;6;4;9];&lt;br /&gt;
&lt;br /&gt;
Prob = productionofdrinkingglasses(demand, workermax, machinemax, maxstorage...&lt;br /&gt;
   , productioncost, storagecost, initialstock, finalstock, timeworker...&lt;br /&gt;
   , timemachine, storagespace);&lt;br /&gt;
&lt;br /&gt;
Result = tomRun(&amp;#039;cplex&amp;#039;, Prob, PriLev);&lt;br /&gt;
&lt;br /&gt;
if PriLev &amp;gt; 1,&lt;br /&gt;
&lt;br /&gt;
   [g,w] = size(demand); % g = glass_types, W = weeks&lt;br /&gt;
&lt;br /&gt;
   temp = reshape(Result.x_k,g,2,w);&lt;br /&gt;
&lt;br /&gt;
   for i = 1:w,&lt;br /&gt;
      disp([&amp;#039;results for week &amp;#039; num2str(i) &amp;#039;:&amp;#039;])&lt;br /&gt;
      for j = 1:g,&lt;br /&gt;
         if temp(j,1,i) &amp;gt; 0,&lt;br /&gt;
            disp([&amp;#039;   &amp;#039; num2str(temp(j,1,i)) &amp;#039; batches of type &amp;#039; num2str(j) &amp;#039; should be produced&amp;#039; ])&lt;br /&gt;
         end&lt;br /&gt;
         if temp(j,2,i) &amp;gt; 0,&lt;br /&gt;
            disp([&amp;#039;   &amp;#039; num2str(temp(j,2,i)) &amp;#039; batches of type &amp;#039; num2str(j) &amp;#039; should be stored to next month&amp;#039; ])&lt;br /&gt;
         end&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
% MODIFICATION LOG&lt;br /&gt;
%&lt;br /&gt;
% 051017 med   Created.&lt;br /&gt;
% 060109 per   Added documentation.&lt;br /&gt;
% 060125 per   Moved disp to end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Material Requirement Planning==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% function Result = materialrequirementplanningEx(PriLev)&lt;br /&gt;
%&lt;br /&gt;
% Creates a TOMLAB MIP problem for material requirement planning&lt;br /&gt;
%&lt;br /&gt;
% MATERIAL REQUIREMENT AND PLANNING&lt;br /&gt;
%&lt;br /&gt;
% The company Minorette produces two types of large toy lorries for&lt;br /&gt;
% children: blue removal vans and red tank lorries. Each of these&lt;br /&gt;
% lorries is assembled from thirteen items. See below for the&lt;br /&gt;
% breakdown of components and the table below for the prices of the&lt;br /&gt;
% components.&lt;br /&gt;
%&lt;br /&gt;
% Prices of components&lt;br /&gt;
%&lt;br /&gt;
%+----------+--------------+--------+----------+---------+-----------+&lt;br /&gt;
%|  Wheel   |Steel bar     |Bumper  |  Chassis |  Cabin  |Door window|&lt;br /&gt;
%+----------+--------------+--------+----------+---------+-----------+&lt;br /&gt;
%|  $ 0.30  |   $ 1        |$ 0.20  |  $ 0.80  |  $ 2.75 |  $ 0.10   |&lt;br /&gt;
%+----------+--------------+--------+----------+---------+-----------+&lt;br /&gt;
%|Windscreen|Blue container|Red tank|Blue motor|Red motor| Headlight |&lt;br /&gt;
%+----------+--------------+--------+----------+---------+-----------+&lt;br /&gt;
%|  $ 0.29  | $ 2.60       | $ 3    |  $ 1.65  |  $ 1.65 |  $ 0.15   |&lt;br /&gt;
%+----------+--------------+--------+----------+---------+-----------+&lt;br /&gt;
%&lt;br /&gt;
%&lt;br /&gt;
% Breakdown of components (Gozinto graph)&lt;br /&gt;
%&lt;br /&gt;
%                           Blue lorry&lt;br /&gt;
%                           (or red)&lt;br /&gt;
%                               |&lt;br /&gt;
%                               |&lt;br /&gt;
%                               |&lt;br /&gt;
%   +-----------+---------------+----------+-----------+&lt;br /&gt;
%   |           |               |          |           |&lt;br /&gt;
%  1|          1|              1|         1|          2|&lt;br /&gt;
%   |           |               |          |           |&lt;br /&gt;
%  Assembled   Blue container  Assembled  Blue motor  Headlight&lt;br /&gt;
%  chassis     (or red tank)   cabin      (or red)&lt;br /&gt;
%   |                             |&lt;br /&gt;
%   |                             |&lt;br /&gt;
%   +-------+-----+        +------+-------+&lt;br /&gt;
%   |       |     |        |      |       |&lt;br /&gt;
%  2|      2|    1|       1|     2|      1|&lt;br /&gt;
%   |       |     |        |      |       |&lt;br /&gt;
%  Bumper  Axle  Chassis  Cabin  Door    Windscreen&lt;br /&gt;
%           |                     window&lt;br /&gt;
%           |&lt;br /&gt;
%        +--+---+&lt;br /&gt;
%        |      |&lt;br /&gt;
%       2|     1|&lt;br /&gt;
%        |      |&lt;br /&gt;
%       Wheel  Steel bar&lt;br /&gt;
%&lt;br /&gt;
% The subsets (axles, chassis, blue or red cabin) may be assembled by&lt;br /&gt;
% the company using the components, or subcontracted. The following&lt;br /&gt;
% table lists the costs for assembling and for subcontracting these&lt;br /&gt;
% subsets, together with the capacities of the company. The assembly&lt;br /&gt;
% costs do not take into account the buying prices of their&lt;br /&gt;
% components.&lt;br /&gt;
%&lt;br /&gt;
% Subcontracting and assembly costs, assembly capacities&lt;br /&gt;
%&lt;br /&gt;
% +--------------+------+-----------------+---------------+----------+---------+&lt;br /&gt;
% |              | Axle |Assembled chassis|Assembled cabin|Blue lorry|Red lorry|&lt;br /&gt;
% +--------------+------+-----------------+---------------+----------+---------+&lt;br /&gt;
% |Subcontracting|$12.75|      $ 30       |    $ 3        |     -    |     -   |&lt;br /&gt;
% |Assembly      |$6.80 |      $ 3.55     |    $ 3.20     |   $ 2.20 |   $ 2.60|&lt;br /&gt;
% |Capacity      | 600  |       4000      |     3000      |    4000  |    5000 |&lt;br /&gt;
% +--------------+------+-----------------+---------------+----------+---------+&lt;br /&gt;
%&lt;br /&gt;
% For the next month, Minorette has the same demand forecast of 3000&lt;br /&gt;
% pieces for the two types of lorries. At present, the company has no&lt;br /&gt;
% stock. Which quantities of the different items should Minorette buy&lt;br /&gt;
% or subcontract to satisfy the demand while minimizing the&lt;br /&gt;
% production cost?&lt;br /&gt;
%&lt;br /&gt;
% VARIABLES&lt;br /&gt;
%&lt;br /&gt;
% demand                     The demand for tank and container lorries&lt;br /&gt;
% compprices                 The price of the components&lt;br /&gt;
% subcontr                   Cost for using a subcontracter to assemble&lt;br /&gt;
% assembly                   Price for own assembly&lt;br /&gt;
% finalassembly              Price for final assembly&lt;br /&gt;
% capacity                   Capacity to assemble components&lt;br /&gt;
% finalcapacity              Capacity to assemble final step&lt;br /&gt;
% assemmat                   12 first columns: component prices&lt;br /&gt;
%                            next 3 columns: subcontracter price&lt;br /&gt;
%                            next 3 columns: own assembly price&lt;br /&gt;
%                            last 2 columns: final assembly&lt;br /&gt;
%&lt;br /&gt;
% RESULTS&lt;br /&gt;
%&lt;br /&gt;
% For an interpretation of the results, try:&lt;br /&gt;
% Result            = materialrequirementplanningEx(2);&lt;br /&gt;
%&lt;br /&gt;
% REFERENCES&lt;br /&gt;
%&lt;br /&gt;
% Applications of optimization... Gueret, Prins, Seveaux&lt;br /&gt;
% http://web.univ-ubs.fr/lester/~sevaux/pl/index.php&lt;br /&gt;
%&lt;br /&gt;
% INPUT PARAMETERS&lt;br /&gt;
% PriLev       Print Level&lt;br /&gt;
%&lt;br /&gt;
% OUTPUT PARAMETERS&lt;br /&gt;
% Result       Result structure.&lt;br /&gt;
&lt;br /&gt;
% Marcus Edvall, Tomlab Optimization Inc, E-mail: tomlab@tomopt.com&lt;br /&gt;
% Copyright (c) 2005-2005 by Tomlab Optimization Inc., $Release: 5.0.0$&lt;br /&gt;
% Written Oct 18, 2005.   Last modified Oct 18, 2005.&lt;br /&gt;
&lt;br /&gt;
function Result = materialrequirementplanningEx(PriLev)&lt;br /&gt;
&lt;br /&gt;
if nargin &amp;lt; 1&lt;br /&gt;
   PriLev = 1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
demand          = [3000;3000];&lt;br /&gt;
compprices      = [.3;1;.2;.8;2.75;.1;.29;2.6;3;1.65;1.65;.15];&lt;br /&gt;
subcontr        = [12.75;30;3];&lt;br /&gt;
assembly        = [6.8;3.55;3.20];&lt;br /&gt;
finalassembly   = [2.2;2.6];&lt;br /&gt;
capacity        = [600;4000;3000];&lt;br /&gt;
finalcapacity   = [4000;5000];&lt;br /&gt;
&lt;br /&gt;
%Buy preprod (12), Buy subcontr (3), assemble (3), finalass (2)&lt;br /&gt;
assemmat        = [ 1  0  0  0  0  0  0  0  0  0  0  0  0  0  0 -2  0  0  0  0;...&lt;br /&gt;
      0  1  0  0  0  0  0  0  0  0  0  0  0  0  0 -1  0  0  0  0;...&lt;br /&gt;
      0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  1 -2  0  0  0;...&lt;br /&gt;
      0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0 -2  0  0  0;...&lt;br /&gt;
      0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0 -1  0  0  0;...&lt;br /&gt;
      0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0 -1  0  0;...&lt;br /&gt;
      0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0 -2  0  0;...&lt;br /&gt;
      0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0 -1  0  0;...&lt;br /&gt;
      0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  1  0 -1 -1;...&lt;br /&gt;
      0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0 -1  0;...&lt;br /&gt;
      0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0 -1;...&lt;br /&gt;
      0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  1 -1 -1;...&lt;br /&gt;
      0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0 -1  0;...&lt;br /&gt;
      0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0 -1;...&lt;br /&gt;
      0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0 -2 -2];&lt;br /&gt;
&lt;br /&gt;
Prob = materialrequirementplanning(demand, compprices, assemmat...&lt;br /&gt;
   , subcontr, assembly, finalassembly, capacity, finalcapacity);&lt;br /&gt;
&lt;br /&gt;
Result = tomRun(&amp;#039;cplex&amp;#039;, Prob, PriLev);&lt;br /&gt;
&lt;br /&gt;
if PriLev &amp;gt; 1,&lt;br /&gt;
   l                 = length(compprices);&lt;br /&gt;
   l2                = length(subcontr);&lt;br /&gt;
   l3                = length(assembly);&lt;br /&gt;
   l4                = length(finalassembly);&lt;br /&gt;
   buycomponent      = Result.x_k(1         : l);&lt;br /&gt;
   buysubcontracter  = Result.x_k(1+l       : l+l2);&lt;br /&gt;
   buyassembly       = Result.x_k(1+l+l2    : l+l2+l3);&lt;br /&gt;
   buyfinalassembly  = Result.x_k(1+l+l2+l3 : l+l2+l3+l4);&lt;br /&gt;
   disp(&amp;#039;Buy these components:&amp;#039;)&lt;br /&gt;
   for i = 1:l,&lt;br /&gt;
      if buycomponent(i) &amp;gt; 0,&lt;br /&gt;
         disp([&amp;#039;   &amp;#039; num2str(buycomponent(i)) &amp;#039; units of type &amp;#039; num2str(i) ])&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   disp(&amp;#039;Use these subcontracters:&amp;#039;)&lt;br /&gt;
   for i = 1:l2,&lt;br /&gt;
      if buysubcontracter(i) &amp;gt; 0,&lt;br /&gt;
         disp([&amp;#039;   &amp;#039; num2str(buysubcontracter(i)) &amp;#039; assemblies of type &amp;#039; num2str(i) ])&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   disp(&amp;#039;Do this assembly:&amp;#039;)&lt;br /&gt;
   for i = 1:l3,&lt;br /&gt;
      if buyassembly(i) &amp;gt; 0,&lt;br /&gt;
         disp([&amp;#039;   &amp;#039; num2str(buyassembly(i)) &amp;#039; assemblies of type &amp;#039; num2str(i) ])&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   disp(&amp;#039;Do this final assembly:&amp;#039;)&lt;br /&gt;
   for i = 1:l4,&lt;br /&gt;
      if buyfinalassembly(i) &amp;gt; 0,&lt;br /&gt;
         disp([&amp;#039;   &amp;#039; num2str(buyfinalassembly(i)) &amp;#039; assemblies of type &amp;#039; num2str(i) ])&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
% MODIFICATION LOG&lt;br /&gt;
%&lt;br /&gt;
% 051018 med   Created.&lt;br /&gt;
% 060110 per   Added documentation.&lt;br /&gt;
% 060125 per   Moved disp to end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Planning the production of electronic components==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% function Result = planningtheprodofeleccompEx(PriLev)&lt;br /&gt;
%&lt;br /&gt;
% Creates a TOMLAB MIP problem for planning the production of&lt;br /&gt;
% electronic components&lt;br /&gt;
%&lt;br /&gt;
% PLANNING THE PRODUCTION OF ELECTRONIC COMPONENTS&lt;br /&gt;
%&lt;br /&gt;
% To augment its competitiveness a small business wishes to improve&lt;br /&gt;
% the production of its best selling products. One of its main&lt;br /&gt;
% activities is the production of cards with microchips and&lt;br /&gt;
% electronic badges. The company also produces the components for&lt;br /&gt;
% these cards and badges. Good planning of the production of these&lt;br /&gt;
% components therefore constitutes a decisive success factor for the&lt;br /&gt;
% company. The demand for components is internal in this case and&lt;br /&gt;
% hence easy to anticipate.&lt;br /&gt;
%&lt;br /&gt;
% For the next six months the production of four products with&lt;br /&gt;
% references X43-M1, X43-M2, Y54-N1, Y54-N2 is to be planned. The&lt;br /&gt;
% production of these components is sensitive to variations of the&lt;br /&gt;
% level of production, and every change leads to a non-negligible&lt;br /&gt;
% cost through controls and readjustments. The company therefore&lt;br /&gt;
% wishes to minimize the cost associated with these changes whilst&lt;br /&gt;
% also taking into account the production and storage costs.&lt;br /&gt;
%&lt;br /&gt;
% The demand data per time period, the production and storage costs,&lt;br /&gt;
% and the initial and desired final stock levels for every product&lt;br /&gt;
% are listed in the following table. When the production level&lt;br /&gt;
% changes, readjustments of the machines and controls have to be&lt;br /&gt;
% carried out for the current month. The cost incurred is&lt;br /&gt;
% proportional to the increase or reduction of the production&lt;br /&gt;
% compared to the preceding month. The cost for an increase of the&lt;br /&gt;
% production is $ 1 per unit but only $ 0.50 for a decrease of the&lt;br /&gt;
% production level.&lt;br /&gt;
%&lt;br /&gt;
% Data for the four products&lt;br /&gt;
%&lt;br /&gt;
% +------------------------------------+------------------+-------------+&lt;br /&gt;
% |           Demands                  |        Cost      |     Stock   |&lt;br /&gt;
% +------+----+----+----+----+----+----+----------+-------+-------+-----+&lt;br /&gt;
% | Month|  1 |  2 |  3 |  4 |  5 |  6 |Production|Storage|Initial|Final|&lt;br /&gt;
% +------+----+----+----+----+----+----+----------+-------+-------+-----+&lt;br /&gt;
% |X43-M1|1500|3000|2000|4000|2000|2500|    20    |  0.4  |  10   | 50  |&lt;br /&gt;
% |X43-M2|1300| 800| 800|1000|1100| 900|    25    |  0.5  |   0   | 10  |&lt;br /&gt;
% |Y54-N1|2200|1500|2900|1800|1200|2100|    10    |  0.3  |   0   | 10  |&lt;br /&gt;
% |Y54-N2|1400|1600|1500|1000|1100|1200|    15    |  0.3  |   0   | 10  |&lt;br /&gt;
% +------+----+----+----+----+----+----+----------+-------+-------+-----+&lt;br /&gt;
%&lt;br /&gt;
% What is the production plan that minimizes the sum of costs&lt;br /&gt;
% incurred through changes of the production level, production&lt;br /&gt;
% and storage costs?&lt;br /&gt;
%&lt;br /&gt;
% VARIABLES&lt;br /&gt;
%&lt;br /&gt;
% demand                      the demand for each component and month&lt;br /&gt;
% prodcost                    Cost to produce a component&lt;br /&gt;
% storagecost                 Cost to store a component&lt;br /&gt;
% initialstock                Initial stock&lt;br /&gt;
% finalstock                  Final stock&lt;br /&gt;
% increasecost, decreasecost  Increase or decrease in cost&lt;br /&gt;
%                             when producing more or less this month&lt;br /&gt;
%                             than last month.&lt;br /&gt;
%&lt;br /&gt;
% RESULTS&lt;br /&gt;
%&lt;br /&gt;
% for an interpretation of the results, try:&lt;br /&gt;
% Result      = planningtheprodofeleccompEx(2);&lt;br /&gt;
%&lt;br /&gt;
% REFERENCES&lt;br /&gt;
%&lt;br /&gt;
% Applications of optimization... Gueret, Prins, Seveaux&lt;br /&gt;
% http://web.univ-ubs.fr/lester/~sevaux/pl/index.php&lt;br /&gt;
%&lt;br /&gt;
% INPUT PARAMETERS&lt;br /&gt;
% PriLev       Print Level&lt;br /&gt;
%&lt;br /&gt;
% OUTPUT PARAMETERS&lt;br /&gt;
% Result       Result structure.&lt;br /&gt;
&lt;br /&gt;
% Marcus Edvall, Tomlab Optimization Inc, E-mail: tomlab@tomopt.com&lt;br /&gt;
% Copyright (c) 2005-2006 by Tomlab Optimization Inc., $Release: 5.1.0$&lt;br /&gt;
% Written Oct 18, 2005.   Last modified Feb 3, 2006.&lt;br /&gt;
&lt;br /&gt;
function Result = planningtheprodofeleccompEx(PriLev)&lt;br /&gt;
&lt;br /&gt;
if nargin &amp;lt; 1&lt;br /&gt;
   PriLev = 1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
demand          = [1500 3000 2000 4000 2000 2500;...&lt;br /&gt;
      1300  800  800 1000 1100  900;...&lt;br /&gt;
      2200 1500 2900 1800 1200 2100;...&lt;br /&gt;
      1400 1600 1500 1000 1100 1200];&lt;br /&gt;
prodcost        = [20;25;10;15];&lt;br /&gt;
storagecost     = [.4;.5;.3;.3];&lt;br /&gt;
initialstock    = [10;0;50;0];&lt;br /&gt;
finalstock      = [50;10;30;10];&lt;br /&gt;
increasecost    = 1;&lt;br /&gt;
decreasecost    = 0.5;&lt;br /&gt;
&lt;br /&gt;
Prob = planningtheprodofeleccomp(demand, prodcost,...&lt;br /&gt;
   storagecost, initialstock, finalstock, increasecost, decreasecost);&lt;br /&gt;
Result = tomRun(&amp;#039;cplex&amp;#039;, Prob, PriLev);&lt;br /&gt;
&lt;br /&gt;
if PriLev &amp;gt; 1,&lt;br /&gt;
   l1          = 10; % 4 components + 4 stockslots + increase + decrease&lt;br /&gt;
   l2          =  6; % the number of time segments&lt;br /&gt;
   temp        = reshape(Result.x_k,l1,l2);&lt;br /&gt;
   for month = 1:l2,&lt;br /&gt;
      disp([&amp;#039;Solution for month &amp;#039; num2str(month)])&lt;br /&gt;
      disp([&amp;#039;produce  &amp;#039; num2str(temp( 1: 4,month)&amp;#039;)])&lt;br /&gt;
      disp([&amp;#039;stock    &amp;#039; num2str(temp( 5: 8,month)&amp;#039;)])&lt;br /&gt;
      disp([&amp;#039;increase &amp;#039; num2str(temp( 9: 9,month)&amp;#039;)])&lt;br /&gt;
      disp([&amp;#039;decrease &amp;#039; num2str(temp(10:10,month)&amp;#039;)])&lt;br /&gt;
      disp(&amp;#039; &amp;#039;)&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
% MODIFICATION LOG&lt;br /&gt;
%&lt;br /&gt;
% 051018 med   Created.&lt;br /&gt;
% 060110 per   Added documentation.&lt;br /&gt;
% 060125 per   Moved disp to end&lt;br /&gt;
% 060203 med   Removed printing of temp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Planning the Production of Fiberglass==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% function Result = planningtheprodoffiberglassEx(PriLev)&lt;br /&gt;
%&lt;br /&gt;
% Creates a TOMLAB MIP problem for planning the production of&lt;br /&gt;
% fiber glass&lt;br /&gt;
%&lt;br /&gt;
% PLANNING THE PRODUCTION OF FIBERGLASS&lt;br /&gt;
%&lt;br /&gt;
% A company produces fiberglass by the cubic meter and wishes to plan&lt;br /&gt;
% its production for the next six weeks. The production capacity is&lt;br /&gt;
% limited, and this limit takes a different value in every time&lt;br /&gt;
% period. The weekly demand is known for the entire planning period.&lt;br /&gt;
% The production and storage costs also take different values&lt;br /&gt;
% depending on the time period. All data are listed in the following&lt;br /&gt;
% table.&lt;br /&gt;
%&lt;br /&gt;
% Data per week&lt;br /&gt;
%&lt;br /&gt;
% +----+------------+------+----------+-----------+&lt;br /&gt;
% |    | Production |Demand|Production| Storage   |&lt;br /&gt;
% |Week|capacity(m3)| (m3) |cost($/m3)|cost ($/m3)|&lt;br /&gt;
% +----+------------+------+----------+-----------+&lt;br /&gt;
% |  1 |    140     | 100  |   5      |   0.2     |&lt;br /&gt;
% |  2 |    100     | 120  |   8      |   0.3     |&lt;br /&gt;
% |  3 |    110     | 100  |   6      |   0.2     |&lt;br /&gt;
% |  4 |    100     |  90  |   6      |   0.25    |&lt;br /&gt;
% |  5 |    120     | 120  |   7      |   0.3     |&lt;br /&gt;
% |  6 |    100     | 110  |   6      |   0.4     |&lt;br /&gt;
% +----+------------+------+----------+-----------+&lt;br /&gt;
%&lt;br /&gt;
% Which is the production plan that minimizes the total cost of&lt;br /&gt;
% production and storage?&lt;br /&gt;
%&lt;br /&gt;
% VARIABLES&lt;br /&gt;
%&lt;br /&gt;
% capacity                   Production capacity over time&lt;br /&gt;
% demand                     Demand over time&lt;br /&gt;
% prodcost                   Cost to produce over time&lt;br /&gt;
% storcost                   Cost to store over time&lt;br /&gt;
%&lt;br /&gt;
% RESULTS&lt;br /&gt;
%&lt;br /&gt;
% For an interpretation of the results, try:&lt;br /&gt;
% Result = planningtheprodoffiberglassEx(2);&lt;br /&gt;
%&lt;br /&gt;
% REFERENCES&lt;br /&gt;
%&lt;br /&gt;
% Applications of optimization... Gueret, Prins, Seveaux&lt;br /&gt;
% http://web.univ-ubs.fr/lester/~sevaux/pl/index.php&lt;br /&gt;
%&lt;br /&gt;
% INPUT PARAMETERS&lt;br /&gt;
% PriLev       Print Level&lt;br /&gt;
%&lt;br /&gt;
% OUTPUT PARAMETERS&lt;br /&gt;
% Result       Result structure.&lt;br /&gt;
&lt;br /&gt;
% Marcus Edvall, Tomlab Optimization Inc, E-mail: tomlab@tomopt.com&lt;br /&gt;
% Copyright (c) 2005-2005 by Tomlab Optimization Inc., $Release: 5.0.0$&lt;br /&gt;
% Written Oct 18, 2005.   Last modified Oct 18, 2005.&lt;br /&gt;
&lt;br /&gt;
function Result = planningtheprodoffiberglassEx(PriLev)&lt;br /&gt;
&lt;br /&gt;
if nargin &amp;lt; 1&lt;br /&gt;
   PriLev = 1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
capacity        = [140;100;110;100;120;100];&lt;br /&gt;
demand          = [100;120;100; 90;120;110];&lt;br /&gt;
prodcost        = [  5;  8;  6;  6;  7;  6];&lt;br /&gt;
storcost        = [ .2; .3; .2;.25; .3; .4];&lt;br /&gt;
&lt;br /&gt;
Prob = planningtheprodoffiberglass(capacity, demand,...&lt;br /&gt;
   prodcost, storcost);&lt;br /&gt;
Result = tomRun(&amp;#039;cplex&amp;#039;, Prob, PriLev);&lt;br /&gt;
&lt;br /&gt;
if PriLev &amp;gt; 1,&lt;br /&gt;
   times = length(capacity);&lt;br /&gt;
&lt;br /&gt;
   produce = Result.x_k(1:times);&lt;br /&gt;
   store   = [Result.x_k(times+1:end)&amp;#039; 0]&amp;#039;;&lt;br /&gt;
   for t = 1:times,&lt;br /&gt;
      if produce(t) &amp;gt; 0 | store(t) &amp;gt; 0,&lt;br /&gt;
         disp([&amp;#039;during month &amp;#039; num2str(t) ])&lt;br /&gt;
         if produce(t) &amp;gt; 0,&lt;br /&gt;
            disp([&amp;#039;   produce  &amp;#039; num2str(produce(t))])&lt;br /&gt;
         end&lt;br /&gt;
         if store(t) &amp;gt; 0,&lt;br /&gt;
            disp([&amp;#039;   store  &amp;#039; num2str(store(t)) &amp;#039; to next month&amp;#039;])&lt;br /&gt;
         end&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
% MODIFICATION LOG&lt;br /&gt;
%&lt;br /&gt;
% 051018 med   Created.&lt;br /&gt;
% 060110 per   Added documentation.&lt;br /&gt;
% 060125 per   Moved disp to end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assignment of production batches to machines==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% function Result = assignmentofprodbatchestomEx(PriLev)&lt;br /&gt;
%&lt;br /&gt;
% Creates a TOMLAB MIP problem for assignment of production batches to machines&lt;br /&gt;
%&lt;br /&gt;
% ASSIGMNENT OF PRODUCTION BATCHES TO MACHINES&lt;br /&gt;
%&lt;br /&gt;
% Having determined a set of ten batches to be produced in the next&lt;br /&gt;
% period, a production manager is looking for the best assignment of&lt;br /&gt;
% these batches to the different machines in his workshop. The five&lt;br /&gt;
% available machines in the workshop may each process any of these&lt;br /&gt;
% batches, but since they are all models from different years of&lt;br /&gt;
% manufacture the speed with which they process the batches changes&lt;br /&gt;
% from one machine to another. Furthermore, due to maintenance&lt;br /&gt;
% periods and readjustments, every machine may only work a certain&lt;br /&gt;
% number of hours in the planning period. The table below lists the&lt;br /&gt;
% processing times of the production batches on all machines and the&lt;br /&gt;
% capacities of the machines.&lt;br /&gt;
%&lt;br /&gt;
% Processing durations and capacities (in hours)&lt;br /&gt;
%&lt;br /&gt;
% +-------+-----------------------------+--------+&lt;br /&gt;
% |       |    Production batches       |        |&lt;br /&gt;
% |       +--+--+--+--+--+--+--+--+--+--+--------+&lt;br /&gt;
% |Machine| 1| 2| 3| 4| 5| 6| 7| 8| 9|10|Capacity|&lt;br /&gt;
% +-------+--+--+--+--+--+--+--+--+--+--+--------+&lt;br /&gt;
% |   1   | 8|15|14|23| 8|16| 8|25| 9|17|   18   |&lt;br /&gt;
% |   2   |15| 7|23|22|11|11|12|10|17|16|   19   |&lt;br /&gt;
% |   3   |21|20| 6|22|24|10|24| 9|21|14|   25   |&lt;br /&gt;
% |   4   |20|11| 8|14| 9| 5| 6|19|19| 7|   19   |&lt;br /&gt;
% |   5   | 8|13|13|13|10|20|25|16|16|17|   20   |&lt;br /&gt;
% +-------+--+--+--+--+--+--+--+--+--+--+--------+&lt;br /&gt;
%&lt;br /&gt;
% The production cost of a batch depends on the machine that&lt;br /&gt;
% processes it. The hourly usage cost for every machine depends on&lt;br /&gt;
% its technology, its age, its consumption of consumables (such as&lt;br /&gt;
% electricity, machine oil) and the personnel required to operate it.&lt;br /&gt;
% These differences are amplified by the variation in the processing&lt;br /&gt;
% durations of a batch depending on the machine. The table below&lt;br /&gt;
% lists the production costs in thousand $. On which machine should&lt;br /&gt;
% each batch be executed if the production manager wishes to minimize&lt;br /&gt;
% the total cost of production?&lt;br /&gt;
%&lt;br /&gt;
% Production cost depending on the assignment (in k$)&lt;br /&gt;
%&lt;br /&gt;
% +-------+-----------------------------+&lt;br /&gt;
% |       |    Production batches       |&lt;br /&gt;
% |       +--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
% |Machine| 1| 2| 3| 4| 5| 6| 7| 8| 9|10|&lt;br /&gt;
% +-------+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
% |   1   |17|21|22|18|24|15|20|18|19|18|&lt;br /&gt;
% |   2   |23|16|21|16|17|16|19|25|18|21|&lt;br /&gt;
% |   3   |16|20|16|25|24|16|17|19|19|18|&lt;br /&gt;
% |   4   |19|19|22|22|20|16|19|17|21|19|&lt;br /&gt;
% |   5   |18|19|15|15|21|25|16|16|23|15|&lt;br /&gt;
% +-------+--+--+--+--+--+--+--+--+--+--+&lt;br /&gt;
%&lt;br /&gt;
% VARIABLES&lt;br /&gt;
%&lt;br /&gt;
% batches                    Hours needed to produce batches&lt;br /&gt;
% capacity                   Hours available per machine&lt;br /&gt;
% costs                      Cost to produce batches&lt;br /&gt;
%&lt;br /&gt;
% RESULTS&lt;br /&gt;
%&lt;br /&gt;
% For an interpretation of the results, use PriLev &amp;gt; 1, for example:&lt;br /&gt;
% Result = assignmentofprodbatchestomEx(2);&lt;br /&gt;
%&lt;br /&gt;
% REFERENCES&lt;br /&gt;
%&lt;br /&gt;
% Applications of optimization... Gueret, Prins, Seveaux&lt;br /&gt;
% http://web.univ-ubs.fr/lester/~sevaux/pl/index.php&lt;br /&gt;
%&lt;br /&gt;
% INPUT PARAMETERS&lt;br /&gt;
% PriLev       Print Level&lt;br /&gt;
%&lt;br /&gt;
% OUTPUT PARAMETERS&lt;br /&gt;
% Result       Result structure.&lt;br /&gt;
&lt;br /&gt;
% Marcus Edvall, Tomlab Optimization Inc, E-mail: tomlab@tomopt.com&lt;br /&gt;
% Copyright (c) 2005-2005 by Tomlab Optimization Inc., $Release: 5.0.0$&lt;br /&gt;
% Written Oct 18, 2005.   Last modified Oct 18, 2005.&lt;br /&gt;
&lt;br /&gt;
function Result = assignmentofprodbatchestomEx(PriLev)&lt;br /&gt;
&lt;br /&gt;
if nargin &amp;lt; 1&lt;br /&gt;
   PriLev = 1;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
batches         = [ 8  15  14  23   8  16   8  25   9  17;...&lt;br /&gt;
      15   7  23  22  11  11  12  10  17  16;...&lt;br /&gt;
      21  20   6  22  24  10  24   9  21  14;...&lt;br /&gt;
      20  11   8  14   9   5   6  19  19   7;...&lt;br /&gt;
      8  13  13  13  10  20  25  16  16  17];&lt;br /&gt;
&lt;br /&gt;
capacity        = [18 ;19 ;25 ;19 ;20];&lt;br /&gt;
&lt;br /&gt;
costs           = [17  21  22  18  24  15  20  18  19  18;...&lt;br /&gt;
      23  16  21  16  17  16  19  25  18  21;...&lt;br /&gt;
      16  20  16  25  24  16  17  19  19  18;...&lt;br /&gt;
      19  19  22  22  20  16  19  17  21  19;...&lt;br /&gt;
      18  19  15  15  21  25  16  16  23  15];&lt;br /&gt;
&lt;br /&gt;
Prob = assignmentofprodbatchestom(batches, capacity, costs);&lt;br /&gt;
Result = tomRun(&amp;#039;cplex&amp;#039;, Prob, PriLev);&lt;br /&gt;
&lt;br /&gt;
if PriLev &amp;gt; 1,&lt;br /&gt;
   [m,b] = size(batches);&lt;br /&gt;
   temp  = reshape(Result.x_k,m,b);&lt;br /&gt;
   for i = 1:m,&lt;br /&gt;
      tempidx = find(temp(i,:)&amp;gt;0.5);&lt;br /&gt;
      disp([&amp;#039; machine &amp;#039; num2str(i) &amp;#039; deals with &amp;#039; num2str(tempidx)])&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
% MODIFICATION LOG&lt;br /&gt;
%&lt;br /&gt;
% 051018 med   Created.&lt;br /&gt;
% 060111 per   Added documentation.&lt;br /&gt;
% 060125 per   Moved disp to end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Elias</name></author>
	</entry>
</feed>