0
我有一組數據以這種格式從項目獲取長度設置
# Input Data for items in the format (i,l,w,h)
i for item, l for length , w for width, h for height
set itemData :=
271440 290 214 361
1504858 394 194 114
4003733 400 200 287
4012512 396 277 250
4013886 273 221 166;
我試圖讓每個項目的長度,使用下面的代碼
set IL = setof {i in items, (i,l,w,h) in itemData} (i,l); #length of item i
這種方法不僅會不允許我訪問單個項目的長度。 我想要做的是有
顯示IL [271440] = 290;
我該如何去做這件事?