乐趣区

关于python:2021全国大学生数学建模B题-乙醇偶合制备-C4-烯烃

include<iostream>

using namespace std;
int main()
{

double y1=0,y2=0,y3=0,y4=0,y5=0,y=0;
double t1=0,t2=0,t3=0,t4=0,t5=0;
for(double i=0; i<=400; i++)
{if(y1<y1+0.001*i*i*i-0.09*i*i+8.193*i)
    {
        t1=i;
        y1=y1-0.09*i*i+8.193*i;
    }
}
for(double i=0; i<=200; i++)
{if(y2<y2+0.001*i*i*i-0.266*i*i+24.739*i)
    {
        t2=i;
        y2=y2+0.001*i*i*i-0.266*i*i+24.739*i;
    }
}
for(double i=0; i<=2.1; i=i+0.01)
{if(y5<y5-38.431*i*i*i+10.709*i*i+18.357*i)
    {
        t5=i;
        y5=y5-38.431*i*i*i+10.709*i*i+18.357*i;
    }
}
cout<<endl;
cout<<"最佳温度为:"<<t1<<endl;
cout<<"最佳 Co/SiO2 的量为:"<<t2<<endl;
cout<<"最佳乙醇浓度为 [农产品期货](https://www.gendan5.com/cf/af.html):"<<t5<<endl;
y1=0,y2=0,y3=0,y4=0,y5=0;
t1=0,t2=0,t3=0,t4=0,t5=0;
double     i1=0,i2=0,i3=0,i4=0,i5=0;
for(i1=0; i1<=450; i1=i1+1)
{

if(y<y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5)

    {t1=i1;

y=y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5;

    }
    for(i2=0; i2<=200; i2=i2+10)
    {

if(y<y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5)

        {t2=i2;

y=y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5;

        }
        for(i3=1; i3<=5; i3=i3+1)
        {

if(y<y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5)

            {t3=i3;

y=y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5;

            }
            for(i4=0; i4<=2; i4=i4+0.1)
            {

if(y<y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5)

                {t4=i4;

y=y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5;

                }
                for(i5=0; i5<=2.1; i5=i5+0.1)
                {

if(y<y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5)

                    {t5=i5;

y=y+0.093i1i1+0.009i2i2-111.553i3i3+5124.405i4i4+180.208i5i5-48.413i1+206.93i2+1592.04i3+3214.573i4-477.773i5+0.083i1i2-1.277i1i3-2.629i1i4-1.825i1i5+1.179i2i3-235.113i2i4+2.664i2i5-1738.344i3i4+518.669i3i5-332.301i4*i5;

                    }
                }
            }
        }
    }
}
cout<<"最佳 Co 的负载量为:"<<t3<<endl;
cout<<"最佳 Co/SiO2 和 HAP 装料比为:"<<t4<<endl;
return 0;

}

退出移动版