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

Method createMILPEncoding

src/nlr/MILPFormulator.cpp:592–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592void MILPFormulator::createMILPEncoding( const Map<unsigned, Layer *> &layers,
593 GurobiWrapper &gurobi,
594 unsigned lastLayer )
595{
596 // First, create the LP relaxation of the problem
597 _lpFormulator.createLPRelaxation( layers, gurobi, lastLayer );
598
599 // Now, add the MILP constraints
600 for ( const auto &layer : layers )
601 {
602 if ( layer.second->getLayerIndex() > lastLayer )
603 continue;
604
605 addLayerToModel( gurobi, layer.second, _layerOwner );
606 }
607}
608
609void MILPFormulator::addLayerToModel( GurobiWrapper &gurobi,
610 const Layer *layer,

Calls 2

createLPRelaxationMethod · 0.80
getLayerIndexMethod · 0.45

Tested by

no test coverage detected