Package: pypepa
pypepapypepa is a PEPA library and a toolset forPerformance Evaluation Process Algebra(PEPA) by Jane
Hillston. pyPEPA is not a fully PEPA compatible tool, it supports a limited (for now) PEPA syntax (we only allow<>operator in system equation), i.e. it does not suport hiding operator (e.g.P\{a,b,}), does not calculate passage time. pyPEPA also does not use Kronecker state space representation and Hillston’s aggregation algorithms, so it can have worse performance than the PEPA Eclipse Plugin.
All these features, plus more, are planned to be added in next versions. If you are willing to help, just email me or put a pull request.Warning: pyPEPA is under development, this is a beta softwarepyPEPA consist of three parts:libpepa - a library written in Python,pyPEPA - a command line tool for solving and graphing,distr/ - map reduce tools for solving large PEPA experiments.More docs can be found onreadthedocs.News(19.05.2014) Switched completely to python > 3.3(22.07.2013) Docs added, pypepa has now docs on rtd.org(18.07.2013) pypepa can now calculate utilisations of components’ states, output argument works
again(07.06.2013) Added support for defining rates as mathematical expressions, e.g. r=2*3+7*n;InstallationPackageUsing pip:$pipinstallpypepaManually:Clone the project$gitclonegit@github.com:tdi/pyPEPA.gitpypepa$cdpypepaRun install$pythonsetup.pyinstallFrom the sourceFor the current version I recommend installing in a virtualenv.Clone the project$gitclonegit@github.com:tdi/pyPEPA.gitpypepa$cdpypepaMake a virtualenv$mkvirtualenv-p/usr/bin/python3pypepa$workonpypepaInstall all requirements$pipinstallpyparsingnumpyscipymatplotlibUsing pypepaBasic argumentsShow help command:$pypepa-hSet logging level (the default is NONE):$pypepa--log{DEBUG,INFO,ERROR,NONE}CalculationsCalculate steady state for bank scenario. The putput is by default directed to your terminal.$pypepa-stmodels/bankscenario.pepaStatespaceofmodels/bankscenario.pepa.1has7statesSteadystatevectorUsing;delimiter1;Idle,WaitingForCustomer,WaitingForEmployee;0.083333333333333372;Informed,WaitingForCustomer,WaitingForEmployee;0.253;WaitingBankResponse,RequestReceived,WaitingForEmployee;0.166666666666666664;WaitingBankResponse,CustomerNotReliable,WaitingForEmployee;0.166666666666666665;WaitingBankResponse,CustomerReliable,WaitingForEmployee;0.166666666666666666;WaitingBankResponse,WaitingManagerResponse,EvaluatingOffer;0.083333333333333337;OfferReceived,WaitingForCustomer,WaitingForEmployee;0.08333333333333333Calculate actions’ throughput:$pypepa-thmodels/bankscenario.pepaStatespaceofmodels/bankscenario.pepa.1has7statesThrouhput(successfulactioncompletioninonetimeunit)readInformation0.08333333333333337createLoanRequest0.25getNotReliableMessage0.16666666666666666badOffer0.08333333333333333askManager0.16666666666666666reset0.08333333333333333goodOffer0.08333333333333333checkReliability0.3333333333333333You can calculate transient time proability for some number of time steps:$pypepa--transient5models/bankscenario.pepaTransientanalysisfromtime0to10Using;delimiter1;Idle,WaitingForCustomer,WaitingForEmployee;0.083512027619473422;Informed,WaitingForCustomer,WaitingForEmployee;0.25001698979741213;WaitingBankResponse,RequestReceived,WaitingForEmployee;0.166621290236971144;WaitingBankResponse,CustomerNotReliable,WaitingForEmployee;0.166577212776344945;WaitingBankResponse,CustomerReliable,WaitingForEmployee;0.166577212776344856;WaitingBankResponse,WaitingManagerResponse,EvaluatingOffer;0.083289470397787027;OfferReceived,WaitingForCustomer,WaitingForEmployee;0.08340579639566591You can choose a solver by specifying--solver|-s{direct, sparse}.
By defalt we use sparse solver with LIL matrix becuase it is faster and in overall matrices generated from PEPA models are sparse. There is also an insignificant difference in results.pypepa allows you to visualise all PEPA components and the whole state space of a model by specifying-gdswitch. The generated graphiz dot files are by deault saved indotsfolder in the current directory. You can browse dot files withxdot, which you need to install first.$pypepa-gdbankdotsmodels/bankscenario.pepaFinally pypepa can provide us with a tool for experimentation with rates and actions.
Let’s check how throughtput ofaskManageraction changes whenrateResetchanges from 1 to 50 with step 1. The default result of this command will be a matplotlib graph.
The format of-varis “vartype:varname:value range specifier:value range value”. The one valid
vartype for now israte, for value range specifiers you can choose:rangeorlist. Forrangeyou need to provide START, STOP, STEP, whereas forlista comma separated list of values.
You can specify other output options with-fargument: graph, console, csv.$pypepa-var"rate:rateReset:range:1,50,1"-valaskManagermodels/bankscenario.pepaFormattingYou can specify formats of-st,-thand--varratewith a--formatoption.
Currently we support CSV (although;not comma delimited), console (the default) and graph (only
for varrate experiments). Additionally you can specify-o|--outputoption with a file argument to specify where to save the CSV.$pypepa-stmodels/bankscenario.pepa-fcsv-obank_steady.csvTODOFunctionalImplement rate mathematical expressions with functional rates (DONE)Implement passage time analysisImplement hiding operatorImplement 3d graphs and experiments (DONE)Implement Kronecker state space and aggregationImplement generalised communication PEPAgenPEPAby Mirco TribastoneAdd model manipulation language for reducersAdd stochastic probesAdd distributed version of BU algorithmAdd importing of models and components from external files (and namespaces)Non functionalOptimise optimise optimiseLicence and creditsCopyright (c) Dariusz Dwornikowski and Poznan University of Technology.
Distributed under the Apache Commons 2.0.