Opened 11 years ago

Closed 11 years ago

#2139 closed defect (fixed)

Error in counting equations?

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

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 ceraolo 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by ceraolo

comment:1 Changed 11 years ago by lochel

  • Cc lochel added

comment:2 Changed 11 years ago by adrpo

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 Changed 11 years ago by adrpo

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r15843.

Note: See TracTickets for help on using tickets.