memilio icon indicating copy to clipboard operation
memilio copied to clipboard

Check_constraint function returns true when parameters are set to wrong values

Open jubicker opened this issue 11 months ago • 1 comments

Motivation / Current Behaviour

The check_constraint functions should check whether the parameters are set to acceptible values e.g. if stay times are > 0. If the constraint is not fulfilled i.e. a parameter has a not permitted value, the function returns true.

Enhancement description

It would be more intuitive if the function returned true for permitted values and false for not permitted values.

Additional context

No response

Checklist

  • [X] Attached labels, especially loc:: or model:: labels.
  • [X] Linked to project

jubicker avatar Dec 09 '24 14:12 jubicker

Basically, the idea was that the function returns error codes (>0) if contraints are not satisfied. However, with some recent changes, the only error code 1 was translated to a boolean "true".

mknaranja avatar Mar 20 '25 12:03 mknaranja