AABB
AlignmentBehavior
ArriveBehavior
AStar
BFS
BoundingSphere
BVH
BVHNode
Cell
CellSpacePartitioning
CohesionBehavior
CompositeGoal
ConvexHull
Corridor
CostTable
DFS
Dijkstra
Edge
EntityManager
EvadeBehavior
EventDispatcher
Behavior
FollowPathBehavior
FuzzyAND
FuzzyCompositeTerm
FuzzyFAIRLY
FuzzyModule
FuzzyOR
FuzzyRule
FuzzySet
FuzzyTerm
FuzzyVariable
FuzzyVERY
GameEntity
Goal
GoalEvaluator
Graph
GraphUtils
HalfEdge
HeuristicPolicyDijkstra
HeuristicPolicyEuclid
HeuristicPolicyEuclidSquared
HeuristicPolicyManhattan
InterposeBehavior
LeftSCurveFuzzySet
LeftShoulderFuzzySet
LineSegment
Logger
MathUtils
Matrix3
Matrix4
MemoryRecord
MemorySystem
MeshGeometry
MessageDispatcher
MovingEntity
NavEdge
NavMesh
NavMeshLoader
NavNode
Node
NormalDistFuzzySet
OBB
ObstacleAvoidanceBehavior
OffsetPursuitBehavior
OnPathBehavior
Path
Plane
Polygon
Polyhedron
PriorityQueue
PursuitBehavior
Quaternion
Ray
RectangleTriggerRegion
Regular
RightSCurveFuzzySet
RightShoulderFuzzySet
SAT
SeekBehavior
SeparationBehavior
SingletonFuzzySet
Smoother
SphericalTriggerRegion
State
StateMachine
SteeringBehavior
SteeringManager
Task
TaskQueue
Telegram
Think
Time
TriangularFuzzySet
Trigger
TriggerRegion
Vector3
Vehicle
Version
WanderBehavior

updateDegreeOfMembership

功能描述

更新属性值的隶属度。

语法

fuzzyLogic.FuzzyAND.updateDegreeOfMembership(inputValues)

参数

  • inputValues (必填):类型为对象,包含输入属性及其对应输入值的键值对。

返回值

  • 无返回值。

示例

const inputValues = {
  temperature: 20,
  humidity: 0.7
};

fuzzyLogic.FuzzyAND.updateDegreeOfMembership(inputValues);

实现原理

此函数会遍历所有输入属性,并调用相应输入属性的隶属函数,计算出其隶属度,并将结果保存在 FuzzyAND.inputValues 对象中。

注意事项

  • 必须在调用 addInputVariableaddOutputVariable 方法后调用本方法,否则无法正确计算隶属度。
  • 对象中的键名必须与通过 addInputVariableaddOutputVariable 添加的输入属性和输出属性的名称相对应,否则会报错。