<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="11" minor="0"/>
<Label-Scheme value="2" prefix=""/>
<View-Properties presentation="false"></View-Properties>
<MapleNet-Properties warnlevel="3" longdelim="true" plotoptions="" echo="1" errorcursor="false" elisiontermsthreshold="10000" elisiontermsbefore="100" errorbreak="1" prettyprint="3" prompt="&gt; " latexwidth="6.0" useclientjvm="true" ansi="false" screenheight="25" labelwidth="20" plotdevice="inline" typesetting="standard" displayprecision="-1" indentamount="4" elisiondigitsthreshold="10000" quiet="false" plotoutput="terminal" rtablesize="10" preplot="" showassumed="1" plotdriver="openviz" elisiontermsafter="100" labelling="true" postplot="" screenwidth="79" elisiondigitsbefore="100" elisiondigitsafter="100" verboseproc="1" imaginaryunit="I" ShowLabels="true"/>
<Styles><Font name="Heading 4" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 1" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Left Justified Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="9" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Variable" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle9" background="[255,255,255]" bold="false" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Diagnostic" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[64,128,64]" italic="false" opaque="false" readonly="true" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Bold" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Page Number" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Math Italic Small" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="1" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 3" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Nonterminal" background="[255,255,255]" bold="true" executable="false" family="Monospaced" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Default" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle8" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Normal" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Comment" background="[255,255,255]" bold="true" executable="false" family="Monospaced" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle7" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Math Small" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="1" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Inert Output" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[144,144,144]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Fixed" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 3" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Popup" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,128,128]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Plot Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="2D Input" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Copyright" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_cstyle8" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input Placeholder" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[200,0,200]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="true"/>
<Font name="2D Math Bold Small" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="1" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Math" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Fixed Width" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Error" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 1" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle9" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Notes" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Help Underlined Bold" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,128,128]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="2D Math Symbol 2" background="[255,255,255]" bold="false" executable="false" family="SymbolPi" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Bullet Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Equation Label" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Author" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 2" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Plot Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="8" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Plot" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Italic" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Heading" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Output Labels" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="8" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Normal" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Comment" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Maple Name" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[104,64,92]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,255]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dictionary Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[147,0,15]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Help Emphasized" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Italic Bold" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="LaTeX" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Menus" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dash Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Prompt" background="[255,255,255]" bold="true" executable="false" family="Monospaced" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="_pstyle6" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Underlined" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Line Printed Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="List Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Help Underlined Italic" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Warning" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Math Bold" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Math Italic" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 2" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Layout name="Heading 4" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 5" alignment="left" bullet="ROMAN" firstindent="0" leftmargin="144" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Ordered List 1" alignment="left" bullet="numeric" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Text Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Bullet Item" alignment="left" bullet="dot" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Left Justified Maple Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.5" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Help" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Author" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="8" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Diagnostic" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 2" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="2" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 3" alignment="left" bullet="roman" firstindent="0" leftmargin="72" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Maple Plot" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle8" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Normal" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle7" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Annotation Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Dash Item" alignment="left" bullet="dash" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 3" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 4" alignment="left" bullet="ALPHABETIC" firstindent="0" leftmargin="108" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="_pstyle6" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Maple Output" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.5" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle5" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="List Item" alignment="left" bullet="indent" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Line Printed Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Fixed Width" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Warning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Error" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 1" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="4" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="_pstyle9" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 2" alignment="left" bullet="alphabetic" firstindent="0" leftmargin="36" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Pencil-style name="Pencil 3" pen-color="[0,0,0]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 1" pen-color="[0,0,0]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 5" pen-color="[255,0,0]" pen-height="5.0" pen-width="5.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 2" pen-color="[0,0,255]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 4" pen-color="[0,0,255]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Highlighter-style name="Highlighter 2" pen-color="[255,204,0]" pen-height="14.0" pen-width="14.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 4" pen-color="[0,255,255]" pen-height="32.0" pen-width="32.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 3" pen-color="[51,255,0]" pen-height="24.0" pen-width="24.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 1" pen-color="[255,153,255]" pen-height="12.0" pen-width="8.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 5" pen-color="[255,255,0]" pen-height="48.0" pen-width="48.0" pen-opacity="0.8"/>
</Styles>
<Page-Numbers enabled="false" first-number="1" first-numbered-page="1" horizontal-location="right" style="Page Number" vertical-location="bottom"/>
<Task-table>
    <Task-category name="&lt;default&gt;">
    </Task-category>
</Task-table>
<Annotation-table>
    <Annotation-category name="&lt;default&gt;">
    </Annotation-category>
</Annotation-table>
<Task>
</Task>
<Text-field style="_pstyle5" layout="_pstyle5"><Font encoding="UTF-8">Programmation lin\303\251aire</Font></Text-field>
<Text-field style="_pstyle6" layout="_pstyle6">
<Hyperlink linktarget="mailto:aleves@vif.com" hyperlink="true"><Font encoding="UTF-8" style="Hyperlink">Andr\303\251 L\303\251vesque</Font></Hyperlink> 

<Font encoding="UTF-8">Cette application permet d'optimiser une fonction lin\303\251aire \303\240 deux variables ou plus. Lorsque le probl\303\250me est \303\240 deux ou trois variables, l'application localise dans le plan cart\303\251sien ou dans un espace \303\240 trois dimensions, l'ensemble convexe des solutions r\303\251alisables du probl\303\250me ainsi que tous ses sommets. Pour lancer l'application, cliquez sur !!! ou choississez  Edit -&gt; Execute -&gt; Worksheet. ou placez votre curseur sur une ligne rouge du programme puis cliquez sur la touche retour.</Font></Text-field>
<Text-field style="_pstyle7" layout="_pstyle7">
**************************************</Text-field>
<Group labelreference="L3" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="_pstyle8" layout="_pstyle8">restart:
_t:=NULL:

