DOFOperationControlsetHeuristic Method OpenDOF Object Access Library
Set randomized acceptance of the operation.

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public void setHeuristic(
	short heuristic
)

Parameters

heuristic
Type: SystemInt16
The percentage of receivers that should take action based on the request. The valid range is from 0, representing 0% (or none), to 32767 (HEURISTIC_ALL), representing 100% (or all). The default is 32767 (all). This must not be negative.
Remarks

Set randomized acceptance of the operation. Rather than being exact, this parameter causes a heuristic algorithm on the responder where each picks a random number and compares it to the percentage. If their number is less than or equal to the percentage then they will take action and respond.

Since each responder determines whether to take action based solely on the percentage and the random number, this method does not cause any network synchronization of responders. It is guaranteed to have an effect on both the total number of responders that take action and on the total response count.

See Also

Reference