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.
* Use advanced basis at each iteration */<br />
status = CPXsetintparam(env, CPX-PARAM-ADVIND, 1);<br />
if ( status 1 {<br />
fprintf (stderr, "Failed to scale.\nm);<br />
goto TERMINATE;<br />
/* For barrier method, use option 1 to solve subproblems */<br />
status = CPXsetintparam (env, CPX-PARAM-BARALG, Il ;<br />
if ( scatus {<br />
fprintf (scderr, "Failed to scale. \nm<br />
goto TERMINATE;<br />
1<br />
/* Create the problern- */<br />
Ip = CPXcreateprob (env, &scatus, "3-regionmi ;<br />
1<br />
if ( lp == NULL i I<br />
1 ;<br />
fprintf (stderr, 'Failed co create LP. \na<br />
goto TERMINATE;<br />
/* Now cûpy the probiem data into CPLEX */<br />
status=CPXcopylp (env,Ip, ( inc) LpSub [cur-block] ->n, ( int 1 LpSub [CU-blockl ->m,<br />
-l,objcoeffs, LpSub[cur-blockl->rhs,sençe,(int*) (LpSub[=ur-blockl-clpnts),<br />
maccnt, (inc*) LpSublcur~blockl-~rInnmbs,LpSub~cur~block]-~coeffs,<br />
LpSub[cur,blockj->la-bndç. LpSub[cur,block]->up-bnds, NaL) ;<br />
if ( status ) E<br />
fprintf (stderr, "Failed co copy problem data.\nm);<br />
goto TERMINATE;<br />
1<br />
/* Delete the first row because the original vector has always the objective<br />
function coefficients in row zero '/<br />
status = CPXdelrows (env, Ip, O, 0);<br />
if ( status i I<br />
I<br />
fprintf (stderr, "Failed CO delete row O\nW) ;<br />
goto TERMINATE;<br />
Add an artificial variable to each linking constraints */<br />
for (k=L; k 0)<br />
status = CPX.newcols(env, lp, (înt) LSPbmlkl, LpSubfkl->arti,obj, NWLL.<br />
NUU, NULL,<br />
NtJtLl:<br />
i<br />
for ( F=O; im-LOWSPb-m[cur,blockW; im-l;i++)<br />
stacus=CPXchgccef (ew, lp, (int) i, (=nt) (LpSub[cu,Slock] ->n) +<br />
LSPb~mI~~5lockl+i-LpS~~~~r~'olock~-~~+LOWSPb~m[~~block]l<br />
, arti-coef);<br />
1 ;