Ask Your Question

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

asked 2015-08-13 22:34:43 -0500

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-08-14 03:22:10 -0500

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)
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2015-08-13 22:34:43 -0500

Seen: 1,200 times

Last updated: Aug 14 '15