User Portlet User Portlet

Discussions
This model achieves that:[code]model IntegratorWithReset   extends Modelica.Blocks.Continuous.Integrator;   Modelica.Blocks.Interfaces.BooleanInput reset; equation   when reset then    reinit (y,y_start); end when; end IntegratorWithReset;...
Look at the RollingWheel example in Modelica.Mechanics.MultiBody.Examples.Elementary package. Its probably a bit overkill for you since it is a full-fledged 3D mechanical model, but it show the principle of how to add constraints such as a wheel...
Very nice post! Another suggestion would be to add units to your declared variables. This can be done in two ways. Either you add it explicitly in your declaration e.g.Real V(unit="V",start=0);or you use one of the builtin types in...