https://github.com/jkhamphousone/ringstarproblems.jl
A Julia solver of Ring Star Problem variants
https://github.com/jkhamphousone/ringstarproblems.jl
applied-mathematics branch-and-benders-cut combinatorial-optimization graph-algorithms graph-theory integer-linear-programming network-design operations-research resilience survivability
Last synced: 30 days ago
JSON representation
A Julia solver of Ring Star Problem variants
- Host: GitHub
- URL: https://github.com/jkhamphousone/ringstarproblems.jl
- Owner: jkhamphousone
- License: mit
- Created: 2024-07-07T09:50:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-30T16:04:17.000Z (about 1 year ago)
- Last Synced: 2025-10-21T11:53:10.876Z (30 days ago)
- Topics: applied-mathematics, branch-and-benders-cut, combinatorial-optimization, graph-algorithms, graph-theory, integer-linear-programming, network-design, operations-research, resilience, survivability
- Language: Julia
- Homepage: https://jkhamphousone.github.io/RingStarProblems.jl/
- Size: 12.8 MB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/JuliaTesting/Aqua.jl)
# [Ring Star Problem](https://en.wikipedia.org/wiki/Ring_star_problem) variants Solver
## Resilient Ring Star Problem
The references:
- [Khamphousone et al., 2023](https://hal.science/hal-04286851)
- [Khamphousone et al., 2021](https://hal.science/hal-03211922/)
- [Chapter 3 of my Thesis manuscript](https://theses.hal.science/tel-04319443)
Introduce the Resilient Ring Star Problem (called 1-R-RSP).
The package can solve 1-R-RSP thanks to:
- A Branch-and-Benders-cut algorithm (referred to as B&BC)
- An Integer Linear Programming model (ILP)
## Ring Star Problem

When setting `backup_factor=0` or `tildeV=0`, 1-R-RSP reduces to RSP
## The Survivable Ring Star Problem
[A Survivable Ring Star Problem solver](https://doi.org/10.1002/net.22193) will be added.
# Requirements
[JuMP.jl](https://github.com/jump-dev/JuMP.jl) must be installed. You can use CPLEX, GLPK, Gurobi, Xpress or any [solver that supports Lazy Constraints callback in JuMP](https://jump.dev/JuMP.jl/stable/manual/callbacks/#Available-solvers).
# Installation
```julia
julia> import Pkg ; Pkg.add("RingStarProblems")
```
# Usage
```julia
julia> import RingStarProblems as RSP
julia> using JuMP
julia> pars = RSP.SolverParameters(
solve_mod = RSP.BranchBendersCut(), # ILP() or BranchBendersCut()
F = 7, # total failing time F in days per year, see [`PhD manuscript`](https://theses.hal.science/tel-04319443)
o_i = 0, # opening costs
s_ij = RSP.Euclidian(), # star costs
r_ij = RSP.Euclidian(), # ring costs
backup_factor = 0.01, # backup_factor c'=0.01c and d'=0.01c
alpha = 3, # See [`Labbé et al., 2004`](ttps://doi.org/10.1002/net.10114)
tildeV = 100, # uncertain nodes set
writeresults = RSP.WHTML(), # output results locally, WLocal(), WHTML() or no output false
plotting = false, # plot results to subfolder src/plots/results/
log_level = 1, # console output log_level
redirect_stdio = false, # redirecting_stdio to output file
)
```
## GLPK
To use GLPK optimizer:
```julia
julia> using GLPK
julia> symbolinstance = :TinyInstance_12_2
julia> RSP.rspoptimize(pars, symbolinstance, optimizer_with_attributes(GLPK.Optimizer,
"msg_lev" => GLPK.GLP_MSG_ALL
))
```
## Gurobi
To use Gurobi optimizer:
```julia
julia> using Gurobi
julia> symbolinstance = :berlin52
julia> RSP.rspoptimize(pars, symbolinstance, Gurobi.Optimizer)
```
## Solving with nodes coordinates
Either:
```julia
julia> x = 1:10
julia> y = rand(1:10, 10)
julia> RSP.rspoptimize(pars, x, y, Gurobi.Optimizer)
```
Or:
```julia
julia> xycoors = tuple.(1:10, rand(1:10, 10))
julia> RSP.rspoptimize(pars, xycoors, Gurobi.Optimizer)
```
## Plotting
To plot the solutions in the folder ext/results
```julia
julia> using GraphPlot, Compose, Colors
julia> pars.plotting = true
```
Then call `rspoptimize` again