Skip to content

Waldbrandsimulation #12

@klaussoft

Description

@klaussoft

Hi,

die Waldbrandsimulation enthält noch einen Fehler. Ein Baum wird zufällig in Brand gesteckt, dieser brennt aber nicht ab, sondern steckt nur die Nachbarn in Brand. Dadurch brennt nichts mehr, wenn man die Brandwahrscheinlichkeit nahe 1, oder 1 setzt. Da stehen dann nur noch Bäume ohne Nachbarn und nichts brennt mehr.

Richtig wäre es so:
...
brand = set(rnd.sample(bäume, int(len(bäume)*BRAND)))
brand |= feuerwalze(bäume-brand, brand)
...

Leider gibt es noch ein weiteres Problem für die Zukunft. Python gibt eine Warnung aus, dass Sample zukünftig nicht mehr mit Sets umgehen kann.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions