mcpField
E
electronics-supply-chain

electronics-supply-chain

github.com/kishorkukreja其他8483 次安装3 周前更新
代码仓库

关于 electronics-supply-chain

面向电子制造与半导体运营团队的供应链管理技能,提供从元器件采购、分配和交期到 SMT 装配、呆滞库存及新品导入的分析框架。内容还涵盖供应风险、生命周期管理和报告结构。

主要功能

  1. 01梳理制造模式与供应链结构
  2. 02管理元器件采购、分配和交期
  3. 03规划 SMT 产线平衡
  4. 04识别呆滞库存与生命周期风险
  5. 05评估供应短缺及中断应对方案
  6. 06生成供应链风险与绩效报告

适用场景

  1. 01分析关键元器件短缺与分配状态
  2. 02规划采购、替代来源和缓冲库存
  3. 03评估过剩及停产元器件库存
  4. 04跟踪新品导入和供应链风险

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/kishorkukreja/awesome-supply-chain --skill electronics-supply-chain

安装后在 Claude Code 中输入/electronics-supply-chain确认已加载。

详细介绍

电子供应链

你是电子制造供应链管理和半导体运营方面的专家。你的目标是帮助优化复杂的全球供应网络、管理元器件采购和分配、实施高效的装配运营,并应对电子制造中的独特挑战。

初步评估

在优化电子供应链之前,请先了解:

  1. 制造模式

    • OEM、ODM、EMS 还是内部制造?
    • 产品类型?(消费电子、工业、汽车、医疗)
    • 生产量?(大批量、中批量、原型)
    • 制造方式?(按库存生产、按订单生产、按配置生产)
    • 处于价值链的哪个环节?(元器件、模块、成品)
  2. 元器件概况

    • 对半导体的依赖程度?(IC、处理器、内存、模拟器件)
    • 无源元器件用量?(电阻器、电容器、连接器)
    • 长交期元器件?(FPGA、定制 ASIC、显示屏)
    • 元器件是单一来源还是多来源?
    • 分配状态?(开放市场、受配额限制、关键配额)
  3. 供应链结构

    • 地理布局?(以亚洲为主、多元化、近岸布局)
    • 有多少层级的供应商和合同制造商(CM)?
    • 直接采购还是通过分销商采购?
    • 寄售模式还是全包模式?
    • 是否有 VMI(供应商管理库存)计划?
  4. 当前挑战

    • 元器件供应和配额问题?
    • 交期波动?
    • 过剩与呆滞(E&O)库存?
    • 产品生命周期管理?
    • 降本目标?

电子供应链框架

价值链结构

电子制造生态系统:

Raw Materials (Silicon, Metals, Plastics)
  ↓
Component Manufacturers (Semiconductors, Passives, Connectors)
  ↓
Distributors / Brokers
  ↓
EMS/ODM (Contract Manufacturers)
  ↓
OEM (Brand Owners)
  ↓
Distribution / Retail
  ↓
End Customers

各层级的主要参与者:

  • 元器件制造商:Intel、Samsung、TSMC、TI、Analog Devices、Infineon
  • 分销商:Arrow、Avnet、Digi-Key、Mouser、Future Electronics
  • EMS/ODM:Foxconn、Flex、Jabil、Pegatron、Wistron、Quanta
  • OEM:Apple、Dell、HP、Cisco、Huawei、Lenovo

元器件采购与配额管理

配额策略
import pandas as pd
import numpy as np
from datetime import datetime, timedelta

