Opened 6 years ago

Closed 6 years ago

#5403 closed defect (fixed)

Incorrect treatment of clocked when equations in the new instantiation

Reported by: anonymous Owned by: Per Östlund
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description (last modified by Maksimov Doe)

In the new instantiation clocked when equations are treated as discrete ones. That leads to the next problems:

  • left-hand restrictions on discrete when equations applied to clocked ones
    model Example1
      Real x, y;
    equation
      when Clock(0.1) then
        x + y = 0;
        x - y = 0;
      end when;
    end Example1;
    
    //Invalid left-hand side of when-equation: x + y.
    
  • clocked elsewhen equations are allowed
    model Example2
      Real x, y;
    equation
      when Clock(0.1) then
        x = 0;
        y = 1;
      elsewhen Clock(0.2) then
        x = 2;
        y = 3;
      end when;
    end Example2;
    
    //No errors or warnings
    

Change History (3)

comment:1 by Maksimov Doe, 6 years ago

Description: modified (diff)

comment:2 by Francesco Casella, 6 years ago

Milestone: Future2.0.0

comment:3 by Per Östlund, 6 years ago

Resolution: fixed
Status: newclosed

Fixed in 851e5696, with some additional fixes in f3c20641 and ff06f061.

Note: See TracTickets for help on using tickets.