You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You're correct; this is not part of the data model. Either a set is a "simple" or "index" set (1-dimensional, not indexed by any other set) or it is complex (N-dimensional, with each dimension indexed by a simple set). Set a in your example is a hybrid.
A historical note: this distinction follows the data model of GAMS, since the first version of ixmp was tied to GAMS (we are working to relax this; see #78). But other software uses a similar distinction: see coordinates in xarray.
…and then use your own code to maintain the desired relationship between a and b.
Finally, there is one small issue here that is similar to #85: you should get a ValueError: indexed set 'a' cannot be an index of new set 'b' instead of the Java exception that is particular to the JDBCBackend. I will close this issue anyway, and make a note there to fix the two together.
It is not possible to initialize a set that depends on previous initialized set that is indexed by an existing set.
Example:
scenario.init_set('a', idx_sets='technology')
scenario.init_set( "b", [ 'type_tec_land', 'a' ] )
This returns:
at.ac.iiasa.ixmp.exceptions.IxException: There exists no index set 'a'!
Is there another way to do that?
P.S.: Maybe it is more an ixmp issue. In that case I can close this one and open an issue there.
The text was updated successfully, but these errors were encountered: