GithubHelp home page GithubHelp logo

amritagupta / budget-pcsf-semigradient-ascent Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 1.34 MB

Heuristic algorithms for solving the budget-constrained prize collecting Steiner forest problem.

License: MIT License

Jupyter Notebook 29.93% Python 70.07%
ieee heuristic-algorithms discrete-optimization supermodular-maximization

budget-pcsf-semigradient-ascent's Introduction

budget-pcsf-semigradient-ascent

Heuristic algorithms for solving the budget-constrained prize collecting Steiner forest problem.

  • Citation Info: Gupta, A. and Dilkina, B., 2019, November. Budget-Constrained Demand-Weighted Network Design for Resilient Infrastructure. In 2019 IEEE 31st International Conference on Tools with Artificial Intelligence (ICTAI). IEEE.

Overview

We address the problem of allocating a fixed budget towards restoring edges to maximize the satisfied travel demand between locations in a network, which we formalize as the budget-constrained prize-collecting Steiner forest problem. We prove that the satisfiable travel demand objective exhibits restricted supermodularity over forests, and utilize this property to design an iterative algorithm based on maximizing successive modular lower bounds for the objective that finds better solutions than a baseline greedy approach. We also propose an extremely fast heuristic for maximizing modular functions subject to knapsack and graph matroid constraints that can be used as a subroutine in the iterative algorithm, or as a standalone method that matches the greedy baseline in terms of quality but is hundreds of times faster. We evaluate the algorithms on synthetic data, and apply them to a real-world instance of retrofitting the Senegal national and regional road network against flooding.


Setup

Dependencies

All code was written in Python 2.7.6.

Directory Structure

|____data
| |____synthetic_graphs
| | |____planar
| | | |____demands
| | | | |____G_n_edges_500_instance_0_demand_data.p
| | | | |____...
| | | |____edge_costs
| | | | |____G_n_edges_500_instance_0_cost_data.p
| | | | |____...
| | | |____edge_max_values_20
| | | | |____G_n_edges_500_instance_0_edge_values_data.p
| | | | |____...
| | | |____edge_values
| | | | |____G_n_edges_500_instance_0_edge_values_data.p
| | | | |____...
| | | |____graphs
| | | | |____G_n_edges_500_instance_0.graphml
| | | | |____...
|____LICENSE
|____notebooks
| |____generate-random-erdos-renyi-graph.ipynb
| |____generate-random-planar-graph.ipynb
|____output
| |____synthetic_graphs
| | |____er
| | |____planar
|____README.md
|____scripts
| |____budgetpcsf.py
| |____computemaxval.py
| |____run_experiments.py

How To Run

  1. The .ipynb notebooks in notebooks/ generate synthetic instances based on either Erdos-Renyi graphs or planar graphs. They populate the data/ folder with graphs, random edge costs and demand between pairs of nodes, as well as the demand between endpoints of each edge (edge values), which are used by the optimization algorithms.

  2. scripts/computemaxval.py estimates the maximum value of each edge by sampling 20 random spanning trees and evaluating the reduction in satisfiable travel demand when the edge is removed. Results are written to data/.

  3. scripts/budgetpcsf.py implements:

    a. greedy

    b. knapsack-repair

    c. semigradient ascent (using either greedy or knapsack-repair as subroutines)

    It also contains methods called by scripts/computemaxval.py and helper functions.

  4. scripts/run_experiments.py shows how we set up all experiments in our ICTAI 2019 paper.


Results

Random Planar Graphs

Relative Solution Quality

Runtime Performance

Random Erdos-Renyi Graphs

Relative Solution Quality

Runtime Performance

budget-pcsf-semigradient-ascent's People

Contributors

amritagupta avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.