Skip to contents

multimod 0.4.0.9007 (development version, 2025-12-08)

New Features

Data Integration & Storage

  • Model workspace system (save_model(), load_model()):
    • Apache Arrow IPC format (fast, type-safe, binary)
    • Apache Parquet format (compressed, columnar)
    • CSV format (human-readable, portable)
    • Lazy loading support for large datasets
    • See vignette("model_workspace") for details
  • Data import and linking:
  • Flexible data modes in generated code:
    • Embedded: Data included directly in generated Python/Julia code (for small models)
    • External: Code connects to Arrow repository (for large models)
  • Example datasets: Consolidated into unified example_models structure
    • Access: data(example_models) provides both energyRt and OSeMOSYS examples
    • Structure: example_models$energyRt$multimod, example_models$OSeMOSYS$gmpl, etc.
    • Models used: OSeMOSYS-Utopia (standard test case), energyRt-DEMO (BASE_UTOPIA scenario)
    • Old datasets removed; use example_models$energyRt$multimod instead of utopia_multimod

Code Generation

  • Pyomo support: Complete Python/Pyomo code generation
    • Abstract model design with external data loading
    • Multiple solver support (HiGHS, Gurobi, CPLEX, etc.)
    • Both embedded and external data modes
    • See vignette("pyomo") for workflow details
  • JuMP improvements (write_jump()):
    • Modern Julia/JuMP syntax with named constraints
    • Tuple indexing: eqName[(h,r,y) in mapping]
    • Short index aliases: h (tech), r (region), c (comm), y (year), ts (slice)
    • Clean get() pattern for parameter access with defaults
    • Variable bounds from GAMS types: >= 0, <= 0, Bin, Int, free
    • Comprehensive diagnostics with CSV logging
    • Both embedded and external data modes
  • GMPL support (write_gmpl(), write_gmpl_data()):
    • Full GMPL/MathProg syntax support
    • Proper formatting and indentation
    • Lazy loading from Arrow/Parquet datasets
    • Memory-efficient data writing

Configuration & Usability

Model Optimization

Bug Fixes

  • JuMP fix: 1-dimensional mappings now correctly loaded as Set{String} instead of Set{Tuple{String}}. This was causing membership checks like t in mTradeCapacityVariable to silently fail, resulting in missing constraint terms and incorrect model formulations.
    • 1D mappings: Set{String} for direct membership checks
    • Multi-D mappings: Set{Tuple{...}} for tuple membership
    • Parameters follow same pattern for consistent dictionary key types
    • Generated models now produce identical results to reference implementations
  • Export functions: Updated export_model_source() to use new example_models structure
    • export_osemosys() and export_energyrt() now work with consolidated datasets

Documentation


multimod 0.0.1 (2025-06-01)

  • Initial GitHub release (June 1, 2025).