2021全國大學生數學建模B題 乙醇偶合製備 C4 烯烴

專注的阿熊發表於2021-09-13

#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<<" 最佳乙醇濃度為外匯跟單gendan5.com: "<<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.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5)

         {

             t1=i1;

y=y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5;

         }

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

         {

if(y<y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5)

             {

                 t2=i2;

y=y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5;

             }

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

             {

if(y<y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5)

                 {

                     t3=i3;

y=y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5;

                 }

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

                 {

if(y<y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5)

                     {

                         t4=i4;

y=y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5;

                     }

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

                     {

if(y<y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5)

                         {

                             t5=i5;

y=y+0.093*i1*i1+0.009*i2*i2-111.553*i3*i3+5124.405*i4*i4+180.208*i5*i5-48.413*i1+206.93*i2+1592.04*i3+3214.573*i4-477.773*i5+0.083*i1*i2-1.277*i1*i3-2.629*i1*i4-1.825*i1*i5+1.179*i2*i3-235.113*i2*i4+2.664*i2*i5-1738.344*i3*i4+518.669*i3*i5-332.301*i4*i5;

                         }

                     }

                 }

             }

         }

     }

     cout<<" 最佳 Co 的負載量為: "<<t3<<endl;

     cout<<" 最佳 Co/SiO2 HAP 裝料比為: "<<t4<<endl;

     return 0;

}


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69946337/viewspace-2791874/,如需轉載,請註明出處,否則將追究法律責任。

相關文章