class ComponentAllocationManager:
    """
    Manage component allocation in constrained supply environment
    """

    def __init__(self, components_df):
        """
        Initialize allocation manager

        Parameters:
        - components_df: component data with lead times, allocation status
        """
        self.components = components_df
        self.allocation_tiers = {
            'strategic': 1,
            'preferred': 2,
            'standard': 3,
            'new': 4
        }

    def assess_allocation_risk(self, bom_df, production_plan):
        """
        Assess component allocation risk for production plan

        Parameters:
        - bom_df: Bill of Materials
        - production_plan: planned production volumes by period

        Returns:
        - risk assessment by component
        """

        risk_assessment = []

        for idx, component in bom_df.iterrows():
            part_number = component['part_number']
            qty_per_unit = component['quantity_per_unit']

            # Get component details
            comp_info = self.components[
                self.components['part_number'] == part_number
            ].iloc[0] if len(self.components[
                self.components['part_number'] == part_number
            ]) > 0 else None

            if comp_info is None:
                continue

            # Calculate requirements
            total_requirement = production_plan['units'].sum() * qty_per_unit

            # Allocation status
            allocation_status = comp_info.get('allocation_status', 'open')
            lead_time_weeks = comp_info.get('lead_time_weeks', 12)
            available_inventory = comp_info.get('available_inventory', 0)
            allocated_qty = comp_info.get('allocated_qty', 0)

            # Calculate risk score
            risk_score = self._calculate_risk_score(
                allocation_status,
                lead_time_weeks,
                total_requirement,
                available_inventory + allocated_qty
            )

            risk_assessment.append({
                'part_number': part_number,
                'description': comp_info.get('description', ''),
                'manufacturer': comp_info.get('manufacturer', ''),
                'total_requirement': total_requirement,
                'available_inventory': available_inventory,
                'allocated_qty': allocated_qty,
                'shortfall': max(0, total_requirement - available_inventory - allocated_qty),
                'allocation_status': allocation_status,
                'lead_time_weeks': lead_time_weeks,
                'risk_score': risk_score,
                'risk_category': self._categorize_risk(risk_score)
            })

        return pd.DataFrame(risk_assessment).sort_values('risk_score', ascending=False)

    def _calculate_risk_score(self, allocation_status, lead_time, requirement, supply):
        """Calculate component risk score (0-100)"""

        # Allocation multiplier
        allocation_multiplier = {
            'open': 1.0,
            'watch': 2.0,
            'allocated': 4.0,
            'critical': 8.0,
            'unobtainable': 10.0
        }.get(allocation_status, 1.0)

        # Lead time factor (longer = higher risk)
        lt_factor = min(lead_time / 52, 2.0)  # Cap at 2x

        # Supply coverage (weeks)
        coverage = (supply / requirement) if requirement > 0 else 999
        coverage_factor = max(0, 2 - coverage)  # Higher if coverage < 2x

        risk_score = (allocation_multiplier * 20 +
                     lt_factor * 20 +
                     coverage_factor * 30)

        return min(100, risk_score)

    def _categorize_risk(self, risk_score):
        """Categorize risk level"""
        if risk_score >= 70:
            return 'critical'
        elif risk_score >= 50:
            return 'high'
        elif risk_score >= 30:
            return 'medium'
        else:
            return 'low'

    def optimize_allocation_strategy(self, risk_assessment, supplier_relationships):
        """
        Generate allocation strategy recommendations

        Parameters:
        - risk_assessment: output from assess_allocation_risk
        - supplier_relationships: customer tier with suppliers

        Returns:
        - recommended actions by component
        """

        recommendations = []

        critical_parts = risk_assessment[risk_assessment['risk_category'] == 'critical']

        for idx, part in critical_parts.iterrows():
            actions = []

            # Determine customer tier
            customer_tier = supplier_relationships.get(
                part['manufacturer'], 'standard'
            )

            # Strategy based on risk and relationship
            if part['allocation_status'] == 'critical':
                actions.append('escalate_to_executive_level')
                actions.append('request_emergency_allocation')
                actions.append('explore_authorized_distributors')

            if part['lead_time_weeks'] > 26:
                actions.append('increase_forecast_horizon')
                actions.append('commit_to_longer_term_contract')

            if part['shortfall'] > 0:
                actions.append('identify_alternative_components')
                actions.append('engage_design_engineering_for_redesign')
                actions.append('search_broker_market')

            if customer_tier == 'new':
                actions.append('establish_strategic_relationship')
                actions.append('increase_volumes_to_gain_priority')

            recommendations.append({
                'part_number': part['part_number'],
                'manufacturer': part['manufacturer'],
                'risk_category': part['risk_category'],
                'customer_tier': customer_tier,
                'recommended_actions': actions,
                'priority': 'immediate' if part['risk_score'] > 80 else 'urgent'
            })

        return pd.DataFrame(recommendations)


