Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABM language #1354

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

ABM language #1354

wants to merge 3 commits into from

Conversation

GaelLucero
Copy link

Per discussion creating additional pull request for ABM improvement as discussed in PR #1278

…ion, which calculates the next position the agent will move. move_forward function, which moves the agent forward by specified amount. move_backward function, which moves the agent backwards by specified amount. turn_right function, turns the agent right by specified degree. turn_left function, turns the agent left by specified degree.
…d parameters. set_pos function, sets the current position to the specified pos parameter. distancexy function, gives you the distance of the agent and the given coordinate. distance function, gives you the distance between the agent and another agent.
…he grid. towardsxy function, calculates angle between a given coordinate and horizon as if the current position is the origin. towards function, calculates angle between an agent and horizon as if the current position is the origin. facexy function, makes agent face a given coordinate. face function, makes agent face another agent
@rht
Copy link
Contributor

rht commented Jun 3, 2022

As stated in #1278 (comment), the methods should be defined in a new class that inherits from mesa.Agent, because it's not the majority of the model that needs the methods.

@rht
Copy link
Contributor

rht commented Jun 3, 2022

Also, as stated in #1278 (comment).

@codecov
Copy link

codecov bot commented Jun 4, 2022

Codecov Report

Merging #1354 (89d6286) into main (241924d) will decrease coverage by 1.93%.
The diff coverage is 31.91%.

@@            Coverage Diff             @@
##             main    #1354      +/-   ##
==========================================
- Coverage   91.03%   89.10%   -1.94%     
==========================================
  Files          19       18       -1     
  Lines        1339     1395      +56     
  Branches      257      261       +4     
==========================================
+ Hits         1219     1243      +24     
- Misses         85      117      +32     
  Partials       35       35              
Impacted Files Coverage Δ
mesa/agent.py 43.75% <31.91%> (-32.73%) ⬇️
mesa/visualization/modules/__init__.py 100.00% <0.00%> (ø)
...a/visualization/modules/CanvasGridVisualization.py 95.83% <0.00%> (ø)
mesa/visualization/modules/TextVisualization.py
mesa/visualization/ModularVisualization.py 78.80% <0.00%> (+1.99%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 241924d...89d6286. Read the comment docs.

@tpike3
Copy link
Member

tpike3 commented Jun 4, 2022

Thanks @GaelLucero for continuing to work on this. We are here to help so don't hesitate to ask any clarifying questions if one of our comments doesn't make sense or we can even jump on a quick video chat if you want. This is a big project much bigger than a typical first contribution.

@EwoutH
Copy link
Member

EwoutH commented Sep 29, 2022

Looks quite awesome @GaelLucero! Are you still working on this? Anything that needs to be discussed?

@EwoutH
Copy link
Member

EwoutH commented Jan 21, 2024

I'm still interested in this. Maybe we can create some subclass called "PhysicalSpace" or "NewtonianSpace", which implements movement and direction but also energy, momentum and power.

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

Successfully merging this pull request may close these issues.

4 participants