Print solution only of decision variables equal/greater one
AnsweredHello,
I try to print the solution of my optimization model. Currently, I receive a big file with all the values from my decision variables with:
if ModelA.status == GRB.OPTIMAL:
ModelA.write('ModelA.sol')
but I want to see only the decision variables which are equal or greater one. Maybe someone has an idea :)
The decision variables in my model are: two binary, one continuous
(It is not necessary to create an additional file. It is enough to print the solution)
Thanks in advance
0
-
ModelA.printAttr('X') prints all non-zero solution values.
0 -
Thank you !
0
Please sign in to leave a comment.
Comments
2 comments