Exemplo n.º 1
0
Arquivo: gui.py Projeto: DStrama/boil
def helperFunction():
    #popyt odbiorców
    demand = [int(popyt1.get()), int(popyt2.get()), int(popyt3.get())]
    #podaz dostawcow
    supply = [int(podaz1.get()), int(podaz2.get())]
    transport_cost = [[int(kt11.get()),
                       int(kt12.get()),
                       int(kt13.get())],
                      [int(kt21.get()),
                       int(kt22.get()),
                       int(kt23.get())]]

    # cena sprzedazy
    demand_cost = [int(cs1.get()), int(cs2.get()), int(cs3.get())]
    # cena zakupu
    supply_cost = [int(cz1.get()), int(cz2.get())]

    # demand_cost = [10, 8, 10 , 8]
    # supply_cost = [5, 5]
    # transport_cost = [[5, 2, 4, 3], [3, 1, 7, 3]]
    # demand = [10, 10, 10, 10]
    # supply = [15, 2

    # demand_cost = [15, 14, 16]
    # supply_cost = [6, 9]
    # transport_cost = [[5, 3, 8], [9, 2, 4]]
    # demand = [10, 30, 10]
    # supply = [20, 30]

    cal = calculation.Calculation(supply, demand, transport_cost, supply_cost,
                                  demand_cost)

    show_results(cal.solve_problem())
Exemplo n.º 2
0
 def __init__(self, xml, brokens=None, camSplit=26):
     if not os.path.exists(xml):
         print(f"Error: {xml} is not presented!")
         sys.exit()
     model = pfiDesign.PFIDesign(xml)
     self.cal = calculation.Calculation(model, brokens, camSplit)
#!/usr/local/bin/python

import experiment as exp
import calculation as clc
import noise as nse

#Instantiate classes
pb2  = exp.PB2()
calc = clc.Calculation()

#Calculate sensitivity table for PB2
calc.makeSensTable(pb2)
Exemplo n.º 4
0
 def setup_class(cls):
     print('start')
     cls.cal = calculation.Calculation()
Exemplo n.º 5
0
import download
import json
import re
import os
import train
import config
import time
import calculation


if __name__ == '__main__':
    if config.SPIDER == True:
        tra = train.Train()
        sql_results = tra.get_site()
        results = tra.judge(sql_results)
        print(results)
        for start in results:
            for end in results:
                if start[3] == end[3]:
                    continue

                for datetime in config.TIME_LIST:
                    start_url = config.START_URL.format(start=start[3], end=end[3], datetime=datetime)
                    print(start[2] + ' to ' + end[2] + ' time: ' + datetime)
                    print(start_url)
                    tra.get_results(start_url,start,end,datetime)
                    time.sleep(1)
    elif config.Calculation == True:
        cal = calculation.Calculation()
        cal.start()
Exemplo n.º 6
0
 def setUp(self):
     self.cal = calculation.Calculation()