Ask Your Question

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

asked 2015-08-14 05:34:43 +0200

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 10:22:10 +0200

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-14 05:34:43 +0200

Seen: 1,534 times

Last updated: Aug 14 '15