Skip to content

MadJayQ/NSFSimulation

Repository files navigation

Incentive Mechanisms for Mobile Crowdsourcing, Reaching Spatial and Temporal Coverage Under Budget Constraints

Abstract

Crowdsourcing is a computational paradigm to leverage the power of crowds by outsourcing the solution of a specific task. These crowds are composed of regular citizens. The potential of crowdsourcing has been proven in fields such as environmental sciences, transportation systems, and social sciences. Well-known examples include the mobile applications for the community-based traffic and navigation, which help drivers take the most efficient routes based on information provided by other drivers. Some other crowdsourced applications are the periodic measurement of environmental variables, monitoring of roads, traffic, and civil infrastructure. A crowdsourced system may be a Cyber-Physical System (CPS), which includes incentive mechanisms to encourage user participation in a given task. The typical elements of such a system are the data buyers, contributors and a platform for data storage and processing. The contributors may take the form of people who use their smartphones for data collection or autonomous vehicles with the attached sensors. These contributors have natural patterns of daily movement, which covers only specific paths in the target area at specific times. However, a sensing task may require data from all parts of the target area in different times to ensure representative sampling. Therefore, coverage in terms of both space and time may be critical for crowdsourced applications. This proposal addresses the problem of spatial and temporal coverage for sampling in a target area, in particular the coverage of isolated sub-regions where participants' density is very low. This problem is tackled by an incentive mechanism that dynamically assigns compensation for data collection in the sub-regions of the target area based on the density of the contributors in that sub-region. To achieve this goal, a sensing market is modeled using a game-theoretic approach. In the sensing market, a data buyer announces a task per sub-region and the corresponding compensation. Then, the interested participants who decide to visit that region, submit their current locations and final destinations as well as the amount of time they are willing to spend on the sensing task. Similar to any other market, the members of a CS market want to maximize their utilities. The contributors maximize their utility by strategizing their trajectories while data buyers maximize their utility by predicting the contributors' behavior and setting the optimal rewards per sub-region.

The resulting information of the proposed incentive mechanism may be leveraged by people and other rational participants such as autonomous vehicles to better plan their daily activities. For example, individuals can avoid environmental conditions that represent a risk for their health or change their daily commute to produce the lowest stress level. Other potential applications include autonomous vehicle scheduling and navigation, smart robots navigation and smart utilization of transportation resources. The proposed project will facilitate and encourage interdisciplinary collaboration among the disciplines of computer science, transportation engineering and environmental science. Specifically, interdisciplinary courses and laboratories will be developed while employing peer-to-peer Web technology, such as Wiki pages, to facilitate instant and direct access to ideas and data related to the project.

Meet the team Screenshot

About

This is a simulation software for the NSF Project on Mobile Crowdsourcing by Luis. G Jaimes at Florida Polytechnic University

A basic Simulation setup needs these files:

  • settings.json - Points to the simulation's parameters, and available maps
  • participants.json - Lists all of the participants that will exist in the smimulation, where they originate from and where they traverse to.
  • <maps>.json - Any map needs to be detailed in a json format listing all of the nodes, and edges

How to compile

Python Project files for the python binding are generated by Premake and are defined in /simulation_module/premake5.lua

workspace "NSF Simulation"
    configurations { "Debug x86", "Release x86", "Debug x64", "Release x64" }
    location "build\\SUMO"
    filter "configurations:*64"
        architecture "x64"
    configuration "vs*"
        defines { "_CRT_SECURE_NO_WARNINGS" }
    filter "configurations:Debug x64"
        targetdir "bin/x64/Debug"
        defines { "DEBUG" }
        symbols "On"
    filter "configurations:*86"
        architecture "x86"
    filter "configurations:Debug x86"
        targetdir "bin/x86/Debug"
        defines { "DEBUG" }
        symbols "On"
project "nsf"
    kind "SharedLib"
    language "C++"
    targetextension ".pyd"
    libdirs {
        "F:\\Programming\\Libraries\\boost_1_69_0\\stage\\lib",
        "F:\\Programming\\Languages\\Python\\Python34\\libs"
    }
    includedirs {
        "F:\\Programming\\Libraries\\boost_1_69_0",
        "F:\\Programming\\Work\\NSFSimulation\\simulation_module\\lib\\json\\single_include\\nlohmann",
        "F:\\Programming\\Languages\\Python\\Python34\\include"
    }
    files { 'src/simulation_module.cc', 'src/simulation_settings.cc', 'src/simulation_world.cc', 'src/simulation_node.cc', 'src/simulation_graph.cc', 'src/simulation_participant.cc', 'src/simulation_data.cc' }
    configuration "vs*"
        characterset "MBCS"

The includedirs and libdirs for boost, and python need to be configured to your particular project setup

NodeJS

With NodeJS compile the NodeJS binary with node-gyp Instead of premake5.lua for NodeJS the binding is specified in binding.gyp

Map layout

The simulation software utilizes a preset map JSON configuration to detail the structure of the map data structures. Three separate files are utilzied to define the map layout.

mapname.json

{
    "metadata":
    {
        "name": "TestGrid",
        "author": "Jake",
        "rootDirectory": "F:\\Programming\\Work\\NSFSimulation\\maps\\testgrid",
        "gridWidth":500
        "gridHeight":500
    },
    "nodes":
    {
        "filePath": "junctions.json"
    },
    "edges":
    {
        "filePath": "edges.json"
    }
}

edges.json contains all of the edges, the key of the source node, and the key of the destination node. Speed and distance are overrided by the simulation and are just placeholders.

{
  "1586": {
    "from": "21",
    "to": "22",
    "speed": 55,
    "distance": 50
  },
  ...
  .....
  .......
  "e188": {
    "from": "24",
    "to": "19",
    "speed": 55,
    "distance": 50
  }
}

junctions.json contains all of the nodes, and an associated budget, the value you place in here is overrided by the simulation and is just a placeholder

{
    "0": {
        "budget": "200"
    },
    ...
    ....
    ......
    "24": {
        "budget":"190"
    }
}

car_trace_data.json contains all of the car trace data across the simulation

{
    "0": {
        "trajectory":[0, 1, 3, 5] //List of cells the car traveled through over time
    }   
    ...
    ....
    .....
    "100": {
        "trajectory":[50, 57, 58, 59]
    }
}

To Use

To clone and run this repository you'll need Git and either Node.js (which comes with npm) installed on your computer, or Python

# Clone this repository
git clone https://github.com/MadJayQ/NSFSimulation.git
# Go into the repository
cd NSFSimulation
# Install dependencies
npm install
# Run the test case if you're using NodeJS
node /simulation_module/test_binding.js 
#if you're using python to launch the simulation
python3 /simulation_module/test_binding.py

License

CC0 1.0 (Public Domain)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published