Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Ticket #4252 (new minor enhancement)

Opened 3 years ago

Last modified 3 years ago

Add constraint rule warnings

Reported by: wehart Owned by: unassigned
Priority: minor Milestone: Coopr 3.x
Component: coopr.pyomo Version:
Keywords: Cc:

Description

Add a warning when a rule returns a non-expression value. I think this should be the default, and it would be suppressed with the -q option.

Is this a good idea? I'm not sure.

Attachments

Change History

comment:1 Changed 3 years ago by jwatson

I am not a fan of having to explicitly suppress the warning if None is returned. Rather, I would prefer the opposite (lacking a lint-style script) - a flag to generate warning messages of possible issues, which is disabled by default.

comment:2 Changed 3 years ago by jdsiiro

Define "non-expression value"... We have a history of allowing constraint rules to return:

  • an expression (equality, inequality, double inequality)
  • a tuple (2- or 3-value)
  • None

Are you talking about tossing a warning for other values? Should that not be an error? Or are you thinking about tossing a warning for tuple and None?

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.