I have the following code to record the driver cases:
recorder = om.SqliteRecorder('cases.sql')
prob.driver.add_recorder(recorder)
...
prob.run_driver()
...
cr = om.CaseReader("cases.sql")
driver_cases = cr.get_cases('driver', recurse=False)
last_case = cr.get_case(driver_cases[-1])
I'm getting the following error on last line:
cur.execute("SELECT * FROM driver_iterations WHERE " sqlite3.InterfaceError: Error binding parameter :iteration_coordinate - probably unsupported type.
What may be the reason?
Once you have
driver_cases, obtained from theget_casesmethod you can simply issueAlternatively, you can use
cr.list_cases()to list the cases that way, which returns a string identifier for each case. Passing that string toget_caseshould then give you what you want.