﻿__group__	ticket	summary	component	milestone	type	created	_description_	_changetime	_reporter
adeas31	2894	Summary of improvements for OMEdit GUI usability	OMEdit	2.0.0	enhancement	2014-10-15T19:33:03Z	"This ticket is meant to collect and prioritize the improvements that need to be done to the OMEdit GUI in order to make it usable with the MSL and with most modern Modelica 3.4 compliant libraries. Each item is covered by a specific ticket. 

== Features requiring the new front end to be in place ==

All the features listed here depend on the front-end to provide correct information to OMEdit, and to do so rapidly. This is now possible by using the new front-end (see #4138), which is exploited by new API functions which are much faster than previously. Version 1.14.0 will use these features by default.

* #2079 Replaceable classes and replaceable objects (e.g. the Medium package in all Modelica.Fluid models, or the HeatTransfer model in the Modelica.Fluid.Vessels.ClosedVolume) should show up in the parameter window, with a drop-down menu filled in based on the {{{choices}}} or {{{choicesAllMatching}}} annotations. Once a specific choice is made, it should be possible to change the parameters and/or replaceable classes/models of the redeclared model/component, e.g. by clicking on a button. This feature is essential for the Modelica.Fluid library, as well as for many user libraries such as ThermoPower.

* #2081 Conditional connectors should be displayed correctly. This feature is used extensively in the Modelica.Mechanics and Modelica.Electrical libraries. It requires that the API functions return the correct visibility attribute. 

* #2661 Update parameter-dependent Dialog annotations correctly

* #2132 Display conditional connectors correctly by evaluating the 
  corresponding parameters

* #2891 Hierarchical editing of systems for graphical modification of parameters and replaceable classes in sub-models. Requires substantial work to implement some API function, as well as in OMEdit to display the information properly.

* #3915 Rename feature missing


== Other features ==

* #6417 Keyboard shortcuts for frequent actions such as simulate, switch view
* #5529 Insufficient precision when storing sine phases

* #4449 Allow several curves in the same parametric plot window

* #4645 and #4839 Use blank pixels around lines to enhance readability 

* #3776 Allow copying/pasting models across diagrams

* #3287 Allow input of common parameters and replaceable classes in a multiple component selection. This can shorten the time to set up a model dramatically

* #2166 See exact simulation values through snap to curve feature


== Past improvements ==
* #4508 Reduce the installation time under Windows by making the installation of contributed open source libraries optional

* #2909, #3788 Drastically reduce the waste of HD space by eliminating useless intermediate output files and reducing the number of useful files

* #3054 Clarify ""Revert from previous"" button

* #2908 Changes in sub-models should be reflected in models using them immediately, not only when changes to the latter models are made.

* #2906 Drop-down choices for enumeration (and possibly boolean) parameters

* #2845 Consistent view between textual view and library browser view of packages should be always guaranteed. Requires to update the views in OMEdit whenever the focus is changed between the different sub-windows.

* #2391 Improved handling of custom modifers (e.g. start attributes) from the GUI. Modifers, once applied, should still show up when the parameter window is re-opened later.

* #2390 Fully support the showStartAttribute annotation, which is widely used in Modelica.Mechanics.

* #2190 Copy class feature within the same package.

* #2903 Add option to output protected variables to simulation setup window, output tag.

* #2477 Better snap-to-grid features when using blocks from the MSL

* #2506 Keep connecting lines manhattanized and allow no-nonsense editing of models copied from the MSL (e.g. it should be possible to move one component without weird side-effects on the diagram)

* #2611 Zoom issue should be fixed.

* #2988 Zoom In/Out with MouseWheel.

* #2392 Show default values differently in the Component Parameters window.

* #2956 Moving a complete model disassembles everything

* #2596 Re-simulate with changed options. Currently if we want to make a new simulation with different simulations options, e.g. a different final time we have to re-build the whole executable, that is a waste of time.

* #2985 Updating submodel icons where they are used. This ticket is not really urgent. But it is related to #2908, that has already been fixed, so fixing this one is sort of completion of the job. In case it is difficult to fix it could be postponed.

* #1900 Handle connections to expandable connectors in OMEdit

* #2250 Support DisplayUnit and unit conversion for parameter input in OMEdit

* #3558: Flip icons with text boxes correctly

* #2676 Handle models in separate files

* #2905 Comment- and formatting-preserving parsing and unparsing is required to avoid that OMEdit scrambles up the code of existing Modelica classes when saving them on file.

* #2892 Undo/Redo feature in the Diagram view of the model editor.

* #2190 Copy class to a different package.

* #2696: Display enhancement of very large and very small numbers on vertical axis

* #2960 Speed up the exploration of the package tree and the drag-n-drop actions. 

* #4504 Allow to install OpenModelica anywhere in the file system, including the default installation directories (such as {{{C:\Program Files}}}) that include spaces

* #2395 - Support the connectorSizing annotation. Required by many libraries including  Modelica.Fluid, PNLib, iPSL, OpenIPSL

"	2021-03-11T12:03:47Z	Francesco Casella
adeas31	3626	Parameter records are not displayed correctly in OMEdit	OMEdit	Future	defect	2016-01-07T18:05:48Z	"Please consider the attached example of a DC Machine model, which modifies two parameter records:

{{{
...brushParameters(V = 0.617), 
frictionParameters(PRef = 0.7162, power_w = 2, wRef = 723.4)...
}}}

Make a double click on the DC machine model and chose the Losses tab:

In the brushParameters field only the number 0.617 appears but it is not clear whether this is ""V"" or ""ILinear""

The frictionParameters filed again shows only one value (723.4) but it is not clear to which element of the record the value belongs to. "	2016-10-13T12:55:29Z	Christian Kral <dr.christian.kral@…>
adeas31	6438	A lookup issue	Interactive Environment		defect	2021-03-26T20:22:42Z	"Steps to reproduce:
1) load TestPackage.mo, and open Test: we have a red box because MyModel is missing
2) load Test1.mo and duplicate its model MyModel into TestPackage. Look at model Test inside TestPackage: the red box should disappear, but it does not.
3) save, unload and re-load TestPackage again
4) open Test inside TextPackage: the red box has disappared and now myModel is displayed.

So the issue is in point 2. 
 Tested with 1.17.0-dev.beta3."	2021-09-13T11:58:21Z	massimo ceraolo
adeas31	3652	Unable to modify parameters inside components.	OMEdit	Future	enhancement	2016-01-28T10:11:13Z	As of `1.9.4~dev-695-g5815c70` OMEdit is not capable of changing parameters further down the hierarchy of a model. It only allows you to use  ''view class'' in order to open a class in its original location. Which means changing a parameter there will change it in the original location (if it is not write protected). But you can not add any modifiers to any of the components of the sub-layer. This is quite cumbersome. 	2016-01-28T13:45:03Z	Dietmar Winkler
adeas31	3964	MetaModelica support in OMEdit	OMEdit	Future	enhancement	2016-06-16T17:00:22Z	"We now have some basic support for MetaModelica in OMEdit but there are still several things missing. Following are the list of features,

1. ~~Code folding.~~
1. Auto complete.
1. ~~Single & multi-line commenting.~~
1. ~~Pressing enter should open the selected file in ModelWidget.~~
1. ~~Shift-Home should not select trailing spaces.~~
1. ~~Show only name in ctrl-tab window.~~
1. Find in files.
1. Function Outline.
1. Toggle comment selection for C/C++ Editor.
1. Code folding for C/C++ Editor."	2017-03-08T12:58:54Z	Adeel Asghar
adeas31	4294	OMEdit: Icon Editor - Bring to Front/forward and Send to Back/Backward	OMEdit	Future	defect	2017-03-02T18:57:31Z	"Issue 1:
I just wondered why all z-order alignment options (Bring to Front/forward and Send to Back/Backward) are disabled. Is the feature still in development? In [changeset:1f6c73/OMEdit] support for this feature was added.

Issue 2:
I think in Modelica there is no dedicated z-order property. Instead, the order of the annotations is deciding. So I realized when deleting a component which is in the back and then doing an ""UNDO"", the order is not restored, so the deleted component comes to the front.

I know that the IconEditor is not the most critical component, but it would be really nice, if this works properly. As we now have this wonderful UNDO-feature which makes OMEdit totally usable!
"	2017-04-12T17:10:56Z	Jan Kokert
adeas31	4344	OMEdit: keep UNDO stack after text view changes	OMEdit	Future	defect	2017-03-19T14:38:49Z	"Even if it seems to be a more time-consuming task, I recommend merging the UNDO stack of the Text View with the stack of the Diagram View as discussed in #4334#comment:13.

It is just a strange behavior that you must go the to correct view to undo things. People how use OMEdit assume that the content in Text View and Diagram View is a different representation of the SAME thing and expect a coherent behavior especially for undo/redo."	2017-03-24T13:47:41Z	Jan Kokert
adeas31	4322	OMEdit: Improve commenting of folded lines - but how?	OMEdit		enhancement	2017-03-15T20:38:44Z	"Commenting out folded lines in a hurry will result in syntax errors, as only the first line is commented out. It would be convenient if all lines are commented automatically.
One possibility is to add a {{{//}}} at the beginning of every other line. Another possibility is to replace the just typed {{{//}}} into a {{{/*}}} and to add a {{{*/}}} at the end of the folded part.

Removing the comments should follow the same automatic behavior.

What do you think? Or is it only me, who noticed that? - This is a discussion ticket!"	2021-09-13T11:58:21Z	Jan Kokert
adeas31	5958	Filter and export partial result files from OMEdit	OMEdit		enhancement	2020-05-15T09:25:18Z	It would be handy to make [https://www.openmodelica.org/doc/OpenModelicaUsersGuide/latest/scripting_api.html#filtersimulationresults filterSimulationResults] available from OMEdit to export and filter partial result files.	2021-09-13T11:58:21Z	Lennart Ochel
adeas31	4309	OMEdit: Status bar: Improve display of component coordinates	OMEdit		enhancement	2017-03-14T06:43:08Z	"Sorry to bother you with another minor-issue ticket.

I noticed that in the bottom status bar (""X: ~ | Y: ~"") the X and Y values are odd and not helpful. The values where probably correct back in the days, when we did not have a snap-to-grid feature. Today it is not possible to move icons to these odd positions and consequently, rounded values should be displayed instead.

Also, one can think of displaying the origin of the component which is dragged at the moment and not the mouse position. Furthermore, a delta-display and an extent-display could be added, showing how many (integer) units are moved towards right or top and showing the width/height of the object.

A good example for an excellent status bar is {{{paint.net}}} [http://www.getpaint.net/index.html] in the shape-editing mode. Paint.net is a free improved version of MS paint.
"	2021-09-13T11:58:21Z	Jan Kokert
adrpo	4372	model replaceable path changes when the model icon is moved and the model becomes no more replaceable	OMEdit	1.19.0	defect	2017-03-27T11:01:56Z	"Please consider the following models (also attached):
{{{
package P1
  model M1
    extends Modelica.Blocks.Interfaces.SISO;
    Boolean Flag = false;
    Real x = if Flag then u else 0;
  equation
    y = 0.5*x;
  end M1;

  model M2
    extends Modelica.Blocks.Interfaces.SISO;
    replaceable model Mx = P1.M1;
    Mx mx annotation(Placement(visible = true, transformation(origin = {-2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  equation
  connect(u, mx.u) annotation(Line(points = {{-120, 0}, {-14, 0}}, color = {0, 0, 127}));
  connect(mx.y, y) annotation(Line(points = {{9, 0}, {110, 0}}, color = {0, 0, 127}));
  end M2;

  model M3
    P1.M2 m2(redeclare model Mx=P1.M1(Flag=true)) annotation(Placement(visible = true, transformation(origin = {-2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
    Modelica.Blocks.Sources.Step step1(startTime = 0.5)  annotation(Placement(visible = true, transformation(origin = {-36, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  equation
    connect(step1.y, m2.u) annotation(Line(points = {{-24, 0}, {-14, 0}}, color = {0, 0, 127}));
  end M3;
end P1;
}}}

The model M2 defines the model Mx as replaceable and the model M3 uses M2 redeclaring the model Mx in order to change the Flag parameter value from false to true.

Simulating the model M3 the results is according I expect, the Flag parameter value is changed (from false to true) and the step is propagated to the model m2 output.

Now open the model M2 and simply move the model mx

the line:
{{{
    Mx mx annotation(Placement(visible = true, transformation(origin = {-2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
}}}

is changed by OmEdit in:
{{{
P1.M2.Mx mx annotation(Placement(visible = true, transformation(origin = {-2, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
}}}

and the model {{{Mx}}} now seems to be no more replaceable, in fact, re-simulating the model M3 the Flag parameter value now is not propagated and the output y of model m2 stays fixed to 0.

Attached are: package P1, output before M1 moving, output after M1 moving.

OMEdit 1.12.0~dev-250-g0f5c07d
Connected to OpenModelica 1.12.0~dev-561-gc489db1
sysop: Ubunti 14.04 - 34 bit"	2021-09-13T19:50:28Z	Andrea Bartolini
adrpo	5489	Allow setting each and final prefixes via the API	Interactive Environment	2.0.0	defect	2019-05-17T08:54:10Z	Currently `setComponentModifierValue` only allows to set the modifier value. Extend it to make it possible to include `each` and `final` prefixes. There is also an example available in #5395.	2019-06-05T19:07:24Z	Adeel Asghar
adrpo	6129	choicesAllMatching doesn't return the appropriate class references	Interactive Environment	1.19.0	defect	2020-09-21T09:52:08Z	"Please check the attached simple model, I just dragged a pressure source component {{{boundary}}} in it.

When I double-click on {{{boundary}}}, and then click on the Medium drop-down menu, I get about 30 possible classes for redeclarations. However, there are several issues there
- some are partial packages, which obviously cannot be used, e.g., {{{Modelica.Media.Interfaces.TemplateMedium}}}
- some are found within models but are not encapsulated, so according to [https://specification.modelica.org/v3.4/Ch5.html#composite-name-lookup Section 5.3.2] of the specification, they shouldn't even be looked up, e.g. {{{Modelica.Media.Examples.Tests.Components.ShortPipe.Medium}}}
- some are even found inside partial models, e.g. {{{Modelica.Media.Examples.Tests.Components.PartialTestModel.Medium}}}

On the other hand, not even one of the actually usable models, e.g. {{{Modelica.Media.Air.SimpleAir}}} or {{{Modelica.Media.Water.StandardWater}}} actually show up.

This issue makes OMEdit actually unusable with Modelica Media/Fluid
"	2021-09-13T19:50:28Z	Francesco Casella
adrpo	2173	simulate API function does not complain on wrong parameters	Interactive Environment	2.0.0	defect	2013-05-03T11:21:22Z	"Consider the following simple test case:

{{{
model Test
  Real x = sin(1000*time);
end Test;
}}}

if I call the following API function from OMShell (or OMEdit)

{{{
simulate(Test, stopTime = 1, numberOfIntervales=5000)
}}}

the compiler silently accepts numberOfIntervales (which is mis-spelled), and still uses the default number of intervals (i.e., 500).

IMHO, API function calls with nonexisting input arguments should generate an error."	2018-09-17T16:08:35Z	Francesco Casella
adrpo	3857	Error in Generated XML from Modelica	Code Generation	Future	defect	2016-04-18T14:29:03Z	"Hi there,

I am using the XML file generated by Modelica for modeling. I am getting the following error in the format each time-

In bouncing ball, line 162 of generated xml file, <'''eq''': Equation> is generated within the <when>, whereas it should be <'''equ''': Equation> as per the schema.

Please let me know how/ when this can be resolved. I have attached the modelica model and the generated xml file."	2016-08-05T14:09:16Z	karan.singh@…
adrpo	4410	moving a replaceable object in the block diagram duplicates the graphical annotation in text view	OMEdit		defect	2017-05-02T17:11:46Z	"consider the following model (also attached):

{{{
package test
  partial model A
    annotation(
      Diagram,
      Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}), Text(origin = {2, -1}, extent = {{-32, 41}, {32, -41}}, textString = ""A"")}));
  end A;

  model B
    extends A;
  end B;

model C
  replaceable B b1 constrainedby A annotation(
    Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
end C;

end test;
}}}

now open the model C and move the model B in the block diagram, the graphical annotation in the text view is duplicated as follows:

{{{
model C
  replaceable test.B b1 annotation(
      Placement(visible = true, transformation(origin = {-24, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))) constrainedby A annotation(
    Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
end C; 
}}}

this behavior seems depend from the presence of the clause ""constrainedby""

OMEdit 1.12.0~dev-290-g1b6ac20
Connected to OpenModelica 1.12.0~dev-703-g46bfb1f

sysop: linux Ubuntu 16.04 "	2021-09-13T11:58:21Z	Andrea Bartolini
adrpo	2367	Record with vectors, zeros(), size()	New Instantiation	Future	defect	2013-09-26T08:33:45Z	"{{{#!mo
model emptyVector2
  record R
    parameter Real x[:]=zeros(size(x,1));
  end R;
  R r;
end emptyVector2;
}}}
here omc.exe freezes. (r15030)"	2020-02-08T20:12:06Z	c.schulze@…
adrpo	2471	Add check if variable can be changed via -override*	Run-time	Future	defect	2013-11-11T08:52:25Z	"Currently we do not check if a variable can be changed
via -override* functionality in the simulation executable.
We should add a check for this (see if isValueChangeable
attribute in XML is set to true)."	2017-11-14T22:08:53Z	Adrian Pop
adrpo	2849	"Wrong flattening of ""inner outer output"""	Frontend	Future	defect	2014-09-29T15:57:42Z	"
In the following model (also attached) the inner variable `v` declared in model `Test` is assigned to in model `B` where it is declared as `outer output`. `B` is instantiated in `A` and `A` is instantiated in `Test`. In model `A` variable `v` is declared as `inner outer output`. 

{{{#!mo
package Bug

  model B
    outer output Real v;
  equation
    v = time;
  end B;

  model A
    inner outer output Real v;
    Real y2;
    B b;
  equation
    y2 = v;
  end A;

  model Test
    inner Real v;
    Real y1;
    A a;
  equation
    y1 = v;
  end Test;
  
end Bug;
}}}

The model flattens, but the generated system of equations is wrong (therefore, it doesn't simulate). The flattened Modelica is:
{{{
class Bug.Test
  Real v;
  Real y1;
  Real a.v;
  Real a.y2;
equation
  a.v = time;
  a.y2 = v;
  y1 = v;
end Bug.Test;
}}}
Note that the equality constraint between `v` and `a.v` is lost.

Adding an additional constraint, e.g., `Real a.v = v` would make the flattened code valid. Alternatively, `a.v` could be substituted by `v` everywhere.
"	2014-09-29T16:11:32Z	Bernhard Thiele
adrpo	2924	Extending a model fails	Frontend	Future	defect	2014-10-22T13:21:25Z	"I have a model (unfortunately, proprietary, so i can't put it here) that I have been working with that is now causing me some difficulties.  The base model is working fine.  I then extended that model, with some additions, and it is also working fine. 
The strange difficulty that I am running into, is that if I extend that model, I run into errors.  And, the occur, even if I do nothing but this:
model Model3
extends Model2;
end Model3;

If I check Model2, I see that it is balanced with 894 equations and 894 variables. And it runs just fine.  
If I check Model3 (created with nothing but extends, as above, and no actual additions or changes) it shows 1264 equations and 1571 variables (!?!?).  If I try to run this model, I see a bunch of ""Model is structurally singular, error found sorting equations"", ""Internal error pre-optimization model clockPartioning failed"", ""Too many equations, over-determined system.  The model has 1264 equations and 894 variables""

I don't see how extending a model, with no changes, or even just a minor addition, can cause the addi4tion of hundreds of equations and variables.  "	2021-12-08T14:07:00Z	Adam Dershowitz <dersh@…>
adrpo	3067	Memory leak in FMI 2.0 (20 MB/min)	FMI	Future	defect	2015-01-09T08:30:53Z	"Thanks to the solution of a couple of tickets during the last weeks the optimization basing on FMI is working quite well now! 

A remaining problem is a memory leak that can be seen in all examples to some extend. Here is an extreme case that leaks about 20 MB/min (depending on the speed of your processor).

The problem can be reproduced by repeatedly running an optimization with HQP. On a machine with omc (r23977), git, gcc and tcl-dev:
{{{
$ git clone https://github.com/omuses/hqp.git
$ cd hqp
$ ./configure
$ make
$ cd odc
$ ./odc
% while true {source drumboiler_sp.tcl}
}}}"	2017-11-14T22:08:53Z	Rüdiger Franke
adrpo	3070	Noise package does not work (replaceable package + function objects)	Frontend	Future	defect	2015-01-11T11:20:05Z	"DLR is currently restructuring the Noise package that is planned to be included in MSL 3.2.2. The package shall be very flexible ((a) the uniform random number generator to be used can be selected globally, (b) the random number according to a specific distribution can be selected for every instance and (c) this instance uses the globally selected uniform random number generator. Unfortunately, OpenModelica 1.9.1 (r22929) is not able to handle it.

Find attached several different variants in order to find a version that runs in OpenModelica. Neither of them runs in OpenModelica:

- TestRandomFeatures.Version2 is the desired one with the desired flexibility. OpenModelica complains during flattening.
- TestRandomFeatures.Version1,Version3,Version are simplified versions (not as flexible as desired), but still OpenModelica complains during flattening.
- TestRandomFeatures.Version4 is a very simplified version and OpenModelica generates C-Code. However, the C-compiler reports errors (incompatible type for argument 1 of 'sub_alloc_integer_array').

Please, fix OpenModelica that at least Version5 is running. Even better, please try to generalize OpenModelica so that Version2 is running
"	2020-12-01T15:38:20Z	martin.otter@…
adrpo	3133	Uncertainties and OpenTURNS support is broken	Backend	Future	defect	2015-02-03T14:56:41Z	The support for uncertainties (and implicit the connection to OpenTURNS) got broken a while back. We should bring it back as people in MODRIO project need it.	2015-02-03T14:56:49Z	Adrian Pop
adrpo	3172	Reorganize the /build layout for Windows to better support +target=msvc for CPP runtime	Cpp Run-time	Future	defect	2015-02-23T13:49:52Z	"Currently runtimeCPPmsvcinstall and runtimeCPPinstall puts the build/include and build/lib files in the same place which means that we only support gcc for the CPP runtime (or whichever target is ran last).


I propose to have build/include/msvc/cpp and build/lib/msvc/cpp.
Maybe even have the same for the C runtime (build/include|lib/msvc/c) as currently is directly in build/include/msvc and build/lib/msvc."	2015-09-24T15:09:09Z	Adrian Pop
adrpo	3439	Make 3rdParty includes more homogeneous	Build Environment	Future	defect	2015-09-02T10:51:22Z	"We don't seem to have a clear picture on where to install 3rdParty includes.
We seem to push them into one of these places:
- build/include/omc/c
- build/include/omc/cpp
sometimes in their own directory sometimes not.

We should come up with a clear structure on where to put these includes especially of those libraries that are used by both C and CPP runtimes.

For example for ticket #3426 we need sundials but is not clear where to put the includes. If ones looks into the OpenModelica windows installation  we seem to have sundials includes twice inside:
- build/include/omc/cpp
- build/include/omc/cpp/includes
"	2015-09-02T18:39:05Z	Adrian Pop
adrpo	3540	Improve support for exporting FMI for co-simulation	FMI	Future	defect	2015-11-04T04:59:15Z	FMI for co-simulation support is missing.	2017-11-14T22:08:53Z	Adrian Pop
adrpo	3676	Do some sanity checks on the Windows PATH when building omc	Build Environment	Future	defect	2016-02-10T17:29:35Z	Sometimes if the user changes their Windows PATH the build will get to some programs it shouldn't and the build process has issues. Make sure we do some checks on the PATH in the Makefile.omdev.mingw.	2016-02-10T17:29:42Z	Adrian Pop
adrpo	3696	Add an OMC API to get and set the redeclare modifiers in extends and components	Interactive Environment	Future	defect	2016-02-19T17:46:56Z	"Currently we don't support the redeclare modifiers in the query/set API.
We need to implement an API for that."	2016-02-19T17:50:58Z	Adrian Pop
adrpo	3725	loadString merge=true create duplicate elements	Interactive Environment	Future	defect	2016-02-25T00:57:09Z	Run the attached script.	2016-03-17T05:49:55Z	Adeel Asghar
adrpo	3790	Simulation and FMU build using C runtime and MSVC is broken	Run-time	Future	defect	2016-03-23T00:52:53Z	"It seems we have a broken MSVC C runtime.

See also:
https://www.openmodelica.org/forum/default-topic/1894-fmi-co-simulation-1-0"	2017-11-14T22:08:53Z	Adrian Pop
adrpo	3821	FMU generation - dependend dlls	FMI	Future	defect	2016-04-06T08:34:41Z	Currently we put all the dependent dlls in the binary folder but the FMI standard says that it should be only one dlls which has no dependencies. It should be possible to generate this via source code FMUs.	2017-11-14T22:08:53Z	Adrian Pop
adrpo	3823	Store less information in ElementSource	Frontend	Future	defect	2016-04-07T05:04:22Z	"We store too much information in ElementSource for components and equations and it takes up a lot of memory. We should be able to disable parts of that depending on a flag.

Partial work has been already done here:
https://github.com/OpenModelica/OMCompiler/pull/657
"	2017-11-14T22:08:53Z	Adrian Pop
adrpo	3849	Wrong constant evaluation of final parameter arrays in the back-end	Backend	Future	defect	2016-04-14T15:56:36Z	"I have a non-public wind power model that sends an array of zeros to a function instead the of the correct array. The model works with +d=evalparam which forces the evaluation in the front-end.

I'm opening this bug so we don't forget about it."	2017-11-14T22:08:53Z	Adrian Pop
adrpo	3911	Internal compiler error: Segmentation fault	Code Generation	Future	defect	2016-05-16T19:18:22Z	"Below is the text I saw when the compiling failed. This is a fairly large model (took 5 minutes to translate, 3 more to get to this failure point). I cannot provide the model.

WebModel_06inz.c: In function 'WebModel_eqFunction_93667':
WebModel_06inz.c:1299806:1: internal compiler error: Segmentation fault
 }
 ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/msys2> for instructions.
<builtin>: recipe for target 'WebModel_06inz.o' failed
\tools\msys\mingw64\bin\mingw32-make: *** [WebModel_06inz.o] Error 1
Compilation process failed. Exited with code 2."	2016-05-24T18:11:34Z	palmer.ap@…
adrpo	3965	Support giving alarm time at the command line for rtest and runtests.pl	Testing Framework	Future	defect	2016-06-17T10:25:38Z	"Currently we impose a hardcoded 900 seconds alarm time for tests.
To be able to use the same testing framework for big tests this limit should be configurable."	2016-06-17T10:25:51Z	Adrian Pop
adrpo	3976	Setting the locale via scripting does not work	Interactive Environment	Future	defect	2016-06-24T02:46:23Z	"Running test.mos:
{{{
setCommandLineOptions(""+locale=en_US""); getErrorString();
loadModel(Modelica); getErrorString();
getInheritedClasses(Modelica.Mechanics.MultiBody.Visualizers.Advanced.Shape); getErrorString();
}}}
on a computer with a Swedish locale gives:
{{{
IDA-LIU050+adrpo@ida-liu050 MINGW32 ~/dev/OpenModelica/build/bin
$ ./omc.exe test.mos
true
""""
true
""""
{ModelicaServices.Animation.Shape,Modelica.Utilities.Internal.PartialModelicaServices.Animation.PartialShape}
""[c:/bin/cygwin/home/adrpo/dev/OpenModelica/build/lib/omlibrary/Modelica 3.2.2/Mechanics/MultiBody/Visualizers.mo:1979:8-1980:83:writable] Error: PartialModelicaServices ▒r partiell, namnuppslagning ▒r inte till▒tet i partiella klasser.
""
}}}

Running {{{omc +locale=en_US}}} gives me messages in English.
"	2016-09-21T11:32:23Z	Adrian Pop
adrpo	4448	ExternData library is not working in OpenModelica	Code Generation	Future	defect	2017-06-16T09:14:53Z	"The ExternData library works in Dymola and SimulationX, unfortunately, it is currently not working in OpenModelica. The library developed mentioned this in the documentation and suggest a quick fix (https://github.com/tbeu/ExternData). However, the fix does not work in OpenModelica. (please check this discussion board https://github.com/tbeu/ExternData/issues/9#issuecomment-308656184). By using a stand-alone function as suggested by the library developer-

package Test
  extends Modelica.Icons.Package;
  function __OpenModelica_getReal ""Get scalar Real value from XML file""
    extends Modelica.Icons.Function;
    input String fileName="""" ""File where external data is stored"";
    input String varName ""Key"";
    output Real y ""Real value"";
    protected
      ExternData.Types.ExternXMLFile xml = ExternData.Types.ExternXMLFile(fileName) ""External XML file object"";
    algorithm
      y := ExternData.Functions.XML.getReal(xml=xml, varName=varName);
    annotation(Inline=false);
  end __OpenModelica_getReal;
  
  model XMLTest ""XML file read test""
    extends Modelica.Icons.Example;
    parameter String fileName = Modelica.Utilities.Files.loadResource(""modelica://ExternData/Resources/Examples/test.xml"");
    Real test = __OpenModelica_getReal(fileName, ""set1.gain.k"");
    annotation(experiment(StopTime=1));
  end XMLTest;
  annotation(uses(ExternData(version=""2.2.0""), Modelica(version=""3.2.2"")));
end Test;

XML test compiles without any error but when I try to run it gives following errors.


[1] 10:44:56 Translation Notification
[ExternData: 512:7-520:18]: Created directory C:\Users\mrn04\AppData\Local\Temp\/omc_compile_ED_XMLFile_422688

[2] 10:44:56 Translation Notification
[ExternData: 512:7-520:18]: cp -a ""C:/OpenModelica1.12.0-dev-64bit/lib/omlibrary/ExternData 2.2.0/Resources""/* ""C:\Users\mrn04\AppData\Local\Temp\/omc_compile_ED_XMLFile_422688""

[3] 10:44:56 Translation Notification
[ExternData: 512:7-520:18]: Changed directory to C:/Users/mrn04/AppData/Local/Temp/omc_compile_ED_XMLFile_422688/BuildProjects/autotools

[4] 10:44:56 Scripting Error
Error opening file: log: No such file or directory.

[5] 10:44:56 Translation Error
[C:/dev/OpenModelica64bit/OMCompiler/Compiler/SimCode/SimCodeFunctionUtil.mo: 742:9-742:129]: Internal error function elaborateFunction failed for function:
function ExternData.Functions.XML.getReal""Inline never"" ""Get scalar Real value from XML file""
input String varName ""Key"";
output Real y ""Real value"";
input ExternalObject ExternData.Types.ExternXMLFile xml ""External XML file object""; external ""C"" y = ED_getDoubleFromXML(xml, varName);
end ExternData.Functions.XML.getReal;

[6] 10:44:56 Translation Error
[C:/dev/OpenModelica64bit/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 603:5-603:83]: Internal error Creation of Modelica functions failed.

Any kind of help on this issue will be very helpful. Thanks."	2017-11-07T10:12:46Z	musa_me4@…
adrpo	4738	Add support for MSVC 64bit	FMI	Future	defect	2018-02-01T14:53:13Z	"Currently for MSVC we only compile using the 32bit compiler.
We should do that only for 32bit OM and for the 64bit OM we should
compile using the 64bit CL compiler."	2018-02-01T14:53:25Z	Adrian Pop
adrpo	5358	Switch windows installer from SVN to GIT	Installation program		defect	2019-02-25T13:55:24Z	"
For Windows release use scripts from:
https://github.com/OpenModelica/OpenModelicaSetup
instead of old SVN:
https://openmodelica.org/svn/OpenModelica/installers/windows/OpenModelicaSetup

"	2021-09-13T11:58:21Z	Adrian Pop
adrpo	5932	DLL needs to be in working directory	Run-time		defect	2020-05-01T15:00:50Z	"I have been working on creating a library for internal use at my company and we need to have some functions written in C/C++ that interface with the Modelica code. 

After reading through the language specifications and some examples I was perfectly able to use the method where you just use the ''Include'' statement to add a ''.c'' file.

However, I had issues getting the exact same file to work when compiled into a ''.dll''. It would compile just fine, but I would get the following error during the simulation step:

{{{
Process crashed
Simulation process failed. Exited with code -1073741515.
}}}

The ''.h'' file is in ''LibraryName/External/Resources/Include'' and the ''.dll'' is in ''LibraryName/External/Resources/Library/win64''. The code block for the external function is as follows:

{{{
  function External_Lib ""External function in a library to generate signal""
    input Real t;
    output Real x;
  
    external ""C"" x = External_Lib(t) annotation(
      LibraryDirectory = ""modelica://LibraryName/External/Resources/Library"",
      Library = ""External_Lib"",
      IncludeDirectory = ""modelica://LibraryName/External/Resources/Include"",
      Include = ""#include \""External_Lib.h\"""");
  end External_Lib;
}}}

After trying many different things I found that it will work if I also put the ''.dll'' in the working directory of OMEdit. My guess is that the issue is either that found libraries are not properly added to the PATH, or that the DLL dependencies are not properly being included."	2021-09-13T11:58:21Z	nnelsonwood@…
adrpo	6161	[FMI] FMU with string parameters will crash if a memory pool collection happens	FMI		defect	2020-10-16T15:15:31Z	"
The memory pool frees the string parameters which it shouldn't do.
We need a way to alloc and save the string parameters so that we can free them properly, but only when the FMU is terminated.

"	2021-09-13T11:58:21Z	Adrian Pop
adrpo	6306	OpenModelica fails to build on MacOS	Build Environment	1.16.5	defect	2020-12-22T22:10:20Z	This ticket is to document issues on MacOS and try to keep it to build with help from other people.	2021-03-17T09:52:19Z	Adam Dershowitz
adrpo	3227	Make possible to change the csv file delimiter char and quote char (for input file and output file)	Run-time	Future	enhancement	2015-03-16T13:38:11Z	"Currently there seems to be 4 separate implementations for the csv files:
1. input file externalInput.csv uses space as a delimiter
2. input file for optimization uses space as a delimiter
3. writing output results to the csv file is done using delimiter "",""
4. reading results from the results file uses comma as delimiter (libcsv.c)

All these 4 different implementations should be based on libcsv.c which is the most configurable and one should be able to set the csv delimiter char and the quote char from command line.
"	2017-11-14T22:08:53Z	Adeel Asghar
adrpo	3523	Add valFirst and valLast to retrieve the first and last value of a variable at given time	Interactive Environment	Future	enhancement	2015-10-21T21:57:14Z	"When we have events we have several values in the result file.
We need an API like val but which returns the first value or the last value.
"	2015-10-22T12:39:42Z	Adrian Pop
adrpo	5751	Add a flag to dump the Flat Modelica to a file during model translation or checking	Interactive Environment		enhancement	2019-12-16T16:04:58Z	"At the moment one needs to call instantiateModel to get the flat Modelica output. A flag to dump the flat Modelica during the model checking or model build for simulation is desirable as the instantiation can take some time for large models so is not preferable to be repeated.

Previous ticket text
-----
I used to generate flat modelica outputs and dae dumps directly form OMEdit by the following compiler flags assigned as ""Additional Translation Flags"" in the Options Dialog:
{{{
-m +d=evalOutputOnly --postOptModules+=dumpDAE
}}}

Currently there are no additional files created.

Maybe I'm missing something, but at least it used work."	2021-09-13T11:58:21Z	Oliver Lenord
adrpo	4194	Severe bug in unit conversion	OMEdit		defect	2016-12-25T19:19:12Z	"Please consider the following simple example:

{{{
model Test
  Modelica.SIunits.AngularAcceleration a=10*exp(-10*time);
  Modelica.SIunits.AngularVelocity w(displayUnit=""1/min"", start=0, fixed=true);
  Modelica.SIunits.Angle phi(displayUnit=""deg"", start=0, fixed=true);
equation
  der(w)=a;
  der(phi)=w;
end Test;
}}}

The results are '''horribly''' wrong! 
If I remove the ""displayUnit"", the absolete value of the results is correct, but the sign of phi is the opposite of the obvious solution! I'd prefer OpenModelica for my lectures, but how should I use that for teaching? I'm '''really''' upset."	2021-09-13T11:58:21Z	ahaumer@…
adrpo	4356	netCDF reader works on Linux, not on Windows	*unknown*	Future	defect	2017-03-22T08:40:36Z	"More or less  a copy of this issue:
https://github.com/tbeu/netCDF-DataReader/issues/6
Not sure whether this has to be fixed on OM side or in the library, one of the two issues can be closed.

The netCDF library comes with three examples, all three work on Linux, but fail on Windows. 
Tested with Windows 10 64 bit, OM 1.11 32 bit release and OM 1.12  64 bit nightly.

For the Simple example the error is:

{{{
[3] 10:30:07 Fehler
Failed to write to file (not open)

[4] 10:30:07 Übersetzung Fehler
Template error: A template call failed (a call with 0 parameters: dladdr failed: not available on Windows). One possible reason could be that a template imported function call failed (which should not happen for functions called from within template code; templates preserve pure 'match'/non-failing semantics).
}}}


For the other two examples, the error is:
{{{
NMAKE : fatal error U1077: ""cl"": R�ckgabe-Code ""0x2""
Stop.
Compilation process failed. Exited with code 2.
}}}
The full log is pasted here: http://pastebin.com/3k3e7LMB

Side note: 
There seems to be some encoding wrong with the word R�ckgabe"	2019-03-31T19:37:12Z	m.thorade@…
adrpo	2838	ExternalMedia library, OMEdit crash with Test.fluidProp.WaterIF95.TestBasePropertiesDynamic	Frontend	Future	discussion	2014-09-24T15:41:33Z	"Hi,
I try to work with the ExternalMedia and CoolProp2Modelica-library but I have some trouble. For example, OMEdit crash when i try to simulate ExternalMedia.Test.fluidProp.WaterIF95.TestBasePropertiesDynamic.

Does these libraries really work on OpenModelica?

https://github.com/modelica/ExternalMedia
https://github.com/thermocycle/CoolProp2Modelica-library
"	2014-09-24T16:30:42Z	anonymous
adrpo	5118	OMC should generate debug information and PDB files for debugging with Visual Studio	Code Generation	Future	enhancement	2018-09-12T02:37:14Z	"I had several issues with co-simulation FMUs to be run under Vector CANoe.
Debugging them was not that easy, because I was not able to use Visual Studio, but had to resort to the {{{gdb}}} binary, which I found in the OpenModelica directory.
Even when working with this, I first had to modify the FMU's {{{Makefile}}} to generate debug information.
It would be helpful, if there would be a switch to generate debugging information and eventually generating mixed source and (dis)assembler listings.
The debug information should also be made available as PDB files.
[https://github.com/rainers/cv2pdb] might be helpful for this."	2018-09-12T13:55:40Z	tknodt@…
adrpo	2937	Bootstrapped compiler - check for cases that are exactly the same (on some flag)	MetaModelica	Future	enhancement	2014-10-29T01:36:27Z	Seems that (incredibly) we have cases in matchcontinue that are exactly the same (probably some copy paste error). We should probably detect these.	2014-10-30T16:34:07Z	Adrian Pop
johti17	5472	Allow to re-simulate a failed simulation	OMEdit		enhancement	2019-05-10T16:30:51Z	"If a simulation fails, it is not possible to change the solver parameters and re-simulate, one has to recompile the model from scratch every time.

It would be nice if one could re-simulate without re-compiling also in this case.

@adeas31, would this be easy to implement?"	2021-09-13T11:58:21Z	Francesco Casella
lochel	4222	Previously simulating models do not work any more	Initialization	Future	defect	2017-01-19T20:28:28Z	"We are currently developing the PhotoVoltaics Modelica library on GitHub. Please consider https://github.com/christiankral/PhotoVoltaics/tree/c79bd0d93cfc9b5b2eae2a6f2ea991d781419195

The model {{{PhotoVoltaics.Examples.SimpleModuleShadow}}} was compiling in a previous model of the OpenModelcia but it does not work any more in the actual Nightly Build 

OMEdit 1.12.0~dev-129-g0ee4ed0
Connected to OpenModelica 1.12.0~dev-242-g7d151a2
Linux Mint 18.1

The actual error message after compiling the model is
{{{
stdout | OMEditInfo | <p>/tmp/OpenModelica_christian/OMEdit/PhotoVoltaics.Examples.SimpleModuleShadow -port=46358 -logFormat=xmltcp -override=startTime=0,stopTime=1,stepSize=0.001,tolerance=1e-06,solver=dassl,outputFormat=mat,variableFilter=.* -r=PhotoVoltaics.Examples.SimpleModuleShadow_res.mat -jacobian=coloredNumerical -w -lv=LOG_STATS</p>
LOG_NLS | warning | <p>nonlinear system 1329 fails: at t=0</p>
LOG_NLS_V | warning | <p>proper start-values for some of the following iteration variables might help</p>
LOG_NLS_V | warning | <p>[1] Real module.cell[46].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[2] Real module.cell[45].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[3] Real module.cell[44].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[4] Real module.cell[43].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[5] Real module.cell[42].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[6] Real module.cell[41].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[7] Real module.cell[40].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[8] Real module.cell[39].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[9] Real module.cell[38].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[10] Real module.cell[37].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[11] Real module.cell[36].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[12] Real module.cell[35].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[13] Real module.cell[34].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[14] Real module.cell[33].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[15] Real module.diode[3].v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[16] Real module.cell[31].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[17] Real module.cell[30].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[18] Real module.cell[29].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[19] Real module.cell[28].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[20] Real module.cell[27].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[21] Real module.cell[26].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[22] Real module.cell[25].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[23] Real module.cell[24].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[24] Real module.cell[23].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[25] Real module.cell[22].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[26] Real module.cell[21].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[27] Real module.cell[20].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[28] Real module.cell[19].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[29] Real module.cell[18].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[30] Real module.cell[17].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[31] Real module.cell[16].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[32] Real module.cell[15].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[33] Real module.cell[14].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[34] Real module.cell[13].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[35] Real module.cell[12].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[36] Real module.cell[11].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[37] Real module.cell[10].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[38] Real module.cell[9].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[39] Real module.cell[8].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[40] Real module.cell[7].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[41] Real module.cell[6].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[42] Real module.cell[5].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[43] Real module.cell[4].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[44] Real module.cell[3].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[45] Real module.cell[2].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[46] Real module.cell[1].diode.v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[47] Real module.cell[48].v(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[48] Real module.diode[1].i(start=1e-11, nominal=1)</p>
LOG_NLS_V | warning | <p>[49] Real module.cell[1].diode.i(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[50] Real module.cell[37].diode.i(start=0, nominal=1)</p>
LOG_NLS_V | warning | <p>[51] Real module.cell[22].diode.i(start=0, nominal=1)</p>
assert | debug | <p>Solving non-linear system 1329 failed at time=0.<br>
For more information please use -lv LOG_NLS.</p>
assert | info | <p>simulation terminated by an assertion at initialization</p>
stdout | error | <p>Simulation process failed. Exited with code 255.</p>
}}}

I tried to propose more ""exact"" start values to the model, especially for {{{module.cell[#].diode.v(start=0, nominal=1)}}}, but this did not help either. "	2017-01-29T14:05:59Z	Christian Kral <dr.christian.kral@…>
lochel	3792	Variable override not working with restart	Run-time	Future	defect	2016-03-23T15:11:31Z	"I tried this on an old version and it used to work, but got broken at some point. I haven't tried it with -overrideFile, but it may have the same issue.

{{{
loadString(""
model restartOverrideBug
  parameter Real a = 1;
  Real x(start=1);
  Real y;
equation
  y = der(x);
  der(y) = a * x;
end restartOverrideBug;
"");
getErrorString();

// Standard run: returns a=1
simulate(restartOverrideBug, simflags=""-output a,y"");

// Restart without override: returns a=1
simulate(restartOverrideBug, simflags=""-r=tmp.mat -iit=1.0 -iif=restartOverrideBug_res.mat -iim=none -output a,y"");

// Restart with override gives the same answer: returns a=1 (incorrect)
simulate(restartOverrideBug, simflags=""-r=tmp.mat -iit=1.0 -iif=restartOverrideBug_res.mat -iim=none -output a,y -override a=2"");

// No restart, but with override: returns a=2 (correct override)
simulate(restartOverrideBug, simflags=""-r=tmp.mat -output a,y -override a=2"");

}}}"	2019-04-18T09:34:00Z	crupp@…
lochel	3105	Parameters and variables available in FMI	FMI		enhancement	2015-01-27T14:39:09Z	"Hello,

I would like to create a FMU of a model where parameters and variables don't appear in the text description, or at least where i could chose which ones will appear. I would also like to be able to chose wich parameters will appear in the result file. For instance, in Dymola, user has the possibility to chose to include all variables (or not) during FMU export.

It's critical to for us to hide some parameters when exchanging the models and to provide clear result files with only interesting variables."	2021-09-13T11:58:21Z	llachassagne@…
lochel	2820	initialization of discrete states	Backend	Future	defect	2014-09-12T15:24:26Z	"The initialization problem of the following model is not handled correctly:
{{{#!mo
model PreMatrix
  Integer x[2,2] = integer(time*fill(1,2,2));
  Integer y[2,2];
algorithm 
  for i in 1:size(x,1),j in 1:size(x,2) loop
    y[i,j] := pre(x[i,j]);
  end for;
end PreMatrix;

}}}

The initialization passes without any message, but there should be some warnings about missing fixed start attribute for discrete states:
{{{
Warning: Assuming fixed start value for the following 4 variables:
         x[2,2]:DISCRETE(fixed = false ) .PreMatrix, .Integer type: Integer 
         x[2,1]:DISCRETE(fixed = false ) .PreMatrix, .Integer type: Integer 
         x[1,2]:DISCRETE(fixed = false ) .PreMatrix, .Integer type: Integer 
         x[1,1]:DISCRETE(fixed = false ) .PreMatrix, .Integer type: Integer
}}}"	2014-09-12T15:24:32Z	Lennart Ochel
lochel	3230	Initialization handles when-clauses within algorithms wrong	Backend	Future	defect	2015-03-17T13:14:23Z	"See the following example:
{{{#!mo
model Test
  Real r[2];
algorithm
  r[1] := 2;
  when time > 0.5 then
    r := zeros(2);
  end when;
end Test;
}}}

Output:
{{{
Notification: The given system is mixed-determined.   [index > 0]
Notification: The given system is mixed-determined.   [index > 1]
Notification: The given system is mixed-determined.   [index > 2]
Notification: The given system is mixed-determined.   [index > 3]
Error: No system for the symbolic initialization was generated.
}}}"	2015-03-17T19:30:39Z	Lennart Ochel
lochel	3478	Performance issue for Chemical.Examples.AcidBase.AlbuminTitration	Backend	Future	defect	2015-09-26T08:51:47Z	https://test.openmodelica.org/libraries/Chemical_Experimental/BuildModelRecursive.html says that Chemical.Examples.AcidBase.AlbuminTitration takes 5400 seconds for the backend, which is incredibly much. The C-code also does not compile due to going beyond the pre-defined 256 level bracket nesting depth.	2015-10-13T08:31:32Z	Martin Sjölund
lochel	3572	Clarifications in the Compiler Flag Documentation	*unknown*		defect	2015-11-20T22:27:56Z	"The web page https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/omchelptext.html lists all compiler flags, and is automatically generated from omc help info.

The situation has improved dramatically once #2913 was addressed. However, there are four things that still need to be fixed.

1. The documentation gives {{{-d}}} and {{{--debug}}} as debug flags. However, in the page there are still three references to {{{+d}}}, which are very confusing because it is not clear whether that is a separate flag with different effects or not. Please always use the same notation {{{-d}}} everywhere. You may also mention in the documentation that the {{{+d}}} notation is deprecated but can still be found in existing code

2. The documentation https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/omchelptext.html#omcflag-debug-section explains how to set up the {{{-d}}} flag. However, there are no examples. I would suggest to add one or two, and at least one where multiple flags are set and some are reset, for better clarity.

3. The documentation of {{{--preOptModules}}}, {{{--initOptModules}}} and {{{--postOptModules}}} does not contain any example, so it is not clear how one can actually set the options that are listed there. I would suggest to add a couple of examples from which it is clear what the syntax is.

4. The new flags introduced in https://github.com/OpenModelica/OMCompiler/pull/282 are not documented at all, please add the documentation of {{{--forceRecommendedOrdering}}} and also add the documentation about {{{+=}}} and {{{-=}}} to {{{--preOptModules}}}, and {{{--postOptModules}}}. BTW, can this also be used with {{{--initOptModules}}}, or should a special section dedicated to flags used in {{{initOptModules}}} be also introduced in the documentation?"	2021-09-13T11:58:21Z	Francesco Casella
lochel	3810	New runtime flag -overrideSettings	Run-time	Future	defect	2016-03-31T19:32:15Z	"The two flags {{{–override}}} and {{{-overrideFile}}} are currently used to override settings and parameters/start values. This lead to conflicts if a variable/parameter has the same name as a setting option. Hence, these flags should only be used to override parameters/start values and a new flag, e.g. {{{–overrideSettings}}}, should be introduced to handle setting overrides.

This would break some existing OpenModelica scripts. How should we deal with backwards compatibility?
"	2016-04-06T08:59:32Z	Lennart Ochel
lochel	3886	Identically unit information for states and state derivatives	Backend	Future	defect	2016-05-02T20:40:08Z	It is really weird that states and their derivatives have the same unit information in OMEdit/OMPlot. Because time is always in seconds, it should be rather easy to determine state derivative unit information by dividing the state unit information by seconds.	2016-05-03T06:39:41Z	Lennart Ochel
lochel	4412	Error with Protected Elements	Backend		defect	2017-05-04T10:30:47Z	"In the following model

{{{
model ProtectedError
  Real var1;
protected
  Real var2 = 1;
equation
  var1 = var2;
end ProtectedError;
}}}

should be prevented by the keyword {{{protected}}} that the variable {{{var2}}} is displayed in the output of OMEdit.

However, both variables {{{var1}}} and {{{var2}}} are displayed.
"	2021-09-13T11:58:21Z	timo.lask@…
lochel	6336	Error when loading a simple Dymola FMU in an SSP model	OMSimulator		defect	2021-01-08T10:32:25Z	"I try to load a very light and simple Dymola FMU in an SSP model and I get these errors:
[4] 11:19:43 Ecriture Erreur
[loadSnapshot] loading snapshot failed

[5] 11:21:35 Ecriture Erreur
[initializeDependencyGraph_initialUnknowns] tankwin3264: erroneous dependencies detected in modelDescription.xml

[6] 11:21:35 Ecriture Erreur
[NewComponent] tankwin3264: Couldn't initialize dependency graph for initial unknowns.

[7] 11:21:35 Ecriture Erreur
[loadSnapshot] loading snapshot failed

When doing this a second time, a new error comes like this:
[8] 11:26:19 Ecriture Erreur
[addSubModel] ""tankYPipeDym.Root.tankwin3264"" already exists in the scope

Then I save the .ssp file and reopen it with an external browser. The FMU appears. There should not be dependencies troubles in Dymola FMUs.
The FMU is attached to this ticket."	2021-09-13T11:58:21Z	jean-philippe.tavella@…
lochel	4272	Simulation Process Failed	Run-time	Future	discussion	2017-02-14T20:45:36Z	"Hello, 

When simulating a model that passed the ""Check Model"" I received a ""Simulation Process Failed.  Exited with code 255."" error.  The model consists of a couple of continuous blocks (pulse train & filter) and then a sampler and digital filter using the Modelica_Synchronous library. 

So, I'm wondering if anyone has any idea what might have caused this? 
"	2017-02-14T21:11:59Z	rbackhus@…
lochel	6344	How to reopen the .csv file of a SSP model run?	OMSimulator		discussion	2021-01-18T07:32:30Z	"This thread of discussion is related to SSP runs (OMSimulator).
I'm not able to identify the .csv file containing all variables after the run of s SSP model.
I see the results in the viewer but where is the .csv file (name, location) for post-morten visualization?

Second question: is there somewhere some information related to a SSP model run (simulation time, time for FMU loading, etc.)?"	2021-09-13T11:58:21Z	jean-philippe.tavella@…
lochel	4037	Unification of command line options among multiple runtimes	Run-time		enhancement	2016-09-06T06:38:35Z	"The C runtime has a lot of command line options. The Cpp runtime has less command line options. Typically the names and the syntax are different. C options are long names that start with one dash and lower case character; Cpp options are either long names that start with two dashes or short (one character) that starts with one dash.

Since OpenModelica 1.9.4 the short Cpp options were changed to upper case letters. This way they are unique, because the C runtime uses no upper case letters.

This proposal is that the C runtime introduces short versions of the most important command line options as well. The short versions should be the same among all runtimes, while the long versions may be specific.

The proposed short options are:
|| -S arg || simulation start time ||
|| -E arg || simulation end time ||
|| -H arg || simulation step size ||
|| -G arg || number of intervals in equidistant grid ||
|| -I arg || integration solver method ||
|| -L arg || linear solver method ||
|| -N arg || nonlinear solver method ||
|| -C || continue if nonlinear solver does not converge ||
|| -T arg || integration solver tolerance ||
|| -V arg || log settings (all, events, ls, nls, states, warning, discard, error, fatal, pending -- cf. FMI 2 spec) ||
|| -O arg || output writing (all, step, none) for all steps and events or only steps or nothing ||
|| -P arg || simulation results output format (mat or csv) ||
|| -A arg || abort after arg seconds ||
|| -F arg || name of results file ||
|| -M arg || path to Modelica Standard Library ||
|| -R arg || path to simulation runtime libs ||
"	2021-09-13T11:58:21Z	Rüdiger Franke
lochel	4301	Feature to break the simulation when the steady state has been reached	Backend	Future	enhancement	2017-03-08T14:33:46Z	"Proposed here:
http://stackoverflow.com/questions/42673420/global-measure-to-test-when-steady-state-of-system-is-reached

The first point sounds like a good to have feature and doesn't seem that hard to implement, basically a terminate when all the ders are 0 (within an epsilon) for a number of steps.

For the second point we would need a global operator (that returns true when all ders are within an epsilon interval) that one can use in equations to enable / disable parts of the system."	2017-10-12T07:30:48Z	Adrian Pop
lochel	6354	Result file from OMSimulator contains all lines in double	OMSimulator		defect	2021-01-27T10:02:44Z	"Result file from OMSimulator contains all lines in double.
As an example I attach a .csv from a run of a SSP model and each line are doubled.
For optimization purpose, a single line should be anough, should'nt it?"	2021-09-13T11:58:21Z	jean-philippe.tavella@…
lochel	6356	After a SSP model run, the model is taggued as modified and should not	OMSimulator		defect	2021-01-27T16:12:28Z	"I run a SSP model, and after the successful execution, the model is taggued as modified in the browser.
This is not undertandable as nothing has been changed in the ssp file due to the run.

Refer to the enclosed video."	2021-09-13T11:58:21Z	jean-philippe.tavella@…
lochel	3138	Eliminate missleading warnings concerning [min, max]-asserts	Run-time	Future	enhancement	2015-02-06T10:22:13Z	"{{{
model testInit
  Real x(start=1.0, fixed=true);
  parameter Real b(min=0.5,fixed=false);
initial equation
  b = 2;
equation
  der(x) = b;
end testInit;
}}}

A warning is issued, although the parameter b is initialized in the
corresponding [min, max]-interval. Seems that the check is performed
too early! Similar warnings are issued throughout most of the
Modelica.Fluid.Examples. "	2017-11-14T22:08:53Z	Bernhard Bachmann
lochel	3555	Add option to save intermediate values at event iterations to result files?	Run-time	Future	enhancement	2015-11-11T23:29:47Z	"There already exists the option to save values at events. If one has event iterations it also would be interesting to see the values at intermediate events in an event iteration. E.g., the model below starts an event iteration at `time > 2` that results in the output
{{{
D x: 2
A x: 5
B x: 6
}}}
but in the (csv) result file at t=2 there are only two entries (x=2 and x=6).
{{{
#!modelica
model WhenPriority
 import S = Modelica.Utilities.Streams;
 Integer x(start=0,fixed=true);
equation
  when pre(x) == 2 then
    S.print(""A x: ""+String(x));
    x = pre(x) + 3;
  elsewhen pre(x) > 4 then
    S.print(""B x: ""+String(x));
    x = pre(x) + 1;
  elsewhen pre(x) > 3 then
    S.print(""C x: ""+String(x));
    x = pre(x) + 2;
  elsewhen time > 2 then
    S.print(""D x: ""+String(x));
    x = 2;
  end when;
end WhenPriority;
}}}
Of course that doesn't improve the insight to the model if plotting the variable with current OMPlot, but ""customized"" visualization solutions could profit from it and even try to visualize the event order. "	2015-11-12T09:08:04Z	Bernhard Thiele
mahge930	6098	(possibly) wrong type mapping for bool in record passed to external object	Code Generation	1.19.0	defect	2020-08-27T06:55:23Z	"Summary:
A boolean in a record, passed to a external object will result in a wrong C struct for the record. Boolean will be translated to ""signed char"" instead of ""int"". 
See https://modelica.org/documents/ModelicaSpec34.pdf#page=169

Given a record
  record MyRecord
    Real MyReal;
    Boolean MyBoolean;
  end MyRecord;

that will be passed to a function:
  function bmaxxAufladung ""Aufladung""
    output MyRecord mRecord;
    external ""C"" externalCFunction(mRecord);
  end bmaxxAufladung;

will result in ""MyModelName_functions.h""
typedef struct {
  modelica_real _MyReal;
  modelica_boolean _MyReal;
  } ModelName_MyRecord;

modelica_boolean is defined as ""typedef signed char modelica_boolean;"" in include/omc/c/openmodelica_types.h"	2021-09-13T19:50:28Z	Roman <openmodelica@…>
mahge930	6135	Support of Visual Studio in OMEdit on Windows	Run-time	2.0.0	enhancement	2020-09-23T08:54:41Z	"The VS compiler is extremely fast, because it is specifically optimized for the Windows/Intel combination. We should enable the possiblity of using it to compile simulation executables, to reduce the lag from the pressing of the simulation button to the start of the actual simulation.

I tentatively assign this to mahge930, since he's already been working with CMAKE and has some experience on this topic."	2020-09-24T07:22:45Z	Francesco Casella
mahge930	5814	for loop in algorithm section gets wrong values	Code Generation		defect	2020-01-31T13:35:24Z	"The following example is a simple demonstration of the bug.

{{{#!modelica
connector AgentInPort
    input Real Temp;
    input Real MassFlow;
end AgentInPort;

connector AgentOutPort
    output Real Temp;
    output Real MassFlow;
end AgentOutPort;


model MyAgentAcc
    parameter Integer nports;
    AgentInPort[nports] In;
    AgentOutPort Out;
    Real sumTemp, sumMassFlow;
    Real mf[nports], te[nports];
algorithm

    for i in 1:nports loop
        te[i] := In[i].Temp;
        sumTemp := sumTemp + In[i].Temp;
        mf[i] := In[i].MassFlow;
        sumMassFlow := sumMassFlow + In[i].MassFlow;
    end for;
equation
    Out.MassFlow = sumMassFlow;
    Out.Temp = sumTemp;
end MyAgentAcc;


model Tester
    MyAgentAcc TestAcc(nports=2);
    AgentOutPort VL1, VL2;
equation
    VL1.Temp = 14;
    VL1.MassFlow = 1;
    VL2.Temp = 28;
    VL2.MassFlow = 2;
    connect(VL1, TestAcc.In[1]);
    connect(VL2, TestAcc.In[2]);
end Tester;

}}}

The expected output is:
TestAcc.Out.MassFlow = 3
TestAcc.Out.Temp = 42
TestAcc.mf[1] = 1
TestAcc.mf[2] = 2
TestAcc.te[1] = 14
TestAcc.te[2] = 28

But the output is:
TestAcc.Out.MassFlow = 15
TestAcc.Out.Temp = 16
TestAcc.mf[1] = 1
TestAcc.mf[2] = 14
TestAcc.te[1] = 14
TestAcc.te[2] = 2

In the for loop i=1 is working as expected, but with i=2 we get wrong values! 
"	2021-09-13T11:58:21Z	r8KZbITHbJBHykci96Mg@…
mahge930	2756	OM reports an error in the C code it creates	Code Generation	Future	defect	2014-07-18T15:51:34Z	"If I run (using OM r20199)  ""gridTest21"" of the enclosed package ""AutoCreateBug"" I get the following message:

{{{
""C:\Programmi\OpenModelica1.9.1Nightly\\MinGW\bin\mingw32-make.exe"" -f AutoCreateBug.gridTest21.makefile
gcc   -falign-functions -msse2 -mfpmath=sse     -I""C:/Programmi/OpenModelica1.9.1Nightly//include/omc/c"" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o AutoCreateBug.gridTest21.o AutoCreateBug.gridTest21.c
AutoCreateBug.gridTest21.c: In function 'AutoCreateBug_gridTest21_eqFunction_27':
AutoCreateBug.gridTest21.c:458: error: expected expression before 'modelica_integer'
AutoCreateBug.gridTest21.c:458: error: expected ')' before '$Pi$rB$Pv'
AutoCreateBug.gridTest21.c:460: error: expected expression before 'modelica_integer'
AutoCreateBug.gridTest21.c:460: error: expected ')' before '$Pi$rB$Pv'
mingw32-make: *** [AutoCreateBug.gridTest21.o] Error 1
Compilation process exited with code 2
}}}

It seems that OM creates for this model a C file that is invalid.
"	2017-11-14T22:08:53Z	massimo ceraolo
mahge930	3164	Code generation error for tuple calls with array slices	Code Generation	Future	defect	2015-02-19T13:39:48Z	"Code generation fails with UNKNOWN_SUBSCRIPT for the following code:
{{{#!mo
function f
  input Real r;
  output Real y = r;
  output Real o[3] = {r,r,r};
end f;

function g
  input Real r;
  input Integer i;
  output Real o[4];
algorithm
  o[1] := f(r);
  (,o[i:i+2]) := f(r);
  (o[1],o[i:i+2]) := f(r);
end g;

model M
  Real r[4] = g(time,1);
end M;
}}}"	2015-02-20T18:58:52Z	Martin Sjölund
mahge930	3217	Wrong equation counting	Code Generation	Future	defect	2015-03-12T13:56:06Z	"OM counts just 2 equations for following model, but it should be 4.
{{{#!mo
model TestSimpleEqu
 record foo
   Real a;
   Real b;
 end foo;

 function foofoo2
   input foo x[2];
   output foo y[2];
 algorithm
   y[1].a := x[2].b;
   y[1].b := x[2].a;
   y[2].a := x[1].b;
   y[2].b := x[1].a;
 end foofoo2;
 
 foo g1[2];
equation
  //{foo(g1[1].a, g1[1].b), foo(g1[2].a, g1[2].b)} = foofoo2({foo(1.0, 2.0),foo(1.0, 2.0)});
  g1 = foofoo2({foo(1.0, 2.0),foo(1.0, 2.0)});
end TestSimpleEqu;
}}}"	2015-04-24T12:00:29Z	Lennart Ochel
mahge930	3299	Array of records containing array get compilation errors when updated	Code Generation	Future	defect	2015-04-29T09:22:36Z	"If putting arrays into records (to get some kind of abstraction), and then putting those records into an array, the generated code will fail to build due to unknown components in array.

{{{#!mo
loadString(""
package ArrayRecordArrayAssign
  record AR
    Integer a[2,3];
  end AR;
  
  function UpdateAR
    input AR ar;
    output AR result;
  algorithm
    result.a := 10*ar.a;
  end UpdateAR;

  function Test
    input Integer n;
    output AR result;
  protected
    AR a;
  algorithm
    for i in 1:n loop
      a := UpdateAR(a);
    end for;
    result := a;
  end Test;

  function Test2
    input Integer n;
    output AR[2] result;
  protected
    AR ara[2];
  algorithm
    for i in 1:n loop
      ara[1] := ara[2];
      ara[2] := UpdateAR(ara[2]);
    end for;
    result := ara;
  end Test2;
end ArrayRecordArrayAssign;
"");

// This works fine
x := ArrayRecordArrayAssign.Test(3);

// This gives compilation errors in generated code
y := ArrayRecordArrayAssign.Test2(3);
}}}

The assignment to a record works fine, but the assignment to a record within an array will fail.
{{{
Error: Error building simulator. Build log: gcc -I""/home/gustaf/src/openmodelica/build/include/omc/c""   -fPIC -O0 -falign-functions -march=native   -c -o ArrayRecordArrayAssign_Test2.o ArrayRecordArrayAssign_Test2.c
ArrayRecordArrayAssign_Test2.c: In function ‘omc_ArrayRecordArrayAssign_Test2’:
ArrayRecordArrayAssign_Test2.c:24:31: error: ‘ArrayRecordArrayAssign_AR_array’ has no member named ‘_a’
   alloc_integer_array(&_result._a, 2, 2, 3);alloc_generic_array(&_result, sizeof(ArrayRecordArrayAssign_AR), 1, (modelica_integer) 2);
                               ^
ArrayRecordArrayAssign_Test2.c:25:28: error: ‘ArrayRecordArrayAssign_AR_array’ has no member named ‘_a’
   alloc_integer_array(&_ara._a, 2, 2, 3);alloc_generic_array(&_ara, sizeof(ArrayRecordArrayAssign_AR), 1, (modelica_integer) 2);
.
.
.
}}}"	2015-04-29T09:53:17Z	Gustaf Thorslund
mahge930	3495	Issue with array indices in generated code	Code Generation	Future	defect	2015-10-07T08:34:37Z	"I get the following output by the simulation of a Petri net model:

{{{
C:/Users/TKLEIN~1/AppData/Local/Temp/OpenModelica/OMEdit/PNlib2.Examples.TestWkeit.exe -port=51187 -logFormat=xml -override=startTime=0,stopTime=5,stepSize=0.01,tolerance=1e-6,solver=dassl,outputFormat=mat,variableFilter=.* -r=PNlib2.Examples.TestWkeit_res.mat -dasslJacobian=coloredNumerical -w -lv=LOG_STATS

scalar s->index[0][0] == 2456744 incorrect, a->dim_size[0] == 2

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Simulation process failed. Exited with code 255.
}}}"	2017-11-14T22:08:53Z	timo.lask@…
mahge930	4336	Problem with code generation involving arrays of components containing arrays of Real variables	Code Generation		defect	2017-03-17T16:51:04Z	"Please consider the model {{{DEMOSimple.Test.Helium.TestCP}}} from the attached package. The model is accepted by the front-end, and it actually simulates successfully in Dymola.

However, when compiling the C code generating by OMC, the following error message pops up:
{{{
DEMOsimple.Test.Helium.TestCP_02nls.c: In function 'residualFunc53':
DEMOsimple.Test.Helium.TestCP_02nls.c:53:3: error: '$OLD_$PheliumCP$PchB$lB2$rB$PTm$lBtmp3$rB' undeclared (first use in this function)
   $OLD_$PheliumCP$PchB$lB2$rB$PTm$lBtmp3$rB = $PheliumCP$PchB$lB2$rB$PTm$lBtmp4$rB;
   ^
}}}
The involved variable is an element of a Real array inside an array of models.

Can you please have a look and fix it?"	2021-09-13T11:58:21Z	Francesco Casella
mahge930	5886	Use of undeclared identifier and undefined reference to *_array_get function	Code Generation		defect	2020-03-10T09:25:33Z	"The following model (Top in the Bug package) fails compilation.
For some reason, if {{{z}}} is {{{1}}}, omc produces C code including calls to a nonexistent function {{{Bug_Component_array_get}}}. The calls to this function also reference a parameter {{{components}}} which does not exist in the caller's context.

Setting {{{z}}} to anything greater than {{{1}}} produces working code, where the {{{Bug_Component_array_get}}} is not declared not used anywhere."	2021-09-13T11:58:21Z	federico.terraneo@…
mahge930	5906	compilation error for curved bend	Code Generation		defect	2020-04-06T07:15:50Z	"I have build a model containing two boundary condition and two static pipes with one curved bend in between. The model is built without any error (as the number of variables = number of the equations). But during compiling model throws error given below for cured bend in the model.

* I have attached error in the file and the model is given below.

I appreciate your help regarding solving my problem. 

{{{
model LBendtest1
replaceable package Medium = Modelica.Media.Water.StandardWater;

  inner Modelica.Fluid.System system(energyDynamics = Modelica.Fluid.Types.Dynamics.FixedInitial)  annotation(
    Placement(visible = true, transformation(origin = {-76, 82}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe pipe(redeclare package Medium = Medium, diameter = 0.02, length = 50, p_a_start = 100000, p_b_start = 100000)  annotation(
    Placement(visible = true, transformation(origin = {-42, -16}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Pipes.StaticPipe pipe1(redeclare package Medium = Medium, diameter = 0.02, length = 50, p_a_start = 100000, p_b_start = 100000)  annotation(
    Placement(visible = true, transformation(origin = {42, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sources.MassFlowSource_T boundary(redeclare package Medium = Medium, T = 293.15, m_flow = 0.1, nPorts = 1)  annotation(
    Placement(visible = true, transformation(origin = {-88, -16}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Fluid.Sources.Boundary_pT boundary1(redeclare package Medium = Medium, T = 293.15, nPorts = 1, p = 100000)  annotation(
    Placement(visible = true, transformation(origin = {86, 42}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));

 Modelica.Fluid.Fittings.Bends.CurvedBend curvedBend1(redeclare package Medium = Medium, geometry = Modelica.Fluid.Fittings.BaseClasses.Bends.CurvedBend.Geometry(d_hyd = 0.02, R_0 = 0.6)) annotation(
    Placement(visible = true, transformation(origin = {-2, 18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(boundary.ports[1], pipe.port_a) annotation(
    Line(points = {{-78, -16}, {-52, -16}, {-52, -16}, {-52, -16}}, color = {0, 127, 255}));
 connect(pipe1.port_b, boundary1.ports[1]) annotation(
    Line(points = {{52, 42}, {76, 42}}, color = {0, 127, 255}));
 connect(pipe.port_b, curvedBend1.port_a) annotation(
    Line(points = {{-32, -16}, {-32, 18}, {-12, 18}}, color = {0, 127, 255}));
 connect(curvedBend1.port_b, pipe1.port_a) annotation(
    Line(points = {{8, 18}, {17, 18}, {17, 42}, {32, 42}}, color = {0, 127, 255}));
  annotation(
    uses(Modelica(version = ""3.2.2"")));
end LBendtest1;
}}}"	2021-09-13T11:58:21Z	sachinjadhav2004@…
mahge930	6172	Issue with for loop index variables in conditional expression within algorithm	Code Generation		defect	2020-10-31T18:59:52Z	"Consider the following test model

{{{#!mo
class matrixAdd
  parameter Real[3,2] m={{1,2},{2,3},{4,5}};
  parameter Real[3,2] a={{2,2},{2,2},{2,2}};
  Real[3,2] b;
  Real max;
algorithm
  max:=0;
  for i in 1:3 loop
    for j in 1:2 loop
      b[i,j]:=m[i,j]+a[i,j];
      if (max<b[i,j]) then
          max:=b[i,j];
      end if;
    end for;
  end for;
end matrixAdd;
}}}
It causes the C compilation to break with
{{{#!c
matrixAdd_05evt.c: In function 'matrixAdd_function_ZeroCrossings':
matrixAdd_05evt.c:51:161: error: 'i' undeclared (first use in this function)
   tmp0 = LessZC(data->localData[0]->realVars[6] /* max variable */, (&data->localData[0]->realVars[0] /* b[1,1] variable */)[calc_base_index_dims_subs(2, 3, 2, i, ((modelica_integer) 1))], data->simulationInfo->storedRelations[0]);
                                                                                                                                                                 ^
matrixAdd_05evt.c:51:161: note: each undeclared identifier is reported only once for each function it appears in
matrixAdd_05evt.c: In function 'matrixAdd_function_updateRelations':
matrixAdd_05evt.c:78:163: error: 'i' undeclared (first use in this function)
     tmp2 = LessZC(data->localData[0]->realVars[6] /* max variable */, (&data->localData[0]->realVars[0] /* b[1,1] variable */)[calc_base_index_dims_subs(2, 3, 2, i, ((modelica_integer) 1))], data->simulationInfo->storedRelations[0]);
}}}"	2021-09-13T11:58:21Z	Francesco Casella
mahge930	6352	Function returning record with array fails	Code Generation		defect	2021-01-26T15:57:07Z	"Please consider this test model (also attached)
{{{
#!mo
model TestFunctionRecordArray
  constant Integer c = 3;

  record R
    Real v;
    Real x[c];
  end R;

  function f
    input Real v;
    output R rout;
  algorithm
    rout.v := v;
    rout.x := {0.3, 0.4, 0.3};
  end f;

  Real x;
  R r;
equation
  x = time;
  r = f(x);
end TestFunctionRecordArray;
}}}

The model fails during compilation with
{{{
TestFunctionRecordArray_functions.c:33:3: error: 
use of undeclared identifier '_rout'
  _rout._x = _OMC_LIT0;
  ^
}}}"	2021-09-13T11:58:21Z	Francesco Casella
mahge930	2736	Final Constraints for Optimization missing	Frontend	Future	discussion	2014-06-23T17:50:20Z	"Currently it's not possible to formulation final constraints in the optimization.
In the moment we support path constraints with Otimica Extension.

{{{
 Real a,b,c,d,e;
.....
constraint
 a*b + c/d < e
}}}

In Optimica it's possible to write for final constraints.
{{{
 Real a,b,c,d,e;
.....
constraint
 a(finaTime)*b(finalTime) + c(1.0)*d(finalTime) < b(1.0)
}}}
where finalTime is a real parameter 1.0, which is unknown sometimes. 
Note: stopTime not equal finalTime!

There some issues with different time point and the case if finalTime is unknown.

It seem like the currently way in Modelica is to set marker via (Custom) annotations
see e.g. http://www.ep.liu.se/ecp/096/018/ecp14096018.pdf

It's would be nice to have something like 
{{{
 Real a,b,c,d,e;
.....
constraint
 a*b + c/d < e annotation(finalConstraint = true)
}}}
The issue is that a*b + c/d < e is an equation and the annotation going missing in the BackEnd.
Alternative it should be possible to write
{{{
 Real a,b,c,d,e;
 Boolean f (finalConstraint = true);
.....
  equation
 f = a*b + c/d < e;
}}}

However custom annotations not really finished yet!
Therefore, I prefer for the first prototype similar implementation like constraint with 

{{{
 Real a,b,c,d,e;
.....
equation
....
final constraint
 a*b + c/d < e;
constraint
...
}}}



"	2017-11-14T22:08:53Z	Vitalij Ruge
olivleno	4415	package.order file is cleared after duplicate	OMEdit	Future	defect	2017-05-09T12:49:30Z	When using the duplicate class command in a package structure various package.order files are modfied and all content removed.	2017-11-14T22:22:54Z	Oliver Lenord <oliver.lenord@…>
perost	1562	F77 functions sometimes overwrite input arguments		Future	defect	2011-06-30T01:02:50Z	The model Modelica.Media.Incompressible.Examples.Glycol47 gets erroneous values for the poly_rho and poly_Cp constants, because the input array B to the Lapack function dgelsx is overwritten with the unassigned output argument x. This only happens when code generation is used to generate dgelsx.	2016-02-05T09:58:52Z	Per Östlund
perost	2785	Check of protected variables is not made when using replaceable/redeclare (again)	Frontend	Future	defect	2014-08-22T11:24:04Z	"The erroneous model `C2` in #1060 currently validates without any warning.

Repeating the code for ease of reference:
{{{
class C1
protected 
  replaceable parameter Real r=3.14;
end C1;

model C2
  replaceable parameter C1 x1(redeclare replaceable Integer r=3);
end C2;
}}}

(It is not obvious to me that the test ''flattening/modelica/redeclare/RedeclareVisibility2.mo'' is actually testing this properly; to me it looks like a flattening test with incorrect expected result, see #2784.)"	2014-09-01T12:14:39Z	Henrik Tidefelt
perost	2807	Disallow illegal prefixes in records	Frontend	Future	defect	2014-09-08T10:26:27Z	The prefixes input, output, inner, outer, stream and flow are not allowed inside records, but we do not check this currently.	2017-11-14T22:08:53Z	Per Östlund
perost	6213	Lookup in wrong scope when redeclaring function field in a function	New Instantiation		defect	2020-11-10T14:42:02Z	"Modelica_LinearSystems2.Controller.Examples.DiscretizationSeries has some code with the same error as:

{{{
record R
  Real x[:];
end R;
function f
  input Integer n;
  output R r(redeclare Real x[n]);
end f;
model M
  Real x[:] = f(3);
end M;
}}}"	2021-09-13T11:58:21Z	Martin Sjölund
ptaeuber	3069	Model needs very long simulation time with Cellier Tearing	Backend	Future	defect	2015-01-09T14:26:01Z	"The MSL32 model Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_YD takes over 100 minutes for simulation with Cellier Tearing because of way too much steps:

{{{
LOG_STATS         | info    | ### STATISTICS ###
|                 | |       | | timer
|                 | |       | | |    0.0322984s          reading init.xml
|                 | |       | | |     0.003696s          reading info.xml
|                 | |       | | |  0.000564877s          pre-initialization
|                 | |       | | |  0.000243327s [  0.0%] initialization
|                 | |       | | |   5.6153e-05s [  0.0%] steps
|                 | |       | | |    0.0105037s [  0.0%] creating output-file
|                 | |       | | |   0.00208371s [  0.0%] event-handling
|                 | |       | | |    0.0116676s [  0.0%] overhead
|                 | |       | | |      6586.88s [100.0%] simulation
|                 | |       | | |       6586.9s [100.0%] total
|                 | |       | | events
|                 | |       | | |     2 state events
|                 | |       | | |     0 time events
|                 | |       | | solver: DASSL
|                 | |       | | | 15358920 steps taken
|                 | |       | | | 30979010 calls of functionODE
|                 | |       | | | 23021038 evaluations of jacobian
|                 | |       | | |   217 error test failures
|                 | |       | | | 7673606 convergence test failures
}}}

With omcTearing:

{{{
LOG_STATS         | info    | ### STATISTICS ###
|                 | |       | | timer
|                 | |       | | |     0.031817s          reading init.xml
|                 | |       | | |   0.00360088s          reading info.xml
|                 | |       | | |  0.000564458s          pre-initialization
|                 | |       | | |  0.000215112s [  0.0%] initialization
|                 | |       | | |  0.000122851s [  0.0%] steps
|                 | |       | | |   0.00647291s [  0.7%] creating output-file
|                 | |       | | |   0.00109345s [  0.1%] event-handling
|                 | |       | | |   0.00640162s [  0.7%] overhead
|                 | |       | | |     0.849506s [ 98.3%] simulation
|                 | |       | | |     0.864376s [100.0%] total
|                 | |       | | events
|                 | |       | | |     2 state events
|                 | |       | | |     0 time events
|                 | |       | | solver: DASSL
|                 | |       | | |  8942 steps taken
|                 | |       | | | 12840 calls of functionODE
|                 | |       | | |   595 evaluations of jacobian
|                 | |       | | |   176 error test failures
|                 | |       | | |    83 convergence test failures
}}}"	2016-05-02T10:22:53Z	Patrick Täuber
sjoelund.se	1667	OMEdit does not have an interface to add custom directories for libraries	OMEdit		defect	2011-12-05T10:53:58Z	The default is given by getModelicaPath(), but a user should be able to set additional directories to search.	2021-09-13T11:58:21Z	Martin Sjölund
sjoelund.se	2852	Use the same C-code for identical functions	Code Generation	Future	defect	2014-09-30T07:53:29Z	"With calling of functions through components, identical functions are often generated. The C compiler will generate equivalent code for both, which is not desirable. We should figure out which functions are equivalent and replace calls to one with calls to another (or simply alias them via function pointer).
{{{#!mo
model N
  function f
    input Real r;
    output Real o := r;
  end f;
end N;

model M
  N n1,n2;
  Real r1 = n1.f(time), r2 = n2.f(time);
end M;
}}}
A Hash from DAE.Function to Absyn.Path should be sufficient (or String->Path and manually DAEDump the function to speed up any hash conflicts)."	2014-09-30T12:02:00Z	Martin Sjölund
sjoelund.se	3932	Dump DAE directly to stdout	Frontend	Future	defect	2016-05-26T14:08:21Z	We are able to dump Susan directly to file, so we should also be able to print flat Modelica directly to stdout and avoid using a ton of memory.	2018-02-13T06:36:33Z	Martin Sjölund
sjoelund.se	3998	OMC does not search in the correct places for libs under Linux	Backend	Future	defect	2016-07-15T07:27:09Z	"When working on [https://github.com/modelica/Modelica_DeviceDrivers/issues/114 Modelica_DeviceDrivers gh#114] I tried to run (on OpenModelica 1.11.0~dev-42-g1a73b84 under Ubuntu 16.04 64bit):

{{{#!mo
model Try4
  parameter String mem_name = ""COM4"";
  import Modelica_DeviceDrivers.Communication.SharedMemory;
  import Modelica_DeviceDrivers.Communication.SharedMemory_;
  import Modelica_DeviceDrivers.Packaging.SerialPackager;
  import Modelica_DeviceDrivers.Packaging.SerialPackager_;
protected
  SharedMemory sm = SharedMemory(mem_name, 16 * 1024);
  SerialPackager pkg = SerialPackager();
equation
  SharedMemory_.read(sm, pkg);
  annotation(uses(Modelica_DeviceDrivers(version=""1.4.4"")));
end Try4;
}}}

which compiles fine and even seems to execute but I got a translation warning:

{{{
[4] 09:08:37 Translation Warning
[Modelica_DeviceDrivers.Communication.SharedMemory: 17:3-25:17]: 
Could not find library pthread in either of:
  /usr/lib/x86_64-linux-gnu/omc/libpthread.a
  /usr/lib/x86_64-linux-gnu/omc/libpthread.so
  /usr/lib//libpthread.a
  /usr/lib//libpthread.so
 ...
}}}

the lib actually resides in:
{{{
$ locate libpthread.a
/usr/lib/x86_64-linux-gnu/libpthread.a
/usr/lib32/libpthread.a
/usr/libx32/libpthread.a
}}}

Same goes for `librt`.

So OMC should first search `/usr/lib/x86_64-linux-gnu/` then `/usr/lib/x86_64-linux-gnu/omc/`

"	2017-11-14T22:08:53Z	Dietmar Winkler
sjoelund.se	4605	rpath issues in runtime libraries on Ubuntu 17.10	Run-time		defect	2017-11-01T16:34:21Z	"Tests such as Crane_FMU2_CPP.mos currently fail on Ubuntu 17.10:
{{{
messages = ""Simulation execution failed for model: cranes_crane_me_FMU
Cannot open library: libomcgc.so.1: cannot open shared object file: No such file or directory
Simulation stopped with error in model factory: Failed loading System library!
/home/marsj/OpenModelica/testsuite/openmodelica/cppruntime/fmu/modelExchange/2.0/OMCppcranes_crane_me_FMU.so
}}}

If simCodeTarget is changed to C when compiling the model generated by importFMU, the code works fine. There is something preventing the C++ runtime from working correctly using this code."	2021-09-13T11:58:21Z	Martin Sjölund
sjoelund.se	4756	Clock partitioning should be skipped in systems without clock partitions	Backend	2.0.0	defect	2018-02-13T11:41:22Z	"Please check the execstat log of the [https://libraries.openmodelica.org/branches/master/ScalableTestSuite/files/ScalableTestSuite_ScalableTestSuite.Electrical.DistributionSystemDC.ScaledExperiments.DistributionSystemModelicaActiveLoads_N_80_M_80.err DistributionSystemModelicaActiveLoads_N_80_M_80] model. The {{{preOpt clockPartitioning}}} phase takes over 5 seconds and half a gigabye net memory to find out that the system has in fact no clocked partitions at all. 

I guess it shouldn't be hard to check from NF data that there are no instances of clocks in the model, so as to skip this phase entirely. Is there any reason not to do that?"	2018-02-16T13:07:33Z	Francesco Casella
sjoelund.se	3356	Improve Susan buffers	Code Generation	Future	enhancement	2015-06-16T05:27:38Z	"Susan has performance issues with large strings sometimes. I think adding a new language element and changing a few buffers could be a possible solution:
{{{
let &buf = buffer """"
to
let &buffer = fileBuffer ""someFile"" """"
}}}"	2016-04-14T08:04:50Z	Martin Sjölund
sjoelund.se	2456	Change the garbage collector	Code Generation	Future	defect	2013-10-31T15:45:41Z	"We need to change our data structures slightly in order to achieve a better performance and perhaps remove the need for boxptr-functions (marshalling, box/unbox).

(16:22:18) Martin Sjölund: I think in general the way we tag pointers is wrong
(16:22:32) Martin Sjölund: we should tag integers instead
(16:22:33) Adrian Pop: yes, probably tagging pointers is confusing the hell out of GC
(16:22:49) Adrian Pop: we could probably not tag anything anymore
(16:23:03) Martin Sjölund: maybe
(16:23:11) Adrian Pop: as that is needed only for the previous RML gc
(16:23:19) Adrian Pop: and have 32 bit integers
(16:23:49) Martin Sjölund: !!!
(16:23:55) Martin Sjölund: that would be great actually
(16:24:19) Martin Sjölund: would probably be a good performance boost, too
(16:24:23) Adrian Pop: the only problem i think it might be with debugging
(16:24:40) Martin Sjölund: only problem is knowing what is integer and what is not
(16:25:15) Martin Sjölund: or we box integers too
(16:28:56) Martin Sjölund: I mean... allocating data could be as simple as:
void*[2] = {header,double_word}; // 64-bit
void*[3] = {header,double_word1,double_word2}; // 32-bit
void*[2] = {header,word}; // 32-bit, 64-bit
char*[2] = {headerbyte1,headerbyte2,headerbyte3,headerbyte4,char1,...,charn}; // 32-bit, 64-bit
(16:30:28) Martin Sjölund: since GC is simplified, we need less bits for book-keeping too
(16:31:22) Martin Sjölund: could just be a bitset for int|double|enum|string|list|option|record = 3 bits to tag what data it is
(16:31:32) Adrian Pop: true
(16:32:21) Martin Sjölund: runtime could be quite simple with that
(16:32:47) Martin Sjölund: oh, I forgot array as type (of course)
(16:33:14) Martin Sjölund: but still 3 bits... and arrays could have 3 bits to say what is stored in it (same 8 types)
(16:33:51) Martin Sjölund: and same for lists
(16:34:09) Martin Sjölund: lists of unboxed data could be cool
(16:35:06) Martin Sjölund: and I guess 28-bit arrays still fine length
(16:37:03) Martin Sjölund: and uniontypes with only atomic members (many of them) could be allocated atomic too...
(16:37:10) Martin Sjölund: so many things that can be done... 
(16:37:20) Adrian Pop: :)
(16:37:35) Martin Sjölund: do you think we should move in this direction?
(16:38:09) Martin Sjölund: before we rely too much on the eclipse debugger :D
(16:38:26) Adrian Pop: i think we should not do that yet
(16:38:38) Adrian Pop: wait until we move to the bootstrapped compiler
(16:38:46) Adrian Pop: and then we can do changes"	2013-10-31T15:45:56Z	Martin Sjölund
wbraun	2648	wrong simulation results for pulsed voltage source	Run-time	Future	defect	2014-04-02T13:09:30Z	"Hi,
the model Modelica.Electrical.Spice3.Sources.V_pulse which occurs for example in the Spice3.Inverter model is simulated wrongly.

I put a tiny model in testsuite\simulation\modelica\functions_eval\pulseSource.mos

Actually, there should be 3 voltage pulses during 1e-11 sec simulationtime but the omc outputs a constant voltage of 0.

compareSimulationResults says ""Files Equal"" which is not true(maybe due to the very short pulses which occure in the tolerance of the event comparison)

In fact, the events for the pulses are triggered correctly somehow because values for the time step back(!) at the points where the pulses should be. So there happens at least something but the time should not move backwards and the voltage should rise to 5V.
"	2017-11-14T22:08:53Z	Volker Waurich
wbraun	2494	Derivative annotation handling broken	Code Generation	Future	defect	2013-11-29T13:21:21Z	"The following model does not compile with omc 1.9.0:

{{{
#!mo
within ;

model pendulumDer

  function equation1
    input Real x;
    input Real y;
    output Real r = x^2 + y^2 - 1;
    annotation(...);
  end equation1;

  function equation1_der1
    input Real x;
    input Real y;
    input Real dx;
    input Real dy;
    output Real r = 2*(x*dx + y*dy);
    annotation(...);
  end equation1_der1;

  function equation1_der2
    input Real x;
    input Real y;
    input Real dx;
    input Real dy;
    input Real ddx;
    input Real ddy;
    output Real r = 2*(x * ddx + dx^2 + y * ddy + dy^2);
  end equation1_der2;

  Real x(start=0.1),  y(start=-0.9, fixed=true),  vx,  vy,  F;

equation
  equation1(x, y) = 0;
  der(x) = vx;
  der(y) = vy;
  der(vx) = F*x;
  der(vy) = F*y - 9.81;

end pendulumDer;
}}}

output:

{{{
2 choeger@gimli ~/test % make -f pendulumDer.makefile                                                                                                                                                                                      :(
gcc   -falign-functions -march=native -mfpmath=sse -fPIC   -I""/usr/include/omc"" -I. -L""/home/choeger/test""  -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME  -c -o pendulumDer.o pendulumDer.c
pendulumDer.c: In function ‘eqFunction_2’:
pendulumDer.c:1228:3: error: too many arguments to function ‘omc_pendulumDer_equation1__der2’
pendulumDer_functions.c:74:37: note: declared here
pendulumDer.c:1237:3: error: too many arguments to function ‘omc_pendulumDer_equation1__der2’
pendulumDer_functions.c:74:37: note: declared here
make: *** [pendulumDer.o] Error 1
}}}"	2017-11-14T22:08:53Z	Christoph Höger
wbraun	3084	Under-determined linear system not solvable!	*unknown*	Future	defect	2015-01-18T12:16:14Z	"I noticed that the simulation of one the following examples in Modelica_Electrical_PowerConverters.Examples.ACDC.ThyristorBridge2mPulse

 1. ThyristorBridge2mPulse_R
 2. ThyristorBridge2mPulse_RL
 3. ThyristorBridge2mPulse_RLV
 4. ThyristorBridge2mPulse_RLV_Characteristic
 5. ThyristorBridge2mPulse_DC_Drive

causes multiple error messages of the kind:
{{{
under-determined linear system not solvable!
Matrix singular!
}}}

The first three examples at least simulate, even though these error messages occur. Example 4 takes too long to wait for the simulation to end. Example 5 does not finish simulation at all. 

I have to note, however, that these examples have been working in previous versions of OpenModelica. The actual bug report refers to 

 * Ubuntu 14.04 32 bit
 * OpenModelica r24056
 * Library Modelica_Electrical_PowerConverters located on https://svn.modelica.org/projects/Modelica_ElectricalSystems/Modelica_Electrical_PowerConverters/branches/Modelica_Electrical_PowerConverters%203.2.1; a modified version of this library is planned to be included in MSL 3.2.2

I am not sure whether this ticket is related with #2996 or not."	2015-03-09T13:22:33Z	Christian Kral <dr.christian.kral@…>
wbraun	3111	Convergence issues on nonlinear equations involving der()	Backend		defect	2015-01-29T11:39:00Z	"The nonlinear solver makes an excessively large number of iterations in some test cases where derivatives are involved as iteration variables (see, e.g., {{{ThermoPower.Examples.CISE.CISESim120501}}} or {{{ThermoPower.Test.DistributedParameterComponents.TestWaterFlow1DFEM_A}}}). In some cases involving external medium models, the solver actually fails to converge after a large number of iterations (over 1700).

A workaround for this problem has been implemented, which adds alias algebraic variables equal to the derivatives and uses them as iteration variables. It can be turned on with the debug flag {{{+d=addDerAliases}}}. Unfortunately, it breaks some models in the testsuite, but it is very beneficial in the above-mentioned test cases.

The problem still needs to be thoroughly assessed and solved in general.

One interesting question is: what is the correct scaling factor for der(x)? Obviously, the nominal value of x is not necessarily good, because the magnitude of dx/dt also depends on how fast the variable changes.

One possible option during variable step size integration is to use x_nominal/current_step_length. If the step length is short, it is likely that the variables are changing fast (possibly very fast if initial state values are given far from equilibrium), so it is reasonable to use a larger scaling factor. When the step length gets longer because the system is close to equilibrium, smaller values are employed. The main limitation of this approach is that it consider one time scale for the entire system, while an appropriate time scale should be selected for each single derivative. Also, it is not clear which value to use at initialization.

Another idea could be to employ an adaptive approach: if one can detect that the convergence is hampered by the effect of very small changes of some der() variables, their scaling factor could be reduced by a factor of 10 or something like that."	2021-09-13T11:58:21Z	Francesco Casella
wbraun	3118	Convergence issues on nonlinear equations not involving der()	Backend		defect	2015-01-29T23:09:00Z	"Please consider the {{{ThermoPower.Test.WaterComponents.TestValves}}}. It takes 11 seconds to simulate in OMC and 0.12 seconds in Dymola, with {{{+cseCall}}} active.

Turning on {{{LOG_NLS_V}}} reveals the following behaviour:
- at time 3.0000 the NLS requires 137 iterations to converge,
  which probably points to badly chosen scaling factors or tolerances
- the main solver takes a step to 3.008
- the NLS now tries for 147 iterations, then it keeps trying doing
  other things for a long time, then eventually gives up
- the main solver steps back to 3.00000004, NLS converges quickly
- the main solver steps to 3.008, this time the convergence is 
  very fast
- the simulation proceeds normally

Bottom line 1: at time 3.000 there are probably too many iterations.

Bottom line 2: the first attempt at time 3.008 should have probably been aborted earlier, retrying a shorter step."	2021-09-13T11:58:21Z	Francesco Casella
wbraun	4069	Unify init.xml files of C and Cpp runtime	Run-time	2.0.0	defect	2016-10-12T06:15:10Z	"The Variables Browser of OMEdit does not show entry fields for models that were translated with the Cpp runtime. It appears that the XML attribute `isValueChangeable` is missing in the init file.

The question arises, why the C runtime and the Cpp runtime generate different _init.xml files."	2016-10-19T16:47:51Z	Rüdiger Franke
wbraun	5208	IDA with dense numerical jacobian doesn't work well	Run-time		defect	2018-11-07T23:08:17Z	"Please run the following test model in OMEdit
{{{
model Thermal1D
  parameter Integer nx = 100;
  parameter Real g = 0.0314785;
  parameter Real c = 0.2707936;
  parameter Real Thi = 400;
  parameter Real Tlo = 0;
  Real T[nx];
initial equation
  for x in 1:100 loop
    T[x] = Tlo;
  end for;
equation
  c * der(T[1]) = g * (T[2] - T[1]) + 2 * g * (Thi - T[1]);
  c * der(T[nx]) = g * (T[nx - 1] - T[nx]) + 2 * g * (Tlo - T[nx]);
  for x in 2:nx-1 loop
    c * der(T[x]) = g * (T[x - 1] - T[x]) + g * (T[x + 1] - T[x]);
  end for;
  annotation(
    experiment(StartTime = 0, StopTime = 100000, Tolerance = 1e-06, Interval = 200),
    __OpenModelica_simulationFlags(s = ""ida""));
end Thermal1D;
}}}
The whole simulation, using the IDA solver, takes about 345 steps, computed in 0.04 s on my laptop.

Now, re-simulate the system choosing the (dense) {{{numerical}}} option of Jacobian computation. This time, the solver has lots of trouble increasing the step above a certain value, so it takes about 60000 steps and over 3 s to complete the simulation, and there are 29000 convergence test failures of the solver.

This is rather weird, because the system is 100% linear, so there shouldn't be any convergence problem of the BDF algorithm with arbitrarily large time steps, nor should the computation of the Jacobian be problematic by any means. The system is intrinsecally well-scaled, without the need of resorting to nominal attributes for improved scaling.

Coloured numeric jacobian works fine, so there is probably little reason to use the full 'dumb' numerical Jacobian, except for performance comparison reasons. In any case, if an option (numerical Jacobian in this case) is available, it should work correctly, otherwise I'd suggest to rather remove it."	2021-09-13T11:58:21Z	Francesco Casella
wbraun	3074	Insufficient information about assertion violations	Backend	2.0.0	defect	2015-01-13T09:52:07Z	"Apologies, the first issue of this ticket was wrong due to a typo in the code. I have modified it to reflect the actual status with the corrected code.

Please consider the attached test package, which demonstrates how OMC does not provide essential information to the user when handling asserts.

Simulate TestWarningConstant. You get the following warning message:
  Warning: Variable x is probably too big
Unfortunately, the message doesn't tell you an essential piece of information, i.e., ''where'' in the model M has this error been triggered. Is it m1, m2 or m3? It also doesn't tell ''when'' the warning has been triggered

One option is to enhance the error message like this:
  The following assertion has been violated at initialization:
  m3.x < 5
  Warning: Variable x is probably too big

Simulate TestWarningVariable. You get the same message as before
  Warning: Variable x is probably too big
you should get something like:
  The following assertion has been violated at time = 0.8333
  m3.x < 5
  Warning: Variable x is probably too big

Simulate TestWarningRecurring. You still get
  Warning: Variable x is probably too big
According to the non-normative text of the Modelica Specification, Section 8.3.7, you should get something like
  The following assertion has been violated at time = 0.1577
  m3.x < 5
  Warning: Variable x is probably too big

  The following assertion is no longer violated at time = 0.3465
  m3.x < 5
  Warning: Variable x is probably too big

Simulate TestErrorConstant. Here you should see:
  The following assertion has been violated at initialization:
  m2.x < 10
  Error: Variable x is too big

Simulate TestErrorVariable. The information here is quite confusing. What you should get here is
  The following assertion has been violated at time = 0.25
  m2.x < 5
  Warning: Variable x is probably too big

  The following assertion has been violated at time = 0.5
  m2.x < 10
  Error: Variable x is too big

Incidentally, I think the ""Process crashed"" final message in the last case is inappropriate. It seem to hint to the fact that some uncontrolled error has taken place, such as a memory access violation in some external function, which is definitely not the case here. Evertything here is under control and we have reported the reason for the simulation to stop. I would suggest to use ""Process aborted"", which seems more appropriate."	2017-08-31T20:51:00Z	Francesco Casella
wbraun	3926	Parameter calculation with numerical Jacobian leads to wrong results	Backend	Future	defect	2016-05-25T13:06:53Z	"The non-fixed parameters of the following model are calculated to 0 if calculateStrongComponentJacobians is skipped for initialization, which is obviously wrong:

{{{#!mo
model foo
  final parameter Real p1 = 1;
  final parameter Real p2 = 2;
  final parameter Real p3 = 3;
  final parameter Real p4 = 4;
  parameter Real q1 (fixed=false);
  parameter Real q2 (fixed=false);
initial equation
  -p1 = 3 * (p3 * q1 + p4 * q2);
  -p2 = 3 * (q1 * p4 - p3 * q2);
end foo;
}}}

A testing script is attached."	2017-11-14T22:08:53Z	Patrick Täuber
wbraun	4109	invalid xml file with logFormat is xml	Run-time		defect	2016-10-27T09:23:10Z	In the xml logFormat of the c runtime is the root element missing, what may leads to parsing error while usage.	2021-09-13T11:58:21Z	Willi Braun
wbraun	1932	Redesign When Equation Implementation in Backend	Backend	Future	enhancement	2012-11-09T12:13:10Z	"The current implementation for when equations does not consider the MSL3.2 requirements in an efficient way. 

cr = ...
(cr,cr,..) = ...


For example the following when

when cond then
 (cr1,cr2) = func(...)
elsewhen cond1 then
  cr1 = exp;
  cr2 = exp;
end when;

should be legal modelica but its not efficient supported.
"	2014-11-03T14:02:46Z	Jens Frenkel
