EgtNumKernel :
- Aggiunta classe di calcolo per ottimizzazione ordine delle lavorazioni - Aggiunti vincoli obbligatori e dipendenze suggerite a ShortestPath.
This commit is contained in:
+42
-1
@@ -25,7 +25,7 @@ using namespace std ;
|
||||
IShortestPath*
|
||||
CreateShortestPath( void)
|
||||
{
|
||||
return static_cast<IShortestPath*> ( new(nothrow) ShortestPath) ;
|
||||
return static_cast<IShortestPath*> ( new(nothrow) ShortestPath) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -45,6 +45,12 @@ ShortestPath::ShortestPath( void)
|
||||
m_Available = nullptr ;
|
||||
m_pMain = nullptr ;
|
||||
m_pDupl = nullptr ;
|
||||
m_pCheckDep = nullptr ;
|
||||
m_vOrderConstr.clear() ;
|
||||
m_vOrderSugg.clear() ;
|
||||
m_vOrderSuggRowMap.clear() ;
|
||||
m_nMaxDistSuggDep = 0 ;
|
||||
m_ExtDistMat.clear() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -62,6 +68,9 @@ ShortestPath::~ShortestPath( void)
|
||||
if ( m_pDupl != nullptr)
|
||||
delete m_pDupl ;
|
||||
m_pDupl = nullptr ;
|
||||
if ( m_pCheckDep != nullptr)
|
||||
delete m_pCheckDep ;
|
||||
m_pCheckDep = nullptr ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -235,3 +244,35 @@ ShortestPath::GetMinLength( double& dMinLen)
|
||||
dMinLen = ( double)m_nMinCost ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ShortestPath::SetDistMatrix( const INTMATRIX& mDistMatrix)
|
||||
{
|
||||
// Assegno la matrice suggerita
|
||||
m_ExtDistMat = mDistMatrix ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
/* Funzioni per _dubug_ */
|
||||
// ---------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
void
|
||||
ShortestPath::_printPath( NODE* pPath, string sFun)
|
||||
{
|
||||
#if ENABLE_DEBUG
|
||||
{
|
||||
LOG_INFO( GetENkLogger(), sFun.c_str()) ;
|
||||
NODE* pCurr = pPath ;
|
||||
string sText = "" ;
|
||||
for ( unsigned i = 0 ; i < m_nNumPnts ; ++ i) {
|
||||
sText += ( ( i == 0 ? "" : " - ") + ToString( pCurr->nPos)) ;
|
||||
pCurr = pCurr->pNext ;
|
||||
}
|
||||
LOG_INFO( GetENkLogger(), sText.c_str()) ;
|
||||
}
|
||||
#else
|
||||
return ;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user