@@ -980,6 +980,8 @@ OsiSolverInterface::OsiSolverInterface()
980980 , appDataEtc_(NULL )
981981 , ws_(NULL )
982982 , cgraph_(NULL )
983+ , cgraphBuildTime_(0.0 )
984+ , cgraphDensity_(0.0 )
983985{
984986 setInitialData ();
985987}
@@ -1036,6 +1038,8 @@ void OsiSolverInterface::setInitialData()
10361038 delete cgraph_;
10371039 cgraph_ = NULL ;
10381040 }
1041+ cgraphBuildTime_ = 0.0 ;
1042+ cgraphDensity_ = 0.0 ;
10391043}
10401044
10411045// -------------------------------------------------------------------
@@ -1082,6 +1086,8 @@ OsiSolverInterface::OsiSolverInterface(const OsiSolverInterface &rhs)
10821086 } else {
10831087 cgraph_ = NULL ;
10841088 }
1089+ cgraphBuildTime_ = rhs.cgraphBuildTime_ ;
1090+ cgraphDensity_ = rhs.cgraphDensity_ ;
10851091}
10861092
10871093// -------------------------------------------------------------------
@@ -1173,6 +1179,8 @@ OsiSolverInterface::operator=(const OsiSolverInterface &rhs)
11731179 } else {
11741180 cgraph_ = NULL ;
11751181 }
1182+ cgraphBuildTime_ = rhs.cgraphBuildTime_ ;
1183+ cgraphDensity_ = rhs.cgraphDensity_ ;
11761184 }
11771185 return *this ;
11781186}
@@ -3520,9 +3528,11 @@ void OsiSolverInterface::checkCGraph(CoinMessageHandler *msgh)
35203528 primalTolerance, infinity, getColNames (),
35213529 getRowNames ());
35223530 timeCG = CoinCpuTime ()-timeCG;
3531+ cgraphBuildTime_ = timeCG;
3532+ cgraphDensity_ = cgraph_->density ();
35233533
35243534 if (msgh && msgh->logLevel ())
3525- msgh->message (COIN_CGRAPH_INFO, messages ()) << timeCG << cgraph_-> density () *100.0 << ((timeCG>1.0 ) ? " !!" : " " ) << CoinMessageEol;
3535+ msgh->message (COIN_CGRAPH_INFO, messages ()) << timeCG << cgraphDensity_ *100.0 << ((timeCG>1.0 ) ? " !!" : " " ) << CoinMessageEol;
35263536}
35273537/* Modify model to deal with indicators.
35283538 startBigM are values in input.
0 commit comments