- Modifica a strategie per nuovo standard parametri custom
- Funzione apposita per calcolo 'CompletionIndex' - Modifica valori di ritorno delle strategie. BOOL + TABLE - Versione primordiale funzione OrderFeature - Aggiornamento finale lavorazioni
This commit is contained in:
+25
-12
@@ -228,16 +228,38 @@ function FeatureData.GetDrillingData( Proc)
|
||||
return dDiam, dLen, nFcs, nFce
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- funzione che restituisce indice di completamento in base alla percentuale di volume lavorato
|
||||
function FeatureData.GetFeatureCompletionIndex( dCompletionPercentage)
|
||||
-- indice di completamento
|
||||
local dCompletionIndex = 0
|
||||
|
||||
-- nullo
|
||||
if dCompletionPercentage < 5 then
|
||||
dCompletionIndex = 0
|
||||
-- Low
|
||||
elseif dCompletionPercentage < 50 then
|
||||
dCompletionIndex = 1
|
||||
-- Medium
|
||||
elseif dCompletionPercentage < 80 then
|
||||
dCompletionIndex = 2
|
||||
-- High / Complete
|
||||
else
|
||||
dCompletionIndex = 5
|
||||
end
|
||||
|
||||
return dCompletionIndex
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
-- funzione che restituisce rating feature in base al numero di lavorazioni, tipo di utensili e indice di completamento
|
||||
-- TODO feature da sistemare
|
||||
function FeatureData.GetFeatureRating( sTypeTools, dCompletionPercentage)
|
||||
function FeatureData.GetFeatureRating( sTypeTools, dCompletionIndex)
|
||||
local dRating = 5
|
||||
local dCompletionIndex = 0
|
||||
local TypeTools = EgtSplitString( sTypeTools)
|
||||
|
||||
-- se non è stato fatto nulla, esco subito
|
||||
if dCompletionPercentage == 0 then
|
||||
if dCompletionIndex == 0 then
|
||||
return 0
|
||||
end
|
||||
|
||||
@@ -254,15 +276,6 @@ function FeatureData.GetFeatureRating( sTypeTools, dCompletionPercentage)
|
||||
end
|
||||
end
|
||||
|
||||
-- indice di completamento
|
||||
if dCompletionPercentage < 50 then
|
||||
dCompletionIndex = 1
|
||||
elseif dCompletionPercentage < 80 then
|
||||
dCompletionIndex = 2
|
||||
else
|
||||
dCompletionIndex = 5
|
||||
end
|
||||
|
||||
dRating = dRating + dCompletionIndex
|
||||
return dRating
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user