Skip to content

reading SMPS files in Python (A Python package for reading SMPS files using GUROBI optimizer objects)

License

Notifications You must be signed in to change notification settings

siavashtab/readSMPS-Py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

readSMPS-Py

—[Source]— —[license]—

reading SMPS format files for two-stage stochastic programs


Author: Siavash Tabrizian -- stabrizian@smu.edu


Intoduction:

readSMPS: A package for reading and saving the information of two stage stochastic programs from SMPS files

There are implementations for reading SMPS files which are either written in other programming languages (C or Julia) or do not provide a suitable data structures for L-shaped based algorithms (based on GUROBI solver). Moreover, it would be crucial to facilitate the problem that can handle sampling techniques for stochastic programming which can be done in this code.

  • this package stores the problem information in GUROBI format
  • the distribution of random variables are discrete (even if it is not discrete it can be turned to a discrete distribution)
  • randomness is on the right handside of the recourse problem
  • COR file contains the mean value problem whose optimal value yields a lower bound

Dependencies:

  • This package needs the GUROBI solver for optimization parts (https://www.gurobi.com/), and the problem will be created based on the GUROBI objects.

Output

  • this program will read the SMPS files, decompose the problem into a master and subproblem based on the GUROBI objects. The data structure in which problems will be stored are all defined in self.prob

SMPS

  • SMPS is an efficient and effective way of describing stochastic programs.

    It contains the follwoing files:

    1 - _.cor:

    This file is the core of the formulation which is basically derived from the mean value problem. It's format is very similar to _.mps files.

    2 - _.tim

    This file contains the information of stages. The name of rows and columns associated with each stage

    3 - _.sto

    This file contains the information about the random variables, and their distribution. Also, it shows the place in which the random variables appear in the second stage problem


Description

The program can be runned by specifying the instance name and directory and the suitable problems can be created

>> d = decompose("pgp2",".\\Input\\")
>> d.find_stage_idx()
>> d.create_master()

Releases

No releases published

Packages

No packages published

Languages