namespace IndustrialRoboticsControl

features
	RobotController {abstract}
		mandatory
			MainBoard {Model "MB-100", Cost 500, PowerUsage 12}
				or
					CPUCore {Type "LowEnd", Performance 5}
						mandatory
							CacheMemory {Size 16, Technology "SRAM"}
					CPUCore {Type "MidRange", Performance 10}
						mandatory
							CacheMemory {Size 32, Technology "SDRAM"}
					CPUCore {Type "HighEnd", Performance 20}
						mandatory
							CacheMemory {Size 64, Technology "DDR3"}
			SensorModule {Model "SM-800", Cost 150, PowerUsage 7}
				or
					CameraSensor {Resolution "HD", FieldOfView 120, Cost 60, PowerUsage 3}
						mandatory
							ImageProcessor {Type "LowEnd", Performance 2.5}
						optional
							LightingCorrection {Technology "LED", Efficiency 93}
					LaserSensor {Range 30, FieldOfView 100, Cost 45, PowerUsage 4}
						mandatory
							ImageProcessor {Type "MidRange", Performance 5.0}
						optional
							LightingCorrection {Technology "PWM", Efficiency 98}
					UltrasoundSensor {Range 5, FieldOfView 60, Cost 45, PowerUsage 2}
						mandatory
							ImageProcessor {Type "LowEnd", Performance 1.5}
			CommunicationModule {Model "CM-700", Cost 200, PowerUsage 8}
				or
					EthernetPort {Speed 1Gbps, Connector "RJ45", Cost 50, PowerUsage 2}
						mandatory
							QualityAssurance {Grade "High"}
					USBPort {Speed 12Mbps, Connector "TypeA", Cost 30, PowerUsage 2}
						mandatory
							QualityAssurance {Grade "Medium"}
					SerialPort {Speed 9600bps, Connector "DB-9", Cost 20, PowerUsage 1}
						mandatory
							QualityAssurance {Grade "Low"}
		optional
			BatteryPack {Capacity 24Ah, Voltage 24V, Weight 3.5kg, Cost 300}
				or
					LithiumIonCell {Chemistry "Li-ion", EnergyDensity 180Wh/kg, Capacity 24Ah, Voltage 24V, Weight 6kg, Cost 280}
						mandatory
							TemperatureManagementSystem {Type "ThermalPaste"}
					LithiumPolymerCell {Chemistry "LiPo", EnergyDensity 250Wh/kg, Capacity 12Ah, Voltage 12V, Weight 3.5kg, Cost 340}
						mandatory
							TemperatureManagementSystem {Type "HeatSink"}
			PowerSupplyUnit {Capacity 600W, InputVoltage "120-240V", Efficiency 87, Weight 4kg, Cost 100}
				mandatory
					FanModule {Speed 3000rpm, NoiseLevel 30dB}
				optional
					OvercurrentProtection {Threshold 15A, ResponseTime "5ms"}
			CoolingSystem {Type "Passive", Weight 2kg, Cost 50}
				or
					FanCooling {Speed 4000rpm, NoiseLevel 35dB, Weight 2.5kg, Cost 60}
						mandatory
							HeatSinkMaterial {Metallurgy "Aluminum"}
			StorageModule {Type "SolidState", Capacity 128GB, Speed "PCIe Gen3x4", PowerUsage 7W, Weight 0.3kg, Cost 60}
				mandatory
					FirmwareVersion {Value "V5.0", ReleaseDate "2023-06-01"}
			ExpansionCardSlot {Connector "PCIe x1", Width 16mm, Height 150mm, PowerUsage 2W, Weight 0.2kg, Cost 40}
				mandatory
					Compatibility {Devices "CameraSensor,LaserSensor,UltrasoundSensor"}
			WirelessModule {Standard "IEEE802.11ac", DataRate 1300Mbps, Range 50m, PowerUsage 2W, Weight 0.4kg, Cost 75}
				optional
					BandWidthExtender {Technology "Beamforming", RangeBoost 20m}
			HardwareWatchdog {ResetDelay "100ms", RecoveryTime "3s", PowerUsage 0.5W, Weight 0.1kg, Cost 25}
				mandatory
					FaultDetectionLevel {Type "Comprehensive"}
			RealTimeClockModule {BatteryType "SRAM", TimeSyncAccuracy "10us", PowerUsage 0.2W, Weight 0.3kg, Cost 40}
				mandatory
					SynchronizationSource {Protocol "NTP"}
	MotionControlSubsystem {abstract}
		or
			XAxisControl {Model "MCX-500", Precision 1mm, TravelRange 500mm, PowerUsage 8W, Weight 2kg, Cost 450}
				mandatory
					ServoMotor {Torque 3Nm, MaxSpeed 1000rpm, PowerUsage 8W, Weight 0.7kg, Cost 150}
					EncoderInterface {Resolution 1600PPI, Connectivity "RS-232"}
				optional
					LimitSwitches {Number 4, Type "Mechanical", Reversibility "Bidirectional"}
			YAxisControl {Model "MCY-600", Precision 1mm, TravelRange 600mm, PowerUsage 8W, Weight 2.5kg, Cost 500}
				mandatory
					ServoMotor {Torque 4Nm, MaxSpeed 1200rpm, PowerUsage 10W, Weight 1kg, Cost 200}
					EncoderInterface {Resolution 1600PPI, Connectivity "USB"}
				optional
					LimitSwitches {Number 4, Type "Mechanical", Reversibility "Bidirectional"}
			ZAxisControl {Model "MCZ-700", Precision 1mm, TravelRange 700mm, PowerUsage 8W, Weight 3kg, Cost 550}
				mandatory
					ServoMotor {Torque 5Nm, MaxSpeed 1400rpm, PowerUsage 12W, Weight 1.3kg, Cost 300}
					EncoderInterface {Resolution 1600PPI, Connectivity "Ethernet"}
				optional
					LimitSwitches {Number 4, Type "Mechanical", Reversibility "Bidirectional"}
			RotaryAxisControl {Model "MCRA-800", Precision 0.01deg, TravelRange 360deg, PowerUsage 5W, Weight 2kg, Cost 500}
				mandatory
					ServoMotor {Torque 2Nm, MaxSpeed 400rpm, PowerUsage 6W, Weight 1kg, Cost 250}
					EncoderInterface {Resolution 3200PPI, Connectivity "USB"}
				optional
					LimitSwitches {Number 2, Type "Optical", Reversibility "Bidirectional"}
			SecondRotaryAxisControl {Model "MCRB-900", Precision 0.01deg, TravelRange 360deg, PowerUsage 5W, Weight 2kg, Cost 400}
				mandatory
					ServoMotor {Torque 1Nm, MaxSpeed 200rpm, PowerUsage 4W, Weight 0.7kg, Cost 120}
					EncoderInterface {Resolution 3200PPI, Connectivity "Ethernet"}
				optional
					LimitSwitches {Number 2, Type "Optical", Reversibility "Bidirectional"}
	SensorIntegrationSubsystem {abstract}
		or
			ObjectDetectionSensor {Model "ODS-200", Range 5m, Resolution "4k", PowerUsage 8W, Weight 1kg, Cost 300}
				mandatory
					ImageProcessor {Type "MidRange", Performance 5.0}
				optional
					LightingCorrection {Technology "PWM", Efficiency 98}
			GroundContactSensor {Model "GCS-300", Range 20cm, PowerUsage 1W, Weight 0.5kg, Cost 50}
				mandatory
					SensitivityLevel {Threshold 0.5N, Sensitivity "High"}
			ForceTorqueSensor {Model "FTS-400", ForceRange 30N, TorqueRange 2Nm, PowerUsage 6W, Weight 1kg, Cost 400}
				mandatory
					MeasurementResolution {ForceResolution 0.01N, TorqueResolution 0.002Nm}
			ProximitySensor {Model "PS-500", Range 1m, PowerUsage 2W, Weight 0.3kg, Cost 70}
				mandatory
					SensitivityLevel {Threshold 0.1mm, Sensitivity "Medium"}
	RobotArmAssembly {abstract}
		or
			RoboticJointA {Model "RAJ-600", JointType "Revolute", DegreesOfFreedom "6DOF", PowerUsage 25W, Weight 5kg, Cost 800}
				mandatory
					MotorUnit {Torque 10Nm, MaxSpeed 300rpm, PowerUsage 20W, Weight 2kg, Cost 300}
				optional
					GearReductionSystem {Ratio "1:10", Efficiency 95}
			RoboticJointB {Model "RAJ-700", JointType "Revolute", DegreesOfFreedom "6DOF", PowerUsage 25W, Weight 5kg, Cost 800}
				mandatory
					MotorUnit {Torque 15Nm, MaxSpeed 350rpm, PowerUsage 22W, Weight 2.5kg, Cost 400}
				optional
					GearReductionSystem {Ratio "1:10", Efficiency 98}
			RoboticJointC {Model "RAJ-800", JointType "Revolute", DegreesOfFreedom "6DOF", PowerUsage 25W, Weight 5kg, Cost 800}
				mandatory
					MotorUnit {Torque 20Nm, MaxSpeed 400rpm, PowerUsage 24W, Weight 3kg, Cost 500}
				optional
					GearReductionSystem {Ratio "1:10", Efficiency 96}
			RoboticJointD {Model "RAJ-900", JointType "Revolute", DegreesOfFreedom "6DOF", PowerUsage 25W, Weight 5kg, Cost 800}
				mandatory
					MotorUnit {Torque 15Nm, MaxSpeed 320rpm, PowerUsage 22W, Weight 2.5kg, Cost 400}
				optional
					GearReductionSystem {Ratio "1:10", Efficiency 98}
			EndEffectorAssembly {Model "REE-1000", EndEffectorType "Gripper", DegreesOfFreedom "6DOF", PowerUsage 25W, Weight 4kg, Cost 700}
				mandatory
					GripMechanism {ActuatorType "Pneumatic", ForceRange 5N, Stroke 20mm, PowerUsage 10W, Weight 1.5kg, Cost 300}
					ForceFeedbackSensor {Type "LoadCell", Range 40N, PowerUsage 6W, Weight 1kg, Cost 300}

constraints
	CameraSensor.Resolution == "HD" => CameraSensor.FieldOfView > 100
	LaserSensor.Range + UltrasoundSensor.Range >= 35
	SerialPort.Speed < USBPort.Speed
	LithiumPolymerCell.Capacity * LithiumPolymerCell.Voltage <= 480
	EthernetPort.Connector == "RJ45" => EthernetPort.QualityAssurance.Grade <= "Medium"
	USBPort.Connector == "TypeA" => QualityAssurance.Grade != "High"
	SerialPort.Speed + USBPort.Speed <= 25Mbps
	LithiumIonCell.Capacity * LithiumIonCell.EnergyDensity >= 4320
	CameraSensor.FieldOfView + LaserSensor.FieldOfView > 180
	ServoMotor.MaxSpeed >= EncoderInterface.Resolution / 100
	XAxisControl.TravelRange + YAxisControl.TravelRange < 1500mm
	LimitSwitches.Type == "Mechanical" => LimitSwitches.Reversibility != "Unidirectional"
	SecondRotaryAxisControl.Model =~ /^MCR/
	BandWidthExtender.RangeBoost + WirelessModule.Range > 70m
	CoolingSystem.Type != "Passive" => CoolingSystem.Weight >= 3kg
	RoboticJointA.Torque * RoboticJointA.MotorUnit.Efficiency <= 50Nm
	HardwareWatchdog.ResetDelay < HardwareWatchdog.RecoveryTime / 10
	RealTimeClockModule.SyncAccuracy <= TimeSyncAccuracy / 2
	ServoMotor.PowerUsage + EncoderInterface.PowerUsage > 7W
	RoboticJointB.Torque * RoboticJointB.MotorUnit.Efficiency >= 60Nm
	LimitSwitches.Type == "Optical" => LimitSwitches.Reversibility != "Unidirectional"
	XAxisControl.Model =~ /^MCX/
	ObjectDetectionSensor.Range + ProximitySensor.Range > 5.5m
	GroundContactSensor.PowerUsage + ForceTorqueSensor.PowerUsage <= 10W
	ForceTorqueSensor.ForceRange * ForceTorqueSensor.TorqueRange >= 60NmN
	ImageProcessor.Performance < MeasurementResolution.ForceResolution
	ServoMotor.Speed > MotorUnit.MaxSpeed / 2
	LithiumPolymerCell.BatteryType == RealTimeClockModule.BatteryType
	RoboticJointC.Torque * RoboticJointC.MotorUnit.Efficiency >= 70Nm
	EthernetPort.Model =~ /^EM/
	WirelessModule.Standard =~ /^IEEE802\.11/
	LimitSwitches.Number != GearReductionSystem.Ratio / 10
	ServoMotor.MaxSpeed + EncoderInterface.Resolution > 300PPIrpm
	MotorUnit.MaxSpeed / JointType == DegreesOfFreedom
	ObjectDetectionSensor.Model =~ /^ODS/
	ProximitySensor.FieldOfView <= CameraSensor.FieldOfView / 2
	SensorModule.Weight * MainBoard.Weight >= 9kg
	XAxisControl.Precision + YAxisControl.Precision < 3mm
	LaserSensor.Connectivity == "USB" => LaserSensor.QualityAssurance.Grade != "High"
	RotaryAxisControl.JointType + DegreesOfFreedom == JointType
	ServoMotor.MaxSpeed * EncoderInterface.Resolution >= 100PPIrpm
	CameraSensor.ImageProcessor.Performance * CameraSensor.FieldOfView >= 360
	SerialPort.Connector =~ /^DB/
	MaxSpeed * SensorRange > PowerUsage / 10
	RoboticJointD.Torque * RoboticJointD.MotorUnit.Efficiency <= 60Nm
	CameraSensor.Model =~ /^CS/
	LimitSwitches.Type != "Photoelectric" => LimitSwitches.Reversibility == "Bidirectional"
	ServoMotor.MaxSpeed <= MotorUnit.PowerUsage * 10
	XAxisControl.DegreeOfFreedom + YAxisControl.DegreeOfFreedom >= 6DOF
	MotorUnit.Torque / JointType > Speed / 2
	MainBoard.Connectivity == EthernetPort.Connectivity
	RoboticJointD.Model =~ /^RAJ/
	LimitSwitches.FieldOfView <= CameraSensor.Resolution * 100
	SerialPort.QualityAssurance.Grade < USBPort.QualityAssurance.Grade
	CameraSensor.Connector != USBPort.Connector
	CameraSensor.Model == LaserSensor.Model => ObjectDetectionSensor.SensorType != ForceTorqueSensor.ForceRange
	LimitSwitches.Reversibility =~ /^Bidirectional/
	EncoderInterface.Resolution <= CameraSensor.Resolution * 10
	GuardedAccessControl.Level != LimitSwitches.Type
	XAxisControl.MaxSpeed >= MotorUnit.MaxPowerUsage / 2
	RoboticJointC.Model =~ /^RAJ/
	ServoMotor.PowerConsumption + EncoderInterface.PowerConsumption > 7W
	EndEffectorAssembly.ActuatorType == "Pneumatic" => CameraSensor.Sensitivity <= ForceTorqueSensor.Resolution / 10
	SerialPort.Speed * EthernetPort.Speed < WirelessModule.Bandwidth
	SerialPort.Connector =~ /^DB/
	ServoMotor.MaxSpeed + EncoderInterface.Resolution > 300PPIrpm
	SerialPort.QualityAssurance.Grade < USBPort.QualityAssurance.Grade
	LithiumPolymerCell.Model != LithiumIonCell.Model
	EthernetPort.Model =~ /^EM/
	FanModule.Model != GearReductionSystem.Model
	CameraSensor.FieldOfView + LaserSensor.FieldOfView > 200
	ImageProcessor.Connector == "USB" => ImageProcessor.QualityAssurance.Grade != "High"
	SerialPort.Connector =~ /^DB/
	MotorUnit.MaxSpeed / JointType == DegreesOfFreedom
	LimitSwitches.Type != "Photoelectric" => LimitSwitches.Reversibility == "Bidirectional"
	MaxSpeed * SensorRange > PowerUsage / 10
	RoboticJointD.Torque * RoboticJointD.MotorUnit.Efficiency <= 50Nm
	CameraSensor.Model =~ /^CS/
	LimitSwitches.Type != "Photoelectric" => LimitSwitches.Reversibility == "Bidirectional"
	ServoMotor.MaxSpeed <= MotorUnit.PowerUsage * 10
	XAxisControl.DegreeOfFreedom + YAxisControl.DegreeOfFreedom >= 6DOF
	MotorUnit.Torque / JointType > Speed / 2
	MainBoard.Connectivity == EthernetPort.Connectivity
	RoboticJointD.Model =~ /^RAJ/
	LimitSwitches.FieldOfView <= CameraSensor.Resolution * 100
	SerialPort.QualityAssurance.Grade < USBPort.QualityAssurance.Grade
	CameraSensor.Connector != USBPort.Connector