




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
PAGE
PAGE
1
IntervalAnalysisanditsApplicationstoOptimizationinBehaviouralEcology
by
JustinTung
CS490IndependentResearchReport
Instructor:DavidSchwartz
Date:December19,2001
TableofContents
Abstract 4
Introduction 5
IntervalAnalysis 5
BasicsandNotation 5
UncertaintyandApproximatingValues 5
IntervalArithmeticandFunctions 6
ForagingTheory 7
BasicsofForagingModels 7
SimplisticAnalyticForagingModel 8
TheOptimalResidenceTime 11
2.ResearchProblemandMethods 12
Motivation 12
ProblemswithFixedPointOptimizationinForagingModels 12
IntervalAnalysisasUncertaintyinMethod 13
ResearchProblem 13
Software 14
Methodology 14
Fixed-PointAnalysis 14
GeneralMethod 14
Algorithm:BisectionMethod 15
IntervalAnalysis 16
GeneralMethod 16
Algorithm:IntervalNewton’sMethod 16
VariationandConstraintsonParameters 17
3.NumericalAnalysisofModel 18
FixedPointAnalysis 18
GraphicalAnalysis 18
OptimizationandAnalysis 23
IntervalAnalysis 26
TrueSolutionsandIntervalOptimization 26
StabilityAnalysis 29
4.ConclusionsandFutureExploration 30
ResultsofNumericalStudy 30
ComparisonofFixedPointandIntervalRoots 30
ApplicationstoForagingModel 30
FutureExploration 32
Bibliography 33
Abstract
IntervalAnalysisisameansofrepresentinguncertaintybyreplacingsingle(fixed-point)valueswithintervals.Inthisproject,intervalanalysisisappliedtoaforagingmodelinbehaviouralecology.Themodeldescribesanindividualforaginginacollectionofcontinuouslyrenewingresourcepatches.Thismodelisusedtodeterminetheoptimalresidencetimeoftheforagerinaresourcepatchassumingtheforagerwantstomaximizeitsrateofresourceintake.Beforeapplyingintervalanalysis,fixed-point(non-interval)optimizationwillbedonetoserveasabasis.Certainparametersinthemodelwillthenbereplacedwithintervalsandinterval-basedoptimizationconducted.Acomparisonoftheintervalandfixed-pointresultswillbedoneaswellasanalysisofparameterintervalsandtheirconstraints,rootapproximations,andapplicationstothemodel.
Chapter1:Introduction
1.1IntervalAnalysis
1.1.1BasicsandNotation
ThispaperwillexplainonlythebasicsofIntervalAnalysis(IA)neededtounderstandthetopicscoveredandassumessomepriorknowledgeofIAandMatlab(see2.1.4regardingMatlab).ForaformalmathematicalintroductionandindepthcoverageofconceptsseeSchwartz(1999)orMoore(1966)listedinthereferences.Intervalanalysiswasinitiallydevelopedinthelate1960’stoboundcomputationalerroranditisadeterministicwayofrepresentinguncertaintyinvaluesbyreplacinganumberwitharangeofvalues(Schwartz17).Fixed-pointanalysisissimplyanalysisusingnon-intervalvalueswherethereisnouncertaintyinthevalues.Asaresult,IAuncertaintyconceptscanbeusedtomodelvaryingbiologicalparametersintheecologicalmodeltobeexploredinsection1.2andalsotoframefixed-pointresults.
IA’smathematicaldefinitionsandnotationsareextendedfromsettheoryandorderednumericalsetscalledintervals(Schwartz30).Thispaperconsidersclosedintervalanalysiswiththefollowingdefinitionsofaninterval(usingMatlabupperbound,lowerboundstylenotation):
inf(x)–denotestheinfinum,orlowerboundofx
sup(x)–denotesthesupremumorupperboundofx
1.1.2UncertaintyandApproximatingValues
Thereareaseveralusefulquantitiesrelatedtotheconceptoftheinterval:size,radius,andmidpoint.Thesize(orthickness)ofanintervalindicatestheuncertaintyinavalueandisspecifiedasawidth:w(x)=sup(x)-inf(x)(Schwartz32-33).Intervalswithzerothicknessarecrispintervalswhereasnon-crispintervalssaidtobethick.Theconceptsofradiusandmidpointareusefulindescribingintervalsaswellasconstructingthem.Theradiusandmidpointaredefinedas(Schwartz33):
rad(x)=w(x)/2
mid(x)=(sup(x)+inf(x))/2
Toconstructanewinterval,onewayistouseanoriginalvalue,whichisavaluethatsuppliesthemidpointpointofanewinterval.Then,acertainradius(uncertainty)canbeaddedtoandsubtractedfromtheoriginalvaluetoobtainanewinterval(Schwartz35).Similarly,themidpointcanalsoserveasanapproximationtoavaluewithanerrorofplusorminustheradius.Usingthesedefinitions,thepercentageuncertaintyinamidpointvaluewouldbe:p=100*rad(x)/mid(x)(Schwartz148).
1.1.3IntervalArithmeticandFunctions
Theresultsandpropertiesofintervalarithmeticwillbeomittedforthissection;however,IrecommendreferringtoSchwartz(1999)tounderstandthebasicsofintervalarithmetic.Thefundamentalprinciplesinintervaloperationsareindependenceandextremes.Independencemeansnumericalvaluesvaryindependentlybetweenintervalsandextremesmeansintervaloperationsgeneratethewidestpossibleboundsgiventherangesofvalues(Schwartz37-38).Interval-valuedfunctionsfollowfromintervalarithmeticofwhichtherearetwotypes:intervalextensionsandunitedextensions(ortruesolutionsets).Intervalextensionsarefunctionswhereintervalarithmeticisappliedtocalculateresults.Unitedextensionsaremorecomputationallyintensiveandinvolvecalculatingfixed-pointresultswithallpossiblecombinationsofvariableintervalendpoints.Thedisadvantageoftheintervalextensionsisthattheycanoverexpandthetruesolutionsetsofafunction(Schwartz45-49).Thisqualityofintervalextensionsisunfortunatesincebothtypesofextensionsguaranteecontainmentofallpossiblenumericalresultsofthefunctiongiventheinputs.Also,bothextensionssatisfyapropertycalledinclusionmonotonicity(giveninputs,anextensiongeneratesthewidestpossiblebounds),whichissimilartotheextremesprincipleofintervalarithmetic(Schwartz56).
1.2ForagingTheory
1.2.1BasicsofForagingModels
Foragingmodelsingeneralstudytwobasicproblemsofaforager:whichfood/preyitemstoconsumeandwhentoleaveanareacontainingfood(aresourcepatch).Thispaperwillconcentrateonthelatterasanoptimizationproblem.Beforegoingintodetailsofthemodel,itisimportanttounderstandtheframeworkofforagingmodels.StephensandKrebspointoutthatforagingandoptimalitymodelshavethreemaincomponents,decision,currency,andconstraintassumptions(5).Decisionassumptionsdeterminewhichproblems(orchoices)oftheforageraretobeanalyzedandthesechoicesareusuallyexpressedasvariables.Theoptimizationproblemcomesfromassumingbehaviourandevolutionarymechanismsoptimizetheoutcomeofaforager’schoices.Currencyassumptionsprovidemeansofevaluatingchoices.Thesechoicesusuallyinvolvemaximization,minimization,orstabilityofasituation.Choiceevaluationisembodiedinthecurrencyfunction(arealvaluedfunction),whichtakesthedecisionvariablesandevaluatestheiroutcomeintoasinglevalue.Constraintassumptionsarelimitationstothemodelandrelatedecisionvariableswiththecurrency.Limitationscanbegeneralizedto2types,extrinsic(environmentlimitsonanimal)andintrinsic(animal’sownlimitations).Also,therearethreegeneralconstraintassumptions(alsoassumedbythemodelinsection1.2.2)forconventionalforagingmodels:
1)Exclusivityofsearchandexploitation–thepredatorcanonlyconsumeorsearchforpatches/preyandnotperformbothactionsarethesametime
2)SequentialPoissonencounters–items(preyorpatches)areencounteredoneatatimeandthereisaconstantprobabilityregardingprey/patchmeetingsinashorttimeperiod
3)Completeinformation–theforagerbehavesasifitknowstherulesofthemodel
Thesethreeconceptsofdecision,currency,andconstraintprovidemeansofoptimizationgivenchoices,howtodeterminetheirsuccess,andlimitations(StephensandKrebs6-11).
1.2.2SimplisticAnalyticForagingModel
Giventhestructureofaforagingmodel,itiseasytoframeamodelexaminingtheforagingofasingleanimaloveracollectionofdistinctresourcepatches.Ihavetakenthemodelalongwithitsdecision,currency,andconstraintassumptionsfromWilson(2000)soderivationsofthemodel’sequations,itsorigins,andananalysisandextensionsofthemodelinCcanbefoundinhisbook.Therulesoftheforagerinthemodelarethattheanimalstaysforafixedtimebeforemovingtoanewresourcepatch,timeisdiscrete,andpatchresourcevalues(biomass,energy,etc)growlogistically.Thedecisionassumptionliesinthedeterminationofthefixedtimevalue.Thecurrencyfunctionallowsustooptimizetheanimal’ssituationgiventhisfixedtimeandalsoallowsustoapplyconstraintstothemodel(Wilson152).Despiteitsname,thesimplisticanalyticforagingmodelactuallycharacterizesforagingsimulationresultswellusingthemodel’sspecifications.Hereisalistofparameterstakeninbythemodel:
Toderivethemodel,wecanstartanalyzingtheresourcesideassumingthattheithpatchwithouttheforagerconsuminggrowslogistically:
Wheretistimeandriistheamountofresourcesintheithpatch.Ifaforagerentersagivenpatchf,resourcedynamicscanbemodeledasfollows:
Inthefthpatch,theconsumerdecreasestherateofgrowthbyafactorrelatedtobeta,theconsumingrate.Tomodeloverallpatchgrowth,averagepatchgrowthforN-1identicalpatchesisaddedtothepatchgrowth(ordecay)ofthefthpatch:
Toachieveanequilibriumresourcedensityr*,wesetdr/dt=0andsolveforryielding:
AquickanalysisofthelimitasNapproachesinfinityshowsthattheforager’seffectisinsignificantatequilibriumsincethetermcontainingbetagoestozeroandr*goestoKasexpected(Wilson153-154).Theresourcesideprovidesuswithanenvironmentandextrinsicconstraintsthatwillaffectthecurrencyfunctionwhichliesontheforagersideofthemodel.Keytoresourceexploitationmodelsisthegainfunction,g(t).Thegainfunctionspecifiestheamountconsumedfromaresourcepatchgiventimet.Assumingtheforagerlandsonaresourcepatchalwaysinequilibriumr*,g(t)isthetimeintegralofitsinstantaneousconsumptionrateminusitsmetaboliccosts.Metaboliccostsrepresentintrinsicconstraintssincetheanimalmust“pay”thesecostswhenforaging.
Thextandxmconstraintsactasintrinsiclimitationsonthemodelsincethetravelingcostspreventstheforagerfrommovingquicklyfrompatchtopatchandskimmingresources,whilethemetaboliccostcausestheforagertogatherresourcesforthreatofdeath.Inordertoevaluateg(t),werequireananalyticalsolutiontorf,whichmeasurestheresourcesinthepatchtheforagerisin.Solvingthefirstorderdifferentialequationfromtheresourcesidederivationsforrfusingseparationofvariablesyields:
Thensubstitutingthisequationintog(t)andsolvingtheintegralweget:
Usingthisgainfunction,thecrucialequationfromtheforagerperspective,thenetforagingratefunctioncanbecalculatedas:
R(t)isthecurrencyfunctionforourmodelsinceitisthebasisofchoiceevaluationandoptimizationforthemodel(Wilson154-155).Italsocombinesthedecisionvariablesandconstraintsintoonevalueandwillbeabasisforgraphicalanalysislateron.
1.2.3TheOptimalResidenceTime
Assumingbehaviouralandevolutionarymechanismsdriveforagerstooptimizethetimespentoneachpatch.Thisassumptionimpliesthattheywillstaylongenoughtooptimizetherateofresourceconsumption,r(t).Mathematically,thischoiceimpliesthemaximizationofr(t):
wheret*iscalledtheoptimalresidencetime.Forratemaximization,r’’(t*)<0mustalsobechecked;however,assumingr(t*)isatamaximum,weobtaintheequation:
whichrelatesr(t)tothederivativeofthegainfunction.Thesecondfunctionaboveisthefunctiontobeusedforrootfinding.Essentially,theoptimaltimetoleaveapatchiswhentheexpectedrateofresourcereturndecreasestotheaveragerateofreturnofanewpatch.Thisresult,whichisastatementofthemarginalvaluetheoremforforaging,isareasonableestimationofanimalbehaviourconsideringaforager’sdesiretomaximizeonitsresourceintake(Wilson156-157).Oneprobleminoptimizationproblemsisfiguringoutwhetheranoptimalpointexistsandinthiscase,wemustbesurer’’(t*)<0andbesuresuchat*exists.Unfortunately,duetothecomplexityofg(t)isitnotpossibletosolveforanexplicitsolutionoft*sotojustifyexistenceofasolution,weturntotheoreticaljustificationsand,laterinsection3.1.1,graphicalmeans.Duetotheconditionsspecifiedinforagingmodels,gainfunctionsare“well-defined,continuous,deterministic,andnegativelyaccelerated”functions(StephensandKrebs25-26).Thisoutcomeresultsfromassumingpatchresourcesaresufficient(i.e.theequilibriumresourceissufficientlylarge)enoughthat,whentheforagerentersapatch,r(t)willreachamaximumandthendecreaseuntilthegainfunctionreachesanasymptoticmaximumwhenfurthertimespentintheresourcepatchdoesnotyieldsignificantlymoregaininresources.Thereasonforthegainfunction’spropertiesistheassumptionthatpatchescontainafinitenumberofresourcesandforagingdepletesthem.Thisassumption;however,reliesontheassumptionsaboutresidencetime,foragingrates,andresourcepatchdynamicsingeneral(StephensandKrebs25-26).Duetothesimplenatureofthemodel,thesegainfunctionpropertiesholdsor(t)doesreachamaximumatt*andr’’(*t)<0.
Chapter2:ResearchProblemsandMethods
2.1Motivation
2.1.1ProblemswithFixedPointOptimizationinForagingModels
StephensandKrebs(1986)discussvariouslimitationsandcriticismsofbehaviouralecologyoptimalitymodels.Onecriticismhastodowith“staticversusdynamic”modelingsincebasicforagingmodelsoftendonottaketheanimal’sstateintoaccount(i.e.whetherananimalisstarvingorfullyrestedandfed)(StephensandKrebs34).Also,aproblemthatoccursduringtestingphasesofamodeliswhenitbreaksdown.Atthatpoint,theecologistmustre-analyzethemodeltofindwhatisincorrect,oftencheckingconstraints(StephensandKrebs208)
2.1.2IntervalAnalysisasanUncertaintyMethod
IAcanaddressbutnotcompletelysolvetheproblemsstatedabove.OneofthestrengthsofIAisitsabilitytoevaluateawholerangeofvaluesinonecalculationthatwouldtakeaninfinitenumberoffixed-pointcalculationstoproduce.Asaresult,IAcouldsimulatethepresenceofmultiplestatesofananimaland/oritsenvironmentbyplacinguncertaintyinthemodel’sparameters.Thismethodprovideseasydeterministicimplementationofmultiplestatemodelsandproducesrangesofvaluesforevaluation.Thismethodpartiallyaddressesthesecondproblemofwhenamodelbreaksdown.Amodelcouldbreakdownduetoincorrectassumptionsaboutconstantforagerorenvironmentstates.AnotherapplicationofIAtotestingisthatIAisnumericallysuperiorwhenitcomestotestingdifferentacceptableuncertaintiesinvaluescouldhelpidentifyproblemsinthemodelorunrealisticassumptions.
2.1.3ResearchProblem
ThepurposeofthispaperistointroduceIAmethodstothesimplisticanalyticforagingmodelandcalculateintervaloptimalresidencetimesforintervalparameters.Atsametime,solvingthefixedpointoptimalresidencetimewillprovideframeworkfromwhichtoanalyzetheintervalresults.TheoptimizationwillbedoneforpatchsizesN=3,5,10,and20.Theparameterswithuncertaintywillbe:
Theseuncertaintiescouldbestrengthenedwithfieldworkstudies;however,forsimplicitytheyaredeterminedapriori.Aftercomputingintervaloptimalresidencetimes,theintervalsandtheirfixed-pointapproximationswillbecomparedtothefixed-pointoptimaltimestocomparealgorithmsandtoanalyzethefunctions’behaviourunderbothmethods.Onamoretheoreticalside,stabilityanalysisofthemodelwillbeconducted.Thisanalysisinvolvesvaryingoneuncertainparameter,whileholdingtheothersconstantuntilthemodelfails.Therefore,stabilityanalysisisusedtoseeperformanceofthemodelunderparameteruncertaintyperturbations.Conditionsforfailurewillbespecifiedinsection.
2.1.4Software
ThelanguagetobeusedisMatlabversion5.3withanadd-ontoolboxcalledINTLABprogrammedbySiegfriedRump(2001).RefertothereferencesfordocumentationontheINTLABtoolbox.Forthispaper,theINTLABtoolboxisusedtoprovideintervaldatastructures,implementationofintervalarithmeticandinterval-valuedfunctions,aswellasbasicfunctionsforradius,midpoint,andintersectionintervalfunctionsinMatlab.
2.2Methodology
2.2.1Fixed-PointAnalysis
GeneralMethod
Rootfunc(t)specifiedbelowisthefunctionwhoserootweareseeking:
Sincerootfunc(t)hasrelativelycheapfunctionevaluationsitisusefultoperforma“graphicalsearch”fortheroot(VanLoan294).Thisprocedureinvolvesplottingthefunctioninthetimeintervalofinterestandexaminingitsroots.Inadditiontothisfunction,duringthefixed-pointanalysis,wewillalsoplotr(t)tosearchfortheexistenceofmaximumsaswellasrootfunc’’(t)toconfirmthatrootfunc’’(t)isindeednegativeintheintervalofinterest.Although,graphicalsearchesarerathertrivial,theyprovidealargeamountofinformationconfirmingtheoreticalconclusionsinsection1.2aswellasenablingapictorialviewoftheobjectiveandrelatedfunctions.Anotheruseoftheplottingoffunctionsbeforeoptimizationistousetheplotstogeneratestartingintervalsforiterationsofrootfindingmethods.Inordertoplotrootfunc,r(t),andr’’(t)itisnecessarytoimplementequationsforg(t),g’(t),andr’’(t).Thedetailsforcalculatingg’(t)andr’’(t)areleftoutsinceg(t)isarathermessyfunction,butthederivativesareimplementedintheMatlabcodeforsection3.1.1.Assumingthepropertiesofthegainfunctiondiscussedin1.2.3,whichwillbeconfirmedinsection3.1.1,itisnecessarytochooseanalgorithmthatwillproducearootgiventheconditionsofrootfunc(t).
Algorithm:BisectionMethod
Sincerootfunc(t)iscontinuousandchangessignwithintheintervalofinterest,thebisectionmethodcanbeused.Thismethodinvolvescalculatingasequenceofsmallerandsmallerintervalsthatbracket(contain)therootofrootfunc(t).Themainalgorithmproceedsasfollows(ifrootfunct(t)=f(t))givenabracketinginterval[a,b]:
assumef(a)f(b)0andletm=(a+b)/2
eitherf(a)f(m)0orf(m)f(b)0
inthefirstcaseweknowtherootisin[a,m]elseitisit[m,b]
Ineithersituation,thesearchintervalishalvedandthisprocesscanbecontinueduntilasmallenoughintervalisobtained.Sincethesearchintervalishalvedwitheachiteration,thebisectionmethodexhibitsO(n)convergence.Theonlytrickypointsaretooptimizethemethodsothatonlyonefunctionevaluationisrequiredperiterationafterthefirstandtoestablishasafeconvergencecriterionsothatthetoleranceintervalisnotsmallerthanthegapinthefloatingpointnumbersbetweenaandb.VanLoanprovidesthecoreofthecodeforthebisectionmethodwithslightmodificationstofittheparametersofthemodel(280).AlthoughthebisectionmethoddoesnotexperienceO(n^2)convergenceliketheNewtonmethod,rootfunc(t)issimpleenoughthatitconvergesquicklyforpracticalpurposes.Also,itissimple(algorithmicallyanddoesn’trequirerootfunc’(t)implementation)andtranslateswellintotheideaofsearchingusingastartinginterval[a,b],whichwewilluselaterintheintervalrootfinding.
2.2.2IntervalAnalysis
GeneralMethod
Whenchangingfromfixed-pointtointervalbasedrootfindingtherearesomeimmediatedifferences.Therootisnolongeracrispintervalsinceiterationsusinganinterval-valuedfunctionproduceintervals.Asaresult,convergencecriterionsandthegeneralmethodsofrootfindingmusthaveasetvaluedapproach.Becausetheoptimalresidencetimeswillinherentlybethickintervalssincetherootfunc(t)isnowanintervalfunctionwithuncertainparameters,convergencewillbesolvedsimplebysettingamaximumnumberofiterations.ThereasonthisconvergenceguaranteesanenclosureoftherootisduetotheIntervalNewtonmethod,whichisbasedonthefixed-pointone.
IntervalNewtonMethod
Fordetailsofthemathandconvergencepropertiesofthealgorithm,refertoKulischetal.(2001).Thisalgorithm,whenfindingrootsoffixed-pointfunctionsexhibitsO(n^2)convergence.LiketheBisectionMethod,itrequiresabracketingintervaltobeginandwitheachiterationgeneratessmallerandsmallerintervals(ifpossible),whichareboundedbyintersectionswithpreviousiterations.Thealgorithmisasfollows:
wherethex’sareintervals,m(x)isthemidpointofatheintervalx,andfisthefunctionwhoserootweseek(Kulischetal.35-36).Thesimilarityofthisalgorithmtothefixed-pointNewtonmethodisthatastartingintervalmustbesuppliedandtheintervalsizeisdecreasedusingaf(x)/f’(x)termduringiterations.Thisalgorithmisalmostassimpleasthebisectionmethodsinceaneasyconvergencecriterionhasbeenspecified;however,theintervalNewtonrequiresimplementationofrootfunc’(t)andrequiresforanevaluatedintervalx.Throughcomputationaltrials,Ihavedecidedtoincreasethecomplexityofthefunctionevaluationsforthef(x)/f’(x)bycomputingitsunitedextensioninsteadofaintervalextension.Sincebothf(x)andf’(x)involvemanyintervalarithmeticcalculationsinanintervalextension,thevaluesareoverexpandedfromtheirtruesolutionsetandincomputingoptimalresidencetimesweareinterestedinfindingtightboundsontherootgivenmodeluncertainties.Asaresult,theintervalNewtonstepiscalculatedbyfindingtheminimumsandmaximumsoff(x)andf’(x)givenallthecombinationsoftheendpointsoftheparametersandthetimeintervalandproducingunitedextensionvaluesforbothquantities.
VariationandConstraintsonParameters
Asoutlinedin2.1.3,percentuncertaintiesinthealpha,beta,xt,andxmparameterswillbeaddedwhenanalyzingthemodelusingintervalrootfinding.Thisvariationofparametersservestoaddresstheproblemswithfixed-pointoptimizationoutlinedin2.1.1.Thepotentialuseforintervalparametersliesinmodeltesting,simulatingarangeofenvironmentandforagerstates,andrelaxationofconstraints.Besidesreplacingparameterswithintervals,wealsowanttoconductthestabilityanalysismentionedin2.1.3.Thisprocessinvolvesincreasinguncertaintiesofagivenparameterwhilekeepingallotherparametersconstantuntilthemodelfails.AfterspecifyingtheintervalNewtonalgorithmwecanconstructafailurecondition.FailureofthemodelcanbeconsideredtooccurwhentheintervalNewtonmethodreturnsoftheinitialintervalsuppliedtotheintervalrootfinderastheoptimaltimeintervalforanyNnumberofpatches(i.e.thealgorithmwasunabletoprovidetighterboundsforoptimalresidencetimethantheinitialinterval).Thisinitialintervalwillbechosentobeasufficientlythickintervalfromfixed-pointanalysis,whichenclosesthetimeintervalofinterest.Asaresult,theintervalwillbetheonechosentoinitiatethebisectionmethod.Thereareotherconditionsthatcouldclassifyfailure;however,fromamodelstandpoint,averythickintervalforanoptimalresidencetimeisnotveryusefulsinceitimpliestoomuchvariabilityinaforager’sbehaviour.Consequently,stabilityanalysisisanumericallyintensiveprocedureinvolvinggradualincreaseduncertaintiesofaparameteruntilmodelfailure.Itisinterestingmorefromatheoreticalstandpointsinceitdescribeslimitationsofthemodelaswellasextremesituationsandtheireffectsonaforager’soptimalresidencetime.
Chapter3:NumericalAnalysisofModel
Inthischapter,IwillincludeMatlabcodeofkeyfunctionsimplementingthegeneralmethodsdiscussedin2.2,supportingfunctions,andalgorithmsastheyareusedinthenumericalanalysisofthemodel.
3.1Fixed-PointAnalysis
3.1.1GraphicalAnalysis
Insection,thegraphsofr(t),rootfunc(t)androotfunc’(t)wereseentobeinformativeforselectinganinitialintervaltobeginthebisectionandintervalNewtonmethods.Also,thesegraphshelpvisualizethebehaviourofthemodelastimepassesaswellasconfirminganoptimalresidencetimeexists.Thefollowingfunctionsarerequiredtoimplementthefunctionsandgraphthem.Also,thefollowingparameterspecificationsfromWilsonareused(155):
functiongain=gain(t,alpha,K,beta,xt,xm,N)
%GAIN(t,alpha,K,beta,xt,xm,N)GainFunction
%
%Generalevaluationoftheg(t)functionwhich
%takesinthevariablesinorder:time,patchgrowth
%rate,patchcarryingcapacity,consumingrate,
%travelcost,metabolicrate,andnumberof
%resourcepatches
rstar=(1-beta/alpha/N)*K;
deltaBA=beta-alpha;
num=(alpha*rstar+...
K*(deltaBA))*exp(deltaBA*t)-...
alpha*rstar;
denom=K*deltaBA;
inLog=num/denom;
gain=(beta*K/alpha)*(log(inLog)-deltaBA*t)-...
(xt+xm*t);
functionintakeRate=r(t,alpha,K,beta,xt,xm,N)
%R(t,alpha,K,beta,xt,xm,N)IntakeRateFunction
%
%Calculatesthenetintakerate.Takesinthevariables
%inorder:time,patchgrowthrate,patchcarrying
%capacity,consumingrate,travelcost,metabolicrate,
%andnumberofresourcepatches
g=gain(t,alpha,K,beta,xt,xm,N);
intakeRate=g./t;
functiongainprime=gainprime(t,alpha,K,beta,xt,xm,N)
%GAINP(t,alpha,K,beta,xt,xm,N)GainFunctionDerivative
%
%Generalevaluationoftheg'(t)function
%
%Takesinthevariablesinorder:time,patchgrowth
%rate,patchcarryingcapacity,consumingrate,
%travelcost,metabolicrate,andnumberof
%resourcepatches
rstar=(1-beta/alpha/N)*K;
deltaBA=beta-alpha;
exppart=(alpha*rstar+K*deltaBA)*exp(deltaBA*t);
num=deltaBA*exppart;
denom=exppart-alpha*rstar;
gainprime=(beta*K/alpha)*(num./denom-deltaBA)-xm;
functionrootfunc=rootfunc(t,alpha,K,beta,xt,xm,N)
%ROOTFUNC(t,alpha,K,beta,xt,xm,N)RootFunction
%
%Thisfunctiontheonewewanttofindtherootof
%Takesinthevariablesinor
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 装潢设计合同范本
- 2025年中国辅助护肝保健品市场全景评估及投资规划建议报告
- 2025年涡卷簧项目投资可行性研究分析报告-20241226-183224
- 排水防涝设施功能提升项目投资估算与资金筹措
- 数学课后教学反思简短(13篇)
- 纸浆期货合同范本
- 2024年中国超声仪器行业市场专项调研及投资前景可行性预测报告
- 2025年中国中药片剂行业市场发展前景及发展趋势与投资战略研究报告
- 宁波中寰检测技术有限公司介绍企业发展分析报告
- 山东轴承制造市场前景及投资研究报告
- 2025年2级注册计量师专业实务真题附答案
- 2025年春季学期教导处工作计划及安排表
- 果实品质评价体系建立与应用-深度研究
- 智能制造技术在工业设计中的应用
- 2025年湖南高速铁路职业技术学院高职单招高职单招英语2016-2024年参考题库含答案解析
- 北京市东城区2024-2025学年高一上学期期末统一检测历史试卷(含答案)
- 发展新质生产力如何“因地制宜”
- 《fema失效模式分析》课件
- 联合救治房颤患者的协议书
- 企业自查报告范文
- 沐足店长合同范例
评论
0/150
提交评论