title: DASSL solver in OpenModelica and Dymola
body: <p>I have a question regarding event handling in OpenModelica and Dymola. The following model limits the input signal to a certain threshold. This is needed to avoid a negative argument of log(). Therefor an event is created and the variable of the argument 'l' is changed as the event becomes true.</p>
  
  <p>As far as I understood, the DASSL solver should recognize the event and adapt its step size automatically to resolve the event correctly. The given number of intervals is only used to define the number of points saved to the output.</p>
  
  <p>Solving the model ‘CompleteModel’ with DASSL in Dymola for 10 seconds and with a number of intervals of 100 works fine and variable ‘l’ is limited to 0.05. Solving the model with only 10 intervals fails. Strangely enough DASSL in OpenModelica solves the model correct, independent from the given number of intervals.</p>
  
  <p>Can this behavior be expected? Are there big differences between the DASSL solvers of Dymola and OpenModelica? In my opinion, the correct solution of the model with DASSL should be independent from the number of (saved) intervals (as it is in OpenModelica).</p>
  
  <pre><code>package EventHandling
  
   model LimitSignal
    Real l;
    Real lmin(start = 1, fixed = true);
    Real x;
    Boolean Event(start = false, fixed = true);
    input Real InputSignal;
   algorithm 
    when InputSignal &lt;= 0.05 then
     Event := true;
     lmin := pre(InputSignal);
    end when;
   equation 
    l = if Event then lmin else InputSignal;
    x = log(l);
   end LimitSignal;
  
   model RampSignal
    parameter Real start = 1;
    parameter Real height = 2;
    parameter Real Time = 10;
    output Real y;
   equation 
    y = 1 - (height/Time)*time;
   end RampSignal;
  
   model CompleteModel
    LimitSignal EventHandling(InputSignal = Signal.y);
    RampSignal Signal;
   end CompleteModel;
  
  end EventHandling;
  </code></pre>