- Index
- » Users
- » SQX
- » Profile
Posts
Posts
When I try to load the External Libraries example with OMEedit, I get the following error message:
Error has ocurred while loading the fie/library
C:/OpenModelica1.9.3/......./ExternalLibraries.mo
Unable to load the file/library
Only single nonstructured entity is allowed to be stored in the file.
C:/OpenM.........mo
contains following classes ExternalFunc1, ExternalFunc2,External Libraries
Hello,
I am trying to build a library with counters for the component instances. The naive code would be something of the following style:
class Pipe
Integer ipipe; //actual number of the instance
outer Integer npipe; //global counter for the total number of pipes
initial algorithm
npipe := npipe + 1;
ipipe := npipe;
end Pipe;
model hydro_circuit;
inner Integer npipe(start=0,fixed=false); //global counter for the normal number of pipes
Pipe pa, pb, pc, pd;
end hydro_circuit;
I have been unable to achieve my goal: after initialization I want
npipe=4
pa.ipipe=1
pb.ipipe=2
pc.ipipe=3
pd.ipipe = 4.
Apparentely, the initial algorithm blocks are considered as multiple equations assigning the same variable npipe.
Thanks in advance for any help
- Index
- » Users
- » SQX
- » Profile