read_gdx fails for repeated domain names
@jd-foster 已经在做这个了。
开始于 2026年9月29日。
评估
调研方向
Start with the read_gdx entry point and run the minimal reproducer from the issue, which creates a GDXParameter with domains COMM, REG, REG. Done means repeated domains can be represented in the record table with names such as REG and REG_2 while the GDX symbol retains the original domain metadata ["COMM", "REG", "REG"].
由索引模型根据 Issue 内容生成。
描述
read_gdx fails on a parameter with domains (COMM, REG, REG):
duplicate field name in NamedTuple: "REG" is not unique
GTAP’s GDX core-data documentation defines bilateral trade as VXSB(COMM, REG, REG): Chapter 6: The GTAP Data Base for GAMS Users.
The attached minimal reproducer creates such a GDX file:
using GDXInterface
path = tempname() * ".gdx"
try
regions = GDXSet("REG", "", ["*"], (; dim1 = ["R1", "R2"]))
commodities = GDXSet("COMM", "", ["*"], (; dim1 = ["G1"]))
trade = GDXParameter(
"VXSB",
"",
["COMM", "REG", "REG"],
(
COMM = ["G1"],
ORIGIN = ["R1"],
DESTINATION = ["R2"],
value = [1.0],
),
)
gdx = GDXFile(
path,
Dict{Symbol, GDXSymbol}(
:REG => regions,
:COMM => commodities,
:VXSB => trade,
),
)
write_gdx(path, gdx)
read_gdx(path)
finally
rm(path; force = true)
end
Could read_gdx disambiguate repeated domain names when constructing record tables, such as COMM, REG, and REG_2, while preserving the original domain metadata ["COMM", "REG", "REG"] on the GDX symbol?
- 主要语言
- Julia
- 星标
- 9
- 派生
- 4
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jump-dev/GDXInterface.jl 的其他 Issue
-
难度 5/5 一周以上 新手友好度 38/100
jump-dev/GDXInterface.jl#7 · 2 条评论 · 1 个 reaction ·
查看 jump-dev/GDXInterface.jl 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
legend-exp/LegendDataManagement.jl#232 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
EnzymeAD/Reactant.jl#3569 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
astroautomata/SymbolicRegression.jl#783 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复