Aid in choosing plastic food containers

I did some experimenting with my handheld computer, the Psion 5MX clone. I wrote a pretty neatly structured program in OPL, that would assist me at shopping. You see I was in a need for some containers that could efficiently fit in our fridge. I made measurements as a hole, and on a shelf basis, and input that as (factored out) constants. The structure of this console application is as follows, almost literally.

The program runs in a loop until interrupted (by nonsense input). The loop first asks for the dimensions of the container in question, then outputs the computed efficiencies for each shelf. The efficiency for a shelf is the maximum of possible packing efficiencies for the shelf. Possible packing methods include a simple fixed set of orientations and some combinations.

This is an almost trivial solution that gives a practically perfect approximation to the three dimensional packing problem with real world constrains (all container boxes facing up, etc.). The most difficult part was creating and maintaining a consistent programming style and elegant solution for this decade old Basic-like language.

I am pleased with the result, as I've successfully found 6 containers with 3 liters each that give a 80%+ filling for more than one shelf.

Code upload to follow shortly.

update 1: http://bkil.blogspot.com/2008/10/simple-container-fitting-checker-for.html

Comments

Popular posts from this blog

Hidden TFTP of TP-Link routers

Tftp secret of TL-WR740N uncovered

When both Google *and* AppStatus is down