1
OpenSourceAgentBasedModelling
Frameworks
RussellK.Standish
SchoolofMathematicsandStatistic
UniversityofNewSouthWales
R.Standish@unsw.edu.au
1.1Introduction
Articial Life e as a a eld d of f study y was inaugurated by Chris s Langton, who
describedit asthestudy of man-madesystemsexhibiting behaviourschar-
acteristicoflife.Assuchitiscomplementarytotraditionalbiology,locating
life-as-we-know-itwithinthelargerpictureoflife-as-it-could-be[20].
Thecoreofarticialliferesearchinvolvesputtingtogethersimplecompu-
tationalobjects,oragentsthatinteracttoproduce\lifelike"behaviour.The
key term is emergence
1
of nontrivial,possibly even unexpected, behaviour
fromtheinteractionsoftheagents.
Theterm \agent"is oftenused toreferto pieces ofsoftware exhibiting
autonomy,reactivity,goalorientationandpersistence[11]runningonacom-
puterormigratingbetweenhostsofacomputernetwork.Agentbasedmod-
ellingisnotaboutthesesortsofagents,perse.Inanagentbasedmodel,the
threadofexecutionis passed backtothesimulationenvironmentaftereach
agent’smethodiscompleted,whichisanalogoustothewayexecutioncontrol
ispassedbetweenindependenttasksinamultitaskingoperatingsystem.Nor
do they often n have goalorientation. . What distinguishes s agent based mod-
ellingfrom other sorts ofmodellingis afocus on building models \bottom
up", constructing model systems s from a a largenumber r of smallinteracting
softwarecomponents,thatinthemselvesmodelacomponentofthemodelled
system.Thusinamodelofschoolingsh,eachshisindividuallymodelled,
asopposedtoaggregateconceptslike\schoolofsh".
Inarticiallifethefocusisonthesystemsthemselves,withoutreference
toexternalsystemsexcept perhaps byanalogy.Theagents areoftencalled
1
Theconcept ofemergence is adicultonefor philosophers topin down.Ican
recommend [15, , 3, , 12] ] for r discussions of the topic, and [34] ] for r my y own n take
on it. However, for the e purposes s of f this s chapter, , we can n rely on n our r intuitive
understandingof novelbehaviouremergingfromtheinteractionsbetweenparts
ofasystem.
Convert pdf to word text online - Convert PDF to txt files in C#.net, ASP.NET MVC, WinForms, WPF application
C# PDF to Text (TXT) Converting Library to Convert PDF to Text
convert pdf to text document; convert pdf image to text online
Convert pdf to word text online - VB.NET PDF Convert to Text SDK: Convert PDF to txt files in vb.net, ASP.NET MVC, WinForms, WPF application
VB.NET Guide and Sample Codes to Convert PDF to Text in .NET Project
convert pdf to word to edit text online; change pdf to text for editing
2
RussellK.Standish
digitalorganisms[32]tostressthisfact.Inagentbasedmodeling(ABM),the
samemethodologyofconstructingarticialanaloguesfromthebottomupis
applied to o modelingrealworld d systems {forestres,stock markets,trac
tonamebutafew.Theagentsinthemodelwillcorrespondinsomewayto
physicalobjectsinthesystembeingmodelled.
In biology,individual basedmodelling[17](IBM)hasbecomeincreasingly
important,asinadequaciesoftraditionalpopulationbasedmodelinghavebe-
come apparent.Individualbased models trackindividualanimals or plants
ratherthanpopulation aggregatedquantities.Individualbased modelsmay
beconstructedinanagent-basedway,withcomputationalobjectsrepresent-
ingeachindividualorganism,oralternativelyeachindividualis represented
byacollection ofnumbers,and the populationof individualsisthereforea
collectionofvectors.Forthesakeofclarity,letus callthistypeofmodela
vector-basedIBM.Conceptually,avector-basedIBMislittledierentfroma
specialisedagentbasedmodel,whereeachagentconsistingofacollectionof
numbers,howeverin practice datais laid out dierentlyin the computer’s
memory,whichleadstosubstantiallydierentperformancecharacteristics.
In physics,themainformofindividualbasedmodellingismoleculardy-
namics(MD)simulations.Here,eachmoleculeofthephysicalsystemofinter-
estisrepresentedbyacollectionofnumericalproperties:position,momentum,
mass,chargeetc.,andthecorrespondingpositionandmomentumvectorsare
updatedaccordingtothelawsofclassicaldynamics.WhilstMDsimulations
couldbeimplementedinanagent-basedfashion,itisrarelydoneduetothe
performancedegradationexperiencedindoingso.
Manyarticiallifesystemshavebeencreatedovertheyears,ofprominent
noteareTierra,Avida,Echo,Framstickstonamebutafewofthemostwell
known. Each h of thesesystemsis implemented fromground up in ageneral
purposeprogramminglanguagelikeCorC++.Atypicalsimulationneedsto
implementnotonlytheagents,butalsoanenvironment,aneventgenerator,a
meanstospecifyinputparameters,aswellasvisualisationandanalysistools.
Inanattempttointroducesomecommonalityandcodereusebetweenthese
disparate articiallife models, Langtoninitiated the Swarm project,which
producedanagent-basedmodelingplatformintowhichscientistscouldinsert
theiragents into o an n environment adapted fromalibrary of containers (aka
\Swarms"),anduseeventgeneratorsandvisualisationprobestoanalysethe
progressofthesimulation.
Overtheyears,anumberofsimilaragent-basedmodelingplatformshave
beencreated,eachwithadieringrationaleforexistence.Eachplatformspec-
iesaparticularimplementationlanguagefortheagentsandhasadierent
balancebetweenperformance,scalability,generalityandusability.
Thischaptersurveysopensource(Sect.1.3.1),agentbasedmodelingplat-
forms.Beingopensourceisimportant,forensuringreplicabilityofresultsbe-
tweendierentresearchgroups,andalsoforauditingagainstimplementation
artifacts.Thischapter does notexaminecommercialagentbasedmodelling
options.
VB.NET PDF Convert to Word SDK: Convert PDF to Word library in vb.
Convert PDF document to DOC and DOCX formats in Visual Basic control to export Word from multiple PDF files in Create editable Word file online without email.
.pdf to .txt converter; convert pdf picture to text
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
Quick to remove watermark and save PDF text, image, table Convert PDF to multiple MS Word formats such as .doc Create editable Word file online without email.
convert pdf photo to text; convert pdf to text c#
1 OpenSourceAgentBasedModellingFrameworks
3
1.2Applications
Agent based models havebeen used in awidevarietyof applicationareas,
sothis sectionwillnecessarily be illustrative.ABMs arecommonlyused in
socialsciencesettings,totesttheoriesforwhyparticularcustomshavearisen.
AnyrecentissueoftheJournal of ArticialSocietiesandSocial Simulation
will provide any number of agent t based d models. . Economics s toouse agent
basedmodelstomodelthebehaviourofmarkets.Here,though,agentbased
models compete with h moretraditional MonteCarlotechniques s that model
eacheconomicagentasasimplesetofstatevariables.
Another important areaof application is trac modeling, , with h vehicles
in aroadnetworkbeingrepresentedbysoftwareagentswithintendeddesti-
nations,and dieringlevelsofbehaviour(egconservative,experimentaland
soon).Heretheconcernisquitepragmatic{whathappensifanewroadis
createdhere,oranotherroadblocked?Similarconsiderationshavemotivated
researchintomodellingcrowdbehaviourwithinrestrictedenvironmentssuch
asasportingvenue.
Grimm[14]presentsadecadehealthcheckofindividualbasedmodellingin
ecology.Hustonetal.arguedthatindividualbasedmodelshadthepotential
to \unify y ecologicaltheory"[17], , yet Grimm found that a a decade e on n from
Huston’spaper,thispotentialhadnotbeenrealised.Individualmodelshave
theirplaceinansweringparticularquestionsinaccessibletomoretraditional
simulationtechniques,butlinkingtheresultsbacktotheoreticalconcernshas
notprovedeasy.
Finally, to articial life, the eld that t inspired Swarm and d later agent
based modelling g platforms.Agent based d modellingisan important toolfor
thegenerationofcomplexlife-likebehaviours,othersbeingcellularautomata
and boolean networks[38]. . However,curiously,generalpurpose agent based
modellingenvironmentssuchasSwarmandRepasthaverarelybeenusedin
thearticiallifeliterature,withresearchersdeveloping,ormakinguseofmore
specialpurposesimulationsoftwaresuchasAvida[1].
Thefollowingspecicmodelsarewellknownclassicmodelsthatillustrate
thesortsofmodellingABM’sareappliedto.Theyareexemplarsonly,agent
basedmodellingasaeldhasgrownfarbeyondtheboundsofasinglechapter
likethisone.
1.2.1 Sugarscape
Sugarscape[9]isaclassicagentbasedmodelofasocietyofagentslivingona
2Dgrid.Eachagenthaspropertiesofmetabolismandvision,inheritedfrom
their parents. . Agents s have separate requirements for \sugar" " and \spice".
Theyneedbothgoodstosurviveandexhaustionofeitherwillleadtodeathby
starvation.Theagentsthereforeneedtosearchforthesegoodsandaccumulate
theminordertosurvive.Theydosobyfollowingasimpleset ofconnected
instructionsreferredtoasaruleset.Forexample,therulesetforgatheringis:
VB.NET Create PDF from Word Library to convert docx, doc to PDF in
PDF to Word, C# extract text from PDF, C# convert PDF to Jpeg, C# compress PDF, C# print PDF, C# merge PDF files, C# view PDF online, C# convert PDF to tiff
convert pdf table to text; convert pdf to text online no email
VB.NET PDF - Convert PDF Online with VB.NET HTML5 PDF Viewer
PDF to Word, C# extract text from PDF, C# convert PDF to Jpeg, C# compress PDF, C# print PDF, C# merge PDF files, C# view PDF online, C# convert PDF to tiff
convert pdf to text without losing formatting; convert image pdf to text pdf
4
RussellK.Standish
1. Evaluatepersonalstocks s anddeterminewhich good isneededmore ur-
gently(preferredgood).
2. Lookaroundasfarasvisionpermitsandidentifythesitewiththegreatest
valueofthepreferredgood.
3. Ifthegreatestvalueexistsatmultiplelocations,selectonerandomly.
4. Movetothatsiteandharvestallresourcesfromthatsite.
5. If novalue is s found within the visible grid, , then n the citizen n randomly
relocatestooneofthefarthestcellswithinitsvisionrange.
Fig.1.1.SugarscapemodelimplementedinRepast
Agentreplacementiseitherhandledrandomlyuponthedeathofanyagent,
or agents willmate accordingtothematingruleset,givingrisetoospring
agents.Theospringagentsinheritpartoftheirparents’storesofsugarand
spice.
Agents need both h sugar r and spice to survive. They have independent
metabolismratesforeachresource.Theremayarisesituationswhereagents
starvetodeath due toapaucityofone resource,despitehavingaplentiful
supplyoftheother.Sugarscapeallowsagentstotraderesources.Theperson-
alityoftheagentisanimportantattributeaectingtheirapproachtotrade.
Personalityis randomlyassignedatbirthand determinesthe tradingstrat-
egypursuedbythecitizen.Abear(cautious)personalityseekstominimize
surplusandwillonlytradethesurpluscommodity.Abull(aggressive)person-
alityseekstomaximizetradesevenifitinvolvestradingthescarcecommodity.
Thebullonlytradestheminimumquantityrequiredtoreceiveoneunitofthe
othercommodity.Bymaximizingtrades,thebullseekstohedgeitsexposure
tounfairtrades.Forinstancethebearseekstradingpartnersthatpossessa
surplusofitsscarcecommodity.Itthenattemptstotradeacertainproportion
C# HTML5 PDF Viewer SDK to convert and export PDF document to
PDF to Word, C# extract text from PDF, C# convert PDF to Jpeg, C# compress PDF, C# print PDF, C# merge PDF files, C# view PDF online, C# convert PDF to tiff
convert pdf to openoffice text document; converting pdf to text
C# PDF Text Extract Library: extract text content from PDF file in
But sometimes, we need to extract or fetch text content from source PDF document file for word processing, presentation and desktop publishing
c# convert pdf to text; c# pdf to txt
1 OpenSourceAgentBasedModellingFrameworks
5
of its surplus such that thequantityreceivedin exchangecan be combined
with the balanceofits surplus tomitigate the riskof depletion of any one
commodity.Thebearstrategyisatriskofwild uctuationsintheexchange
pricedependingon thevariancein the marginalrateof substitution values
(perceived valueof spice relativeto o that ofsugar)of the tradingpartners.
Sincetheyattempttosellallavailablesurplusimmediately,bearscouldend
up tradingalltheirsurplus in asingleunfavorabletrade.Thebullstrategy,
bytradingunit amountswith asmanytradersaspossible,seeks toaverage
outprice uctuationsandarriveclosertotheequilibriumprice.
SugarscapehasbeenimplementedinSwarm,Repast,Mason,Cormasand
NetLogo,withtheMasonversionbeingperhapsthemostcomplete.
2
1.2.2 Santa a Fe Articial StockMarket
Fig.1.2.AscreenshotoftheArticialStockMarket
The\SantaFe"articialstockmarket was developed by Brian Arthur,
JohnHolland,BlakeLeBaron,RichardPalmer,andPaulTaylor[28,2].The
market consists of apopulation ofheterogeneous agents that buy, sell,and
2
SeanLuke,privatecorrespondence.
VB.NET PDF Text Extract Library: extract text content from PDF
Best VB.NET PDF text extraction SDK library and component for free download. Online Visual Basic .NET class source code for quick evaluation.
convert scanned pdf to word text; converting pdf to editable text for
C# Convert: PDF to Word: How to Convert Adobe PDF to Microsoft
C# Convert: PDF to Word: How to Convert Adobe PDF to Microsoft Word (.docx) File. Empower C# users to easily convert PDF document to Word document.
convert pdf to text format; best pdf to text converter for
6
RussellK.Standish
hold stocksandbonds.An agent’sbuy,sell,andholddecisionsaremadeon
thebasisofthatagent’sbeliefsaboutwhetherthestock’sdividendislikelyto
goupordown,andthosebeliefsaredeterminedbyasetofmarketforecasting
rulesthatarecontinuallybeingassessedastoaccuracy.Overtimeanagent’s
setofmarketforecastingrulesevolveundertheactionofageneticalgorithm.
Themarketcontainsaxed number N N ofagentsthat areeach h initially
endowed with a a certain n sum of money. . At t each h timestep p each agent t must
decide whether to invest her money in ariskystock or in n arisk-freeasset
analogoustoarealworldTreasuryBill.Therisk-freeassetisininnitesupply
andpaysaconstantinterestrater.Theriskystock,issuedinNshares,pays
astochasticdividendthatvariesovertime.Thestock’sdividendstreamisan
exogenousstochasticprocesswhosepresentvalueisunknowntotheagents.
Agents apply their market forecasting rules to o their r knowledge of the
stock’spriceanddividendhistorytoperformariskaversioncalculationand
decidehowtoinvesttheirmoneyateachtimeperiod.Thepriceofthestock
risesifthedemand for itexceeds thesupply,andfallsifthesupplyexceeds
thedemand.Eachagentinthemarketcansubmiteitherabidtobuyshares,
or an oer to o sellshares s {both at the current price p
t
{or neither.Bids
andoersneednotbeintegers;thestockisperfectlydivisible.Theaggregate
demandforthestockcannotexceedthenumberofsharesinthemarket.The
agents submit their decisionsand oers tothemarketspecialist{an extra
agentinthemarketwhocontrolsthepricesothathisinventorystayswithin
certain bounds.Thespecialist announcesan initialtrialprice,collects bids
andoersfromagents at thatprice,fromthesedataannounces anewtrial
price,and repeats this s process until l demand and d supply are equated. . The
marketclearingpriceservesasthenextperiod’smarketprice.
Theagentsmaketheirinvestmentdecisionsbyusingasetofhypotheses
or rules about howtoforecastthe market’s behavior.At each timeperiod,
eachagentconsidersaxednumberofforecastingrules.Therulesdetermine
thevaluesofthevariablesaandbwhichareusedtomakealinearforecastof
nextperiod’sprice:
E(p
t+1
+d
t+1
)=a(p
t
+d
t
)+b
(1.1)
wherep
t
is the trial l price,d
t
thedividend and a and baretheforecasting
parameters.Theforecastingruleshavethefollowingform:
if (themarketmeetsconditionD
i
) then (a=k
j
; b=k
l
)
(1.2)
whereD
i
isadescriptionofthestateofthemarketandk
j
andk
l
areconstants.
Marketdescriptors(D
i
)matchcertainstatesofthemarketbyananalysis
ofthepriceanddividendhistory.Thedescriptorshavetheformofaboolean
functionofsomenumberofmarketconditions.Thesetofmarketconditions
ineachruleisrepresentedasanarrayofbitsinwhich1signalsthepresence
of acertaincondition,0indicates itsabsence,and #indicates \don’tcare".
Thebreadthandgeneralityofthemarketstatesthatarulewillrecognizeis
C# HTML5 PDF Viewer SDK to view PDF document online in C#.NET
PDF to Word, C# extract text from PDF, C# convert PDF to Jpeg, C# compress PDF, C# print PDF, C# merge PDF files, C# view PDF online, C# convert PDF to tiff
converting pdf to searchable text format; convert pdf file to text file
1 OpenSourceAgentBasedModellingFrameworks
7
proportionaltothenumberof#symbolsinitsmarketdescriptor;ruleswith
descriptorswith more0sand 1srecognizemorenarrowandspecicmarket
states.As these strings aremodied by the geneticalgorithm, , the number
of 0sand1smightgoup,allowingthemtorespondtomorespecicmarket
conditions.Anappropriatere ection ofthecomplexityofthe populationof
forecastingrulespossessedbyalltheagentsisthenumberofspecicmarket
statesthattherulescandistinguish,andthisismeasuredbythenumberof
bitsthataresetintherules’marketdescriptors.
An example may help p clarify y the structure of market forecasting rules.
Suppose that there is atwelvebit market descriptor,therst bit ofwhich
corresponds to o the e market condition in which the e price has s gone e up p over
thelastftyperiods,andthesecondbitofwhichcorrespondstothemarket
conditioninwhichthepricewas75%higherthanitsfundamentalvalue.Then
thedescriptor10###########matchesanymarketstatein whichthestock
pricehas goneupfor the past fty periods and thestock priceis not75%
higherthanitsfundamentalvalue.Thefulldecisionrule
if 10########## # then n (a=0:96; ; b=0)
(1.3)
canbeinterpretedas\Ifthestock’spricehasrisenforthepastftyperiods
and is nownot t 75% % higher than n its s fundamentalvalue, , then the (price +
dividend)forecastforthenextperiodis96%ofthecurrentperiod’sprice."
Ifthemarketstateinagivenperiodmatchesthedescriptorofaforecasting
rule,theruleissaidtobeactivated.Anumberofanagent’sforecastingrules
maybeactivatedatagiventime,thusgivingtheagentmanypossibleforecasts
to choosefrom. The agent decides s which h of f the active forecasts to use by
measuringeachrule’saccuracyandthenchoosingatrandomfromamongthe
activeforecastswithaprobabilityproportionaltoaccuracy.Oncetheagent
haschosenaspecicruletouse,therule’saandbvaluesdeterminetheagent’s
investmentdecision.
TheArticialStockMarketwebsiteisimplementedinSwarm(bothJava
andObjectiveCversions),andavailablefromhttp://artstkmkt.sourceforge.net.
1.2.3 Heatbugs
Heatbugswasoriginallywrittena\demonstrator"modelforSwarm,illustrat-
ingthe main techniques for settingupagentsin a2Dgrid,and havingthe
agentsinteractwith theenvironment.Becauseitis afairlysimple,yetnon-
trivialmodel,andwelldocumented,ithasbeenportedtoanumberofother
agent-basedmodellingenvironments,includingRepastandMason.
An agent in Heatbugs (the\bug") emits acertain quantity of heat per
timestepintotheenvironment,whichthendiusesbythestandardheatequa-
tion.Eachheatbughasapreferredtemperature,sobytuningthemodelpa-
rameterone can see the formation of clusters ofbugs thatmanageto heat
theirenvironmenttoaroundthedesiredtemperature.
8
RussellK.Standish
Fig. 1.3. . Snapshot t of f the world d display y of f the e Heatbugs s model, running under
Repast
1.2.4 Mousetrap
MousetrapwasagainademonstratormodelforSwarm,toillustratetheuse
ofdynamicscheduling.Itconsistsofaplaneofloadedmousetraps.Theinitial
eventconsistsofaballdroppedonthecentralmousetrap,whichreleasesthe
mousetrapsendingtwoballsatrandomtoothermousetraps,releasingthem
inturninachainreaction.Infact,themousetrapmodelwasoriginallyintro-
ducedaspopularmeansofconveyingtheideaofanuclearchainreaction[31]
Thereis noconceptofatimestep,actionshappen when causedbyprevious
actions.
MousetraphasbeenimplementedinSwarm,RepastandMASON.
1 OpenSourceAgentBasedModellingFrameworks
9
1.3SoftwareModellingTools
1.3.1 OpenSourceversusFreeware
TheEnglish languagehas an unfortunateambiguity with the word \free",
whichcanmeanfreeofrestrictionsoralternativelyavailableforzerocost.This
ambiguityisnotalwayspresentinotherlanguages,egFrenchlibre/gratuitor
Germanfrei/kostenlos.TheFreeSoftwareFoundation
3
denesfreesoftware
ashavingfreedomfromrestrictionsonhowtouseordistributethesoftware.
Thinkof\free"as in\freespeech,"notas in \freebeer".[10]Freesoftware
need notbefreeasin beer,as onemaystillhavetopaydistributioncosts
(media, handling g charges s etc), , but in practice the modern internet means
thesechargesarenegligible.
Oneofthemostimportantcharacteristicsoffreesoftwareisthatofbeing
opensource,namelythatthesourcecodeforthesoftwareispubliclyavailable
forstudyandimprovement.
In scientic modelling,open sourceis crucialtoallowindependent vali-
dationofscienticexperiments.Often,whencomputationalexperimentsare
replicated byasecondresearchgroup,dierencesinbehaviourareobserved
betweentheoriginalreportedresults,andthereproducedexperiment.Itbe-
comesimportanttounderstandwhethertheproblemisduetoimplementation
bugsineithertheoriginal,orreplicatedcode,orwhetherthepublishedmodel
specicationisinadequate[23].
If thesourcecode ofthe computationalexperiment is openlypublished
alongwith scienticarticledescribingtheexperiment,thenitbecomes pos-
sible for r later researchers s to o tease apart t any anomaly that t might t appear.
Unfortunately,itisnotyetcommonplaceforresearcherstopublishthesource
codeoftheirexperiments,howeverthearticiallifecommunityencouragesthe
practicethrough askingreviewers tocheckandcommenton theavailability
ofexperimentalsourcecode.
Whataboutthesoftwarecomponentsusedtobuildthecomputationalex-
periment? Tohelp x themagnitudeoftheproblem,itis worth imagining
beingaresearcherthirtyyearsfromnowattemptingtoreplicateacontempo-
raryexperiment(asMcMullinfoundhimselfattemptingtoreplicateVarela’s
work[23]).Assumethatthesourcecodeusedfortheoriginalexperimentwas
available.Tobeabletoreruntheoriginalexperiment,youwouldneedacom-
piler forthelanguagetheexperiment wascoded in,and alsoacopyofany
librariesused.Sinceyouprobablydonothaveaccesstotheoriginalhardware
(howmanythirtyyearoldfunctionalcomputersareyouawareof),andunless
youhaveafunctionalemulator,youwillneedthesourcecodeforanylibraries
aswell.
The language used d in coding will probably y nolonger be used d (Fortran
andCareexceptionalinbeinglanguagesmaintainingbackwardcompatibility
overthissortoftimeframe),soyoumayalsoneedanopensourcecopyofthe
3
http://www.fsf.org
10
RussellK.Standish
languagecompiler.Atveryleast,withwelldocumentedlanguagestandards
(egANSI/ISOstandardC,C++)andassociatedstandardlibraries,itmaybe
possibletomanuallytranslateanexistingopensourceprogramintoamodern
languagewithsomesortofdelity.
Agentbasedmodellingsystemsfallintothe\anylibraries"category.Since
it isunlikelyfor anyABM systemto be perfectly documented,nor for the
scienticreport to list precisely which version of the tool’s s specication is
used,nor forthe actualABM system tobebug-free,itisvitallyimportant
thattheABMsystem’ssourcecodeisavailableforperusal.
Asmentionedabove,itisperhapsnotsoimportantfortheimplementation
languageandstandardlibrarytobeopen-source,provideditisoneofthewell
documentedstandardlanguages.However,itisimportantthatthelanguageis
freelyavailable(asinbeer),toremoveanybarrierstoindependentverication
ofcomputationalmodels.TheuseofJavaisacaseinpoint.Javaisdeveloped
bySun, with h a a well documented d languageand standardlibrary,and a a free
(asinbeer)referenceimplementationavailableformostmoderncomputing
platforms.WiththeGNUgcjproject
4
,Javawillbecomeanopensourceoption
in the e future, providing the language does s not evolve e too fast t for r the gcj
developmenteorttokeepup.
1.3.2 ProgrammingLanguages
Traditionalscientic modelling has been n implemented using ageneralpur-
pose high level l language such h as s Fortran, C and d more e recently C++and
Java.Standard librariesofnumericalmethodsareemployedwhererelevant,
but thesetend tobeorientedtowards modelsexpressibleintermsoflinear
algebraicoperations:vectors,matricesand so o on.Much h of ascienticcode
dealswithreadingmodelparameters,andreportingresults.Ifthecalculation
takesmorethanadayorsotocomplete,additionalcodeneedstobeaddedto
allowthecalculationtobepaused,resumed andmigratedascomputational
resourceavailabilityvaries.Furthercodewillneedtobeaddedtodistribute
thecalculationacrossmultipleprocessorstoenablecomputationstonishin
areasonabletime.Theupshotisthatasizablefraction,perhapsasmuchas
50%ofthelinesofcodeofascienticapplication,isnotdirectlyimplementing
thescienticcalculation,butperformstheseincidentaltasks.
Theamountofextraeort needed toobtainafunctioningscienticap-
plication has lead in many areasto\application frameworks",where for a
limitedrangeofscienticmodels,userscanpluginproblemspecicmethods.
Oneexampleofthisisintheareaofcomputational uiddynamics,wherethe
leadingpackagesFluentandCFXallowuserstosupplysubroutinescodedin
CorFortrantoimplementspecicphysicalmodels notsupplied in thecore
functionality.
4
http://gcc.gnu.org/java
Documents you may be interested
Documents you may be interested