bioptim icon indicating copy to clipboard operation
bioptim copied to clipboard

penalty.weight=1 if not declared for multinode_objectives

Open EveCharbie opened this issue 2 years ago • 2 comments

If no weight is declared in a multinode_objectve, it transforms it into a constraint (l.493 de multinode_penaty). This was historically OK, but this behavior is not expected by the user anymore, it should be changed.

if mnc.weight:
      mnc.base = ObjectiveFunction.MayerFunction

EveCharbie avatar Jun 12 '23 16:06 EveCharbie

What is it treated in #694 ?

Ipuch avatar Jun 26 '23 02:06 Ipuch

No, I did not do it, that's why I opened an issue. It is more complicated than one line of code, because there is an artefact of multinode_objective & multinode_constraint going through the same piece of code.

EveCharbie avatar Jun 26 '23 08:06 EveCharbie