Compare commits

...

2 Commits

Author SHA1 Message Date
Cricial 5c7788e86e 1 2024-12-08 18:43:33 +08:00
Cricial 2b59780e20 模型修改部分-修改消耗逻辑 2024-11-28 18:56:24 +08:00
23 changed files with 38260 additions and 12575 deletions

View File

@ -31,6 +31,13 @@
</Attribute>
</value>
</entry>
<entry key="\input_data\input_firm_data\firm_amended.csv">
<value>
<Attribute>
<option name="separator" value="," />
</Attribute>
</value>
</entry>
<entry key="\input_data\input_firm_data\firms_devices.csv">
<value>
<Attribute>
@ -129,6 +136,13 @@
</Attribute>
</value>
</entry>
<entry key="\output_result\risk\count.csv">
<value>
<Attribute>
<option name="separator" value="," />
</Attribute>
</value>
</entry>
<entry key="\output_result\risk\count_dcp.csv">
<value>
<Attribute>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,9 @@
import json
import os
import datetime
import networkx as nx
import pandas as pd
from mesa import Model
from typing import TYPE_CHECKING
@ -36,9 +40,231 @@ class Computation:
dct_sample_para = {'sample': sample_random,
'seed': sample_random.seed,
**dct_exp}
product_network_test = nx.adjacency_graph(json.loads(dct_sample_para['g_bom']))
model = MyModel(dct_sample_para)
for i in range(1):
model.step()
print(i, datetime.datetime.now())
model.end()
return False
def initialize_firm_network(self):
# Read the firm data
firm = pd.read_csv("input_data/input_firm_data/Firm_amended.csv")
firm['Code'] = firm['Code'].astype(str)
firm.fillna(0, inplace=True)
firm_attr = firm.loc[:, ["Code", "Type_Region", "Revenue_Log"]]
firm_industry_relation = pd.read_csv("input_data/firm_industry_relation.csv")
firm_industry_relation['Firm_Code'] = firm_industry_relation['Firm_Code'].astype('string')
firm_product = []
grouped = firm_industry_relation.groupby('Firm_Code')['Product_Code'].apply(list)
firm_product.append(grouped)
firm_attr['Product_Code'] = firm_attr['Code'].map(grouped)
firm_attr.set_index('Code', inplace=True)
grouped = firm_industry_relation.groupby('Firm_Code')
self.firm_prod_labels_dict = {code: group['Product_Code'].tolist() for code, group in grouped}
# 遍历'Product_Code' 与 index 交换
for index, row in firm_attr.iterrows():
id_index_list = []
for i in row['Product_Code']:
for key_values in self.id_code.items():
if int(key_values[0]) == i:
for id in key_values[1]:
id_index_list.append(id)
firm_attr.at[index, 'Product_Code'] = id_index_list
self.G_Firm.add_nodes_from(firm["Code"])
# Assign attributes to the firm nodes
firm_labels_dict = {code: firm_attr.loc[code].to_dict() for code in self.G_Firm.nodes}
nx.set_node_attributes(self.G_Firm, firm_labels_dict)
self.Firm = firm
def initialize_firm_product_network(self):
firm_industry_relation = pd.read_csv("input_data/firm_industry_relation.csv")
firm_industry_relation['Firm_Code'] = firm_industry_relation['Firm_Code'].astype('string')
firm_industry_relation['Product_Code'] = firm_industry_relation['Product_Code'].apply(lambda x: [x])
# 将 'firm_prod' 表中的每一行作为图中的节点
self.G_FirmProd.add_nodes_from(firm_industry_relation.index)
# 为每个节点分配属性
# 遍历'Product_Code' 与 index 交换
for index, row in firm_industry_relation.iterrows():
id_index_list = []
for i in row['Product_Code']:
for key_values in self.id_code.items():
if int(key_values[0]) == i:
for id in key_values[1]:
id_index_list.append(id)
firm_industry_relation.at[index, 'Product_Code'] = id_index_list
firm_prod_labels_dict = {code: firm_industry_relation.loc[code].to_dict() for code in
firm_industry_relation.index}
nx.set_node_attributes(self.G_FirmProd, firm_prod_labels_dict)
def add_edges_to_firm_network(self):
""" Add edges between firms based on the product BOM relationships """
# Add edges to G_Firm according to G_bom
for node in nx.nodes(self.G_Firm):
lst_pred_product_code = []
for product_code in self.G_Firm.nodes[node]['Product_Code']:
lst_pred_product_code += list(self.G_bom.predecessors(product_code))
lst_pred_product_code = list(set(lst_pred_product_code))
lst_pred_product_code = list(sorted(lst_pred_product_code)) # Ensure consistency
for pred_product_code in lst_pred_product_code:
# Get a list of firms producing the component (pred_product_code)
lst_pred_firm = [firm_code for firm_code, product in self.firm_prod_labels_dict.items() if
pred_product_code in product]
# Select multiple suppliers (multi-sourcing)
n_pred_firm = self.int_netw_prf_n
if n_pred_firm > len(lst_pred_firm):
n_pred_firm = len(lst_pred_firm)
if self.is_prf_size:
# 获取 firm 的 size 列表
lst_pred_firm_size = [self.G_Firm.nodes[pred_firm]['Revenue_Log'] for pred_firm in lst_pred_firm]
# 检查 lst_pred_firm_size 是否为空或总和为 0
if len(lst_pred_firm_size) == 0 or sum(lst_pred_firm_size) == 0:
# print("警告: lst_pred_firm_size 为空或总和为 0无法生成概率分布")
lst_choose_firm = [] # 返回空结果,或根据需要处理
else:
# 计算总和
sum_pred_firm_size = sum(lst_pred_firm_size)
# 归一化生成 lst_prob
lst_prob = [size / sum_pred_firm_size for size in lst_pred_firm_size]
# 使用 np.isclose() 确保概率总和接近 1
if not np.isclose(sum(lst_prob), 1.0):
# print(f"警告: 概率总和为 {sum(lst_prob)},现在进行修正")
lst_prob = [prob / sum(lst_prob) for prob in lst_prob]
# 确保没有负值或 0
lst_prob = [max(0, prob) for prob in lst_prob]
# 根据修正后的概率选择 firm
lst_choose_firm = self.nprandom.choice(lst_pred_firm, n_pred_firm, replace=False, p=lst_prob)
else:
# 直接进行随机选择
lst_choose_firm = self.nprandom.choice(lst_pred_firm, n_pred_firm, replace=False)
# Add edges from predecessor firms to current node (firm)
lst_add_edge = [(pred_firm, node, {'Product': pred_product_code}) for pred_firm in lst_choose_firm]
self.G_Firm.add_edges_from(lst_add_edge)
# Add edges to firm-product network
self.add_edges_to_firm_product_network(node, pred_product_code, lst_choose_firm)
def add_edges_to_firm_product_network(self, node, pred_product_code, lst_choose_firm):
""" Helper function to add edges to the firm-product network """
set_node_prod_code = set(self.G_Firm.nodes[node]['Product_Code'])
set_pred_succ_code = set(self.G_bom.successors(pred_product_code))
lst_use_pred_prod_code = list(set_node_prod_code & set_pred_succ_code)
if len(lst_use_pred_prod_code) == 0:
print("错误")
pred_node_list = []
for pred_firm in lst_choose_firm:
for n, v in self.G_FirmProd.nodes(data=True):
for v1 in v['Product_Code']:
if v1 == pred_product_code and v['Firm_Code'] == pred_firm:
pred_node_list.append(n)
if len(pred_node_list) != 0:
pred_node = pred_node_list[0]
else:
pred_node = -1
current_node_list = []
for use_pred_prod_code in lst_use_pred_prod_code:
for n, v in self.G_FirmProd.nodes(data=True):
for v1 in v['Product_Code']:
if v1 == use_pred_prod_code and v['Firm_Code'] == node:
current_node_list.append(n)
if len(current_node_list) != 0:
current_node = current_node_list[0]
else:
current_node = -1
if current_node != -1 and pred_node != -1:
self.G_FirmProd.add_edge(pred_node, current_node)
def connect_unconnected_nodes(self):
""" Connect unconnected nodes in the firm network """
for node in nx.nodes(self.G_Firm):
if self.G_Firm.degree(node) == 0:
current_node_list = []
for product_code in self.G_Firm.nodes[node]['Product_Code']:
for n, v in self.G_FirmProd.nodes(data=True):
for v1 in v['Product_Code']:
if v['Firm_Code'] == node and v1 == product_code:
current_node_list.append(n)
if len(current_node_list) != 0:
current_node = current_node_list[0]
else:
current_node = -1
lst_succ_product_code = list(self.G_bom.successors(product_code))
for succ_product_code in lst_succ_product_code:
lst_succ_firm = [firm_code for firm_code, product in self.firm_prod_labels_dict.items() if
succ_product_code in product]
n_succ_firm = self.int_netw_prf_n
if n_succ_firm > len(lst_succ_firm):
n_succ_firm = len(lst_succ_firm)
if self.is_prf_size:
lst_succ_firm_size = [self.G_Firm.nodes[succ_firm]['Revenue_Log'] for succ_firm in
lst_succ_firm]
if len(lst_succ_firm_size) == 0 or sum(lst_succ_firm_size) == 0:
# print("警告: lst_pred_firm_size 为空或总和为 0无法生成概率分布")
lst_choose_firm = [] # 返回空结果,或根据需要处理
else:
# 计算总和
sum_pred_firm_size = sum(lst_succ_firm_size)
# 归一化生成 lst_prob
lst_prob = [size / sum_pred_firm_size for size in lst_succ_firm_size]
# 使用 np.isclose() 确保概率总和接近 1
if not np.isclose(sum(lst_prob), 1.0):
# print(f"警告: 概率总和为 {sum(lst_prob)},现在进行修正")
lst_prob = [prob / sum(lst_prob) for prob in lst_prob]
# 确保没有负值或 0
lst_prob = [max(0, prob) for prob in lst_prob]
lst_choose_firm = self.nprandom.choice(lst_succ_firm, n_succ_firm, replace=False,
p=lst_prob)
else:
lst_choose_firm = self.nprandom.choice(lst_succ_firm, n_succ_firm, replace=False)
lst_add_edge = [(node, succ_firm, {'Product': product_code}) for succ_firm in
lst_choose_firm]
self.G_Firm.add_edges_from(lst_add_edge)
# Add edges to firm-product network
succ_node_list = []
for succ_firm in lst_choose_firm:
for n, v in self.G_FirmProd.nodes(data=True):
for v1 in v['Product_Code']:
if v1 == succ_product_code and v['Firm_Code'] == succ_firm:
succ_node_list.append(n)
if len(succ_node_list) != 0:
succ_node = succ_node_list[0]
else:
succ_node = -1
if current_node != -1 and succ_node != -1:
self.G_FirmProd.add_edge(current_node, succ_node)
self.sample.g_firm = json.dumps(nx.adjacency_data(self.G_Firm))
self.firm_network = self.G_Firm # 直接使用 networkx 图对象
self.firm_prod_network = self.G_FirmProd # 直接使用 networkx 图对象

View File

@ -39,7 +39,7 @@ class ControllerDB:
self.lst_saved_s_id = []
self.experiment_data = []
self.batch_size = 2000
self.batch_size = 5000
# 根据需求设置每批次的大小
def init_tables(self):
@ -79,29 +79,18 @@ class ControllerDB:
# 结点属性值 相当于 图上点的 原始 产品名称
bom_nodes = pd.read_csv('input_data/input_product_data/BomNodes.csv')
bom_nodes['Code'] = bom_nodes['Code'].astype(str)
bom_nodes.set_index('Code', inplace=True)
# bom_cate_net = pd.read_csv('input_data/input_product_data/BomCateNet.csv', index_col=0)
# bom_cate_net.fillna(0, inplace=True)
# # 创建 可以多边的有向图 同时 转置操作 使得 上游指向下游结点 也就是 1.1.1 - 1.1 类似这种
# # 将第一列转换为字符串类型
# print("sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss")
# print(bom_cate_net.columns)
# print(bom_cate_net.index) # 打印行标题(索引)
# print(bom_cate_net.iloc[:, 0]) # 打印第一列的内容
#
# g_bom = nx.from_pandas_adjacency(bom_cate_net.T,
# create_using=nx.MultiDiGraph())
bom_nodes.set_index('Index', inplace=True)
bom_cate_net = pd.read_csv('input_data/input_product_data/合成结点.csv')
g_bom = nx.from_pandas_edgelist(bom_cate_net, source='UPID', target='ID', create_using=nx.MultiDiGraph())
# 填充每一个结点 的具体内容 通过 相同的 code 并且通过BomNodes.loc[code].to_dict()字典化 格式类似 格式 { code0 : {level: 0 ,name: 工业互联网 }}
bom_labels_dict = {}
for code in g_bom.nodes:
for index in g_bom.nodes:
try:
int_code = int(code)
bom_labels_dict[code] = bom_nodes.loc[int_code].to_dict()
bom_labels_dict[index] = bom_nodes.loc[index].to_dict()
# print(bom_labels_dict[index])
except KeyError:
print(f"节点 {code} 不存在于 bom_nodes 中")
print(f"节点 {index} 不存在于 bom_nodes 中")
# 分配属性 给每一个结点 获得类似 格式:{1: {'label': 'A', 'value': 10},
nx.set_node_attributes(g_bom, bom_labels_dict)
# 改为json 格式

View File

@ -39,9 +39,9 @@ class FirmAgent(Agent):
for agent in self.model.company_agents if agent.unique_id == u]
# 设备c的数量 (总量) 使用这个来判断设备数量
self.n_equip_c = n_equip_c
# 设备c产量 更具设备量进行估算
# 设备c产量 根据设备量进行估算
self.c_yield = production_output
# 消耗材料量 根据设备量进行估算
# 消耗材料量 根据设备量进行估算 { }
self.c_consumption = demand_quantity
# 设备c购买价格初始值
# self.c_price = c_price

View File

@ -1,4 +1,6 @@
Firm_Code,Product_Code
Firm_Code,Product_Code
6,7
7,7
29954548,7
169456313,7
771821595,7
@ -5815,7 +5817,6 @@ Firm_Code,Product_Code
3375823631,2717
3384021594,2717
3384489464,2717
3387414634,2717
3391140557,2717
3391580446,2717
3394344425,2717
@ -5853,7 +5854,6 @@ Firm_Code,Product_Code
4728160558,2717
4977024731,2717
5075022186,2717
5080328229,2717
5082745863,2717
11174854725,2717
11197373335,2717
@ -5982,7 +5982,6 @@ Firm_Code,Product_Code
3339447871,2718
3341201089,2718
3393520654,2718
3417211306,2718
4050411188,2718
1452048,32338
2010673,32338
@ -10025,7 +10024,6 @@ Firm_Code,Product_Code
2327979389,32441
3226664625,32441
3462551351,32441
3315213370,32442
829768,32443
961017,32443
6292428,32443
@ -10098,7 +10096,6 @@ Firm_Code,Product_Code
3395900897,32443
4187134530,32443
5235871870,32443
1273878359,32444
863079,32445
1452048,32445
4928854,32445
@ -10203,7 +10200,6 @@ Firm_Code,Product_Code
3359835624,32445
3374200023,32445
3383829951,32445
3387414634,32445
3407754893,32445
3414432268,32445
3417604299,32445
@ -12704,7 +12700,6 @@ Firm_Code,Product_Code
1662628216,34566
1718070442,34566
2311333794,34566
2311554061,34566
2312469536,34566
2313316346,34566
2314838109,34566
@ -12891,7 +12886,6 @@ Firm_Code,Product_Code
2707711529,34566
2735580560,34566
2745792038,34566
2784653609,34566
2787318020,34566
2788202283,34566
2794900565,34566
@ -13434,10 +13428,8 @@ Firm_Code,Product_Code
3193452645,34574
3240604547,34574
3340308357,34574
3387414634,34574
3415340571,34574
4114133480,34574
5080328229,34574
11209117004,34574
5979030,36914
5979313,36914
@ -13724,7 +13716,6 @@ Firm_Code,Product_Code
18729611,56321
25624519,56321
26516263,56321
27218524,56321
27892215,56321
42901962,56321
57430434,56321
@ -13771,7 +13762,6 @@ Firm_Code,Product_Code
2328469644,56321
2329948539,56321
2330435233,56321
2335686424,56321
2339188563,56321
2342317074,56321
2346409693,56321
@ -13781,13 +13771,11 @@ Firm_Code,Product_Code
2388525637,56321
2441725544,56321
2568380877,56321
2784653609,56321
2985599329,56321
3007255509,56321
3019316903,56321
3041197460,56321
3049154839,56321
3049563940,56321
3121176272,56321
3146829971,56321
3164072929,56321
@ -13797,12 +13785,10 @@ Firm_Code,Product_Code
3218443122,56321
3269126593,56321
3270983544,56321
3275082457,56321
3288105727,56321
3309861393,56321
3310322470,56321
3312199997,56321
3387414634,56321
3400353135,56321
3403941251,56321
3453584345,56321
@ -13810,7 +13796,6 @@ Firm_Code,Product_Code
4060785478,56321
4062109631,56321
4541270393,56321
5080328229,56321
11194786363,56321
640320,56322
961017,56322
@ -13833,7 +13818,6 @@ Firm_Code,Product_Code
26102189,56322
26516263,56322
27042865,56322
27218524,56322
28667694,56322
33358838,56322
33822284,56322
@ -14250,7 +14234,6 @@ Firm_Code,Product_Code
2334362489,56322
2334642264,56322
2334685597,56322
2335686424,56322
2335911998,56322
2336951312,56322
2337333600,56322
@ -14392,7 +14375,6 @@ Firm_Code,Product_Code
2454080715,56322
2454364226,56322
2549748974,56322
2784653609,56322
2807640082,56322
2820140348,56322
2943360015,56322
@ -14445,7 +14427,6 @@ Firm_Code,Product_Code
3046734929,56322
3047432238,56322
3048263744,56322
3049563940,56322
3053428173,56322
3053827066,56322
3053874899,56322
@ -14547,7 +14528,6 @@ Firm_Code,Product_Code
3269509541,56322
3270983544,56322
3272228873,56322
3275082457,56322
3276276473,56322
3276806203,56322
3280089923,56322
@ -14591,7 +14571,6 @@ Firm_Code,Product_Code
3381895548,56322
3384021594,56322
3386142122,56322
3387414634,56322
3392439831,56322
3395273704,56322
3395544335,56322
@ -14634,7 +14613,6 @@ Firm_Code,Product_Code
4314826963,56322
4342133203,56322
4518793468,56322
5080328229,56322
5170566512,56322
5227003959,56322
11163946716,56322
@ -14675,30 +14653,23 @@ Firm_Code,Product_Code
515770253,56323
519195163,56323
578458519,56323
579145151,56323
648145286,56323
655053188,56323
724699853,56323
737770776,56323
756272716,56323
769007667,56323
781863255,56323
828320335,56323
830662620,56323
835660918,56323
928405229,56323
930767828,56323
1020971686,56323
1171719000,56323
1196081613,56323
1281892063,56323
1283152579,56323
1307998566,56323
1320580022,56323
1420260418,56323
1428867455,56323
2310078704,56323
2311554061,56323
2313858141,56323
2313862397,56323
2316430101,56323
@ -14720,11 +14691,9 @@ Firm_Code,Product_Code
2352536665,56323
2353049653,56323
2353542014,56323
2354579046,56323
2358443746,56323
2358890410,56323
2359644835,56323
2375567426,56323
2813351721,56323
2944851453,56323
2989110680,56323
@ -14738,7 +14707,6 @@ Firm_Code,Product_Code
3145216638,56323
3147315589,56323
3148373610,56323
3157908852,56323
3178503917,56323
3190725108,56323
3194480206,56323
@ -14752,12 +14720,8 @@ Firm_Code,Product_Code
3333770952,56323
3343051793,56323
3355136417,56323
3355311700,56323
3384021594,56323
3387414634,56323
3391580446,56323
3417211306,56323
3424960996,56323
3479493493,56323
4001232767,56323
4018874937,56323
@ -14765,14 +14729,8 @@ Firm_Code,Product_Code
4132230808,56323
4518793468,56323
5075022186,56323
5080328229,56323
5268652928,56323
11169314959,56323
11196261229,56323
11198973632,56323
11201118913,56323
11202794098,56323
11222347815,56323
1452048,56341
11807506,56341
23463174,56341

1 Firm_Code Product_Code
2 6 7
3 7 7
4 29954548 7
5 169456313 7
6 771821595 7
5817 3375823631 2717
5818 3384021594 2717
5819 3384489464 2717
3387414634 2717
5820 3391140557 2717
5821 3391580446 2717
5822 3394344425 2717
5854 4728160558 2717
5855 4977024731 2717
5856 5075022186 2717
5080328229 2717
5857 5082745863 2717
5858 11174854725 2717
5859 11197373335 2717
5982 3339447871 2718
5983 3341201089 2718
5984 3393520654 2718
3417211306 2718
5985 4050411188 2718
5986 1452048 32338
5987 2010673 32338
10024 2327979389 32441
10025 3226664625 32441
10026 3462551351 32441
3315213370 32442
10027 829768 32443
10028 961017 32443
10029 6292428 32443
10096 3395900897 32443
10097 4187134530 32443
10098 5235871870 32443
1273878359 32444
10099 863079 32445
10100 1452048 32445
10101 4928854 32445
10200 3359835624 32445
10201 3374200023 32445
10202 3383829951 32445
3387414634 32445
10203 3407754893 32445
10204 3414432268 32445
10205 3417604299 32445
12700 1662628216 34566
12701 1718070442 34566
12702 2311333794 34566
2311554061 34566
12703 2312469536 34566
12704 2313316346 34566
12705 2314838109 34566
12886 2707711529 34566
12887 2735580560 34566
12888 2745792038 34566
2784653609 34566
12889 2787318020 34566
12890 2788202283 34566
12891 2794900565 34566
13428 3193452645 34574
13429 3240604547 34574
13430 3340308357 34574
3387414634 34574
13431 3415340571 34574
13432 4114133480 34574
5080328229 34574
13433 11209117004 34574
13434 5979030 36914
13435 5979313 36914
13716 18729611 56321
13717 25624519 56321
13718 26516263 56321
27218524 56321
13719 27892215 56321
13720 42901962 56321
13721 57430434 56321
13762 2328469644 56321
13763 2329948539 56321
13764 2330435233 56321
2335686424 56321
13765 2339188563 56321
13766 2342317074 56321
13767 2346409693 56321
13771 2388525637 56321
13772 2441725544 56321
13773 2568380877 56321
2784653609 56321
13774 2985599329 56321
13775 3007255509 56321
13776 3019316903 56321
13777 3041197460 56321
13778 3049154839 56321
3049563940 56321
13779 3121176272 56321
13780 3146829971 56321
13781 3164072929 56321
13785 3218443122 56321
13786 3269126593 56321
13787 3270983544 56321
3275082457 56321
13788 3288105727 56321
13789 3309861393 56321
13790 3310322470 56321
13791 3312199997 56321
3387414634 56321
13792 3400353135 56321
13793 3403941251 56321
13794 3453584345 56321
13796 4060785478 56321
13797 4062109631 56321
13798 4541270393 56321
5080328229 56321
13799 11194786363 56321
13800 640320 56322
13801 961017 56322
13818 26102189 56322
13819 26516263 56322
13820 27042865 56322
27218524 56322
13821 28667694 56322
13822 33358838 56322
13823 33822284 56322
14234 2334362489 56322
14235 2334642264 56322
14236 2334685597 56322
2335686424 56322
14237 2335911998 56322
14238 2336951312 56322
14239 2337333600 56322
14375 2454080715 56322
14376 2454364226 56322
14377 2549748974 56322
2784653609 56322
14378 2807640082 56322
14379 2820140348 56322
14380 2943360015 56322
14427 3046734929 56322
14428 3047432238 56322
14429 3048263744 56322
3049563940 56322
14430 3053428173 56322
14431 3053827066 56322
14432 3053874899 56322
14528 3269509541 56322
14529 3270983544 56322
14530 3272228873 56322
3275082457 56322
14531 3276276473 56322
14532 3276806203 56322
14533 3280089923 56322
14571 3381895548 56322
14572 3384021594 56322
14573 3386142122 56322
3387414634 56322
14574 3392439831 56322
14575 3395273704 56322
14576 3395544335 56322
14613 4314826963 56322
14614 4342133203 56322
14615 4518793468 56322
5080328229 56322
14616 5170566512 56322
14617 5227003959 56322
14618 11163946716 56322
14653 515770253 56323
14654 519195163 56323
14655 578458519 56323
579145151 56323
14656 648145286 56323
14657 655053188 56323
14658 724699853 56323
14659 737770776 56323
14660 756272716 56323
14661 769007667 56323
781863255 56323
14662 828320335 56323
14663 830662620 56323
14664 835660918 56323
928405229 56323
14665 930767828 56323
14666 1020971686 56323
14667 1171719000 56323
14668 1196081613 56323
1281892063 56323
1283152579 56323
14669 1307998566 56323
1320580022 56323
14670 1420260418 56323
14671 1428867455 56323
14672 2310078704 56323
2311554061 56323
14673 2313858141 56323
14674 2313862397 56323
14675 2316430101 56323
14691 2352536665 56323
14692 2353049653 56323
14693 2353542014 56323
2354579046 56323
14694 2358443746 56323
14695 2358890410 56323
14696 2359644835 56323
2375567426 56323
14697 2813351721 56323
14698 2944851453 56323
14699 2989110680 56323
14707 3145216638 56323
14708 3147315589 56323
14709 3148373610 56323
3157908852 56323
14710 3178503917 56323
14711 3190725108 56323
14712 3194480206 56323
14720 3333770952 56323
14721 3343051793 56323
14722 3355136417 56323
3355311700 56323
14723 3384021594 56323
3387414634 56323
14724 3391580446 56323
3417211306 56323
3424960996 56323
14725 3479493493 56323
14726 4001232767 56323
14727 4018874937 56323
14729 4132230808 56323
14730 4518793468 56323
14731 5075022186 56323
5080328229 56323
5268652928 56323
11169314959 56323
14732 11196261229 56323
14733 11198973632 56323
11201118913 56323
11202794098 56323
11222347815 56323
14734 1452048 56341
14735 11807506 56341
14736 23463174 56341

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
Code,Index,Name,产业种类
32338,2,硅原材料,0
32338,7,硅原材料,0
32445,8,光刻胶及其配套试剂,0
56341,9,蚀刻液,0
7,10,氟化硅,0

1 Code Index Name 产业种类
2 32338 2 7 硅原材料 0
3 32445 8 光刻胶及其配套试剂 0
4 56341 9 蚀刻液 0
5 7 10 氟化硅 0

View File

@ -1,241 +1,241 @@
产业id,消耗材料id,消耗量
36914,47,255111.0204
36914,49,255111.0204
36914,44,255111.0204
36914,15,12136238.88
36914,18,255111.0204
36914,20,93744.7931
36914,22,75.22587792
36914,23,25897.2899
36914,25,324.0499357
36914,31,361.9578012
36914,36,90.93237991
36914,15,12136238.88
36914,18,255111.0204
36914,20,93744.7931
36914,22,75.22587792
36914,23,25897.2899
36914,25,324.0499357
36914,31,361.9578012
36914,46,255111.0204
32338,2,255111.0204
32338,15,12136238.88
32338,18,255111.0204
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,27,251973.3182
32338,2,255111.0204
32338,15,12136238.88
32338,18,255111.0204
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,27,251973.3182
32338,15,12136238.88
32338,18,255111.0204
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,27,251973.3182
32338,32,54.21991745
32338,15,12136238.88
32338,18,255111.0204
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,27,251973.3182
32338,33,153200.7295
32338,15,12136238.88
32338,18,255111.0204
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,27,251973.3182
32338,34,1.058122239
32338,15,12136238.88
32338,18,255111.0204
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,27,251973.3182
32338,35,1973.630646
32338,19,41.8950274
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,28,501.5058528
32338,29,17085.44484
32338,27,251973.3182
32338,40,202.540151
32338,19,41.8950274
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,28,501.5058528
32338,29,17085.44484
32338,27,251973.3182
32338,38,202.540151
32338,19,41.8950274
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,28,501.5058528
32338,29,17085.44484
32338,27,251973.3182
32338,41,202.540151
32338,19,41.8950274
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,28,501.5058528
32338,29,17085.44484
32338,27,251973.3182
32338,39,202.540151
32338,19,41.8950274
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,28,501.5058528
32338,29,17085.44484
32338,27,251973.3182
32338,43,202.540151
32338,19,41.8950274
32338,20,93744.7931
32338,22,75.22587792
32338,23,25897.2899
32338,25,324.0499357
32338,28,501.5058528
32338,29,17085.44484
32338,27,251973.3182
32338,42,202.540151
2717,2,255111.0204
2717,8,361.9578012
2717,9,255111.0204
2717,10,950.9542139
2717,11,361.9578012
2717,17,2420351.677
2717,19,41.8950274
2717,20,93744.7931
2717,21,121.8232841
2717,23,25897.2899
2717,24,8314.140278
2717,25,324.0499357
2717,28,501.5058528
2717,31,361.9578012
2717,44,255111.0204
2717,45,255111.0204
2714,8,361.9578012
2714,9,255111.0204
2714,10,950.9542139
2714,11,361.9578012
2714,17,2420351.677
2714,18,255111.0204
2714,19,41.8950274
2714,20,93744.7931
2714,23,25897.2899
2714,24,8314.140278
2714,28,501.5058528
2714,31,361.9578012
2715,8,361.9578012
2715,9,255111.0204
2715,10,950.9542139
2715,11,361.9578012
2715,17,2420351.677
2715,18,255111.0204
2715,19,41.8950274
2715,20,93744.7931
2715,23,25897.2899
2715,24,8314.140278
2715,28,501.5058528
2715,31,361.9578012
2716,8,361.9578012
2716,9,255111.0204
2716,10,950.9542139
2716,11,361.9578012
2716,17,2420351.677
2716,18,255111.0204
2716,19,41.8950274
2716,20,93744.7931
2716,23,25897.2899
2716,24,8314.140278
2716,28,501.5058528
2716,31,361.9578012
2718,8,361.9578012
2718,9,255111.0204
2718,10,950.9542139
2718,11,361.9578012
2718,17,2420351.677
2718,18,255111.0204
2718,19,41.8950274
2718,20,93744.7931
2718,23,25897.2899
2718,24,8314.140278
2718,28,501.5058528
2718,31,361.9578012
317589,8,361.9578012
317589,9,255111.0204
317589,10,950.9542139
317589,11,361.9578012
317589,12,12136238.88
317589,13,815.5392074
317589,14,4.812205136
317589,15,12136238.88
317589,16,330.6631997
317589,17,2420351.677
317589,18,255111.0204
317589,19,41.8950274
317589,20,93744.7931
317589,21,121.8232841
317589,22,75.22587792
317589,23,25897.2899
317589,24,8314.140278
317589,25,324.0499357
317589,26,53770.08531
317589,27,251973.3182
317589,28,501.5058528
317589,29,17085.44484
317589,30,255111.0204
317589,31,361.9578012
317589,37,1155.484342
317589,44,255111.0204
317589,45,255111.0204
317589,46,255111.0204
317589,47,255111.0204
317589,48,255111.0204
317589,49,255111.0204
317589,50,255111.0204
317589,51,255111.0204
317589,52,255111.0204
317589,53,255111.0204
317589,54,255111.0204
317589,55,255111.0204
317589,90,0.826657999
317589,91,0.826657999
317589,92,1.928868665
317589,93,0.826657999
317589,94,16438.82054
10,95,55482.385
10,101,7178.474475
10,102,314.0388569
10,103,552.0321994
10,104,865.399695
10,105,361.9578012
10,106,272.0475731
10,107,41.8950274
10,108,8.783241241
10,109,153200.7295
513740,95,55482.385
513742,95,55482.385
11,95,55482.385
,产业id,消耗材料id
0,36914,32338
1,36914,32338
2,36914,32338
3,36914,32440
4,36914,46505
5,36914,32446
6,36914,32433
7,36914,32443
8,36914,32435
9,36914,32439
10,36914,56321
11,36914,32440
12,36914,46505
13,36914,32446
14,36914,32433
15,36914,32443
16,36914,32435
17,36914,32439
18,36914,32338
19,32338,32338
20,32338,32440
21,32338,46505
22,32338,32446
23,32338,32433
24,32338,32443
25,32338,32435
26,32338,32438
27,32338,32338
28,32338,32440
29,32338,46505
30,32338,32446
31,32338,32433
32,32338,32443
33,32338,32435
34,32338,32438
35,32338,32440
36,32338,46505
37,32338,32446
38,32338,32433
39,32338,32443
40,32338,32435
41,32338,32438
42,32338,56320
43,32338,32440
44,32338,46505
45,32338,32446
46,32338,32433
47,32338,32443
48,32338,32435
49,32338,32438
50,32338,56322
51,32338,32440
52,32338,46505
53,32338,32446
54,32338,32433
55,32338,32443
56,32338,32435
57,32338,32438
58,32338,56319
59,32338,32440
60,32338,46505
61,32338,32446
62,32338,32433
63,32338,32443
64,32338,32435
65,32338,32438
66,32338,56323
67,32338,32449
68,32338,32446
69,32338,32433
70,32338,32443
71,32338,32435
72,32338,32447
73,32338,32436
74,32338,32438
75,32338,36914
76,32338,32449
77,32338,32446
78,32338,32433
79,32338,32443
80,32338,32435
81,32338,32447
82,32338,32436
83,32338,32438
84,32338,36914
85,32338,32449
86,32338,32446
87,32338,32433
88,32338,32443
89,32338,32435
90,32338,32447
91,32338,32436
92,32338,32438
93,32338,36914
94,32338,32449
95,32338,32446
96,32338,32433
97,32338,32443
98,32338,32435
99,32338,32447
100,32338,32436
101,32338,32438
102,32338,36914
103,32338,32449
104,32338,32446
105,32338,32433
106,32338,32443
107,32338,32435
108,32338,32447
109,32338,32436
110,32338,32438
111,32338,36914
112,32338,32449
113,32338,32446
114,32338,32433
115,32338,32443
116,32338,32435
117,32338,32447
118,32338,32436
119,32338,32438
120,32338,36914
121,2717,32338
122,2717,32445
123,2717,56341
124,2717,7
125,2717,46504
126,2717,32451
127,2717,32449
128,2717,32446
129,2717,32442
130,2717,32443
131,2717,32450
132,2717,32435
133,2717,32447
134,2717,32439
135,2717,32338
136,2717,32338
137,2714,32445
138,2714,56341
139,2714,7
140,2714,46504
141,2714,32451
142,2714,46505
143,2714,32449
144,2714,32446
145,2714,32443
146,2714,32450
147,2714,32447
148,2714,32439
149,2715,32445
150,2715,56341
151,2715,7
152,2715,46504
153,2715,32451
154,2715,46505
155,2715,32449
156,2715,32446
157,2715,32443
158,2715,32450
159,2715,32447
160,2715,32439
161,2716,32445
162,2716,56341
163,2716,7
164,2716,46504
165,2716,32451
166,2716,46505
167,2716,32449
168,2716,32446
169,2716,32443
170,2716,32450
171,2716,32447
172,2716,32439
173,2718,32445
174,2718,56341
175,2718,7
176,2718,46504
177,2718,32451
178,2718,46505
179,2718,32449
180,2718,32446
181,2718,32443
182,2718,32450
183,2718,32447
184,2718,32439
185,317589,32445
186,317589,56341
187,317589,7
188,317589,46504
189,317589,32434
190,317589,32441
191,317589,32444
192,317589,32440
193,317589,32432
194,317589,32451
195,317589,46505
196,317589,32449
197,317589,32446
198,317589,32442
199,317589,32433
200,317589,32443
201,317589,32450
202,317589,32435
203,317589,32437
204,317589,32438
205,317589,32447
206,317589,32436
207,317589,32448
208,317589,32439
209,317589,8
210,317589,32338
211,317589,32338
212,317589,32338
213,317589,32338
214,317589,32338
215,317589,32338
216,317589,32338
217,317589,32338
218,317589,32338
219,317589,32338
220,317589,32338
221,317589,32338
222,317589,2717
223,317589,2714
224,317589,2715
225,317589,2716
226,317589,2718
227,10,317589
228,10,34573
229,10,34571
230,10,34567
231,10,34572
232,10,34566
233,10,34569
234,10,34568
235,10,34570
236,10,34574
237,513740,317589
238,513742,317589
239,11,317589

1 产业id 消耗量 消耗材料id
2 0 36914 255111.0204 47 32338
3 1 36914 255111.0204 49 32338
4 2 36914 255111.0204 44 32338
5 3 36914 12136238.88 15 32440
6 4 36914 255111.0204 18 46505
7 5 36914 93744.7931 20 32446
8 6 36914 75.22587792 22 32433
9 7 36914 25897.2899 23 32443
10 8 36914 324.0499357 25 32435
11 9 36914 361.9578012 31 32439
12 10 36914 90.93237991 36 56321
13 11 36914 12136238.88 15 32440
14 12 36914 255111.0204 18 46505
15 13 36914 93744.7931 20 32446
16 14 36914 75.22587792 22 32433
17 15 36914 25897.2899 23 32443
18 16 36914 324.0499357 25 32435
19 17 36914 361.9578012 31 32439
20 18 36914 255111.0204 46 32338
21 19 32338 255111.0204 2 32338
22 20 32338 12136238.88 15 32440
23 21 32338 255111.0204 18 46505
24 22 32338 93744.7931 20 32446
25 23 32338 75.22587792 22 32433
26 24 32338 25897.2899 23 32443
27 25 32338 324.0499357 25 32435
28 26 32338 251973.3182 27 32438
29 27 32338 255111.0204 2 32338
30 28 32338 12136238.88 15 32440
31 29 32338 255111.0204 18 46505
32 30 32338 93744.7931 20 32446
33 31 32338 75.22587792 22 32433
34 32 32338 25897.2899 23 32443
35 33 32338 324.0499357 25 32435
36 34 32338 251973.3182 27 32438
37 35 32338 12136238.88 15 32440
38 36 32338 255111.0204 18 46505
39 37 32338 93744.7931 20 32446
40 38 32338 75.22587792 22 32433
41 39 32338 25897.2899 23 32443
42 40 32338 324.0499357 25 32435
43 41 32338 251973.3182 27 32438
44 42 32338 54.21991745 32 56320
45 43 32338 12136238.88 15 32440
46 44 32338 255111.0204 18 46505
47 45 32338 93744.7931 20 32446
48 46 32338 75.22587792 22 32433
49 47 32338 25897.2899 23 32443
50 48 32338 324.0499357 25 32435
51 49 32338 251973.3182 27 32438
52 50 32338 153200.7295 33 56322
53 51 32338 12136238.88 15 32440
54 52 32338 255111.0204 18 46505
55 53 32338 93744.7931 20 32446
56 54 32338 75.22587792 22 32433
57 55 32338 25897.2899 23 32443
58 56 32338 324.0499357 25 32435
59 57 32338 251973.3182 27 32438
60 58 32338 1.058122239 34 56319
61 59 32338 12136238.88 15 32440
62 60 32338 255111.0204 18 46505
63 61 32338 93744.7931 20 32446
64 62 32338 75.22587792 22 32433
65 63 32338 25897.2899 23 32443
66 64 32338 324.0499357 25 32435
67 65 32338 251973.3182 27 32438
68 66 32338 1973.630646 35 56323
69 67 32338 41.8950274 19 32449
70 68 32338 93744.7931 20 32446
71 69 32338 75.22587792 22 32433
72 70 32338 25897.2899 23 32443
73 71 32338 324.0499357 25 32435
74 72 32338 501.5058528 28 32447
75 73 32338 17085.44484 29 32436
76 74 32338 251973.3182 27 32438
77 75 32338 202.540151 40 36914
78 76 32338 41.8950274 19 32449
79 77 32338 93744.7931 20 32446
80 78 32338 75.22587792 22 32433
81 79 32338 25897.2899 23 32443
82 80 32338 324.0499357 25 32435
83 81 32338 501.5058528 28 32447
84 82 32338 17085.44484 29 32436
85 83 32338 251973.3182 27 32438
86 84 32338 202.540151 38 36914
87 85 32338 41.8950274 19 32449
88 86 32338 93744.7931 20 32446
89 87 32338 75.22587792 22 32433
90 88 32338 25897.2899 23 32443
91 89 32338 324.0499357 25 32435
92 90 32338 501.5058528 28 32447
93 91 32338 17085.44484 29 32436
94 92 32338 251973.3182 27 32438
95 93 32338 202.540151 41 36914
96 94 32338 41.8950274 19 32449
97 95 32338 93744.7931 20 32446
98 96 32338 75.22587792 22 32433
99 97 32338 25897.2899 23 32443
100 98 32338 324.0499357 25 32435
101 99 32338 501.5058528 28 32447
102 100 32338 17085.44484 29 32436
103 101 32338 251973.3182 27 32438
104 102 32338 202.540151 39 36914
105 103 32338 41.8950274 19 32449
106 104 32338 93744.7931 20 32446
107 105 32338 75.22587792 22 32433
108 106 32338 25897.2899 23 32443
109 107 32338 324.0499357 25 32435
110 108 32338 501.5058528 28 32447
111 109 32338 17085.44484 29 32436
112 110 32338 251973.3182 27 32438
113 111 32338 202.540151 43 36914
114 112 32338 41.8950274 19 32449
115 113 32338 93744.7931 20 32446
116 114 32338 75.22587792 22 32433
117 115 32338 25897.2899 23 32443
118 116 32338 324.0499357 25 32435
119 117 32338 501.5058528 28 32447
120 118 32338 17085.44484 29 32436
121 119 32338 251973.3182 27 32438
122 120 32338 202.540151 42 36914
123 121 2717 255111.0204 2 32338
124 122 2717 361.9578012 8 32445
125 123 2717 255111.0204 9 56341
126 124 2717 950.9542139 10 7
127 125 2717 361.9578012 11 46504
128 126 2717 2420351.677 17 32451
129 127 2717 41.8950274 19 32449
130 128 2717 93744.7931 20 32446
131 129 2717 121.8232841 21 32442
132 130 2717 25897.2899 23 32443
133 131 2717 8314.140278 24 32450
134 132 2717 324.0499357 25 32435
135 133 2717 501.5058528 28 32447
136 134 2717 361.9578012 31 32439
137 135 2717 255111.0204 44 32338
138 136 2717 255111.0204 45 32338
139 137 2714 361.9578012 8 32445
140 138 2714 255111.0204 9 56341
141 139 2714 950.9542139 10 7
142 140 2714 361.9578012 11 46504
143 141 2714 2420351.677 17 32451
144 142 2714 255111.0204 18 46505
145 143 2714 41.8950274 19 32449
146 144 2714 93744.7931 20 32446
147 145 2714 25897.2899 23 32443
148 146 2714 8314.140278 24 32450
149 147 2714 501.5058528 28 32447
150 148 2714 361.9578012 31 32439
151 149 2715 361.9578012 8 32445
152 150 2715 255111.0204 9 56341
153 151 2715 950.9542139 10 7
154 152 2715 361.9578012 11 46504
155 153 2715 2420351.677 17 32451
156 154 2715 255111.0204 18 46505
157 155 2715 41.8950274 19 32449
158 156 2715 93744.7931 20 32446
159 157 2715 25897.2899 23 32443
160 158 2715 8314.140278 24 32450
161 159 2715 501.5058528 28 32447
162 160 2715 361.9578012 31 32439
163 161 2716 361.9578012 8 32445
164 162 2716 255111.0204 9 56341
165 163 2716 950.9542139 10 7
166 164 2716 361.9578012 11 46504
167 165 2716 2420351.677 17 32451
168 166 2716 255111.0204 18 46505
169 167 2716 41.8950274 19 32449
170 168 2716 93744.7931 20 32446
171 169 2716 25897.2899 23 32443
172 170 2716 8314.140278 24 32450
173 171 2716 501.5058528 28 32447
174 172 2716 361.9578012 31 32439
175 173 2718 361.9578012 8 32445
176 174 2718 255111.0204 9 56341
177 175 2718 950.9542139 10 7
178 176 2718 361.9578012 11 46504
179 177 2718 2420351.677 17 32451
180 178 2718 255111.0204 18 46505
181 179 2718 41.8950274 19 32449
182 180 2718 93744.7931 20 32446
183 181 2718 25897.2899 23 32443
184 182 2718 8314.140278 24 32450
185 183 2718 501.5058528 28 32447
186 184 2718 361.9578012 31 32439
187 185 317589 361.9578012 8 32445
188 186 317589 255111.0204 9 56341
189 187 317589 950.9542139 10 7
190 188 317589 361.9578012 11 46504
191 189 317589 12136238.88 12 32434
192 190 317589 815.5392074 13 32441
193 191 317589 4.812205136 14 32444
194 192 317589 12136238.88 15 32440
195 193 317589 330.6631997 16 32432
196 194 317589 2420351.677 17 32451
197 195 317589 255111.0204 18 46505
198 196 317589 41.8950274 19 32449
199 197 317589 93744.7931 20 32446
200 198 317589 121.8232841 21 32442
201 199 317589 75.22587792 22 32433
202 200 317589 25897.2899 23 32443
203 201 317589 8314.140278 24 32450
204 202 317589 324.0499357 25 32435
205 203 317589 53770.08531 26 32437
206 204 317589 251973.3182 27 32438
207 205 317589 501.5058528 28 32447
208 206 317589 17085.44484 29 32436
209 207 317589 255111.0204 30 32448
210 208 317589 361.9578012 31 32439
211 209 317589 1155.484342 37 8
212 210 317589 255111.0204 44 32338
213 211 317589 255111.0204 45 32338
214 212 317589 255111.0204 46 32338
215 213 317589 255111.0204 47 32338
216 214 317589 255111.0204 48 32338
217 215 317589 255111.0204 49 32338
218 216 317589 255111.0204 50 32338
219 217 317589 255111.0204 51 32338
220 218 317589 255111.0204 52 32338
221 219 317589 255111.0204 53 32338
222 220 317589 255111.0204 54 32338
223 221 317589 255111.0204 55 32338
224 222 317589 0.826657999 90 2717
225 223 317589 0.826657999 91 2714
226 224 317589 1.928868665 92 2715
227 225 317589 0.826657999 93 2716
228 226 317589 16438.82054 94 2718
229 227 10 55482.385 95 317589
230 228 10 7178.474475 101 34573
231 229 10 314.0388569 102 34571
232 230 10 552.0321994 103 34567
233 231 10 865.399695 104 34572
234 232 10 361.9578012 105 34566
235 233 10 272.0475731 106 34569
236 234 10 41.8950274 107 34568
237 235 10 8.783241241 108 34570
238 236 10 153200.7295 109 34574
239 237 513740 55482.385 95 317589
240 238 513742 55482.385 95 317589
241 239 11 55482.385 95 317589

View File

@ -1,216 +1,382 @@
产业id,制造产品id,制造量
0,182,314
1,152,869
1,187,591
2,132,559
3,158,610
3,141,575
3,159,882
4,163,604
4,102,584
4,150,746
5,103,700
5,159,113
6,159,554
6,143,608
6,107,134
7,105,665
7,103,921
8,143,261
8,173,369
9,179,848
10,140,256
11,107,571
12,104,589
12,140,127
12,106,300
13,198,783
14,146,561
15,108,306
15,114,957
15,141,991
16,151,195
16,103,833
16,200,506
17,158,342
17,185,895
17,165,781
18,105,895
19,196,484
19,126,732
20,171,510
20,108,417
21,143,763
21,178,926
22,161,596
23,200,724
23,155,180
23,158,212
24,195,324
25,152,783
25,189,771
26,155,222
26,116,866
26,137,379
27,110,610
27,115,708
28,102,759
29,151,588
29,132,739
29,138,437
30,149,250
31,159,980
32,108,332
32,198,758
32,147,307
33,171,519
33,137,203
33,183,353
34,181,805
34,153,262
35,113,376
36,185,474
36,121,849
36,129,137
37,197,376
37,129,708
37,127,978
38,103,646
38,163,148
38,116,271
39,136,379
40,198,799
40,196,215
40,162,352
41,117,892
41,194,665
41,157,422
42,122,738
42,126,589
43,147,138
43,192,781
43,125,966
44,106,924
44,135,784
45,175,982
45,186,242
46,150,764
46,157,674
47,151,781
48,107,152
49,195,983
50,129,758
51,154,445
51,200,573
52,108,740
52,157,733
52,100,850
53,100,371
54,121,960
55,128,319
56,161,552
56,175,317
57,193,456
58,109,861
58,118,541
58,195,868
59,101,596
59,191,995
59,131,574
60,150,526
61,132,267
62,145,997
62,134,826
62,180,189
63,133,214
63,106,295
64,135,493
65,148,198
65,135,195
65,123,762
66,112,378
66,188,966
66,129,372
67,185,496
68,175,364
68,170,895
68,177,834
69,184,583
69,152,250
69,115,668
70,104,262
70,186,832
71,106,273
72,149,894
73,182,747
73,164,441
74,103,903
75,138,190
75,173,957
76,157,759
76,191,555
77,176,447
77,161,604
77,162,607
78,137,216
79,160,914
80,174,863
81,119,540
81,117,146
81,148,625
82,156,111
82,173,835
82,115,457
83,107,797
83,159,277
84,162,244
84,172,823
84,176,831
85,105,693
85,168,914
85,124,549
86,164,245
87,158,894
87,148,560
88,100,504
88,154,617
88,191,808
89,173,557
90,176,871
91,171,650
91,125,349
91,133,537
92,153,335
93,156,500
93,146,306
93,200,952
94,163,863
94,197,905
95,150,546
95,197,407
95,137,580
96,155,500
96,173,884
97,165,304
98,122,282
98,179,194
98,174,473
99,126,192
99,131,160
99,150,502
100,160,633
100,120,937
101,145,645
101,148,177
102,146,220
103,180,125
104,151,818
104,146,738
104,155,825
105,125,625
105,158,411
106,114,291
106,188,730
106,200,127
107,189,225
107,143,636
,产业id,制造产品id
0,2714,8
1,2714,9
2,2714,10
3,2714,11
4,2714,17
5,2714,18
6,2714,19
7,2714,20
8,2714,23
9,2714,24
10,2714,28
11,2714,31
12,2714,58
13,2714,59
14,2714,61
15,2714,62
16,2714,65
17,2714,66
18,2714,70
19,2715,8
20,2715,9
21,2715,10
22,2715,11
23,2715,17
24,2715,18
25,2715,19
26,2715,20
27,2715,23
28,2715,24
29,2715,28
30,2715,31
31,2715,58
32,2715,59
33,2715,61
34,2715,62
35,2715,65
36,2715,66
37,2715,70
38,2716,8
39,2716,9
40,2716,10
41,2716,11
42,2716,17
43,2716,18
44,2716,19
45,2716,20
46,2716,23
47,2716,24
48,2716,28
49,2716,31
50,2716,58
51,2716,59
52,2716,61
53,2716,62
54,2716,65
55,2716,66
56,2716,70
57,2717,2
58,2717,8
59,2717,9
60,2717,10
61,2717,11
62,2717,17
63,2717,19
64,2717,20
65,2717,21
66,2717,23
67,2717,24
68,2717,25
69,2717,28
70,2717,31
71,2717,44
72,2717,45
73,2717,58
74,2717,59
75,2717,60
76,2717,61
77,2717,62
78,2717,65
79,2717,66
80,2717,67
81,2717,68
82,2718,8
83,2718,9
84,2718,10
85,2718,11
86,2718,17
87,2718,18
88,2718,19
89,2718,20
90,2718,23
91,2718,24
92,2718,28
93,2718,31
94,2718,58
95,2718,59
96,2718,61
97,2718,62
98,2718,65
99,2718,66
100,2718,70
101,32338,2
102,32338,15
103,32338,18
104,32338,20
105,32338,22
106,32338,23
107,32338,25
108,32338,27
109,32338,64
110,32338,67
111,32338,60
112,32338,65
113,32338,71
114,32338,2
115,32338,15
116,32338,18
117,32338,20
118,32338,22
119,32338,23
120,32338,25
121,32338,27
122,32338,64
123,32338,67
124,32338,60
125,32338,65
126,32338,71
127,32338,15
128,32338,18
129,32338,20
130,32338,22
131,32338,23
132,32338,25
133,32338,27
134,32338,32
135,32338,64
136,32338,67
137,32338,60
138,32338,65
139,32338,71
140,32338,15
141,32338,18
142,32338,20
143,32338,22
144,32338,23
145,32338,25
146,32338,27
147,32338,33
148,32338,64
149,32338,67
150,32338,60
151,32338,65
152,32338,71
153,32338,15
154,32338,18
155,32338,20
156,32338,22
157,32338,23
158,32338,25
159,32338,27
160,32338,34
161,32338,64
162,32338,67
163,32338,60
164,32338,65
165,32338,71
166,32338,15
167,32338,18
168,32338,20
169,32338,22
170,32338,23
171,32338,25
172,32338,27
173,32338,35
174,32338,64
175,32338,67
176,32338,60
177,32338,65
178,32338,71
179,32338,19
180,32338,20
181,32338,22
182,32338,23
183,32338,25
184,32338,28
185,32338,29
186,32338,27
187,32338,40
188,32338,60
189,32338,62
190,32338,63
191,32338,64
192,32338,65
193,32338,67
194,32338,68
195,32338,69
196,32338,71
197,32338,72
198,32338,19
199,32338,20
200,32338,22
201,32338,23
202,32338,25
203,32338,28
204,32338,29
205,32338,27
206,32338,38
207,32338,60
208,32338,62
209,32338,63
210,32338,64
211,32338,65
212,32338,67
213,32338,68
214,32338,69
215,32338,71
216,32338,72
217,32338,19
218,32338,20
219,32338,22
220,32338,23
221,32338,25
222,32338,28
223,32338,29
224,32338,27
225,32338,41
226,32338,60
227,32338,62
228,32338,63
229,32338,64
230,32338,65
231,32338,67
232,32338,68
233,32338,69
234,32338,71
235,32338,72
236,32338,19
237,32338,20
238,32338,22
239,32338,23
240,32338,25
241,32338,28
242,32338,29
243,32338,27
244,32338,39
245,32338,60
246,32338,62
247,32338,63
248,32338,64
249,32338,65
250,32338,67
251,32338,68
252,32338,69
253,32338,71
254,32338,72
255,32338,19
256,32338,20
257,32338,22
258,32338,23
259,32338,25
260,32338,28
261,32338,29
262,32338,27
263,32338,43
264,32338,60
265,32338,62
266,32338,63
267,32338,64
268,32338,65
269,32338,67
270,32338,68
271,32338,69
272,32338,71
273,32338,72
274,32338,19
275,32338,20
276,32338,22
277,32338,23
278,32338,25
279,32338,28
280,32338,29
281,32338,27
282,32338,42
283,32338,60
284,32338,62
285,32338,63
286,32338,64
287,32338,65
288,32338,67
289,32338,68
290,32338,69
291,32338,71
292,32338,72
293,36914,47
294,36914,49
295,36914,44
296,36914,15
297,36914,18
298,36914,20
299,36914,22
300,36914,23
301,36914,25
302,36914,31
303,36914,36
304,36914,64
305,36914,67
306,36914,60
307,36914,65
308,36914,71
309,36914,15
310,36914,18
311,36914,20
312,36914,22
313,36914,23
314,36914,25
315,36914,31
316,36914,64
317,36914,67
318,36914,60
319,36914,65
320,36914,71
321,36914,46
322,317589,8
323,317589,9
324,317589,10
325,317589,11
326,317589,12
327,317589,13
328,317589,14
329,317589,15
330,317589,16
331,317589,17
332,317589,18
333,317589,19
334,317589,20
335,317589,21
336,317589,22
337,317589,23
338,317589,24
339,317589,25
340,317589,26
341,317589,27
342,317589,28
343,317589,29
344,317589,30
345,317589,31
346,317589,37
347,317589,44
348,317589,45
349,317589,46
350,317589,47
351,317589,48
352,317589,49
353,317589,50
354,317589,51
355,317589,52
356,317589,53
357,317589,54
358,317589,55
359,317589,58
360,317589,59
361,317589,60
362,317589,61
363,317589,62
364,317589,63
365,317589,64
366,317589,65
367,317589,66
368,317589,67
369,317589,68
370,317589,69
371,317589,70
372,317589,71
373,317589,72
374,317589,73
375,317589,74
376,317589,90
377,317589,91
378,317589,92
379,317589,93
380,317589,94

1 产业id 制造量 制造产品id
2 0 0 2714 314 182 8
3 1 1 2714 869 152 9
4 2 1 2714 591 187 10
5 3 2 2714 559 132 11
6 4 3 2714 610 158 17
7 5 3 2714 575 141 18
8 6 3 2714 882 159 19
9 7 4 2714 604 163 20
10 8 4 2714 584 102 23
11 9 4 2714 746 150 24
12 10 5 2714 700 103 28
13 11 5 2714 113 159 31
14 12 6 2714 554 159 58
15 13 6 2714 608 143 59
16 14 6 2714 134 107 61
17 15 7 2714 665 105 62
18 16 7 2714 921 103 65
19 17 8 2714 261 143 66
20 18 8 2714 369 173 70
21 19 9 2715 848 179 8
22 20 10 2715 256 140 9
23 21 11 2715 571 107 10
24 22 12 2715 589 104 11
25 23 12 2715 127 140 17
26 24 12 2715 300 106 18
27 25 13 2715 783 198 19
28 26 14 2715 561 146 20
29 27 15 2715 306 108 23
30 28 15 2715 957 114 24
31 29 15 2715 991 141 28
32 30 16 2715 195 151 31
33 31 16 2715 833 103 58
34 32 16 2715 506 200 59
35 33 17 2715 342 158 61
36 34 17 2715 895 185 62
37 35 17 2715 781 165 65
38 36 18 2715 895 105 66
39 37 19 2715 484 196 70
40 38 19 2716 732 126 8
41 39 20 2716 510 171 9
42 40 20 2716 417 108 10
43 41 21 2716 763 143 11
44 42 21 2716 926 178 17
45 43 22 2716 596 161 18
46 44 23 2716 724 200 19
47 45 23 2716 180 155 20
48 46 23 2716 212 158 23
49 47 24 2716 324 195 24
50 48 25 2716 783 152 28
51 49 25 2716 771 189 31
52 50 26 2716 222 155 58
53 51 26 2716 866 116 59
54 52 26 2716 379 137 61
55 53 27 2716 610 110 62
56 54 27 2716 708 115 65
57 55 28 2716 759 102 66
58 56 29 2716 588 151 70
59 57 29 2717 739 132 2
60 58 29 2717 437 138 8
61 59 30 2717 250 149 9
62 60 31 2717 980 159 10
63 61 32 2717 332 108 11
64 62 32 2717 758 198 17
65 63 32 2717 307 147 19
66 64 33 2717 519 171 20
67 65 33 2717 203 137 21
68 66 33 2717 353 183 23
69 67 34 2717 805 181 24
70 68 34 2717 262 153 25
71 69 35 2717 376 113 28
72 70 36 2717 474 185 31
73 71 36 2717 849 121 44
74 72 36 2717 137 129 45
75 73 37 2717 376 197 58
76 74 37 2717 708 129 59
77 75 37 2717 978 127 60
78 76 38 2717 646 103 61
79 77 38 2717 148 163 62
80 78 38 2717 271 116 65
81 79 39 2717 379 136 66
82 80 40 2717 799 198 67
83 81 40 2717 215 196 68
84 82 40 2718 352 162 8
85 83 41 2718 892 117 9
86 84 41 2718 665 194 10
87 85 41 2718 422 157 11
88 86 42 2718 738 122 17
89 87 42 2718 589 126 18
90 88 43 2718 138 147 19
91 89 43 2718 781 192 20
92 90 43 2718 966 125 23
93 91 44 2718 924 106 24
94 92 44 2718 784 135 28
95 93 45 2718 982 175 31
96 94 45 2718 242 186 58
97 95 46 2718 764 150 59
98 96 46 2718 674 157 61
99 97 47 2718 781 151 62
100 98 48 2718 152 107 65
101 99 49 2718 983 195 66
102 100 50 2718 758 129 70
103 101 51 32338 445 154 2
104 102 51 32338 573 200 15
105 103 52 32338 740 108 18
106 104 52 32338 733 157 20
107 105 52 32338 850 100 22
108 106 53 32338 371 100 23
109 107 54 32338 960 121 25
110 108 55 32338 319 128 27
111 109 56 32338 552 161 64
112 110 56 32338 317 175 67
113 111 57 32338 456 193 60
114 112 58 32338 861 109 65
115 113 58 32338 541 118 71
116 114 58 32338 868 195 2
117 115 59 32338 596 101 15
118 116 59 32338 995 191 18
119 117 59 32338 574 131 20
120 118 60 32338 526 150 22
121 119 61 32338 267 132 23
122 120 62 32338 997 145 25
123 121 62 32338 826 134 27
124 122 62 32338 189 180 64
125 123 63 32338 214 133 67
126 124 63 32338 295 106 60
127 125 64 32338 493 135 65
128 126 65 32338 198 148 71
129 127 65 32338 195 135 15
130 128 65 32338 762 123 18
131 129 66 32338 378 112 20
132 130 66 32338 966 188 22
133 131 66 32338 372 129 23
134 132 67 32338 496 185 25
135 133 68 32338 364 175 27
136 134 68 32338 895 170 32
137 135 68 32338 834 177 64
138 136 69 32338 583 184 67
139 137 69 32338 250 152 60
140 138 69 32338 668 115 65
141 139 70 32338 262 104 71
142 140 70 32338 832 186 15
143 141 71 32338 273 106 18
144 142 72 32338 894 149 20
145 143 73 32338 747 182 22
146 144 73 32338 441 164 23
147 145 74 32338 903 103 25
148 146 75 32338 190 138 27
149 147 75 32338 957 173 33
150 148 76 32338 759 157 64
151 149 76 32338 555 191 67
152 150 77 32338 447 176 60
153 151 77 32338 604 161 65
154 152 77 32338 607 162 71
155 153 78 32338 216 137 15
156 154 79 32338 914 160 18
157 155 80 32338 863 174 20
158 156 81 32338 540 119 22
159 157 81 32338 146 117 23
160 158 81 32338 625 148 25
161 159 82 32338 111 156 27
162 160 82 32338 835 173 34
163 161 82 32338 457 115 64
164 162 83 32338 797 107 67
165 163 83 32338 277 159 60
166 164 84 32338 244 162 65
167 165 84 32338 823 172 71
168 166 84 32338 831 176 15
169 167 85 32338 693 105 18
170 168 85 32338 914 168 20
171 169 85 32338 549 124 22
172 170 86 32338 245 164 23
173 171 87 32338 894 158 25
174 172 87 32338 560 148 27
175 173 88 32338 504 100 35
176 174 88 32338 617 154 64
177 175 88 32338 808 191 67
178 176 89 32338 557 173 60
179 177 90 32338 871 176 65
180 178 91 32338 650 171 71
181 179 91 32338 349 125 19
182 180 91 32338 537 133 20
183 181 92 32338 335 153 22
184 182 93 32338 500 156 23
185 183 93 32338 306 146 25
186 184 93 32338 952 200 28
187 185 94 32338 863 163 29
188 186 94 32338 905 197 27
189 187 95 32338 546 150 40
190 188 95 32338 407 197 60
191 189 95 32338 580 137 62
192 190 96 32338 500 155 63
193 191 96 32338 884 173 64
194 192 97 32338 304 165 65
195 193 98 32338 282 122 67
196 194 98 32338 194 179 68
197 195 98 32338 473 174 69
198 196 99 32338 192 126 71
199 197 99 32338 160 131 72
200 198 99 32338 502 150 19
201 199 100 32338 633 160 20
202 200 100 32338 937 120 22
203 201 101 32338 645 145 23
204 202 101 32338 177 148 25
205 203 102 32338 220 146 28
206 204 103 32338 125 180 29
207 205 104 32338 818 151 27
208 206 104 32338 738 146 38
209 207 104 32338 825 155 60
210 208 105 32338 625 125 62
211 209 105 32338 411 158 63
212 210 106 32338 291 114 64
213 211 106 32338 730 188 65
214 212 106 32338 127 200 67
215 213 107 32338 225 189 68
216 214 107 32338 636 143 69
217 215 32338 71
218 216 32338 72
219 217 32338 19
220 218 32338 20
221 219 32338 22
222 220 32338 23
223 221 32338 25
224 222 32338 28
225 223 32338 29
226 224 32338 27
227 225 32338 41
228 226 32338 60
229 227 32338 62
230 228 32338 63
231 229 32338 64
232 230 32338 65
233 231 32338 67
234 232 32338 68
235 233 32338 69
236 234 32338 71
237 235 32338 72
238 236 32338 19
239 237 32338 20
240 238 32338 22
241 239 32338 23
242 240 32338 25
243 241 32338 28
244 242 32338 29
245 243 32338 27
246 244 32338 39
247 245 32338 60
248 246 32338 62
249 247 32338 63
250 248 32338 64
251 249 32338 65
252 250 32338 67
253 251 32338 68
254 252 32338 69
255 253 32338 71
256 254 32338 72
257 255 32338 19
258 256 32338 20
259 257 32338 22
260 258 32338 23
261 259 32338 25
262 260 32338 28
263 261 32338 29
264 262 32338 27
265 263 32338 43
266 264 32338 60
267 265 32338 62
268 266 32338 63
269 267 32338 64
270 268 32338 65
271 269 32338 67
272 270 32338 68
273 271 32338 69
274 272 32338 71
275 273 32338 72
276 274 32338 19
277 275 32338 20
278 276 32338 22
279 277 32338 23
280 278 32338 25
281 279 32338 28
282 280 32338 29
283 281 32338 27
284 282 32338 42
285 283 32338 60
286 284 32338 62
287 285 32338 63
288 286 32338 64
289 287 32338 65
290 288 32338 67
291 289 32338 68
292 290 32338 69
293 291 32338 71
294 292 32338 72
295 293 36914 47
296 294 36914 49
297 295 36914 44
298 296 36914 15
299 297 36914 18
300 298 36914 20
301 299 36914 22
302 300 36914 23
303 301 36914 25
304 302 36914 31
305 303 36914 36
306 304 36914 64
307 305 36914 67
308 306 36914 60
309 307 36914 65
310 308 36914 71
311 309 36914 15
312 310 36914 18
313 311 36914 20
314 312 36914 22
315 313 36914 23
316 314 36914 25
317 315 36914 31
318 316 36914 64
319 317 36914 67
320 318 36914 60
321 319 36914 65
322 320 36914 71
323 321 36914 46
324 322 317589 8
325 323 317589 9
326 324 317589 10
327 325 317589 11
328 326 317589 12
329 327 317589 13
330 328 317589 14
331 329 317589 15
332 330 317589 16
333 331 317589 17
334 332 317589 18
335 333 317589 19
336 334 317589 20
337 335 317589 21
338 336 317589 22
339 337 317589 23
340 338 317589 24
341 339 317589 25
342 340 317589 26
343 341 317589 27
344 342 317589 28
345 343 317589 29
346 344 317589 30
347 345 317589 31
348 346 317589 37
349 347 317589 44
350 348 317589 45
351 349 317589 46
352 350 317589 47
353 351 317589 48
354 352 317589 49
355 353 317589 50
356 354 317589 51
357 355 317589 52
358 356 317589 53
359 357 317589 54
360 358 317589 55
361 359 317589 58
362 360 317589 59
363 361 317589 60
364 362 317589 61
365 363 317589 62
366 364 317589 63
367 365 317589 64
368 366 317589 65
369 367 317589 66
370 368 317589 67
371 369 317589 68
372 370 317589 69
373 371 317589 70
374 372 317589 71
375 373 317589 72
376 374 317589 73
377 375 317589 74
378 376 317589 90
379 377 317589 91
380 378 317589 92
381 379 317589 93
382 380 317589 94

View File

@ -1,224 +1,418 @@
ID,UPID
36914,32338
36914,32440
36914,46505
36914,32446
36914,32433
36914,32443
36914,32435
36914,32439
36914,56321
36914,34525
36914,34527
36914,34526
36914,34530
36914,34531
32338,32338
32338,32440
32338,46505
32338,32446
32338,32433
32338,32443
32338,32435
32338,32438
32338,34525
32338,34527
32338,34526
32338,34530
32338,34531
32338,56320
32338,56322
32338,56319
32338,56323
32338,32449
32338,32447
32338,32436
32338,36914
32338,34537
32338,34534
32338,34539
32338,34528
32338,34524
9,2515
9,2514
2717,32338
2717,32445
2717,56341
2717,7
2717,46504
2717,32451
2717,32449
2717,32446
2717,32442
2717,32443
2717,32450
2717,32435
2717,32447
2717,32439
2717,9
2717,34535
2717,34526
2717,34529
2717,34537
2717,34530
2717,34533
2717,34527
2717,34539
2714,32445
2714,56341
2714,7
2714,46504
2714,32451
2714,46505
2714,32449
2714,32446
2714,32443
2714,32450
2714,32447
2714,32439
2714,9
2714,34535
2714,34529
2714,34537
2714,34530
2714,34533
2714,34543
2715,32445
2715,56341
2715,7
2715,46504
2715,32451
2715,46505
2715,32449
2715,32446
2715,32443
2715,32450
2715,32447
2715,32439
2715,9
2715,34535
2715,34529
2715,34537
2715,34530
2715,34533
2715,34543
2716,32445
2716,56341
2716,7
2716,46504
2716,32451
2716,46505
2716,32449
2716,32446
2716,32443
2716,32450
2716,32447
2716,32439
2716,9
2716,34535
2716,34529
2716,34537
2716,34530
2716,34533
2716,34543
2718,32445
2718,56341
2718,7
2718,46504
2718,32451
2718,46505
2718,32449
2718,32446
2718,32443
2718,32450
2718,32447
2718,32439
2718,9
2718,34535
2718,34529
2718,34537
2718,34530
2718,34533
2718,34543
317589,32445
317589,56341
317589,7
317589,46504
317589,32434
317589,32441
317589,32444
317589,32440
317589,32432
317589,32451
317589,46505
317589,32449
317589,32446
317589,32442
317589,32433
317589,32443
317589,32450
317589,32435
317589,32437
317589,32438
317589,32447
317589,32436
317589,32448
317589,32439
317589,8
317589,32338
317589,9
317589,34535
317589,34526
317589,34529
317589,34537
317589,34534
317589,34525
317589,34530
317589,34533
317589,34527
317589,34539
317589,34528
317589,34543
317589,34531
317589,34524
317589,34532
317589,34538
317589,2717
317589,2714
317589,2715
317589,2716
317589,2718
317589,513738
10,34550
10,34555
10,34553
10,34545
10,34552
10,34544
10,34546
10,34549
10,34558
10,34547
10,34551
10,34548
10,317589
10,513738
10,513740
10,513742
10,11
10,34573
10,34571
10,34567
10,34572
10,34566
10,34569
10,34568
10,34570
10,34574
513738,9
513740,34556
513740,317589
513742,34557
513742,317589
11,34554
11,317589
ID,UPID
38,47
39,49
40,44
41,15
41,18
41,20
41,22
41,23
41,25
41,31
41,36
41,60
41,64
41,65
41,67
41,71
42,15
42,18
42,20
42,22
42,23
42,25
42,31
42,60
42,64
42,65
42,67
42,71
43,46
44,15
44,18
44,7
44,20
44,22
44,23
44,25
44,27
44,60
44,64
44,65
44,67
44,71
45,15
45,18
45,7
45,20
45,22
45,23
45,25
45,27
45,60
45,64
45,65
45,67
45,71
46,15
46,18
46,20
46,22
46,23
46,25
46,27
46,32
46,60
46,64
46,65
46,67
46,71
47,15
47,18
47,20
47,22
47,23
47,25
47,27
47,33
47,60
47,64
47,65
47,67
47,71
48,15
48,18
48,20
48,22
48,23
48,25
48,27
48,34
48,60
48,64
48,65
48,67
48,71
49,15
49,18
49,20
49,22
49,23
49,25
49,27
49,35
49,60
49,64
49,65
49,67
49,71
50,19
50,20
50,22
50,23
50,25
50,27
50,28
50,29
50,40
50,60
50,62
50,63
50,64
50,65
50,67
50,68
50,69
50,71
50,72
51,19
51,20
51,22
51,23
51,25
51,27
51,28
51,29
51,38
51,60
51,62
51,63
51,64
51,65
51,67
51,68
51,69
51,71
51,72
52,19
52,20
52,22
52,23
52,25
52,27
52,28
52,29
52,41
52,60
52,62
52,63
52,64
52,65
52,67
52,68
52,69
52,71
52,72
53,19
53,20
53,22
53,23
53,25
53,27
53,28
53,29
53,39
53,60
53,62
53,63
53,64
53,65
53,67
53,68
53,69
53,71
53,72
54,19
54,20
54,22
54,23
54,25
54,27
54,28
54,29
54,43
54,60
54,62
54,63
54,64
54,65
54,67
54,68
54,69
54,71
54,72
55,19
55,20
55,22
55,23
55,25
55,27
55,28
55,29
55,42
55,60
55,62
55,63
55,64
55,65
55,67
55,68
55,69
55,71
55,72
58,56
58,57
90,10
90,11
90,17
90,19
90,7
90,20
90,21
90,23
90,24
90,25
90,28
90,31
90,44
90,45
90,58
90,59
90,60
90,61
90,62
90,65
90,66
90,67
90,68
90,8
90,9
91,10
91,11
91,17
91,18
91,19
91,20
91,23
91,24
91,28
91,31
91,58
91,59
91,61
91,62
91,65
91,66
91,70
91,8
91,9
92,10
92,11
92,17
92,18
92,19
92,20
92,23
92,24
92,28
92,31
92,58
92,59
92,61
92,62
92,65
92,66
92,70
92,8
92,9
93,10
93,11
93,17
93,18
93,19
93,20
93,23
93,24
93,28
93,31
93,58
93,59
93,61
93,62
93,65
93,66
93,70
93,8
93,9
94,10
94,11
94,17
94,18
94,19
94,20
94,23
94,24
94,28
94,31
94,58
94,59
94,61
94,62
94,65
94,66
94,70
94,8
94,9
95,10
95,11
95,12
95,13
95,14
95,15
95,16
95,17
95,18
95,19
95,20
95,21
95,22
95,23
95,24
95,25
95,26
95,27
95,28
95,29
95,30
95,31
95,37
95,44
95,45
95,46
95,47
95,48
95,49
95,50
95,51
95,52
95,53
95,54
95,55
95,58
95,59
95,60
95,61
95,62
95,63
95,64
95,65
95,66
95,67
95,68
95,69
95,70
95,71
95,72
95,73
95,74
95,8
95,9
95,90
95,91
95,92
95,93
95,94
95,97
96,100
96,101
96,102
96,103
96,104
96,105
96,106
96,107
96,108
96,109
96,75
96,76
96,80
96,81
96,82
96,83
96,84
96,85
96,86
96,87
96,88
96,89
96,95
96,97
96,98
96,99
97,58
98,78
98,95
99,79
99,95
100,77
100,95

1 ID UPID
2 36914 38 32338 47
3 36914 39 32440 49
4 36914 40 46505 44
5 36914 41 32446 15
6 36914 41 32433 18
7 36914 41 32443 20
8 36914 41 32435 22
9 36914 41 32439 23
10 36914 41 56321 25
11 36914 41 34525 31
12 36914 41 34527 36
13 36914 41 34526 60
14 36914 41 34530 64
15 36914 41 34531 65
16 32338 41 32338 67
17 32338 41 32440 71
18 32338 42 46505 15
19 32338 42 32446 18
20 32338 42 32433 20
21 32338 42 32443 22
22 32338 42 32435 23
23 32338 42 32438 25
24 32338 42 34525 31
25 32338 42 34527 60
26 32338 42 34526 64
27 32338 42 34530 65
28 32338 42 34531 67
29 32338 42 56320 71
30 32338 43 56322 46
31 32338 44 56319 15
32 32338 44 56323 18
33 32338 44 32449 7
34 32338 44 32447 20
35 32338 44 32436 22
36 32338 44 36914 23
37 32338 44 34537 25
38 32338 44 34534 27
39 32338 44 34539 60
40 32338 44 34528 64
41 32338 44 34524 65
42 9 44 2515 67
43 9 44 2514 71
44 2717 45 32338 15
45 2717 45 32445 18
46 2717 45 56341 7
47 2717 45 7 20
48 2717 45 46504 22
49 2717 45 32451 23
50 2717 45 32449 25
51 2717 45 32446 27
52 2717 45 32442 60
53 2717 45 32443 64
54 2717 45 32450 65
55 2717 45 32435 67
56 2717 45 32447 71
57 2717 46 32439 15
58 2717 46 9 18
59 2717 46 34535 20
60 2717 46 34526 22
61 2717 46 34529 23
62 2717 46 34537 25
63 2717 46 34530 27
64 2717 46 34533 32
65 2717 46 34527 60
66 2717 46 34539 64
67 2714 46 32445 65
68 2714 46 56341 67
69 2714 46 7 71
70 2714 47 46504 15
71 2714 47 32451 18
72 2714 47 46505 20
73 2714 47 32449 22
74 2714 47 32446 23
75 2714 47 32443 25
76 2714 47 32450 27
77 2714 47 32447 33
78 2714 47 32439 60
79 2714 47 9 64
80 2714 47 34535 65
81 2714 47 34529 67
82 2714 47 34537 71
83 2714 48 34530 15
84 2714 48 34533 18
85 2714 48 34543 20
86 2715 48 32445 22
87 2715 48 56341 23
88 2715 48 7 25
89 2715 48 46504 27
90 2715 48 32451 34
91 2715 48 46505 60
92 2715 48 32449 64
93 2715 48 32446 65
94 2715 48 32443 67
95 2715 48 32450 71
96 2715 49 32447 15
97 2715 49 32439 18
98 2715 49 9 20
99 2715 49 34535 22
100 2715 49 34529 23
101 2715 49 34537 25
102 2715 49 34530 27
103 2715 49 34533 35
104 2715 49 34543 60
105 2716 49 32445 64
106 2716 49 56341 65
107 2716 49 7 67
108 2716 49 46504 71
109 2716 50 32451 19
110 2716 50 46505 20
111 2716 50 32449 22
112 2716 50 32446 23
113 2716 50 32443 25
114 2716 50 32450 27
115 2716 50 32447 28
116 2716 50 32439 29
117 2716 50 9 40
118 2716 50 34535 60
119 2716 50 34529 62
120 2716 50 34537 63
121 2716 50 34530 64
122 2716 50 34533 65
123 2716 50 34543 67
124 2718 50 32445 68
125 2718 50 56341 69
126 2718 50 7 71
127 2718 50 46504 72
128 2718 51 32451 19
129 2718 51 46505 20
130 2718 51 32449 22
131 2718 51 32446 23
132 2718 51 32443 25
133 2718 51 32450 27
134 2718 51 32447 28
135 2718 51 32439 29
136 2718 51 9 38
137 2718 51 34535 60
138 2718 51 34529 62
139 2718 51 34537 63
140 2718 51 34530 64
141 2718 51 34533 65
142 2718 51 34543 67
143 317589 51 32445 68
144 317589 51 56341 69
145 317589 51 7 71
146 317589 51 46504 72
147 317589 52 32434 19
148 317589 52 32441 20
149 317589 52 32444 22
150 317589 52 32440 23
151 317589 52 32432 25
152 317589 52 32451 27
153 317589 52 46505 28
154 317589 52 32449 29
155 317589 52 32446 41
156 317589 52 32442 60
157 317589 52 32433 62
158 317589 52 32443 63
159 317589 52 32450 64
160 317589 52 32435 65
161 317589 52 32437 67
162 317589 52 32438 68
163 317589 52 32447 69
164 317589 52 32436 71
165 317589 52 32448 72
166 317589 53 32439 19
167 317589 53 8 20
168 317589 53 32338 22
169 317589 53 9 23
170 317589 53 34535 25
171 317589 53 34526 27
172 317589 53 34529 28
173 317589 53 34537 29
174 317589 53 34534 39
175 317589 53 34525 60
176 317589 53 34530 62
177 317589 53 34533 63
178 317589 53 34527 64
179 317589 53 34539 65
180 317589 53 34528 67
181 317589 53 34543 68
182 317589 53 34531 69
183 317589 53 34524 71
184 317589 53 34532 72
185 317589 54 34538 19
186 317589 54 2717 20
187 317589 54 2714 22
188 317589 54 2715 23
189 317589 54 2716 25
190 317589 54 2718 27
191 317589 54 513738 28
192 10 54 34550 29
193 10 54 34555 43
194 10 54 34553 60
195 10 54 34545 62
196 10 54 34552 63
197 10 54 34544 64
198 10 54 34546 65
199 10 54 34549 67
200 10 54 34558 68
201 10 54 34547 69
202 10 54 34551 71
203 10 54 34548 72
204 10 55 317589 19
205 10 55 513738 20
206 10 55 513740 22
207 10 55 513742 23
208 10 55 11 25
209 10 55 34573 27
210 10 55 34571 28
211 10 55 34567 29
212 10 55 34572 42
213 10 55 34566 60
214 10 55 34569 62
215 10 55 34568 63
216 10 55 34570 64
217 10 55 34574 65
218 513738 55 9 67
219 513740 55 34556 68
220 513740 55 317589 69
221 513742 55 34557 71
222 513742 55 317589 72
223 11 58 34554 56
224 11 58 317589 57
225 90 10
226 90 11
227 90 17
228 90 19
229 90 7
230 90 20
231 90 21
232 90 23
233 90 24
234 90 25
235 90 28
236 90 31
237 90 44
238 90 45
239 90 58
240 90 59
241 90 60
242 90 61
243 90 62
244 90 65
245 90 66
246 90 67
247 90 68
248 90 8
249 90 9
250 91 10
251 91 11
252 91 17
253 91 18
254 91 19
255 91 20
256 91 23
257 91 24
258 91 28
259 91 31
260 91 58
261 91 59
262 91 61
263 91 62
264 91 65
265 91 66
266 91 70
267 91 8
268 91 9
269 92 10
270 92 11
271 92 17
272 92 18
273 92 19
274 92 20
275 92 23
276 92 24
277 92 28
278 92 31
279 92 58
280 92 59
281 92 61
282 92 62
283 92 65
284 92 66
285 92 70
286 92 8
287 92 9
288 93 10
289 93 11
290 93 17
291 93 18
292 93 19
293 93 20
294 93 23
295 93 24
296 93 28
297 93 31
298 93 58
299 93 59
300 93 61
301 93 62
302 93 65
303 93 66
304 93 70
305 93 8
306 93 9
307 94 10
308 94 11
309 94 17
310 94 18
311 94 19
312 94 20
313 94 23
314 94 24
315 94 28
316 94 31
317 94 58
318 94 59
319 94 61
320 94 62
321 94 65
322 94 66
323 94 70
324 94 8
325 94 9
326 95 10
327 95 11
328 95 12
329 95 13
330 95 14
331 95 15
332 95 16
333 95 17
334 95 18
335 95 19
336 95 20
337 95 21
338 95 22
339 95 23
340 95 24
341 95 25
342 95 26
343 95 27
344 95 28
345 95 29
346 95 30
347 95 31
348 95 37
349 95 44
350 95 45
351 95 46
352 95 47
353 95 48
354 95 49
355 95 50
356 95 51
357 95 52
358 95 53
359 95 54
360 95 55
361 95 58
362 95 59
363 95 60
364 95 61
365 95 62
366 95 63
367 95 64
368 95 65
369 95 66
370 95 67
371 95 68
372 95 69
373 95 70
374 95 71
375 95 72
376 95 73
377 95 74
378 95 8
379 95 9
380 95 90
381 95 91
382 95 92
383 95 93
384 95 94
385 95 97
386 96 100
387 96 101
388 96 102
389 96 103
390 96 104
391 96 105
392 96 106
393 96 107
394 96 108
395 96 109
396 96 75
397 96 76
398 96 80
399 96 81
400 96 82
401 96 83
402 96 84
403 96 85
404 96 86
405 96 87
406 96 88
407 96 89
408 96 95
409 96 97
410 96 98
411 96 99
412 97 58
413 98 78
414 98 95
415 99 79
416 99 95
417 100 77
418 100 95

View File

@ -9,10 +9,14 @@ from mesa.space import MultiGrid, NetworkGrid
from mesa.datacollection import DataCollector
import numpy as np
from mesa_viz_tornado.modules import NetworkModule
from firm import FirmAgent
from orm import db_session, Result
from product import ProductAgent
from mesa.visualization import ModularServer
class MyModel(Model):
def __init__(self, params):
@ -83,6 +87,7 @@ class MyModel(Model):
data = pd.read_csv('input_data/input_product_data/BomNodes.csv')
data['Code'] = data['Code'].astype('string')
self.type2 = data
self.id_code = data.groupby('Code')['Index'].apply(list)
# 设备c折旧比值
###
@ -95,7 +100,7 @@ class MyModel(Model):
firm.fillna(0, inplace=True)
firm_attr = firm.loc[:, ["Code", "Type_Region", "Revenue_Log", "原材料", "设备数量", "库存商品"]]
firm_attr = firm.loc[:, ["Code", "Type_Region", "Revenue_Log"]]
firm_industry_relation = pd.read_csv("input_data/firm_industry_relation.csv")
firm_industry_relation['Firm_Code'] = firm_industry_relation['Firm_Code'].astype('string')
@ -108,8 +113,20 @@ class MyModel(Model):
firm_attr['Product_Code'] = firm_attr['Code'].map(grouped)
firm_attr.set_index('Code', inplace=True)
self.G_Firm.add_nodes_from(firm["Code"])
grouped = firm_industry_relation.groupby('Firm_Code')
self.firm_prod_labels_dict = {code: group['Product_Code'].tolist() for code, group in grouped}
# 遍历'Product_Code' 与 index 交换
for index, row in firm_attr.iterrows():
id_index_list = []
for i in row['Product_Code']:
for key_values in self.id_code.items():
if int(key_values[0]) == i:
for id in key_values[1]:
id_index_list.append(id)
firm_attr.at[index, 'Product_Code'] = id_index_list
self.G_Firm.add_nodes_from(firm["Code"])
# Assign attributes to the firm nodes
firm_labels_dict = {code: firm_attr.loc[code].to_dict() for code in self.G_Firm.nodes}
nx.set_node_attributes(self.G_Firm, firm_labels_dict)
@ -120,13 +137,20 @@ class MyModel(Model):
firm_industry_relation = pd.read_csv("input_data/firm_industry_relation.csv")
firm_industry_relation['Firm_Code'] = firm_industry_relation['Firm_Code'].astype('string')
firm_industry_relation['Product_Code'] = firm_industry_relation['Product_Code'].apply(lambda x: [x])
# 将 'firm_prod' 表中的每一行作为图中的节点
self.G_FirmProd.add_nodes_from(firm_industry_relation.index)
# 为每个节点分配属性
grouped = firm_industry_relation.groupby('Firm_Code')
self.firm_prod_labels_dict = {code: group['Product_Code'].tolist() for code, group in grouped}
# 遍历'Product_Code' 与 index 交换
for index, row in firm_industry_relation.iterrows():
id_index_list = []
for i in row['Product_Code']:
for key_values in self.id_code.items():
if int(key_values[0]) == i:
for id in key_values[1]:
id_index_list.append(id)
firm_industry_relation.at[index, 'Product_Code'] = id_index_list
firm_prod_labels_dict = {code: firm_industry_relation.loc[code].to_dict() for code in
firm_industry_relation.index}
@ -137,15 +161,6 @@ class MyModel(Model):
# Add edges to G_Firm according to G_bom
for node in nx.nodes(self.G_Firm):
lst_pred_product_code = []
product_code = self.G_Firm.nodes[node].get('Product_Code')
# 打印值和类型
#print(f"节点 {node} 的 'Product_Code': {product_code}, 类型: {type(product_code)}")
# 如果 'Product_Code' 是 float 类型或单个值,将其转换为列表
if isinstance(product_code, float):
#print(f"警告: 节点 {node} 的 'Product_Code' 为浮点数,已转换为列表")
product_code = [product_code] # 将浮点数包装为列表
for product_code in self.G_Firm.nodes[node]['Product_Code']:
lst_pred_product_code += list(self.G_bom.predecessors(product_code))
lst_pred_product_code = list(set(lst_pred_product_code))
@ -185,7 +200,6 @@ class MyModel(Model):
# 直接进行随机选择
lst_choose_firm = self.nprandom.choice(lst_pred_firm, n_pred_firm, replace=False)
# Add edges from predecessor firms to current node (firm)
lst_add_edge = [(pred_firm, node, {'Product': pred_product_code}) for pred_firm in lst_choose_firm]
self.G_Firm.add_edges_from(lst_add_edge)
@ -199,21 +213,46 @@ class MyModel(Model):
set_pred_succ_code = set(self.G_bom.successors(pred_product_code))
lst_use_pred_prod_code = list(set_node_prod_code & set_pred_succ_code)
if len(lst_use_pred_prod_code) == 0:
print("错误")
pred_node_list = []
for pred_firm in lst_choose_firm:
pred_node = [n for n, v in self.G_FirmProd.nodes(data=True) if
v['Firm_Code'] == pred_firm and v['Product_Code'] == pred_product_code][0]
for n, v in self.G_FirmProd.nodes(data=True):
for v1 in v['Product_Code']:
if v1 == pred_product_code and v['Firm_Code'] == pred_firm:
pred_node_list.append(n)
if len(pred_node_list) != 0:
pred_node = pred_node_list[0]
else:
pred_node = -1
current_node_list = []
for use_pred_prod_code in lst_use_pred_prod_code:
current_node = [n for n, v in self.G_FirmProd.nodes(data=True) if
v['Firm_Code'] == node and v['Product_Code'] == use_pred_prod_code][0]
for n, v in self.G_FirmProd.nodes(data=True):
for v1 in v['Product_Code']:
if v1 == use_pred_prod_code and v['Firm_Code'] == node:
current_node_list.append(n)
if len(current_node_list) != 0:
current_node = current_node_list[0]
else:
current_node = -1
if current_node != -1 and pred_node != -1:
self.G_FirmProd.add_edge(pred_node, current_node)
def connect_unconnected_nodes(self):
""" Connect unconnected nodes in the firm network """
for node in nx.nodes(self.G_Firm):
if self.G_Firm.degree(node) == 0:
current_node_list = []
for product_code in self.G_Firm.nodes[node]['Product_Code']:
current_node = [n for n, v in self.G_FirmProd.nodes(data=True) if
v['Firm_Code'] == node and v['Product_Code'] == product_code][0]
for n, v in self.G_FirmProd.nodes(data=True):
for v1 in v['Product_Code']:
if v['Firm_Code'] == node and v1 == product_code:
current_node_list.append(n)
if len(current_node_list) != 0:
current_node = current_node_list[0]
else:
current_node = -1
lst_succ_product_code = list(self.G_bom.successors(product_code))
for succ_product_code in lst_succ_product_code:
@ -227,7 +266,22 @@ class MyModel(Model):
if self.is_prf_size:
lst_succ_firm_size = [self.G_Firm.nodes[succ_firm]['Revenue_Log'] for succ_firm in
lst_succ_firm]
lst_prob = [size / sum(lst_succ_firm_size) for size in lst_succ_firm_size]
if len(lst_succ_firm_size) == 0 or sum(lst_succ_firm_size) == 0:
# print("警告: lst_pred_firm_size 为空或总和为 0无法生成概率分布")
lst_choose_firm = [] # 返回空结果,或根据需要处理
else:
# 计算总和
sum_pred_firm_size = sum(lst_succ_firm_size)
# 归一化生成 lst_prob
lst_prob = [size / sum_pred_firm_size for size in lst_succ_firm_size]
# 使用 np.isclose() 确保概率总和接近 1
if not np.isclose(sum(lst_prob), 1.0):
# print(f"警告: 概率总和为 {sum(lst_prob)},现在进行修正")
lst_prob = [prob / sum(lst_prob) for prob in lst_prob]
# 确保没有负值或 0
lst_prob = [max(0, prob) for prob in lst_prob]
lst_choose_firm = self.nprandom.choice(lst_succ_firm, n_succ_firm, replace=False,
p=lst_prob)
else:
@ -238,9 +292,18 @@ class MyModel(Model):
self.G_Firm.add_edges_from(lst_add_edge)
# Add edges to firm-product network
succ_node_list = []
for succ_firm in lst_choose_firm:
succ_node = [n for n, v in self.G_FirmProd.nodes(data=True) if
v['Firm_Code'] == succ_firm and v['Product_Code'] == succ_product_code][0]
for n, v in self.G_FirmProd.nodes(data=True):
for v1 in v['Product_Code']:
if v1 == succ_product_code and v['Firm_Code'] == succ_firm:
succ_node_list.append(n)
if len(succ_node_list) != 0:
succ_node = succ_node_list[0]
else:
succ_node = -1
if current_node != -1 and succ_node != -1:
self.G_FirmProd.add_edge(current_node, succ_node)
self.sample.g_firm = json.dumps(nx.adjacency_data(self.G_Firm))
@ -252,22 +315,11 @@ class MyModel(Model):
for ag_node, attr in self.product_network.nodes(data=True):
# 产业种类
# 利用 BomNodes.csv 转换产业 和 id 前提是 一个产业一个产品id 且一一对应
product_id = self.type2.loc[self.type2['Code'] == ag_node, 'Index']
type2 = self.type2.loc[product_id, '产业种类'].values[0]
type2 = self.type2[self.type2["Index"] == ag_node]["产业种类"]
# depreciation ratio 折旧比值
product_id = product_id.iloc[0]
j_comp_data_consumed = self.data_consumed[product_id]
j_comp_data_produced = self.data_produced[product_id]
product = ProductAgent(ag_node, self, name=attr['Name'], type2=type2,
j_comp_data_consumed=j_comp_data_consumed,
j_comp_data_produced=j_comp_data_produced,
)
# product_id = product_id.iloc[0]
product = ProductAgent(ag_node, self, name=attr['Name'], type2=type2)
self.add_agent(product)
# self.grid.place_agent(product, ag_node)
##print(f"Product agent created: {product.name}, ID: {product.unique_id}")
@ -277,9 +329,9 @@ class MyModel(Model):
firm_id = self.Firm['Code'] == ag_node
n_equip_c = self.Firm.loc[firm_id, '设备数量'].values[0]
demand_quantity = self.Firm.loc[firm_id, 'production_output'].values[0]
demand_quantity = self.data_consumed[self.data_consumed['Firm_Code'] == ag_node]
production_output = self.Firm.loc[firm_id, 'demand_quantity'].values[0]
production_output = self.data_produced[self.data_consumed['Firm_Code'] == ag_node]
# c购买价格 数据预处理
# c_price = self.Firm.loc[self.Firm['Code'] == ag_node, 'c_price'].values[0]
@ -366,16 +418,22 @@ class MyModel(Model):
self.firm_resource_P = firm_resource_P
def j_comp_consumed_produced(self):
data_consumed = pd.read_csv('input_data/input_product_data/products_consumed_materials.csv')
data_produced = pd.read_csv('input_data/input_product_data/products_produced_products.csv')
# 着重修改这 然后考虑逻辑 如何传递值
data_consumed = pd.read_csv('input_data/input_firm_data/firms_materials.csv')
data_produced = pd.read_csv('input_data/input_firm_data/firms_products.csv')
data_consumed = (data_consumed.groupby('产业id')[['消耗材料id', '消耗量']]
.apply(lambda x: x.values.tolist()))
data_produced = (data_produced.groupby('产业id')[['制造产品id', '制造量']]
.apply(lambda x: x.values.tolist()))
data_not_consumed = data_consumed.groupby('Firm_Code')[['消耗材料id', '材料数量']] \
.apply(lambda x: dict(zip(x['消耗材料id'], x['材料数量']))) \
.reset_index(name='Material_not_Consumed')
# 这里简单设置为折半 考虑 企业的设备量
# 可以引入 换算率 也就是 材料——计算产品比例 通过上游产业 现在假设为 2:1 的比例
data_consumed = data_consumed.groupby('Firm_Code')[['消耗材料id', '材料数量']] \
.apply(lambda x: dict(zip(x['消耗材料id'], x['材料数量'] / 2))) \
.reset_index(name='Material_not_Consumed')
self.data_consumed = data_consumed
self.data_produced = data_produced
self.data_produced = data_consumed / 2
def step(self):
# 1. Remove edge to customer and disrupt customer up product
@ -476,36 +534,24 @@ class MyModel(Model):
for C_list, C0_list in zip(firm.C, firm.C0):
C_list[1] = C0_list[1] # 赋值回去
C_list[2] = C0_list[2]
# 消耗资源过程
consumed_material = []
for product in firm.indus_i:
for sub_list_data_consumed in product.j_comp_data_consumed:
consumed_material_id = sub_list_data_consumed[0]
consumed_material_num = sub_list_data_consumed[1]
consumed_material.append([consumed_material_id, consumed_material_num])
for sub_list_consumed_material in consumed_material:
for sub_list_material in firm.R:
if sub_list_material[0] == sub_list_consumed_material[0]:
sub_list_material[1] = sub_list_material[1] - sub_list_consumed_material[1]
# 这里需要修改
for r_id, r_nums in firm.R.items():
for consumed_id, consumed_nums in firm.c_consumption:
if consumed_id == r_id:
r_nums = r_nums - consumed_nums
# 生产产品过程
produced_products = []
for product in firm.indus_i:
for sub_list_produced_products in product.j_comp_data_consumed:
produced_products_id = sub_list_produced_products[0]
produced_products_num = sub_list_produced_products[1]
produced_products.append([produced_products_id, produced_products_num])
for sub_list_data_produced_products in produced_products:
for sub_list_products in firm.P:
if sub_list_products[0] == sub_list_data_produced_products[0]:
sub_list_products[1] = sub_list_products[1] - sub_list_data_produced_products[1]
# 刷新 R状态
for p_id, p_nums in firm.P.items():
for product_id, product_nums in firm.c_consumption:
if product_id == p_id:
p_nums = p_nums + product_nums
firm.refresh_R()
# 刷新 C状态
firm.refresh_C()
# 刷新 P状态
firm.refresh_P()
# Increment the time step
self.t += 1

View File

@ -2,7 +2,7 @@ from mesa import Agent
class ProductAgent(Agent):
def __init__(self, unique_id, model, name, type2, j_comp_data_consumed, j_comp_data_produced):
def __init__(self, unique_id, model, name, type2):
# 调用超类的 __init__ 方法
super().__init__(unique_id, model)
@ -16,9 +16,6 @@ class ProductAgent(Agent):
# depreciation ratio 折旧比值
# self.depreciation ratio
self.j_comp_data_produced = j_comp_data_produced
self.j_comp_data_consumed = j_comp_data_consumed
def a_successors(self):
# 从 product_network 中找到当前代理的后继节点
successors = list(self.model.product_network.successors(self.unique_id))

View File

@ -1,60 +0,0 @@
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from matplotlib import rcParams
# 设置中文字体和符号显示
rcParams['font.sans-serif'] = ['SimHei'] # 或者使用 ['Microsoft YaHei']
rcParams['axes.unicode_minus'] = False # 用来正常显示负号
# 定义节点和边
nodes = {
0: '原材料供应商',
1: '零部件制造商',
2: '产品制造商',
3: '分销商',
4: '零售商'
}
edges = [
(0, 1), # 原材料供应商 -> 零部件制造商
(1, 2), # 零部件制造商 -> 产品制造商
(2, 3), # 产品制造商 -> 分销商
(3, 4) # 分销商 -> 零售商
]
# 定义节点的三维坐标 (x, y, z)
positions = {
0: (0, 0, 0), # 原材料供应商
1: (1, 0, 1), # 零部件制造商
2: (2, 0, 2), # 产品制造商
3: (3, 0, 3), # 分销商
4: (4, 0, 4) # 零售商
}
# 创建3D图形
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
# 绘制节点
for node, (x, y, z) in positions.items():
ax.scatter(x, y, z, color='b', s=100) # 绘制每个节点
ax.text(x, y, z, nodes[node], size=12, zorder=1, color='k') # 添加节点标签
# 绘制边(箭头)
for start, end in edges:
start_pos = positions[start]
end_pos = positions[end]
ax.plot([start_pos[0], end_pos[0]],
[start_pos[1], end_pos[1]],
[start_pos[2], end_pos[2]], color='r') # 连接每对节点
# 设置坐标轴标签
ax.set_xlabel('X轴')
ax.set_ylabel('Y轴')
ax.set_zlabel('Z轴')
# 设置视角以便更好地观察3D图形
ax.view_init(elev=20., azim=-35) # 角度可根据需要调整
# 显示3D图形
plt.show()