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

Method computeBasicOOBCosts

src/engine/CostFunctionManager.cpp:264–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264void CostFunctionManager::computeBasicOOBCosts()
265{
266 unsigned variable;
267 double assignment, lb, relaxedLb, ub, relaxedUb;
268 for ( unsigned i = 0; i < _m; ++i )
269 {
270 variable = _tableau->basicIndexToVariable( i );
271 assignment = _tableau->getBasicAssignment( i );
272
273 lb = _tableau->getLowerBound( variable );
274 relaxedLb = lb - ( GlobalConfiguration::BASIC_COSTS_ADDITIVE_TOLERANCE +
275 GlobalConfiguration::BASIC_COSTS_MULTIPLICATIVE_TOLERANCE *
276 FloatUtils::abs( lb ) );
277
278 if ( assignment < relaxedLb )
279 {
280 _basicCosts[i] = -1;
281 continue;
282 }
283
284 ub = _tableau->getUpperBound( variable );
285 relaxedUb = ub + ( GlobalConfiguration::BASIC_COSTS_ADDITIVE_TOLERANCE +
286 GlobalConfiguration::BASIC_COSTS_MULTIPLICATIVE_TOLERANCE *
287 FloatUtils::abs( ub ) );
288
289 if ( assignment > relaxedUb )
290 {
291 _basicCosts[i] = 1;
292 continue;
293 }
294
295 _basicCosts[i] = 0;
296 }
297}
298
299void CostFunctionManager::computeMultipliers()
300{

Callers

nothing calls this directly

Calls 5

absFunction · 0.85
basicIndexToVariableMethod · 0.45
getBasicAssignmentMethod · 0.45
getLowerBoundMethod · 0.45
getUpperBoundMethod · 0.45

Tested by

no test coverage detected