12from gams
import GamsWorkspace
29 wx.Frame.__init__(self, parent, id, title, size=size)
30 self.SetBackgroundColour(
"lightgrey")
32 wx.StaticText(self, -1,
"GAMS Log:", (10, 10))
33 self.
log = wx.TextCtrl(
34 self, pos=(10, 30), size=(565, 485), style=wx.TE_MULTILINE
37 self.
bu_run = wx.Button(self, -1,
"Run", (10, 520), (137, 33))
40 self.
bu_cancel = wx.Button(self, -1,
"Cancel", (360, 520), (105, 33))
44 self.
bu_close = wx.Button(self, -1,
"Close", (470, 520), (105, 33))
59 opt = ws.add_options()
60 opt.all_model_types =
"soplex"
61 self.
job = ws.add_job_from_file(
"lop.gms")
62 self.
job.
run(opt, output=writer)
67 def run(self, _event):
72 threading.Thread(target=self.
run_gams).start()
75if __name__ ==
"__main__":
76 app = wx.PySimpleApp()
def __init__(self, parent, id, title, size)
def __init__(self, text_ctrl)