| 427 | } |
| 428 | |
| 429 | void DnCManager::initialDivide( SubQueries &subQueries ) |
| 430 | { |
| 431 | auto split = std::unique_ptr<PiecewiseLinearCaseSplit>( new PiecewiseLinearCaseSplit() ); |
| 432 | std::unique_ptr<QueryDivider> queryDivider = nullptr; |
| 433 | if ( _sncSplittingStrategy == SnCDivideStrategy::Polarity ) |
| 434 | { |
| 435 | queryDivider = std::unique_ptr<QueryDivider>( new PolarityBasedDivider( _baseEngine ) ); |
| 436 | } |
| 437 | else // Default is LargestInterval |
| 438 | { |
| 439 | const List<unsigned> inputVariables( _baseEngine->getInputVariables() ); |
| 440 | queryDivider = |
| 441 | std::unique_ptr<QueryDivider>( new LargestIntervalDivider( inputVariables ) ); |
| 442 | InputQuery *inputQuery = _baseEngine->getInputQuery(); |
| 443 | // Add bound as equations for each input variable |
| 444 | for ( const auto &variable : inputVariables ) |
| 445 | { |
| 446 | double lb = inputQuery->getLowerBounds()[variable]; |
| 447 | double ub = inputQuery->getUpperBounds()[variable]; |
| 448 | split->storeBoundTightening( Tightening( variable, lb, Tightening::LB ) ); |
| 449 | split->storeBoundTightening( Tightening( variable, ub, Tightening::UB ) ); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | unsigned initialDivides = Options::get()->getInt( Options::NUM_INITIAL_DIVIDES ); |
| 454 | unsigned initialTimeout = Options::get()->getInt( Options::INITIAL_TIMEOUT ); |
| 455 | |
| 456 | String queryId; |
| 457 | |
| 458 | // Create subqueries |
| 459 | queryDivider->createSubQueries( |
| 460 | pow( 2, initialDivides ), queryId, 0, *split, initialTimeout, subQueries ); |
| 461 | } |
| 462 | |
| 463 | void DnCManager::updateTimeoutReached( timespec startTime, |
| 464 | unsigned long long timeoutInMicroSeconds ) |
nothing calls this directly
no test coverage detected