コード例 #1
0
    def testParallelServers2(self):
        from dream.simulation.Examples.ParallelServers3 import main

        result = main(test=1)
        self.assertEquals(result["parts"], 2880)
        self.assertTrue(46.18 < result["working_ratio_M1"] < 46.19)
        self.assertTrue(3.81 < result["working_ratio_M2"] < 3.82)
コード例 #2
0
  def testJobShop2MC(self):
    from dream.simulation.Examples.JobShop2MC import main
    result = main()
    expectedResult=[['Queue1', 0], ['Machine1', 12.0], ['Queue3', 13.0], ['Machine3', 13.0], ['Queue2', 16.0], \
		['Machine2', 16.0], ['Exit', 18.0], ['Queue1', 0], ['Machine1', 10.0], ['Queue2', 12.0], ['Machine2', 12.0], \
		['Queue3', 16.0], ['Machine3', 16.0], ['Exit', 22.0], ['Queue1', 0], ['Machine1', 0], ['Queue3', 10.0], ['Machine3', 10.0], ['Exit', 13.0]]
    self.assertEquals(result, expectedResult)	
コード例 #3
0
    def testJobShop2RPC(self):
        from dream.simulation.Examples.JobShop2RPC import main

        result = main(test=1)
        expectedResult = [
            ["Queue1", 0],
            ["Machine1", 12.0],
            ["Queue3", 13.0],
            ["Machine3", 13.0],
            ["Queue2", 16.0],
            ["Machine2", 16.0],
            ["Exit", 18.0],
            ["Queue1", 0],
            ["Machine1", 10.0],
            ["Queue2", 12.0],
            ["Machine2", 12.0],
            ["Queue3", 16.0],
            ["Machine3", 16.0],
            ["Exit", 22.0],
            ["Queue1", 0],
            ["Machine1", 0],
            ["Queue3", 10.0],
            ["Machine3", 10.0],
            ["Exit", 13.0],
        ]
        self.assertEquals(result, expectedResult)
コード例 #4
0
    def testSettingWip3(self):
        from dream.simulation.Examples.SettingWip3 import main

        result = main(test=1)
        self.assertEquals(result["parts"], 2)
        self.assertEquals(result["simulationTime"], 0.35)
        self.assertEquals(result["working_ratio"], 100)
コード例 #5
0
    def testParallelServers1(self):
        from dream.simulation.Examples.ParallelServers1 import main

        result = main(test=1)
        self.assertEquals(result["parts"], 2880)
        self.assertTrue(23.09 < result["working_ratio_M1"] < 23.1)
        self.assertTrue(26.9 < result["working_ratio_M2"] < 26.91)
コード例 #6
0
 def testSerialBatchProcessing(self):
   from dream.simulation.Examples.SerialBatchProcessing import main
   result = main()
   self.assertEquals(result['batches'], 359)
   self.assertTrue(0.104 < result["waiting_ratio_M1"] < 0.105)
   self.assertTrue(0.104 < result["waiting_ratio_M2"] < 0.105)
   self.assertTrue(75.06 < result["waiting_ratio_M3"] < 75.07)
コード例 #7
0
    def testChangingPredecessors(self):
        from dream.simulation.Examples.ChangingPredecessors import main

        result = main(test=1)
        self.assertEquals(result["parts"], 10)
        self.assertEquals(result["simulationTime"], 36.0)
        self.assertTrue(83.32 < result["working_ratio"] < 83.34)
コード例 #8
0
 def testClearBatchLines(self):
   from dream.simulation.Examples.ClearBatchLines import main
   result = main()
   self.assertEquals(result['batches'], 89)
   self.assertTrue(0.069 < result["waiting_ratio_M1"] < 0.07)
   self.assertTrue(0.104 < result["waiting_ratio_M2"] < 0.105)
   self.assertTrue(93.81 < result["waiting_ratio_M3"] < 93.82)
