A Linear Programming Problem in Python and CPLEX, led by Monte Carlo on the Web
摘要
A Linear Programming problem with random constraint matrix is studied in this paper leading to a statistical exploration of the values of the objective function. The elements of the constraint matrix are randomly generated with either a uniform distribution or a symmetric triangular distribution, always in 0–1. We offer a web page where the user can choose both the distribution and the values of various problem parameters and options, namely, a pure Python solver or the CPLEX solver. A brief analysis of the behavior of the optimum, Z, is done, with focus on the effects of the problem size and the distribution chosen. The results show a behavior akin to a Gaussian distribution at first sight, but with substantial differences, evidenced by the values of the essential statistical moments and by a finite, fixed lower bound. Suitable computer languages and solvers (PHP, Python, Fortran, CPLEX, ‘gnuplot’) are brought together. The proposal and use of a web page for this problem exemplifies, for the academia, for industry, and for their much praised connections, the potential of the Web for scientific computing, the user needing no software installation or especial machine power. This mode of computing, which we generally recommend, incurs no appreciable difficulty, as, on the Web or not, the executables are the same.