| 1505 | */ |
| 1506 | |
| 1507 | void generateSol13( CBiteRnd& rnd ) |
| 1508 | { |
| 1509 | ptype* const Params = TmpParams; |
| 1510 | |
| 1511 | const CBitePop& ParPop = selectParPop( 7, rnd ); |
| 1512 | const int ParPopSize = ParPop.getCurPopSize(); |
| 1513 | |
| 1514 | const ptype* const rp1 = getParamsOrdered( |
| 1515 | rnd.getSqrInt( CurPopSize )); |
| 1516 | |
| 1517 | const int kc = 4; |
| 1518 | const ptype* rp2[ kc ]; |
| 1519 | const ptype* rp3[ kc ]; |
| 1520 | int i; |
| 1521 | |
| 1522 | for( i = 0; i < kc; i++ ) |
| 1523 | { |
| 1524 | rp2[ i ] = ParPop.getParamsOrdered( |
| 1525 | rnd.getLogInt( ParPopSize )); |
| 1526 | |
| 1527 | rp3[ i ] = ParPop.getParamsOrdered( ParPopSize - 1 - |
| 1528 | rnd.getLogInt( ParPopSize )); |
| 1529 | } |
| 1530 | |
| 1531 | for( i = 0; i < ParamCount; i++ ) |
| 1532 | { |
| 1533 | const int j = rnd.getInt( ParamCount ); |
| 1534 | const int k = rnd.getInt( kc ); |
| 1535 | |
| 1536 | Params[ i ] = (ptype) (( getRealValue( rp1, i ) + |
| 1537 | ( getRealValue( rp2[ k ], j ) - |
| 1538 | getRealValue( rp3[ k ], j )) * 0.5 - MinValues[ i ]) * |
| 1539 | DiffValuesI[ i ]); |
| 1540 | } |
| 1541 | } |
| 1542 | |
| 1543 | /** |
| 1544 | * Solution generator that obtains solution from an independently-running |
nothing calls this directly
no test coverage detected