Opened 5 years ago

Closed 4 years ago

#5564 closed defect (fixed)

This model should not simulate

Reported by: Francesco Casella Owned by: Martin Sjölund
Priority: blocker Milestone: 2.0.0
Component: Interactive Environment Version:
Keywords: Cc:

Description

Try simulating this model with the latest nightly build of OMEdit

model M
  parameter Real p;
equation 
 p =10;
end M;

The following errors are reported:

[1] 19:16:34 Symbolic Error
Too many equations, over-determined system. The model has 1 equation(s) and 0 variable(s).

[2] 19:16:34 Translation Error
[M: 4:2-4:7]: Internal error p = 10.0 has size size 1 but 0 variables ()

[3] 19:16:34 Translation Warning
[M: 2:3-2:19]: Parameter p has no value, and is fixed during initialization (fixed=true), using available start value (start=0.0) as default value.

but then C code is generated and a simulation is run(!), with result p = 0.

This makes no sense, the compilation should be aborted after reporting error number 1.

Attachments (1)

M.mos (131 bytes ) - added by Adeel Asghar 5 years ago.

Download all attachments as: .zip

Change History (5)

by Adeel Asghar, 5 years ago

Attachment: M.mos added

comment:1 by Adeel Asghar, 5 years ago

Component: OMEditInteractive Environment
Owner: changed from Adeel Asghar to somebody

That is because translateModel returns true and just reports the error messages. It should return false in this case.

Last edited 5 years ago by Adeel Asghar (previous) (diff)

comment:2 by Francesco Casella, 5 years ago

Owner: changed from somebody to Adrian Pop
Status: newassigned

comment:3 by Martin Sjölund, 4 years ago

Owner: changed from Adrian Pop to Martin Sjölund

comment:4 by Martin Sjölund, 4 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.