> You can directly use the variable p['soldiers'], which will call p's
> internal dictionary. Of course you will have to say
> p.set_integer(p['soldier']) to define its type !

ah ok, uhm, i wasn't sure and did the most obvious thing for me.
instead of new_variable and set integer, would it be useful to enhance
this like:

p.add_intvar('soldier') ?
p.add_binvar('yesorno') ?
simple thing but should be doable...

> p.add_constraint(5*columns+4 - soldiers == 0)

i wasn't sure how to say that either. nice.

btw: python-zibopt uses more of python's operator overlaoding.
i.e. this:

p += <coeffs*variables> >= == or <= number

i.e. it overloads the __iadd__ and checks if the right hand side is
such an expression. then it assumes that the lhs is the part for
add_constraint and the rhs is used for min or max. not sure if this
would be possible for intervals.

But whatever, CRT_list is the right way to do this anyways ;)

h

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to