Click here to Skip to main content
15,891,316 members
Articles / Web Development / HTML

Logician: A Table-based Rules Engine Suite in C++/.NET/JavaScript using XML

Rate me:
Please Sign up or sign in to vote.
4.90/5 (52 votes)
8 Mar 2017GPL314 min read 104.3K   6.8K   173  
Overview of a cross-platform spreadsheet-based rules enigne with algorithms implemented in C++ and JavaScript, and wrappers to C#/.NET/WinRT
<?xml version="1.0" encoding="UTF-8"?>
<Tables debugtables="" debug="false" connection="localhost:11000">
  <Table name="BoreCat" getall="false">
    <Inputs>
      <Attr>BoreDiameter</Attr>
      <Value id="6" operation="1">2</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="8" operation="1">4</Value>
      <Value id="9" operation="1">5</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="12" operation="1">8</Value>
      <Value id="13" operation="1">10</Value>
      <Value id="14" operation="1">12</Value>
      <Value id="15" operation="1">14</Value>
      <Value id="16" operation="1">16</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="17" operation="1">02</Value>
      <Value id="18" operation="1">03</Value>
      <Value id="19" operation="1">04</Value>
      <Value id="20" operation="1">05</Value>
      <Value id="21" operation="1">06</Value>
      <Value id="22" operation="1">07</Value>
      <Value id="23" operation="1">08</Value>
      <Value id="13" operation="1">10</Value>
      <Value id="14" operation="1">12</Value>
      <Value id="15" operation="1">14</Value>
      <Value id="16" operation="1">16</Value>
      <Value id="24" operation="1">XX</Value>
    </Outputs>
  </Table>
  <Table name="BoreDiameter" getall="false">
    <Inputs>
      <Attr/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>BoreDiameter</Attr>
      <Value id="6,7,8,9,10,11,12,13,14,15,16" operation="1">2|3|4|5|6|7|8|10|12|14|16</Value>
    </Outputs>
  </Table>
  <Table name="CatalogNumber" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="25" operation="4096">eval(CylinderSeriesCat, Code)</Value>
      <Value id="26" operation="4096">eval(MountingCat, Code)</Value>
      <Value id="27" operation="4096">eval(BoreCat, Code)</Value>
      <Value id="28" operation="4096">eval(RodSizeCat, Code)</Value>
      <Value id="29" operation="4096">eval(RodEndCat, Code)</Value>
      <Value id="30" operation="4096">eval(PistonCat, Code)</Value>
      <Value id="31" operation="4096">eval(SealingCat, Code)</Value>
      <Value id="32" operation="4096">eval(PortStyleCat, Code)</Value>
      <Value id="33" operation="4096">eval(PortLocationHeadCat, Code)</Value>
      <Value id="34" operation="4096">eval(PortLocationCapCat, Code)</Value>
      <Value id="35" operation="4096">eval(CushionCat, Code)</Value>
      <Value id="36" operation="4096">eval(CushionHeadCat, Code)</Value>
      <Value id="37" operation="4096">eval(CushionCapCat, Code)</Value>
      <Value id="38" operation="2049">get(CylinderStrokeWhole)</Value>
      <Value id="39" operation="4096">eval(StrokeFractionCat, Code)</Value>
    </Outputs>
    <FormulaInput>CylinderStrokeWhole</FormulaInput>
  </Table>
  <Table name="Cushion" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Cushion</Attr>
      <Value id="40" operation="1">Front End</Value>
      <Value id="41" operation="1">Read End</Value>
      <Value id="42" operation="1">Both Ends</Value>
      <Value id="43" operation="1">None</Value>
    </Outputs>
  </Table>
  <Table name="CushionCap" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>CushionCap</Attr>
      <Value id="43,9,10,11,12" operation="1">None|5|6|7|8</Value>
    </Outputs>
  </Table>
  <Table name="CushionCapCat" getall="false">
    <Inputs>
      <Attr>CushionCap</Attr>
      <Value id="9" operation="1">5</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="12" operation="1">8</Value>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="44" operation="2049">get(CushionCap)</Value>
      <Value id="44" operation="2049">get(CushionCap)</Value>
      <Value id="44" operation="2049">get(CushionCap)</Value>
      <Value id="44" operation="2049">get(CushionCap)</Value>
    </Outputs>
    <FormulaInput>CushionCap</FormulaInput>
  </Table>
  <Table name="CushionCat" getall="false">
    <Inputs>
      <Attr>Cushion</Attr>
      <Value id="40" operation="1">Front End</Value>
      <Value id="41" operation="1">Read End</Value>
      <Value id="42" operation="1">Both Ends</Value>
      <Value id="43" operation="1">None</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="45" operation="1">F</Value>
      <Value id="46" operation="1">R</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="48" operation="1">N</Value>
      <Value id="49" operation="1">X</Value>
    </Outputs>
  </Table>
  <Table name="CushionHead" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>CushionHead</Attr>
      <Value id="43,50,6,7,8" operation="1">None|1|2|3|4</Value>
    </Outputs>
  </Table>
  <Table name="CushionHeadCat" getall="false">
    <Inputs>
      <Attr>CushionHead</Attr>
      <Value id="50" operation="1">1</Value>
      <Value id="6" operation="1">2</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="8" operation="1">4</Value>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="51" operation="2049">get(CushionHead)</Value>
      <Value id="51" operation="2049">get(CushionHead)</Value>
      <Value id="51" operation="2049">get(CushionHead)</Value>
      <Value id="51" operation="2049">get(CushionHead)</Value>
    </Outputs>
    <FormulaInput>CushionHead</FormulaInput>
  </Table>
  <Table name="CylinderSeries" getall="false">
    <Inputs>
      <Attr/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>CylinderSeries</Attr>
      <Value id="52,53,54" operation="1">3000 psi Hydraulic|2000 psi Hydraulic|200 psi Pneumatic</Value>
    </Outputs>
  </Table>
  <Table name="CylinderSeriesCat" getall="true">
    <Inputs>
      <Attr>CylinderSeries</Attr>
      <Value id="54" operation="1">200 psi Pneumatic</Value>
      <Value id="53" operation="1">2000 psi Hydraulic</Value>
      <Value id="52" operation="1">3000 psi Hydraulic</Value>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="55" operation="1">MA02</Value>
      <Value id="56" operation="1">MH01</Value>
      <Value id="57" operation="1">MH31</Value>
    </Outputs>
  </Table>
  <Table name="CylinderStroke" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>CylinderStroke</Attr>
      <Value id="58" operation="1">YY</Value>
    </Outputs>
  </Table>
  <Table name="CylinderStrokeFraction" getall="true">
    <Inputs>
      <Attr>CylinderStroke</Attr>
      <Value id="59" operation="16">0</Value>
    </Inputs>
    <Outputs>
      <Attr>CylinderStrokeFraction</Attr>
      <Value id="60" operation="10241">js(getFractionalPart("get(CylinderStroke)"))</Value>
    </Outputs>
    <FormulaInput>CylinderStroke</FormulaInput>
  </Table>
  <Table name="CylinderStrokeWhole" getall="true">
    <Inputs>
      <Attr>CylinderStroke</Attr>
      <Value id="59" operation="16">0</Value>
    </Inputs>
    <Outputs>
      <Attr>CylinderStrokeWhole</Attr>
      <Value id="61" operation="10241">js(getIntegerPart("get(CylinderStroke)"))</Value>
    </Outputs>
    <FormulaInput>CylinderStroke</FormulaInput>
  </Table>
  <Table name="HydraulicCylinderDictionary" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Name</Attr>
      <Value id="62" operation="1">CylinderSeries</Value>
      <Value id="63" operation="1">MountingType</Value>
      <Value id="64" operation="1">BoreDiameter</Value>
      <Value id="65" operation="1">RodDiameter</Value>
      <Value id="66" operation="1">RodEndTypes</Value>
      <Value id="67" operation="1">PistonType</Value>
      <Value id="68" operation="1">PistonSeals</Value>
      <Value id="69" operation="1">Ports</Value>
      <Value id="70" operation="1">PortLocationHead</Value>
      <Value id="71" operation="1">PortLocationCap</Value>
      <Value id="72" operation="1">Cushion</Value>
      <Value id="73" operation="1">CushionHead</Value>
      <Value id="74" operation="1">CushionCap</Value>
      <Value id="75" operation="1">CylinderStroke</Value>
      <Value id="76" operation="1">CylinderStrokeWhole</Value>
      <Value id="77" operation="1">CylinderStrokeFraction</Value>
    </Outputs>
    <Outputs>
      <Attr>Description</Attr>
      <Value id="78" operation="1">Mill Cylinder Series</Value>
      <Value id="79" operation="1">Mounting Type</Value>
      <Value id="80" operation="1">Bore (inches)</Value>
      <Value id="81" operation="1">Rod (inches)</Value>
      <Value id="82" operation="1">Rod End Types</Value>
      <Value id="83" operation="1">Piston Type</Value>
      <Value id="84" operation="1">Piston Seals</Value>
      <Value id="69" operation="1">Ports</Value>
      <Value id="85" operation="1">Port Head</Value>
      <Value id="86" operation="1">Port Cap</Value>
      <Value id="72" operation="1">Cushion</Value>
      <Value id="87" operation="1">Cushion Head</Value>
      <Value id="88" operation="1">Cushion Cap</Value>
      <Value id="89" operation="1">Cylinder Stroke (1 - 99 15/16)</Value>
      <Value id="90" operation="1">CylinderStrokeWhole (Hidden)</Value>
      <Value id="91" operation="1">CylinderStrokeFraction (Hidden)</Value>
    </Outputs>
    <Outputs>
      <Attr>DefaultValue</Attr>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
      <Value id="92" operation="1">~</Value>
    </Outputs>
    <Outputs>
      <Attr>AttributeType</Attr>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="93" operation="1">SINGLESELECT</Value>
      <Value id="94" operation="1">EDIT</Value>
      <Value id="95" operation="1">STATIC</Value>
      <Value id="95" operation="1">STATIC</Value>
    </Outputs>
    <Outputs>
      <Attr>RuleTable</Attr>
      <Value id="62" operation="1">CylinderSeries</Value>
      <Value id="63" operation="1">MountingType</Value>
      <Value id="64" operation="1">BoreDiameter</Value>
      <Value id="65" operation="1">RodDiameter</Value>
      <Value id="66" operation="1">RodEndTypes</Value>
      <Value id="67" operation="1">PistonType</Value>
      <Value id="68" operation="1">PistonSeals</Value>
      <Value id="69" operation="1">Ports</Value>
      <Value id="70" operation="1">PortLocationHead</Value>
      <Value id="71" operation="1">PortLocationCap</Value>
      <Value id="72" operation="1">Cushion</Value>
      <Value id="73" operation="1">CushionHead</Value>
      <Value id="74" operation="1">CushionCap</Value>
      <Value id="75" operation="1">CylinderStroke</Value>
      <Value id="76" operation="1">CylinderStrokeWhole</Value>
      <Value id="77" operation="1">CylinderStrokeFraction</Value>
    </Outputs>
  </Table>
  <Table name="MountingCat" getall="false">
    <Inputs>
      <Attr>MountingType</Attr>
      <Value id="96" operation="1">Trunnion</Value>
      <Value id="97" operation="1">Male Clevis</Value>
      <Value id="98" operation="1">Rear Flange</Value>
      <Value id="99" operation="1">Female Clevis</Value>
      <Value id="100" operation="1">Base Mount</Value>
      <Value id="101" operation="1">Front Flange</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="102" operation="1">TN</Value>
      <Value id="103" operation="1">MC</Value>
      <Value id="104" operation="1">RF</Value>
      <Value id="105" operation="1">FC</Value>
      <Value id="106" operation="1">BM</Value>
      <Value id="107" operation="1">FF</Value>
      <Value id="24" operation="1">XX</Value>
    </Outputs>
  </Table>
  <Table name="MountingType" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>MountingType</Attr>
      <Value id="96" operation="1">Trunnion</Value>
      <Value id="97" operation="1">Male Clevis</Value>
      <Value id="98" operation="1">Rear Flange</Value>
      <Value id="99" operation="1">Female Clevis</Value>
      <Value id="100" operation="1">Base Mount</Value>
      <Value id="101" operation="1">Front Flange</Value>
    </Outputs>
  </Table>
  <Table name="PistonCat" getall="false">
    <Inputs>
      <Attr>PistonType</Attr>
      <Value id="108" operation="1">Ductile Iron or Steel</Value>
      <Value id="109" operation="1">2 piece Steel</Value>
      <Value id="110" operation="1">Ductile Cast Iron</Value>
      <Value id="111" operation="1">Bronze Clad Steel</Value>
      <Value id="112" operation="1">Other</Value>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="113" operation="1">W</Value>
      <Value id="46" operation="1">R</Value>
      <Value id="114" operation="1">C</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="49" operation="1">X</Value>
    </Outputs>
  </Table>
  <Table name="PistonSeals" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>PistonSeals</Attr>
      <Value id="116" operation="1">Chevron</Value>
      <Value id="117" operation="1">Polypack style</Value>
      <Value id="118" operation="1">PTFE (Teflon)</Value>
      <Value id="119" operation="1">U-cup</Value>
      <Value id="120" operation="1">Bi-directional with energizer</Value>
      <Value id="112" operation="1">Other</Value>
    </Outputs>
  </Table>
  <Table name="PistonType" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>PistonType</Attr>
      <Value id="108" operation="1">Ductile Iron or Steel</Value>
      <Value id="109" operation="1">2 piece Steel</Value>
      <Value id="110" operation="1">Ductile Cast Iron</Value>
      <Value id="111" operation="1">Bronze Clad Steel</Value>
      <Value id="112" operation="1">Other</Value>
    </Outputs>
  </Table>
  <Table name="PortLocationCap" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>PortLocationCap</Attr>
      <Value id="9,10,11,12" operation="1">5|6|7|8</Value>
    </Outputs>
  </Table>
  <Table name="PortLocationCapCat" getall="false">
    <Inputs>
      <Attr>PortLocationCap</Attr>
      <Value id="9" operation="1">5</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="12" operation="1">8</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="121" operation="2049">get(PortLocationCap)</Value>
      <Value id="121" operation="2049">get(PortLocationCap)</Value>
      <Value id="121" operation="2049">get(PortLocationCap)</Value>
      <Value id="121" operation="2049">get(PortLocationCap)</Value>
      <Value id="49" operation="1">X</Value>
    </Outputs>
    <FormulaInput>PortLocationCap</FormulaInput>
  </Table>
  <Table name="PortLocationHead" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>PortLocationHead</Attr>
      <Value id="50,6,7,8" operation="1">1|2|3|4</Value>
    </Outputs>
  </Table>
  <Table name="PortLocationHeadCat" getall="false">
    <Inputs>
      <Attr>PortLocationHead</Attr>
      <Value id="50" operation="1">1</Value>
      <Value id="6" operation="1">2</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="8" operation="1">4</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="122" operation="2049">get(PortLocationHead)</Value>
      <Value id="122" operation="2049">get(PortLocationHead)</Value>
      <Value id="122" operation="2049">get(PortLocationHead)</Value>
      <Value id="122" operation="2049">get(PortLocationHead)</Value>
      <Value id="49" operation="1">X</Value>
    </Outputs>
    <FormulaInput>PortLocationHead</FormulaInput>
  </Table>
  <Table name="PortStyleCat" getall="false">
    <Inputs>
      <Attr>Ports</Attr>
      <Value id="123" operation="1">NPT pipe thread</Value>
      <Value id="124" operation="1">SAE 0 Ring Boss</Value>
      <Value id="125" operation="1">SAE 4-Bolt Flange</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="126" operation="1">P</Value>
      <Value id="127" operation="1">J</Value>
      <Value id="45" operation="1">F</Value>
      <Value id="49" operation="1">X</Value>
    </Outputs>
  </Table>
  <Table name="Ports" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
      <Value/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Ports</Attr>
      <Value id="123" operation="1">NPT pipe thread</Value>
      <Value id="124" operation="1">SAE 0 Ring Boss</Value>
      <Value id="125" operation="1">SAE 4-Bolt Flange</Value>
    </Outputs>
  </Table>
  <Table name="RodDiameter" getall="true">
    <Inputs>
      <Attr>BoreDiameter</Attr>
      <Value id="6" operation="1">2</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="8" operation="1">4</Value>
      <Value id="9" operation="1">5</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="12" operation="1">8</Value>
      <Value id="13" operation="1">10</Value>
      <Value id="14" operation="1">12</Value>
      <Value id="15" operation="1">14</Value>
      <Value id="16" operation="1">16</Value>
    </Inputs>
    <Outputs>
      <Attr>RodDiameter</Attr>
      <Value id="128,129" operation="1">@1|1-3/8</Value>
      <Value id="130,131,6" operation="1">@1-3/8|1-3/4|2</Value>
      <Value id="132,6,133" operation="1">@1-3/4|2|2-1/2</Value>
      <Value id="134,133,135" operation="1">@2|2-1/2|3-1/2</Value>
      <Value id="136,7,8" operation="1">@2-1/2|3|4</Value>
      <Value id="136,135,9" operation="1">@2-1/2|3-1/2|5</Value>
      <Value id="136,7,8,137" operation="1">@2-1/2|3|4|5-3/4</Value>
      <Value id="138,135,9,137,11" operation="1">@3|3-1/2|5|5-3/4|7</Value>
      <Value id="138,139,137,12" operation="1">@3|4-1/4|5-3/4|8</Value>
      <Value id="135,137,11,140" operation="1">3-1/2|5-3/4|7|9</Value>
      <Value id="135,137,11,12,13" operation="1">3-1/2|5-3/4|7|8|10</Value>
    </Outputs>
  </Table>
  <Table name="RodEndCat" getall="false">
    <Inputs>
      <Attr>RodEndTypes</Attr>
      <Value id="141" operation="1">Standard Male</Value>
      <Value id="142" operation="1">Standard Female</Value>
      <Value id="143" operation="1">Special</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="144" operation="1">SM</Value>
      <Value id="145" operation="1">SF</Value>
      <Value id="146" operation="1">SS</Value>
      <Value id="24" operation="1">XX</Value>
    </Outputs>
  </Table>
  <Table name="RodEndTypes" getall="true">
    <Inputs>
      <Attr/>
      <Value/>
      <Value/>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>RodEndTypes</Attr>
      <Value id="141" operation="1">Standard Male</Value>
      <Value id="142" operation="1">Standard Female</Value>
      <Value id="143" operation="1">Special</Value>
    </Outputs>
  </Table>
  <Table name="RodFractionCat" getall="false">
    <Inputs>
      <Attr>ExtraRodProtectionFraction</Attr>
      <Value id="59" operation="1">0</Value>
      <Value id="147" operation="1">0.0625</Value>
      <Value id="148" operation="1">0.125</Value>
      <Value id="149" operation="1">0.1875</Value>
      <Value id="150" operation="1">0.25</Value>
      <Value id="151" operation="1">0.3125</Value>
      <Value id="152" operation="1">0.375</Value>
      <Value id="153" operation="1">0.4375</Value>
      <Value id="154" operation="1">0.5</Value>
      <Value id="155" operation="1">0.5625</Value>
      <Value id="156" operation="1">0.625</Value>
      <Value id="157" operation="1">0.6875</Value>
      <Value id="158" operation="1">0.75</Value>
      <Value id="159" operation="1">0.8125</Value>
      <Value id="160" operation="1">0.875</Value>
      <Value id="161" operation="1">0.9375</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="59" operation="1">0</Value>
      <Value id="50" operation="1">1</Value>
      <Value id="6" operation="1">2</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="8" operation="1">4</Value>
      <Value id="9" operation="1">5</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="12" operation="1">8</Value>
      <Value id="140" operation="1">9</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="114" operation="1">C</Value>
      <Value id="163" operation="1">D</Value>
      <Value id="164" operation="1">E</Value>
      <Value id="45" operation="1">F</Value>
      <Value id="49" operation="1">X</Value>
    </Outputs>
  </Table>
  <Table name="RodSizeCat" getall="false">
    <Inputs>
      <Attr>BoreDiameter</Attr>
      <Value id="6" operation="1">2</Value>
      <Value id="6" operation="1">2</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="8" operation="1">4</Value>
      <Value id="8" operation="1">4</Value>
      <Value id="8" operation="1">4</Value>
      <Value id="9" operation="1">5</Value>
      <Value id="9" operation="1">5</Value>
      <Value id="9" operation="1">5</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="12" operation="1">8</Value>
      <Value id="12" operation="1">8</Value>
      <Value id="12" operation="1">8</Value>
      <Value id="13" operation="1">10</Value>
      <Value id="13" operation="1">10</Value>
      <Value id="13" operation="1">10</Value>
      <Value id="14" operation="1">12</Value>
      <Value id="14" operation="1">12</Value>
      <Value id="14" operation="1">12</Value>
      <Value id="15" operation="1">14</Value>
      <Value id="15" operation="1">14</Value>
      <Value id="15" operation="1">14</Value>
      <Value id="16" operation="1">16</Value>
      <Value id="16" operation="1">16</Value>
      <Value id="16" operation="1">16</Value>
    </Inputs>
    <Inputs>
      <Attr>RodDiameter</Attr>
      <Value id="50" operation="1">1</Value>
      <Value id="129" operation="1">1-3/8</Value>
      <Value id="129" operation="1">1-3/8</Value>
      <Value id="131" operation="1">1-3/4</Value>
      <Value/>
      <Value id="131" operation="1">1-3/4</Value>
      <Value id="6" operation="1">2</Value>
      <Value/>
      <Value id="6" operation="1">2</Value>
      <Value id="133" operation="1">2-1/2</Value>
      <Value/>
      <Value id="133" operation="1">2-1/2</Value>
      <Value id="7" operation="1">3</Value>
      <Value/>
      <Value id="133" operation="1">2-1/2</Value>
      <Value id="7" operation="1">3</Value>
      <Value/>
      <Value id="133" operation="1">2-1/2</Value>
      <Value id="7" operation="1">3</Value>
      <Value/>
      <Value id="7" operation="1">3</Value>
      <Value id="135" operation="1">3-1/2</Value>
      <Value/>
      <Value id="7" operation="1">3</Value>
      <Value id="139" operation="1">4-1/4</Value>
      <Value/>
      <Value id="135" operation="1">3-1/2</Value>
      <Value id="137" operation="1">5-3/4</Value>
      <Value/>
      <Value id="135" operation="1">3-1/2</Value>
      <Value id="137" operation="1">5-3/4</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="115" operation="1">S</Value>
    </Outputs>
  </Table>
  <Table name="SealingCat" getall="false">
    <Inputs>
      <Attr>PistonSeals</Attr>
      <Value id="116" operation="1">Chevron</Value>
      <Value id="117" operation="1">Polypack style</Value>
      <Value id="118" operation="1">PTFE (Teflon)</Value>
      <Value id="119" operation="1">U-cup</Value>
      <Value id="120" operation="1">Bi-directional with energizer</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="114" operation="1">C</Value>
      <Value id="126" operation="1">P</Value>
      <Value id="165" operation="1">T</Value>
      <Value id="166" operation="1">U</Value>
      <Value id="164" operation="1">E</Value>
      <Value id="49" operation="1">X</Value>
    </Outputs>
  </Table>
  <Table name="SealingSystem" getall="false">
    <Inputs/>
    <Outputs/>
  </Table>
  <Table name="StrokeFractionCat" getall="false">
    <Inputs>
      <Attr>CylinderStrokeFraction</Attr>
      <Value id="59" operation="1">0</Value>
      <Value id="147" operation="1">0.0625</Value>
      <Value id="148" operation="1">0.125</Value>
      <Value id="149" operation="1">0.1875</Value>
      <Value id="150" operation="1">0.25</Value>
      <Value id="151" operation="1">0.3125</Value>
      <Value id="152" operation="1">0.375</Value>
      <Value id="153" operation="1">0.4375</Value>
      <Value id="154" operation="1">0.5</Value>
      <Value id="155" operation="1">0.5625</Value>
      <Value id="156" operation="1">0.625</Value>
      <Value id="157" operation="1">0.6875</Value>
      <Value id="158" operation="1">0.75</Value>
      <Value id="159" operation="1">0.8125</Value>
      <Value id="160" operation="1">0.875</Value>
      <Value id="161" operation="1">0.9375</Value>
      <Value/>
    </Inputs>
    <Outputs>
      <Attr>Code</Attr>
      <Value id="59" operation="1">0</Value>
      <Value id="50" operation="1">1</Value>
      <Value id="6" operation="1">2</Value>
      <Value id="7" operation="1">3</Value>
      <Value id="8" operation="1">4</Value>
      <Value id="9" operation="1">5</Value>
      <Value id="10" operation="1">6</Value>
      <Value id="11" operation="1">7</Value>
      <Value id="12" operation="1">8</Value>
      <Value id="140" operation="1">9</Value>
      <Value id="162" operation="1">A</Value>
      <Value id="47" operation="1">B</Value>
      <Value id="114" operation="1">C</Value>
      <Value id="163" operation="1">D</Value>
      <Value id="164" operation="1">E</Value>
      <Value id="45" operation="1">F</Value>
      <Value id="59" operation="1">0</Value>
    </Outputs>
  </Table>
  <Scripting>
    <Python>from math import *
