Anton Haumer
  Technical Consulting & Electrical Engineering
  A-3423 St.Andrae-Woerdern, Austria
  email: a.haumer@haumer.at
  
  Dr.Christian Kral
  Österreichisches Forschungs- und Prüfzentrum Arsenal Ges.m.b.H.
  arsenal research
  Giefinggasse 2
  A-1210 Vienna, Austria
  
Copyright © 1998-2009, Modelica Association, Anton Haumer and arsenal research.
The Modelica package is free software; it can be redistributed and/or modified under the terms of the Modelica license, see the license conditions and the accompanying disclaimer here.
Extends from Modelica.Icons.Library (Icon for library).
| Name | Description | 
|---|---|
|  DoubleRamp | Ramp going up and down | 
 Modelica.Thermal.FluidHeatFlow.Examples.Utilities.DoubleRamp
Modelica.Thermal.FluidHeatFlow.Examples.Utilities.DoubleRamp
 
Extends from Modelica.Blocks.Interfaces.SO (Single Output continuous control block).
| Type | Name | Default | Description | 
|---|---|---|---|
| Real | offset | Offset of ramps | |
| Time | startTime | StartTime of 1st ramp [s] | |
| Time | interval | Interval between end of 1st and beginning of 2nd ramp [s] | |
| Ramp 1 | |||
| Real | height_1 | Height of ramp | |
| Time | duration_1 | Duration of ramp [s] | |
| Ramp 2 | |||
| Real | height_2 | Height of ramp | |
| Time | duration_2 | Duration of ramp [s] | |
| Type | Name | Description | 
|---|---|---|
| output RealOutput | y | Connector of Real output signal | 
model DoubleRamp "Ramp going up and down"
  extends Modelica.Blocks.Interfaces.SO;
  parameter Real offset(start=1) "Offset of ramps";
  parameter Modelica.SIunits.Time startTime(start=0.2) "StartTime of 1st ramp";
  parameter Modelica.SIunits.Time interval(start=0.2) 
    "Interval between end of 1st and beginning of 2nd ramp";
  parameter Real height_1(start=-1) "Height of ramp";
  parameter Modelica.SIunits.Time duration_1(min=Modelica.Constants.small, start=0.2) 
    "Duration of ramp";
  parameter Real height_2(start=1) "Height of ramp";
  parameter Modelica.SIunits.Time duration_2(min=Modelica.Constants.small, start=0.2) 
    "Duration of ramp";
  Modelica.Blocks.Math.Add add;
  Modelica.Blocks.Sources.Ramp ramp1(
    final height=height_1,
    final duration=duration_1,
    final startTime=startTime,
    final offset=offset);
  Modelica.Blocks.Sources.Ramp ramp2(
    final height=height_2,
    final duration=duration_2,
    final startTime=startTime + duration_1 + interval,
    final offset=0); 
equation 
  connect(ramp1.y, add.u1);
  connect(ramp2.y, add.u2);
  connect(add.y, y); 
end DoubleRamp;