Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

swmm no output #9

Open
gmusumeci opened this issue Mar 4, 2016 · 12 comments
Open

swmm no output #9

gmusumeci opened this issue Mar 4, 2016 · 12 comments

Comments

@gmusumeci
Copy link

I edit the SwmmAlgorythm.py with the same kind of changes that are in the commit:
Oslandia/qgis-epanet@be1b5c6

I run the example getting the following error:
[Error 2] Impossibile trovare il file specificato: u'C:\Users\pc04.qgis2\processing\outputs\swmm.out' See log for more details

I tried to create an empty file 'swmn.out' in \processing\outputs

The processing runs but output tables and vectors are empty

I'm running Qgis 2.14 on Windows7 64bit

@vmora
Copy link
Contributor

vmora commented Mar 4, 2016

Have you got a log file under "u'C:\Users\pc04.qgis2\processing\outputs" ?

@vmora
Copy link
Contributor

vmora commented Mar 4, 2016

Normally you should have the generated swmm input file in there too.

@gmusumeci
Copy link
Author

I uninstalled the plugin then reinstalled it
Running a new simulation I get the following error:

there were errors, look into logs for details See log for more details

Now in the output folder
I have swmm.inp
I have no log file

I have an output file with many error of this kind:

ERROR 211: invalid number PyQt4.QtCore.QDateTime(1988, at line 120 of [TIMESERIES] section:
INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 0) 0.0

The date in tables linked to postgres are as follows:

1988-01-01T00:00:00

@vmora
Copy link
Contributor

vmora commented Mar 4, 2016

Can you check if there is something strange in the swmm.inp, in the TIMESERIES section

@gmusumeci
Copy link
Author

This is my swmm.inp, TIMESERIES section

[TIMESERIES]
;name datetime value
INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 0) 0.0
INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 15) 40.0
INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 0) 40.0
INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 15) 0.0
INFLOW@82309 PyQt4.QtCore.QDateTime(1988, 1, 1, 12, 0) 0.0
INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 0) 0.0
INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 15) 45.0
INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 0) 45.0
INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 15) 0.0
INFLOW@80408 PyQt4.QtCore.QDateTime(1988, 1, 1, 12, 0) 0.0
INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 0) 0.0
INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 0, 15) 50.0
INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 0) 50.0
INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 3, 15) 0.0
INFLOW@81009 PyQt4.QtCore.QDateTime(1988, 1, 1, 12, 0) 0.0

@vmora
Copy link
Contributor

vmora commented Mar 4, 2016

The date as not been converted to string, does the date otherwise correspond to the dates you have entered in your time series ?

@vmora
Copy link
Contributor

vmora commented Mar 4, 2016

Where do your timeseries come from ?

I suspect the plugin expects strings for dates, not QDateTime.

@vmora
Copy link
Contributor

vmora commented Mar 4, 2016

Found it, its in https://github.com/Oslandia/qgis-swmm/blob/master/SwmmAlgorithm.py#L210

We should test the type of v and act accordingly to handle this case. PR welcome if you are willing to code, otherwise you can convert your input data to string instead of QDateTime

@gmusumeci
Copy link
Author

My timeseries is stored in postgreSQL.

The format is "datetime timestamp without time zone"

Now I try to convert to text to see if it works

@gmusumeci
Copy link
Author

Now error are of this kind:
ERROR 211: invalid number 01/01/1988 at line 113 of [TIMESERIES] section:
INFLOW@82309 0.0 01/01/1988 00:00

The input file is:
[TIMESERIES]
;name value datetime
INFLOW@82309 0.0 01/01/1988 00:00
INFLOW@82309 40.0 01/01/1988 00:15
...omissis....

@vmora
Copy link
Contributor

vmora commented Mar 4, 2016

the date format is YYYY-mm-dd HH:MM:ss

@gmusumeci
Copy link
Author

In my DB the date format is correct: YYYY-mm-dd HH:MM:ss.

input

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants