Issue
I am running a big Optimization program . i cant print model directly in console to see the correctness of the constraints.hence i am writing the model to a .lp file in google colab. but i don't know where to download the file. programs running without error but not showing files.
Solution
You can use files.download
to download a file to your local file system.
from google.colab import files
import pulp
prob = pulp.LpProblem("test", pulp.LpMinimize)
....
prob.writeLP("example.lp")
files.download('example.lp')
You can refer to the documentation for additional info.
Answered By - abc Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.