Beispiel #1
0
    def run(self):

        try:
            # self.cmd.run_simulation()
            engine.runSimulation()
        except Exception as e:
            wx.MessageBox(str(e.args[0]), 'Error', wx.OK | wx.ICON_ERROR)
Beispiel #2
0
    def on_run(self, e):
        # get data to send to the engine
        name = self.simulation_name_textbox.GetValue()
        db = self.database_combo.GetValue()
        # user_name = self.account_combo.GetValue()
        datasets = self.get_selected_items()

        user_info = self.get_user_info()

        # todo: check all constraints before executing a simulation
        # raise exceptions before executing the simulation
        if user_info is None:
            elog.critical(
                'Cannot execute simulation if no user account is provided')
            return

        # set a default simulation name if none is provided
        if name.strip() == '':
            name = "Simulation_run_" + time.strftime('%m-%d-%Y')

        # build kwargs to pass to engineAccessors
        kwargs = dict(simulationName=name,
                      dbName=db,
                      user_info=user_info,
                      datasets=datasets)

        # initiate simulation
        engineAccessors.runSimulation(**kwargs)

        self.Close()
Beispiel #3
0
    def run(self):

        try:
            # self.cmd.run_simulation()
            engine.runSimulation()
        except Exception as e:
            wx.MessageBox(str(e.args[0]), 'Error', wx.OK | wx.ICON_ERROR)