On Fri, 8 Jan 2021, Sven Schreiber wrote:
hammering the release candidate on some special system cases some
more:
Consider this first example:
<hansl>
open denmark
bundle b
list endo = diff(deflist(LRM, IBO))
list rhs1 = deflist(const, LRY)
list rhs2 = deflist(const, IBO(-1))
lists rhses = defarray(rhs1, rhs2)
list b.endo = endo
lists b.rhses = rhses
system
equations endo rhses # works
end system
system
equations b.endo b.rhses # "b.endo not found"
end system
</hansl>
I'm not sure if list(s) inside bundles are supposed to work in this
context or not.
They're not. That could be added but it's not in-spec at present.
(And BTW while we're at it, "equations" isn't
recognized and
syntax-colored.)
OK, registered.
Secondly, here's something with string substitution and a newline
character:
<hansl>
open denmark
system
equation LRM 0 LRM(-1)
equation IBO 0 LRM IBO(-1)
end system
# standard way:
restrict $system
b[1,2] = 0
b[2,1] = 0
end restrict
estimate $system method=ols
# now with string substitution:
string rs = sprintf("b[1,2] = 0 \n b[2,1] = 0")
print rs # looks good, with line break
restrict $system
@rs # error: undefined symbol b
end restrict
</hansl>
hansl input has already been carved into lines by the time string
substitution comes along, so this is not going to work. Try this
instead:
<hansl>
Rmat = {0,1,0,0,0;0,0,1,0,0}
qvec = {0;0}
restrict $system
R = Rmat
q = qvec
end restrict
</hansl>
Allin