MCPcopy Create free account
hub / github.com/NeuralNetworkVerification/Marabou / restoreState

Method restoreState

src/engine/Engine.cpp:1845–1877  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1843}
1844
1845void Engine::restoreState( const EngineState &state )
1846{
1847 ENGINE_LOG( "Restore state starting" );
1848
1849 if ( state._tableauStateStorageLevel == TableauStateStorageLevel::STORE_NONE )
1850 throw MarabouError( MarabouError::RESTORING_ENGINE_FROM_INVALID_STATE );
1851
1852 ENGINE_LOG( "\tRestoring tableau state" );
1853 _tableau->restoreState( state._tableauState, state._tableauStateStorageLevel );
1854
1855 ENGINE_LOG( "\tRestoring constraint states" );
1856 for ( auto &constraint : _plConstraints )
1857 {
1858 if ( !state._plConstraintToState.exists( constraint ) )
1859 throw MarabouError( MarabouError::MISSING_PL_CONSTRAINT_STATE );
1860
1861 constraint->restoreState( state._plConstraintToState[constraint] );
1862 }
1863
1864 _numPlConstraintsDisabledByValidSplits = state._numPlConstraintsDisabledByValidSplits;
1865
1866 if ( _lpSolverType == LPSolverType::NATIVE )
1867 {
1868 // Make sure the data structures are initialized to the correct size
1869 _rowBoundTightener->setDimensions();
1870 adjustWorkMemorySize();
1871 _activeEntryStrategy->resizeHook( _tableau );
1872 _costFunctionManager->initialize();
1873 }
1874
1875 // Reset the violation counts in the SMT core
1876 _smtCore.resetSplitConditions();
1877}
1878
1879void Engine::setNumPlConstraintsDisabledByValidSplits( unsigned numConstraints )
1880{

Callers 4

popSplitMethod · 0.45
restorePrecisionMethod · 0.45

Calls 6

MarabouErrorClass · 0.85
resetSplitConditionsMethod · 0.80
existsMethod · 0.45
setDimensionsMethod · 0.45
resizeHookMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected