iiasa / message_ix

The integrated assessment and energy systems model MESSAGEix
https://docs.messageix.org
Apache License 2.0
117 stars 152 forks source link

Support payloads for Multi Criteria Modeling #158

Open gidden opened 5 years ago

gidden commented 5 years ago

We would like to support porting message_ix.Scenario objects into appropriate payloads for running multi criteria analyses with the IIASA MCMA tool. To do so requires a number of steps:

  1. Develop a library of customizeable optimization criteria

For example, one existing criteria is

    CUMGHG =E=
    SUM( (node,type_emission,type_tec,type_year) $ (SAMEAS(type_emission, 'GHGs') AND SAMEAS(type_year,'cumulative')),
         SUM( (year_all2,emission)$( cat_year(type_year,year_all2) AND cat_emission(type_emission,emission) ),
        duration_period(year_all2) * emission_scaling(type_emission,emission) *
            ( EMISS(node,emission,type_tec,year_all2)$( year(year_all2) )
                + historical_emission(node,emission,type_tec,year_all2) )
      )
    / SUM(year_all2$( cat_year(type_year,year_all2) ), duration_period(year_all2) )
       )

This could be updated to

def cumulative_emissions(type_emission):
return
"""
    CUM{type_emission} =E=
    SUM( (node,type_emission,type_tec,type_year) $ (SAMEAS(type_emission, '{type_emission}') AND SAMEAS(type_year,'cumulative')),
         SUM( (year_all2,emission)$( cat_year(type_year,year_all2) AND cat_emission(type_emission,emission) ),
        duration_period(year_all2) * emission_scaling(type_emission,emission) *
            ( EMISS(node,emission,type_tec,year_all2)$( year(year_all2) )
                + historical_emission(node,emission,type_tec,year_all2) )
      )
    / SUM(year_all2$( cat_year(type_year,year_all2) ), duration_period(year_all2) )
       )
""".format(type_emission=type_emission)

Initial entries could be seeded with input from @volker-krey, @adrivinca, @scparkinson, @MarekMakowski and others.

  1. generate a gdx file from an existing scenario (this can be done using available tools in the solve function)

  2. generate a new gms file filled with criteria definitions and a "config" file. Existing config file is below:

CUMCOST
CUMINV

1000 rows
1000 cols

@MarekMakowski should advise on how best to do this automatically.

  1. zip all relevant files
khaeru commented 5 years ago

Something to consider: could parts of this be handled in the postproc/reporting structure?

MarekMakowski commented 5 years ago

@khaeru: such an approach would not work because the variables representing criteria have to be specified in the core model subject to multi-criteria optimization.

MarekMakowski commented 5 years ago

The note.pdf provides details and suggestions (it was also uploaded to the sharepoint dir Volker created in January: documents/projects/messga_ix-mcma; there are more related docs in this dir). note.pdf