﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2856	expression simplify affects unit check module	Lennart Ochel	Per Östlund	"There is a new module for unit checking introduced in r22530. It can be enabled with the flag ""+newUnitChecking"". The module does basically two things:
1.	for all variables unspecified units get calculated if possible
2.	inconsistent equations get reported in a user friendly way

Unfortunately, there is an issue with expression simplify. Please, check the following equation:
{{{#!mo
  Real u(unit=""V"");
  Real i(unit=""A"");
equation
  u = 1 /*Ohm*/ *i;
}}}
This equation is consistent, because {{{1}}} could have unit {{{""Ohm""}}} but get changed by expressions simplify to the following.
{{{#!mo
  Real u(unit=""V"");
  Real i(unit=""A"");
equation
  u = i;
}}}
Now, this equation is inconsistent and get accidently reported by the unit check module.

This can probably be solved in different ways:
Option 1: If the flag {{{+newUnitChecking}}} is used expression simplify get disabled.
Option 2: This module get moved to the front end, before any expression get simplified.
Option 3: ???"	defect	closed	high	1.19.0	New Instantiation	trunk	fixed		Adrian Pop jhagemann@…
