嘿,伙计们,
我有一个非常复杂的函数要用GA优化,它已经需要大约5个小时没有激活绘图,所以我想在算法完成后生成一个带有结果的绘图。到目前为止,我总是用“日记”保存命令窗口信息,所以节省的部分类似于下面的内容,并重复:
....
X: 30.80606 105.0739 5 0.8621733 0.3187652 0.1 0.1 0.3426245 3.578397 obj: 3.2365
x:96.6515 60.2254 91.6727 5.78384 5.89348 5.14982 6.43606 2.48569 4.53104对象:1.78
X: 79.81447 78.14723 129.7414 1.610127 8.481399 6.818627 6.844434 4.471865 3.497146 obj: 2.0136
X: 73.6651 98.8845 83.1789 1.94892 0.75555 3.55138 8.41613 3.0194 8.43609 obj: 3.0492
X: 64.6236 65.0341 94.9168 3.92559 1.34072 0.766707 0.114988 3.19566 7.77677 obj: 3.0613
x:136.7348 21.8462 117.6277 7.317458 9.027388 0.8396103 2.702008 0.551372 7.5124对象:1.8702
x:131.5978 44.16512 132.7881 2.824445 9.458292 5.58881 3.89878.731667 7.22164对象:2.3449
X: 33.4331 144.1815 21.22591 9.646141 7.317277 6.503243 1.924164 1.892613 1.564883 obj: 1.1898
X: 78.5224 79.2316 97.9015 1.87417 0.963924 0.498753 8.43496 8.31711 0.845001 obj: 3.0582
警告:引用了不存在的字段'xx'。
在仿真软件万博1manbetx/ SimulationOutput / >
在Si万博1manbetxmulink/SimulationOutput/subsref中
在Si万博1manbetxmulink/SimulationOutput/numArgumentsFromSubscript中
.....
到目前为止,我的主代码是这样的:
options = optimoptions('ga','Display','iter','OutputFcn', @myoutputFunc,'UseParallel', true,' constraintolerance ',1e-5,'PopulationSize',1000,'TimeLimit',60*60*60);
[xopt, fval exitflag、输出人口,分数)= ga (@objective 9 ,[],[],[],[], 磅,乌兰巴托,@constraint选项);
是否有可能根据这些信息生成绘图,或者我是否需要更改某些内容?
谢谢你!