//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using DslModeling = global::Microsoft.VisualStudio.Modeling;
using DslDesign = global::Microsoft.VisualStudio.Modeling.Design;
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship ProductionSystemHasMachines
	/// Embedding relationship between the Model and Elements
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.ProductionSystemHasMachines.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.ProductionSystemHasMachines.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship(IsEmbedding=true)]
	[DslModeling::DomainObjectId("35147e6e-dcc0-45eb-b0c0-68c75ce50f71")]
	public partial class ProductionSystemHasMachines : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// ProductionSystemHasMachines domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x35147e6e, 0xdcc0, 0x45eb, 0xb0, 0xc0, 0x68, 0xc7, 0x5c, 0xe5, 0x0f, 0x71);
	
				
		/// <summary>
		/// Constructor
		/// Creates a ProductionSystemHasMachines link in the same Partition as the given PS_Model
		/// </summary>
		/// <param name="source">PS_Model to use as the source of the relationship.</param>
		/// <param name="target">Machine to use as the target of the relationship.</param>
		public ProductionSystemHasMachines(PS_Model source, Machine target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(ProductionSystemHasMachines.PS_ModelDomainRoleId, source), new DslModeling::RoleAssignment(ProductionSystemHasMachines.ElementDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public ProductionSystemHasMachines(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public ProductionSystemHasMachines(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public ProductionSystemHasMachines(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public ProductionSystemHasMachines(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region PS_Model domain role code
		
		/// <summary>
		/// PS_Model domain role Id.
		/// </summary>
		public static readonly global::System.Guid PS_ModelDomainRoleId = new global::System.Guid(0x3cb8933c, 0x8dc5, 0x4d59, 0xbc, 0xd2, 0x5e, 0x20, 0xa1, 0xf6, 0x5c, 0x46);
		
		/// <summary>
		/// DomainRole PS_Model
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.ProductionSystemHasMachines/PS_Model.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.ProductionSystemHasMachines/PS_Model.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "Machines", PropertyDisplayNameKey="MDC.ProductionSystem.ProductionSystemHasMachines/PS_Model.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.PropagatesCopyToLinkAndOppositeRolePlayer, Multiplicity = DslModeling::Multiplicity.ZeroMany)]
		[DslModeling::DomainObjectId("3cb8933c-8dc5-4d59-bcd2-5e20a1f65c46")]
		public virtual PS_Model PS_Model
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (PS_Model)DslModeling::DomainRoleInfo.GetRolePlayer(this, PS_ModelDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, PS_ModelDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access PS_Model of a Machine
		/// <summary>
		/// Gets PS_Model.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static PS_Model GetPS_Model(Machine element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, ElementDomainRoleId) as PS_Model;
		}
		
		/// <summary>
		/// Sets PS_Model.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetPS_Model(Machine element, PS_Model newPS_Model)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, ElementDomainRoleId, newPS_Model);
		}
		#endregion
		#region Element domain role code
		
		/// <summary>
		/// Element domain role Id.
		/// </summary>
		public static readonly global::System.Guid ElementDomainRoleId = new global::System.Guid(0x0dcc3b1a, 0xf783, 0x43a1, 0x92, 0x86, 0x6b, 0x0b, 0x57, 0xd7, 0x14, 0x5b);
		
		/// <summary>
		/// DomainRole Element
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.ProductionSystemHasMachines/Element.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.ProductionSystemHasMachines/Element.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "PS_Model", PropertyDisplayNameKey="MDC.ProductionSystem.ProductionSystemHasMachines/Element.PropertyDisplayName", PropagatesDelete = true,  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.One)]
		[DslModeling::DomainObjectId("0dcc3b1a-f783-43a1-9286-6b0b57d7145b")]
		public virtual Machine Element
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (Machine)DslModeling::DomainRoleInfo.GetRolePlayer(this, ElementDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, ElementDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access Machines of a PS_Model
		/// <summary>
		/// Gets a list of Machines.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static DslModeling::LinkedElementCollection<Machine> GetMachines(PS_Model element)
		{
			return GetRoleCollection<DslModeling::LinkedElementCollection<Machine>, Machine>(element, PS_ModelDomainRoleId);
		}
		#endregion
		#region PS_Model link accessor
		/// <summary>
		/// Get the list of ProductionSystemHasMachines links to a PS_Model.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.ProductionSystemHasMachines> GetLinksToMachines ( global::MDC.ProductionSystem.PS_Model pS_ModelInstance )
		{
			return DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ProductionSystemHasMachines>(pS_ModelInstance, global::MDC.ProductionSystem.ProductionSystemHasMachines.PS_ModelDomainRoleId);
		}
		#endregion
		#region Element link accessor
		/// <summary>
		/// Get the ProductionSystemHasMachines link to a Machine.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.ProductionSystemHasMachines GetLinkToPS_Model (global::MDC.ProductionSystem.Machine elementInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ProductionSystemHasMachines> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ProductionSystemHasMachines>(elementInstance, global::MDC.ProductionSystem.ProductionSystemHasMachines.ElementDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of Element not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region ProductionSystemHasMachines instance accessors
		
		/// <summary>
		/// Get any ProductionSystemHasMachines links between a given PS_Model and a Machine.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.ProductionSystemHasMachines> GetLinks( global::MDC.ProductionSystem.PS_Model source, global::MDC.ProductionSystem.Machine target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.ProductionSystemHasMachines> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.ProductionSystemHasMachines>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ProductionSystemHasMachines> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ProductionSystemHasMachines>(source, global::MDC.ProductionSystem.ProductionSystemHasMachines.PS_ModelDomainRoleId);
			foreach ( global::MDC.ProductionSystem.ProductionSystemHasMachines link in links )
			{
				if ( target.Equals(link.Element) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one ProductionSystemHasMachines link between a given PS_Modeland a Machine.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.ProductionSystemHasMachines GetLink( global::MDC.ProductionSystem.PS_Model source, global::MDC.ProductionSystem.Machine target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ProductionSystemHasMachines> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ProductionSystemHasMachines>(source, global::MDC.ProductionSystem.ProductionSystemHasMachines.PS_ModelDomainRoleId);
			foreach ( global::MDC.ProductionSystem.ProductionSystemHasMachines link in links )
			{
				if ( target.Equals(link.Element) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship PS_ModelHasConveyorBelts
	/// Description for MDC.ProductionSystem.PS_ModelHasConveyorBelts
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasConveyorBelts.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasConveyorBelts.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship(IsEmbedding=true)]
	[DslModeling::DomainObjectId("677dc63c-b68b-4d83-af53-3adc9a33da60")]
	public partial class PS_ModelHasConveyorBelts : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// PS_ModelHasConveyorBelts domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x677dc63c, 0xb68b, 0x4d83, 0xaf, 0x53, 0x3a, 0xdc, 0x9a, 0x33, 0xda, 0x60);
	
				
		/// <summary>
		/// Constructor
		/// Creates a PS_ModelHasConveyorBelts link in the same Partition as the given PS_Model
		/// </summary>
		/// <param name="source">PS_Model to use as the source of the relationship.</param>
		/// <param name="target">ConveyorBelt to use as the target of the relationship.</param>
		public PS_ModelHasConveyorBelts(PS_Model source, ConveyorBelt target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(PS_ModelHasConveyorBelts.PS_ModelDomainRoleId, source), new DslModeling::RoleAssignment(PS_ModelHasConveyorBelts.ConveyorBeltDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public PS_ModelHasConveyorBelts(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public PS_ModelHasConveyorBelts(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public PS_ModelHasConveyorBelts(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public PS_ModelHasConveyorBelts(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region PS_Model domain role code
		
		/// <summary>
		/// PS_Model domain role Id.
		/// </summary>
		public static readonly global::System.Guid PS_ModelDomainRoleId = new global::System.Guid(0x8c38c3aa, 0x0710, 0x486a, 0x96, 0xf2, 0x27, 0xa8, 0xc3, 0x2c, 0xe2, 0x7e);
		
		/// <summary>
		/// DomainRole PS_Model
		/// Description for MDC.ProductionSystem.PS_ModelHasConveyorBelts.PS_Model
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasConveyorBelts/PS_Model.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasConveyorBelts/PS_Model.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "ConveyorBelts", PropertyDisplayNameKey="MDC.ProductionSystem.PS_ModelHasConveyorBelts/PS_Model.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.PropagatesCopyToLinkAndOppositeRolePlayer, Multiplicity = DslModeling::Multiplicity.ZeroMany)]
		[DslModeling::DomainObjectId("8c38c3aa-0710-486a-96f2-27a8c32ce27e")]
		public virtual PS_Model PS_Model
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (PS_Model)DslModeling::DomainRoleInfo.GetRolePlayer(this, PS_ModelDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, PS_ModelDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access PS_Models of a ConveyorBelt
		/// <summary>
		/// Gets PS_Models.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static PS_Model GetPS_Models(ConveyorBelt element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, ConveyorBeltDomainRoleId) as PS_Model;
		}
		
		/// <summary>
		/// Sets PS_Models.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetPS_Models(ConveyorBelt element, PS_Model newPS_Model)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, ConveyorBeltDomainRoleId, newPS_Model);
		}
		#endregion
		#region ConveyorBelt domain role code
		
		/// <summary>
		/// ConveyorBelt domain role Id.
		/// </summary>
		public static readonly global::System.Guid ConveyorBeltDomainRoleId = new global::System.Guid(0x32203332, 0xbfa1, 0x4b4a, 0x89, 0x49, 0x06, 0x57, 0x1b, 0xeb, 0x66, 0x9a);
		
		/// <summary>
		/// DomainRole ConveyorBelt
		/// Description for MDC.ProductionSystem.PS_ModelHasConveyorBelts.ConveyorBelt
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasConveyorBelts/ConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasConveyorBelts/ConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "PS_Models", PropertyDisplayNameKey="MDC.ProductionSystem.PS_ModelHasConveyorBelts/ConveyorBelt.PropertyDisplayName", PropagatesDelete = true,  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.One)]
		[DslModeling::DomainObjectId("32203332-bfa1-4b4a-8949-06571beb669a")]
		public virtual ConveyorBelt ConveyorBelt
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (ConveyorBelt)DslModeling::DomainRoleInfo.GetRolePlayer(this, ConveyorBeltDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, ConveyorBeltDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access ConveyorBelts of a PS_Model
		/// <summary>
		/// Gets a list of ConveyorBelts.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static DslModeling::LinkedElementCollection<ConveyorBelt> GetConveyorBelts(PS_Model element)
		{
			return GetRoleCollection<DslModeling::LinkedElementCollection<ConveyorBelt>, ConveyorBelt>(element, PS_ModelDomainRoleId);
		}
		#endregion
		#region PS_Model link accessor
		/// <summary>
		/// Get the list of PS_ModelHasConveyorBelts links to a PS_Model.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts> GetLinksToConveyorBelts ( global::MDC.ProductionSystem.PS_Model pS_ModelInstance )
		{
			return DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts>(pS_ModelInstance, global::MDC.ProductionSystem.PS_ModelHasConveyorBelts.PS_ModelDomainRoleId);
		}
		#endregion
		#region ConveyorBelt link accessor
		/// <summary>
		/// Get the PS_ModelHasConveyorBelts link to a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.PS_ModelHasConveyorBelts GetLinkToPS_Models (global::MDC.ProductionSystem.ConveyorBelt conveyorBeltInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts>(conveyorBeltInstance, global::MDC.ProductionSystem.PS_ModelHasConveyorBelts.ConveyorBeltDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of ConveyorBelt not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region PS_ModelHasConveyorBelts instance accessors
		
		/// <summary>
		/// Get any PS_ModelHasConveyorBelts links between a given PS_Model and a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts> GetLinks( global::MDC.ProductionSystem.PS_Model source, global::MDC.ProductionSystem.ConveyorBelt target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts>(source, global::MDC.ProductionSystem.PS_ModelHasConveyorBelts.PS_ModelDomainRoleId);
			foreach ( global::MDC.ProductionSystem.PS_ModelHasConveyorBelts link in links )
			{
				if ( target.Equals(link.ConveyorBelt) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one PS_ModelHasConveyorBelts link between a given PS_Modeland a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.PS_ModelHasConveyorBelts GetLink( global::MDC.ProductionSystem.PS_Model source, global::MDC.ProductionSystem.ConveyorBelt target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasConveyorBelts>(source, global::MDC.ProductionSystem.PS_ModelHasConveyorBelts.PS_ModelDomainRoleId);
			foreach ( global::MDC.ProductionSystem.PS_ModelHasConveyorBelts link in links )
			{
				if ( target.Equals(link.ConveyorBelt) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship PS_ModelHasComponents
	/// Description for MDC.ProductionSystem.PS_ModelHasComponents
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasComponents.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasComponents.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship(IsEmbedding=true)]
	[DslModeling::DomainObjectId("acb8f1b5-6819-4cda-b3b9-8a9859b6b6bd")]
	public partial class PS_ModelHasComponents : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// PS_ModelHasComponents domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xacb8f1b5, 0x6819, 0x4cda, 0xb3, 0xb9, 0x8a, 0x98, 0x59, 0xb6, 0xb6, 0xbd);
	
				
		/// <summary>
		/// Constructor
		/// Creates a PS_ModelHasComponents link in the same Partition as the given PS_Model
		/// </summary>
		/// <param name="source">PS_Model to use as the source of the relationship.</param>
		/// <param name="target">Component to use as the target of the relationship.</param>
		public PS_ModelHasComponents(PS_Model source, Component target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(PS_ModelHasComponents.PS_ModelDomainRoleId, source), new DslModeling::RoleAssignment(PS_ModelHasComponents.ComponentDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public PS_ModelHasComponents(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public PS_ModelHasComponents(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public PS_ModelHasComponents(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public PS_ModelHasComponents(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region PS_Model domain role code
		
		/// <summary>
		/// PS_Model domain role Id.
		/// </summary>
		public static readonly global::System.Guid PS_ModelDomainRoleId = new global::System.Guid(0x11871938, 0x897f, 0x4c6a, 0x9a, 0x32, 0x8c, 0x1e, 0x79, 0x00, 0xc1, 0xe6);
		
		/// <summary>
		/// DomainRole PS_Model
		/// Description for MDC.ProductionSystem.PS_ModelHasComponents.PS_Model
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasComponents/PS_Model.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasComponents/PS_Model.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "Components", PropertyDisplayNameKey="MDC.ProductionSystem.PS_ModelHasComponents/PS_Model.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.PropagatesCopyToLinkAndOppositeRolePlayer, Multiplicity = DslModeling::Multiplicity.ZeroMany)]
		[DslModeling::DomainObjectId("11871938-897f-4c6a-9a32-8c1e7900c1e6")]
		public virtual PS_Model PS_Model
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (PS_Model)DslModeling::DomainRoleInfo.GetRolePlayer(this, PS_ModelDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, PS_ModelDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access PS_Models of a Component
		/// <summary>
		/// Gets PS_Models.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static PS_Model GetPS_Models(Component element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, ComponentDomainRoleId) as PS_Model;
		}
		
		/// <summary>
		/// Sets PS_Models.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetPS_Models(Component element, PS_Model newPS_Model)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, ComponentDomainRoleId, newPS_Model);
		}
		#endregion
		#region Component domain role code
		
		/// <summary>
		/// Component domain role Id.
		/// </summary>
		public static readonly global::System.Guid ComponentDomainRoleId = new global::System.Guid(0x996101c0, 0x7365, 0x4370, 0x86, 0x18, 0x79, 0x8e, 0x72, 0x41, 0x59, 0x30);
		
		/// <summary>
		/// DomainRole Component
		/// Description for MDC.ProductionSystem.PS_ModelHasComponents.Component
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasComponents/Component.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasComponents/Component.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "PS_Models", PropertyDisplayNameKey="MDC.ProductionSystem.PS_ModelHasComponents/Component.PropertyDisplayName", PropagatesDelete = true,  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.One)]
		[DslModeling::DomainObjectId("996101c0-7365-4370-8618-798e72415930")]
		public virtual Component Component
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (Component)DslModeling::DomainRoleInfo.GetRolePlayer(this, ComponentDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, ComponentDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access Components of a PS_Model
		/// <summary>
		/// Gets a list of Components.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static DslModeling::LinkedElementCollection<Component> GetComponents(PS_Model element)
		{
			return GetRoleCollection<DslModeling::LinkedElementCollection<Component>, Component>(element, PS_ModelDomainRoleId);
		}
		#endregion
		#region PS_Model link accessor
		/// <summary>
		/// Get the list of PS_ModelHasComponents links to a PS_Model.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.PS_ModelHasComponents> GetLinksToComponents ( global::MDC.ProductionSystem.PS_Model pS_ModelInstance )
		{
			return DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasComponents>(pS_ModelInstance, global::MDC.ProductionSystem.PS_ModelHasComponents.PS_ModelDomainRoleId);
		}
		#endregion
		#region Component link accessor
		/// <summary>
		/// Get the PS_ModelHasComponents link to a Component.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.PS_ModelHasComponents GetLinkToPS_Models (global::MDC.ProductionSystem.Component componentInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasComponents> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasComponents>(componentInstance, global::MDC.ProductionSystem.PS_ModelHasComponents.ComponentDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of Component not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region PS_ModelHasComponents instance accessors
		
		/// <summary>
		/// Get any PS_ModelHasComponents links between a given PS_Model and a Component.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.PS_ModelHasComponents> GetLinks( global::MDC.ProductionSystem.PS_Model source, global::MDC.ProductionSystem.Component target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.PS_ModelHasComponents> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.PS_ModelHasComponents>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasComponents> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasComponents>(source, global::MDC.ProductionSystem.PS_ModelHasComponents.PS_ModelDomainRoleId);
			foreach ( global::MDC.ProductionSystem.PS_ModelHasComponents link in links )
			{
				if ( target.Equals(link.Component) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one PS_ModelHasComponents link between a given PS_Modeland a Component.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.PS_ModelHasComponents GetLink( global::MDC.ProductionSystem.PS_Model source, global::MDC.ProductionSystem.Component target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasComponents> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasComponents>(source, global::MDC.ProductionSystem.PS_ModelHasComponents.PS_ModelDomainRoleId);
			foreach ( global::MDC.ProductionSystem.PS_ModelHasComponents link in links )
			{
				if ( target.Equals(link.Component) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship PS_ModelHasOperators
	/// Description for MDC.ProductionSystem.PS_ModelHasOperators
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasOperators.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasOperators.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship(IsEmbedding=true)]
	[DslModeling::DomainObjectId("f8c58591-89e9-47c2-8c6a-20aa0a92bc96")]
	public partial class PS_ModelHasOperators : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// PS_ModelHasOperators domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xf8c58591, 0x89e9, 0x47c2, 0x8c, 0x6a, 0x20, 0xaa, 0x0a, 0x92, 0xbc, 0x96);
	
				
		/// <summary>
		/// Constructor
		/// Creates a PS_ModelHasOperators link in the same Partition as the given PS_Model
		/// </summary>
		/// <param name="source">PS_Model to use as the source of the relationship.</param>
		/// <param name="target">Operator to use as the target of the relationship.</param>
		public PS_ModelHasOperators(PS_Model source, Operator target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(PS_ModelHasOperators.PS_ModelDomainRoleId, source), new DslModeling::RoleAssignment(PS_ModelHasOperators.OperatorDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public PS_ModelHasOperators(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public PS_ModelHasOperators(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public PS_ModelHasOperators(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public PS_ModelHasOperators(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region PS_Model domain role code
		
		/// <summary>
		/// PS_Model domain role Id.
		/// </summary>
		public static readonly global::System.Guid PS_ModelDomainRoleId = new global::System.Guid(0xb62e4161, 0xffa5, 0x497a, 0xbb, 0x45, 0xde, 0x5b, 0x6e, 0x93, 0xdb, 0x54);
		
		/// <summary>
		/// DomainRole PS_Model
		/// Description for MDC.ProductionSystem.PS_ModelHasOperators.PS_Model
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasOperators/PS_Model.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasOperators/PS_Model.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "Operators", PropertyDisplayNameKey="MDC.ProductionSystem.PS_ModelHasOperators/PS_Model.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.PropagatesCopyToLinkAndOppositeRolePlayer, Multiplicity = DslModeling::Multiplicity.ZeroMany)]
		[DslModeling::DomainObjectId("b62e4161-ffa5-497a-bb45-de5b6e93db54")]
		public virtual PS_Model PS_Model
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (PS_Model)DslModeling::DomainRoleInfo.GetRolePlayer(this, PS_ModelDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, PS_ModelDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access PS_Models of a Operator
		/// <summary>
		/// Gets PS_Models.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static PS_Model GetPS_Models(Operator element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, OperatorDomainRoleId) as PS_Model;
		}
		
		/// <summary>
		/// Sets PS_Models.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetPS_Models(Operator element, PS_Model newPS_Model)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, OperatorDomainRoleId, newPS_Model);
		}
		#endregion
		#region Operator domain role code
		
		/// <summary>
		/// Operator domain role Id.
		/// </summary>
		public static readonly global::System.Guid OperatorDomainRoleId = new global::System.Guid(0x59832627, 0x7d24, 0x418b, 0xbf, 0x01, 0x58, 0x29, 0xd1, 0xc7, 0x30, 0x18);
		
		/// <summary>
		/// DomainRole Operator
		/// Description for MDC.ProductionSystem.PS_ModelHasOperators.Operator
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.PS_ModelHasOperators/Operator.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.PS_ModelHasOperators/Operator.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "PS_Models", PropertyDisplayNameKey="MDC.ProductionSystem.PS_ModelHasOperators/Operator.PropertyDisplayName", PropagatesDelete = true,  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.One)]
		[DslModeling::DomainObjectId("59832627-7d24-418b-bf01-5829d1c73018")]
		public virtual Operator Operator
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (Operator)DslModeling::DomainRoleInfo.GetRolePlayer(this, OperatorDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, OperatorDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access Operators of a PS_Model
		/// <summary>
		/// Gets a list of Operators.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static DslModeling::LinkedElementCollection<Operator> GetOperators(PS_Model element)
		{
			return GetRoleCollection<DslModeling::LinkedElementCollection<Operator>, Operator>(element, PS_ModelDomainRoleId);
		}
		#endregion
		#region PS_Model link accessor
		/// <summary>
		/// Get the list of PS_ModelHasOperators links to a PS_Model.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.PS_ModelHasOperators> GetLinksToOperators ( global::MDC.ProductionSystem.PS_Model pS_ModelInstance )
		{
			return DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasOperators>(pS_ModelInstance, global::MDC.ProductionSystem.PS_ModelHasOperators.PS_ModelDomainRoleId);
		}
		#endregion
		#region Operator link accessor
		/// <summary>
		/// Get the PS_ModelHasOperators link to a Operator.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.PS_ModelHasOperators GetLinkToPS_Models (global::MDC.ProductionSystem.Operator operatorInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasOperators> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasOperators>(operatorInstance, global::MDC.ProductionSystem.PS_ModelHasOperators.OperatorDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of Operator not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region PS_ModelHasOperators instance accessors
		
		/// <summary>
		/// Get any PS_ModelHasOperators links between a given PS_Model and a Operator.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.PS_ModelHasOperators> GetLinks( global::MDC.ProductionSystem.PS_Model source, global::MDC.ProductionSystem.Operator target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.PS_ModelHasOperators> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.PS_ModelHasOperators>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasOperators> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasOperators>(source, global::MDC.ProductionSystem.PS_ModelHasOperators.PS_ModelDomainRoleId);
			foreach ( global::MDC.ProductionSystem.PS_ModelHasOperators link in links )
			{
				if ( target.Equals(link.Operator) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one PS_ModelHasOperators link between a given PS_Modeland a Operator.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.PS_ModelHasOperators GetLink( global::MDC.ProductionSystem.PS_Model source, global::MDC.ProductionSystem.Operator target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.PS_ModelHasOperators> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.PS_ModelHasOperators>(source, global::MDC.ProductionSystem.PS_ModelHasOperators.PS_ModelDomainRoleId);
			foreach ( global::MDC.ProductionSystem.PS_ModelHasOperators link in links )
			{
				if ( target.Equals(link.Operator) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship MachineIsConnectedToConveyorBelt
	/// Description for MDC.ProductionSystem.MachineIsConnectedToConveyorBelt
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.MachineIsConnectedToConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.MachineIsConnectedToConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship()]
	[DslModeling::DomainObjectId("86d08058-9b7c-4efd-abb0-5d3d2ca5caf1")]
	public partial class MachineIsConnectedToConveyorBelt : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// MachineIsConnectedToConveyorBelt domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x86d08058, 0x9b7c, 0x4efd, 0xab, 0xb0, 0x5d, 0x3d, 0x2c, 0xa5, 0xca, 0xf1);
	
				
		/// <summary>
		/// Constructor
		/// Creates a MachineIsConnectedToConveyorBelt link in the same Partition as the given Machine
		/// </summary>
		/// <param name="source">Machine to use as the source of the relationship.</param>
		/// <param name="target">ConveyorBelt to use as the target of the relationship.</param>
		public MachineIsConnectedToConveyorBelt(Machine source, ConveyorBelt target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(MachineIsConnectedToConveyorBelt.MA_CB_MachineDomainRoleId, source), new DslModeling::RoleAssignment(MachineIsConnectedToConveyorBelt.MA_CB_ConveyorBeltDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public MachineIsConnectedToConveyorBelt(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public MachineIsConnectedToConveyorBelt(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public MachineIsConnectedToConveyorBelt(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public MachineIsConnectedToConveyorBelt(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region MA_CB_Machine domain role code
		
		/// <summary>
		/// MA_CB_Machine domain role Id.
		/// </summary>
		public static readonly global::System.Guid MA_CB_MachineDomainRoleId = new global::System.Guid(0x03fbd268, 0x80ad, 0x4947, 0x8a, 0xd2, 0xa1, 0x5c, 0x8c, 0xf8, 0xfa, 0x75);
		
		/// <summary>
		/// DomainRole MA_CB_Machine
		/// Description for
		/// MDC.ProductionSystem.MachineIsConnectedToConveyorBelt.MA_CB_Machine
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.MachineIsConnectedToConveyorBelt/MA_CB_Machine.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.MachineIsConnectedToConveyorBelt/MA_CB_Machine.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "MA_CB_ConveyorBelts", PropertyDisplayNameKey="MDC.ProductionSystem.MachineIsConnectedToConveyorBelt/MA_CB_Machine.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroMany)]
		[DslModeling::DomainObjectId("03fbd268-80ad-4947-8ad2-a15c8cf8fa75")]
		public virtual Machine MA_CB_Machine
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (Machine)DslModeling::DomainRoleInfo.GetRolePlayer(this, MA_CB_MachineDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, MA_CB_MachineDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access MA_CB_Machines of a ConveyorBelt
		/// <summary>
		/// Gets MA_CB_Machines.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static Machine GetMA_CB_Machines(ConveyorBelt element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, MA_CB_ConveyorBeltDomainRoleId) as Machine;
		}
		
		/// <summary>
		/// Sets MA_CB_Machines.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetMA_CB_Machines(ConveyorBelt element, Machine newMA_CB_Machine)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, MA_CB_ConveyorBeltDomainRoleId, newMA_CB_Machine);
		}
		#endregion
		#region MA_CB_ConveyorBelt domain role code
		
		/// <summary>
		/// MA_CB_ConveyorBelt domain role Id.
		/// </summary>
		public static readonly global::System.Guid MA_CB_ConveyorBeltDomainRoleId = new global::System.Guid(0xe17a2fa1, 0xb488, 0x42a9, 0xad, 0x42, 0xbf, 0x05, 0x09, 0xa6, 0xe3, 0xd1);
		
		/// <summary>
		/// DomainRole MA_CB_ConveyorBelt
		/// Description for
		/// MDC.ProductionSystem.MachineIsConnectedToConveyorBelt.MA_CB_ConveyorBelt
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.MachineIsConnectedToConveyorBelt/MA_CB_ConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.MachineIsConnectedToConveyorBelt/MA_CB_ConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "MA_CB_Machines", PropertyDisplayNameKey="MDC.ProductionSystem.MachineIsConnectedToConveyorBelt/MA_CB_ConveyorBelt.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroOne)]
		[DslModeling::DomainObjectId("e17a2fa1-b488-42a9-ad42-bf0509a6e3d1")]
		public virtual ConveyorBelt MA_CB_ConveyorBelt
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (ConveyorBelt)DslModeling::DomainRoleInfo.GetRolePlayer(this, MA_CB_ConveyorBeltDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, MA_CB_ConveyorBeltDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access MA_CB_ConveyorBelts of a Machine
		/// <summary>
		/// Gets a list of MA_CB_ConveyorBelts.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static DslModeling::LinkedElementCollection<ConveyorBelt> GetMA_CB_ConveyorBelts(Machine element)
		{
			return GetRoleCollection<DslModeling::LinkedElementCollection<ConveyorBelt>, ConveyorBelt>(element, MA_CB_MachineDomainRoleId);
		}
		#endregion
		#region MA_CB_Machine link accessor
		/// <summary>
		/// Get the list of MachineIsConnectedToConveyorBelt links to a Machine.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt> GetLinksToMA_CB_ConveyorBelts ( global::MDC.ProductionSystem.Machine mA_CB_MachineInstance )
		{
			return DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt>(mA_CB_MachineInstance, global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt.MA_CB_MachineDomainRoleId);
		}
		#endregion
		#region MA_CB_ConveyorBelt link accessor
		/// <summary>
		/// Get the MachineIsConnectedToConveyorBelt link to a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt GetLinkToMA_CB_Machines (global::MDC.ProductionSystem.ConveyorBelt mA_CB_ConveyorBeltInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt>(mA_CB_ConveyorBeltInstance, global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt.MA_CB_ConveyorBeltDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of MA_CB_ConveyorBelt not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region MachineIsConnectedToConveyorBelt instance accessors
		
		/// <summary>
		/// Get any MachineIsConnectedToConveyorBelt links between a given Machine and a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt> GetLinks( global::MDC.ProductionSystem.Machine source, global::MDC.ProductionSystem.ConveyorBelt target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt>(source, global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt.MA_CB_MachineDomainRoleId);
			foreach ( global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt link in links )
			{
				if ( target.Equals(link.MA_CB_ConveyorBelt) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one MachineIsConnectedToConveyorBelt link between a given Machineand a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt GetLink( global::MDC.ProductionSystem.Machine source, global::MDC.ProductionSystem.ConveyorBelt target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt>(source, global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt.MA_CB_MachineDomainRoleId);
			foreach ( global::MDC.ProductionSystem.MachineIsConnectedToConveyorBelt link in links )
			{
				if ( target.Equals(link.MA_CB_ConveyorBelt) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship ConveyorBeltsConnectedToMachines
	/// Description for MDC.ProductionSystem.ConveyorBeltsConnectedToMachines
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.ConveyorBeltsConnectedToMachines.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.ConveyorBeltsConnectedToMachines.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship()]
	[DslModeling::DomainObjectId("3de2acb8-1a5e-4915-8e99-c27ec4ee2c67")]
	public partial class ConveyorBeltsConnectedToMachines : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// ConveyorBeltsConnectedToMachines domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x3de2acb8, 0x1a5e, 0x4915, 0x8e, 0x99, 0xc2, 0x7e, 0xc4, 0xee, 0x2c, 0x67);
	
				
		/// <summary>
		/// Constructor
		/// Creates a ConveyorBeltsConnectedToMachines link in the same Partition as the given ConveyorBelt
		/// </summary>
		/// <param name="source">ConveyorBelt to use as the source of the relationship.</param>
		/// <param name="target">Machine to use as the target of the relationship.</param>
		public ConveyorBeltsConnectedToMachines(ConveyorBelt source, Machine target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(ConveyorBeltsConnectedToMachines.CB_MA_ConveyorBeltDomainRoleId, source), new DslModeling::RoleAssignment(ConveyorBeltsConnectedToMachines.CB_MA_MachineDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public ConveyorBeltsConnectedToMachines(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public ConveyorBeltsConnectedToMachines(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public ConveyorBeltsConnectedToMachines(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public ConveyorBeltsConnectedToMachines(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region CB_MA_ConveyorBelt domain role code
		
		/// <summary>
		/// CB_MA_ConveyorBelt domain role Id.
		/// </summary>
		public static readonly global::System.Guid CB_MA_ConveyorBeltDomainRoleId = new global::System.Guid(0x17f79b25, 0x7ce8, 0x440f, 0x8d, 0x5a, 0x5f, 0xec, 0xa5, 0x70, 0xd9, 0x49);
		
		/// <summary>
		/// DomainRole CB_MA_ConveyorBelt
		/// Description for
		/// MDC.ProductionSystem.ConveyorBeltsConnectedToMachines.CB_MA_ConveyorBelt
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.ConveyorBeltsConnectedToMachines/CB_MA_ConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.ConveyorBeltsConnectedToMachines/CB_MA_ConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "CB_MA_Machines", PropertyDisplayNameKey="MDC.ProductionSystem.ConveyorBeltsConnectedToMachines/CB_MA_ConveyorBelt.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroMany)]
		[DslModeling::DomainObjectId("17f79b25-7ce8-440f-8d5a-5feca570d949")]
		public virtual ConveyorBelt CB_MA_ConveyorBelt
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (ConveyorBelt)DslModeling::DomainRoleInfo.GetRolePlayer(this, CB_MA_ConveyorBeltDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, CB_MA_ConveyorBeltDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access CB_MA_ConveyorBelts of a Machine
		/// <summary>
		/// Gets a list of CB_MA_ConveyorBelts.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static DslModeling::LinkedElementCollection<ConveyorBelt> GetCB_MA_ConveyorBelts(Machine element)
		{
			return GetRoleCollection<DslModeling::LinkedElementCollection<ConveyorBelt>, ConveyorBelt>(element, CB_MA_MachineDomainRoleId);
		}
		#endregion
		#region CB_MA_Machine domain role code
		
		/// <summary>
		/// CB_MA_Machine domain role Id.
		/// </summary>
		public static readonly global::System.Guid CB_MA_MachineDomainRoleId = new global::System.Guid(0x211dabc0, 0xe10a, 0x4db4, 0x81, 0xd8, 0x19, 0x98, 0x03, 0x83, 0x03, 0x09);
		
		/// <summary>
		/// DomainRole CB_MA_Machine
		/// Description for
		/// MDC.ProductionSystem.ConveyorBeltsConnectedToMachines.CB_MA_Machine
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.ConveyorBeltsConnectedToMachines/CB_MA_Machine.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.ConveyorBeltsConnectedToMachines/CB_MA_Machine.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "CB_MA_ConveyorBelts", PropertyDisplayNameKey="MDC.ProductionSystem.ConveyorBeltsConnectedToMachines/CB_MA_Machine.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroMany)]
		[DslModeling::DomainObjectId("211dabc0-e10a-4db4-81d8-199803830309")]
		public virtual Machine CB_MA_Machine
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (Machine)DslModeling::DomainRoleInfo.GetRolePlayer(this, CB_MA_MachineDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, CB_MA_MachineDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access CB_MA_Machines of a ConveyorBelt
		/// <summary>
		/// Gets a list of CB_MA_Machines.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static DslModeling::LinkedElementCollection<Machine> GetCB_MA_Machines(ConveyorBelt element)
		{
			return GetRoleCollection<DslModeling::LinkedElementCollection<Machine>, Machine>(element, CB_MA_ConveyorBeltDomainRoleId);
		}
		#endregion
		#region CB_MA_ConveyorBelt link accessor
		/// <summary>
		/// Get the list of ConveyorBeltsConnectedToMachines links to a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines> GetLinksToCB_MA_Machines ( global::MDC.ProductionSystem.ConveyorBelt cB_MA_ConveyorBeltInstance )
		{
			return DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines>(cB_MA_ConveyorBeltInstance, global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines.CB_MA_ConveyorBeltDomainRoleId);
		}
		#endregion
		#region CB_MA_Machine link accessor
		/// <summary>
		/// Get the list of ConveyorBeltsConnectedToMachines links to a Machine.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines> GetLinksToCB_MA_ConveyorBelts ( global::MDC.ProductionSystem.Machine cB_MA_MachineInstance )
		{
			return DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines>(cB_MA_MachineInstance, global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines.CB_MA_MachineDomainRoleId);
		}
		#endregion
		#region ConveyorBeltsConnectedToMachines instance accessors
		
		/// <summary>
		/// Get any ConveyorBeltsConnectedToMachines links between a given ConveyorBelt and a Machine.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines> GetLinks( global::MDC.ProductionSystem.ConveyorBelt source, global::MDC.ProductionSystem.Machine target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines>(source, global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines.CB_MA_ConveyorBeltDomainRoleId);
			foreach ( global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines link in links )
			{
				if ( target.Equals(link.CB_MA_Machine) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one ConveyorBeltsConnectedToMachines link between a given ConveyorBeltand a Machine.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines GetLink( global::MDC.ProductionSystem.ConveyorBelt source, global::MDC.ProductionSystem.Machine target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines>(source, global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines.CB_MA_ConveyorBeltDomainRoleId);
			foreach ( global::MDC.ProductionSystem.ConveyorBeltsConnectedToMachines link in links )
			{
				if ( target.Equals(link.CB_MA_Machine) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship ConveyorBeltsConnectedToConveyorBelt
	/// Description for MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship()]
	[DslModeling::DomainObjectId("6a0361ef-e401-4ed7-9252-f93c8a1f5b9f")]
	public partial class ConveyorBeltsConnectedToConveyorBelt : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// ConveyorBeltsConnectedToConveyorBelt domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x6a0361ef, 0xe401, 0x4ed7, 0x92, 0x52, 0xf9, 0x3c, 0x8a, 0x1f, 0x5b, 0x9f);
	
				
		/// <summary>
		/// Constructor
		/// Creates a ConveyorBeltsConnectedToConveyorBelt link in the same Partition as the given ConveyorBelt
		/// </summary>
		/// <param name="source">ConveyorBelt to use as the source of the relationship.</param>
		/// <param name="target">ConveyorBelt to use as the target of the relationship.</param>
		public ConveyorBeltsConnectedToConveyorBelt(ConveyorBelt source, ConveyorBelt target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(ConveyorBeltsConnectedToConveyorBelt.CB_CB_SourceConveyorBeltDomainRoleId, source), new DslModeling::RoleAssignment(ConveyorBeltsConnectedToConveyorBelt.CB_CB_TargetConveyorBeltDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public ConveyorBeltsConnectedToConveyorBelt(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public ConveyorBeltsConnectedToConveyorBelt(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public ConveyorBeltsConnectedToConveyorBelt(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public ConveyorBeltsConnectedToConveyorBelt(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region CB_CB_SourceConveyorBelt domain role code
		
		/// <summary>
		/// CB_CB_SourceConveyorBelt domain role Id.
		/// </summary>
		public static readonly global::System.Guid CB_CB_SourceConveyorBeltDomainRoleId = new global::System.Guid(0x08c1e3b1, 0x995e, 0x41ad, 0xac, 0xed, 0x26, 0x93, 0xc3, 0xdb, 0x3f, 0xff);
		
		/// <summary>
		/// DomainRole CB_CB_SourceConveyorBelt
		/// Description for
		/// MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt.CB_CB_SourceConveyorBelt
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt/CB_CB_SourceConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt/CB_CB_SourceConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "CB_CB_TargetConveyorBelts", PropertyDisplayNameKey="MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt/CB_CB_SourceConveyorBelt.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroOne)]
		[DslModeling::DomainObjectId("08c1e3b1-995e-41ad-aced-2693c3db3fff")]
		public virtual ConveyorBelt CB_CB_SourceConveyorBelt
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (ConveyorBelt)DslModeling::DomainRoleInfo.GetRolePlayer(this, CB_CB_SourceConveyorBeltDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, CB_CB_SourceConveyorBeltDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access CB_CB_SourceConveyorBelts of a ConveyorBelt
		/// <summary>
		/// Gets a list of CB_CB_SourceConveyorBelts.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static DslModeling::LinkedElementCollection<ConveyorBelt> GetCB_CB_SourceConveyorBelts(ConveyorBelt element)
		{
			return GetRoleCollection<DslModeling::LinkedElementCollection<ConveyorBelt>, ConveyorBelt>(element, CB_CB_TargetConveyorBeltDomainRoleId);
		}
		#endregion
		#region CB_CB_TargetConveyorBelt domain role code
		
		/// <summary>
		/// CB_CB_TargetConveyorBelt domain role Id.
		/// </summary>
		public static readonly global::System.Guid CB_CB_TargetConveyorBeltDomainRoleId = new global::System.Guid(0x64471342, 0x21bb, 0x46e9, 0x94, 0xe4, 0x08, 0xf7, 0x51, 0xec, 0xc8, 0x56);
		
		/// <summary>
		/// DomainRole CB_CB_TargetConveyorBelt
		/// Description for
		/// MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt.CB_CB_TargetConveyorBelt
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt/CB_CB_TargetConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt/CB_CB_TargetConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "CB_CB_SourceConveyorBelts", PropertyDisplayNameKey="MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt/CB_CB_TargetConveyorBelt.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroMany)]
		[DslModeling::DomainObjectId("64471342-21bb-46e9-94e4-08f751ecc856")]
		public virtual ConveyorBelt CB_CB_TargetConveyorBelt
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (ConveyorBelt)DslModeling::DomainRoleInfo.GetRolePlayer(this, CB_CB_TargetConveyorBeltDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, CB_CB_TargetConveyorBeltDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access CB_CB_TargetConveyorBelts of a ConveyorBelt
		/// <summary>
		/// Gets CB_CB_TargetConveyorBelts.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static ConveyorBelt GetCB_CB_TargetConveyorBelts(ConveyorBelt element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, CB_CB_SourceConveyorBeltDomainRoleId) as ConveyorBelt;
		}
		
		/// <summary>
		/// Sets CB_CB_TargetConveyorBelts.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetCB_CB_TargetConveyorBelts(ConveyorBelt element, ConveyorBelt newCB_CB_TargetConveyorBelt)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, CB_CB_SourceConveyorBeltDomainRoleId, newCB_CB_TargetConveyorBelt);
		}
		#endregion
		#region CB_CB_SourceConveyorBelt link accessor
		/// <summary>
		/// Get the ConveyorBeltsConnectedToConveyorBelt link to a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt GetLinkToCB_CB_TargetConveyorBelts (global::MDC.ProductionSystem.ConveyorBelt cB_CB_SourceConveyorBeltInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt>(cB_CB_SourceConveyorBeltInstance, global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt.CB_CB_SourceConveyorBeltDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of CB_CB_SourceConveyorBelt not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region CB_CB_TargetConveyorBelt link accessor
		/// <summary>
		/// Get the list of ConveyorBeltsConnectedToConveyorBelt links to a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt> GetLinksToCB_CB_SourceConveyorBelts ( global::MDC.ProductionSystem.ConveyorBelt cB_CB_TargetConveyorBeltInstance )
		{
			return DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt>(cB_CB_TargetConveyorBeltInstance, global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt.CB_CB_TargetConveyorBeltDomainRoleId);
		}
		#endregion
		#region ConveyorBeltsConnectedToConveyorBelt instance accessors
		
		/// <summary>
		/// Get any ConveyorBeltsConnectedToConveyorBelt links between a given ConveyorBelt and a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt> GetLinks( global::MDC.ProductionSystem.ConveyorBelt source, global::MDC.ProductionSystem.ConveyorBelt target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt>(source, global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt.CB_CB_SourceConveyorBeltDomainRoleId);
			foreach ( global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt link in links )
			{
				if ( target.Equals(link.CB_CB_TargetConveyorBelt) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one ConveyorBeltsConnectedToConveyorBelt link between a given ConveyorBeltand a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt GetLink( global::MDC.ProductionSystem.ConveyorBelt source, global::MDC.ProductionSystem.ConveyorBelt target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt>(source, global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt.CB_CB_SourceConveyorBeltDomainRoleId);
			foreach ( global::MDC.ProductionSystem.ConveyorBeltsConnectedToConveyorBelt link in links )
			{
				if ( target.Equals(link.CB_CB_TargetConveyorBelt) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship ComponentIsOnConveyorBelt
	/// Description for MDC.ProductionSystem.ComponentIsOnConveyorBelt
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.ComponentIsOnConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.ComponentIsOnConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship()]
	[DslModeling::DomainObjectId("a8d978c3-675a-4fdf-8b43-6b8c3ffaa710")]
	public partial class ComponentIsOnConveyorBelt : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// ComponentIsOnConveyorBelt domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xa8d978c3, 0x675a, 0x4fdf, 0x8b, 0x43, 0x6b, 0x8c, 0x3f, 0xfa, 0xa7, 0x10);
	
				
		/// <summary>
		/// Constructor
		/// Creates a ComponentIsOnConveyorBelt link in the same Partition as the given Component
		/// </summary>
		/// <param name="source">Component to use as the source of the relationship.</param>
		/// <param name="target">ConveyorBelt to use as the target of the relationship.</param>
		public ComponentIsOnConveyorBelt(Component source, ConveyorBelt target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(ComponentIsOnConveyorBelt.CO_CB_ComponentDomainRoleId, source), new DslModeling::RoleAssignment(ComponentIsOnConveyorBelt.CO_CB_ConveyorBeltDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public ComponentIsOnConveyorBelt(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public ComponentIsOnConveyorBelt(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public ComponentIsOnConveyorBelt(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public ComponentIsOnConveyorBelt(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region CO_CB_Component domain role code
		
		/// <summary>
		/// CO_CB_Component domain role Id.
		/// </summary>
		public static readonly global::System.Guid CO_CB_ComponentDomainRoleId = new global::System.Guid(0xf09bb620, 0xa9c5, 0x4b6f, 0x92, 0xf0, 0xcc, 0xac, 0x21, 0xe0, 0xd6, 0x45);
		
		/// <summary>
		/// DomainRole CO_CB_Component
		/// Description for MDC.ProductionSystem.ComponentIsOnConveyorBelt.CO_CB_Component
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.ComponentIsOnConveyorBelt/CO_CB_Component.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.ComponentIsOnConveyorBelt/CO_CB_Component.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "CO_CB_Conveyors", PropertyDisplayNameKey="MDC.ProductionSystem.ComponentIsOnConveyorBelt/CO_CB_Component.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroOne)]
		[DslModeling::DomainObjectId("f09bb620-a9c5-4b6f-92f0-ccac21e0d645")]
		public virtual Component CO_CB_Component
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (Component)DslModeling::DomainRoleInfo.GetRolePlayer(this, CO_CB_ComponentDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, CO_CB_ComponentDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access CO_CB_Components of a ConveyorBelt
		/// <summary>
		/// Gets CO_CB_Components.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static Component GetCO_CB_Components(ConveyorBelt element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, CO_CB_ConveyorBeltDomainRoleId) as Component;
		}
		
		/// <summary>
		/// Sets CO_CB_Components.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetCO_CB_Components(ConveyorBelt element, Component newCO_CB_Component)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, CO_CB_ConveyorBeltDomainRoleId, newCO_CB_Component);
		}
		#endregion
		#region CO_CB_ConveyorBelt domain role code
		
		/// <summary>
		/// CO_CB_ConveyorBelt domain role Id.
		/// </summary>
		public static readonly global::System.Guid CO_CB_ConveyorBeltDomainRoleId = new global::System.Guid(0x9240b350, 0xeb4d, 0x48b1, 0xb3, 0x4f, 0x91, 0x2a, 0xae, 0xf4, 0x7f, 0x99);
		
		/// <summary>
		/// DomainRole CO_CB_ConveyorBelt
		/// Description for
		/// MDC.ProductionSystem.ComponentIsOnConveyorBelt.CO_CB_ConveyorBelt
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.ComponentIsOnConveyorBelt/CO_CB_ConveyorBelt.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.ComponentIsOnConveyorBelt/CO_CB_ConveyorBelt.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "CO_CB_Components", PropertyDisplayNameKey="MDC.ProductionSystem.ComponentIsOnConveyorBelt/CO_CB_ConveyorBelt.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroOne)]
		[DslModeling::DomainObjectId("9240b350-eb4d-48b1-b34f-912aaef47f99")]
		public virtual ConveyorBelt CO_CB_ConveyorBelt
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (ConveyorBelt)DslModeling::DomainRoleInfo.GetRolePlayer(this, CO_CB_ConveyorBeltDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, CO_CB_ConveyorBeltDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access CO_CB_Conveyors of a Component
		/// <summary>
		/// Gets CO_CB_Conveyors.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static ConveyorBelt GetCO_CB_Conveyors(Component element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, CO_CB_ComponentDomainRoleId) as ConveyorBelt;
		}
		
		/// <summary>
		/// Sets CO_CB_Conveyors.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetCO_CB_Conveyors(Component element, ConveyorBelt newCO_CB_ConveyorBelt)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, CO_CB_ComponentDomainRoleId, newCO_CB_ConveyorBelt);
		}
		#endregion
		#region CO_CB_Component link accessor
		/// <summary>
		/// Get the ComponentIsOnConveyorBelt link to a Component.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.ComponentIsOnConveyorBelt GetLinkToCO_CB_Conveyors (global::MDC.ProductionSystem.Component cO_CB_ComponentInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt>(cO_CB_ComponentInstance, global::MDC.ProductionSystem.ComponentIsOnConveyorBelt.CO_CB_ComponentDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of CO_CB_Component not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region CO_CB_ConveyorBelt link accessor
		/// <summary>
		/// Get the ComponentIsOnConveyorBelt link to a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.ComponentIsOnConveyorBelt GetLinkToCO_CB_Components (global::MDC.ProductionSystem.ConveyorBelt cO_CB_ConveyorBeltInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt>(cO_CB_ConveyorBeltInstance, global::MDC.ProductionSystem.ComponentIsOnConveyorBelt.CO_CB_ConveyorBeltDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of CO_CB_ConveyorBelt not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region ComponentIsOnConveyorBelt instance accessors
		
		/// <summary>
		/// Get any ComponentIsOnConveyorBelt links between a given Component and a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt> GetLinks( global::MDC.ProductionSystem.Component source, global::MDC.ProductionSystem.ConveyorBelt target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt>(source, global::MDC.ProductionSystem.ComponentIsOnConveyorBelt.CO_CB_ComponentDomainRoleId);
			foreach ( global::MDC.ProductionSystem.ComponentIsOnConveyorBelt link in links )
			{
				if ( target.Equals(link.CO_CB_ConveyorBelt) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one ComponentIsOnConveyorBelt link between a given Componentand a ConveyorBelt.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.ComponentIsOnConveyorBelt GetLink( global::MDC.ProductionSystem.Component source, global::MDC.ProductionSystem.ConveyorBelt target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.ComponentIsOnConveyorBelt>(source, global::MDC.ProductionSystem.ComponentIsOnConveyorBelt.CO_CB_ComponentDomainRoleId);
			foreach ( global::MDC.ProductionSystem.ComponentIsOnConveyorBelt link in links )
			{
				if ( target.Equals(link.CO_CB_ConveyorBelt) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
namespace MDC.ProductionSystem
{
	/// <summary>
	/// DomainRelationship OperatorControlsProcessingUnits
	/// Description for MDC.ProductionSystem.OperatorControlsProcessingUnits
	/// </summary>
	[DslDesign::DisplayNameResource("MDC.ProductionSystem.OperatorControlsProcessingUnits.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("MDC.ProductionSystem.OperatorControlsProcessingUnits.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel))]
	[global::System.CLSCompliant(true)]
	[DslModeling::DomainRelationship()]
	[DslModeling::DomainObjectId("5d45f386-86d8-4a9f-8af2-05628646f116")]
	public partial class OperatorControlsProcessingUnits : DslModeling::ElementLink
	{
		#region Constructors, domain class Id
		
		/// <summary>
		/// OperatorControlsProcessingUnits domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x5d45f386, 0x86d8, 0x4a9f, 0x8a, 0xf2, 0x05, 0x62, 0x86, 0x46, 0xf1, 0x16);
	
				
		/// <summary>
		/// Constructor
		/// Creates a OperatorControlsProcessingUnits link in the same Partition as the given Operator
		/// </summary>
		/// <param name="source">Operator to use as the source of the relationship.</param>
		/// <param name="target">ProcessingUnit to use as the target of the relationship.</param>
		public OperatorControlsProcessingUnits(Operator source, ProcessingUnit target)
			: base((source != null ? source.Partition : null), new DslModeling::RoleAssignment[]{new DslModeling::RoleAssignment(OperatorControlsProcessingUnits.OP_PU_OperatorDomainRoleId, source), new DslModeling::RoleAssignment(OperatorControlsProcessingUnits.OP_PU_ProcessingUnitDomainRoleId, target)}, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public OperatorControlsProcessingUnits(DslModeling::Store store, params DslModeling::RoleAssignment[] roleAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public OperatorControlsProcessingUnits(DslModeling::Store store, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, roleAssignments, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		public OperatorControlsProcessingUnits(DslModeling::Partition partition, params DslModeling::RoleAssignment[] roleAssignments)
			: base(partition, roleAssignments, null)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new link is to be created.</param>
		/// <param name="roleAssignments">List of relationship role assignments.</param>
		/// <param name="propertyAssignments">List of properties assignments to set on the new link.</param>
		public OperatorControlsProcessingUnits(DslModeling::Partition partition, DslModeling::RoleAssignment[] roleAssignments, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, roleAssignments, propertyAssignments)
		{
		}
		#endregion
		#region OP_PU_Operator domain role code
		
		/// <summary>
		/// OP_PU_Operator domain role Id.
		/// </summary>
		public static readonly global::System.Guid OP_PU_OperatorDomainRoleId = new global::System.Guid(0x6f87480c, 0x8079, 0x4fb2, 0x92, 0xec, 0x4f, 0x41, 0xfe, 0xba, 0x21, 0xcc);
		
		/// <summary>
		/// DomainRole OP_PU_Operator
		/// Description for
		/// MDC.ProductionSystem.OperatorControlsProcessingUnits.OP_PU_Operator
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.OperatorControlsProcessingUnits/OP_PU_Operator.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.OperatorControlsProcessingUnits/OP_PU_Operator.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Source, PropertyName = "OP_PU_ProcessingUnits", PropertyDisplayNameKey="MDC.ProductionSystem.OperatorControlsProcessingUnits/OP_PU_Operator.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroOne)]
		[DslModeling::DomainObjectId("6f87480c-8079-4fb2-92ec-4f41feba21cc")]
		public virtual Operator OP_PU_Operator
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (Operator)DslModeling::DomainRoleInfo.GetRolePlayer(this, OP_PU_OperatorDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, OP_PU_OperatorDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access OP_PU_Operators of a ProcessingUnit
		/// <summary>
		/// Gets OP_PU_Operators.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static Operator GetOP_PU_Operators(ProcessingUnit element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, OP_PU_ProcessingUnitDomainRoleId) as Operator;
		}
		
		/// <summary>
		/// Sets OP_PU_Operators.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetOP_PU_Operators(ProcessingUnit element, Operator newOP_PU_Operator)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, OP_PU_ProcessingUnitDomainRoleId, newOP_PU_Operator);
		}
		#endregion
		#region OP_PU_ProcessingUnit domain role code
		
		/// <summary>
		/// OP_PU_ProcessingUnit domain role Id.
		/// </summary>
		public static readonly global::System.Guid OP_PU_ProcessingUnitDomainRoleId = new global::System.Guid(0xaa174dc3, 0x100a, 0x4d1a, 0xb4, 0x9b, 0x44, 0xc6, 0xed, 0xe8, 0x00, 0x4d);
		
		/// <summary>
		/// DomainRole OP_PU_ProcessingUnit
		/// Description for
		/// MDC.ProductionSystem.OperatorControlsProcessingUnits.OP_PU_ProcessingUnit
		/// </summary>
		[DslDesign::DisplayNameResource("MDC.ProductionSystem.OperatorControlsProcessingUnits/OP_PU_ProcessingUnit.DisplayName", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("MDC.ProductionSystem.OperatorControlsProcessingUnits/OP_PU_ProcessingUnit.Description", typeof(global::MDC.ProductionSystem.ProductionSystemDomainModel), "MDC.ProductionSystem.GeneratedCode.DomainModelResx")]
		[DslModeling::DomainRole(DslModeling::DomainRoleOrder.Target, PropertyName = "OP_PU_Operators", PropertyDisplayNameKey="MDC.ProductionSystem.OperatorControlsProcessingUnits/OP_PU_ProcessingUnit.PropertyDisplayName",  PropagatesCopy = DslModeling::PropagatesCopyOption.DoNotPropagateCopy, Multiplicity = DslModeling::Multiplicity.ZeroOne)]
		[DslModeling::DomainObjectId("aa174dc3-100a-4d1a-b49b-44c6ede8004d")]
		public virtual ProcessingUnit OP_PU_ProcessingUnit
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return (ProcessingUnit)DslModeling::DomainRoleInfo.GetRolePlayer(this, OP_PU_ProcessingUnitDomainRoleId);
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetRolePlayer(this, OP_PU_ProcessingUnitDomainRoleId, value);
			}
		}
				
		#endregion
		#region Static methods to access OP_PU_ProcessingUnits of a Operator
		/// <summary>
		/// Gets OP_PU_ProcessingUnits.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static ProcessingUnit GetOP_PU_ProcessingUnits(Operator element)
		{
			return DslModeling::DomainRoleInfo.GetLinkedElement(element, OP_PU_OperatorDomainRoleId) as ProcessingUnit;
		}
		
		/// <summary>
		/// Sets OP_PU_ProcessingUnits.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static void SetOP_PU_ProcessingUnits(Operator element, ProcessingUnit newOP_PU_ProcessingUnit)
		{
			DslModeling::DomainRoleInfo.SetLinkedElement(element, OP_PU_OperatorDomainRoleId, newOP_PU_ProcessingUnit);
		}
		#endregion
		#region OP_PU_Operator link accessor
		/// <summary>
		/// Get the OperatorControlsProcessingUnits link to a Operator.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.OperatorControlsProcessingUnits GetLinkToOP_PU_ProcessingUnits (global::MDC.ProductionSystem.Operator oP_PU_OperatorInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.OperatorControlsProcessingUnits> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.OperatorControlsProcessingUnits>(oP_PU_OperatorInstance, global::MDC.ProductionSystem.OperatorControlsProcessingUnits.OP_PU_OperatorDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of OP_PU_Operator not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region OP_PU_ProcessingUnit link accessor
		/// <summary>
		/// Get the OperatorControlsProcessingUnits link to a ProcessingUnit.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.OperatorControlsProcessingUnits GetLinkToOP_PU_Operators (global::MDC.ProductionSystem.ProcessingUnit oP_PU_ProcessingUnitInstance)
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.OperatorControlsProcessingUnits> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.OperatorControlsProcessingUnits>(oP_PU_ProcessingUnitInstance, global::MDC.ProductionSystem.OperatorControlsProcessingUnits.OP_PU_ProcessingUnitDomainRoleId);
			global::System.Diagnostics.Debug.Assert(links.Count <= 1, "Multiplicity of OP_PU_ProcessingUnit not obeyed.");
			if ( links.Count == 0 )
			{
				return null;
			}
			else
			{
				return links[0];
			}
		}
		#endregion
		#region OperatorControlsProcessingUnits instance accessors
		
		/// <summary>
		/// Get any OperatorControlsProcessingUnits links between a given Operator and a ProcessingUnit.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::System.Collections.ObjectModel.ReadOnlyCollection<global::MDC.ProductionSystem.OperatorControlsProcessingUnits> GetLinks( global::MDC.ProductionSystem.Operator source, global::MDC.ProductionSystem.ProcessingUnit target )
		{
			global::System.Collections.Generic.List<global::MDC.ProductionSystem.OperatorControlsProcessingUnits> outLinks = new global::System.Collections.Generic.List<global::MDC.ProductionSystem.OperatorControlsProcessingUnits>();
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.OperatorControlsProcessingUnits> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.OperatorControlsProcessingUnits>(source, global::MDC.ProductionSystem.OperatorControlsProcessingUnits.OP_PU_OperatorDomainRoleId);
			foreach ( global::MDC.ProductionSystem.OperatorControlsProcessingUnits link in links )
			{
				if ( target.Equals(link.OP_PU_ProcessingUnit) )
				{
					outLinks.Add(link);
				}
			}
			return outLinks.AsReadOnly();
		}
		/// <summary>
		/// Get the one OperatorControlsProcessingUnits link between a given Operatorand a ProcessingUnit.
		/// </summary>
		[global::System.Diagnostics.DebuggerStepThrough]
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011")]
		public static global::MDC.ProductionSystem.OperatorControlsProcessingUnits GetLink( global::MDC.ProductionSystem.Operator source, global::MDC.ProductionSystem.ProcessingUnit target )
		{
			global::System.Collections.Generic.IList<global::MDC.ProductionSystem.OperatorControlsProcessingUnits> links = DslModeling::DomainRoleInfo.GetElementLinks<global::MDC.ProductionSystem.OperatorControlsProcessingUnits>(source, global::MDC.ProductionSystem.OperatorControlsProcessingUnits.OP_PU_OperatorDomainRoleId);
			foreach ( global::MDC.ProductionSystem.OperatorControlsProcessingUnits link in links )
			{
				if ( target.Equals(link.OP_PU_ProcessingUnit) )
				{
					return link;
				}
			}
			return null;
		}
		
		#endregion
	}
}
