No structural cost value/type needed for population exposure models

Bug #1003342 reported by Muharem Hrnjadovic
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
High
Muharem Hrnjadovic

Bug Description

[12:24] <vitorsilva> al-maisan: Hi Muharem, do you have a sec?
[12:24] <al-maisan> hello vitorsilva, yes, sure
[12:25] <vitorsilva> I trying to store population using the NRML 0.3 exposure model schema. I set up the assetCategory = population and then each asset was defined as:
[12:25] <vitorsilva> <assetDefinition gml:id="a2">
[12:25] <vitorsilva> <site>
[12:25] <vitorsilva> <gml:Point srsName="epsg:4326">
[12:25] <vitorsilva> <gml:pos>28.6975 40.9825</gml:pos>
[12:25] <vitorsilva> </gml:Point>
[12:25] <vitorsilva> </site>
[12:25] <vitorsilva> <number>1</number>
[12:25] <vitorsilva> <taxonomy>VF1</taxonomy>
[12:25] <vitorsilva> </assetDefinition>
[12:26] <vitorsilva> but I get un error: ValueError: Invalid input: 'REXD(cost=None, cost_type=None, area=None, area_type=None, number_of_units=1.0)'
[12:26] * al-maisan looks
[12:28] <al-maisan> vitorsilva: that error comes from inside the asset value calculation function
[12:28] <al-maisan> vitorsilva: I believe the problem is that the cost type is not set
[12:29] <vitorsilva> ok I can set that up but for population there is no cost type… it's just people count..
[12:30] <al-maisan> I see .. the asset value calculation function is buggy .. it always expects the cost type to be set
[12:30] * al-maisan will file a bug
[12:31] <al-maisan> vitorsilva: what is the correct behaviour in this case>
[12:31] <al-maisan> ?
[12:32] <vitorsilva> stco and area are not required, only the attribute "number"
[12:32] <al-maisan> in that case the number is the per-asset-value?
[12:36] <vitorsilva> yes
[12:36] <al-maisan> vitorsilva: if that is right the easiest work-around would be to set stco=1 stcoType=per_asset
[12:36] <vitorsilva> ok
[12:36] <vitorsilva> al-maisan: is it ok to open a bug on LP to fix this?
[12:36] <al-maisan> sorry about that
[12:37] <al-maisan> vitorsilva: of course!
[12:37] <al-maisan> vitorsilva: Will you file the bug or shall I?
[12:38] <al-maisan> vitorsilva: the NRML file that you expected to work should be attached to the bug in any case
[12:38] <vitorsilva> al-maisan: I guess it will be more efficient if you do it
[12:38] <al-maisan> can you please email me the exposure NRML file and I will do it
[12:38] <vitorsilva> ok, send me the link and I'll attach it
[12:38] <al-maisan> even better

Changed in openquake:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Muharem Hrnjadovic (al-maisan)
milestone: none → 0.8.0
tags: added: defect enduser-visible risk
Revision history for this message
Vitor Silva (vitor-silva) wrote :

This bug fix should allow the use of the attached model

Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :

[12:50] <al-maisan> vitorsilva: what we discussed above only applies to population exposure models, right?
[12:51] <vitorsilva> yap, only when assetCategory is set to "population"

Changed in openquake:
status: Confirmed → In Progress
Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.