dStandard := proc(r1)
local coord, xmin, xmax, ymin, ymax, eq, g, g1, g2, A, B, X, Y, c, h, i, j, k, l, cv, cs, ct, p, s, d, v1, v2, _C, _w:
global _cnsts, _obj, s_opt, _var, _nc, _nv, x, y, z, _sr, _t:
use Maplets[Tools] in
x:='x': y:='y': z:='z':
_cnsts:={}:
  if Get('TF0')=&quot;&quot; or Get('TF1')=&quot;&quot; then
    return(plot(0,x=1..2,1..2, axes=NONE))
  else
    _obj:=Get('TF0'::algebraic):
    d:=Get('TF1')
  fi: 
_cnsts:=&quot;&quot;:
k:=&quot;&quot;:
j:=&quot;&quot;:
<Font encoding="UTF-8">  if d[length(d)]&lt;&gt;&quot;\134n&quot; then d:=cat(d,&quot;\134n&quot;) fi:
</Font>  for i from 1 to length(d) do
<Font encoding="UTF-8">    if d[i]&lt;&gt;&quot;\134n&quot; then
</Font>      j:=cat(convert(j,string),convert(d[i],string)):
      _cnsts:=cat(convert(_cnsts,string),convert(d[i],string))
<Font encoding="UTF-8">    elif d[i]=&quot;\134n&quot; and k&lt;&gt;&quot;\134n&quot; and i&lt;&gt;1 then
</Font>      Set('TBX'=j):
      Get('TBX'::{'`&lt;=`','`=`'}):
      j:=&quot;&quot;:
      _cnsts:=cat(convert(_cnsts,string),convert(&quot;,&quot;,string)):
    fi:
    k:=d[i]
  od:
    if _cnsts[length(_cnsts)]=&quot;,&quot; then
      _cnsts:=cat(<Font style="_cstyle8">seq(</Font>_cnsts<Font style="_cstyle8">[j], j=1..</Font>length(_cnsts)-1<Font style="_cstyle8">)):</Font>
    fi:
  _cnsts:=simplex[standardize](convert({parse(_cnsts)},rational)):
  _nc:=[]:
  _nv:=[]:
    cv:=_cnsts union {_obj}:<Font style="_cstyle8">
      for i from 1 to nops(</Font>cv<Font style="_cstyle8">) do
        if nops(</Font>op([i],cv))=2 then<Font style="_cstyle8">
          cs:=</Font>op([i,1],cv)-op([i,2],cv):<Font style="_cstyle8">
        else
          cs:=</Font>op([i],cv)<Font style="_cstyle8">:
        fi:
        for j from 1 to nops(</Font>cs<Font style="_cstyle8">) do
          for k from 1 to nops(op([j],cs)) do
            if is(op([j,k],</Font>cs<Font style="_cstyle8">),numeric)=false then
              ct:=convert(op([j,k],</Font>cs<Font style="_cstyle8">),string):
              _nv:=[op(_nv),ct]:</Font>
            fi:
          od:
        od:<Font style="_cstyle8">
        _nc:=[op(_nc),op(_nv)]:</Font>
        _nv:=[]:
      od:
      _var:=[]:
      for i from 1 to nops(_obj) do
        for j from 1 to nops(op(i,_obj)) do
          if is(op(j,op(i,_obj)),name)=true then
            _var:=[op(_var),convert(op(j,op(i,_obj)),string)]
          fi
        od
      od:
      k:=convert(_nc,set) minus convert(_var,set):
      for i from 1 to nops(k) do
        _var:=[op(_var),op(i,k)]:
      od:
     _nv:=nops(convert(_nc,set)):
        if _obj&lt;&gt;&quot;&quot; and not(is(_obj&lt;infinity)) then
          if r1=true then
            s_opt:=simplex[minimize](_obj,_cnsts,NONNEGATIVE):
          else
            s_opt:=simplex[maximize](_obj,_cnsts,NONNEGATIVE):
          fi:
          if _nv=2 then
            x:='x': y:='y': z:='z':
            for i from 1 to 2 do
              if _var[i]=&quot;x&quot; then 
                _var[i]:=_var[1]:
                _var[1]:=&quot;x&quot;
              elif _var[i]=&quot;y&quot; then 
                _var[i]:=_var[2]:
                _var[2]:=&quot;y&quot; 
              fi
            od:
            x:=parse(op(1,_var)):
            y:=parse(op(2,_var)):
            _cnsts := _cnsts union { x &gt;= 0, y &gt;= 0 }: 
            if s_opt&lt;&gt;{} then
              eq:=seq(op(_cnsts[i])[1]=op(_cnsts[i])[2],i=1..nops(_cnsts)):
              X:=[]:
              Y:=[]:
              for i from 1 to nops({eq})-1 do
                for j from i+1 to nops({eq}) do    
                  p:=solve({eq[i],eq[j]}):
                  s:=subs(p,_cnsts):
                  k:=0:
                  for l from 1 to nops(s) do
                    if evalb(s[l])=true then  
                      k:=k+1 
                    fi
                  od:
                  if k=nops(s) then
                    if op(p[1])[1]=x then 
                      X:=[op(X),op(p[1])[2]]: Y:=[op(Y),op(p[2])[2]] 
                    else 
                      X:=[op(X),op(p[2])[2]]: Y:=[op(Y),op(p[1])[2]]
                    fi: 
                  fi:       
                od:
              od:
              xmax:=1.25*max(op(X));
              ymax:=1.25*max(op(Y));
              if xmax=0 then 
                xmax:=10 
              fi:
              if ymax=0 then 
                ymax:=10 
              fi:
            fi;
            if s_opt={} then 
              xmax:=10:
              ymax:=10 
            fi:
            xmin:=(-1)*xmax/6:
            ymin:=(-1)*ymax/6:
            g1:=plots[inequal](_cnsts, x = xmin .. xmax, y = ymin .. ymax, optionsfeasible = (color = grey), optionsclosed = (color = black, thickness = 1), optionsexcluded = (color = white),tickmarks=[3,3], labels=[x, y]):
            if s_opt&lt;&gt;{} and s_opt&lt;&gt;NULL then
                g2:=plots[implicitplot](_obj=subs(s_opt,_obj), x=xmin..xmax, y=ymin.. ymax, thickness = 2, linestyle=1, color=green, labels=[x, y]):
              if op(s_opt[1])[1]=x then
                coord:=[op(s_opt[1])[2],op(s_opt[2])[2]] 
              else 
                coord:=[op(s_opt[2])[2],op(s_opt[1])[2]] 
              fi:
              _w:=subs({x=coord[1],y=coord[2]},_obj):
              k:=0:
              _C:=[]:
              for i from 1 to nops(X) do
                _C:=[op(_C), [X[i],Y[i]]]:
                _C:=[op({op(_C)})]:
                if subs({x=op(X(i))[i],y=op(Y(i))[i]},_obj)=_w then 
                  k:=k+1: c[k]:=[op(X(i))[i],op(Y(i))[i]] 
                fi:
              od;
              for i from 1 to nops(_C) do
                l:=_C[i]:
                for j from i+1 to nops(_C) do 
                  if op(_C)[j,1]&lt;op(_C)[i,1] then 
                    l:=_C[j]: _C[j]:=_C[i]: _C[i]:=l
                  fi:
                od:
              od:
              c:={seq(c[i],i=1..k)}:
              if nops(c)&lt;=1 then
                for i from 1 to nops(_C) do
                  k:=0:
                  for j from nops(_C) to i+1 by -1 do
                    if abs(_C[i,1]-_C[j,1])/(xmax-xmin)&lt; (length(cat(convert(_C[i,1],string), convert(_C[i,2],string)))+3)/60 and abs(_C[i,2]-_C[j,2])/(ymax-ymin)&lt;0.05 then 
                      k:=k+1: 
                    fi: 
                  od: 
                    if _C[i,2]=0 and k=0 then 
                      A:={ABOVE,RIGHT}: 
                    else
                      if _C[i,2]=0 and k&gt;0 then
                        A:={BELOW,RIGHT}:                   
                      else
                        if k=0 then 
                          A:={ABOVE,RIGHT}:
                        else
                          A:={ABOVE,LEFT}:  
                        fi:
                      fi:
                    fi:
                    if r1=true then 
                      B:=&quot;minimale&quot; 
                    else 
                      B:=&quot;maximale&quot; 
                    fi: 
                    g[i]:=plots[textplot]([_C[i,1],_C[i,2],cat(&quot; (&quot;,convert(_C[i,1],string),&quot;, &quot;,convert(_C[i,2],string),&quot;) &quot;)],align=A):
                    _t:=cat(`La valeur `, <Font style="_cstyle9">B,</Font> ` de la fonction objectif est `, convert(parse(convert(_w,CaractDec)),string), ` lorsque `, convert(x,string), `=`, convert(coord[1],string), ` et `, convert(y, string), `=`, convert(coord[2],string)):
                  od:
                else
                  for i from 1 to nops(_C) do
                    k:=0: 
                    for j from nops(_C) to i+1 by -1 do
                      if abs(_C[i,1]-_C[j,1])/(xmax-xmin)&lt;(length(cat(convert(_C[i,1],string),convert(_C[i,2],string)))+3)/60 and abs(_C[i,2]-_C[j,2])/(ymax-ymin)&lt;0.05 then
                        k:=k+1: 
                      fi: 
                    od:
                    if _C[i,2]=0 and k=0 then 
                      A:={ABOVE,RIGHT}: 
                    else
                      if _C[i,2]=0 and k&gt;0 then
                        A:={ABOVE,LEFT}:                   
                      else
                        if k=0 then 
                          A:={ABOVE,RIGHT}:
                        else
                          A:={BELOW,LEFT}:  
                        fi:
                      fi:
                    fi:
                    if r1=true then 
                      B:=&quot;minimale&quot; 
                    else 
                      B:=&quot;maximale&quot; 
                    fi: 
                    g[i]:=plots[textplot]([_C[i,1],_C[i,2],cat(&quot; (&quot;,convert(_C[i,1],string),&quot;, &quot;,convert(_C[i,2],string),&quot;) &quot;)],align=A):
                    _t:=cat(`La valeur `, <Font style="_cstyle9">B,</Font> ` de la fonction objectif est  `, convert(_w,string), `  lorsque  `, convert(x,string), `=`, convert(c[1,1],string), ` et `, convert(y, string), `=`, convert(c[1,2],string), ` ou lorsque `, convert(x,string), `=`, convert(c[2,1],string), ` et `, convert(y, string), `=`, convert(c[2,2],string), ` ainsi que tous les points sur le segment joignant les deux solutions.`):
                od:
            fi:
         _sr:=plots[display]([g1,seq(g[i],i=1..nops(_C)),g2], view=[1.2*xmin .. 1.2*xmax, 1.2*ymin .. 1.2*ymax], labels=[x, y], font=[HELVETICA,9], tickmarks=[0,0]):
         _sr
   else
      if s_opt={} then
         g2:=plots[textplot]([0,0,&quot;&quot;]):
