modelica / ModelicaStandardLibrary

Free (standard conforming) library to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.
https://doc.modelica.org
BSD 3-Clause "New" or "Revised" License
481 stars 169 forks source link

Blocks.Interfaces should declare parameters that assign vector length as nonnegative #2062

Open modelica-trac-importer opened 7 years ago

modelica-trac-importer commented 7 years ago

Reported by jriel on 14 Sep 2016 18:41 UTC The blocks in Modelica.Blocks.Interfaces should declare the minimum of the integer parameters that set the vector size (typically nin, nout, nu, etc), as 0. Some blocks have that declaration, but not all. For example, from partial block PartialRealMISO

parameter Integer nu(min=0) = 0 "Number of input connections" ... ;

but MIMO has

parameter Integer nin=1 "Number of inputs";

Migrated-From: https://trac.modelica.org/Modelica/ticket/2062

beutlich commented 7 years ago

@JoeRiel Some interfaces (e.g. MO) have min=1.