Skip to content

MoMeEnT Adaptive Survey is a Flask-based web app for model-driven adaptive surveys, integrating real-time feedback with simulation models. It explores load-shifting in energy consumption, helping users assess cost, carbon impact, and grid effects based on their behavior. Runs locally for easy testing.

License

Notifications You must be signed in to change notification settings

BarsantiMatteo/momeent-adaptive-survey

Repository files navigation

MoMeEnT Adaptive Survey

Welcome to the momeent-adaptive-survey repository! This repository hosts the implementation of a web-based interface for an innovative, model-driven adaptive survey approach.

Below, you will find all the essential information to get started with the tool and explore its functionalities.


Table of Contents

  1. Overview
  2. Installation
  3. Running the Application
  4. Browser and Device Recommendations
  5. How to Cite This Work
  6. Acknowledgments
  7. License
  8. Contact

Overview

What is a model-driven adaptive survey?

A model-driven adaptive survey integrates dynamic feedback loops between survey data and simulation models. Through an iterative process, respondents provide data about their characteristics and behavior (e.g., sociodemographics, appliance usage), which parametrizes and runs the model. The model generates personalized indicator scores (e.g., energy consumption patterns). These scores are shared in near real-time, helping participants understand the impact of their choices and encouraging informed adjustments.

How does it work?

Model-driven adaptive surveys can be implemented in various ways, tailored to different purposes. This implementation investigates user preferences for load-shifting in energy consumption. The survey flow and functionalities are illustrated below:

Survey flow chart

The procedure is as follows:

  1. Block A: Respondents answer introductory questions about their sociodemographic characteristics (e.g., household size, type) and appliance usage behavior (e.g., frequency of dishwasher use).

  2. Block B: Respondents indicate typical washing times for appliances using sliders.

  3. Block B' (Backend): The tool estimates key performance indicators (KPIs) like yearly appliance costs, energy usage during peak hours, and the share of energy from renewable sources. A simplified version of demod, a Python library for household energy demand simulation, is used for these calculations.

  4. Block C: Respondents are presented with a scenario involving time-of-use tariffs. They adjust their washing times in response to fluctuating electricity prices.

  5. Block C' (Backend): KPIs are recalculated and compared to the baseline. The results are shared with respondents, allowing them to iterate and find their preferred configurations.

    KPI Estimation Procedure

  6. Blocks D-F: Additional scenarios are introduced, such as grid congestion or increasing renewable energy usage. Respondents adjust behaviors iteratively to explore trade-offs.

Why use a model-driven adaptive survey?

Traditional surveys with fixed-choice questions often fail to capture the complexities of user behavior, especially in energy consumption and demand-side flexibility. Model-driven adaptive surveys address this by integrating energy demand models, enabling respondents to make complex decisions in a tailored and interactive way.

Current Version

The momeent-adaptive-survey is a simplified version of the original survey described here. It is implemented as a Flask-based application, available in English, and designed for local testing.

Unlike the original version, which utilized AWS servers for backend processing, this simplified version operates entirely on your local machine. As a result, you may experience slight delays when loading results or switching pages. Thank you for your patience! 😊


Installation

Follow these steps to set up the project. We recommend using a virtual environment to manage dependencies.

Creating a Virtual Environment

  1. Install virtualenv:

    pip install virtualenv
  2. Create a virtual environment:

    virtualenv venv_name
  3. Activate the virtual environment:

    • Windows:
      venv_name\Scripts\activate
    • macOS/Linux:
      source venv_name/bin/activate

    After activation, (venv_name) should appear in your terminal prompt.

Installing the Requirements

  1. Clone the repository:

    git clone https://github.com/BarsantiMatteo/momeent-adaptive-survey.git
  2. Navigate to the project directory:

    cd momeent-adaptive-survey
  3. Install dependencies:

    pip install -r requirements.txt

Running the Application

  1. Start the Flask server:

    python web_interface/src/main.py

    You should see output similar to this:

    * Serving Flask app 'main'
    * Debug mode: on
    WARNING: This is a development server. Do not use it in a production deployment.
    * Running on http://127.0.0.1:5000
    Press CTRL+C to quit
    * Debugger is active!
    
  2. Access the application: Open your browser and navigate to http://127.0.0.1:5000 to use the app locally.


Browser and Device Recommendations

For the best experience:

  • Use Firefox. Some features may not work as intended on other browsers.
  • Use a computer (PC or notebook) display. Mobile devices are not supported.

Note: The original version used AWS servers for the backend model. This simplified version runs entirely on your local machine.


How to Cite This Work

If you use the momeent-adaptive-survey in your research, please cite it as follows:

Barsanti, M., Schwarz, J. S., Ghali, F., Yilmaz, S., Lehnhoff, S., & Binder, C. R. (2025). Load-shifting for cost, carbon, and grid benefits: A model-driven adaptive survey with German and Swiss households. *Energy Research & Social Science, 121*, 103931. https://doi.org/10.1016/j.erss.2025.103931

Acknowledgments

This tool was developed as part of the MoMeEnT project, a collaboration between École Polytechnique Fédérale de Lausanne (EPFL) and the University of Oldenburg. The project was funded by the Swiss National Science Foundation (SNSF project number: 182878) and the Deutsche Forschungsgemeinschaft (DFG project number: LE 3131/8-1).


License

This project is licensed under the GNU General Public License v3.0 - see the GPLv3 file for details.


Contact

For questions, issues or chatting about related ideas, feel free to reach out at matteo.barsanti17@gmail.com.

About

MoMeEnT Adaptive Survey is a Flask-based web app for model-driven adaptive surveys, integrating real-time feedback with simulation models. It explores load-shifting in energy consumption, helping users assess cost, carbon impact, and grid effects based on their behavior. Runs locally for easy testing.

Topics

Resources

License

Stars

Watchers

Forks