Skip to content

rafaelmartinelli/MIRPLib.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIRPLib.jl

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Build Status codecov

This package reads data files for Maritime Inventory Routing Problem (MIRP) instances from MIRPLib.

Research Context

This package is part of the research artifacts accompanying the paper:

Sanghikian, N., Meirelles, R., Subramanian, A., Martinelli, R.
A heuristic algorithm based on beam search and iterated local search for the maritime inventory routing problem.
Computers & Operations Research, 188 (2026), 107347.

The package provides the data structures and instance-loading utilities used in the computational experiments on MIRPLib Group 2 instances, enabling reproducibility and further methodological extensions.

Usage

The main type returned by the package is MIRP, defined as follows:

struct MIRP
    name::String
    type::Symbol
    metadata::Metadata

    ports::Vector{Port}
    load_ports::Vector{Port}
    unload_ports::Vector{Port}

    classes::Vector{Class}
    vessels::Vector{Vessel}

    distances::Matrix{Float64}

    lb::Float64
    ub::Float64
end

Metadata, ports, vessel classes, and vessels are defined as follows:

struct Metadata
    n_periods::Int64
    n_commodities::Int64

    n_ports::Int64
    n_ports_per_region::Vector{Int64}

    n_load_regions::Int64
    n_unload_regions::Int64
    n_ports_per_load_region::Vector{Int64}
    n_ports_per_unload_region::Vector{Int64}

    n_vessels::Int64
    n_vessel_classes::Int64
    n_vessels_per_class::Vector{Int64}

    hours_per_period::Float64
    spot_market_price::Float64
    spot_market_discount::Float64
    attempt_cost::Float64
    reward_finishing_early::Float64
    single_period_alpha_slack::Float64
    cumulative_alpha_slack::Float64
end

struct Port
    id::Int64
    name::String
    type::Symbol
    region_id::Int64
    x::Float64
    y::Float64
    fee::Float64
    berth_limit::Int64
    max_amt::Int64
    min_amt::Int64
    capacity::Int64
    inventory::Int64
    rates::Vector{Int64}
    prices::Vector{Float64}
end

struct Class
    id::Int64
    name::String
    capacity::Int64
    speed::Float64
    travel_cost_km::Float64
    discount_empty::Float64
    vessels::Vector{Vessel}
    travel_times::Matrix{Int64}
end

struct Vessel
    id::Int64
    name::String
    class::Class
    inventory::Int64
    initial_port::Port
    first_time::Int64
end

Some MIRPLib instances are preloaded in Instance. For example:

using MIRPLib

mirp = loadMIRP(:LR1_1_DR1_3_VC1_V7a, 60)
println(mirp)

loadMIRP returns nothing if the instance is not found. The MIRPLib zip file is kept under data/ and downloaded automatically if it is missing.

If you wish to get a list of all instances, use Instance enum.

all_instances = instances(Instance)

Installation

MIRPLib.jl is a registered Julia Package! yay!

You can install MIRPLib.jl through the Julia package manager.

Open Julia's interactive session (REPL) and type:

] add MIRPLib

Do not forget to ⭐star⭐ our package! 😁

Related links

Citation

This package implements and supports the data layer used in the computational study of the paper below. If you use MIRPLib.jl, please cite:

@article{Sanghikian2026MIRP,
  title = {A heuristic algorithm based on beam search and iterated local search for the maritime inventory routing problem},
  author = {Sanghikian, Nathalie and Meirelles, Rafael and Subramanian, Anand and Martinelli, Rafael},
  journal = {Computers \& Operations Research},
  year = {2026},
  volume = {188},
  pages = {107347},
  doi = {10.1016/j.cor.2025.107347},
  url = {https://www.sciencedirect.com/science/article/pii/S0305054825003764}
}

The same entry is in CITATION.bib.

Other packages

License

MIT License. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages