I am working on an optimization problem using Python-glpk (I need to have my code in python and have to use open source solver like glpk). In this Python-glpk package, you can have your problem in 2 methods:
1- Read it from .lp or .mps etc files using for example "problem = glpk("route/to/.lp file/test_file.lp") " and then solve it using functions like: - problem.update() - proble.solve()
2 - Build and model your problem yourself starting with "problem = glp_create_prob() " and then use other functions to add variables and coefficients and constraint and etc, and then solve it using functions like: - glp_set_obj_coef(problem , int j, double coef) - glp_get_obj_coef(problem , int j)
My problem is that I need to read the problem from .lp or .mps file and optimize it and at the same time I need to have access to the elements of the problem because I need to change them and optimize it again. But I can not do that here(or at least I don't know how to do that) because when you build a problem in the method 1 then you don't have access to element like method 2.
I really appreciate your help.