Working With Curves

The Simulation Feature uses curves for the specification of

This chapter describes how the user-interactions required to create or modify these curves.

Bar Chart Curves

All relevant curves are represented as "bar charts": The curve has a constant value for an interval represented as a bar.

The interval is limited with points of the curve marked as circles in the curve diagrams. These circles are sensitive to user interaction as well as the X and Y segments connecting these points.

Modifying Curves

Obtaining Bar Values

Detailed values of a curve bar or its interval beginning and end can be obtained by positioning the cursor on the top segment or the left or right segment of the bar. A tooltip will display the corresponding value.

Changing a Bar Value

The value of a bar can be changed by positioning the cursor on the line representing the top of the bar and dragging (press mouse key and move the cursor) in Y direction.

If you want to change a bar value explicitly, you may right-click on the top segment of the bar and open the following dialog:

Changing Beginning and End of a Bar

You can change the beginning or the end of a bar by dragging limiting points or Y segments in X direction:

Creating New Curve Segments

To add a new segment in a curve, double-click on the position you intend the segment to start:

After having created a new point you can changed the value of the bar left to the point as well as the bar right to the point:

Joining Bars

Double-clicking on a point will delete this point and joint the value of the former left-hand bar with the value of the right-hand bar to a single bar.

Curve Options

The curves offer additional options in their context-menu. Right-click on the curve canvas and select one of these options:

Curve Options

Curve Options

Optimize Curve Option

This option can be used to reduce the amount of points in the curve. It smoothes the curve and removes unneeded points within a certain sensitivity area.

Calendar Curves

To specify availabilities or arrival rates, a calendar-based curve is provided. This curve can be modified as described above. Additionally,

can be added to or removed from the curve via right-clicking on the curve area to open the following pop-up menu.

Adding Holiday Schemes

If you intend to add your own holiday schemes (e.g. for nation-wide holidays of your country or corporate holidays of your company), you may provide extensions to the Eclipse extension point org.eclipse.stardust.ide.simulation.ui.curvesbusinesscalendar.

See the extension point documentation for details. Below is the XML definition of the holidays supplied per default (German nation-wide and local holidays).

The top level menu contains SaturdayHolidays (all Saturdays) and SundayHolidays (all Sundays), followed by a menu separator, and a submenu (category element) containing additional holidays for all German states.

 <extension
   id="StandardHolidays"
   name="Standard Holidays"
   point="org.eclipse.stardust.ide.simulation.ui.businesscalendar">
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.SaturdayHolidays"
   id="Saturday"
   name="Saturdays"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.SundayHolidays"
   id="Sunday"
   name="Sundays"/>
   <separator/>
   <category name="Germany">
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.NationwideHolidays"
   id="NationwideHolidays"
   name="Nationwide Holidays"/>
   <separator/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.BadenWuerttemberg"
   id="BadenWuerttemberg"
   name="Baden-Württemberg"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Bayern"
   id="Bayern"
   name="Bayern"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Berlin"
   id="Berlin"
   name="Berlin"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Brandenburg"
   id="Brandenburg"
   name="Brandenburg"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Bremen"
   id="Bremen"
   name="Bremen"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Hamburg"
   id="Hamburg"
   name="Hamburg"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Hessen"
   id="Hessen"
   name="Hessen"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.MecklenburgVorpommern"
   id="Mecklenburg-Vorpommern"
   name="Mecklenburg-Vorpommern"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Niedersachsen"
   id="Niedersachsen"
   name="Niedersachsen"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.NordrheinWestfalen"
   id="Nordrhein-Westfalen"
   name="Nordrhein-Westfalen"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.RheinlandPfalz"
   id="RheinlandPfalz"
   name="Rheinland-Pfalz"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Sachsen"
   id="Sachsen"
   name="Sachsen"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.SachsenAnhalt"
   id="Sachsen-Anhalt"
   name="Sachsen-Anhalt"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Saarland"
   id="Saarland"
   name="Saarland"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.SchleswigHolstein"
   id="Schleswig-Holstein"
   name="Schleswig-Holstein"/>
   <holidays
   class="org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.Thueringen"
   id="Thueringen"
   name="Thüringen"/>
   </category>
   </extension>


All holiday classes (e.g. org.eclipse.stardust.ide.simulation.ui.timeutils.standardholidays.SaturdayHolidays) should implement the following interface:

public interface HolidaysExtension
{
public boolean isHoliday (Calendar calendar); }

The isHoliday() method should return true, if the Calendar instance is set to a holiday.