I need to change a computed (or looked-up) number into a string, so
that I can use it as an index. For instance, consider the setup as
follows:
Sets
i buses / 14 /
n transmission (TX) lines / 13 /
m bus parameters / VMin, VMax /
p TX parameters / R, X, B, StartBus, EndBus, Imax /
q calc TX parameter type / B, G, Yshunt /
Table TXParam(n,p)
R X B StartBus
EndBus Imax
1 0.005 0.005 1.2 1
2 7
2 0.005 0.005 1.2 1
3 7
3 0.005 0.005 1.2 2
3 7;
Table BusParam(i,m)
VMin VMax
1 0.85 1.05
2 0.90 1.05
3 0.95 1.05
4 1.00 1.05
Table CalcTXParams(n,q)
G B Yshunt
1 0 0 0
2 0 0 0
3 0 0 0;
Now assume that I want to calculate the Yshunt values in the
CalcTXParams(n,q) table with a statement that would do the following:
CalcTXParams(n,“Yshunt”) = BusParam(n+1,“VMin”);
This won’t work, because n+1 is not a string. Is there a function or
other way to convert it to a string?
Thanks,
Tom
\