- Index
- » Users
- » rafd
- » Profile
Posts
Posts
Page Start Prev 1 Next End
I'm trying to loop through a vector of models, but I am getting a UNKNOWN_SUBSCRIPT error.
Here is some of the related code:
Code:
House houses[10];
algorithm
fixed_cost := 0;
for k in 1:10 loop
fixed_cost := fixed_cost + houses[k].economic_out.fixed_cost;
end for;
omc gives the following error:
Code:
EnergySimTest.cpp:1852: error: ‘$Phouses$lBUNKNOWN_SUBSCRIPT$rB$Peconomic_out$Pfixed_cost’ was not declared in this scope
I have checked to see that replacing [k] with [1], [2], etc. works.
Is modelica unable to dynamically generate iterators for a vector of models? (I know it works for a vector of Reals)
Page Start Prev 1 Next End
- Index
- » Users
- » rafd
- » Profile