description <http://ua.be/drivetrain/description/pt#> as pt {
	uses <http://ua.be/sdo2l/vocabulary/processtraces#> as traces
	uses <http://ua.be/sdo2l/vocabulary/base#> as base
	extends <http://ua.be/drivetrain/description/pm#> as wf
	extends <http://ua.be/drivetrain/description/artifacts/artifacts#> as art

	// Traces

	ci drivetrain-trace : traces:Trace [
		base:hasIdentifier "dt-t01"
		base:hasCanonicalName "Drivetrain - Trace 01"
		traces:enacts wf:pm-drivetrain
		traces:startedBy staev-setup-profile
	]

	// Artifacts and relationships to workflow artifacts

	ri limitation-relatesTo : traces:RelatesTo [
		from art:drivetrain-limitation
		to wf:limitations-usage
	]
	
	ri limitation-v1-relatesTo : traces:RelatesTo [
		from art:drivetrain-limitation-v1
		to wf:limitations-usage
	]

	ri requirements-relatesTo : traces:RelatesTo [
		from art:test-requirements
		to wf:requirements-usage
	]
	
	ri requirements-v1-relatesTo : traces:RelatesTo [
		from art:test-requirements-v1
		to wf:requirements-usage
	]
	
	ri torqueprofile-relatesTo : traces:RelatesTo [
		from art:torque-profile
		to wf:torque-profile-usage
	]
	
	ri torqueprofile-v1-relatesTo : traces:RelatesTo [
		from art:torque-profile-v1
		to wf:torque-profile-usage
	]
	
	ri control-parameter-generator-relatesTo : traces:RelatesTo [
		from art:control-parameter-generator
		to wf:script-usage
	]
	
	ri control-parameters-relatesTo : traces:RelatesTo [
		from art:control-parameters
		to wf:model-usage
	]

	ri c-code-relatesTo : traces:RelatesTo [
		from art:c-code-to-be-run-on-rtt
		to wf:code-usage
	]
	
	ri drivetrain-sensor-data-relatesTo : traces:RelatesTo [
		from art:drivetrain-sensor-data
		to wf:tabular1-usage
	]
	
	ri drivetrain-sensor-data-v1-relatesTo : traces:RelatesTo [
		from art:drivetrain-sensor-data-v1
		to wf:tabular1-usage
	]
	
	ri drivetrain-coupling-sensor-data-relatesTo : traces:RelatesTo [
		from art:coupling-sensor-data
		to wf:tabular2-usage
	]
	
	ri drivetrain-coupling-sensor-data-v1-relatesTo : traces:RelatesTo [
		from art:coupling-sensor-data-v1
		to wf:tabular2-usage
	]
	

	// Events

	// first iteration
	
	ci staev-setup-profile : traces:StartingEvent [
		traces:receives art:test-requirements
		traces:receives art:drivetrain-limitation
		traces:isFollowedBy endev-setup-profile
		traces:starts wf:setup-profile-act
	]

	ci endev-setup-profile : traces:EndingEvent [
		traces:provides art:torque-profile
		traces:isFollowedBy staev-gen-ctrl-params
		traces:terminates wf:setup-profile-act
	]

	ci staev-gen-ctrl-params : traces:StartingEvent [
		traces:receives art:torque-profile
		traces:receives art:control-parameter-generator
		traces:isFollowedBy endev-gen-ctrl-params
		traces:starts wf:generate-control-param-act
	]
	ci endev-gen-ctrl-params : traces:EndingEvent [
		traces:provides art:control-parameters
		traces:isFollowedBy staev-build-ctrl-settings
		traces:terminates wf:generate-control-param-act
	]

	ci staev-build-ctrl-settings : traces:StartingEvent [
		traces:receives art:control-parameters
		traces:receives art:test-requirements
		traces:starts wf:build-control-settings-act
		traces:isFollowedBy endev-build-ctrl-settings
	]
	ci endev-build-ctrl-settings : traces:EndingEvent [
		traces:provides art:c-code-to-be-run-on-rtt
		traces:terminates wf:build-control-settings-act
		traces:isFollowedBy staev-run-experiment
	]

	ci staev-run-experiment : traces:StartingEvent [
		traces:receives art:c-code-to-be-run-on-rtt
		traces:starts wf:run-experiment-act
		traces:isFollowedBy endev-run-experiment
	]
	
	ci endev-run-experiment : traces:EndingEvent [
		traces:terminates wf:run-experiment-act
		traces:isFollowedBy staev-verify-data
		traces:provides art:drivetrain-sensor-data
		traces:provides art:coupling-sensor-data
	]
	
	ci staev-verify-data : traces:StartingEvent [
		traces:receives art:drivetrain-sensor-data
		traces:receives art:coupling-sensor-data
		traces:starts wf:verify-data-act
		traces:isFollowedBy endev-verify-data
	]
	
	ci endev-verify-data : traces:EndingEvent [
		traces:terminates wf:verify-data-act
		traces:isFollowedBy staev-setup-profile-2
	]
	
	// second iteration
	
	ci staev-setup-profile-2 : traces:StartingEvent [
		traces:receives art:test-requirements-v1
		traces:receives art:drivetrain-limitation-v1
		traces:isFollowedBy endev-setup-profile-2
		traces:starts wf:setup-profile-act
	]

	ci endev-setup-profile-2 : traces:EndingEvent [
		traces:provides art:torque-profile
		traces:isFollowedBy staev-gen-ctrl-params-2
		traces:terminates wf:setup-profile-act
	]

	ci staev-gen-ctrl-params-2 : traces:StartingEvent [
		traces:receives art:torque-profile
		traces:receives art:control-parameter-generator
		traces:isFollowedBy endev-gen-ctrl-params-2
		traces:starts wf:generate-control-param-act
	]
	ci endev-gen-ctrl-params-2 : traces:EndingEvent [
		traces:provides art:control-parameters
		traces:isFollowedBy staev-build-ctrl-settings-2
		traces:terminates wf:generate-control-param-act
	]

	ci staev-build-ctrl-settings-2 : traces:StartingEvent [
		traces:receives art:control-parameters
		traces:receives art:test-requirements-v1
		traces:starts wf:build-control-settings-act
		traces:isFollowedBy endev-build-ctrl-settings-2
	]
	ci endev-build-ctrl-settings-2 : traces:EndingEvent [
		traces:provides art:c-code-to-be-run-on-rtt
		traces:terminates wf:build-control-settings-act
		traces:isFollowedBy staev-run-experiment-2
	]

	ci staev-run-experiment-2 : traces:StartingEvent [
		traces:receives art:c-code-to-be-run-on-rtt
		traces:starts wf:run-experiment-act
		traces:isFollowedBy endev-run-experiment-2
	]
	
	ci endev-run-experiment-2 : traces:EndingEvent [
		traces:terminates wf:run-experiment-act
		traces:isFollowedBy staev-verify-data-2
		traces:provides art:drivetrain-sensor-data-v1
		traces:provides art:coupling-sensor-data-v1
	]
	
	ci staev-verify-data-2 : traces:StartingEvent [
		traces:receives art:drivetrain-sensor-data-v1
		traces:receives art:coupling-sensor-data-v1
		traces:starts wf:verify-data-act
		traces:isFollowedBy endev-verify-data-2
	]
	
	ci endev-verify-data-2 : traces:EndingEvent [
		traces:terminates wf:verify-data-act
	]
	
}