# Example usage
components_data = pd.DataFrame({
    'part_number': ['IC_001', 'IC_002', 'CAP_001', 'RES_001'],
    'description': ['MCU STM32', 'Power IC', 'MLCC 10uF', 'Resistor 10K'],
    'manufacturer': ['STMicro', 'TI', 'Murata', 'Yageo'],
    'allocation_status': ['allocated', 'critical', 'open', 'open'],
    'lead_time_weeks': [32, 52, 8, 4],
    'available_inventory': [5000, 0, 100000, 500000],
    'allocated_qty': [10000, 5000, 0, 0]
})

bom = pd.DataFrame({
    'part_number': ['IC_001', 'IC_002', 'CAP_001', 'RES_001'],
    'quantity_per_unit': [1, 1, 12, 45]
})

production_plan = pd.DataFrame({
    'month': ['2025-02', '2025-03', '2025-04'],
    'units': [10000, 12000, 15000]
})

manager = ComponentAllocationManager(components_data)
risk_assessment = manager.assess_allocation_risk(bom, production_plan)

print("Component Risk Assessment:")
print(risk_assessment[['part_number', 'allocation_status', 'shortfall',
                       'risk_score', 'risk_category']])

PCB 装配优化

SMT 产线平衡
class SMTLineOptimizer:
    """
    Optimize Surface Mount Technology (SMT) line operations
    """

    def __init__(self, line_config):
        """
        Initialize SMT line optimizer

        Parameters:
        - line_config: SMT line configuration (machines, feeders, speed)
        """
        self.line_config = line_config

    def calculate_line_capacity(self, board_config):
        """
        Calculate SMT line capacity for given board

        Parameters:
        - board_config: PCB specifications and component placement

        Returns:
        - theoretical capacity (boards/hour)
        """

        # Component placement time
        num_components = board_config['component_count']
        avg_placement_time_sec = board_config.get('avg_placement_time', 0.3)

        # Machine parameters
        num_placement_heads = self.line_config.get('placement_heads', 8)
        machine_efficiency = self.line_config.get('efficiency', 0.85)

        # Calculate placement time per board
        placement_time = (num_components * avg_placement_time_sec) / num_placement_heads

        # Add process times
        screen_print_time = 15  # seconds
        reflow_time = 180  # seconds
        inspection_time = 30  # seconds
        board_handling_time = 10  # seconds

        total_cycle_time = (placement_time + screen_print_time +
                           reflow_time + inspection_time + board_handling_time)

        # Apply efficiency factor
        effective_cycle_time = total_cycle_time / machine_efficiency

        # Capacity (boards per hour)
        capacity_per_hour = 3600 / effective_cycle_time

        return {
            'capacity_boards_per_hour': capacity_per_hour,
            'cycle_time_seconds': effective_cycle_time,
            'placement_time': placement_time,
            'bottleneck': self._identify_bottleneck(
                placement_time, screen_print_time, reflow_time
            )
        }

    def _identify_bottleneck(self, placement_time, print_time, reflow_time):
        """Identify process bottleneck"""
        times = {
            'placement': placement_time,
            'screen_print': print_time,
            'reflow': reflow_time
        }
        return max(times, key=times.get)

    def optimize_feeder_setup(self, bom_df, feeder_slots=120):
        """
        Optimize feeder setup for component loading

        Parameters:
        - bom_df: Bill of Materials with component usage
        - feeder_slots: available feeder slots on machine

        Returns:
        - feeder assignment plan
        """

        # Sort components by usage frequency
        bom_sorted = bom_df.sort_values('quantity_per_board', ascending=False)

        # Assign to feeders (most used components get priority positions)
        feeder_assignments = []

        for idx, component in bom_sorted.iterrows():
            if idx < feeder_slots:
                # Optimal position: center positions for high-usage parts
                if idx < 20:
                    position = 60 + (idx - 10)  # Center positions
                else:
                    position = idx

                feeder_assignments.append({
                    'part_number': component['part_number'],
                    'feeder_position': position,
                    'quantity_per_board': component['quantity_per_board'],
                    'priority': 'high' if idx < 20 else 'medium'
                })
            else:
                # Bulk feeders or manual loading required
                feeder_assignments.append({
                    'part_number': component['part_number'],
                    'feeder_position': None,
                    'quantity_per_board': component['quantity_per_board'],
                    'priority': 'low',
                    'loading_method': 'manual_or_bulk'
                })

        return pd.DataFrame(feeder_assignments)

    def calculate_changeover_time(self, current_bom, next_bom, feeder_change_time=60):
        """
        Calculate line changeover time between products

        Parameters:
        - current_bom: current product BOM
        - next_bom: next product BOM
        - feeder_change_time: seconds per feeder change

        Returns:
        - estimated changeover time
        """

        # Components unique to each product
        current_parts = set(current_bom['part_number'])
        next_parts = set(next_bom['part_number'])

        # Components to remove and add
        parts_to_remove = current_parts - next_parts
        parts_to_add = next_parts - current_parts

        total_changes = len(parts_to_remove) + len(parts_to_add)

        # Changeover time
        feeder_changeover = total_changes * feeder_change_time
        program_change = 300  # 5 minutes for program change
        first_article_inspection = 600  # 10 minutes

        total_changeover = feeder_changeover + program_change + first_article_inspection

        return {
            'total_changeover_minutes': total_changeover / 60,
            'feeder_changes': total_changes,
            'parts_to_remove': len(parts_to_remove),
            'parts_to_add': len(parts_to_add),
            'common_parts': len(current_parts & next_parts)
        }


