Skip to content

Commit

Permalink
Merge pull request #49 from audrey-jardin/main
Browse files Browse the repository at this point in the history
New unit tests to better define the difference from "time" and "time from" built-in operators
  • Loading branch information
lenaRB committed Dec 12, 2023
2 parents 97aa98a + 59b40c3 commit b888076
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
model EventElapsedPhysicalTime_no_ext is {
Boolean b is if 2.5 < time and time < 5 then true else false;
Event e is new Event b;
Real d_elapsed_physical_time is time from e; // Value should start at 0 and then increase from t=2.5s to be equal to time-2.5.
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
model EventElapsed_no_ext is {
Boolean b1 is if (2.0 <= time and time < 3.5) or (4.0 <= time and time < 5.5) then true else false;
Boolean b2 is if 2.5 < time and time < 5 then true else false;
Event e1 is new Event b1;
Event e2 is new Event b2;
Real d_elapsed is e2 - e1; // Value should start at 0 and then equal to 0.5 from t=2.5s.
};

0 comments on commit b888076

Please sign in to comment.