您好,欢迎访问三七文档
*cold-lowlow-offΪ×îСͣÁô£¬warm-lowΪԤÆô¶¯*Èý¸öСʱÒÔºóÖ»ÄÜÀäÆð£¬Ô¤¶¨ÒåÁ½¸öСʱ´Ówarmµ½low£¬×îСͣÁôcoldÁ½¸öСʱ£¬×îСͣÁôlow3¸öСʱ*²»ÏÞÖÆ×ÔÉíÆô¶¯£¬¼´z(c,'low','low',h)¿ÉÒÔΪ1setcthesetsofcomponentsexchanger1andexchanger2/ex1,ex2/;setitheextremepoints/top,buttom/;seththesetofhoursintheoperationalmodel/1*50/;sethp(h)thesetofhoursintheoperationalmodel/1*50/;sethppp(h)thesetofhoursintheoperationalmodel/2*50/;setmmodesofce.ghightempreturemodeandlowtempreturemode/off,cold,warm,high,low/;setpromode(m)productsmode/low,high/;setStartUpMode(m)modeofstartup/cold,warm/;alias(c,cp);alias(m,mp,mpp);alias(h,hh);setdal(c,m,mp)disallowedtransitions/(ex1,ex2).(off.low,off.high,cold.off,cold.high,cold.warm,warm.off,warm.high,warm.cold,low.cold,low.warm,high.warm,high.cold,high.off)/setallow1(c,mp,m)allowedtransitions/(ex1,ex2).(off.cold,off.warm,off.off,cold.cold,cold.low,warm.warm,warm.low,low.low,low.high,low.off,high.low,high.high)/setallow2(c,m,mp)allowedtransitions/(ex1,ex2).(off.cold,off.warm,off.off,cold.cold,cold.low,warm.warm,warm.low,low.low,low.high,low.off,high.low,high.high)/setallow3(c,mp,m)allowedtransitions/(ex1,ex2).(off.cold,off.warm,cold.low,warm.low,low.high,low.off,high.low)/setallow4(c,m,mp)allowedtransitions/(ex1,ex2).(off.cold,off.warm,cold.low,warm.low,low.high,low.off,high.low)/setms(c,mp,m)minimumstay/(ex1,ex2).(cold.low,low.off)/;setmsp(c,m)minimumstay/(ex1,ex2).(cold,low)/;setseq(c,m,mp,mpp)predefinedsequenceofmodes/(ex1,ex2).(off.warm.low)/;setseqp(c,m)predefinedsequenceofmodes/ex1.warm,ex2.warm/;setseq2(c,m,mp)predefinedsequenceofmodes/(ex1,ex2).(warm.low)/;setstadep(c,m,mp,mpp)statedependentcoldstartupandthewarmstartup/(ex1,ex2).(off.warm.low,off.cold.low)/Parametersx(c,m,i)extremepointsoftheconvexhull/ex1.low.top21,ex1.low.buttom2,ex1.high.top42,ex1.high.buttom10,ex2.low.top21,ex2.low.buttom2,ex2.high.top42,ex2.high.buttom10/K(c,mp,m)timeofministay/ex1.cold.low3,ex1.low.off2,ex1.warm.low2,ex2.cold.low3,ex2.low.off2ex2.warm.low3/KStay1(c,m)timeofministay/ex1.cold2,ex1.low3,ex2.cold2,ex2.low3/KStay(c,m)timeofministay/ex1.cold2,ex1.warm2,ex1.low3,ex2.cold2,ex2.warm2,ex2.low3/StartUpCost(c,StartUpMode)costofstartupmode/ex1.cold40,ex1.warm20,ex2.cold80,ex2.warm40/PromodeCost(c,promode)costinproductionmode/ex1.low100,ex1.high120,ex2.low200,ex2.high250/CostModeSwitch(c,m,mp)costofmodeswitch/ex1.off.cold100,ex1.off.warm20,ex1.low.off20,ex2.off.cold150,ex2.off.warm50,ex2.low.off50/CostOfSteam(c,m)costofsteam/ex1.low200,ex1.high340,ex2.low220,ex2.high360/F0(h)demandwaterflow/10,210,312,413,514,615,715,815.0,915.0,1015.0,1115.0,1215.0,1315.0,1415.0,1515.0,1615.0,1715.0,1815.0,1915.0,2015.0,2130.0,2230.0,2330.0,2430.0,2530.0,2630.0,2730.0,2830.0,2930.0,3030.0,3115.0,3215.0,3315.0,3415.0,3515.0,3615.0,3715.0,3815.0,3915.0,4015.0,4115.0,4217,4317,4416,450,460,470,4815.0,4915.0,5015.0/steamCap(c,promode)heatcapicityofsteaml/ex1.low1850,ex1.high1850,ex2.low1850,ex2.high1850/TL(c,m,mp,mpp)/ex1.off.cold.low3,ex2.off.cold.low3,ex1.off.warm.low1,ex2.off.warm.low1/TU(c,m,mp,mpp)/ex1.off.cold.low50,ex2.off.cold.low50,ex1.off.warm.low3,ex2.off.warm.low3/T2PCon(c,promode)constraintoftheT2Ptempretureoftheoutputsteam/ex1.low120,ex1.high180,ex2.low120,ex2.high180/TS(c,promode)tempretureofsteamforex1andex2/ex1.low180,ex1.high300,ex2.low180,ex2.high300/MaxCap(c,m)maxproductioncapicity/ex1.low21,ex1.high42,ex2.low21,ex2.high42/;Scalarcrtcriticaldowntime/3/Ttheinitialtempretureofdemandwater/20/T0PPthetempretureofdemandwater/80/waterCapheatcapicityofthewater/4200/VariablesPrp(c,promode,h)modeproductionPr(c,h)totalproductionofsumofmodelamda(c,promode,i,h)weightoftheextremepointT0(c,h)theinputwatertempretureforeachexchangerT0P(c,h)thetempretureofthetemplewaterc2(c,h)theheatcapicityofsteamathourhF2(c,h)themassflowofsteammathourhT2(c,h)theinputsteamtempretureofeachexhangerathourhT2P(c,h)theoutputsteamtempretureofeachexchangerathourhq(c,h)theheatenergyexchangedTP(c,h)steamoutputtempreturekpara(c,h)intheexchangerexchangingcoursedeltatdenominatorTotalCostthelasttotalcost;binaryvariablesy(c,m,h),z(c,mp,m,h);positivevariableF2,T2,T2P,q,TP,T0P,c2,kpara,Prp;Equationscostdefineobjectivefunctionpro(c,promode,h)productionofdisjunctionmodellamdaConstraint1(c,promode,h)lamdaconstraintlamdaConstraint2(c,promode,i,h)lamdaisgreatthan0lamdaConstraint3(c,promode,i,h)lamdaislessthan1proCap(c,promode,h)productioncapicityconstraintabHeat(c,h)coldsourceabsorbheatexchangerConnect(h)equationsfortheconnectiondemandTem(h)demandtempreturerelHeat(c,h)hotsourcereleaseheattemConstraint1(h)tempretureconstraintbeweentbeforeandaferheatexchangingtemConstraint2(h)exchanger1outputwatertempretureisbelowdemandtempretureycm1(c,m,h)ycmycm2(c,m,h)ycmforbid(c,m,mp,h)forbiddentransitionsminStayConstraint(c,m,h)preSeq(c,m,mp,mpp,h)pre-definedsequenceofmodesmodMinStay(c,m,h)modificationoftheminimumstayconstraintdependent(c,m,mp,mpp,hp)state-independenttransitionsyConstraint(c,h)sumofy(cmp)islessthan1zConstraint(c,hppp)onlyontswitchathisallowed;*cost:statecost+switchco
本文标题:gams使用实例
链接地址:https://www.777doc.com/doc-7009271 .html