gtopt/stage_month_guard.hpp file

Fail-fast guards for calendar-month dependent LP assembly.

Several LP primitives (VolumeRightLP reset, monthly user-constraint parameters, stage-month bound rules) are only meaningful when the active stage carries a calendar month. Historically a missing stage.month would silently degrade: the reset_month comparison short-circuited to false, monthly parameter lookups fell back to January, and stage_month axis rules resolved to 0.0. These silent fallbacks produce subtly wrong LPs that are nearly impossible to diagnose from the output.

The helpers in this header convert those silent drops into loud std::runtime_errors that tell the caller exactly which element needed the month and how to fix the simulation definition.

Namespaces

namespace gtopt