Skip to content

Commit

Permalink
Fix equation in docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfjl committed Jul 8, 2024
1 parent 751171d commit b8f5562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion popt/cost_functions/epf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def epf(r, c_eq=0, c_iq=0):
r"""
The external penalty function, given as
.. math::
0.5r(\sum(c_eq^2) + \sum(\max(c_iq,0)^2)
0.5r(\sum_i(c_{eq}^2) + \sum(\max(c_{iq},0)^2)
"""

return r*0.5*( np.sum(c_eq**2) + np.sum(np.maximum(-c_iq,0)**2) )

0 comments on commit b8f5562

Please sign in to comment.