Skip to content

Commit

Permalink
blacked
Browse files Browse the repository at this point in the history
  • Loading branch information
EveCharbie committed Mar 15, 2024
1 parent ef1ec15 commit 470e76e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bioptim/gui/ipopt_output_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def create_ipopt_output_plot(ocp, interface):
plot = axs[i].plot([0], [1], linestyle="-", marker=".", color=colors(i / 3))
plots.append(plot[0])
axs[i].grid(True)
axs[i].set_yscale('log')
axs[i].set_yscale("log")

Check warning on line 23 in bioptim/gui/ipopt_output_plot.py

View check run for this annotation

Codecov / codecov/patch

bioptim/gui/ipopt_output_plot.py#L17-L23

Added lines #L17 - L23 were not covered by tests

ipopt_fig.tight_layout()

Check warning on line 25 in bioptim/gui/ipopt_output_plot.py

View check run for this annotation

Codecov / codecov/patch

bioptim/gui/ipopt_output_plot.py#L25

Added line #L25 was not covered by tests

Expand All @@ -33,9 +33,7 @@ def create_ipopt_output_plot(ocp, interface):
v_sym = interface.ocp.variables_vector

Check warning on line 33 in bioptim/gui/ipopt_output_plot.py

View check run for this annotation

Codecov / codecov/patch

bioptim/gui/ipopt_output_plot.py#L33

Added line #L33 was not covered by tests

all_objectives = interface.dispatch_obj_func()
all_g, all_g_bounds = interface.dispatch_bounds(
include_g=True, include_g_internal=True, include_g_implicit=True
)
all_g, all_g_bounds = interface.dispatch_bounds(include_g=True, include_g_internal=True, include_g_implicit=True)

Check warning on line 36 in bioptim/gui/ipopt_output_plot.py

View check run for this annotation

Codecov / codecov/patch

bioptim/gui/ipopt_output_plot.py#L35-L36

Added lines #L35 - L36 were not covered by tests

grad_f_func = Function("grad_f", [v_sym], [gradient(sum1(all_objectives), v_sym)])
grad_g_func = Function("grad_g", [v_sym], [jacobian(all_g, v_sym).T])

Check warning on line 39 in bioptim/gui/ipopt_output_plot.py

View check run for this annotation

Codecov / codecov/patch

bioptim/gui/ipopt_output_plot.py#L38-L39

Added lines #L38 - L39 were not covered by tests
Expand Down
1 change: 1 addition & 0 deletions bioptim/gui/online_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(self, ocp, opts: dict = None, show_options: dict = None):

# There must be an option to add an if here
from ..interfaces.ipopt_interface import IpoptInterface

Check warning on line 63 in bioptim/gui/online_callback.py

View check run for this annotation

Codecov / codecov/patch

bioptim/gui/online_callback.py#L63

Added line #L63 was not covered by tests

interface = IpoptInterface(ocp)
all_g, all_g_bounds = interface.dispatch_bounds()
self.ng = all_g.shape[0]

Check warning on line 67 in bioptim/gui/online_callback.py

View check run for this annotation

Codecov / codecov/patch

bioptim/gui/online_callback.py#L65-L67

Added lines #L65 - L67 were not covered by tests
Expand Down

0 comments on commit 470e76e

Please sign in to comment.