Backup diff of First Example vs current(No. 2)


  • The added line is THIS COLOR.
  • The deleted line is THIS COLOR.
#author("2017-03-17T12:27:10+09:00","default:Uedalab","Uedalab")
The following program (also called a '''model''') describes a sawtooth function.
#author("2020-04-14T17:40:34+09:00","default:Uedalab","Uedalab")
The following program (also called a '''model''') describes a sawtooth function
with the following shape:

 INIT     <=> f=0.
 INCREASE <=> [](f'=3).
 DROP     <=> [](f- = 10 => f = 0).
 
&ref(./sawtooth.png,50%);

 INIT     <=> 0 <= f < 2.
 INCREASE <=> [](f' = 1).
 DROP     <=> [](f- = 2 => f = 0).
 INIT, INCREASE << DROP.

The first three lines (often called '''rules''' or '''named constraints''') define three constraints, and the final line combines those rules.

This program defines the trajectory of a variable f (which is actually a function of time) in the following way.
This program defines the trajectory of a variable f (whose value is a function of nonnegative time) in the following way.
- The rule INIT defines the value of f at time 0, which takes an uncertain value between 0 and 2.
- The rule INCREASE states that the slope of f is always 1.
- The rule DROP states that the value of f is reset to 0 whenever the value reaches 2. (The minus sign after f means the left limit of f).
- The final line states that
-- INIT is enabled,
-- DROP is enabled, and
-- INCREASE is enabled whenever it is consistent with DROP (that is, the priority of DROP is higher than INCREASE).

The rule INIT defines the initial value of f.

The rule INCREASE states that the slope of f if always 3.

The rule DROP states that the value of f is reset to 0 whenever the value reaches 10
(where the minus sign after f means the left limit of f).

The final line states that
- INIT is enabled,
- INCREASE is enabled whenever it is consistent with DROP, and
- DROP is enabled.

That is, the priority of DROP is higher than INCREASE.

#br
More examples can be found in the [[Examples]] page.