Skip to content

Commit

Permalink
Move BeliefsNetwork into Symu.DNA
Browse files Browse the repository at this point in the history
  • Loading branch information
lmorisse committed Aug 27, 2020
1 parent 9efc210 commit f85ed3c
Show file tree
Hide file tree
Showing 36 changed files with 23 additions and 729 deletions.
1 change: 1 addition & 0 deletions SourceCode/Symu/Classes/Agents/CognitiveAgent.Act.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ private SymuTask ConvertMessageIntoTask(Message message)
Weight = Environment.Organization.Communication.TimeSpent(message.Medium, false,
Environment.Organization.Models.RandomLevelValue),
Assigned = message.Receiver
//todo maybe define a specific KeyActivity to follow the time spent on messaging?
};

Environment.Messages.Result.ReceivedMessagesCost += task.Weight;
Expand Down
11 changes: 11 additions & 0 deletions SourceCode/Symu/Classes/Agents/CognitiveAgent.Tasking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,17 @@ public virtual void SwitchingContextModel()
/// <param name="timeSpent"></param>
public void AddTimeSpent(UId keyActivity, float timeSpent)
{
if (keyActivity == null)
{
// Task may not have a KeyActivity, a message transform into a task for example.
// This can be improve inCognitiveAgent.Act.ConvertMessageIntoTask
return;
}
if (TimeSpent == null)
{
throw new ArgumentNullException(nameof(TimeSpent));
}

if (!TimeSpent.ContainsKey(keyActivity))
{
TimeSpent.Add(keyActivity, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
using Symu.Common.Interfaces.Agent;
using Symu.Common.Interfaces.Entity;
using Symu.Common.Math.ProbabilityDistributions;
using Symu.DNA.Beliefs;
using Symu.DNA.Knowledges;
using Symu.Messaging.Templates;
using Symu.Repository.Entity;
using Symu.Repository.Networks;
using Symu.Repository.Networks.Beliefs;
using static Symu.Common.Constants;

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
using Symu.Common.Interfaces.Agent;
using Symu.Common.Interfaces.Entity;
using Symu.Common.Math.ProbabilityDistributions;
using Symu.DNA.Beliefs;
using Symu.Repository.Entity;
using Symu.Repository.Networks;
using Symu.Repository.Networks.Beliefs;
using Symu.Repository.Networks.Influences;

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

using System;
using Symu.Repository.Entity;
using Symu.Repository.Networks.Beliefs;

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Symu.Common;
using Symu.Messaging.Messages;
using Symu.Repository.Entity;
using Symu.Repository.Networks.Beliefs;

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Symu.Classes.Agents.Models.CognitiveModels;
using Symu.Common;
using Symu.Repository.Entity;
using Symu.Repository.Networks.Beliefs;

#endregion

Expand Down
2 changes: 1 addition & 1 deletion SourceCode/Symu/Classes/Murphies/MurphyIncompleteBelief.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

using System;
using Symu.Classes.Task;
using Symu.DNA.Beliefs;
using Symu.Repository.Entity;
using Symu.Repository.Networks.Beliefs;

#endregion

Expand Down
1 change: 0 additions & 1 deletion SourceCode/Symu/Classes/Organization/OrganizationModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using Symu.Common;
using Symu.Engine;
using Symu.Repository.Entity;
using Symu.Repository.Networks.Beliefs;
using Symu.Repository.Networks.Sphere;

#endregion
Expand Down
2 changes: 1 addition & 1 deletion SourceCode/Symu/Repository/Entity/AgentBelief.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using Symu.Common;
using Symu.Common.Interfaces.Entity;
using Symu.Common.Math.ProbabilityDistributions;
using Symu.Repository.Networks.Beliefs;
using Symu.DNA.Beliefs;
using static Symu.Common.Constants;

#endregion
Expand Down
1 change: 0 additions & 1 deletion SourceCode/Symu/Repository/Entity/Belief.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using Symu.Common.Math.ProbabilityDistributions;
using Symu.DNA.Beliefs;
using Symu.DNA.Knowledges;
using Symu.Repository.Networks.Beliefs;

#endregion

Expand Down
83 changes: 0 additions & 83 deletions SourceCode/Symu/Repository/Networks/Beliefs/AgentBeliefs.cs

This file was deleted.

80 changes: 0 additions & 80 deletions SourceCode/Symu/Repository/Networks/Beliefs/BeliefCollection.cs

This file was deleted.

0 comments on commit f85ed3c

Please sign in to comment.