Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #95396
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.013 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.05; 'from:addr:yahoo.co.uk': 0.05; 'report.': 0.07; 'ping': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'arrays.': 0.16; 'feasible': 0.16; 'liu': 0.16; 'numpy': 0.16; 'out?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'solver': 0.16; 'wrote:': 0.16; 'memory': 0.17; 'language': 0.19; '>>>': 0.20; 'lawrence': 0.22; 'am,': 0.23; 'bit': 0.23; 'header:In-Reply- To:1': 0.24; 'testing': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'error': 0.27; 'equivalent': 0.27; 'turns': 0.27; 'issues.': 0.29; 'creating': 0.30; 'error.': 0.31; 'option': 0.31; 'language.': 0.32; 'possibly': 0.32; 'problem': 0.33; 'doubt': 0.33; 'surely': 0.33; 'case,': 0.34; 'gives': 0.35; 'fail': 0.35; 'unknown': 0.35; 'but': 0.36; 'url:org': 0.36; 'cases': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'several': 0.38; 'test': 0.39; 'sure': 0.39; 'well.': 0.40; 'to:addr:python.org': 0.40; 'mark': 0.40; 'charset:windows-1252': 0.62; 'studies': 0.63; 'different': 0.63; 'day.': 0.63; 'our': 0.64; 'hours': 0.65; 'due': 0.65; 'day,': 0.65; 'believe': 0.66; '26,': 0.72; 'increase': 0.73; 'forth': 0.79; 'received:89': 0.80; 'dramatically': 0.84; 'pythonistas,': 0.84; 'url:scipy': 0.84; 'url:reference': 0.91; 'period.': 0.95 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
| Subject | Re: memory control in Python |
| Date | Sat, 15 Aug 2015 19:21:04 +0100 |
| References | <CAM5e_kbbTAEHE=mi0WFXutJ5G2A-UV4wLsAPMcBT5XrCqhr3MA@mail.gmail.com> <87io8hc8z3.fsf@handshake.de> <mqnsrm$mek$1@ger.gmane.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | host-89-240-170-87.as13285.net |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
| In-Reply-To | <mqnsrm$mek$1@ger.gmane.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.32.1439662878.4764.python-list@python.org> (permalink) |
| Lines | 48 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1439662878 news.xs4all.nl 2878 [2001:888:2000:d::a6]:50449 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:95396 |
Show key headers only | View raw
On 15/08/2015 18:28, Terry Reedy wrote: > On 8/15/2015 3:21 AM, dieter wrote: >> Ping Liu <yanzhipingliu@gmail.com> writes: >>> ... >>> For small cases, Python works well. But if we consider longer time >>> period. >>> then it would fail due to the memory usage issues. We have tested >>> several >>> case studies to check the memory use for different time period, >>> including >>> 1) 2 hours in one day, 2) 24 hours in one day, 3) 20 days with 24 hours >>> each day, as well as 4) 30 days with 24 hours each day. The first 3 >>> cases >>> are feasible while the last case gives out the memory error. >>> >>> When we are testing the forth case, the memory error comes out while >>> creating the inequality constraints. The problem size is 1) Aeq: 12 * >>> 26, >>> Aineq: 30 * 26; 2) Aeq: 144*268, Aineq:316*268; 3) Aeq: 2880*5284, >>> Aineq: >>> 6244*5284; 4) Aeq: 4320 * 7924, Aineq is unknown due to the memory >>> error. >>> >>> The solver is CPLEX (academic). It turns out that the solver is taking a >>> lot of memory as you can see in the memory test report. for the first >>> three >>> cases, different memory usage is observed, and it grows up dramatically >>> with the increase of the time period. 1) solver memory usage: 25.6 >>> MB, 2) >>> 19.5 MB; 3) solver memory usage: 830.0742 MB. > > Make sure that the solver is using numpy arrays. > I doubt that as CPLEX was first released in 1988. A very quick bit of searching found this http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.linprog.html which I believe is the equivalent of the Aeq and Aineq mentioned above. Possibly a better option as must surely be using numpy, but as usual there's only one way to find out? :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: memory control in Python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-08-15 19:21 +0100
csiph-web