| 120 | */ |
| 121 | |
| 122 | void sample( CBiteRnd& rnd, double* const op ) const |
| 123 | { |
| 124 | // Generate vector, check its feasibility, and resample it up to 10 |
| 125 | // times. |
| 126 | |
| 127 | int infcount = 0; |
| 128 | int i; |
| 129 | |
| 130 | while( true ) |
| 131 | { |
| 132 | Ort.sample( rnd, op ); |
| 133 | |
| 134 | if( isFeasible( op )) |
| 135 | { |
| 136 | break; |
| 137 | } |
| 138 | |
| 139 | infcount++; |
| 140 | |
| 141 | if( infcount == 10 ) |
| 142 | { |
| 143 | // Force bound constraints. |
| 144 | |
| 145 | for( i = 0; i < ParamCount; i++ ) |
| 146 | { |
| 147 | op[ i ] = wrapParamReal( rnd, op[ i ], i ); |
| 148 | } |
| 149 | |
| 150 | break; |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Function performs the parameter optimization iteration that involves 1 |
nothing calls this directly
no outgoing calls
no test coverage detected