Ask Your Question
2

How to declare a real variable with positive as well as negative values?

asked 9 years ago

Pritha gravatar image

I am using sage 6.1.1 on ubuntu. Declaration of a milp variable with milp.new_variable(real=True) only declares a positive valued variable. How do I declare a real variable with a positive as well as negative values?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 9 years ago

tmonteil gravatar image

As explained in the doc of the new_variable method, you should use the nonnegative option:

milp.new_variable(real=True, nonnegative=False)
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 9 years ago

Seen: 1,644 times

Last updated: Aug 14 '15