Skip to content

[BurnP3+ Bug]: sample transformer fails when fire zone falls within 0 probabilistic ignition area #109

@katieb1

Description

@katieb1

Contact Details

No response

What happened?

Running my BurnP3+ model I kept getting this error:

[Failure] The external program failed.
Program name was: C:\Program Files\R\R-4.5.2\bin\Rscript.exe
Arguments were: "C:\Users\Administrator\AppData\Local\SyncroSim\Packages\burnP3Plus\2.6.5\ignitions.R"
Exit code was: 1
More information:
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': error in evaluating the argument 'x' in selecting a method for function 'nrow': ℹ In index: 25.
Caused by error in `sample.int()`:
! too few positive probabilities
Calls: %>% ... signalCondition -> <Anonymous> -> .handleSimpleError -> h
Execution halted

After digging around in the code, I discovered it was because one of my fire zones has a relative likelihood of ignitions occurring > 0, but the fire zone is completely within a 0 probability area in my probabilistic ignition grid. I set the relative likelihood for the fire zone to be 0 to fix the issue for my model, but the sample ignitions transformer should be updated to also check the probabilistic ignition grid first before assigning fires within a fire zone. Maybe also throwing a warning would be helpful.

What component are you seeing the problem on?

No response

Relevant log output

No response

Approvals Process

  • Testing For Issue
  • Merge

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions