¡Bienvenido al Depósito de programas de la Cátedra Alcatel!

En este depósito encontrará Vd una serie de programas para operaciones diversas, siempre relacionadas con las Operaciones, y que han sido desarrollados a lo largo de los últimos 10 años para proyectos distintos. La característica común es que tratan con aspectos computacionales de las Operaciones. En su gran mayoría están escritos en Delphi ObjectPascal y tratan de obtener la máxima eficiencia en el proceso. Algunos de ellos requieren rutinas propietarias, que no podrán ponerse en este depósito en forma de fuentes. En estos casos pondremos sólo el ejecutable. El autor puede proporcionar detalles sobre los requerimientos externos necesarios para construir los fuentes.

La sofisticación de los programas es muy desigual, y el autor no se responsabiliza de la calidad de los mismos. Sin embargo, se considera que prestan más servicio a la comunidad si están en el dominio público que almacenados en mi ordenador.

La documentación de muchos de los programas es escasa y de mala calidad. Si tengo el tiempo necesario, trataré de documentar mejor lo que se cuelgue en este repositorio, pero no prometo nada. Por supuesto declino toda responsabilidad por mal uso o uso indebido de estos programas, y por cualquier resultado perjudicial que resulte del uso de los mismos

Un índice tentativo del repositorio es

a) Programas básicos. Algunos programas para realizar operaciones comunes, como por ejemplo mantener estructuras de datos, o imprimir

b) Algoritmos de Optimización. Incluso alguno de ellos en Fortran

c) Simulaciones. Eso, simulaciones

d) Cálculos relacionados con fenómenos de colas e interferencia

e) Otros

For details, see below in the english section

In this repository, you will find a collection of computer programs for a variety of purposes. All purposes are related to the Operations. They have been developed during the last ten year, for a variety of projects and applications. The common characteristic is dealing with computational aspects of problems in Operations. Most of them are written in Delphi Object Pascal, and try to squeeze the maximum efficiency of the computational process. Some require proprietary routines. Obviously, in those cases we can not provide those routines and you will find here only the executables. The author, on demand, will provide hints on how to compile and link the programs

Program sophistication is very uneven. The author declines all responsibilities for the quality of the code. It works, or at least it did work at the time of last usage. However, you know that programs degrade when staying in a computer (:-)). Therefore I have no great expectations about the working of some of them, although I have checked most of them before putting them here.

Documentation is short and scrappy. When (and if) I have the time, I will try to document better the programs. In the meanwhile, let me say that I am not responsible for any misuse of the programs, or for the results, good or bad, that it produces.

An index of the repository is as follows

a) Basic programs

Definitions.pas A bunch of declarations useful for most of the routines in the repository. Some of them are nowadays readily available in standard unit math, which should be preferred

Listener.pas and Listener.dfm. Creates a window and uses it to emulate the system window. You can quickly write in it, by using the object ListenerBase and methods similar to the standard Pascal write and writeln, plus some nice add ons like writelogf, that allows for pascal formatting. See the code.

Distribs.pas Samples form a number of basic distributions: Normal, Exponential, LogNormal, Poisson, and more.

DistribFunctions.pas Computes a number of functions associated with the normal and lognormal distributions, mainly truncated expectations

Correlator.pas Samples a multivariate distribution with specified marginals and correlation matrix. Uses an approximate method, which seems to be quite good

Cmplx64.pas and Cmplx80.pas Two modules to perform basic calculations with complex numbers. The first is the real version and the second the extended precision version. The original ones are by Serghei Gaivan , and I got then from http://gaivan.hypermart.net several years ago. I have updated them to work in infix notation, using Delphi2006 'class operator'. Also, real numbers appearing in complex expressions are automatically converted to complex

b) Optimization: (all Delphi types have been unified to those in the file ap.pas)

AugmentedLagrangian.pas Inspired on an old (35 years old) book by Pierre & Lowe (Mathematical Programming Via Augmented Lagrangians Addisson-Wesley 1975). We have completely revamped the original algorithm to make it good, although not state of the art, since it is not very fast.. Written in Object Pascal for Delphi2006, making use of objects and using sparse matrix techniques, it still preserves some of the old fortran procedures to compute the lagangian (obviously translated to Delphi) . The characteristics of the new code are

a) Individual lagrangian maximization is handled by lbfgs, which deals automatically with bounds using an active set strategy.

b) Stores the constant components of the gradient, both objective function's and constraint's, in a sparse structure

c) Uses a variation of the flow logic in Lancelot`s Auglg (Conn & Gould & Toint, Lancelot a Fortran Package for Large Scale Nonlinear Optimization, Springer 1992) to control the outer optimization.

d) Many frills and laces (numerical differentiation, checking gradients, and so on)

e) Extended or double precision versions, just by conditional recompilation in Delphi2006

The user should provide the gradients of the nonlinear functions involved, either analytically or numerically. It works pretty well for (my) problems with less than 300 variables and 100 non-linear constraints (but smooth and somewhat convex). It may have the potential for large scale optimization, but I have not tested it. Obviously, its performance depends very much of the structure of the problem. Sometimes, small problems give big problems! I have added a small word file on how to use the routines, giving an exemple of usage. If you want more, I am afraid you'll have to read the code. With my thanks to many generations of students that worked on the code, through progressive translations and adaptations.

Note. To my knowledge, it is the only code in Pascal doing General-Constrained-NLP. Mostly useful as an add-in package, whenever you need some sort of optimization in your programs (a sort of "solver").

Lbfgsb In Pascal for delphi, tested in version Delphi2006. Solves smooth nonlinear problems with bounds. Adding bounds to an unconstrained NLP adds a lot of usability. In addition, this code uses a modification of Lbfgs with limited storage for the approximated Hessian matrix. This makes it suitable for large problems. I got this from NEOS, November 1994. (Latest revision June 1996.) Optimization Technology Center.Argonne National Laboratory and Northwestern University. Written by Ciyou Zhu in collaboration with R.H. Byrd, P. Lu-Chen and J. Nocedal Contributors: Sergey Bochkanov (ALGLIB project). Translation from FORTRAN to pseudocode. The authors say:
"This software is freely available, but we expect that all publications describing work using this software, or all commercial products using it, quote at least one of the references given below:
* R. H. Byrd, P. Lu and J. Nocedal. A Limited Memory Algorithm for Bound Constrained Optimization, (1995), SIAM Journal on Scientific and Statistical Computing , 16, 5, pp. 1190-1208.
* C. Zhu, R.H. Byrd and J. Nocedal. L-BFGS-B: Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained optimization (1997), ACM Transactions on Mathematical Software, Vol 23, Num. 4, pp. 550 - 560"

I made a few changes to make it compatible with the AugmentedLagrangian. The main change is in the code used to represent bounded variables. See the description of the array MBS in the module Lbfgsb. I tested it, and it works. You can easily imbed it into your own code, provided you read carefully the section on observations (added by me).

c) Simulations

d) Queues and probabilistic phenomena

e) Other