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

Method addAuxiliaryVariables

src/engine/Engine.cpp:1306–1330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1304}
1305
1306void Engine::addAuxiliaryVariables()
1307{
1308 List<Equation> &equations( _preprocessedQuery->getEquations() );
1309
1310 unsigned m = equations.size();
1311 unsigned originalN = _preprocessedQuery->getNumberOfVariables();
1312 unsigned n = originalN + m;
1313
1314 _preprocessedQuery->setNumberOfVariables( n );
1315
1316 // Add auxiliary variables to the equations and set their bounds
1317 unsigned count = 0;
1318 for ( auto &eq : equations )
1319 {
1320 unsigned auxVar = originalN + count;
1321 if ( _produceUNSATProofs )
1322 _preprocessedQuery->_lastAddendToAux.insert( eq._addends.back()._variable, auxVar );
1323 eq.addAddend( -1, auxVar );
1324 _preprocessedQuery->setLowerBound( auxVar, eq._scalar );
1325 _preprocessedQuery->setUpperBound( auxVar, eq._scalar );
1326 eq.setScalar( 0 );
1327
1328 ++count;
1329 }
1330}
1331
1332void Engine::augmentInitialBasisIfNeeded( List<unsigned> &initialBasis,
1333 const List<unsigned> &basicRows )

Callers

nothing calls this directly

Calls 9

getEquationsMethod · 0.80
setNumberOfVariablesMethod · 0.80
sizeMethod · 0.45
getNumberOfVariablesMethod · 0.45
insertMethod · 0.45
addAddendMethod · 0.45
setLowerBoundMethod · 0.45
setUpperBoundMethod · 0.45
setScalarMethod · 0.45

Tested by

no test coverage detected