目录
为进一步实现了矿山的高效开采,保证采矿作业的安全,降低充填成本是某金矿提高经济效益的重要途径。矿山开采二步骤对采场充填体强度的要求为7d达到0.3 MPa,28d达到0.5 MPa,56d达到0.8 MPa。其中7d、28d、56d的单轴抗压强度分别为:
7d单轴抗压强度:
Y1=-29.32637+0.858937X1+0.204500X2+0.046460X3-0.002600X1X2-0.000620X1X3-0.000784X2X3-0.006344X12-0.000545X22+0.001053X32(Adjusted R2= 0.9844)
28d单轴抗压强度:
Y2=-18.18050+0.665938X1+0.106150X2-0.454540X3-0.002075X1X2+0.005520X1X3+0.000552X2X3-0.005563X12-(3.53492E-17) X22+ 0.004192X32(Adjusted R2= 0.9545)
56d单轴抗压强度:
Y3=-35.55125+1.07144X1+0.252775X2-0.161840X3-0.003400X1X2 + 0.002780X1X3-0.001112X2X3-0.008125X12-0.000440X22+0.002259X32(Adjusted R2=0.9801)
采用多目标函数寻优方法优化料浆配比,以单位体积充填成本最低为优化目标即 min f,各材料充填成本为:矿山中和渣由全尾砂与酸性废水制作而成,加工费为1.2元/t;废石破碎加工价格为17元/t;水泥的价格为380元/t;工业用水的价格为1.6元/t。
现根据料浆质量分数(X1)、废石掺量(X2)和灰砂比(X3) 分别计算出1 m3充填料浆中和渣的质量Ma、废石质量Ms、水泥质量Mj和水的质量Mw,以充填体强度为约束条件,即Y1≥0.3 MPa;Y2≥0.5 MPa;Y3≥0.8 MPa,建立优化模型下式所示:
- #include
-
- using namespace std;
-
- void linspace(double start,double end,int n,float* y){
-
- double interval = (end-start)/n;
-
- for(int i = 0;i < n ;i++){
- y[i] = start + interval * i;
- }
- }
-
- int main(void){
- int length = 100;
- float ma[length];
- float ms[length];
- float mj[length];
- float mw[length];
-
- float X1,X2,X3,y1,y2,y3,result;
-
- linspace(0.001,2.418,length,ma);
- linspace(0.001,2.67,length,ms);
- linspace(0.001,3,length,mj);
- linspace(0.001,1,length,mw);
-
- long long count = 0;
- int solveCount = 0;
- for(int i = 0;i < length;i++){
- for(int j = 0;j < length;j++){
- for(int k = 0;k < length;k++){
- for(int l = 0;l < length;l++){
- count++;
- if(ma[i]/2.418 + ms[j]/2.67 + mj[k]/3 + mw[l] - 1 < 0.01 && ma[i]/2.418 + ms[j]/2.67 + mj[k]/3 + mw[l] - 1 > -0.01){
- // cout << ma[i] << " " << ms[j] << " " << mj[k] << " " << mw[l] << endl;
- X1 = (ma[i]+ms[j]+mj[k])/(ma[i]+ms[j]+mj[k]+mw[l])*100;
- X2 = ms[j]/(ma[i]+ms[j])*100;
- X3 = mj[k]/(ma[i]+ms[j])*100;
- // cout << X1 << " " << X2 << " " << X3 << endl;
- if(X1 <= 60 && X1 >= 56 && X2 >=30 && X2 <= 40 && X3 >= 12.5 && X3 <= 25){
- // if(true){
- y1 = -29.32637+0.858937*X1+0.204500*X2+0.046460*X3-0.002600*X1*X2-0.000620*X1*X3-0.000784*X2*X3-0.006344*X1*X1-0.000545*X2*X2+0.001053*X3*X3;
- // cout << count << " " << X1 << " " << X2 << " " << X3 << " " << y1 << endl;
- if(y1 >= 0.3){
- y2 = -18.18050+0.665938*X1+0.106150*X2-0.454540*X3-0.002075*X1*X2+0.005520*X1*X3+0.000552*X2*X3-0.005563*X1*X1-(3.53492E-17)*X2*X2+ 0.004192*X3*X3;
- if(y2 >= 0.5){
- y3=-35.55125+1.07144*X1+0.252775*X2-0.161840*X3-0.003400*X1*X2 + 0.002780*X1*X3-0.001112*X2*X3-0.008125*X1*X1-0.000440*X2*X2+0.002259*X3*X3;
- if(y3 >= 0.8){
- result = 1.2*ma[i] + 17*ms[j] + 380*mj[k] + 1.6*mw[l];
- cout << count << " " <
" " << ms[j] << " " << mj[k] << " " << mw[l] << " " << X1 << " " << X2 << " " << X3 << " " << result << endl; -
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return 0;
- }
暴力求解:代码采用最简单的暴力求解方法,即将待求值中和渣的质量Ma、废石质量Ms、水泥质量Mj和水的质量Mw采用linspace进行创建等差数列(组合密度取决于变量length),采用循环遍历每一种组合,并判断每一种组合是否满足模型的各个优化条件,若满足则输出。
count | Ma | Ms | Mj | Mw | X1 | X2 | X3 | f |
19100665 | 0.46023 | 0.2679 | 0.18094 | 0.64036 | 58.6713 | 36.7929 | 24.85 | 74.8884 |
19100666 | 0.46023 | 0.2679 | 0.18094 | 0.65035 | 58.2954 | 36.7929 | 24.85 | 74.9043 |
19110565 | 0.46023 | 0.29459 | 0.15095 | 0.64036 | 58.583 | 39.0278 | 19.9981 | 63.9459 |
19110664 | 0.46023 | 0.29459 | 0.18094 | 0.63037 | 59.7498 | 39.0278 | 23.9713 | 75.3261 |
19110665 | 0.46023 | 0.29459 | 0.18094 | 0.64036 | 59.3711 | 39.0278 | 23.9713 | 75.3421 |
20090665 | 0.4844 | 0.24121 | 0.18094 | 0.64036 | 58.6039 | 33.2424 | 24.9363 | 74.4636 |
20090666 | 0.4844 | 0.24121 | 0.18094 | 0.65035 | 58.2279 | 33.2424 | 24.9363 | 74.4796 |
20100565 | 0.4844 | 0.2679 | 0.15095 | 0.64036 | 58.5154 | 35.6108 | 20.0651 | 63.5212 |
20100664 | 0.4844 | 0.2679 | 0.18094 | 0.63037 | 59.685 | 35.6108 | 24.0516 | 74.9014 |
20100665 | 0.4844 | 0.2679 | 0.18094 | 0.64036 | 59.306 | 35.6108 | 24.0516 | 74.9174 |
20110564 | 0.4844 | 0.29459 | 0.15095 | 0.63037 | 59.5997 | 37.8169 | 19.3777 | 63.9589 |
20110565 | 0.4844 | 0.29459 | 0.15095 | 0.64036 | 59.2205 | 37.8169 | 19.3777 | 63.9749 |
21090565 | 0.50857 | 0.24121 | 0.15095 | 0.64036 | 58.4476 | 32.1708 | 20.1326 | 63.0964 |
21090664 | 0.50857 | 0.24121 | 0.18094 | 0.63037 | 59.6199 | 32.1708 | 24.1324 | 74.4766 |
21090665 | 0.50857 | 0.24121 | 0.18094 | 0.64036 | 59.2408 | 32.1708 | 24.1324 | 74.4926 |
21100564 | 0.50857 | 0.2679 | 0.15095 | 0.63037 | 59.5343 | 34.5023 | 19.4405 | 63.5342 |
21100565 | 0.50857 | 0.2679 | 0.15095 | 0.64036 | 59.155 | 34.5023 | 19.4405 | 63.5502 |
22090564 | 0.53274 | 0.24121 | 0.15095 | 0.63037 | 59.4688 | 31.1661 | 19.5038 | 63.1095 |
22090565 | 0.53274 | 0.24121 | 0.15095 | 0.64036 | 59.0892 | 31.1661 | 19.5038 | 63.1254 |