コード例 #9
0
 def testDecompositionOfBatches(self):
   from dream.simulation.Examples.DecompositionOfBatches import main
   result = main()
   self.assertEquals(result['subbatches'], 2303)
   self.assertTrue(79.96 < result["working_ratio"] < 79.97)
   self.assertEquals(result["blockage_ratio"] , 0.0)
   self.assertTrue(20.03 < result["waiting_ratio"] < 20.04)
コード例 #10
0
 def testDecompositionOfBatches(self):
     from dream.simulation.Examples.DecompositionOfBatches import main
     result = main(test=1)
     self.assertEquals(result['subbatches'], 2302)
     self.assertTrue(79.96 < result["working_ratio"] < 79.97)
     self.assertEquals(result["blockage_ratio"], 0.0)
     self.assertTrue(20.03 < result["waiting_ratio"] < 20.04)
コード例 #11
0
 def testClearBatchLines(self):
     from dream.simulation.Examples.ClearBatchLines import main
     result = main(test=1)
     self.assertEquals(result['batches'], 89)
     self.assertTrue(0.069 < result["waiting_ratio_M1"] < 0.07)
     self.assertTrue(0.104 < result["waiting_ratio_M2"] < 0.105)
     self.assertTrue(93.81 < result["waiting_ratio_M3"] < 93.82)
コード例 #12
0
  def testJobShop2Priority(self):
    from dream.simulation.Examples.JobShop2Priority import main
    result = main(test=1)
    expectedResult=[['Queue1', 0], ['Machine1', 10.0], ['Queue3', 11.0], ['Machine3', 13.0], ['Queue2', 16.0], \
		['Machine2', 17.0], ['Exit', 19.0], ['Queue1', 0], ['Machine1', 11.0], ['Queue2', 13.0], ['Machine2', 13.0], ['Queue3', 17.0], \
		['Machine3', 17.0], ['Exit', 23.0], ['Queue1', 0], ['Machine1', 0], ['Queue3', 10.0], ['Machine3', 10.0], ['Exit', 13.0]]
    self.assertEquals(result, expectedResult)	
コード例 #13
0
 def testSerialBatchProcessing(self):
     from dream.simulation.Examples.SerialBatchProcessing import main
     result = main(test=1)
     self.assertEquals(result['batches'], 359)
     self.assertTrue(0.104 < result["waiting_ratio_M1"] < 0.105)
     self.assertTrue(0.104 < result["waiting_ratio_M2"] < 0.105)
     self.assertTrue(75.06 < result["waiting_ratio_M3"] < 75.07)
コード例 #14
0
 def testJobShop1(self):
     from dream.simulation.Examples.JobShop1 import main
     result = main(test=1)
     expectedResult = [['Queue1', 0], ['Machine1', 0], ['Queue3', 1.0],
                       ['Machine3', 1.0], ['Queue2', 4.0],
                       ['Machine2', 4.0], ['Exit', 6.0]]
     self.assertEquals(result, expectedResult)
コード例 #15
0
 def testJobShop2MC(self):
     from dream.simulation.Examples.JobShop2MC import main
     result = main(test=1)
     expectedResult=[['Queue1', 0], ['Machine1', 12.0], ['Queue3', 13.0], ['Machine3', 13.0], ['Queue2', 16.0], \
   ['Machine2', 16.0], ['Exit', 18.0], ['Queue1', 0], ['Machine1', 10.0], ['Queue2', 12.0], ['Machine2', 12.0], \
   ['Queue3', 16.0], ['Machine3', 16.0], ['Exit', 22.0], ['Queue1', 0], ['Machine1', 0], ['Queue3', 10.0], ['Machine3', 10.0], ['Exit', 13.0]]
     self.assertEquals(result, expectedResult)
コード例 #16
0
    def testTwoServers(self):
        from dream.simulation.Examples.TwoServers import main

        result = main(test=1)
        self.assertEquals(result["parts"], 732)
        self.assertTrue(78.17 < result["blockage_ratio"] < 78.18)
        self.assertTrue(26.73 < result["working_ratio"] < 27.74)
コード例 #17
0
 def testParallelServers3(self):
   from dream.simulation.Examples.ParallelServers3 import main
   result = main()
   self.assertEquals(result['parts'], 2880)
   self.assertTrue(46.18 < result["working_ratio_M1"] < 46.19)
   self.assertTrue(3.81 < result["working_ratio_M2"] < 3.82)
   self.assertEquals(result['NumM1'], 2660)
   self.assertEquals(result['NumM2'], 220)
コード例 #18
0
 def testParallelServers4(self):
     from dream.simulation.Examples.ParallelServers4 import main
     result = main(test=1)
     self.assertEquals(result['parts'], 2880)
     self.assertTrue(46.18 < result["working_ratio_M1"] < 46.19)
     self.assertTrue(3.81 < result["working_ratio_M2"] < 3.82)
     self.assertEquals(result['NumM1'], 2660)
     self.assertEquals(result['NumM2'], 220)
コード例 #19
0
    def testJobShop1(self):
        from dream.simulation.Examples.JobShop1 import main

        result = main(test=1)
        expectedResult = [
            ["Queue1", 0],
            ["Machine1", 0],
            ["Queue3", 1.0],
            ["Machine3", 1.0],
            ["Queue2", 4.0],
            ["Machine2", 4.0],
            ["Exit", 6.0],
        ]
        self.assertEquals(result, expectedResult)
コード例 #20
0
 def testSettingWip2(self):
   from dream.simulation.Examples.SettingWip2 import main
   result = main(test=1)
   self.assertEquals(result['parts'], 2)
   self.assertEquals(result['simulationTime'], 0.50)	
   self.assertEquals(result["working_ratio"], 100)
コード例 #21
0
 def testServerWithShift4(self):
   from dream.simulation.Examples.ServerWithShift4 import main
   result = main(test=1)
   self.assertEquals(result['parts'], 2)
   self.assertTrue(29.99 < result["working_ratio"] < 30.01)
コード例 #22
0
 def testSingleServer(self):
     from dream.simulation.Examples.SingleServer import main
     result = main(test=1)
     self.assertEquals(result['parts'], 2880)
     self.assertTrue(49.99 < result["working_ratio"] < 50.01)
コード例 #23
0
 def testBalancingABuffer(self):
   from dream.simulation.Examples.BalancingABuffer import main
   result = main(test=1)
   self.assertEquals(result['parts'], 13)
   self.assertEquals(result["working_ratio"], 80)
コード例 #24
0
 def testSingleServer(self):
   from dream.simulation.Examples.SingleServer import main
   result = main()
   self.assertEquals(result['parts'], 2880)
   self.assertTrue(49.99 < result["working_ratio"] < 50.01)
コード例 #25
0
 def testServerWithShift4(self):
     from dream.simulation.Examples.ServerWithShift4 import main
     result = main(test=1)
     self.assertEquals(result['parts'], 2)
     self.assertTrue(29.99 < result["working_ratio"] < 30.01)
コード例 #26
0
 def testJobShop2ScenarioAnalysis(self):
     from dream.simulation.Examples.JobShop2ScenarioAnalysis import main
     result = main(test=1)
     self.assertEquals(result, 2)
コード例 #27
0
 def testJobShop2ScenarioAnalysis(self):
   from dream.simulation.Examples.JobShop2ScenarioAnalysis import main
   result = main(test=1)
   self.assertEquals(result, 2)
コード例 #28
0
 def testCompoundMachine(self):
   from dream.simulation.Examples.CompoundMachine import main
   result = main(test=1)
   self.assertTrue(5.8 < result < 5.9)
コード例 #29
0
 def testCompoundMachine(self):
     from dream.simulation.Examples.CompoundMachine import main
     result = main(test=1)
     self.assertTrue(5.8 < result < 5.9)
コード例 #30
0
 def testNonStarvingLineBatches(self):
   from dream.simulation.Examples.NonStarvingLineBatches import main
   result = main(test=1)
   self.assertEquals(result['batches'], 4)
   self.assertEquals(result["working_ratio"], 100)
