Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Flatland Flatland
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 93
    • Issues 93
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Flatland
  • FlatlandFlatland
  • Issues
  • #186

Closed
Open
Created Sep 23, 2019 by Christian Eichenberger@christian_eichenberger🏸Owner

Bugfix: `agent.malfunction_data['next_malfunction'] ` can be below zero.

Reported by @vetrov_andrew (https://discourse.aicrowd.com/t/suggestion-bug-fix-of-flatland-2-0/1966)

I found that sometimes agent.malfunction_data['next_malfunction'] parameter can be below zero. It happens when the next malfunction for a single agent occurs before current ended (I can send a simulation code, if you want). So, a flatland user have to write one extra line to find out a next_malfunction value. Personally I use this code:

next_malfunction = max(self.env.agents[ind].malfunction_data['next_malfunction'], self.env.agents[ind].malfunction_data['malfunction'] + 1)
Edited Sep 23, 2019 by Christian Eichenberger
Assignee
Assign to
Time tracking