PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, August 18, 2022

[FIXED] Where to download WriteLP file in Google Colab

 August 18, 2022     download, google-colaboratory, output, pandas, pulp     No comments   

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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing