Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » saiph74
  • » Profile

Posts

Posts

Mar-21-13 14:21:03
How to change the icon position in inherited connectors

Well i didn't find an elegant answer/solution to my problem.
But one could add the pin's and port's separatly to the model avoid this overlaping, as it is possible to declare their position (placement) in the annotation part.

Mar-14-13 10:51:11
How to change the icon position in inherited connectors

Hello,
i built a model containing thermal and electrical equation parts (in Dymola so far). And inherited some connectors like the OnePort from the Modelica MSL in a first step. Modelica puts the connector (pin) icons on the left and right side of the icon of the model. Now i added a new extended TwoPort connector for the thermal part. In the icon of the model the thermal and electrical connectors (ports & pins) overlap and i can't find a way to change their positions and i can't connect my thermal components once the electrical are connected.
If i open the original connector i can change the position of the pins in the icon but in my (inherited) model i can't move them at all.
As far as i can see the position of the icon is declared in an annotation.
As i don't want to create for each new application a special connector with special pin positions i would like to know how i can change the positions of these inherited connectors? So if modelica provides inheritance to reuse models (modeling knowledge) and also includes the concept of inheritance through modification. How can i modify the position (placement) of an icon in annotation? In my case the "Modelica.Electrical.Analog.Interfaces.OnePort" includes up-to two pins, whom need to be moved to another position. I have no idea how to realize this!
For instance i would like to put both electrical connector-icons (pins) on the left and both thermal-icons on the right side of the model icon.

Here's an image to show  the problem
http://img687.imageshack.us/img687/4811/unnamedo.png

Uploaded with ImageShack.us

I hope you can help.

Best Regards

Aug-08-12 16:35:44
How to use tables to read as variables and interpret data from files?

Hello,
i'm a real newbie with modelica and look for a clear example for the use of timetables/Combitimetables etc. because all i tried so far didn't work. I'm sure i misunderstood something in the documentations current/sad
Syntax: what should a call of the table look like? What should i do to make modelica read a column as a parameter or variable?...

What i want to do exactly is to use and simulate simple data from a csv-file, which includes two columns for time and velocity, both should be declared as parameters of the model. So you can find in the table at a given time t0 in the same row the velocity V(t0) and this is what the program at least should do and if possible give out -as well- the exacte derivative (acceleration at t0) for any t in the given time intervall. This should be a very simple task for modelica but somehow i have no (more) idea how to realize it current/sad

I tried avoiding using "tables" or the "DataFile-Library" by using the piecewise-function fom the book of Tiller but the compiler misses a derivative for the velocity-parameter, which was read from the csv-file as a column-variable current/hmm.
Here is the check-message: "Check of VehicleModel_SA.TestVehiMod completed successfully. Class VehicleModel_SA.TestVehiMod has 10 equation(s) and 10 variable(s).
4 of these are trivial equation(s)."
But the SImulation shows only the first 0,02s with wrong results!
The model is working fine with "programmed" testentries, but once i try to read data from a file i can't simulate it or i get error messages! A simulation of the same file with dymola is giving the error message that a derivative of V is missing!

Ater this flop, i tried reading the (calculated) derivative from also fom a csv-file or calculating it by simple code again without any positiv result current/sad.

I tried my best to solve this problem in the presented ways, but couldn't succeed and hope you could give me some helpful hints or advices. All i ask for is a clear advice for one possibility to solve it either using tables or by directly reading data from file and put it in as parameters/variables of the model!
THANX in advance for any helpful Answer! current/smile

  • Index
  • » Users
  • » saiph74
  • » Profile
You are here: