Skip to content
Snippets Groups Projects
Commit 59e8040a authored by Giammarco, Kristin M's avatar Giammarco, Kristin M
Browse files

Merge branch 'main' into 'main'

Uploaded Basic Patterns SysML v2 file

See merge request !1
parents 190f5e08 a6520f36
No related branches found
No related tags found
1 merge request!1Uploaded Basic Patterns SysML v2 file
package BasicPatterns{
/*This package contains all 9 basic logic behavior for activity diagrams based on the Basic Patterns package on Monterey Phoenix Firebird tool.
Link to tool: https://firebird.nps.edu/
Author: SysML v2 Pioneers:
Matthew LaPorte
Samuel Cecchetti
Kieran Conley
Tam Dinh
Valeriia Laryoshyna
Rudy Pascua
Version: 1.0
Date authored: 4/1/2024*/
package 'P.00: Inclusion' {
/*This package demonstrates the ability for SysML v2 to handle inclusion or nesting with actions. */
action 'Start Car' {
action 'Get in vehicle' {
//'Get in vehicle' is an action within the action 'Start Car'
action 'Open Door';
//'Open Door' is an action within the action 'Get in vehicle'
}
}
}
package 'P.01: Ordered Event Sequence' {
/*This package demonstrates the ability for SysML v2 to handle ordered events (one event after another)*/
action 'A' {
first start; //begin Action A
then action 'B'; //action B happens after start
then action 'C'; //action C happens after action B
then done; //finish action A
}
}
package 'P.02: Alternative' {
/*This package demonstrates the ability for SysML v2 to handle conditional behavior.*/
private import ScalarValues::Boolean;
attribute guard1: Boolean; //the guard which is evaluated during the decision node
action 'A' {
first start;
then decide 'decideGuard1';
if guard1==true then 'B'; //if the guard is true we do action B
if guard1==false then 'C'; //if the guard is false we do action C
action 'B';
then merge 'merge1'; //after Action B, merge
then done; //then done
action 'C';
then 'merge1'; //after Action C, merge
}
}
package 'P.03: Optional' {
/*This package demonstrates the ability for SysML v2 to handle optional behavior.*/
private import ScalarValues::Boolean;
attribute guard1: Boolean; //the guard which is evaluated during the decision node
action 'A' { //action that contains optional behavior
first start;
then decide 'decideGuard1';
if guard1==true then 'B'; //this is the optional behavior
if guard1==false then done;
action 'B';
then done;
}
}
package 'P.04: Zero_or_more_iteration' {
/*This package demonstrates the ability for SysML v2 to handle conditional behavior.*/
private import ScalarValues::Boolean;
attribute performActionB: Boolean; //the guard which is evaluated during the decision node
action 'A' {
first start;
then merge merge1; //merge allows "or more" iteration""
then decide 'performB'; //decide 0 or more iteration here based on performActionB
if performActionB==true then 'B';
if performActionB==false then done;
action 'B';
then merge1; //go back before decision node and evaluate performB again
}
}
package 'P.05: One_or_more_iteration' {
/*This package demonstrates the ability for SysML v2 to handle conditional behavior where the action is performed at least once time.*/
private import ScalarValues::Boolean;
attribute performActionBAgain: Boolean; //the guard which is evaluated during the decision node
action 'A' {
first start;
then action 'B'; //this is the "one" iteration
then decide'iterateActionB';
if performActionBAgain==true then 'B'; //here this is where B would be iterated on for the second or nth time
if performActionBAgain==false then done;
}
}
package 'P.06: Unordered Set of Events' {
/*This package demonstrates the ability for SysML v2 to handle unordered events.
* Events can happen at different times and can end at different times.*/
action 'A' {
first start;
then fork 'fork';
then 'B';
then 'C';
action 'B';
then join 'join';
then done;
action 'C';
then 'join'; //both C and B must finish and join before continuing
}
}
package 'P:07: Zero or more set iterations' {
/*This package demonstrates the ability for SysML v2 to have zero or more sets of an action occuring at the same time*/
action 'A' {
first start;
then fork 'fork'; //"[0..*]" indicates 0 or more sets of the action B
then action 'B'[0..*]; //propose diagram element to define multiplicity
then join;
then done;
}
}
package 'P08_one_or_more_set_iterationsActions' {
/*This package demonstrates the ability for SysML v2 to have one or multiple sets of an action occuring at the same time*/
action 'A' {
first start;
then fork;
then action 'B'[1..*]; //"[1..*]" indicates 1 or more sets of the action B //proposed diagram element to define multiplicity
then join;
then done;
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment