nested subscripts
Posted: Mon Jun 16, 2008 10:02 am
dear all,
i use subscripts in a model to distinguish between different spatial entities -- say countries and continents.
now several elements in the country subscript relate to one element in the continents subscript (e.g. austria, belgium, denmark, ... all relate to europe)
i would like to sum a variable i calculated on the country level (e.g. CO2 emissions) to the continental level -- i.e. calculate, for each element of continents subscript, the sum of CO2 emissions over all constituent countries
my approach so far was to create to distinct subscripts for countries and continents, respectively. then i defined subranges of the country subscript that summarize all countries belonging to one continent. finally, i mapped the continent subscript on the continent subranges.
with this construction, i can use variables defined for continents in formulas on country level.
however, i couldn't find a way to do the transition from country to continent level -- which involves aggregation from country to continent level. no matter how i formulate the equation, i always end up with an error
any hints are highly appreciated!
thanks
reinhard
i use subscripts in a model to distinguish between different spatial entities -- say countries and continents.
now several elements in the country subscript relate to one element in the continents subscript (e.g. austria, belgium, denmark, ... all relate to europe)
i would like to sum a variable i calculated on the country level (e.g. CO2 emissions) to the continental level -- i.e. calculate, for each element of continents subscript, the sum of CO2 emissions over all constituent countries
my approach so far was to create to distinct subscripts for countries and continents, respectively. then i defined subranges of the country subscript that summarize all countries belonging to one continent. finally, i mapped the continent subscript on the continent subranges.
with this construction, i can use variables defined for continents in formulas on country level.
however, i couldn't find a way to do the transition from country to continent level -- which involves aggregation from country to continent level. no matter how i formulate the equation, i always end up with an error
any hints are highly appreciated!
thanks
reinhard