Login
Login

Re: Null Value when using PenaltyMethod

Home 21090308 Forums Re: Null Value when using PenaltyMethod

#2008
Ryu
Member

Hello Roger,

Here is my guess.

The reason why it throws a null exception may be because of the way you defined your inequality constraints.
You specify only for the cases when

and

but you did not specify what to do when

.

You declare an array of [tt:2wx76rn8]RealScalarFunction[/tt:2wx76rn8] but they are all ‘null’ for when

is exactly 0, which is the case in your code snippet.
I believe that the code is OK and it probably will work when you take care of the case when

is 0.

Hope this helps.