# Example
line_config = {
    'placement_heads': 8,
    'efficiency': 0.85,
    'feeder_slots': 120
}

board_config = {
    'component_count': 450,
    'avg_placement_time': 0.3,
    'board_size': '300x200mm'
}

optimizer = SMTLineOptimizer(line_config)
capacity = optimizer.calculate_line_capacity(board_config)

print(f"Line Capacity: {capacity['capacity_boards_per_hour']:.1f} boards/hour")
print(f"Cycle Time: {capacity['cycle_time_seconds']:.1f} seconds")
print(f"Bottleneck: {capacity['bottleneck']}")

交期管理

动态交期规划
class LeadTimeManager:
    """
    Manage component lead times and procurement planning
    """

    def __init__(self, components_df):
        self.components = components_df

    def calculate_procurement_dates(self, production_schedule, bom_df):
        """
        Calculate when to order components based on lead times

        Parameters:
        - production_schedule: planned production dates
        - bom_df: Bill of Materials with quantities

        Returns:
        - component order schedule
        """

        procurement_schedule = []

        for idx, production in production_schedule.iterrows():
            production_date = production['production_date']
            product_id = production['product_id']
            quantity = production['quantity']

            # Get BOM for this product
            product_bom = bom_df[bom_df['product_id'] == product_id]

            for _, component in product_bom.iterrows():
                part_number = component['part_number']
                qty_per_unit = component['quantity_per_unit']
                total_needed = quantity * qty_per_unit

                # Get component lead time
                comp_info = self.components[
                    self.components['part_number'] == part_number
                ].iloc[0]

                lead_time_weeks = comp_info['lead_time_weeks']
                safety_buffer_weeks = comp_info.get('safety_buffer_weeks', 2)

                # Calculate order date
                total_lead_time = timedelta(weeks=lead_time_weeks + safety_buffer_weeks)
                order_date = production_date - total_lead_time

                procurement_schedule.append({
                    'part_number': part_number,
                    'manufacturer': comp_info['manufacturer'],
                    'order_date': order_date,
                    'need_by_date': production_date,
                    'quantity': total_needed,
                    'lead_time_weeks': lead_time_weeks,
                    'production_order': product_id,
                    'days_until_order': (order_date - datetime.now()).days
                })

        return pd.DataFrame(procurement_schedule).sort_values('order_date')

    def simulate_lead_time_variability(self, component, order_quantity,
                                      num_simulations=1000):
        """
        Monte Carlo simulation of lead time variability

        Parameters:
        - component: component details with lead time distribution
        - order_quantity: quantity to order
        - num_simulations: number of Monte Carlo runs

        Returns:
        - lead time distribution and risk metrics
        """

        # Lead time distribution parameters
        lt_mean = component['lead_time_weeks']
        lt_std = component.get('lead_time_std', lt_mean * 0.2)

        # Simulate lead times
        simulated_lts = np.random.normal(lt_mean, lt_std, num_simulations)
        simulated_lts = np.maximum(simulated_lts, lt_mean * 0.5)  # Floor

        # Calculate percentiles
        p50 = np.percentile(simulated_lts, 50)
        p80 = np.percentile(simulated_lts, 80)
        p95 = np.percentile(simulated_lts, 95)

        return {
            'mean_lt_weeks': lt_mean,
            'p50_lt_weeks': p50,
            'p80_lt_weeks': p80,
            'p95_lt_weeks': p95,
            'recommended_buffer_weeks': p95 - lt_mean,
            'variability_coefficient': lt_std / lt_mean
        }


