Skip to content

Commit f03cc66

Browse files
fix snoptimizer syntax
1 parent 8b9caad commit f03cc66

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

examples/fun3d_examples/_ssw-testing/4_oml_shape.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,21 @@
314314
manager.register_to_problem(opt_problem)
315315

316316
# run an SNOPT optimization
317-
sol = snoptimizer = SNOPT(
317+
snoptimizer = SNOPT(
318318
options={
319319
"Verify level": 0,
320320
"Function precision": 1e-4,
321321
"Major Optimality tol": 1e-4,
322322
}
323323
)
324324

325+
sol = snoptimizer(
326+
opt_problem,
327+
sens=manager.eval_gradients,
328+
storeHistory=store_history_file,
329+
hotStart=hot_start_file,
330+
)
331+
325332
# print final solution
326333
sol_xdict = sol.xStar
327334
print(f"Final solution = {sol_xdict}", flush=True)

0 commit comments

Comments
 (0)