<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - jerryvig</title>
<link>http://snipplr.com/users/jerryvig/tags/minimization</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Mon, 20 May 2013 07:29:01 GMT</pubDate>
<item>
<title>(PHP) Print Output of USPS Box Cost Minimization</title>
<link>http://snipplr.com/view/42099/print-output-of-usps-box-cost-minimization/</link>
<description><![CDATA[ <p>This is a formatted HTML output of the code for my cost minimization algo for USPS flat rate boxes. Marisolio.com</p> ]]></description>
<pubDate>Tue, 12 Oct 2010 10:32:28 GMT</pubDate>
<guid>http://snipplr.com/view/42099/print-output-of-usps-box-cost-minimization/</guid>
</item>
<item>
<title>(PHP) Cost Minimization Algorithm for USPS Flat Rate Boxes</title>
<link>http://snipplr.com/view/41981/cost-minimization-algorithm-for-usps-flat-rate-boxes/</link>
<description><![CDATA[ <p>I have a client who ships fluids in USPS flat rate boxes. If you are unfamiliar with USPS flat rate boxes, they are boxes of a certain volume that ship regardless of weight. Anything that fits in the box, ships for one low price. My client uses two box sizes: the medium flat rate boxes, and the large flat rate boxes. Additionally, my client ships their fluids in the three bottle sizes: 200ml, 375ml, and 750ml. Moreover, due to the shape of the bottles only a certain number of bottles can fit in each box, and due to their shape the cost minimization cannot be detemined using the volume of each box and the bottle volumes. Thus, there are different arrangements of the bottles in each box which can work. For example, a medium box can hold 3 200ml and 2 375ml bottles or it can hold 4 200 ml bottles and 1 375ml bottle, and there are many other possible arrangements depending on the number of each size bottle. The table below, which I will call the allowed_configurations table lists the possible arrangements of each bottle in each size of box. Also, the large box costs $14.50 and the medium box costs $10.70 to ship.\r\n\r\nFor example, the first row in the table says 5,0,0 and indicates that the medium box can hold 5 200 ml bottles, and no other bottles. Using the table of the arrangements above, find an algorithm for computing the optimal arrangement with respect to the shipping cost for shipping a set of x 200ml bottles, y 375 ml bottles, and z 750 ml bottles. Your algorithm should not only compute the minimal cost but it should return the optimal arrangment of bottles among the different size boxes. I would be particularly interested in seeing your algorithm expressed in SQL, but solutions in a procedural language such as Java, PHP, or C will definitely be useful also.</p> ]]></description>
<pubDate>Sun, 10 Oct 2010 14:05:07 GMT</pubDate>
<guid>http://snipplr.com/view/41981/cost-minimization-algorithm-for-usps-flat-rate-boxes/</guid>
</item>
</channel>
</rss>