Abstract
As the amount and complexity of model source code, configuration files, and resulting data for simulative experiments are ever increasing, it becomes a real challenge to reliably and efficiently reproduce simulation data and their analysis results published in a scientific paper not only by its readers but also by the authors themselves, which makes the claims and contributions made in the paper questionable. The idea of reproducible research comes as a solution to this problem and suggests that any scientific claims should be published together with relevant experimental data and software code for their analysis so that readers may verify the findings and build upon them; in case of computer simulation, the details of simulation implementation and its configurations should be provided as well. In this chapter, we illustrate the practice of reproducible research for OMNeT++ simulation based on Pweave and Python. We show how to embed simulation configuration files and Python analysis code, import simulation data with automatic updating of simulation results, and analyze data and present the results in a file.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
pweave denotes an executable program, while Pweave denotes a Python package.
- 2.
Or the development of the simulation models has already been finished and the resulting code will not change.
- 3.
Chapter GitHub repository: https://github.com/kyeongsoo/reproducible_research.
- 4.
The example provided in this section has been prepared and tested with OMNeT++ version 5.4 and Pweave version 0.30.2 running on Python version 3.6.6 (64-bit Anaconda distribution version 5.2 available online at https://www.anaconda.com/download/).
- 5.
Listing 8.8 is shown here for explanation using the lstlisting environment.
References
Abbott, B.P., et al.: Observation of gravitational waves from a binary black hole merger. Phys. Rev. Lett. 116, 061102 (2016). https://link.aps.org/doi/10.1103/PhysRevLett.116.061102
Chang, K.: Panel says Bell Labs scientist faked discoveries in physics. The New York Times (2002)
Finkelstein, N.: Getting started with Python for R developers. http://n-s-f.github.io/2017/03/25/r-to-python.html. Accessed 03 May 2018
Jupyter: http://jupyter.org/. Accessed 03 May 2018
knitr: https://yihui.name/knitr/. Accessed 03 May 2018
Leisch, F., R-core: Sweave user manual (2018). https://stat.ethz.ch/R-manual/R-devel/library/utils/doc/Sweave.pdf
Marcelino, D.: Blog post: What is reproducible research? (2016). http://danielmarcelino.github.io/blog/2016/reproducible-research.html. Accessed 13 Mar 2018
OMNeT++ tutorials: result analysis with Python. https://docs.omnetpp.org/tutorials/pandas/. Accessed 03 May 2018
pandas: Python data analysis library. https://pandas.pydata.org/. Accessed 09 July 2018
Pérez, F., Granger, B.: IPython: a system for interactive scientific computing. Comput. Sci. Eng. 9(3), 21–29 (2007)
Pweave: http://mpastell.com/pweave/. Accessed 03 May 2018
R Core Team: R: a language and environment for statistical computing. R Foundation for Statistical Computing, Vienna (2013). http://www.R-project.org/. ISBN 3-900051-07-0
Report of the investigation committee on the possibility of scientific misconduct in the work of Hendrik Schön and coauthors. Bell Labs. (2002). https://media-bell-labs-com.s3.amazonaws.com/pages/20170403_1709/misconduct-revew-report-lucent.pdf
Scientific method: Oxford Dictionaries: British and World English (2016). https://en.oxforddictionaries.com/definition/scientific_method. Accessed 13 Mar 2018
Signal processing with GW150914 open data. LIGO open science center (2017). https://losc.ligo.org/s/events/GW150914/GW150914_tutorial.html. Accessed 27 Mar 2018
The Yale Law School Roundtable on Data and Code Sharing: Reproducible research: addressing the need for data and code sharing in computational science. Comput. Sci. Eng. 12(5), 8–13 (2010). https://doi.org/10.1109/MCSE.2010.113
VirtualBox: https://www.virtualbox.org/. Accessed 03 May 2018
Acknowledgements
The author is grateful for the constructive comments and feedback from the editors Antonio Virdis and Michael Kirsche, the anonymous reviewers, and the financial support for this work from Xi’an Jiaotong-Liverpool University Research Development Fund (RDF) under Grant RDF-14-01-25.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Kim, K.S.(. (2019). Simulation Reproducibility with Python and Pweave. In: Virdis, A., Kirsche, M. (eds) Recent Advances in Network Simulation. EAI/Springer Innovations in Communication and Computing. Springer, Cham. https://doi.org/10.1007/978-3-030-12842-5_8
Download citation
DOI: https://doi.org/10.1007/978-3-030-12842-5_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-12841-8
Online ISBN: 978-3-030-12842-5
eBook Packages: EngineeringEngineering (R0)