Is it possible to specify sparse variables in GMPL? Such as: var shipmWtoD {p in product, w in warehouse, d in demandpt, 1..T: MilageWhsDpt[w,d]>0} >=0, default 0.0;
which generates the syntax error:
<PRE> Reading model section from Model.mod... Model.mod:75: syntax error in variable statement Context: ...demandpt , 1 .. T : MilageWhsDpt [ w , d ] > 0 } >= 0 , default Model processing error
</PRE>
Here, MilageWhsDpt[w,d] is a sparse parameter denoting the distance between relevant nodes. defined as <PRE> param MilageWhsDpt default 0.0 := [WhsA,DptB] 1 [WhsA,DptC] 1
[WhsB,DptE] 1; </PRE>
I think, 'default' keyword cannot be used with variables but then removing the default keyword makes glpsol look for some shipmWtoD variables which depend on some MilageWhsDpt values which is 0.0 due to the sparse nature of that data.
Error: Model.mod:127: shipmWtoD[Prod1,WhsA,DptE,1] out of domain Model processing error
What I would prefer is that GMPL does not create those variables at all. Is this possible?