<Font encoding="UTF-8">         _t:=cat(`Il n'y a pas de solution optimale car l'ensemble`, `\134n`, `des SOLUTIONS REALISABLES est VIDE.`):
</Font>         _sr:=plots[display]([g1,g2], labels=[x, y], font=[HELVETICA,9], tickmarks=[0,0]):
         _sr
      else
      if s_opt=NULL then
         g2:=plots[textplot]([0,0,&quot;&quot;]):
<Font encoding="UTF-8">         _t:=cat(`La solution n'existe pas car l'ensemble`, `\134n`, `des SOLUTIONS REALISABLES est NON BORNE.`):
</Font>         _sr:=plots[display]([g1,g2], labels=[x, y], font=[HELVETICA,9], tickmarks=[0,0]):
         _sr
      fi: 
      fi: 
   fi:
else
  if r1=true then 
    B:=&quot;minimale&quot;:
  else 
    B:=&quot;maximale&quot;:
  fi:
g1:=plot(0,x=1..10,1..10,axes=NONE):
  if s_opt={} or s_opt=NULL then
    if simplex[feasible](_cnsts, NONNEGATIVE)=true then
      _t:=cat(`Il n'y a pas de solution. L'ensemble des SOLUTIONS REALISABLES est NON BORNE.`)
    else
      _t:=cat(`Il n'y a pas de solution. L'ensemble des SOLUTIONS REALISABLES est VIDE.`)
    fi:
  else
    _t:=cat(`La valeur `, <Font style="_cstyle9">B,</Font> ` de la fonction objectif est  `, convert(subs(s_opt,_obj),string), `  lorsque  `, seq(cat(convert(s_opt[i],string),` , `),i=1..nops(s_opt)))
  fi:
  _sr:=plots[display](g1, labels=[x, y], font=[HELVETICA,9], tickmarks=[0,0]):
fi
else
g1:=plot(0,x=1..10,1..10,axes=NONE):
_t:=``:
_sr:=plots[display](g1, labels=[x, y], font=[HELVETICA,9], tickmarks=[0,0]):
fi:
  if _nv=3 then
    Maplets:-Tools:-Set('LB1'(caption)=&quot;Pour changer l'angle de vue, cliquez sur le graphique tout en faisant glisser la souris.&quot;):
    x:='x': y:='y': z:='z':
  for i from 1 to 3 do
    if _var[i]=&quot;x&quot; then 
      _var[i]:=_var[1]:_var[1]:=&quot;x&quot; 
    elif _var[i]=&quot;y&quot; then 
      _var[i]:=_var[2]:_var[2]:=&quot;y&quot;
    elif _var[i]=&quot;z&quot; then 
      _var[i]:=_var[3]:_var[3]:=&quot;z&quot;
    fi
  od:
  x:=parse(op(1,_var)):
  y:=parse(op(2,_var)):
  z:=parse(op(3,_var)):
  if s_opt&lt;&gt;{} and is(_obj,numeric)=false then
    dim3(r1):
    k:=[]:
    for i from 1 to nops(_sommets) do
      if subs({x=op(1,_sommets[i]),y=op(2,_sommets[i]),z=op(3,_sommets[i])},_obj)=v_opt then 
        k:=[op(k),_sommets[i]]
      fi
    od:
      if k&lt;&gt;[] then
        if nops(k)=1 then 
          j:=`` 
        elif nops(k)=2 then 
          j:=`ainsi que tous les points sur l'ARETE du POLYEDRE CONVEXE contenant les deux solutions.`
        elif nops(k)&gt;=3 then 
          j:=`ainsi que tous les points sur la face du POLYEDRE CONVEXE contenant les solutions.`
        fi:
        if nops(k)&gt;=1 then
         _t:=&quot;&quot;:
         _t:=cat(`La valeur `, <Font style="_cstyle9">B,</Font><Font encoding="UTF-8"> ` de la fonction objectif est `, convert(parse(convert(v_opt,CaractDec)),string), ` si\134n`, seq(cat(convert(_t,string), convert(x,string), ` = `, convert(op(1,op(i,k)),string), `, `, convert(y,string), ` = `, convert(op(2,op(i,k)),string), `, `, convert(z,string), ` = `, convert(op(3,op(i,k)),string), `\134n`), i=1..nops(k)), j)
</Font>        fi
      fi
  fi:
  if is(_obj,numeric)=false then
    Set('TB1'=convert(_t,string))
  fi:
  _sr
else
  Set('TB1'=convert(_t,string)):
  if _nv=2 then
    _sr
  elif _nv&gt;3 then
<Font encoding="UTF-8">    _sr:=plots[textplot]([-1,0,`Aucune repr\303\251sentation possible`], axes=NONE)
</Font>  fi   
fi:
end use:
end:

dim3:=proc(r1)
local i, j, k, substituer, sommets, xmin, xmax, ymin, ymax, zmin, zmax, sm, eqs, s, r, p, S, g1, g2, g3, g4, X, pt, pl, ft, ct, eq, st, l:
global s_opt, v_opt, _obj, _cnsts, _sr, _sommets:
_sommets:='_sommets':
_cnsts := _cnsts union { x &gt;= 0, y &gt;= 0 , z &gt;= 0, x&lt;=1000000000, y&lt;=1000000000, z&lt;=1000000000}:
v_opt:=subs(s_opt,_obj):
s_opt:=[seq([subs([s_opt][i], x ), subs([s_opt][i], y ), subs([s_opt][i], z )], i=1..nops([s_opt]))]:
eqs:={seq(convert(_cnsts[i],equality),i=1..nops(_cnsts))}:
_sommets:=[]:
  for i from 1 to nops(eqs) do
    for j from i+1 to nops(eqs) do
      for k from j+1 to nops(eqs) do
        _sommets:=[op(_sommets),solve({eqs[i],eqs[j],eqs[k]})]
      od
    od
  od:
  s:=_sommets:
  _sommets:=[seq([subs(_sommets[i], x ), subs(_sommets[i], y ), subs(_sommets[i], z )], i=1..nops(_sommets))]:
  p:=[]:
    for i from 1 to nops(_sommets) do
      substituer:=subs(convert(op(i,s),set), convert(_cnsts,list)):
      k:=0:
      for j from 1 to nops(substituer) do
        if is(op(j,substituer))=true then 
          k:=k+1 
        fi
      od:
        if k=nops(_cnsts) then 
          p:=[op(p),op(i,_sommets)] 
        fi:
    od:
    p:=convert(convert(p,set),list):
    _sommets:=p:
    s:=[]:
      for i from 1 to nops(_sommets) do
        for j from i+1 to nops(_sommets) do
          for k from j+1 to nops(_sommets) do
            s:=[op(s),[_sommets[i],_sommets[j],_sommets[k]]]
          od
        od
      od:
      pt:=[]:
      for i from 1 to nops(s) do
        pt:=[op(pt),[seq(add(op(k,op(j,op(i,s))),j=1..3),k=1..3)/3]]
      od:
      pl:=[]:
      for i from 1 to nops(pt) do
        pl:=[op(pl),[subs({x=op(1,op(i,pt)), y=op(2,op(i,pt)), z=op(3,op(i,pt))},convert(_cnsts,list))]]
      od:
      ft:=[]:
      for i from 1 to nops(pl) do
        ct:=0:
        for j from 1 to nops(op(i,pl)) do
          for k from 1 to nops(op(j,op(i,pl))) do
            if is(convert(op(k,op(j,op(i,pl))),equality))=false then
              ct:=ct+1
            fi
          od
        od:
        if ct&lt;nops(_cnsts) then 
          ft:=[op(ft),op(i,s)]
        fi
      od:
      ft:=convert(convert(ft,set),list):
      eq:=[]:
      for i from 1 to nops(ft) do
        eq:=[op(eq),plan(seq(op(j,op(i,ft)),j=1..nops(op(i,ft))))]
      od:
      for i from 1 to nops(eq) do
        for j from i+1 to nops(eq) do
          if is(eq[i]+eq[j])=true then 
            eq[j]:=eq[i]  
          fi
        od
      od:
      eq:=convert(convert(eq,set),list):
      for i from 1 to nops(eq) do
        st[i]:=[]:
        for j from 1 to nops(_sommets) do
          if is(subs({x=op(1,_sommets[j]),y=op(2,_sommets[j]),z=op(3,_sommets[j])},eq[i]))=true then 
            st[i]:=[op(st[i]),[op(1,_sommets[j]),op(2,_sommets[j]),op(3,_sommets[j])]]
          fi
        od
      od:
      st:=[seq(st[i],i=1..nops(eq))]:
      st:=convert(convert(st,set),list):
      sm:=[]:
      for l from 1 to nops(st) do
        for i from 1 to nops(op(l,st)) do
          for j from i+1 to nops(op(l,st)) do
            for k from j+1 to nops(op(l,st)) do
              sm:=[op(sm),[op(i,op(l, st)), op(j,op(l, st)), op(k,op(l, st))]]
            od
          od
        od
      od:
      sm:=op(convert(convert(sm,set),list)):
      sommets:=[]:
      for i from 1 to nops(_sommets) do
        if op(1,op(i,_sommets))&lt;1e6 and op(2,op(i,_sommets))&lt;1e6 and op(3,op(i,_sommets))&lt;1e6 then
         sommets:= [op(sommets),op(i,_sommets)]
        fi
      od:
      if max(seq(op(1,sommets[i]),i=1..nops(sommets))) = 0 then 
        xmax:=5 
      else 
        xmax:=max(seq(op(1,sommets[i]),i=1..nops(sommets))) 
      fi:
      if max(seq(op(2,sommets[i]),i=1..nops(sommets))) = 0 then 
        ymax:=5 
      else 
        ymax:=max(seq(op(2,sommets[i]),i=1..nops(sommets))) 
      fi:
      if max(seq(op(3,sommets[i]),i=1..nops(sommets))) = 0 then 
        zmax:=5 
      else 
        zmax:=max(seq(op(3,sommets[i]),i=1..nops(sommets))) 
      fi:
      for j from 1 to nops(_sommets) do 
        X[j]:=[seq(op(i,op(j,_sommets)),i=1..nops(op(j,_sommets)))]
      od:
      r:=eqs minus {x = 1000000000, y = 1000000000, z = 1000000000}:
      for i from 1 to nops(eqs) do
        for j from i+1 to nops(eqs) do
          if is(eqs[i]+eqs[j])=true then
            r:=r minus {eqs[i]}
          fi: 
        od:
      od:
      eqs:=r:
      r:=[]:
      for i from 1 to nops(_sommets) do
        for j from i+1 to nops(_sommets) do
          l:=0:
          for k from 1 to nops(eqs) do
            if is(subs({x=(op(1,op(i,_sommets))+op(1,op(j,_sommets)))/2, y=(op(2,op(i,_sommets))+op(2,op(j,_sommets)))/2, z=(op(3,op(i,_sommets))+op(3,op(j,_sommets)))/2},op(k,eqs)))=true then
              l:=l+1:
            fi:
          od:
          if l&gt;1 and op(i,_sommets)&lt;&gt;op(j,_sommets) then
            r:=[op(r),[op(i,_sommets),op(j,_sommets)]]
          fi:
        od:
      od:
      r:=convert(convert(convert(r,set),set),list):
      g1:=plots[textplot3d]([seq([seq(op(i,op(j,_sommets)),i=1..nops(op(j,_sommets))), X[j]], j=1..nops(_sommets))], color=black, font=[HELVETICA, 9]):
      i:=simplex[minimize](x+y+z,_cnsts minus {x&lt;=1000000000, y&lt;=1000000000, z&lt;=1000000000},NONNEGATIVE):
      j:=simplex[maximize](x+y+z,_cnsts minus {x&lt;=1000000000, y&lt;=1000000000, z&lt;=1000000000},NONNEGATIVE):
        if is(subs(i,_obj)&lt;infinity) and is(subs(j,_obj)&lt;infinity) then
          if s&lt;&gt;[] or op(r)&lt;&gt;[] then
            PLOT3D(POLYGONS(sm), STYLE(PATCHNOGRID), COLOR(XYZSHADING), LIGHT(0,0,0.0,0.1,0.0), LIGHT(100,45,0.1,0.0,0.0),LIGHT(100,-45,0.0,0.0,0.1), AMBIENTLIGHT(1,1,1)):
            PLOT3D(POLYGONS(op(r)),STYLE(PATCH)):
            g2:=plots[display]([%,%%]):
          else
            g2:=PLOT3D(POLYGONS([[subs(i, x ), subs(i, y ), subs(i, z )],[subs(j, x ), subs(j, y ), subs(j, z )]]), STYLE(PATCH), COLOR(ZHUE)):
          fi:  
        else
          xmax:=2*xmax:
          ymax:=2*ymax:
          zmax:=2*zmax:
          PLOT3D(POLYGONS(sm), STYLE(PATCHNOGRID)):
          PLOT3D(POLYGONS(op(r)),STYLE(PATCH)):
          g2:=plots[display]([%,%%]):
        fi:
        if is(v_opt&lt;infinity)=true then
          if is(subs(z='a',_obj)=_obj)=true then
            k:=_obj+(1e-3)*z:
          else 
            k:=_obj 
          fi:
          i:=1.2:
          while whattype(traperror(plot3d(solve(k=v_opt,z), x=-i*xmax..i*xmax, y=-i*ymax..i*ymax)))=string do
            i:=i+.1:
          od:
          g3:=plot3d(solve(k=v_opt,z), x=-0.1*xmax..i*xmax, y=-0.1*ymax..i*ymax, transparency=0.80, shading=XY, style=PATCHNOGRID):
          _sr:=plots[display]([g1,g2,g3], view=[-0.1*xmax..1.2*xmax,-0.1*ymax..1.2*ymax, -0.1*zmax..1.2*zmax], tickmarks=[0, 0, 0], axes=NORMAL, orientation=[-20, 65], labels=[x, y, z]):
        else
          _sr:=plots[display]([g1,g2], view=[-0.1*xmax..1.2*xmax,-0.1*ymax..1.2*ymax, -0.1*zmax..1.2*zmax], tickmarks=[0, 0, 0], axes=NORMAL, orientation=[-20, 65], labels=[x, y, z])
        fi
end:

dRapide := proc(n)
local i, j, d, dl, db, dp, dr:
if n=1 then
  d:=Maplets:-Tools:-Get('TF2')
else
  d:=Maplets:-Tools:-Get('TF3')
fi:
if d&lt;&gt;&quot;&quot; then
  if d[<Font style="_cstyle8">length(d)</Font>]&lt;&gt;&quot;
    &quot; then 
    d:=cat(d,&quot;
&quot;) 
  fi:
else
  return
fi:
dl:=[]:
db:=&quot;&quot;:
dp:=&quot;&quot;:
  for i from 1 to length(d) do
    if (d[i]=&quot;.&quot; and dp&lt;&gt;&quot;.&quot;)  or (d[i]=&quot;,&quot; and dp&lt;&gt;&quot;,&quot;) or (d[i]=&quot;-&quot; and dp&lt;&gt;&quot;-&quot;) or d[i]=&quot;0&quot; or d[i]=&quot;1&quot; or d[i]=&quot;2&quot; or d[i]=&quot;3&quot; or d[i]=&quot;4&quot; or d[i]=&quot;5&quot; or d[i]=&quot;6&quot; or d[i]=&quot;7&quot; or d[i]=&quot;8&quot; or d[i]=&quot;9&quot; or d[i]=&quot;/&quot;  or d[i]=&quot;*&quot;  then 
      db:=cat(convert(db,string),convert(d[i],string)):
      dp:=d[i]:
    elif d[i]=&quot;        &quot; then
      db:=cat(convert(db,string),&quot;,&quot;):
<Font encoding="UTF-8">    elif db&lt;&gt;&quot;&quot; and d[i]=&quot;\134n&quot; then
</Font>      if whattype(traperror(parse(db)))=string then<Font style="_cstyle8">
        if n=1 then
          j:=&quot;de la fonction objectif.&quot;
        else
          j:=&quot;des contraintes.&quot;
        fi:
        Maplets[Examples][Alert](cat(&quot;Erreur: coefficients &quot;,j)):
        return()</Font>
      fi:
<Font encoding="UTF-8">      if (d[i]=&quot;\134n&quot; and d[i-1]=&quot;,&quot;) or(d[i]&lt;&gt;&quot;        &quot; and d[i-1]=&quot;        &quot;) then
</Font>        db:=cat(&quot;[&quot;,<Font style="_cstyle8">seq(</Font>db<Font style="_cstyle8">[k], k=1..</Font>length(db)-1<Font style="_cstyle8">)</Font>,&quot;]&quot;<Font style="_cstyle8">):</Font>
        dl:=[op(dl),parse(db)]:db:=&quot;&quot;
      else
        db:=cat(&quot;[&quot;,convert(db,string),&quot;]&quot;):
        dl:=[op(dl),parse(db)]:db:=&quot;&quot;
      fi
    fi
  od:
  d:=&quot;&quot;:
  dr:=&quot;&quot;:
    for i from 1 to nops(dl) do
      dr[i]:=&quot;&quot;:
      for j from 1 to nops(dl[i])-1 do
        dr[i]:=cat(convert(dr[i],string), `(`, convert(dl[i,j],string), `)`, `*x`, convert(j, string),`+`):
      od:
      if n=2 then
        dr[i]:=parse(cat(convert(dr[i],string),`0&lt;=`,convert(dl[i,j],string))):
      else
        dr[i]:=parse(cat(convert(dr[i],string), `(`, convert(dl[i,j],string), `)`, `*x`, convert(j, string))):
      fi:
<Font encoding="UTF-8">      d:=cat(convert(d,string),convert(dr[i],string),`\134n`):
</Font>    od:
    convert(d,name)
end:

plan := proc(a,b,c)
local n,r:
global x,y,z:
n := linalg[crossprod](b-a,c-a):
r := vector([x,y,z]):
linalg[innerprod](n,r-a)=0:
end:

conserver:=proc()
local i, t:
global _cnsts, _obj, s_opt, _nv, _w:
use Maplets[Tools] in
print():
  if Get('RB1')=true then 
    t:=`Minimiser  ` 
  else 
    t:=`Maximiser  ` 
  fi:
print(cat(t,convert(_obj,string))):
print(`soumise aux contraintes`):
_cnsts:=_cnsts minus {x&lt;=1000000000, y&lt;=1000000000, z&lt;=1000000000}:
  for i from 1 to nops(_cnsts) do
    print(op(i,_cnsts))
  od:
    if _nv&gt;3 then
<Font encoding="UTF-8">      print(`toutes les variables sont non n\303\251gatives.`)
</Font>    fi:
  if (_nv=2 or _nv=3) and s_opt&lt;&gt;{} and s_opt&lt;&gt;&quot;&quot; then 
    print(_sr) 
  fi:
print(_t):
print(__________________________________________________):
end use
end:

`convert/CaractDec`:= proc(x)
local X, i, j:
X:= sprintf(cat(&quot;%&quot;, 2*Digits+2, &quot;.&quot;, Digits, &quot;f&quot;), x):
for i while X[i] = &quot; &quot; do od:
for j from length(X) by -1 while X[j] = &quot;0&quot; do od:
if X[j] = &quot;.&quot; then j:= j-1 fi:
X[i..j]
end:

rep:= proc()
global _t:
_t
end:

with(Maplets[Elements]):
prog:=Maplet('onstartup'=RunWindow('W1'),

Window['A1'](title=&quot;Aide&quot;, 'layout' = 'BA0', height=430, width=600, resizable = false),
BoxLayout['BA0'](
BoxColumn(
TextBox['TB2'](height=18,editable=false,
<Font encoding="UTF-8">&quot;Cette application permet d'optimiser une fonction lin\303\251aire \303\240 deux variables ou plus, soumise \303\240 des contraintes de la forme</Font>

      a*x+b*y+c*z ... &lt;= d
      a*x+b*y+c*z ... &gt;= d
      a*x+b*y+c*z ...  = d  

<Font encoding="UTF-8">Lorsque le probl\303\250me est \303\240 deux ou \303\240 trois variables, l'application localise dans le plan cart\303\251sien ou dans un espace \303\240 trois dimensions, l'ensemble convexe des solutions r\303\251alisables du probl\303\250me ainsi que tous ses sommets. En faisant glisser la souris, on peut examiner sous tous les angles les espaces \303\240 trois dimensions.
</Font>
<Font encoding="UTF-8">Il n'est pas n\303\251cessaire d'indiquer les contraintes de non n\303\251gativit\303\251 du probl\303\250me ( x&gt;=0, y&gt;=0, z&gt;=0, ... ), l'application s'en charge. Vous pouvez utiliser les variables de votre choix (x, y, z, u, v, t, x1, x2 ... ).
</Font>
<Font encoding="UTF-8">La fonction objectif et les contraintes du probl\303\250me peuvent \303\252tre entr\303\251es directement dans les cases correspondantes. Pour acc\303\251l\303\251rer l'entr\303\251e des donn\303\251es, cliquez sur \302\253Donn\303\251es simplifi\303\251es\302\273 en utilisant le menu \302\253Option\302\273 ou en utilisant le bouton droit de la souris avec le curseur plac\303\251 au pr\303\251alable sur une des cases contenant les donn\303\251es.</Font>&quot;
),
Button(&quot;FERMER&quot;,CloseWindow('A1'))
)
),

<Font encoding="UTF-8">Window['W0'](title=&quot;Aide (donn\303\251es simplifi\303\251es)&quot;, 'layout' = 'BA1', height=420, width=360, resizable = false),
</Font>BoxLayout['BA1'](
  BoxColumn(
    TextBox['TB3'](height=18, editable=false, font=Font('Courier',12),
    &quot;Pour entrer le programme suivant:
    
    Maximiser 3*x + 5*y
    
    2*x - 5*y &lt;= 7
      x + 3*y &gt;= 2
            x &gt;= 1
            y &lt;= 3
            x &gt;= 0
            y &gt;= 0
    
<Font encoding="UTF-8">il faut d'abord pr\303\251senter toutes les contraintes du programme (sauf celles de non n\303\251gativit\303\251) sous la forme &lt;=
</Font>
    Maximiser  3*x + 5*y 
    
    2*x - 5*y &lt;=  7
     -x - 3*y &lt;= -2
           -x &lt;= -1
            y &lt;=  3

<Font encoding="UTF-8">puis entrer les coefficients de la fonction objectif et des contraintes en utilisant la virgule comme s\303\251parateur.</Font> 

   3, 5        

   2,-5, 7
   -1,-3,-2
   -1, 0,-1
   0, 1, 3&quot;
    ),
    Button(&quot;FERMER&quot;,CloseWindow('W0'))
  )
),

<Font encoding="UTF-8">Window['W1'](title=&quot;Programmation lin\303\251aire&quot;, 'menubar'='MB1', height=585, width = 785, 'layout' = 'BL1', resizable = false),
</Font>BoxLayout['BL1'](
  BoxRow(
    BoxColumn(border=true,
      BoxRow(
        RadioButton['RB1'](&quot;Minimiser&quot;, 'value'=false,'group'='BG1'), 
        RadioButton['RB2'](&quot;Maximiser&quot;, 'value'=true,'group'='BG1')
      ),
      &quot;la fonction objectif&quot;,
      TextBox['TF0']('value' = &quot;x+3*y+9*z&quot;, 'popupmenu'='PM1', height=3, width = 40, wrapped=false),
      TextField['TBX']('value' = &quot;&quot;, visible=false),
      &quot;soumise aux contraintes&quot;,
<Font encoding="UTF-8">      TextBox['TF1']('value' = &quot;x+y+z &lt;= 9\134nx &gt;= 3\134n2*x-y+3*z &lt;= 12&quot;, 'popupmenu'='PM2', height=12, width = 40, wrapped=false),
</Font>      Button['B1']<Font encoding="UTF-8">(&quot;R\303\251soudre&quot;, width=100, Action(SetOption('B1'(enabled)=false), SetOption('LB1'(caption)=&quot;&quot;), SetOption('TB1'=&quot;&quot;), Evaluate('PL1'= 'dStandard(RB1)'), SetOption('B1'(enabled)=true))),
</Font>      BoxRow('inset'=0, 'spacing'=0,
        Button(&quot;Conserver&quot;, width=100, Action(SetOption('target' = 'TB1', 'value'= &quot;&quot;), Evaluate('PL1'= 'dStandard(RB1)'), Evaluate('function' = 'conserver()'))),
        Label(&quot; &quot;, font=Font('Helvetica',4)),
        Button(&quot;Effacer&quot;, width=100, Action(SetOption('TF0' = &quot;&quot;),SetOption('TF1' = &quot;&quot;), SetOption('TB1' = &quot;&quot;), Evaluate('PL1'= 'plots[textplot]([0,0,&quot;&quot;],axes=NONE)')))
       ),
<Font encoding="UTF-8">       Label(&quot;\302\251 Andr\303\251 L\303\251vesque&quot;, halign =left, font=Font('Helvetica',10))</Font>
     ),
       BoxColumn('inset'=0, 'spacing'=0,
         BoxRow('inset'=0, 'spacing'=0, border=true,
           [Plotter['PL1'](height=375, width=375),
           Label['LB1'](&quot;&quot;, font=Font('Helvetica',9))]
         ),
         BoxRow( border=true,
           TextBox['TB1'](&quot;&quot;, height=4, width=48)
         )
       )
     ),
  MenuBar['MB1'](
    Menu(&quot;Fichier&quot;,
        MenuItem(&quot;Fermer&quot;, Shutdown())
    ),
    Menu(&quot;Option&quot;,
<Font encoding="UTF-8">        MenuItem(&quot;Donn\303\251es simplifi\303\251es&quot;, onclick = Action(RunWindow('W2')))
</Font>    ),
    Menu(&quot;?&quot;,
        MenuItem(&quot;Aide&quot;, RunWindow('A1'))
    )
  )
),
ButtonGroup['BG1'](),
PopupMenu['PM1'](MenuItem(&quot;<Font encoding="UTF-8">Donn\303\251es simplifi\303\251es&quot;, onclick = Action(RunWindow('W2'), SetOption('TF2'(focus)=true)))),
PopupMenu['PM2'](MenuItem(&quot;Donn\303\251es simplifi\303\251es&quot;, onclick = Action(RunWindow('W2'), SetOption('TF3'(focus)=true)))),</Font>

<Font encoding="UTF-8">Window['W2'](title=&quot;Donn\303\251es simplifi\303\251es&quot; , 'layout' = 'BL2', resizable = false),
</Font>  BoxLayout['BL2'](
    BoxColumn(
      Label(&quot;Coefficients de la fonction objectif&quot;, font=Font('Helvetica',11)),
      TextBox['TF2'](&quot;2,1&quot;, width=15, height=3, wrapped=false),
        BoxRow(
<Font encoding="UTF-8">          Label(&quot;     Coefficients des contraintes \303\251crites sous la forme :&quot;, font=Font('Helvetica',11)),
</Font>          Label(&quot; &lt;=     &quot;, font=Font('courier',12))
        ),
<Font encoding="UTF-8">      TextBox['TF3'](&quot;1,1,9\134n-3,-2,-6\134n1,0,5\134n0,1,6&quot;, width=15, height=10, wrapped=false),
</Font>      BoxRow(
<Font encoding="UTF-8">        Button(&quot;Transf\303\251rer&quot;</Font>, width=100, onclick = Action( Evaluate('TF0'=&quot;&quot;), Evaluate('TF1'=&quot;&quot;), Evaluate('TB1'=&quot;&quot;), Evaluate('PL1'= 'plots[textplot]([0,0,``], axes=NONE)'), Evaluate('TF0'='dRapide(1)'), Evaluate('TF1'='dRapide(2)'), SetOption('LB1'(caption)=&quot;&quot;), CloseWindow('W2')))
      ),
      BoxRow(
        Button(&quot;Effacer&quot;, width=100, Action(SetOption('TF2' = &quot;&quot;),SetOption('TF3' = &quot;&quot;))),
        Button(&quot;Aide&quot;, width=100, RunWindow('W0'))
      )
    )
  )
):

Maplets[Display](prog);</Text-field>
</Input>
</Group>
<Text-field style="_pstyle9" layout="_pstyle9"></Text-field>
</Worksheet>