Ask Your Question
2

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

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

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
1

answered 2015-08-14 10:22:10 +0100

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

Stats

Asked: 2015-08-14 05:34:43 +0100

Seen: 1,627 times

Last updated: Aug 14 '15