Example #1
0
        public void CreateMachineAgents(FCentralResourceDefinition resourceDefinition)
        {
            // Create resource If Required
            var resourceAgent = Agent.Context.ActorOf(props: ResourceAgent.Resource.Props(actorPaths: Agent.ActorPaths
                                                                                          , time: Agent.CurrentTime
                                                                                          , debug: Agent.DebugThis
                                                                                          , principal: Agent.Context.Self)
                                                      , name: ("Resource(" + resourceDefinition.ResourceName + ")").ToActorName());

            Agent.Send(instruction: BasicInstruction.Initialize
                       .Create(target: resourceAgent
                               , message: ResourceAgent.Behaviour
                               .Factory.Central(resourceDefinition)));
        }
Example #2
0
 public Central(FCentralResourceDefinition resourceDefinition, SimulationType simulationType = SimulationType.None)
     : base(simulationType: simulationType)
 {
     _resourceDefinition = resourceDefinition;
 }
Example #3
0
 public static IBehaviour Central(FCentralResourceDefinition resourceDefinition)
 {
     return(new Central(resourceDefinition, SimulationType.Central));
 }
Example #4
0
 public static CreateMachineAgents Create(FCentralResourceDefinition message, IActorRef target)
 {
     return(new CreateMachineAgents(message: message, target: target));
 }