120 for (i = 0; i <
n; i++) {
123 if (
r < percentLowerOnly) {
125 xlow [i] = (
Drand(ix)-0.5)*3.0;
129 else if (
r < percentLowerOnly+percentUpperOnly) {
133 xupp [i] = (
Drand(ix)-0.5)*3.0;
135 else if (
r < percentLowerOnly+percentUpperOnly+percentBound) {
137 xlow [i] = (
Drand(ix)-0.5)*3.0;
139 xupp [i] = xlow[i]+
Drand(ix)*10.0;
150 for (i = 0; i <
n; i++) {
151 if (ixlow[i] == 0.0 && ixupp[i] == 0.0 ) {
153 x [i] = 20.0*
Drand(ix)-10.0;
156 else if (ixlow[i] != 0.0 && ixupp[i] != 0.0) {
162 dualx[i] = 10.0*
Drand(ix);
164 else if (
r > .66 ) {
167 dualx[i] = -10.0*
Drand(ix);
172 x [i] = (1-theta)*xlow[i]+theta*xupp[i];
176 else if (ixlow[i] != 0.0) {
178 if (
Drand(ix) < .33 ) {
181 dualx[i] = 10.0*
Drand(ix);
185 x [i] = xlow[i]+0.005+10.0*
Drand(ix);
190 if (
Drand(ix) > .66 ) {
193 dualx[i] = -10.0*
Drand(ix);
197 x [i] = xupp[i]-0.005-10.0*
Drand(ix);
static void RandomlyChooseBoundedVariables(TVectorD &x, TVectorD &dualx, TVectorD &blx, TVectorD &ixlow, TVectorD &bux, TVectorD &ixupp, Double_t &ix, Double_t percentLowerOnly, Double_t percentUpperOnly, Double_t percentBound)
Randomly choose x and its boundaries.