parameters: (self, pids)
docstring: Calculates for each possible focus the target output of each planet and stores it in planet info
          It excludes baked planets from consideration.
          Note: The results will not be strictly correct if any planets have global effects
docstring_summary: Calculates for each possible focus the target output of each planet and stores it in planet info
          It excludes baked planets from consideration.
          Note: The results will not be strictly correct if any planets have global effects
docstring_tokens: Calculates for each possible focus the target output of each planet and stores it in planet info It excludes baked planets from consideration . Note : The results will not be strictly correct if any planets have global effects
function: def calculate_planet_infos(self, pids):
          """Calculates for each possible focus the target output of each planet and stores it in planet info
          It excludes baked planets from consideration.
          Note: The results will not be strictly correct if any planets have global effects
          """
          # TODO this function depends on the specific rule that off-focus meter value are always the minimum value
          universe = fo.getUniverse()
          unbaked_pids = [pid for pid in pids if pid not in self.baked_planet_info]
          planet_infos = [(pid, self.all_planet_info[pid], self.all_planet_info[pid].planet) for pid in unbaked_pids]
          for pid, pinfo, planet in planet_infos:
              if INDUSTRY in planet.availableFoci and planet.focus != INDUSTRY:
                  fo.issueChangeFocusOrder(pid, INDUSTRY)  # may not be able to take, but try
  
          universe.updateMeterEstimates(unbaked_pids)
          for pid, pinfo, planet in planet_infos:
              industry_target = planet.currentMeterValue(fo.meterType.targetIndustry)
              research_target = planet.currentMeterValue(fo.meterType.targetResearch)
              if planet.focus == INDUSTRY:
                  pinfo.possible_output[INDUSTRY] = (industry_target, research_target)
                  pinfo.possible_output[GROWTH] = research_target
              else:
                  pinfo.possible_output[INDUSTRY] = (0, 0)
                  pinfo.possible_output[GROWTH] = 0
              if RESEARCH in planet.availableFoci and planet.focus != RESEARCH:
                  fo.issueChangeFocusOrder(pid, RESEARCH)  # may not be able to take, but try
  
          universe.updateMeterEstimates(unbaked_pids)
          for pid, pinfo, planet in planet_infos:
              industry_target = planet.currentMeterValue(fo.meterType.targetIndustry)
              research_target = planet.currentMeterValue(fo.meterType.targetResearch)
              if planet.focus == RESEARCH:
                  pinfo.possible_output[RESEARCH] = (industry_target, research_target)
                  pinfo.possible_output[GROWTH] = (industry_target, pinfo.possible_output[GROWTH])
              else:
                  pinfo.possible_output[RESEARCH] = (0, 0)
                  pinfo.possible_output[GROWTH] = (0, pinfo.possible_output[GROWTH])
              if pinfo.planet.availableFoci and pinfo.current_focus != planet.focus:
                  fo.issueChangeFocusOrder(pid, pinfo.current_focus)  # put it back to what it was
  
          universe.updateMeterEstimates(unbaked_pids)
          # Protection focus will give the same off-focus Industry and Research targets as Growth Focus
          for pid, pinfo, planet in planet_infos:
              pinfo.possible_output[PROTECTION] = pinfo.possible_output[GROWTH]
function_tokens: def calculate_planet_infos ( self , pids ) : # TODO this function depends on the specific rule that off-focus meter value are always the minimum value universe = fo . getUniverse ( ) unbaked_pids = [ pid for pid in pids if pid not in self . baked_planet_info ] planet_infos = [ ( pid , self . all_planet_info [ pid ] , self . all_planet_info [ pid ] . planet ) for pid in unbaked_pids ] for pid , pinfo , planet in planet_infos : if INDUSTRY in planet . availableFoci and planet . focus != INDUSTRY : fo . issueChangeFocusOrder ( pid , INDUSTRY ) # may not be able to take, but try universe . updateMeterEstimates ( unbaked_pids ) for pid , pinfo , planet in planet_infos : industry_target = planet . currentMeterValue ( fo . meterType . targetIndustry ) research_target = planet . currentMeterValue ( fo . meterType . targetResearch ) if planet . focus == INDUSTRY : pinfo . possible_output [ INDUSTRY ] = ( industry_target , research_target ) pinfo . possible_output [ GROWTH ] = research_target else : pinfo . possible_output [ INDUSTRY ] = ( 0 , 0 ) pinfo . possible_output [ GROWTH ] = 0 if RESEARCH in planet . availableFoci and planet . focus != RESEARCH : fo . issueChangeFocusOrder ( pid , RESEARCH ) # may not be able to take, but try universe . updateMeterEstimates ( unbaked_pids ) for pid , pinfo , planet in planet_infos : industry_target = planet . currentMeterValue ( fo . meterType . targetIndustry ) research_target = planet . currentMeterValue ( fo . meterType . targetResearch ) if planet . focus == RESEARCH : pinfo . possible_output [ RESEARCH ] = ( industry_target , research_target ) pinfo . possible_output [ GROWTH ] = ( industry_target , pinfo . possible_output [ GROWTH ] ) else : pinfo . possible_output [ RESEARCH ] = ( 0 , 0 ) pinfo . possible_output [ GROWTH ] = ( 0 , pinfo . possible_output [ GROWTH ] ) if pinfo . planet . availableFoci and pinfo . current_focus != planet . focus : fo . issueChangeFocusOrder ( pid , pinfo . current_focus ) # put it back to what it was universe . updateMeterEstimates ( unbaked_pids ) # Protection focus will give the same off-focus Industry and Research targets as Growth Focus for pid , pinfo , planet in planet_infos : pinfo . possible_output [ PROTECTION ] = pinfo . possible_output [ GROWTH ]