Information Technology Reference
In-Depth Information
Algorithm 6 .
Detecting Conflicts
Require:
fulfilSet
NF: norms stored in the fulfil set
Require:
vilateSet
NV: norms stored in the violate set
1:
for all
Norm n1 in NF
do
2:
for all
Norm n2 in NF
do
3:
if
n1.State == n2.State and (n1.DeonticConcept == Obligation and n2.DeonticConcept
== Prohibition) or (n2.DeonticConcept == Obligation and n1.DeonticConcept == Pro-
hibition)
then
4: Execute Algorithm 7 using n1 and n2
5:
end if
6:
end for
7:
end for
8:
for all
Norm n1 in NV
do
9:
for all
Norm n2 in NV
do
10:
if
n1.State == n2.State and (n1.DeonticConcept == Obligation and n2.DeonticConcept
== Prohibition) or (n2.DeonticConcept == Obligation and n1.DeonticConcept == Pro-
hibition)
then
11: Execute Algorithm 7 using n1 and n2
12:
end if
13:
end for
14:
end for
Algorithm 7 .
Solving Conflicts
Require:
fulfilSet
NF: norms stored in the fulfil set
Require:
vilateSet
NV: norms stored in the violate set
1: fulfiln1 = Execute Algorithm 3 using n1
2: violaten2 = Execute Algorithm 4 using n2
3: fulfiln2 = Execute Algorithm 3 using n2
4: violaten1 = Execute Algorithm 4 using n1
5:
if
fulfiln1 + violaten2
>
= fulfiln2 + violaten1
then
6: NF.
remove(n2)
7: NV.
remove(n1)
8:
else
9: NF.
remove(n1)
10: NV.
remove(n2)
11:
end if
are shown in Tables 1, 3 and 2 that indicates the contribution of each norm element to
the achievement of the agent goals. We consider that any norm element generates the
same contribution that is 1.
After analysing the contribution of the norms shown in Tables 1, 3 and 2, Norm 1 is
included in the set of norms to be fulfilled since the contribution for fulfilling it is equal
to “+3” and greater than the contribution for violating it that is equal to “-1”. Norm 2 is
also included in the fulfil set since the contribution for fulfilling it is equal to “-1” and
greater than the contribution for violating it that is equal to “-2”. And, finally, Norm 3
is included in the fulfil set since the contribution for fulfilling it is equal to “+1” and