| 1 | initial version |
Hello, Sage Community!
By checking the history of changes to the file <SAGE>/sage/numerical/mip.pyx, <SAGE> stands for the directory where I installed SageMath, I have just learned that the dim parameter of the new_variable subroutine was remove in favor of a more productive, more efficient approach: now it's possible to index these variables with arbitrary indexes. In particular, I could use x[1,2], which solves my question, and is much more elegant. Also, I could use x['USA-EU'] if I wanted this variable to represent the quantity of product sent from USA to EU.
I think this is an amazing feature! And I am leaving this answer in case anyone has a similar question. Or would like to consult an extra resource.
| 2 | No.2 Revision |
Hello, Sage Community!
By checking the history of changes to the file <SAGE>/sage/numerical/mip.pyx, <SAGE> stands for the directory where I installed SageMath, I have just learned that the dim parameter of the new_variable subroutine was remove in favor of a more productive, more efficient approach: now it's possible to index these variables with arbitrary indexes. In particular, I could use x[1,2], which solves my question, and is much more elegant. Also, I could use x['USA-EU'] if I wanted this variable to represent the quantity of product sent from USA to EU.
By the way, here is where the change happened.
I think this is an amazing feature! And I am leaving this answer in case anyone has a similar question. Or would like to consult an extra resource.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.