高温高熵合金
以AlCoCrFeNiTi为例,展示高温高熵合金的优化流程。
数据来源:Chen, S.; Li, Q.; Zhong, J.; Xing, F.; Zhang, L. On Diffusion Behaviors in Face Centered Cubic Phase of Al-Co-Cr-Fe-Ni-Ti High-Entropy Superalloys. Journal of Alloys and Compounds 2019, 791, 255–264, doi:10.1016/j.jallcom.2019.03.286.
数据集、数据库及工程文件准备
具体示例中使用的数据集、数据库及工程文件可从这里: AlCoCrFeNiTi数据集下载。
优化流程
本示例中使用的优化流程为: 变量选择遗传算法(varselga)-> 遗传算法(ga)-> 遗传算法(rega)。所采用计算平台为曙光超算,使用的计算资源为64核。
曙光超算的提交脚本如下
#!/bin/sh
#SBATCH --job-name=taskname
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=64
#SBATCH --partition=wzhcnormal
source /work/share/ac21ujhbvo/local/hitdicv2023.06.29/env.sh
# hitdic_opt --mock --tdb=alcocrfeniti/alcocrfeniti_start.tdb --output=alcocrfeniti/alcocrfeniti_initial.tdb --phase=FCC --elements=AL,CO,CR,FE,NI,TI --crossbinary=A,1 --debug
# hitdic_opt --report --debug
hitdic_opt --start --strategy=varselga --use_result=default --threads=64
hitdic_opt --report --use_result=varselga --report_dir=results/report_varselga --threads=64
hitdic_opt --start --strategy=ga --use_result=varselga --sweep_zero_params --threads=64
hitdic_opt --report --use_result=ga --report_dir=results/report_ga --threads=64
hitdic_opt --start --strategy=rega --use_result=ga --threads=64 --submit_params
hitdic_opt --report --use_result=rega --report_dir=results/report_rega --threads=64
project.input文件内容如下
[project:tdb]
system = AL, CO, CR, FE, NI, TI;
tdb = ./alcocrfeniti/alcocrfeniti_initial.tdb;
output = ./alcocrfeniti/alcocrfeniti_post.tdb;
[project:sources]
couple_alcocrfeniti = alcocrfeniti/couple.input;
[project:objectives]
couple_alcocrfeniti = couple_alcocrfeniti;
[project:strategy]
ga:maxiter = 200;
ga:bounds = (default, -500, 300);
ga:max_unchanged_count = 100;
rega:maxiter = 1000;
rega:bounds = (default, -500, 300);
rega:max_unchanged_count = 30;
varselga:maxiter = 500;
varselga:bounds = (default, -500, 300);
varselga:max_unchanged_count = 100;
[project:default]
cachefolder = .cache;
resultsfolder = results;
计算过程及结果
优化效率
- varselga: 22:42:36 info: Done Finished, hitdic_opt, time = 0.3002 hrs
- ga: 22:50:00 info: Done Finished, hitdic_opt, time = 0.1224 hrs
- rega: 23:07:05 info: Done Finished, hitdic_opt, time = 0.2837 hrs
变量选择遗传算法(varselga)
变量选择遗传算法的作用是从所采用动力学数据中的待评估参数中识别出有效的参数,从而减少后续优化结果的不确定性。
一般无需关注优化过程的收敛情况,只需关注最终的优化结果即可。但是,如果需要对优化过程进行分析,可以通过以下方式查看优化过程的收敛情况。
参数选择遗传算法的收敛序列
收敛系列的文件见.cache/varselga-couple_alcocrfeniti-20230629_222435.csv
。
其中: criterion
为收敛准则,rss
为残差平方和,ratio
为残差平方和的相对变化量,p0
~p119
为参数的值, iter
为迭代次数。criterion
可以选择改变为aicc
、aic
或bic
,默认值为aicc
。
iter,criterion,rss,ratio,p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,p60,p61,p62,p63,p64,p65,p66,p67,p68,p69,p70,p71,p72,p73,p74,p75,p76,p77,p78,p79,p80,p81,p82,p83,p84,p85,p86,p87,p88,p89,p90,p91,p92,p93,p94,p95,p96,p97,p98,p99,p100,p101,p102,p103,p104,p105,p106,p107,p108,p109,p110,p111,p112,p113,p114,p115,p116,p117,p118,p119,
0,-691.47,0.0652687,0.5,0,0,0,-443.848,0,26.6602,0,60.6445,0,0,-316.211,0,0,88.1836,0,-311.621,0,0,197.266,95.7031,0,-172.168,0,0,280.859,-39.6484,281.738,0,136.426,0,-40.1367,0,0,-461.816,298.633,0,-365.43,-77.7344,-460.449,3.32031,-330.762,0,-383.984,-19.5312,0,0,289.746,0,0,0,0,-273.73,0,0,-366.895,-315.039,-161.523,0,217.969,-266.797,0,-153.613,193.359,0,0,0,-93.3594,-413.184,0,0,0,225.781,-251.953,0,-470.801,-467.969,0,0,142.188,0,0,-495.117,-211.426,0,134.375,30.3711,-321.777,-460.156,-15.2344,-498.535,0,0,0,-143.164,0,0,-335.547,-184.277,0,182.031,0,0,-119.922,113.379,0,0,0,0,0,-74.1211,-370.117,0,-95.7031,0,-14.4531,0,-62.4023,0,-99.4141,-289.551,
1,-698.045,0.0631486,0.491667,0,0,0,-443.848,0,27.0508,0,60.6445,0,0,-316.211,0,0,88.1836,0,-305.371,0,0,-241.211,-68.0664,0,-448.828,0,0,-25.3906,-39.6484,281.738,0,136.426,0,-40.1367,0,0,-461.816,298.633,0,-365.43,-27.7344,-460.449,4.10156,-330.762,0,-383.984,-19.5312,0,0,289.746,0,0,0,0,-273.73,0,0,-366.895,-315.039,-161.523,0,217.969,-266.797,0,-153.613,193.359,0,0,0,-93.3594,-413.184,0,0,0,225.781,-251.953,0,-470.801,-466.406,0,0,142.188,0,0,-495.117,-211.426,0,134.375,0,-321.777,-460.156,-15.2344,-498.535,0,0,0,-141.602,0,0,-335.547,-184.277,0,182.031,0,0,-119.922,113.379,0,0,0,0,0,-74.1211,-370.117,0,-95.7031,0,-14.4531,0,-62.4023,0,-99.4141,-289.551,
2,-698.444,0.061949,0.533333,0,0,-180.176,114.941,0,150,0,96.7773,-374.023,0,-6.25,4.78516,-113.574,0,0,0,47.8516,0,-140.918,-30.7617,-494.727,0,0,40.918,0,-382.031,0,0,0,0,0,0,0,47.168,104.004,0,-400.195,162.598,-215.332,0,152.93,137.793,-207.129,195.898,163.867,-351.562,-33.7891,0,270.02,0,0,0,0,0,-37.207,-474.707,-430.273,-249.609,-19.6289,-165.625,190.137,-23.7305,52.9297,0,-206.348,-68.9453,0,0,0,0,-225.781,0,-409.375,134.473,-302.832,0,0,0,0,-484.668,0,0,-148.145,-207.52,-212.5,0,0,122.754,53.418,135.742,0,0,-318.652,0,0,0,-103.711,-474.219,0,-318.75,198.73,0,61.2305,0,-22.9492,0,0,-389.062,0,0,0,-369.922,-473.34,-217.969,125.879,-43.0664,49.0234,0,-145.898,0,
......
497,-854.869,0.0315689,0.5,-347.852,-17.4805,7.91016,-186.621,0,-84.4727,0,-384.082,0,0,0,5.66406,0,201.172,0,0,-353.711,0,175.781,0,0,0,0,0,0,-129.883,145.996,146.484,-59.2773,-142.969,0,-372.07,0,0,0,238.379,-270.898,0,-461.523,0,234.766,-407.617,-13.4766,-175.098,192.09,171.875,73.6328,-22.5586,94.5312,-387.598,0,0,0,0,-35.6445,-344.824,-426.27,0,151.855,-153.125,-116.406,-292.871,0,-447.461,0,135.352,0,0,0,0,-225.684,0,-316.992,-365.234,-209.082,0,-37.4023,0,0,0,-95.9961,-70.9961,62.8906,0,0,0,0,0,0,0,0,-194.336,-159.863,0,0,0,-490.723,0,-43.2617,0,0,0,-443.555,-226.465,174.219,-25.293,0,0,299.902,-245.41,0,0,0,-484.57,0,-442.48,-277.832,0,-451.562,0,
498,-854.869,0.0315689,0.5,-347.852,-17.4805,7.91016,-186.621,0,-84.4727,0,-384.082,0,0,0,5.66406,0,201.172,0,0,-353.711,0,175.781,0,0,0,0,0,0,-129.883,145.996,146.484,-59.2773,-142.969,0,-372.07,0,0,0,238.379,-270.898,0,-461.523,0,234.766,-407.617,-13.4766,-175.098,192.09,171.875,73.6328,-22.5586,94.5312,-387.598,0,0,0,0,-35.6445,-344.824,-426.27,0,151.855,-153.125,-116.406,-292.871,0,-447.461,0,135.352,0,0,0,0,-225.684,0,-316.992,-365.234,-209.082,0,-37.4023,0,0,0,-95.9961,-70.9961,62.8906,0,0,0,0,0,0,0,0,-194.336,-159.863,0,0,0,-490.723,0,-43.2617,0,0,0,-443.555,-226.465,174.219,-25.293,0,0,299.902,-245.41,0,0,0,-484.57,0,-442.48,-277.832,0,-451.562,0,
499,-854.869,0.0315689,0.5,-347.852,-17.4805,7.91016,-186.621,0,-84.4727,0,-384.082,0,0,0,5.66406,0,201.172,0,0,-353.711,0,175.781,0,0,0,0,0,0,-129.883,145.996,146.484,-59.2773,-142.969,0,-372.07,0,0,0,238.379,-270.898,0,-461.523,0,234.766,-407.617,-13.4766,-175.098,192.09,171.875,73.6328,-22.5586,94.5312,-387.598,0,0,0,0,-35.6445,-344.824,-426.27,0,151.855,-153.125,-116.406,-292.871,0,-447.461,0,135.352,0,0,0,0,-225.684,0,-316.992,-365.234,-209.082,0,-37.4023,0,0,0,-95.9961,-70.9961,62.8906,0,0,0,0,0,0,0,0,-194.336,-159.863,0,0,0,-490.723,0,-43.2617,0,0,0,-443.555,-226.465,174.219,-25.293,0,0,299.902,-245.41,0,0,0,-484.57,0,-442.48,-277.832,0,-451.562,0,
遗传算法优化
在去除冗余参数的情况下,我们可以使用遗传算法对参数进行优化,使得所优化参数的预测性能更好。
遗传算法的收敛序列
收敛系列的文件见.cache/ga-couple_alcocrfeniti-20230629_224240.csv
。其中,iter
表示迭代次数,least_cost
表示当前迭代的最小代价,p0
到p59
表示当前迭代的参数。
iter,least_cost,p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,
0,0.0315689,-347.852,-17.4805,7.91016,-186.621,-84.4727,-384.082,5.66406,201.172,-353.711,175.781,-129.883,145.996,146.484,-59.2773,-142.969,-372.07,238.379,-270.898,-461.523,234.766,-407.617,-13.4766,-175.098,192.09,171.875,73.6328,-22.5586,94.5312,-387.598,-35.6445,-344.824,-426.27,151.855,-153.125,-116.406,-292.871,-447.461,135.352,-225.684,-316.992,-365.234,-209.082,-37.4023,-95.9961,-70.9961,62.8906,-194.336,-159.863,-490.723,-43.2617,-443.555,-226.465,174.219,-25.293,299.902,-245.41,-484.57,-442.48,-277.832,-451.562,
1,0.0315689,-347.852,-17.4805,7.91016,-186.621,-84.4727,-384.082,5.66406,201.172,-353.711,175.781,-129.883,145.996,146.484,-59.2773,-142.969,-372.07,238.379,-270.898,-461.523,234.766,-407.617,-13.4766,-175.098,192.09,171.875,73.6328,-22.5586,94.5312,-387.598,-35.6445,-344.824,-426.27,151.855,-153.125,-116.406,-292.871,-447.461,135.352,-225.684,-316.992,-365.234,-209.082,-37.4023,-95.9961,-70.9961,62.8906,-194.336,-159.863,-490.723,-43.2617,-443.555,-226.465,174.219,-25.293,299.902,-245.41,-484.57,-442.48,-277.832,-451.562,
2,0.0315689,-347.852,-17.4805,7.91016,-186.621,-84.4727,-384.082,5.66406,201.172,-353.711,175.781,-129.883,145.996,146.484,-59.2773,-142.969,-372.07,238.379,-270.898,-461.523,234.766,-407.617,-13.4766,-175.098,192.09,171.875,73.6328,-22.5586,94.5312,-387.598,-35.6445,-344.824,-426.27,151.855,-153.125,-116.406,-292.871,-447.461,135.352,-225.684,-316.992,-365.234,-209.082,-37.4023,-95.9961,-70.9961,62.8906,-194.336,-159.863,-490.723,-43.2617,-443.555,-226.465,174.219,-25.293,299.902,-245.41,-484.57,-442.48,-277.832,-451.562,
......
参数正则化
在去除冗余参数的情况下,我们可以使用参数正则化的方法对参数进行优化,使得优化所得参数具有更好的泛化性能。
正则化遗传算法的收敛序列
收敛系列的文件见.cache/rega-couple_alcocrfeniti-20230629_225004.csv
。其中,iter
表示迭代次数,lambda
表示当前迭代的正则化系数,cost
表示当前迭代的代价,rss
表示当前迭代的残差平方和,norm
表示当前迭代的参数范数,p0
到p89
表示当前迭代的参数。
iter,lambda,cost,rss,norm,p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,p60,p61,p62,p63,p64,p65,p66,p67,p68,p69,p70,p71,p72,p73,p74,p75,p76,p77,p78,p79,p80,p81,p82,p83,p84,p85,p86,p87,p88,p89,p90,p91,p92,p93,p94,p95,p96,p97,p98,p99,p100,p101,p102,p103,p104,p105,p106,p107,p108,p109,p110,p111,p112,p113,p114,p115,p116,p117,p118,p119,
32,2.3107e-10,0.0312562,0.0312531,2053.26,-194.922,-392.578,159.082,-281.934,0,-0.878906,0,65.918,0,0,0,-387.598,0,115.43,0,0,-369.531,0,152.344,0,0,0,0,0,0,160.352,135.449,-309.668,-61.6211,-147.07,0,-371.973,0,0,0,225.488,-498.145,0,-405.273,0,-363.379,-457.812,-38.8672,21.7773,194.824,-233.398,72.0703,-57.0312,-311.426,248.73,0,0,0,0,52.6367,-219.531,-438.77,0,151.562,-153.125,-141.309,104.199,0,-366.211,0,128.906,0,0,0,0,-287.793,0,-302.93,-269.727,-134.57,0,-49.707,0,0,0,-295.801,135.84,-387.305,0,0,0,0,0,0,0,0,118.164,-170.117,0,0,0,-487.598,0,-92.7734,0,0,0,-438.086,-492.188,-142.188,-28.2227,0,0,274.414,161.328,0,0,0,-27.5391,0,-431.152,-236.816,0,-370.312,0
64,1.15535e-09,0.0312687,0.0312531,2053.26,-194.922,-392.578,159.082,-281.934,0,-0.878906,0,65.918,0,0,0,-387.598,0,115.43,0,0,-369.531,0,152.344,0,0,0,0,0,0,160.352,135.449,-309.668,-61.6211,-147.07,0,-371.973,0,0,0,225.488,-498.145,0,-405.273,0,-363.379,-457.812,-38.8672,21.7773,194.824,-233.398,72.0703,-57.0312,-311.426,248.73,0,0,0,0,52.6367,-219.531,-438.77,0,151.562,-153.125,-141.309,104.199,0,-366.211,0,128.906,0,0,0,0,-287.793,0,-302.93,-269.727,-134.57,0,-49.707,0,0,0,-295.801,135.84,-387.305,0,0,0,0,0,0,0,0,118.164,-170.117,0,0,0,-487.598,0,-92.7734,0,0,0,-438.086,-492.188,-142.188,-28.2227,0,0,274.414,161.328,0,0,0,-27.5391,0,-431.152,-236.816,0,-370.312,0
96,5.77674e-09,0.0313312,0.0312531,2053.26,-194.922,-392.578,159.082,-281.934,0,-0.878906,0,65.918,0,0,0,-387.598,0,115.43,0,0,-369.531,0,152.344,0,0,0,0,0,0,160.352,135.449,-309.668,-61.6211,-147.07,0,-371.973,0,0,0,225.488,-498.145,0,-405.273,0,-363.379,-457.812,-38.8672,21.7773,194.824,-233.398,72.0703,-57.0312,-311.426,248.73,0,0,0,0,52.6367,-219.531,-438.77,0,151.562,-153.125,-141.309,104.199,0,-366.211,0,128.906,0,0,0,0,-287.793,0,-302.93,-269.727,-134.57,0,-49.707,0,0,0,-295.801,135.84,-387.305,0,0,0,0,0,0,0,0,118.164,-170.117,0,0,0,-487.598,0,-92.7734,0,0,0,-438.086,-492.188,-142.188,-28.2227,0,0,274.414,161.328,0,0,0,-27.5391,0,-431.152,-236.816,0,-370.312,0
128,2.88837e-08,0.0316438,0.0312531,2053.26,-194.922,-392.578,159.082,-281.934,0,-0.878906,0,65.918,0,0,0,-387.598,0,115.43,0,0,-369.531,0,152.344,0,0,0,0,0,0,160.352,135.449,-309.668,-61.6211,-147.07,0,-371.973,0,0,0,225.488,-498.145,0,-405.273,0,-363.379,-457.812,-38.8672,21.7773,194.824,-233.398,72.0703,-57.0312,-311.426,248.73,0,0,0,0,52.6367,-219.531,-438.77,0,151.562,-153.125,-141.309,104.199,0,-366.211,0,128.906,0,0,0,0,-287.793,0,-302.93,-269.727,-134.57,0,-49.707,0,0,0,-295.801,135.84,-387.305,0,0,0,0,0,0,0,0,118.164,-170.117,0,0,0,-487.598,0,-92.7734,0,0,0,-438.086,-492.188,-142.188,-28.2227,0,0,274.414,161.328,0,0,0,-27.5391,0,-431.152,-236.816,0,-370.312,0
160,1.44419e-07,0.0332064,0.0312531,2053.26,-194.922,-392.578,159.082,-281.934,0,-0.878906,0,65.918,0,0,0,-387.598,0,115.43,0,0,-369.531,0,152.344,0,0,0,0,0,0,160.352,135.449,-309.668,-61.6211,-147.07,0,-371.973,0,0,0,225.488,-498.145,0,-405.273,0,-363.379,-457.812,-38.8672,21.7773,194.824,-233.398,72.0703,-57.0312,-311.426,248.73,0,0,0,0,52.6367,-219.531,-438.77,0,151.562,-153.125,-141.309,104.199,0,-366.211,0,128.906,0,0,0,0,-287.793,0,-302.93,-269.727,-134.57,0,-49.707,0,0,0,-295.801,135.84,-387.305,0,0,0,0,0,0,0,0,118.164,-170.117,0,0,0,-487.598,0,-92.7734,0,0,0,-438.086,-492.188,-142.188,-28.2227,0,0,274.414,161.328,0,0,0,-27.5391,0,-431.152,-236.816,0,-370.312,0
284,7.22093e-07,0.0401519,0.0315236,1807.14,-191.797,-398.828,157.52,-281.543,3.125,-0.878906,0.0976562,54.1992,0.390625,0,12.5,12.4023,0,209.277,0.78125,0.390625,-369.141,25,-22.6562,1.95312,0,0,0,0,0,160.352,135.84,-309.668,-61.6211,-140.82,0,-171.973,0,0,0.390625,225.488,-48.2422,1.5625,-417.383,0,-163.379,-457.812,61.2305,46.7773,194.824,-233.398,73.6328,-81.6406,-111.426,299.512,1.75781,200.195,12.5,0.0976562,52.6367,-122.656,-438.77,0,156.445,-155.859,-128.809,104.199,0.390625,37.0117,1.5625,103.906,0,0,6.25,0,-287.793,-100,-302.539,-269.727,-134.57,3.125,-49.707,31.7383,0.0976562,31.25,-239.746,132.715,-327.93,25,0,3.125,0.195312,12.5,3.125,0,6.25,117.969,-120.117,50.3906,3.125,3.125,-488.379,0,-92.9688,0,0,12.5977,-438.086,-492.188,-142.188,-28.6133,0.78125,4.6875,274.414,286.328,0.390625,0,3.22266,-15.0391,12.8906,-31.1523,-286.816,0,-363.574,56.25
361,3.61047e-06,0.0717552,0.0315017,1611.52,-148.047,38.8672,132.52,-281.543,3.125,-13.3789,0.0976562,60.3516,7.42188,-98.4375,12.5,24.9023,0,9.27734,0,-99.6094,-368.945,7.12891,-22.6562,0.390625,0,25,0.292969,0,15.625,160.352,135.84,-309.668,-61.6211,-140.82,0,-171.973,0,0,12.8906,128.613,-48.2422,1.5625,-417.383,0.195312,-163.379,-257.812,73.7305,49.5117,194.824,-236.523,73.6328,-82.4219,-111.621,198.73,1.75781,101.758,13.2812,3.22266,52.6367,-222.656,-413.77,0.0976562,-43.5547,-168.359,-128.418,104.199,0.390625,37.0117,1.5625,110.156,-81.25,0,6.25,0,-288.574,-100,-302.539,-269.727,-134.57,-96.875,-48.1445,31.6406,0.0976562,31.25,-139.746,132.715,-327.93,25,0,3.22266,-368.555,12.5,3.22266,0,6.25,116.797,-120.117,51.9531,3.125,4.10156,-489.941,9.375,269.922,0.195312,2.34375,-62.4023,-45.8008,-379.688,-142.188,-28.6133,0.78125,54.8828,-126.367,61.3281,50.3906,0,4.78516,-27.5391,12.8906,168.848,-286.816,0,-363.574,50