Backpacking Resupply Optimizer

About & Methodology

What This Tool Does

The Backpacking Resupply Optimizer helps backpackers plan lightweight, nutritionally complete food resupply boxes. Given your trip duration, calorie target, and store type, it selects a basket of shelf-stable, no-cook foods that minimizes total pack weight while meeting dietary reference intake targets — the same trade-off you face when deciding whether to carry almonds or instant mashed potatoes.

Datasets

NHANES / WWEIA — What We Eat in America

The primary source of food composition data. WWEIA is the dietary recall component of the National Health and Nutrition Examination Survey (NHANES), conducted by the USDA and CDC. Each food is assigned an 8-digit FNDDS food code with per-100g nutrient values for ~30 nutrients.

Cycles used: August 2021 – August 2023   ↗ FNDDS databases

USDA FoodAPS — National Household Food Acquisition and Purchase Survey

FoodAPS links actual grocery purchases to FNDDS food codes, providing real-world price data, package sizes, store type flags (grocery, rural, convenience store), and item descriptions from store receipts. This is the source of the "estimated price" values shown in the optimizer.

Coverage: ~4,400 foods with observed purchase prices   ↗ USDA ERS FoodAPS

FNDDS At-a-Glance — Additional Food Descriptions

The 2019–2020 FNDDS "At a Glance" spreadsheet provides secondary food descriptions — brand names, common aliases, and product names — for each food code. These are shown as the gray subtitle text under each food name (e.g. "Girl Scout Tagalong; Little Debbie Nutty Bar").

↗ FNDDS At-a-Glance (XLSX)

Perishability Data — Days Without Refrigeration

A custom-built lookup table mapping each WWEIA food category to the number of days it can safely be carried without refrigeration. Shelf-stable categories (nuts, dried fruit, crackers) get 14+ days; perishable fresh foods get 0 days. When you set the "Days of Food" parameter, the optimizer automatically excludes foods that would spoil before the end of your trip.

Source: WWEIA_Days_Without_Refrigeration.csv (custom, based on USDA food safety guidelines)

Optimization Model

Decision Variables

For each candidate food i, the model has two variables:

When diversity is zero, only continuous g_i variables are used and the problem is solved as a linear program (LP) with GLOP. When diversity > 0, binary variables are added and the problem becomes a mixed-integer program (MIP) solved with SCIP. Both solvers are from Google OR-Tools.

Objective Function

The default objective is maximum calorie density — equivalently, minimum total weight for a fixed calorie target:

minimize   Σ g_i

Carrying fewer grams to hit the same calorie goal means a lighter pack. Because calorie density varies by food (nuts ~7 kcal/g, dried fruit ~3 kcal/g, instant meals ~4 kcal/g), the optimizer gravitates toward calorie-dense foods unless constrained by nutrition or diversity.

Other available objectives:

Constraints

Dietary Reference Intakes (DRI)

Nutrient minimums are scaled from DRI values computed for a 70 kg adult per day × number of trip days. The "Nutrition Profile" setting applies a multiplier to each nutrient's minimum:

Prices

All prices are estimates derived from FoodAPS purchase observations, adjusted to 2025 dollars using category-specific food CPI series from the BLS (Consumer Price Index, U.S. City Average, All Urban Consumers). The median observed price per 100g is multiplied by a category-specific inflation factor; a fallback of $0.50/100g × 1.45 (overall food-at-home inflation) is applied where no observed price exists.

Inflation multipliers by food category (2013 average to December 2025):

These multipliers are recomputed each time inflate_prices.py is run against the live BLS public API.

Limitations