optimization programs in APL 
Author Message
 optimization programs in APL

Can anyone point me to some APL/APL2 functions/workspaces with
optimization routines, including linear programming (mixed integer),
heuristic, genetic algorithm, simulated annealing, etc.

How practical is it to use APL for moderate sized linear programming
problems?



Sun, 27 Jun 2004 12:36:50 GMT  
 optimization programs in APL

Quote:

> Can anyone point me to some APL/APL2 functions/workspaces with
> optimization routines, including linear programming (mixed integer),
> heuristic, genetic algorithm, simulated annealing, etc.

> How practical is it to use APL for moderate sized linear programming
> problems?

A great deal depends on what you mean by `moderate'. IME codes specifically
designed to handle particular classes of the various programming domains are
usually able to exploit special characteristics of the problems and provide for
`special methods' to a much grater degree than general purpose codes, particularly
those implemented in a language like APL.

You might want to give some metric that would indicate what you are thinking of
when you say `moderate'. You might also indicate the broad domain of your problem
as again IME `small' IP problems are often a lot more demanding computationally than
`large' LP problems, etc
...



Sun, 27 Jun 2004 13:08:32 GMT  
 optimization programs in APL

Quote:


> > Can anyone point me to some APL/APL2 functions/workspaces with
> > optimization routines, including linear programming (mixed integer),
> > heuristic, genetic algorithm, simulated annealing, etc.

> > How practical is it to use APL for moderate sized linear programming
> > problems?

> A great deal depends on what you mean by `moderate'. IME codes specifically
> designed to handle particular classes of the various programming domains are
> usually able to exploit special characteristics of the problems and provide for
> `special methods' to a much grater degree than general purpose codes, particularly
> those implemented in a language like APL.

> You might want to give some metric that would indicate what you are thinking of
> when you say `moderate'. You might also indicate the broad domain of your problem
> as again IME `small' IP problems are often a lot more demanding computationally than
> `large' LP problems, etc
> ...

Many, many years ago, when I was a young and upcoming APLer (and my
beard was still black, not grey) I rewrote the (in)famous Honey
Blending System for Reckitt & Colman Foods.  The system ran on the IP
Sharp time-sharing service and was based around their 43 LINPROG
workspace.
The system was designed to be used by factory production staff to
produce two batches of blended honey, one clear and runny, the other
crystalline and set, from various stocks of raw honey which came from
a number of suppliers around the world.  There were, iirc, about ten
or twelve parameters which had to be optimized, with different
optimization values for each of the two blends. In addition, there
were upper and lower constraints for some but not all of these
parameters. Two further restrictions were the requirement to use the
oldest stocks first and to produce the blend at minimal cost, even if
this produced a sub-optimal result.

The way the problem was set up it had 24 or 26 optimizations, plus
about 120 constraints.

As a final twist, instead of using the exact proportions which
resulted from the LP solution, the result had to be rounded so that
each batch consisted of an exact number of full drums from each of the
source stocks. Again, iirc, this meant rounding the proportions to the
nearest 5% of the total.

The system also included a stock control and management system, so
that when running a blend, the factory staff simply had to enter the
stock number(s) of what supplies they had available rather than
entering all the parameters each time.

The system was used on a weekly basis by the honey production
department for several years, until R & C got rid of APL in the late
1980's.

I believe that the original version of this system was written up in
one of the early APL conference proceedings, about 1980.

John Warden
(aka Henry Crun, an ancient Goon and APLer)



Sun, 27 Jun 2004 18:04:18 GMT  
 optimization programs in APL

Quote:
> The way the problem was set up it had 24 or 26 optimizations, plus
> about 120 constraints.

These days, that would be considered a "very small" problem.  Common
expectations with products like CPLEX are to be able to cope with
hundreds of thousands of variables and tens of thousands of
constraints.  Expressing that in APL is liable to make for some memory
blowups :-(.

If there are parts of problems that are network flows, they have very
special structure that allows special representations and special
algorithms (e.g. - network simplex method) that take minscule
fractions of the memory an LP matrix would consume.
--

http://www.ntlug.org/~cbbrowne/or.html
If all the economists in the world were laid end to end, it would
probably be a good thing.



Sun, 27 Jun 2004 22:28:04 GMT  
 optimization programs in APL

Quote:

>Many, many years ago, when I was a young and upcoming APLer (and my
>beard was still black, not grey) I rewrote the (in)famous Honey
>Blending System for Reckitt & Colman Foods.

(snip)

Quote:
>The way the problem was set up it had 24 or 26 optimizations, plus
>about 120 constraints.

(snip)

Wow, that's what I call a sticky problem !

(Which I was lucky to escape as APL specialist sw house ADM posted me
elsewhere at the last minute...)
Regards,
Martin



Tue, 29 Jun 2004 09:56:37 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. APL runtime optimizations?

2. APL optimization routine

3. I-APL, Vanguard APL, and APL.68000

4. interactive program optimization for a pure declarative language

5. Functional program optimizations

6. Optimization Contest (TSR-program)

7. New and improved Programming Optimization Page!!

8. Optimization Contest (TSR-program)

9. Book on low level program optimization

10. Fortran optimization program

11. optimization changes program flow

12. Looking books on program optimization

 

 
Powered by phpBB® Forum Software