- Correzioni varie per compatibilità con lettura file JSON di configurazione
- In GetBestStrategy si fa copia della tabella che prima era passata come riferimento
This commit is contained in:
+23
-8
@@ -550,13 +550,28 @@ local function GetStrategiesFromGlobalList( Proc)
|
||||
-- cerco tra le feature
|
||||
for i = 1, #STRATEGIES.FeatureList do
|
||||
-- se trovo la feature
|
||||
if Proc.nPrc == STRATEGIES.FeatureList[i].nPrc and Proc.nGrp == STRATEGIES.FeatureList[i].nGrp then
|
||||
-- cerco tra le topologie
|
||||
for j = 1, #STRATEGIES.FeatureList[i].TopologyList do
|
||||
-- se trovo la topologia
|
||||
if Proc.Topology.sName == STRATEGIES.FeatureList[i].TopologyList[j].sName then
|
||||
-- ritorno le strategie disponibili per la feature che sto analizzando
|
||||
return STRATEGIES.FeatureList[i].TopologyList[j].StrategyList
|
||||
if Proc.nPrc == STRATEGIES.FeatureList[i].nPrc then
|
||||
local bGroupIsCompatible = false
|
||||
-- nel JSON il gruppo è sempre 0/1, mente da BTL possono arrivare altri valori.
|
||||
if STRATEGIES.FeatureList[i].nGrp == 0 then
|
||||
if Proc.nGrp == 0 or Proc.nGrp == 3 or Proc.nGrp == 4 then
|
||||
bGroupIsCompatible = true
|
||||
end
|
||||
elseif STRATEGIES.FeatureList[i].nGrp == 1 then
|
||||
if Proc.nGrp == 1 or Proc.nGrp == 2 then
|
||||
bGroupIsCompatible = true
|
||||
end
|
||||
end
|
||||
|
||||
-- si controlla gruppo
|
||||
if bGroupIsCompatible then
|
||||
-- cerco tra le topologie
|
||||
for j = 1, #STRATEGIES.FeatureList[i].TopologyList do
|
||||
-- se trovo la topologia
|
||||
if Proc.Topology.sName == STRATEGIES.FeatureList[i].TopologyList[j].sName then
|
||||
-- ritorno le strategie disponibili per la feature che sto analizzando
|
||||
return STRATEGIES.FeatureList[i].TopologyList[j].StrategyList
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -916,7 +931,7 @@ local function GetBestStrategy( vProcSingleRot)
|
||||
-- salvo sulla proc la migliore strategia
|
||||
end
|
||||
if nIndexBestStrategy ~= 0 then
|
||||
Proc.ChosenStrategy = Proc.AvailableStrategies[nIndexBestStrategy]
|
||||
Proc.ChosenStrategy = BeamLib.TableCopyDeep( Proc.AvailableStrategies[nIndexBestStrategy])
|
||||
Proc.nIndexBestStrategy = nIndexBestStrategy
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user