diff --git a/MCFCplex/MCFCplex.C b/MCFCplex/MCFCplex.C index 15d43b4..1013e3f 100755 --- a/MCFCplex/MCFCplex.C +++ b/MCFCplex/MCFCplex.C @@ -1285,13 +1285,14 @@ void MCFCplex::ChangeArc( cIndex name , cIndex nSN , cIndex nEN ) { int temp = int( name ); int sn , en; - if( ( nSN == Inf() ) || ( nEN == Inf() ) ) - if( net ) - CPXNETgetarcnodes( env , net , &sn , &en , temp , temp ); - else { + if( ( nSN == Inf() ) || ( nEN == Inf() ) ) { + if( net ) { + CPXNETgetarcnodes( env, net, &sn, &en, temp, temp ); + } else { sn = Startn[ name ]; en = Endn[ name ]; - } + } + } if( nSN < Inf() ) sn = int( nSN MINUSONE ); diff --git a/MCFCplex/MCFCplex.h b/MCFCplex/MCFCplex.h index 993f070..cc2d493 100755 --- a/MCFCplex/MCFCplex.h +++ b/MCFCplex/MCFCplex.h @@ -42,7 +42,7 @@ #include "MCFClass.h" -#include "cplex.h" +#include /*--------------------------------------------------------------------------*/ /*------------------------------- MACROS -----------------------------------*/ diff --git a/RelaxIV/RelaxIV.C b/RelaxIV/RelaxIV.C index 0bce0e1..ac8d159 100755 --- a/RelaxIV/RelaxIV.C +++ b/RelaxIV/RelaxIV.C @@ -932,17 +932,19 @@ void RelaxIV::SolveMCF( void ) if( ETZ( RC[ arc ] , EpsCst ) ) { Index t2 = Endn[ arc ]; if( ! mark[ t2 ] ) // t2 is not labeled - if( GTZ( X[ arc ] , EpsFlw ) ) { - if( LTZ( Dfct[ t2 ] , EpsDfct ) ) + { + if( GTZ( X[ arc ], EpsFlw ) ) { + if( LTZ( Dfct[ t2 ], EpsDfct ) ) save[ naugnod++ ] = t2; Prdcsr[ t2 ] = arc; label[ nlabel++ ] = t2; mark[ t2 ] = true; delx += X[ arc ]; - } - else + } else { Prdcsr[ t2 ] = 0; + } + } prvarc = arc; arc = tnxtou[ arc ]; @@ -966,17 +968,19 @@ void RelaxIV::SolveMCF( void ) if( ETZ( RC[ arc ] , EpsCst ) ) { Index t2 = Startn[ arc ]; if( ! mark[ t2 ] ) // t2 is not labeled - if( GTZ( U[ arc ] , EpsFlw ) ) { - if( LTZ( Dfct[ t2 ] , EpsDfct ) ) + { + if( GTZ( U[ arc ], EpsFlw ) ) { + if( LTZ( Dfct[ t2 ], EpsDfct ) ) save[ naugnod++ ] = t2; Prdcsr[ t2 ] = -arc; label[ nlabel++ ] = t2; mark[ t2 ] = true; delx += U[ arc ]; - } - else + } else { Prdcsr[ t2 ] = 0; + } + } prvarc = arc; arc = tnxtin[ arc ]; @@ -1001,17 +1005,19 @@ void RelaxIV::SolveMCF( void ) if( ETZ( RC[ arc ] , EpsCst ) ) { Index t2 = Startn[ arc ]; if( ! mark[ t2 ] ) // t2 is not labelled - if( GTZ( X[ arc ] , EpsFlw ) ) { - if( GTZ( Dfct[ t2 ] , EpsDfct ) ) + { + if( GTZ( X[ arc ], EpsFlw ) ) { + if( GTZ( Dfct[ t2 ], EpsDfct ) ) save[ naugnod++ ] = t2; Prdcsr[ t2 ] = arc; label[ nlabel++ ] = t2; mark[ t2 ] = true; delx += X[ arc ]; - } - else + } else { Prdcsr[ t2 ] = 0; + } + } prvarc = arc; arc = tnxtin[ arc ]; @@ -1035,17 +1041,19 @@ void RelaxIV::SolveMCF( void ) if( ETZ( RC[ arc ] , EpsCst ) ) { Index t2 = Endn[ arc ]; if( ! mark[ t2 ] ) // t2 is not albelled - if( GTZ( U[ arc ] , EpsFlw ) ) { - if( GTZ( Dfct[ t2 ] , EpsDfct ) ) + { + if( GTZ( U[ arc ], EpsFlw ) ) { + if( GTZ( Dfct[ t2 ], EpsDfct ) ) save[ naugnod++ ] = t2; Prdcsr[ t2 ] = -arc; label[ nlabel++ ] = t2; mark[ t2 ] = true; delx += U[ arc ]; - } - else + } else { Prdcsr[ t2 ] = 0; + } + } prvarc = arc; arc = tnxtou[ arc ]; @@ -2148,13 +2156,15 @@ MCFClass::Index RelaxIV::AddArc( cIndex Start , cIndex End , cFNumber aU , arc = ffp; } - if( ! arc ) - if( m < mmax ) + if( ! arc ) { + if( m < mmax ) { arc = ++m; - else - return( Inf() ); + } else { + return ( Inf< Index >() ); + } + } - // insert new arc in position arc - - - - - - - - - - - - - - - - - - - - - + // insert new arc in position arc - - - - - - - - - - - - - - - - - - - - - C[ arc ] = aC; Cap[ arc ] = aU; @@ -2310,7 +2320,7 @@ inline void RelaxIV::init_standard( void ) Index_Set tFIn = FIn + n; for( tDfct = Dfct + n , tDDPos = DDPos + n , tDDNeg = DDNeg + n ; tDfct > Dfct ; tDfct-- , tDDPos-- , tDDNeg-- , tFOu-- , tFIn-- ) - if( ! ETZ( *tDfct , EpsDfct ) ) + if( ! ETZ( *tDfct , EpsDfct ) ) { if( LEZ( *tDDPos , EpsDfct ) ) { // compute delprc, the stepsize to the next breakpoint in the dual cost // as the price of node is increased: since the reduced cost of all @@ -2365,7 +2375,7 @@ inline void RelaxIV::init_standard( void ) break; } // end for( ever ) } - else + else { if( LEZ( *tDDNeg , EpsDfct ) ) { // Compute delprc, the stepsize to the next breakpoint in the dual cost // as the price of node is decreased. Since the reduced cost of all @@ -2420,7 +2430,8 @@ inline void RelaxIV::init_standard( void ) break; } // end for( ever ) } - + } + } } // end( for( npass ) ) } // end( init_standard ) diff --git a/SPTree/SPTree.C b/SPTree/SPTree.C index 82aef01..90e6086 100755 --- a/SPTree/SPTree.C +++ b/SPTree/SPTree.C @@ -368,12 +368,14 @@ void SPTree::LoadNet( cIndex nmx , cIndex mmx , cIndex pn , cIndex pm , if( di > 0 ) DstBse[ NDsts++ ] = i; else - if( di < 0 ) - if( Origin < InINF ) - throw( MCFException( "SPTree::LoadNet: more than one source in pDfct" ) ); - else + if( di < 0 ) { + if( Origin < InINF ) { + throw ( MCFException( "SPTree::LoadNet: more than one source in pDfct" ) ); + } else { Origin = i; - } + } + } + } if( Origin == InINF ) throw( MCFException( "SPTree::LoadNet: no sources in pDfct" ) ); diff --git a/extlib/makefile-libCPLEX b/extlib/makefile-libCPLEX index 16b18e1..b43bb75 100644 --- a/extlib/makefile-libCPLEX +++ b/extlib/makefile-libCPLEX @@ -39,6 +39,6 @@ libCPLEXINCDIR = $(libCPLEXBSCDIR)lib/x86-64_osx/static_pic/ # macroes to be exported- - - - - - - - - - - - - - - - - - - - - - - - - - - libCPLEXLIB = -L$(libCPLEXINCDIR) -lilocplex -lcplex $(libCPLEXEXTLIB) -libCPLEXINC = -I$(libCPLEXBSCDIR)include/ilcplex/ +libCPLEXINC = -I$(libCPLEXBSCDIR)include/ ############################# End of makefile ################################