by Benjamin S. Narum, Julio C. Goez and Stein W. Wallace
DOI: https://doi.org/10.1016/j.ejor.2025.11.029
This repository contains the code accompanying the paper "Harvest Planning under Uncertainty for Ocean-based Salmon Aquaculture".
The code replicates the following aspects of the paper:
- Solving the decision model for a given scenario tree (see
scripts/solve_decision_model.jl) - Out-of-sample evaluation using policy extension (see
scripts/out-of-sample_evaluation.jl)
Datasets from the paper are provided. These contain: problem instances of all case companies, their scenario trees (for the methods: Quantile Selection, LHSampling and NestedDistance) and the sampling paths used for out-of-sample validation.
This repository is set up to run with the open source optimizer HiGHS. The computations in the paper are done using Gurobi. Solver logs from Gurobi are included in the datasets.
Project setup:
- Data is located in the
datafolder - Source code is located in the
srcfolder - Scripts for running computations is located in the
scriptsfolder
Instances are stored in a specific folder structure:
data
└── <CompanyId>
├── instance_data.json
└── <ScenarioTreeKind> (the kind of scenario tree)
└── <ScenarioTreeInstance> (the specific instance of the scenario tree)
├── scen_tree.json (scenario tree)
├── primal_tree_{mip,lp}.json (solution to the {MIP, LP relaxation} using the scenario tree)
├── validation_data_{mip,lp}.json (evaluation of in-sample and out-of-sample objectives for a given solution)
└── primal_tree_mip.log (solver logs for the MIP solution)
See also the file src/path_helpers.jl for an overview of file paths.
How to run computations:
- Download the
data.zipfile from the GitHub release and extract it in the root of the project - Install Julia version 1.11 (the version the code has been validated with)
- Instantiate environment:
julia -e "import Pkg; Pkg.instantiate()"(loads the environment snapshot in Manifest.toml) - Run scripts in the folder
scripts - Change the configurations in the scripts based on the instance names in the data folder
Setting up the optimization model is centered around the ScenTrees sub-module (extending the AbstractTrees package), which allows defining a scenario tree with transition probabilities. The optimization problem is built on top of the same tree structure.
The decision model is defined in the Decision sub-module.