/sndpgen

Generator of Stochastic Network Design Problems (SNDP) in .mps and .mps formats.

Primary LanguagePythonMIT LicenseMIT

Contributors Forks Stargazers Issues MIT License LinkedIn

SNDPgen

Generator of Stochastic Network Design Problems (SNDP) in .mps and .mps formats.

Report Bug - Request Feature

Table of Contents

Problem description

Model def

In every location L\{m} a company produces some of the intermediate products P\{e}. For the production of an end product e in P locations F subset of L are possible. The construction of a production line for end product e with a capacity of u units costs f. In addition, for every possible route (i,j) in A, arise the delivery cost c_ij per product unit. An estimated d units of product e can be delivered to the market location m and sold for the price a per unit. Where should the production lines for the end product e be set up to maximize the profit?

Deman d is assumed to be stochastic.

Package can be used to generate the instances with the different amount of locations, products, and stochastic scenarios.

Example

Above is the visualization of the instance with 10 locations and 5 products. Products manufactured in every location are mentioned in the node captions. Red node is the market, grey nodes are the locations with the end product (5). Numbers near the arcs are the delivery costs.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Installation

  1. Clone the repo

    git clone https://github.com/pashtetgp/sndpgen.git
    
  2. cd to project folder and install the package

    cd C:\CodingProjects\sndpgen
    pip install ..\sndpgen
    

Graphviz Installation

  • install the package with pip install graphviz
  • download binaries 32 bit here
  • install them, e.g., here: C:\Program Files (x86)\Graphviz2.38. Bins will be in folder C:\Program Files (x86)\Graphviz2.38\bin
  • edit system env vars: to System path append bins folder
  • restart pc

Uninstall

Run in command line pip uninstall sndpgen

Usage

  • Create a 'param.yaml' file and specify the number locations, number products and number scenarios in new instances. Instances with all possible combinations of parameters will be generated.

In addition, multiple instance variations for each parameter combination can be generated. Variations for the same parameters in parameter combination differ by delivery costs between locations and other values. Technically different random seed is used for each parameter combination. E.g.,

num_locations:
    - 10
    - 20
    - 40
num_products:
    - 5
    - 10
    - 20
num_scen:
    - 1
    - 25
    - 125
    - 500
    - 1000
    - 10000
num_variations: 3 #create 3 variations for each combination
  • cd to project folder, e.g., cd C:\CodingProjects\sndp

  • run sndp_gen. This command accepts one argument --yaml - .yaml file with the parameters of SNDP problems to generate. Default: param.yaml

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Pavlo Glushko

Project Link: https://github.com/pashtetgp/sndpgen