Opened 12 years ago

Closed 12 years ago

#2139 closed defect (fixed)

Error in counting equations?

Reported by: massimo ceraolo Owned by: probably noone
Priority: high Milestone: 1.9.0
Component: Backend Version: trunk
Keywords: Cc: Lennart Ochel

Description

In enclose a simple model.
When checked inside OMEdit it reports 46 equations and 45 variables. Instead I expected 45 equations and 45 variables.

This error has consequences in larger models: I have models that cannot be run because the program issues the following message:

Symbolic  16:49:48 0:0-0:0  Too many equations, overdetermined system. 
The model has 546 equation(s) and 539 variable(s)

Attachments (1)

test.mo (2.7 KB ) - added by massimo ceraolo 12 years ago.

Download all attachments as: .zip

Change History (4)

by massimo ceraolo, 12 years ago

Attachment: test.mo added

comment:1 by Lennart Ochel, 12 years ago

Cc: Lennart Ochel added

comment:2 by Adrian Pop, 12 years ago

Hi,

This is just a bad counting of equations.
It counts also this equation:

if false then
  ground1.pin.reference.gamma = 0.0;
end if;

which comes from overconstraint connection graph handling:

if (Connections.isRoot(ground1.pin.reference)) then 
  ground1.pin.reference.gamma = 0;
end if;

The simulation works fine:

record SimulationResult
    resultFile = "testquasi_res.mat",
    simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 0.000001, method = 'dassl', fileNamePrefix = 'testquasi', storeInTemp = false, noClean = false, options = '', outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = '', simflags = ''",
    messages = "",
    timeFrontend = 0.7408562558104173,
    timeBackend = 0.04099079764638402,
    timeSimCode = 0.012239649998748896,
    timeTemplates = 0.03620926933581758,
    timeCompile = 1.8028236462569844,
    timeSimulation = 0.11176134318561962,
    timeTotal = 2.7450318646651564
end SimulationResult;

I'll see if I can remove the obvious if false
equation from counting or from the flat Modelica.

Cheers,
Adrian Pop/

comment:3 by Adrian Pop, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in r15843.

Note: See TracTickets for help on using tickets.