Candy
View or edit on GitHub
This page is synchronized from trase/models/candyland/candy/README.md. Last modified on 2025-12-13 00:30 CET by Trase Admin.
Please view or edit the original file there; changes should be reflected here after a midnight build (CET time),
or manually triggering it with a GitHub action (link).
Welcome to Candyland!
Candyland is a "mock" supply chain example to illustrate the SEI-PCS tool.
Problem Description
Candyland is an island in a secret location deep in the Pacific ocean, with a climate perfectly suited to candyflower plantations. These magical plants produce candyfruit, which can be refined into tasty candy. There is hot demand for both candyflowers and candy in the international market, which has triggered a rapid expansion of candyflower plantations. There is such demand for these plantations that significant quantities of native rainforest is being cleared to make way for them. The Candyland rainforest is incredibly ancient and biodiverse, and home to all sorts of species found only on Candyland.
The Candyland government is aware of the problem and has made some data publicly available with the aim of increasing transparency in the supply chain:
- The division of the island into administrative areas called "muncipalities".
- The production volumes of and levels of deforestation caused by candyfruit, at a municipal level.
- Registers of the various privately-held assets used in the candy supply chain: plantations, storage silos, and processing factories.
- Customs declarations showing the export of Candy to the international market.
Trase believes that the modelling of Candyland is a feasible problem because deforestation indicators are at municipal level. We wish to identify the municipality of production for the candy and candyflower exports using the SEI-PCS approach.
To model the supply chain we make the following simplifying assumptions that we believe are justified:
- Candyflowers are produced on plantations wholly contained within individual municipalities, and are harvested annually.
- After harvest the candyflower may be stored in storage silos; and may then be passed via processing factories where it is converted to candy. However it can also skip one or both of these steps.
- Harvest, storage, processing, export, and the government's data on attributable deforestation occur wholly within individual years. There is no storage of the candyflower for export next year, for example.
- The processing of candyflower to candy is lossless: one kilogram of candyflower becomes one kilogram of candy.
Map of Candyland
Candyland has three states in which the municipalities are divided. For complex geographic and economic reasons there is a mixed distribution of farms, silos, factories, and offices that form the candyflower supply chain:

Datasets provided by the Candyland government
Distance matrix (cost.csv)
| Column | Type | Note |
|---|---|---|
| origin | string | Municipality code |
| destination | string | Municipality code |
| cost | int | The distance in kilometres between the centroid of the "origin" municipality to the centroid of the "destination" municipality |
This data is provided for every pair of municipalities on the island.
Municipalities (municipality.csv)
| Column | Type | Note |
|---|---|---|
| code | string | Unique identifier |
| name | string | Human-readable name |
Production and Deforestation (production.csv)
Production and deforestation data is available at a municipality level.
| Column | Type | Note |
|---|---|---|
| municipality | string | Municipality code |
| vol | int | Volume in kilograms of candyflower produced in this municipality |
| deforestation | int | Area in hectares of deforestation attributable to candyflower |
Company Assets (asset.csv)
There are many companies that operate in Candyland. We have access of a list of "assets" for every one of them
| Column | Type | Note |
|---|---|---|
| identifier | string | Unique identifier for the asset |
| level | int | What kind of asset it is, where 1 = plantation, 2 = storage, 3 = processing factory, and 5 = other activites, such as an administrative office |
| company | string | Legal name for the company that owns the asset |
| municipality | string | Code of the municipality in which the asset resides |
Customs Declaration (flows.csv)
| Column | Type | Note |
|---|---|---|
| importer | string | The legal entity that is importing the candy or candyflower in to the destination country |
| port | string | Port of export on candyland |
| asset | string | The identifier of the last known asset that the candy or candyflower passed through before being exported |
| ncm | string | |
| fob | string | Value in dollars of the shipment |
| country | string | Country of destination |
| vol | int | Volume in kilograms of the shipment |