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 plots of: (i) frequency
of the objective function values, and a "shadow" Gaussian with
same mean and standard deviation; and (ii) distribution of
aij.
Computation structure — A PHP file
(this page: 'P-tLinProg.php') calls (via
'action=...') an intermediate PHP file ('TLinProg.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. |
• (Wikipedia) PHP (from Personal Home Page)
• Python scipy.optimize.linprog, accessed 31-May-2024.
• icSoftComp2024,
6.th International Conference on Soft Computing and its
Engineering Applications, Bangkok (Thailand), 10–12 Dec 2024.
• 1879-03-14: Einstein, Albert
(†1955-04-18, 76 yrs.). |