コード例 #1
0
 protected TapeSegContextBase(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext)
 {
     this.meapContext    = meapContext;
     this.tapeSegContext = tapeSegContext;
 }
コード例 #2
0
        public void RetrievePath()
        {
            log.Info("Start retrieve path");

            while (true)
            {
                TapeSegContext currentTapeSegContext = meapContext.TapeSegContext;

                foreach (long forwardNodeId in currentTapeSegContext.TConsistPathNodes)
                {
                    TapeSegContext forwardTapeSegContext = new(currentTapeSegContext);
                    forwardTapeSegContext.PartialTConsistPath.Add(forwardNodeId);

                    meapContext.TapeSegContext = forwardTapeSegContext;

                    DetermineIfExistsTCPath determineIfExistsTCSeq = new(meapContext);
                    determineIfExistsTCSeq.RunToRetrievePath();

                    if (meapContext.TapeSegContext.TapeSegPathFound)
                    {
                        CopyResultFromTapeSegContext();

                        return;
                    }

                    if (meapContext.TapeSegContext.TapeSegPathExists)
                    {
                        break;
                    }
                }
            }
        }
コード例 #3
0
 public CommoditiesSelector(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext)
 {
     this.meapContext    = meapContext;
     this.tapeSegContext = tapeSegContext;
 }
コード例 #4
0
 public LinEquationsSetBuilder(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     LinEquationContext linEquationContext)
     : base(meapContext, tapeSegContext, linEquationContext)
 {
 }
コード例 #5
0
 protected LinEqsSetBuilder(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     LinEquationContext linEquationContext)
     : base(meapContext, tapeSegContext, linEquationContext)
 {
 }
コード例 #6
0
 public CommTConsistPathFinder(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     LinEquationContext linEquationContext)
     : base(meapContext, tapeSegContext, linEquationContext)
 {
 }
コード例 #7
0
 public LPTConsistPathFinder(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     LinEquationContext linEquationContext)
     : base(meapContext, tapeSegContext, linEquationContext)
 {
     this.configuration = Core.AppContext.GetConfiguration();
 }
コード例 #8
0
 public LinEquationsContextBase(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     LinEquationContext linEquationContext)
     : base(meapContext, tapeSegContext)
 {
     this.linEquationContext = linEquationContext;
 }
コード例 #9
0
 public LinEqsSetBuilder GetLinEquationsSetBuilder(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     LinEquationContext linEquationContext)
 {
     return(new LinEquationsSetBuilder(
                meapContext,
                tapeSegContext,
                linEquationContext));
 }
コード例 #10
0
 public NotUsedCommsDetector(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     SortedDictionary <long, Commodity> commoditiesSubset,
     NodesCoverageKeeper nodesCoverageKeeper)
 {
     this.meapContext         = meapContext;
     this.tapeSegContext      = tapeSegContext;
     this.commoditiesSubset   = commoditiesSubset;
     this.nodesCoverageKeeper = nodesCoverageKeeper;
 }
コード例 #11
0
 public NodesCoverageKeeper(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     SortedDictionary <long, Commodity> commoditiesSubset,
     SortedSet <long> totalExcludedComms)
 {
     this.meapContext        = meapContext;
     this.tapeSegContext     = tapeSegContext;
     this.commoditiesSubset  = commoditiesSubset;
     this.totalExcludedComms = totalExcludedComms;
 }
コード例 #12
0
 protected CommodityChecker(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     Commodity commodity,
     SortedSet <long> tConsistPathComms,
     SortedSet <long> tInconsistPathComms)
     : base(meapContext, tapeSegContext)
 {
     this.commodity           = commodity;
     this.tConsistPathComms   = tConsistPathComms;
     this.tInconsistPathComms = tInconsistPathComms;
 }
コード例 #13
0
        public TapeSegRunner(
            long id,
            MEAPContext meapContext,
            TapeSegContext tapeSegContext,
            List <TapeSegRunnerState> allowedStates
            )
            : base(meapContext, tapeSegContext)
        {
            this.configuration = Core.AppContext.GetConfiguration();

            this.Id = id;
            this.tapeSegRunnerStateTable = new TapeSegRunnerStateTable(allowedStates);
        }
コード例 #14
0
 public CommodityChecker GetTCPEPCommChecker(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     Commodity commodity,
     SortedSet <long> tConsistPathComms,
     SortedSet <long> tInconsistPathComms)
 {
     return(new CommodityCheckerSparseMThreads(
                meapContext,
                tapeSegContext,
                commodity,
                tConsistPathComms,
                tInconsistPathComms));
 }
コード例 #15
0
 public CommodityCheckerSparse(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext,
     Commodity commodity,
     SortedSet <long> tConsistPathComms,
     SortedSet <long> tInconsistPathComms)
     : base(
         meapContext,
         tapeSegContext,
         commodity,
         tConsistPathComms,
         tInconsistPathComms)
 {
     this.configuration = Core.AppContext.GetConfiguration();
 }
コード例 #16
0
 protected TCPEPSolver(MEAPContext meapContext, TapeSegContext tapeSegContext)
     : base(meapContext, tapeSegContext)
 {
 }
コード例 #17
0
 public CheckKZetaGraphs(MEAPContext meapContext, TapeSegContext tapeSegContext)
     : base(meapContext, tapeSegContext)
 {
 }
コード例 #18
0
 public StrongConnCommsBuilder(MEAPContext meapContext, TapeSegContext tapeSegContext)
     : base(meapContext, tapeSegContext)
 {
 }
コード例 #19
0
 public TCPEPSolver GetTCPEPSolver(
     MEAPContext meapContext,
     TapeSegContext tapeSegContext)
 {
     return(new TCPEPLPSolver(meapContext, tapeSegContext));
 }
コード例 #20
0
 public TapeSegContext(TapeSegContext tapeSegContext)
 {
     this.TapeSeg             = new LongSegment(tapeSegContext.TapeSeg);
     this.PartialTConsistPath = new List <long>(tapeSegContext.PartialTConsistPath);
     this.TConsistPathNodes   = new List <long>(tapeSegContext.TConsistPathNodes);
 }
コード例 #21
0
 public TCPEPLPSolver(MEAPContext meapContext, TapeSegContext tapeSegContext)
     : base(meapContext, tapeSegContext)
 {
     this.configuration = Core.AppContext.GetConfiguration();
 }