コード例 #31
0
 def testJobShop1(self):
   from dream.simulation.Examples.JobShop1 import main
   result = main()
   expectedResult=[['Queue1', 0], ['Machine1', 0], ['Queue3', 1.0], ['Machine3', 1.0], ['Queue2', 4.0], ['Machine2', 4.0], ['Exit', 6.0]]
   self.assertEquals(result, expectedResult)
コード例 #32
0
 def testBalancingABuffer(self):
     from dream.simulation.Examples.BalancingABuffer import main
     result = main(test=1)
     self.assertEquals(result['parts'], 13)
     self.assertEquals(result["working_ratio"], 80)
コード例 #33
0
 def testServerWithShift3(self):
   from dream.simulation.Examples.ServerWithShift3 import main
   result = main()
   self.assertEquals(result['parts'], 4)
   self.assertTrue(59.99 < result["working_ratio"] < 60.01)
コード例 #34
0
 def testBufferAllocation(self):
     from dream.simulation.Examples.BufferAllocation import main
     result = main(test=1)
     self.assertTrue(80 < result["parts"] < 1000)
コード例 #35
0
 def testBufferAllocation(self):
   from dream.simulation.Examples.BufferAllocation import main
   result = main(test=1)
   self.assertTrue(80 < result["parts"] < 1000)
   
コード例 #36
0
 def testTwoServers(self):
     from dream.simulation.Examples.TwoServers import main
     result = main(test=1)
     self.assertEquals(result['parts'], 732)
     self.assertTrue(78.17 < result["blockage_ratio"] < 78.18)
     self.assertTrue(26.73 < result["working_ratio"] < 27.74)
コード例 #37
0
 def testAssemblyLine(self):
   from dream.simulation.Examples.AssemblyLine import main
   result = main()
   self.assertEquals(result['frames'], 664)
   self.assertTrue(92.36 < result["working_ratio"] < 93.37)
コード例 #38
0
 def testAssemblyLine(self):
     from dream.simulation.Examples.AssemblyLine import main
     result = main(test=1)
     self.assertEquals(result['frames'], 664)
     self.assertTrue(92.36 < result["working_ratio"] < 93.37)
コード例 #39
0
 def testNonStarvingLineBatches(self):
     from dream.simulation.Examples.NonStarvingLineBatches import main
     result = main(test=1)
     self.assertEquals(result['batches'], 4)
     self.assertEquals(result["working_ratio"], 100)
コード例 #40
0
 def testParallelServers1(self):
     from dream.simulation.Examples.ParallelServers1 import main
     result = main(test=1)
     self.assertEquals(result['parts'], 2880)
     self.assertTrue(23.09 < result["working_ratio_M1"] < 23.1)
     self.assertTrue(26.9 < result["working_ratio_M2"] < 26.91)
コード例 #41
0
 def testSettingWip3(self):
     from dream.simulation.Examples.SettingWip3 import main
     result = main(test=1)
     self.assertEquals(result['parts'], 2)
     self.assertEquals(result['simulationTime'], 0.35)
     self.assertEquals(result["working_ratio"], 100)
コード例 #42
0
    def testNonStarvingLine(self):
        from dream.simulation.Examples.NonStarvingLine import main

        result = main(test=1)
        self.assertEquals(result["parts"], 9)
        self.assertEquals(result["working_ratio"], 100)
コード例 #43
0
 def testChangingPredecessors(self):
     from dream.simulation.Examples.ChangingPredecessors import main
     result = main(test=1)
     self.assertEquals(result['parts'], 10)
     self.assertEquals(result['simulationTime'], 36.0)
     self.assertTrue(83.32 < result["working_ratio"] < 83.34)
コード例 #44
0
    def testServerWithShift2(self):
        from dream.simulation.Examples.ServerWithShift2 import main

        result = main(test=1)
        self.assertEquals(result["parts"], 16)
        self.assertTrue(49.99 < result["working_ratio"] < 50.01)