Evolving distr.s 3 distr.s
Solves many,
N, Linear Programming problems of the form
min∑j xj
(i.e., c = 1), subject to "≥ 1" (≥ RHS LBound)
with random constraint matrix (figures: example with 4 constraints and
5 variables; and negative and positive skewness).
Computation can be through: Python 'linprog';
CPLEX (from Fortran); and Gurobi (from Python).
For the (symmetric) triangular, it is:
x = √(r/2) for r ≤ ½, and
x = 1 − √[(1−r)/2], otherwise, from
F1 = 2x² and
F2 = −2x² + 4x − 1 .
*Excessive N leads to time out.
Languages used: PHP, for the web page;
Python for management and 'linprog'; Fortran 90 to call CPLEX;
and 'gnuplot', for plotting.
Draws plot of: frequency of the objective function
values; and a Gaussian with same mean and standard deviation.
Computation structure — A PHP file
(this page: 'P-LinProg.php') calls (via
'action=...') an intermediate PHP file ('LinProg.php'), which
(through $_POST) sends the problem data as command line arguments to a
Python script. This last does the computing, and makes 'subprocess' calls
to 'gnuplot', for the final (temporary) webpage.
Keywords: PHP, Python script, subprocess,
CPLEX, Gurobi, gnuplot. |