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
  • » jan.kokert
  • » Profile

Posts

Posts

Sep-29-17 05:53:16
...related to type conversion.

Hi,

I know that the initial posting is a long time ago...

And I just wanted to contribute, that the example simulates fine in the latest OM nightly build.
Only the two strings s1 and s2 are not displayed in the results as they can't be plotted numerically.

Cheers, Jan

To whom it may concern:
The created ticket is that one:
https://trac.modelica.org/Modelica/ticket/350

They decided, that inner/outer is NOT allowed in functions, as functions are not a part of the object-instance tree and inner/outer works only on that tree.

Hi sjoelund.se.
Yes! It is working now. I was very blind :-)
Thanks!

Hi sjoelund.se!

Thanks for your quick response!
What do you mean with "class comment"?

I tried to remove the ";" on different positions - other error occure like:
Error: No viable alternative near token: WSNmodel
or
Error: Parser error: Unexpected token near:  (<EOF>)

In all examples I have studied, the ";" is written as I did it.
So it seems, that there is another issue.

Best Regards
Jan

Hi.
I like to structure my Modelica classes hierarchically and in separate files.
So I created a new folder "C:\WSNmodel\" which contains:
package.mo:

Code:

within ;

package WSNmodel
  "Wireless Sensor Node root package";
extends Modelica.Icons.Package; 
end WSNmodel;

and
SolarCellTest.mo:

Code:

within WSNmodel;

model SolarCellTest
...
equation
...
end SolarCellTest;

(This is the very first step and additional subfolders with their package.mo will follow in the future)

When I open SolarCellTest.mo it says:

Code:

[:0:0-0:0] Error: Failed to insert class SolarCellTest within WSNmodel;

the available classes were:
  Modelica.SIunits.ComplexPower
  Modelica.SIunits.ComplexAdmittance
  Modelica.SIunits.ComplexImpedance
  Modelica.SIunits.ComplexReluctance
  Modelica.SIunits.ComplexMagneticFlux
  Modelica.SIunits.ComplexMagneticFluxDensity
  Modelica.SIunits.ComplexMagnetomotiveForce
  Modelica.SIunits.ComplexMagneticPotentialDifference
  Modelica.SIunits.ComplexMagneticPotential
  Modelica.SIunits.ComplexMagneticFieldStrength
  Modelica.SIunits.ComplexElectricFlux
  Modelica.SIunits.ComplexElectricFluxDensity
...  [all MSL classes]

I already added the path "C:\WSNmodel\" to MODELICAPATH
and in OMEdit in Tools->Options->Libs->Custom.

When I try it with Wolfram SystemModeler it says:

Code:

No top level Modelica classes found in the file SolarCellTest.mo

Another issue is, when I open package.mo it says:

Code:

No viable alternative near token: ;

What is going on here???
Thanks!

Hi Adeel,

thank you for your quick response. Cause this thing really bugs me...

Sadly your suggested fix isn't working.
I tried it with:

Code:

  if (mpModelWidgetContainer->getCurrentModelWidget()==0)

    return; // OMEdit is starting up

an even commented out the whole "cancel connection if another tool is chosen"-block.
...with no success at all.

I mean if I would know at which code line OMEdit crashes exactly, I could debug it by myself.
But I just run the OMEdit.exe and receive a Windows message, that the programm isn't working any longer.

Is there a possibility to setup the Eclipse debugger for OMEdit?
Right now, the green "Run As..." button and the debug button is not working.

The intension was to have this "show/hide annotations" feature very quickly available.
In the shaps toolbar it might be the wrong place, but I would prefere to place it in a toolbar in general.

Best Regards
Jan

Hi!

I want to implement a new feature, that will show/hide annotations in text mode.
For this I wanted to add a toggle button next to mpConnectModeAction.

So I added in MainWindow.h line 241:

Code:

  QAction *mpAnnotationVisibleAction;

and in MainWindow.cpp line 1819:

Code:

  mpAnnotationVisibleAction = new QAction(QIcon(":/Resources/icons/connect-mode.png"), tr("Show/hide annotations"), mpShapesActionGroup);

  connect(mpAnnotationVisibleAction, SIGNAL(triggered()), SLOT(toggleShapesButton()));

(For this first test the icon is the same one).

and in MainWindow.cpp line 2098:

Code:

  mpShapesToolBar->addAction(mpAnnotationVisibleAction);

OMEdit compiles fine in my Eclipse environment, but I receive an runtime error at startup (splash screen)!

In a second step, I also implemented the function

Code:

QAction* MainWindow::getAnnotationVisibleAction()

{
  return mpAnnotationVisibleAction;
}

...with the same result (runtime error at OMEdit startup)

I really have no idea, what is going on there!
Do you have an idea? - Thank you very much!

And Merry Christmas!!!

Best Regards
Jan

Hi!

I'd like to run the examles from the Modelica_EnergyStorages Library.
The battery parameters are given in a separate file (Modelica_EnergyStorages.CellRecords.StaticResistance.Test1Parameters)
When I run the example I get the error message:

"Translation    13:22:37        0:0-0:0    Looking for a function Modelica_EnergyStorages.CellRecords.StaticResistance.Test1Parameters but found a RECORD."

What can I do to solve this problem?
Thank you much in advance!

Kind Regards
Jan

Hi Adeel!
Your advice with the right click is working perfectly - thanks a lot!

Hi Adeel,

thank you for your response. I've opened an enhancement ticket regarding the snap to grid option.
With icon size I mean the following:

In OMEdit under Tools->Options->Graphical view-> Tab: "Schema View".
I can change the component scaling factor (default is "0.1") or the size of the view (100x100).
All these options will ONLY work, if you unload and load the model again.
If you have an already loaded model and drag new items in it, these setting will have no effect.

I reinstalled Modelica and tried now the nightly build 1.9.1 r18126 - it's the same problem.

Kind Regards
Jan

Nov-12-13 12:56:05
Category: Developer

Hi!

Can you please implement an undo function for the graphical environment?
So if I move an icon(class) around or delete it, I probably like to UNDO this.

I'm using OMEdit Ver. 1.9.0  r17628.

Kind Regards
Jan

Hi!
I'm using OMEdit Ver. 1.9.0  r17628.
Under tools->options I changed the icon size to 100x100, just for fun.
Bun now I wanted to change it back to 10x10 and it dose not have any effect.
I restarted the editor several times, but this seems to be a bug.

By the way: Can you please implement an "icon snap to the grid" function.
Coordinates like {-31.1321,-35.3773} are useless!
Integer precission would be sufficient.

Thank you!

Kind Regards
Jan

  • Index
  • » Users
  • » jan.kokert
  • » Profile
You are here: