X - UWSpace - University of Waterloo
X - UWSpace - University of Waterloo
X - UWSpace - University of Waterloo
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Appendiv C C codes <strong>of</strong> WATPAR<br />
We present the simplified C source codes for the parallel decomposition solver WATPAR for<br />
each subproblem <strong>of</strong> 4 part cases. The fint subproblem gives more detailed explanaiion than<br />
the other 3 subproblems since the othen are very sirnilar except handling prima1 or dud<br />
information and updating the subproblems. Rocessors 1 to 4 solves lower-lower bound<br />
subproblem. upper-upper bound subproblem. lower-upper bound subproblem, and upper-<br />
lower bound subproblem respectively.<br />
C.1 Processor 1 : Lower-Lower Bound Subproblem<br />
tinclude <br />
rinclude cstdlib.h><br />
*include <br />
izt ab-subs, cur-block = 1;<br />
i ~ s irez-count = 1, lev2,ccunc=O;<br />
double :al = 0.0001;<br />
..... DEF1.W GLCW VARIABLES AND ALLOCATE MFMORIZS .....<br />
double mysecands(doub1e acrtlit) ,* The measuremenc fnction *!<br />
<<br />
double Idt;<br />
gettime<strong>of</strong>day(~itv2. (sc,ruct tbezone*)O);<br />
Idt=idoubie) (tv7.t~-sec - cv~.tv~sec)~~000000+t~2~t~~usec - tv1.t~-usec;<br />
actzm = acumc + ldt ;<br />
retu,-n (acumt) ;<br />
double CcmpuPiS(LpSubProb "LpSub) /* Compute PiB CO secd ' 1<br />
E int i, j ;<br />
IpSub[~r~blockl->Pi = 0.050;