Exemplo n.º 1
0
    def __init__(self, label, problem, options, src_dir=[], src_files=[]):
        Export.__init__(self, label, problem, options)

        source_dirs = ['point2point', 'point2point/admm', 'vehicles'] + src_dir
        src_files = src_files + [
            'ADMMPoint2Point.cpp', 'Point2Point.cpp', 'Vehicle.cpp'
        ]
        if problem.options['separate_build']:
            for updater in problem.updaters:
                dest_dir = os.path.join(self.options['directory'],
                                        str(updater)) + '/'
                self.export(source_dirs, dest_dir, src_files,
                            updater.father_updx, updater, updater.problem)
        else:
            updaters = problem.separate_per_build()
            if (len(updaters.keys()) == 1
                    and len(updaters.values()[0].keys()) == 1):
                updater = updaters.values()[0].values()[0][0]
                self.export(source_dirs, self.options['directory'], src_files,
                            updater.father_updx, updater, updater.problem)
            else:
                for veh_type, nghb_nr in updaters.items():
                    for nr, upd in nghb_nr.items():
                        dest_dir = os.path.join(self.options['directory'],
                                                veh_type + '_' + nr + 'nghb')
                        self.export(source_dirs, dest_dir, src_files,
                                    upd.father_updx, upd, upd.problem)
Exemplo n.º 2
0
	def __init__(self, app):
		self.app = app
		self._back = []
		self._recursing = False
		self._next_callback = None
		self.setup_widgets()
		Export.__init__(self)
		ImportVdf.__init__(self)
		ImportSccprofile.__init__(self)
Exemplo n.º 3
0
 def __init__(self, problem, options):
     Export.__init__(self, problem, options)
     self.father = problem.father
     self.problem = problem
     if len(problem.vehicles) > 1:
         raise ValueError(('Only export for single vehicle ' +
                           'problems is supported.'))
     self.vehicle = problem.vehicles[0]
     src_files = ['Point2Point.cpp', 'Vehicle.cpp']
     self.export(['point2point', 'vehicles', 'tests/point2point'], self.options['directory'], src_files, problem.father, problem)
Exemplo n.º 4
0
 def __init__(self, problem, options):
     Export.__init__(self, problem, options)
     self.father = problem.father
     self.problem = problem
     if len(problem.vehicles) > 1:
         raise ValueError(
             ('Only export for single vehicle ' + 'problems is supported.'))
     self.vehicle = problem.vehicles[0]
     src_files = ['Point2Point.cpp', 'Vehicle.cpp']
     self.export(['point2point', 'vehicles', 'tests/point2point'],
                 self.options['directory'], src_files, problem.father,
                 problem)
Exemplo n.º 5
0
    def __init__(self, problem, options, src_dir=[], src_files=[]):
        Export.__init__(self, problem, options)

        source_dirs = ['point2point', 'point2point/admm', 'vehicles'] + src_dir
        src_files = src_files + ['ADMMPoint2Point.cpp', 'Point2Point.cpp', 'Vehicle.cpp']
        if problem.options['separate_build']:
            for updater in problem.updaters:
                dest_dir = os.path.join(self.options['directory'], str(updater)) + '/'
                self.export(source_dirs, dest_dir, src_files, updater.father_updx, updater, updater.problem)
        else:
            updaters = problem.separate_per_build()
            if (len(updaters.keys()) == 1 and len(updaters.values()[0].keys()) == 1):
                updater = updaters.values()[0].values()[0][0]
                self.export(source_dirs, self.options['directory'], src_files, updater.father_updx, updater, updater.problem)
            else:
                for veh_type, nghb_nr in updaters.items():
                    for nr, upd in nghb_nr.items():
                        dest_dir = os.path.join(self.options['directory'], veh_type+'_'+nr+'nghb')
                        self.export(source_dirs, dest_dir, src_files, upd.father_updx, upd, upd.problem)