I realize this is not really an answer to the question, but if you add
one more soldier, the problem becomes
When my soldiers form 2 collumns there are 0 soldiers left.
When my soldiers form 3 collumns there are 0 soldiers left.
When my soldiers form 4 collumns there are 0 soldiers left.
When my s
That was was a lot of good feedback! I'll try that
thank you all!
Oscar
--
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/
> 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 usef
> This would make a very nice, simple, easy example in the docs!
Not to mention the only non-graph-theoretical one ! :-)
Nathann
--
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 mor
On 02/18/2010 05:56 AM, Nathann Cohen wrote:
Hello !!!
I just wanted to add one line about this very short patch :
http://trac.sagemath.org/sage_trac/ticket/7637
It enables one to define "unique" variables instead of dictionaries,
which is sometimes useful, for exemple in this case :
Instead o
Hello !!!
I just wanted to add one line about this very short patch :
http://trac.sagemath.org/sage_trac/ticket/7637
It enables one to define "unique" variables instead of dictionaries,
which is sometimes useful, for exemple in this case :
Instead of
soldiers = p.new_variable(vtype=p.__INTEGER)
On Feb 18, 10:45 am, Harald Schilly wrote:
> wrote:
> > How many soldiers are there?
>
> If you install the cbc or glpk spkg, you can pose this as a MILP and
> something like that should work:
ok, now i got the solver running and i can test it ;)
so, actually it should look like this:
sage: p =
On Feb 18, 2:21 am, Oscar Gerardo Lazo Arjona
wrote:
> How many soldiers are there?
>
If you install the cbc or glpk spkg, you can pose this as a MILP and
something like that should work:
sage: p = MixedIntegerLinearProgram(maximization=False)
sage: soldiers = p.new_variable()[1]
sage: columns =
Hello,
On Thu, Feb 18, 2010 at 1:07 AM, Harald Schilly
wrote:
> On Feb 18, 2:21 am, Oscar Gerardo Lazo Arjona
> wrote:
>> I have the feeling that this is a
>> more profound problem than it appears (finding integer solutions).
>>
>
> ... and I have the feeling that you can do this rather directly
On Feb 18, 2:21 am, Oscar Gerardo Lazo Arjona
wrote:
> I have the feeling that this is a
> more profound problem than it appears (finding integer solutions).
>
... and I have the feeling that you can do this rather directly with
Sage's CRT_list function, but I'm unable to solve it.
H
--
To pos
10 matches
Mail list logo