Opened 12 years ago

Closed 11 years ago

#1994 closed defect (fixed)

wrong over determined initial system

Reported by: cschubert Owned by: lochel
Priority: high Milestone: 1.9.0
Component: Backend Version: trunk
Keywords: initial system wrong over-determined Cc: jfrenkel

Description

Hi,

I was looking at the the model

Modelica.Blocks.Examples.RealNetwork1

and noted that omc thinks that the initial system is over-determined (8 equations and 7 variables) and there are more of them.
Dumping the initial system, one notes that one equation has been duplicated:

7 (1): booleanPulse1.Twidth = booleanPulse1.period * booleanPulse1.width / 100.0
8 (1): booleanPulse2.Twidth = booleanPulse2.period * booleanPulse2.width / 100.0

I assume that is something that can easily be fixed.

Change History (5)

comment:1 Changed 12 years ago by cschubert

Uuups, I see it has been to late for me...
I oversaw that it is two different variables ...
Nevertheless, the system is over-determined which it should not be.

comment:2 Changed 12 years ago by cschubert

Here is the full system

Variables (7)
========================================
1:  booleanPulse1.Twidth:VARIABLE(protected = true )  = booleanPulse1.period * booleanPulse1.width / 100.0  "width of one pulse".Modelica.Blocks.Examples.RealNetwork1, .Modelica.Blocks.Sources.BooleanPulse, .Modelica.SIunits.Time type: Real 
2:  booleanPulse2.Twidth:VARIABLE(protected = true )  = booleanPulse2.period * booleanPulse2.width / 100.0  "width of one pulse".Modelica.Blocks.Examples.RealNetwork1, .Modelica.Blocks.Sources.BooleanPulse, .Modelica.SIunits.Time type: Real 
3:  booleanPulse2.pulsStart:DISCRETE(start = booleanPulse2.startTime fixed = false protected = true )  "Start time of pulse".Modelica.Blocks.Examples.RealNetwork1, .Modelica.Blocks.Sources.BooleanPulse, .Modelica.SIunits.Time type: Real 
4: input  multiSwitch.u[2]:DISCRETE(fixed = false )  "Set y = expr[i], if u[i] = true".Modelica.Blocks.Examples.RealNetwork1, .Modelica.Blocks.Math.MultiSwitch, .Modelica.Blocks.Interfaces.BooleanVectorInput type: Boolean [2]
5: input  multiSwitch.u[1]:DISCRETE(fixed = false )  "Set y = expr[i], if u[i] = true".Modelica.Blocks.Examples.RealNetwork1, .Modelica.Blocks.Math.MultiSwitch, .Modelica.Blocks.Interfaces.BooleanVectorInput type: Boolean [2]
6:  multiSwitch.firstActiveIndex:DISCRETE(fixed = false protected = true ) .Modelica.Blocks.Examples.RealNetwork1, .Modelica.Blocks.Math.MultiSwitch, .Integer type: Integer 
7:  booleanPulse1.pulsStart:DISCRETE(start = booleanPulse1.startTime fixed = false protected = true )  "Start time of pulse".Modelica.Blocks.Examples.RealNetwork1, .Modelica.Blocks.Sources.BooleanPulse, .Modelica.SIunits.Time type: Real 

and

Equations (8, 8)
========================================
1 (1): multiSwitch.u[2] = time >= booleanPulse2.pulsStart and time < booleanPulse2.pulsStart + booleanPulse2.Twidth
2 (1): booleanPulse2.pulsStart = $PRE.booleanPulse2.pulsStart
3 (1): showValue3.showNumber = if multiSwitch.firstActiveIndex == 0 then multiSwitch.y_default else {4.0, 6.0}[multiSwitch.firstActiveIndex]
4 (1): multiSwitch.firstActiveIndex = Modelica.Math.BooleanVectors.firstTrueIndex({multiSwitch.u[1], multiSwitch.u[2]})
5 (1): multiSwitch.u[1] = time >= booleanPulse1.pulsStart and time < booleanPulse1.pulsStart + booleanPulse1.Twidth
6 (1): booleanPulse1.pulsStart = $PRE.booleanPulse1.pulsStart
7 (1): booleanPulse1.Twidth = booleanPulse1.period * booleanPulse1.width / 100.0
8 (1): booleanPulse2.Twidth = booleanPulse2.period * booleanPulse2.width / 100.0

I wonder why showValue3.showNumber does not appear in the variables section?
Note, that quite some alias replacement has taken place.

comment:3 Changed 12 years ago by jfrenkel

add ticet at modelica.org #941 because the system is realy overdeterminet for multiswitch.y.

comment:4 Changed 12 years ago by lochel

  • Status changed from new to accepted

comment:5 Changed 11 years ago by lochel

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.