julia-mpsge / MPSGE_MP.jl

MIT License
1 stars 0 forks source link

Improve macros to use indexing #11

Closed mitchphillipson closed 4 months ago

mitchphillipson commented 5 months ago

We want our macros to behave like JuMP macros,

@sector( M, X[I])

will create an IndexedSector with index I.

mitchphillipson commented 5 months ago

Several additional improvements:

  1. Rewritten and simplified the production struct.
  2. Cost functions (formerly called nested compensated demands) are stored within nodes in the tree structure.
  3. Cost functions are built on production creation.
  4. New production macro that closely resembles MPSGE GAMS syntax.
mitchphillipson commented 5 months ago

There is a bigger change being worked in this branch.

mitchphillipson commented 5 months ago

Primary API changes:

  1. @Output is now @output and @Input is @input. Lower case matches other macros
  2. Indexed Variables can be created using @sector(M, X[I]) if I is a previously defined array.
  3. Nests can be indexed, va[I] => s = 1 will create the indexed nest va[I]