Abstract
TimeStruct.jl is a Julia (Bezanson et al., 2017) package that provides an interface for abstracting time structures, primarily intended for use with the mathematical programming DSL JuMP.jl (Lubin et al., 2023). TimeStruct.jl simplifies the writing of key equations in optimization problems through separation of the indexing sets and the equations. Consequently, equations unaffected by the the chosen time structure, e.g., simple deterministic operational or stochastic programming models, need not be adjusted when changing the time structures. Hence, it simplifies both model development and subsequent switching between different time structures. The package is already used in several optimization packages developed at SINTEF, e.g., EnergyModelsX, ZeroKyst, and MaritimeNH3.