示例#1
0
 /// <summary>
 /// Sets up the Solution Manager for this solution
 /// </summary>
 /// <param name="connectionRetriever">the retriever to fetch connections from</param>
 public ProductionSolutionManager(IConnectionRetriever connectionRetriever)
     : base(connectionRetriever)
 {
     objs = new List <Objective>();
     objs.Add(new ObjectiveSetups());
     objs.Add(new ObjectiveLateOrders());
     objs.Add(new ObjectiveLateHighPriorityOrders());
     objs.Add(new ObjectiveMachineBalancing());
     population      = new ConcurrentBag <ISolution>();
     createrAgents   = new List <CreaterAgent>();
     workerAgents    = new List <WorkerAgent>();
     destroyerAgents = new List <DestroyerAgent>();
     createrAgents.Add(new AgentAssignOrdersRandomly(new DefaultAgentActivator(), new DefaultSolutionSelector()));
     workerAgents.Add(new AgentMoveRandomOrder(new NonZeroPopulationActivator(), new RandomSolutionSelector()));
     workerAgents.Add(new AgentAdvanceLateOrders(new NonZeroPopulationActivator(), new RandomSolutionSelector()));
     workerAgents.Add(new AgentSortByDueDate(new NonZeroPopulationActivator(), new RandomSolutionSelector()));
     destroyerAgents.Add(new RemoveDuplicates(this, new NonZeroPopulationActivator(), new DuplicateSolutionSelector()));
     destroyerAgents.Add(new RemoveDominatedSolutions(this, new NonZeroPopulationActivator(), new NonDominatedSolutionSelector()));
     DbApi = () => new DbApi(connectionRetriever);
 }
示例#2
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="connectionRetriever">the retriever from where to fetch the connection</param>
 protected SolutionManager(IConnectionRetriever connectionRetriever)
 {
     ConnectionRetriever = connectionRetriever;
 }
 /// <summary>
 /// The Connection Manager
 /// </summary>
 /// <param name="connectionRetriever">A way to retrieve connection making framework independant of where the connection is stored)</param>
 public DbApi(IConnectionRetriever connectionRetriever)
 {
     ConnectionRetriever = connectionRetriever;
 }
示例#4
0
 /// <summary>
 /// The Connection Manager
 /// </summary>
 /// <param name="retreiveCon">A way to retrieve connection making framework independant of where the connection is stored)</param>
 public DBConnection(IConnectionRetriever retreiveCon)
 {
     ConnectionRetriever = retreiveCon;
 }
 public BaseDataContext(IConnectionRetriever connectionRetriever)
     : base(connectionRetriever.GetConnectionStringName())
 {
 }