{5} Accepted, Active Tickets by Owner (Full Description) (110 matches)

List tickets accepted, group by ticket owner. This report demonstrates the use of full-row display.

Results (101 - 110 of 110)

1 2

Willi Braun (10 matches)

Ticket Summary Component Milestone Type Created
Description
#2494 Derivative annotation handling broken Code Generation Future defect 11 years ago

The following model does not compile with omc 1.9.0:

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

#3084 Under-determined linear system not solvable! *unknown* Future defect 10 years ago

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

I am not sure whether this ticket is related with #2996 or not.


#3111 Convergence issues on nonlinear equations involving der() Backend defect 10 years ago

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.


#3118 Convergence issues on nonlinear equations not involving der() Backend defect 10 years ago

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.


#4069 Unify init.xml files of C and Cpp runtime Run-time 2.0.0 defect 8 years ago

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.


#5208 IDA with dense numerical jacobian doesn't work well Run-time defect 6 years ago

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.


#3074 Insufficient information about assertion violations Backend 2.0.0 defect 10 years ago

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.


#3926 Parameter calculation with numerical Jacobian leads to wrong results Backend Future defect 9 years ago

The non-fixed parameters of the following model are calculated to 0 if calculateStrongComponentJacobians is skipped for initialization, which is obviously wrong:

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.


#4109 invalid xml file with logFormat is xml Run-time defect 8 years ago

In the xml logFormat of the c runtime is the root element missing, what may leads to parsing error while usage.


#1932 Redesign When Equation Implementation in Backend Backend Future enhancement 12 years ago

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.


1 2
Note: See TracReports for help on using and creating reports.