# Example
components_data = pd.DataFrame({
    'part_number': ['IC_001', 'IC_002'],
    'manufacturer': ['STMicro', 'TI'],
    'lead_time_weeks': [32, 52],
    'lead_time_std': [6, 12],
    'safety_buffer_weeks': [4, 8]
})

production_schedule = pd.DataFrame({
    'production_date': pd.to_datetime(['2025-06-01', '2025-07-01']),
    'product_id': ['PROD_A', 'PROD_A'],
    'quantity': [5000, 6000]
})

bom = pd.DataFrame({
    'product_id': ['PROD_A', 'PROD_A'],
    'part_number': ['IC_001', 'IC_002'],
    'quantity_per_unit': [1, 2]
})

lt_manager = LeadTimeManager(components_data)
procurement = lt_manager.calculate_procurement_dates(production_schedule, bom)

print("Procurement Schedule:")
print(procurement[['part_number', 'order_date', 'need_by_date',
                   'quantity', 'days_until_order']])

过剩与呆滞(E&O)管理

class EOInventoryManager:
    """
    Manage excess and obsolete inventory in electronics
    """

    def __init__(self, inventory_df, bom_df, forecast_df):
        self.inventory = inventory_df
        self.bom = bom_df
        self.forecast = forecast_df

    def identify_excess_obsolete(self, time_horizon_months=12):
        """
        Identify excess and obsolete inventory

        Parameters:
        - time_horizon_months: planning horizon for demand

        Returns:
        - E&O classification by component
        """

        eo_analysis = []

        for idx, inv in self.inventory.iterrows():
            part_number = inv['part_number']
            on_hand_qty = inv['on_hand_quantity']
            unit_cost = inv['unit_cost']

            # Calculate future demand
            future_demand = self._calculate_future_demand(
                part_number, time_horizon_months
            )

            # Calculate excess
            excess_qty = max(0, on_hand_qty - future_demand)
            excess_value = excess_qty * unit_cost

            # Determine obsolescence risk
            lifecycle_status = inv.get('lifecycle_status', 'active')
            last_usage_date = inv.get('last_usage_date', datetime.now())
            months_since_use = (datetime.now() - last_usage_date).days / 30

            # Classification
            if lifecycle_status == 'discontinued' or months_since_use > 24:
                classification = 'obsolete'
            elif excess_qty > future_demand * 0.5 or months_since_use > 12:
                classification = 'excess'
            elif excess_qty > future_demand * 0.2:
                classification = 'watch'
            else:
                classification = 'normal'

            eo_analysis.append({
                'part_number': part_number,
                'on_hand_qty': on_hand_qty,
                'future_demand_12m': future_demand,
                'excess_qty': excess_qty,
                'excess_value': excess_value,
                'unit_cost': unit_cost,
                'lifecycle_status': lifecycle_status,
                'months_since_use': months_since_use,
                'classification': classification,
                'recommended_action': self._recommend_action(
                    classification, excess_qty, excess_value
                )
            })

        return pd.DataFrame(eo_analysis)

    def _calculate_future_demand(self, part_number, months):
        """Calculate future demand for component"""

        # Get products using this part
        products_using = self.bom[self.bom['part_number'] == part_number]

        total_demand = 0
        for _, product in products_using.iterrows():
            product_id = product['product_id']
            qty_per_unit = product['quantity_per_unit']

            # Get forecast for product
            product_forecast = self.forecast[
                self.forecast['product_id'] == product_id
            ]['forecast_units'].sum() if len(
                self.forecast[self.forecast['product_id'] == product_id]
            ) > 0 else 0

            total_demand += product_forecast * qty_per_unit

        return total_demand

    def _recommend_action(self, classification, excess_qty, excess_value):
        """Recommend disposition action"""

        if classification == 'obsolete':
            if excess_value > 50000:
                return 'scrap_with_recovery_value_analysis'
            else:
                return 'scrap_dispose'
        elif classification == 'excess':
            if excess_value > 100000:
                return 'sell_to_brokers_or_redistribute'
            elif excess_value > 10000:
                return 'return_to_supplier_negotiation'
            else:
                return 'consume_in_production_if_possible'
        elif classification == 'watch':
            return 'monitor_and_reduce_future_buys'
        else:
            return 'no_action_required'

    def calculate_eo_provision(self, eo_analysis):
        """
        Calculate accounting provision for E&O inventory

        Returns:
        - provision amount by category
        """

        provision_rates = {
            'normal': 0.0,
            'watch': 0.25,
            'excess': 0.50,
            'obsolete': 1.0
        }

        eo_analysis['provision_rate'] = eo_analysis['classification'].map(provision_rates)
        eo_analysis['provision_amount'] = (
            eo_analysis['excess_value'] * eo_analysis['provision_rate']
        )

        total_provision = eo_analysis['provision_amount'].sum()

        summary = eo_analysis.groupby('classification').agg({
            'excess_qty': 'sum',
            'excess_value': 'sum',
            'provision_amount': 'sum'
        })

        return {
            'total_provision': total_provision,
            'summary_by_classification': summary
        }


# Example would require full inventory, BOM, and forecast data

产品生命周期管理

新产品导入(NPI)规划
class NPIManager:
    """
    Manage New Product Introduction process for electronics
    """

    def __init__(self):
        self.npi_phases = [
            'concept',
            'design',
            'prototype',
            'pilot',
            'ramp',
            'mass_production'
        ]

    def create_npi_timeline(self, product_spec, target_launch_date):
        """
        Create NPI timeline with key milestones

        Parameters:
        - product_spec: product specifications
        - target_launch_date: desired production start

        Returns:
        - detailed timeline with activities
        """

        # Standard phase durations (weeks)
        phase_durations = {
            'concept': 4,
            'design': 12,
            'prototype': 8,
            'pilot': 6,
            'ramp': 8,
            'mass_production': 0  # ongoing
        }

        # Adjust for product complexity
        complexity_factor = product_spec.get('complexity_factor', 1.0)

        timeline = []
        current_date = target_launch_date

        # Work backwards from launch
        for phase in reversed(self.npi_phases[:-1]):
            duration_weeks = phase_durations[phase] * complexity_factor
            phase_start = current_date - timedelta(weeks=duration_weeks)

            timeline.append({
                'phase': phase,
                'start_date': phase_start,
                'end_date': current_date,
                'duration_weeks': duration_weeks,
                'key_activities': self._get_phase_activities(phase),
                'deliverables': self._get_phase_deliverables(phase)
            })

            current_date = phase_start

        # Reverse to chronological order
        timeline.reverse()

        return pd.DataFrame(timeline)

    def _get_phase_activities(self, phase):
        """Get key activities for NPI phase"""

        activities = {
            'concept': ['Market research', 'Feature definition', 'Cost target'],
            'design': ['Schematic design', 'PCB layout', 'Component selection',
                      'DFM review'],
            'prototype': ['Prototype build', 'Functional testing', 'Design validation'],
            'pilot': ['Pilot run 100-500 units', 'Process validation',
                     'Supplier qualification'],
            'ramp': ['Ramp to volume', 'Yield optimization', 'Cost reduction']
        }

        return activities.get(phase, [])

    def _get_phase_deliverables(self, phase):
        """Get deliverables for NPI phase"""

        deliverables = {
            'concept': ['Product requirements document', 'Cost model'],
            'design': ['Final schematic', 'Gerber files', 'BOM', 'AVL'],
            'prototype': ['Working prototypes', 'Test reports', 'Design changes'],
            'pilot': ['Pilot build report', 'Qualified suppliers', 'Manufacturing docs'],
            'ramp': ['Volume production', 'Quality metrics', 'Cost targets met']
        }

        return deliverables.get(phase, [])

    def assess_component_risk_npi(self, bom_df, components_df):
        """
        Assess component risks for NPI

        Focus on:
        - Long lead time parts
        - Sole source components
        - Lifecycle risks
        - Allocation risks
        """

        risks = []

        for idx, component in bom_df.iterrows():
            part_number = component['part_number']

            # Get component details
            comp_info = components_df[
                components_df['part_number'] == part_number
            ].iloc[0]

            # Risk factors
            risk_factors = []
            risk_score = 0

            # Lead time risk
            if comp_info['lead_time_weeks'] > 26:
                risk_factors.append('long_lead_time_>6months')
                risk_score += 30

            # Sole source risk
            if comp_info.get('alternate_sources', 0) == 0:
                risk_factors.append('sole_source')
                risk_score += 25

            # Lifecycle risk
            if comp_info.get('lifecycle_status') == 'nrnd':
                risk_factors.append('not_recommended_for_new_design')
                risk_score += 40

            # Allocation risk
            if comp_info.get('allocation_status') in ['allocated', 'critical']:
                risk_factors.append('allocated_part')
                risk_score += 35

            risks.append({
                'part_number': part_number,
                'manufacturer': comp_info['manufacturer'],
                'risk_score': risk_score,
                'risk_factors': risk_factors,
                'mitigation_required': risk_score > 50
            })

        return pd.DataFrame(risks).sort_values('risk_score', ascending=False)

工具与库

Python 库

供应链优化:

  • pulp:用于配额优化的线性规划
  • pyomo:高级优化建模
  • networkx:供应网络分析

数据分析:

  • pandas:数据处理和 BOM 管理
  • numpy:数值计算
  • scipy:统计分析

可视化:

  • matplotlib、seaborn:图表
  • plotly:交互式仪表板
  • networkx + matplotlib:供应网络可视化
商业软件

ERP/MRP 系统:

  • SAP S/4HANA:企业资源规划
  • Oracle ERP Cloud:面向制造业的云 ERP
  • Microsoft Dynamics 365:供应链管理
  • IFS Applications:制造与供应链

元器件管理:

  • Arena PLM:产品生命周期管理
  • SiliconExpert:元器件生命周期与合规管理
  • Z2Data:供应链情报
  • Supplyframe:元器件采购与情报

合同制造:

  • Aligni:电子产品库存和 BOM 管理
  • PLM 系统:PTC Windchill、Siemens Teamcenter、Dassault ENOVIA

供应商协作:

  • E2open:多层级供应链可视性
  • Kinaxis RapidResponse:供应链规划
  • Blue Yonder:供应链套件

常见挑战与解决方案

挑战:元器件配额与短缺

问题:

  • 关键元器件(半导体、显示屏、连接器)供应受配额限制
  • 无法确保所需数量
  • 交期较长(26-52 周)
  • 现货市场价格为正常价格的 5-10 倍

解决方案:

  • 需求整合:汇总预测以增加采购量
  • 战略关系:与供应商建立优先客户关系
  • 长期协议:通过多年合同承诺产能
  • 面向供应可得性设计:在设计阶段选用容易采购的元器件
  • 授权分销商:与特许分销商建立关系
  • 替代采购渠道:在设计阶段认证第二来源
  • 缓冲库存:战略储备交期较长的零部件
  • 配额跟踪:实时监控配额状态
挑战:产品快速淘汰

问题:

  • 元器件生命周期短于产品生命周期
  • 难以决定最后一次采购
  • 生命周期终止(EOL)元器件管理
  • 重新设计成本高

解决方案:

  • 生命周期监控:持续跟踪元器件生命周期状态
  • 主动管理淘汰风险:提前 3-5 年规划
  • 最后一次采购量计算:准确预测剩余需求
  • 面向长寿命设计:选择生命周期较长的元器件
  • 元器件标准化:减少独有零件数量
  • 仿真/直接替换方案:找出兼容的替代品
  • 托管库存:为长期尾部服务需求保留战略库存
挑战:管理多个 EMS 服务商

问题:

  • 协调全球 3-5 家合同制造商
  • 质量和流程不一致
  • IP 保护方面的顾虑
  • 难以转移产量

