# \[pre-ANN\] RingStarProblems.jl ⸺ A RSPSolver

**URL:** https://discourse.julialang.org/t/pre-ann-ringstarproblems-jl-a-rspsolver/116992
**Category:** Package Announcements
**Tags:** package, announcement, jump, optimization, combinatorics
**Created:** [July 13, 2024, 8:01am UTC](https://discourse.julialang.org/t/pre-ann-ringstarproblems-jl-a-rspsolver/116992 "2024-07-13T08:01:10Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![K5Julien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/k5julien/32/210626_2.png) [@K5Julien](https://discourse.julialang.org/u/K5Julien)
#### Post date: [July 13, 2024, 8:01am UTC](https://discourse.julialang.org/t/pre-ann-ringstarproblems-jl-a-rspsolver/116992/1 "2024-07-13T08:01:10Z")

</div>

# A Ring Star Problem variants Solver

![Ring Star Problem](https://upload.wikimedia.org/wikipedia/commons/9/9f/Ring_Star_Problem_solution.svg)

I am super happy to share the package [RingStarProblems.jl](https://github.com/jkhamphousone/RingStarProblems.jl).  
This package aims to provide a solver to the Ring Star Problem and its variants.

You can checkout the [Labbé et al. (2004)](https://onlinelibrary.wiley.com/doi/abs/10.1002/net.10114) Networks - Article that formulates the first MILP for the Ring Star Problem or the [RSP Wikipedia](https://en.wikipedia.org/wiki/Ring_star_problem) page if you would like to discover more about this NP-Hard problem, which is known to be a generalization of TSP 😄

[RingStarProblems.jl](https://github.com/jkhamphousone/RingStarProblems.jl) is still under development, feel free to provide any feedback 😊

### Installation

```julia
julia> import Pkg ; Pkg.add("RingStarProblems")

```

---

<div class="post-metadata">

### Author: ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)
#### Post date: [July 14, 2024, 5:28am UTC](https://discourse.julialang.org/t/pre-ann-ringstarproblems-jl-a-rspsolver/116992/2 "2024-07-14T05:28:09Z")

</div>

Awesome work, congrats! If you need some guidance for creating or improving packages, be sure to check out our blog [https://modernjuliaworkflows.github.io/sharing/](https://modernjuliaworkflows.github.io/sharing/) 🙂

---

<div class="post-metadata">

### Author: ![K5Julien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/k5julien/32/210626_2.png) [@K5Julien](https://discourse.julialang.org/u/K5Julien)
#### Post date: [July 14, 2024, 7:55pm UTC](https://discourse.julialang.org/t/pre-ann-ringstarproblems-jl-a-rspsolver/116992/3 "2024-07-14T19:55:14Z")

</div>

Many thanks for the support and suggesting the excellent [MoJuWo](https://modernjuliaworkflows.github.io/sharing/) @gdalle 🥰

Just released the first patch 😄

## v0.1.2 Patch release notes

### Now using Dedicated Types for the solver’s parameters instead of Strings [#5](https://github.com/jkhamphousone/RingStarProblems.jl/issues/5)

✅ A big high five to @[nsajko](https://github.com/nsajko) for suggesting it!

### Other release improvements

✅ Refactoring of several datatypes and variable names to be more compliant with [Julia style guide](https://docs.julialang.org/en/v1/manual/style-guide/)  
✅ Improving README.md, adding tags and deleted unwanted branches “master”  
✅ Applying JuliaFormatter.jl  
✅ Deleting some useless files  
✅ Compatibily issues fixed  
✅ Create target `] test` for UnitTest and solutionchecker

## Plan for upcomming v0.1.3

- Documenter.jl deploy an extensive documentation for the solver
- Add an [All contributors page](https://github.com/all-contributors/all-contributors)
- Pass all disambiguity tests from Aqua.jl, currently 37 disambiguities (1 Broken)
- Install Julia TagBot, look for other interesting workflows

## Any input is most welcome, in particular if you are able to build, using, and launch the solver 😊

---

<div class="post-metadata">

### Author: ![K5Julien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/k5julien/32/210626_2.png) [@K5Julien](https://discourse.julialang.org/u/K5Julien)
#### Post date: [July 17, 2024, 9:40pm UTC](https://discourse.julialang.org/t/pre-ann-ringstarproblems-jl-a-rspsolver/116992/4 "2024-07-17T21:40:16Z")

</div>

# Patch release v0.1.6

✅ As mentioned in [issue #11](https://github.com/jkhamphousone/RingStarProblems.jl/issues/11) the solver is now optimizer agnostic!  
✅ Currently supports GLPK and Gurobi  
✅ Bug fixes  
✅ RingStarProblems.jl is not “an empty” package anymore, [see here](https://discourse.julialang.org/t/export-works-but-not-when-add-package/117030/7?).  
✅ some GitHub workflows successfully added (CI.yml, and TagBot.yml)

- Can not support SCIP, it [doesn’t support Lazy Constraints Callbacks](https://discourse.julialang.org/t/lazy-constraints-are-not-supported-by-scip-jl-while-jump-doesnt-mention-it/117110/)
- Solvers remaining to test: CPLEX and Xpress (Any feedback on these solvers is most welcome!)

According to [JuMP manual](https://jump.dev/JuMP.jl/stable/manual/callbacks/), the supported solver for Lazy Constraints Callbacks are:

- CPLEX, GLPK, Xpress, Gurobi

#### Next patch objectives: v0.1.7

- Continue document the package (use [DocStringExtensions.jl](https://github.com/JuliaDocs/DocStringExtensions.jl))
- CodeCoverage is only 18.72%, because plenty of files are at 0% mainly due to future functionalities that will be added  
 ![Code Coverage has lots of 0% files](https://global.discourse-cdn.com/julialang/original/3X/f/7/f7ef569270a62a79f8431b135da385216308c1a5.png)
- Continue trying to find collaborators!

#### Next minor release objective v0.2.0

- See enhancement feature: [RingStarProblems.jl #12](https://github.com/jkhamphousone/RingStarProblems.jl/issues/12)

#### Any feedback is most welcome 😃

I was able to `precompile` and `using` the package on another computer today, plus lauching the README Usage for the first time with this patch release, let me know if this is also the case for you ❤

---

<div class="post-metadata">

### Author: ![K5Julien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/k5julien/32/210626_2.png) [@K5Julien](https://discourse.julialang.org/u/K5Julien)
#### Post date: [July 23, 2024, 9:27pm UTC](https://discourse.julialang.org/t/pre-ann-ringstarproblems-jl-a-rspsolver/116992/5 "2024-07-23T21:27:23Z")

</div>

# Patch release v0.1.7 and v0.1.8

✅ Using `Symbol` to name instances instead of `Integer`:

```julia-auto
symbolinstance = :TinyInstance_12_2
julia> RSP.rspoptimize(pars, symbolinstance, optimizer_with_attributes(GLPK.Optimizer,
			"msg_lev" => GLPK.GLP_MSG_ALL,
			"tm_lim" => pars.timelimit)

```

Was previously:

```julia-auto
id_instance = 3
julia> RSP.rspoptimize(pars, id_instance, optimizer_with_attributes(GLPK.Optimizer,
			"msg_lev" => GLPK.GLP_MSG_ALL,
			"tm_lim" => pars.timelimit)

```

And

```julia-auto
julia> symbolinstance = :berlin52
julia> RSP.rspoptimize(pars, symbolinstance, optimizer_with_attributes(Gurobi.Optimizer,
		"TimeLimit" => pars.timelimit))

```

Was previously:

```julia-auto
julia> id_instance = 14
julia> RSP.rspoptimize(pars, id_instance, optimizer_with_attributes(Gurobi.Optimizer,
		"TimeLimit" => pars.timelimit))

```

✅ plotting solutions to .pdf is now available as an extension  
✅ several enhancement and minor bug fixes

```julia-auto
julia> using GraphPlot, Compose, Colors
julia> pars.plotting = true

```

#### Next patch objectives: v0.1.9

- Continue document the package (use [DocStringExtensions.jl](https://github.com/JuliaDocs/DocStringExtensions.jl))
- CodeCoverage increased from 18.72% to 21.71%, to continue

#### Next minor release objective v0.2.0

- See enhancement feature: [RingStarProblems.jl #12](https://github.com/jkhamphousone/RingStarProblems.jl/issues/12)

#### Any feedback is most welcome 😃

---

<div class="post-metadata">

### Author: ![K5Julien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/k5julien/32/210626_2.png) [@K5Julien](https://discourse.julialang.org/u/K5Julien)
#### Post date: [August 1, 2024, 11:24pm UTC](https://discourse.julialang.org/t/pre-ann-ringstarproblems-jl-a-rspsolver/116992/6 "2024-08-01T23:24:20Z")

</div>

Dear Julia community,

Super happy to share the minor release v0.2.0 of RingStarProblems.jl 😃

# Minor release v0.2.0

v0.1.8 → v0.1.9 → v0.1.10 → **v0.2.0**

✅ Now possible to use coordinates to solve RSP and 1-R-RSP, closing [#12](https://github.com/jkhamphousone/RingStarProblems.jl/issues/12)

## Solving with nodes coordinates

Either:

```julia
julia> x = 1:10
julia> y = rand(1:10, 10)
julia> RSP.rspoptimize(pars, x, y, GLPK.Optimizer)

```

Or:

```julia
julia> xycoors = tuple.(1:10, rand(1:10, 10))
julia> RSP.rspoptimize(pars, xycoors, GLPK.Optimizer)

```

✅ plotting solutions is now available

```julia-auto
julia> using GraphPlot, Compose, Colors
julia> pars.plotting = true
### then call `rspoptimize`

```

✅ Number of `threads` and `time limit` parameters now handled by user instead of RSPSolver.  
✅ Several enhancement, minor bug fixes and code readability improved  
✅ Code Coverage increased to 25.98%

I am super happy that the user can now solve the Ring Star Problem with nodes coordinates, same for 1-R-RSP, and also plot the solutions to .pdf!

Let me know about anything you think of 😊
