Package: rampdemand
An open-source bottom-up stochastic model for generating multi-energy load profiles(RAMP Website,RAMP Documentation)What is RAMPRAMP is an open-source software suite for the stochastic simulation of any user-driven energy demand time series based on few simple inputs.The project aims to provide synthetic data wherever metered data does not exist, such as when designing systems in remote areas. Check out thedocumentationand learn more on the RAMP world from ourwebsite!Recommended installation methodRAMP has been successfully installed and used on macOS, Windows and Linux.The easiest way to make RAMP software working is to use the free conda package manager which can install the current and future RAMP
dependencies in an easy and user friendly way.To get conda,download and install “Anaconda Distribution”, or“miniconda”which is lighter.
You can install RAMP using pip, conda or from source code.Installing through pipTo install the RAMP software, we suggest to create a new environment by running the following command in theAnaconda prompt:condacreate-nramppython=3.82. If you create a new environment for RAMP, you’ll need to activate it each time before using it, by writing
the following line in theAnaconda Prompt:condaactivaterampNow you can use pip to installrampdemandon your environment as follow:pipinstallrampdemandInstalling through the source codeYou can also install RAMP from the source code! To do so, you first need to download the source code, which can be done in two ways:You can use git to clone the repository via:gitclonehttps://github.com/RAMP-project/RAMP.gitOr, you may download the source code directly from:“RAMP GitHub Repository”.In this second case, the source code will be downloaded as a zip file, so you’ll need to extract the files.After downloading the source code using any of abovementioned methods, you’ll need to use youranaconda promptto install it. There are two options again:You may follow the first two steps mentioned inInstalling through pip. Then, change the directory in the prompt to the folder where the source code is saved (where you can find thesetup.pyfile). To install the RAMP software, you may then use:pythonsetup.pyinstallAlternatively, without taking any prior action, simply change the directory in the prompt to the folder where the source code is saved and then use:condaenvcreate-fenvironment.ymlQuick startThere are different ways to build a model using RAMP! Here, we provide a first example but you can find more information in ourdocumentation.Example python input filesThree different input files are provided as example representing three different categories of appliances that can be modelled with RAMP.
To have a look to the python files, you can download them using thedownload_examplefunction:fromrampimportdownload_exampledownload_example("the specfic folder directory to save the files")input_file_1.py: represents the most basic electric appliances; it is
an example of how to model lightbulbs, radios, TVs, fridges, and
other electric appliances. This input file is based on the ones used
forthe first RAMP publication.input_file_2.py: shows how to model user-driven thermal loads, with the
example of a “shower” appliance. The peculiarity of thermal appliances
is that the nominal power can be provided as external input as a
“.csv” file (in this case,shower_P.csv). For the example “shower”
appliance, the varying nominal power accounts for the effect of
groundwater temperature variation throughout the year. This input
file is based on that used forthis
publication.input_file_3.py: represents an example of how to model electric
cooking appliances. In this input file two different kind of meals
are modelled: 1) short and repetitive meals (e.g. breakfast); and 2)
main meals (e.g. lunch, dinner). Repetitive meals do not vary across
days, whilst main meals do so. In particular, every household can
randomly choose between 3 different types of main meal every day.
Such variability in meal preferences is modelled by means of two
parameters: theuser preferenceand thepreference index. Theuser preferencedefines how many types of meal are available for
each user to choose every day (e.g. 3). Then, each of the available
meal options is modelled separately, with a differentpreference indexattached. The stochastic process randomly varies
the meal preference of each user every day, deciding whether they
want a “type 1” meal, or a “type 2”, etc. on a given day. This input
file is used inthis
publicationYou can execute python input files within an IDE, in your terminal with python commandpython<pathto.pyinputfile>or in your terminal with therampcommand, seeCommand line optionsbelow for more information.Spreadsheet input filesIt is also possible to use spreadsheets as input files. To do so, you
need to run therampcommand with the option-i:ramp-i<pathto.xlsxinputfile>NoteYou can input several files, separated from each others by a single blank space you can also input python filesCommand line optionsIn the command line you can also run .py input files
If you already know how many daily profiles you want to simulate you can indicate it with the-noption:ramp-i<pathto.xlsxor.pyinputfile>-n10will simulate 10 daily profiles. Note that if you do not provide this option you will being prompted for the
number of daily profiles within the console.If you want to save ramp results to a custom file, you can provide it with the option-oramp-i<pathto.xlsxinputfile>-o<pathwheretosaveRAMPoutputs>NoteYou can provide a number of output files, separated from each others by a single blank space, matching the number of input files.Other options are documented in the help oframp, which you access with the-hoptionramp-hIf you have existing python input files, you can convert them to
spreadsheet. To do so, go to the\rampfolder and runpythonramp_convert_old_input_files.py-i<pathtotheinputfileyouwishtoconvert>For other examples of command lines options, such as setting date ranges, please visitthe dedicated sectionof the documentation.Building a model with a python script# importing functionsfromrampimportUseCase,User# Create a user categoryhousehold_1=User(user_name="Household type 1",# an optional feature for the User classnum_users=10,# Specifying the number of specific user category in the community)You can add appliances to a user category by:# adding some appliances for the householdradio=household_1.add_appliance(name="Small Radio",# optional feature for the appliance classnumber=1,# how many radio each household type 1 haspower=10,# RAMP does not take care of units of measure (e.g., Watts), you must be consistentfunc_time=120,# Total functioning time of appliance in minutesnum_windows=2,# how many time-windows the appliance is used in)The use time frames can be specified using the ‘window’ method for each appliance of the user category:# Specifying the functioning windowsradio.windows(window_1=[480,540],# from 8 AM to 9 AMwindow_2=[1320,1380],# from 10 PM to 11 PM)You can also add another, different user to the simulation. In this case,
we use a more compact formulation:# Create a second user categoryhousehold_2=User(user_name="Household type 2",# an optional feature for the User classnum_users=13,# Specifying the number of specific user category in the community)# adding some appliances for the new household type in compact form, with windows specified directly and random variabilitylight_bulbs=household_2.add_appliance(name="Light bulbs",# optional feature for the appliance classnumber=5,# how many light bulbs each household type 2 haspower=7,# RAMP does not take care of units of measure (e.g., Watts), you must be consistentfunc_time=120,# total functioning time of appliance in minutestime_fraction_random_variability=0.2,# 20% random variability associated to the total functioning timenum_windows=2,# how many time-windows the appliance is used inwindow_1=[390,480],# from 6.30 AM to 8 AMwindow_2=[1020,1440],# from 5 PM to 12 PMrandom_var_w=0.35# 35% randomness assigned to the size of the functioning windows)At this point, we can group our different users into a “use case” and run the simulation,
for instance for a whole year.use_case=UseCase(users=[household_1,household_2],date_start="2020-01-01",date_end="2020-12-31")whole_year_profile=use_case.generate_daily_load_profiles()Here is your first load for a community including two types of housholds,
for a total of 23 individual users. Of course, more variations and many more
features are possible! For instance, you can simulate loads even for
an individual appliance or user. In addition, you can use in-built plotting
functionalities to explore your results. Check out the documentation
for all the possibilities.ContributingThis project is open-source. Interested users are therefore invited to test, comment or contribute to the tool. Submitting issues is the best way to get in touch with the development team, which will address your comment, question, or development request in the best possible way. We are also looking for contributors to the main code, willing to contribute to its capabilities, computational-efficiency, formulation, etc.To contribute changes:Fork the project on GitHubCreate a feature branch (e.g. named “add-this-new-feature”) to work on in your forkAdd your name to theAUTHORSfileCommit your changes to the feature branchPush the branch to GitHubOn GitHub, create a new pull request from the feature branchWhen committing new changes, please also take care of checking code stability by means of thequalitative testingfunctionality.How to citePlease cite the original Journal publication if you use RAMP in your research:F. Lombardi, S. Balderrama, S. Quoilin, E. Colombo, Generating high-resolution multi-energy load profiles for remote areas with an open-source stochastic model, Energy, 2019,https://doi.org/10.1016/j.energy.2019.04.097More informationWant to know more about the possible applications of RAMP, the studies that relied on it and much more? Then take a look at theRAMP Website!LicenseCopyright 2019-2023 RAMP, contributors listed inAuthorsLicensed under the European Union Public Licence (EUPL), Version 1.2-or-later; you may not use this file except in compliance with the License.Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an“AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.NoteThis project is under active development!