Re: Having trouble in expressing constraints in Python

2014-06-06 Thread varun7rs
Thanks a lot Ian. Your post helped me understand the problem in a much better way and I've solved the first objective thanks to you but incase of my second objective which is minimize the number of nodes, I have got one of the weirdest looking constraints which I don't know how to express in Pyt

Re: Having trouble in expressing constraints in Python

2014-06-04 Thread Ian Kelly
On Tue, Jun 3, 2014 at 7:44 AM, wrote: > I have a problem in writing a constraint in Python. Firstly, I wrote the code > in AMPL and it was working and I'm using Python for the reason that it is > more suitable to handle large data. I managed to write the code quite fine > except for one const

Re: Having trouble in expressing constraints in Python

2014-06-03 Thread varun7rs
> > Are you trying to implement your own code rather than use an existing > library from pypi? I borrowed the idea from a previous file which I was working on. I input variables and coefficients as lists and then inturn as matrices to the CPLEX. So, I have a problem with expressing the constr

Re: Having trouble in expressing constraints in Python

2014-06-03 Thread Chris Angelico
On Wed, Jun 4, 2014 at 1:15 AM, Mark Lawrence wrote: > I also observe the gmail address which I'm assuming means google groups. No need to assume - the OP's headers show Google Groups injection info. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Having trouble in expressing constraints in Python

2014-06-03 Thread Mark Lawrence
On 03/06/2014 14:44, varun...@gmail.com wrote: I have a problem in writing a constraint in Python. Firstly, I wrote the code in AMPL and it was working and I'm using Python for the reason that it is more suitable to handle large data. I managed to write the code quite fine except for one const

Having trouble in expressing constraints in Python

2014-06-03 Thread varun7rs
I have a problem in writing a constraint in Python. Firstly, I wrote the code in AMPL and it was working and I'm using Python for the reason that it is more suitable to handle large data. I managed to write the code quite fine except for one constraint(Link Mapping Constraint). I've attached pie