src/core/WeaponSystem.js
/**
	* Inits the fuzzy module for the assault rifle.
	*
	* @param {Object} fuzzySets - An object with predefined fuzzy sets.
	* @return {WeaponSystem} A reference to this weapon system.
	*/
Inits the fuzzy module for the assault rifle.
@param {Object} fuzzySets - An object with predefined fuzzy sets.
@return {WeaponSystem} A reference to this weapon system.
Inits the fuzzy module for the assault rifle . @param { Object } fuzzySets - An object with predefined fuzzy sets . @return { WeaponSystem } A reference to this weapon system .
_initAssaultRifleFuzzyModule( fuzzySets ) {
		const fuzzyModuleAssaultRifle = this.fuzzyModules.assaultRifle;
		const ammoStatusAssaultRifle = new FuzzyVariable();
		const lowAssault = new LeftShoulderFuzzySet( 0, 2, 8 );
		const okayAssault = new TriangularFuzzySet( 2, 10, 20 );
		const LoadsAssault = new RightShoulderFuzzySet( 10, 20, 30 );
		ammoStatusAssaultRifle.add( lowAssault );
		ammoStatusAssaultRifle.add( okayAssault );
		ammoStatusAssaultRifle.add( LoadsAssault );
		fuzzyModuleAssaultRifle.addFLV( 'ammoStatus', ammoStatusAssaultRifle );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetClose, lowAssault ), fuzzySets.undesirable ) );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetClose, okayAssault ), fuzzySets.desirable ) );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetClose, LoadsAssault ), fuzzySets.desirable ) );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetMedium, lowAssault ), fuzzySets.desirable ) );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetMedium, okayAssault ), fuzzySets.veryDesirable ) );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetMedium, LoadsAssault ), fuzzySets.veryDesirable ) );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetMedium, lowAssault ), fuzzySets.desirable ) );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetFar, okayAssault ), fuzzySets.veryDesirable ) );
		fuzzyModuleAssaultRifle.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetFar, LoadsAssault ), fuzzySets.veryDesirable ) );
		return this;
	}
_initAssaultRifleFuzzyModule ( fuzzySets ) { const fuzzyModuleAssaultRifle = this . fuzzyModules . assaultRifle ; const ammoStatusAssaultRifle = new FuzzyVariable ( ) ; const lowAssault = new LeftShoulderFuzzySet ( 0 , 2 , 8 ) ; const okayAssault = new TriangularFuzzySet ( 2 , 10 , 20 ) ; const LoadsAssault = new RightShoulderFuzzySet ( 10 , 20 , 30 ) ; ammoStatusAssaultRifle . add ( lowAssault ) ; ammoStatusAssaultRifle . add ( okayAssault ) ; ammoStatusAssaultRifle . add ( LoadsAssault ) ; fuzzyModuleAssaultRifle . addFLV ( 'ammoStatus' , ammoStatusAssaultRifle ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetClose , lowAssault ) , fuzzySets . undesirable ) ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetClose , okayAssault ) , fuzzySets . desirable ) ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetClose , LoadsAssault ) , fuzzySets . desirable ) ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetMedium , lowAssault ) , fuzzySets . desirable ) ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetMedium , okayAssault ) , fuzzySets . veryDesirable ) ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetMedium , LoadsAssault ) , fuzzySets . veryDesirable ) ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetMedium , lowAssault ) , fuzzySets . desirable ) ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetFar , okayAssault ) , fuzzySets . veryDesirable ) ) ; fuzzyModuleAssaultRifle . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetFar , LoadsAssault ) , fuzzySets . veryDesirable ) ) ; return this ; }
Inits the fuzzy module for the assault rifle.
Inits the fuzzy module for the assault rifle .
// FLV ammo status // rules