Opened 2 years ago

# Non-scalar overconstrained connections

Reported by: Owned by: Jonathan Kämpe Jonathan Kämpe major Modelica/FrontEnd trunk

### Description

The following test cases does not flatten correctly. We do not consider handle array expressions for overconstrained connect equations.

```    model Test4
type C1 = Real;

type C0
extends C1;

function equalityConstraint
input C0 c1;
input C0 c2;
output Real y = c1.x - c2.x;
algorithm
end equalityConstraint;
end C0;

connector C = C0;

C c1;
C c2;
equation
connect(c1,c2);
Connections.root(c1);
end Test4;

model Test5
type C1 = Real;

type C0
extends C1;

function equalityConstraint
input C0 c1;
input C0 c2;
output Real y = c1.x - c2.x;
algorithm
end equalityConstraint;
end C0;

connector C = C0;

C c1;
C c2;
equation
connect(c1,c2);
Connections.root(c1);
end Test5;

model Test6
type C1 = Real;

type C0
extends C1;

function equalityConstraint
input C0 c1;
input C0 c2;
output Real y = c1.x - c2.x;
algorithm
end equalityConstraint;
end C0;

connector C = C0;

C c1;
C c2;
equation
connect(c1,c2);
Connections.root(c1);
Connections.root(c1);
end Test6;

model Test75
model M
record C0
Real x;

function equalityConstraint
input C0 c1;
input C0 c2;
output Real y = c1.x - c2.x;
algorithm
end equalityConstraint;
end C0;

connector C = C0;

C c1;
C c2;
equation
Connections.root(c1);
end M;

M m1;
M m2;
equation
connect(m1.c1, m2.c2);

end Test75;

model Test8
record C0
Real x;

function equalityConstraint
input C0 c1;
input C0 c2;
output Real y = c1.x - c2.x;
algorithm
end equalityConstraint;
end C0;

connector C = C0;

C c1;
C c2;
equation
connect(c1,c2);
Connections.root(c1);
end Test8;

model Test9
record C0
Real x;

function equalityConstraint
input C0 c1;
input C0 c2;
output Real y = c1.x - c2.x;
algorithm
end equalityConstraint;
end C0;

connector C = C0;

C c1;
C c2;
equation
connect(c1,c2);
Connections.root(c1);
Connections.root(c1);
end Test9;
```

### Change History (0)

Note: See TracTickets for help on using tickets.