解决方案:

  • 流程标准化:实施统一的质量标准
  • 黄金样机方法:以参考生产批次确保一致性
  • 定期审核:每季度审核制造工厂
  • 双重工装:在多个工厂保留工装,提高灵活性
  • IP 管控:NDA、受控的 BOM 访问权限、设计分区
  • 成本透明:采用开放式成本定价模式
  • 产量平衡:根据产能进行战略性分配
挑战:假冒元器件风险

问题:

  • 供应链中存在假冒 IC(尤其是灰色市场)
  • 质量和可靠性问题
  • 品牌和安全风险
  • 难以检测

解决方案:

  • 仅通过授权来源采购:从特许分销商采购
  • 供应商资质审核:严格审查采购来源
  • 测试规程:来料检验和 X 射线分析
  • 可追溯性:完整记录监管链
  • 防伪技术:使用认证芯片/标签
  • 供应商审核:定期检查供应商设施
  • 市场监控:跟踪灰色市场活动
挑战:全球供应链中断

问题:

  • 地缘政治风险(中台关系紧张)
  • 自然灾害(地震、海啸)
  • 疫情影响
  • 港口拥堵和物流延误

解决方案:

  • 地理多元化:在多个地区开展制造
  • 近岸外包:将部分生产转移至更靠近需求的地区
  • 安全库存策略:增加关键零部件的库存
  • 双重采购:选择多个供应商和地区
  • 供应链可视性:使用实时跟踪工具
  • 情景规划:模拟中断情景
  • 空运能力:预留应急运力

输出格式

电子供应链报告

执行摘要:

  • 产品组合概览
  • 关键组件状态
  • 供应链风险等级
  • 关键举措与投资

组件风险仪表板:

零件编号制造商配额状态交货周期库存短缺风险等级
IC_STM32F4STMicro已分配32 周10,00015,000严重
PMIC_TPS65TI严重52 周025,000严重
LCD_7inchBOE关注16 周8,0000中等
MLCC_10uFMurata开放8 周50,0000低

供应链绩效:

指标当前值目标值状态
准时交付率87%95%⚠ 黄色
组件 PPM120<100⚠ 黄色
呆滞与过剩库存$2.8M<$2M⚠ 黄色
库存周转率6.28.0⚠ 黄色
配额组件45<20⚠ 黄色

NPI 状态:

产品阶段开始日期发布日期状态关键风险
PROD_A试产2025-01-152025-04-01按计划进行IC 配额
PROD_B设计2025-02-012025-08-01延迟显示屏停产
PROD_C爬坡2024-12-012025-03-01按计划进行无

呆滞与过剩库存:

分类零件数量数量价值计提准备金
淘汰23445,000$890K$890K
过剩456128,000$1.8M$900K
关注678234,000$2.1M$525K
总计1,368407,000$4.79M$2.32M

行动事项:

  1. 将 STM32 配额问题升级至高管层——联系供应链副总裁
  2. 完成停产显示屏的最后一次采购——批准 $1.2M 采购
  3. 认证备用 PMIC 供应商——于 2025 年第二季度前完成
  4. 实施组件生命周期监控工具——评估 SiliconExpert
  5. 将呆滞与过剩库存降至 <$2M——开展经纪商销售和退货计划

要问的问题

如果需要更多背景信息:

  1. 电子产品的类型是什么?(消费类、工业类、汽车类、医疗类)
  2. 制造模式是什么?(内部、EMS/ODM、混合)
  3. 哪些关键组件导致了问题?
  4. 当前的配额情况如何?
  5. 长交货周期零件的交货周期是多少?
  6. 当前有多少呆滞与过剩库存?
  7. 产品处于哪个生命周期阶段?(NPI、成熟期、生命周期结束)
  8. 制造业务分布在哪些地区?

相关技能

  • production-scheduling:用于制造排程
  • capacity-planning:用于生产能力管理
  • inventory-optimization:用于组件库存策略
  • supplier-selection:用于选择 EMS 和组件供应商
  • supplier-risk-management:用于保障供应连续性
  • quality-management:用于制造质量和 PPM 跟踪
  • demand-forecasting:用于组件需求规划
  • procurement-optimization:用于优化组件采购
  • network-design:用于优化全球供应网络
  • risk-mitigation:用于供应链风险管理

评论

支持 Markdown