Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

(NOT WORKING) Add heatmap for Continuous Spaces #127

Merged
merged 16 commits into from
Feb 26, 2023
Merged

(NOT WORKING) Add heatmap for Continuous Spaces #127

merged 16 commits into from
Feb 26, 2023

Conversation

tatakof
Copy link
Contributor

@tatakof tatakof commented Feb 13, 2023

Hi George,
This is what I've done to add the heatmap for continuous spaces but it doesn't work. Could you give me some advise/guidance on how to do it properly?

Cheers,
Fran

@Datseris
Copy link
Member

Hi @franfram , when something doesn't work be very precise about it. What doesn't work, what is the exact error message, and what would you expect to have happened. I see here you call heatmap twice, once with limits and once without. Shouldn't you instead have an else clause that then plots the heatmap without limits, instead? What is currently happening if you run the code?

@tatakof
Copy link
Contributor Author

tatakof commented Feb 20, 2023

Hello @Datseris,
I've been trying to dev the InteractiveDynamics and understand how it works and make sense of the error messages. I'm currently using Revise.jl but I don't seem to be able to use it properly with InteractiveDynamics.
Particularly, I'm making some changes to /src/agents/lifting.jl, but I don't seem to be able to use the recently modified version.

These are the things that I'm doing:
A)

  1. Get a dev version of InteractiveDynamics using Pkg.dev("InteractiveDynamics")
  2. Go to the dev folder of InteractiveDynamics, make some changes to lifting.jl and save them.
  3. Restart the Julia session
  4. Run the ABM code that I have for continuous spaces to see the changes in the abmplot() function.
    These steps don't seem to work, mainly because I cannot see the changes that I make in lifting.jl. For example, I change the error message in the function definition of abmplot_heatobs() inside lifting.jl but then I don't get the updated error message when calling abmplot() in my ABM code.

B) Using Revise.jl

  1. Get a dev version of InteractiveDynamics using Pkg.dev("InteractiveDynamics")
  2. Make Revise.jl track the file I'm about to change by using include() or includet(). For example, include("/home/user/.julia/dev/InteractiveDynamics/src/agents/lifting.jl")
  3. Make some changes to the file
  4. run Revise.revise()
    The problem here is that when I do 2., I get errors like:
julia> Revise.include("src/agents/lifting.jl")
ERROR: LoadError: UndefVarError: @lift not defined
in expression starting at /home/arnle/.julia/dev/InteractiveDynamics/src/agents/lifting.jl:6

julia> Revise.include("src/agents/abmplot.jl")
ERROR: LoadError: UndefVarError: Observable not defined
Stacktrace:
 [1] top-level scope
   @ ~/.julia/dev/InteractiveDynamics/src/agents/model_observable.jl:3
in expression starting at /home/arnle/.julia/dev/InteractiveDynamics/src/agents/model_observable.jl:3

Could you guide me on how you dev InteractiveDynamics properly?
PD: I can send you a video of what I'm doing if you want.

@tatakof
Copy link
Contributor Author

tatakof commented Feb 21, 2023

Now workflow A) works properly, not sure why. Nvm
Hopefully in a few days I have something to show you with respect to InteractiveDynamics.

Cheers!

@tatakof
Copy link
Contributor Author

tatakof commented Feb 23, 2023

Hello @Datseris
I've been diving into the InteractiveDynamics codebase (made a ton of stackoverflow/slack/discourse questions and learned a lot. )
Now I'm kinda stuck again. Mainly, can't figure out where to get the abmplot.heatarray argument of the lift_attributes function (I want to get that argument to test a few things inside the abmplot_heatobs function)
I really want to do the PR but I've started falling behind in my PhD assignments. Would you like to do a 10min meeting so that I can show you what I'm doing with InteractiveDynamics and get some advise/guidance?

Cheers!

@Datseris
Copy link
Member

Datseris commented Feb 25, 2023

Hi! Yes, I can advise you in a meeting. The only time I can make it is tomorrow (Sunday) afternoon, after 2-3 o clock if you are available. I am fully booked in the next week, as odd as it sounds. If you don't have time tomorrow, it is okay. I will fix the PR if I have time, as I am giving a workshop on Agents.jl on Friday! Then, I will tell you what I did from the next weekend onwards.

@tatakof
Copy link
Contributor Author

tatakof commented Feb 25, 2023

Tomorrow is fine for me. What time do you prefer?

@Datseris
Copy link
Member

I'll send a mail once I am home, some time after 2-3 oclock. After I'm home I'll be available all the time.

@tatakof
Copy link
Contributor Author

tatakof commented Feb 25, 2023

Great

@Datseris Datseris merged commit b91e9c7 into JuliaDynamics:main Feb 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants