Posts

Showing posts with the label opl

Simple container fitting checker for a fridge in Psion OPL

I have finally uploaded my nice OPL program that I used with the fridge mentioned. It can be found at my scripts , in the repo! Direct link: >> fridge.opl << It might happen that some more small programs of mine will follow.

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 p...