Re: [sage-support] Re: How to get all solutions of a MILP?

2016-05-18 Thread Dima Pasechnik
On Wednesday, May 18, 2016 at 12:58:23 PM UTC+1, Jeroen Demeyer wrote: > > On 2016-05-18 13:44, Dima Pasechnik wrote: > > Do you mean that you want a cleaner > > interface for p.polyhedron() in the > > case when p has more than 1 variable? > Yes. Example: > > sage: P =

Re: [sage-support] Re: How to get all solutions of a MILP?

2016-05-18 Thread Jeroen Demeyer
On 2016-05-18 13:44, Dima Pasechnik wrote: Do you mean that you want a cleaner interface for p.polyhedron() in the case when p has more than 1 variable? Yes. Example: sage: P = MixedIntegerLinearProgram(solver="PPL") sage: x = P.new_variable(nonnegative=True) sage: y =

Re: [sage-support] Re: How to get all solutions of a MILP?

2016-05-18 Thread Dima Pasechnik
On Wednesday, May 18, 2016 at 10:35:53 AM UTC+1, Jeroen Demeyer wrote: > > On 2016-04-19 15:00, Dima Pasechnik wrote: > > here is an example: > > > > sage: P=3*polytopes.cube() > > sage: (p,x)=P.to_linear_program(solver='ppl',return_variable=True) > > sage: p.set_objective(x[0]) #

Re: [sage-support] Re: How to get all solutions of a MILP?

2016-05-18 Thread Jeroen Demeyer
On 2016-04-19 15:00, Dima Pasechnik wrote: here is an example: sage: P=3*polytopes.cube() sage: (p,x)=P.to_linear_program(solver='ppl',return_variable=True) sage: p.set_objective(x[0]) # maximizing x[0] over 3 times inflated unit cube sage: p.solve() 3 sage: p.add_constraint(x[0]==3) # restrict

[sage-support] Re: How to get all solutions of a MILP?

2016-04-19 Thread Dima Pasechnik
here is an example: sage: P=3*polytopes.cube() sage: (p,x)=P.to_linear_program(solver='ppl',return_variable=True) sage: p.set_objective(x[0]) # maximizing x[0] over 3 times inflated unit cube sage: p.solve() 3 sage: p.add_constraint(x[0]==3) # restrict to the optimal face sage: Q=p.polyhedron()

[sage-support] Re: How to get all solutions of a MILP?

2016-04-19 Thread Dima Pasechnik
On Tuesday, April 19, 2016 at 11:26:23 AM UTC+1, Jeroen Demeyer wrote: > > Hello, > > I have a MixedIntegerLinearProgram where all variables are integers. I > want to minimize one of the variables, but I need *all* solutions, i.e. > all assignments to the variables which minimize the goal