TESTBVLS.. Test driver for BVLS, Bounded Variables Least Squares. If the algorithm succeeds the solution vector, X(), and the dual vector, W(), should be related as follows: X(i) not at a bound => W(i) = 0 X(i) at its lower bound => W(i) .le. 0 X(i) at its upper bound => W(i) .ge. 0 except that if an upper bound and lower bound are equal then the corresponding X(i) must take that value and W(i) may have any value. Case No. 1 M = 2, N = 2, UNBND = 0.10000E+07 Bounds = 1.0000 3.0000 2.0000 4.0000 A(,) = 0.96592 0.36739 0.74793 0.48064 B() = 0.99756 0.56682 After BVLS: No. of components not at constraints = 0 Solution vector, X() = 1.0000 3.0000 R = B - A*X Computed by the driver: -1.0705 -1.6230 RNORM2 computed by the driver = 1.9443 RNORM computed by BVLS = 1.9443 W = (A**T)*R Computed by the driver: -2.2479 -1.1734 Dual vector from BVLS, W() = -2.2479 -1.1734 Case No. 2 M = 2, N = 4, UNBND = 0.10000E+07 Bounds = 0.0000 0.0000 0.0000 0.0000 10.000 10.000 10.000 10.000 A(,) = 0.34708 0.21795 0.90052 0.44548 0.34224 0.13316 0.38677 0.66193 B() = 0.73754E-01 0.53552E-02 After BVLS: No. of components not at constraints = 1 Solution vector, X() = 0.0000 0.0000 0.71303E-01 0.0000 R = B - A*X Computed by the driver: 0.95443E-02 -0.22222E-01 RNORM2 computed by the driver = 0.24185E-01 RNORM computed by BVLS = 0.24185E-01 W = (A**T)*R Computed by the driver: -0.42928E-02 -0.87894E-03 0.25299E-07 -0.10458E-01 Dual vector from BVLS, W() = -0.42928E-02 -0.87895E-03 0.0000 -0.10458E-01 Case No. 3 M = 4, N = 2, UNBND = 0.10000E+07 Bounds = 0.0000 -100.00 100.00 100.00 A(,) = 0.85569 0.59840 0.40129 0.67298 0.20687 0.45688 0.96854 0.33002 B() = 0.16108E-01 0.65085 0.64641 0.32299 After BVLS: No. of components not at constraints = 1 Solution vector, X() = 0.0000 0.75274 R = B - A*X Computed by the driver: -0.43433 0.14427 0.30249 0.74570E-01 RNORM2 computed by the driver = 0.55365 RNORM computed by BVLS = 0.55365 W = (A**T)*R Computed by the driver: -0.17896 0.23968E-06 Dual vector from BVLS, W() = -0.17896 0.0000 Case No. 4 M = 5, N = 10, UNBND = 0.10000E+07 Bounds = 0.0000 -0.39940 -1.0000 -0.30000 21.000 0.0000 -0.39940 1.0000 -0.20000 22.000 -4.0000 45.000 100.00 -0.34028E+39 -1.0000 -3.0000 46.000 101.00 0.34028E+39 1.0000 A(,) = 0.65823 0.25680 0.90192 0.14784 0.61437 0.15072 0.55087 0.65792 0.67453 0.82062 0.61231 0.65905 0.72886 0.76961 0.94709 0.97866 0.55401 0.40246 0.33932 0.73113 0.99914 0.97776 0.92863 0.11582 0.49760 0.37480 0.74631 0.94685 0.48038 0.88588 0.42151 0.95376 0.70618 0.59769 0.30381 0.55290 0.93275E-01 0.81381 0.13753 0.66966 0.99792 0.73402 0.55859 0.58740 0.66494 0.99039 0.75176 0.61706E-01 0.51997 0.50368 B() = 0.10038 0.75545 0.60569 0.71905 0.89733 After BVLS: No. of components not at constraints = 1 Solution vector, X() = 0.0000 -0.39940 -1.0000 -0.30000 21.000 -3.0000 46.000 100.00 -196.03 -1.0000 R = B - A*X Computed by the driver: -44.589 -11.155 -74.443 15.272 56.454 RNORM2 computed by the driver = 105.24 RNORM computed by BVLS = 105.24 W = (A**T)*R Computed by the driver: -5.2619 -2.9975 -43.242 -59.688 -67.795 8.5782 2.7904 -98.664 0.50439E-04 -54.151 Dual vector from BVLS, W() = 0.0000 0.0000 -43.242 -59.688 -67.795 8.5781 2.7904 -98.664 0.0000 -54.151 Case No. 5 M = 10, N = 5, UNBND = 0.10000E+07 Bounds = 0.0000 -1.0000 0.0000 0.30000 0.48000E-01 1.0000 0.0000 1.0000 0.40000 0.49000E-01 A(,) = 0.11424 0.20837 0.83978 0.66548 0.93770 0.31846 0.56700 0.67849 0.73074 0.45610 0.59682 0.24312E-01 0.58195 0.41060 0.80849 0.48153E-01 0.42029 0.73353 0.35572 0.90885 0.11421 0.39785 0.11604 0.73538 0.69488 0.21596 0.97659 0.84030 0.47132 0.21949 0.10057 0.69261 0.83500 0.46263 0.85495 0.73342E-01 0.49433E-02 0.74654 0.75969 0.74440 0.24686 0.12992 0.84320 0.70246 0.30111 0.44338 0.46777E-01 0.52884 0.25797 0.67197 B() = 0.26158 0.76559E-01 0.10125 0.54927 0.37558 0.15149E-01 0.79292 0.62088 0.77360 0.95358 After BVLS: No. of components not at constraints = 2 Solution vector, X() = 0.0000 -0.35279 0.52160 0.30000 0.49000E-01 R = B - A*X Computed by the driver: -0.34854 -0.31888 -0.35651 0.16368 0.20075 -0.23077 0.42104 -0.31153E-01 0.15413 0.58393 RNORM2 computed by the driver = 1.0068 RNORM computed by BVLS = 1.0068 W = (A**T)*R Computed by the driver: -0.36161E-01 -0.92044E-07 -0.21477E-06 -0.84239E-01 0.25268 Dual vector from BVLS, W() = -0.36161E-01 0.0000 0.0000 -0.84239E-01 0.25268 Case No. 6 M = 6, N = 4, UNBND = 999.00 Bounds = -100.00 -0.34028E+39 -0.34028E+39 -0.34028E+39 100.00 0.34028E+39 0.34028E+39 0.34028E+39 A(,) = 0.93094 0.35686 0.19992 0.84582 0.54653 0.66568 0.41543 0.70903 0.46551 0.61855 0.97930 0.52897 0.17691 0.46895 0.54321 0.66384 0.37799 0.31625 0.12952 0.90074 0.17522 0.26888 0.80474 0.94116 B() = 0.61871 0.96757 0.99024 0.33801 0.92077 0.33907 After BVLS: No. of components not at constraints = 4 Solution vector, X() = 0.22413 1.2499 -0.18969 0.17349 R = B - A*X Computed by the driver: -0.14479 -0.31145E-01 0.20678 -0.29990 0.30907 -0.46896E-01 RNORM2 computed by the driver = 0.50235 RNORM computed by BVLS = 0.50235 W = (A**T)*R Computed by the driver: 0.32615E-06 0.35880E-06 0.38722E-06 0.44422E-06 Dual vector from BVLS, W() = 0.0000 0.0000 0.0000 0.0000