from xml import *</Python>
    <Javascript>function getFractionalPart(strValue)&#13;
{&#13;
    var retval = 0.0;&#13;
&#13;
    //find the . or /&#13;
    var dotStart = strValue.toString().indexOf(".");&#13;
    var slashStart = strValue.toString().indexOf("/");&#13;
    if (dotStart &gt;= 0)&#13;
    {&#13;
        var floatVal = parseFloat(strValue.toString());&#13;
        var intPart = parseInt(strValue.toString());&#13;
        //everything before the . is what we will subtract&#13;
        retval = floatVal - intPart;&#13;
    }&#13;
    else if (slashStart &gt;= 0)&#13;
    {&#13;
        //get the leading whitespace before the /&#13;
        var whitespace = 0;&#13;
        if (slashStart &gt; 0)&#13;
        {&#13;
            var findWhite = strValue.toString().indexOf(" ");&#13;
            whitespace = findWhite;&#13;
        }&#13;
        var fractPortion = strValue.toString().substr(whitespace);&#13;
        retval = eval(fractPortion);&#13;
    }&#13;
&#13;
    return retval.toString();&#13;
}&#13;
&#13;
function getIntegerPart(strValue)&#13;
{&#13;
    var slashStart = strValue.toString().indexOf("/");&#13;
    if (slashStart &gt;= 0)&#13;
    {&#13;
        //get the leading whitespace before the /&#13;
        var whitespace = 0;&#13;
        if (slashStart &gt; 0)&#13;
        {&#13;
            var findWhite = strValue.toString().indexOf(" ");&#13;
            whitespace = findWhite;&#13;
            strValue = strValue.toString().substr(0, whitespace + 1);&#13;
        }&#13;
    }&#13;
    var retval = parseInt(strValue.toString());&#13;
    return retval.toString();&#13;
}</Javascript>
  </Scripting>
</Tables>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer (Senior)
United States United States
I have extensive experience developing software on both Linux and Windows in C++ and Python. I have also done a lot of work in the C#/.NET ecosystem. I currently work in the fields of robotics and machine learning, and also have a strong background in business automation/rules engines.

Comments and Discussions