I am trying to work on a scheduling (task assignment) problem. My objective is to minimize the maximum makespan of the schedule. Could you please tell me how to define such an objective? Thank you,
Since abs(x-y) <= 42 is not a linear function, this is not directly supported. However, you can get the same effect in PYMPROG with: -42 <= x-y <= 42 hope it helps, sorry for the late response.
try the function/method vobj().
I have wriiten a very basic code for an optimization problem. I am able to code for more complex problems too. But I am not finding out any source or example that shows how to get the value of the optimal solution. I tried using the sensitivity report. It gives the only the values of the variables but not the optimal solution value.
Hello, I would like to use the absolute value in constraints and objective function. I believe that the absolute value can be desugared to plain linear constraints with shadow variables. Does PyMathProg support this feature? I have tried the following: model('foo') x = var('x') y = var('y') abs(x - y) < 42 which fails with: Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: bad operand type for abs(): '_parex' Best, Marco
Hi Julia, thanks for letting me know things worked out well in the end. And I will document it to help others out who might encounter similar problems, I suppose this is from really old version of pymprog. Best regards, Yingjie
Hallo Yingjie, I have solved the problem now. There was an issue in the first definition of the flux variable. I did not set both boundaries to None, so the default lower and upper bound was 0 and inf, respectively. This was not an issue in previous versions, so maybe you changed the default bounds in the var() function? If so, consider to include it in the "A word on compatability" section on your website. :) However, thank you for your help with my objective function issue. Now everything works...
Hello Sebastian, I am using Pymprog with Python 2.7 and it works fine for me. How did you installed the module? Maybe you have just installed it in your Python3 package directory. Consider installing it with pip for Python2? Cheers, Julia
I would like to incorporate the module pymprog in a Python 2.7 script, but it seems I can only get it to work if I use Python 3.4. For example, the command python practice.py gives me "ImportError: No module named pymprog" while python3 practice.py works fine. Am I missing something here, or does pymprog not work with Python 2.7?
Hi Julia, Sorry again for the late response, I should check it more often seriously. The usual way to modify your objective coeficients is to use parameters, you may look at this example: http://pymprog.sourceforge.net/advanced.html#assign I tried the fva.py script, but it requres options to start running. Can you give me a commandline with options so that I can replicate the problem? Regards, Yingjie
Hello Yingjie, thank you for your answer. Indeed, the program resets the objective value by giving an empty vector (all values are zero), since this was necessary in older pymprog versions. I have deleted this function and now the program runs without any error messages. The problem is, that it always returns an infeasible solution. Let me make it more clear: when I run the script for only one reaction of my model (the reaction is set as objective function), it works properly. But when I iterate...
Hi Julia, Sorry for the late response, it seems that problem is caused by a bad objective...
Hallo PyMathProg Team, first thanks for this awesome update! Unfortunately, I ran...
Hallo PyMathProg Team, first thanks for this awesome update! Unfortunately, I ran...
index.rst as quick guide
add doc uploading utility
admin shell scripts and polish-ups
Bug fix: linearize deleted variable
Bug fix and examples for Python 2+3
Initial commit
I am trying to install pympl.4.2 on CentOS 6.5 (64-bit) for Python 2.7.5 I am recieving...
Dear all, I'm trying to use PyMathProg for solving Bin Packing Problem the scripts...