Closed chenyuyou closed 11 months ago
I have a feeling this is a bug I've seen before and thought I addressed. Will take a look later this afternoon.
Thanks for reporting.
Hi,
I've tried both the "Python (using C++ Agent API)" and "Python (using Python Agent API)" versions found here and the both produce output like this (which is correct):
Is it possible you've modified one of the environment properties or made a mistake whilst copying from the individual code snippets?
Behaviour similar to your first screenshot can be achieved by setting repulse
to a negative number.
If you can share your implementation I will try running that too.
I completely copy the code of python style here and run. The result is not different than before.
And I rewrite those code in my repositories. Their codes are the same but the results are different. The python code is https://github.com/chenyuyou/fg2-example/blob/main/circles_spatial2D/python/model.py The c++ code is https://github.com/chenyuyou/fg2-example/blob/main/circles_spatial2D/python_rtc/model.py
I've just downloaded and ran both of your versions of the code. Both execute and produce the correct circle arrangement of agents after around 200 steps.
I don't think this would be a difference with the version of pyflamegpu
you are using (I just built the latest from master
), is it possible you have changes that you haven't pushed to git
(e.g. check git diff
)?
I've just downloaded and ran both of your versions of the code. Both execute and produce the correct circle arrangement of agents after around 200 steps.
I don't think this would be a difference with the version of
pyflamegpu
you are using (I just built the latest frommaster
), is it possible you have changes that you haven't pushed togit
(e.g. checkgit diff
)?
How to build pyflamegpu lastest version?
How to build pyflamegpu lastest version?
Clone the git repo (or download the latest zip)
Then follow this guide from the docs.
Ah, this PR was merged a while back but isn't currently in a release. I expect that may explain your problem.
https://github.com/FLAMEGPU/FLAMEGPU2/pull/1077
Apologies, for not realising sooner.
Edit: I reverted that commit locally, and it produced the behaviour you are seeing.
We're hoping to get another release out "soon", once #1090 #1089 and #1150 have been merged (the latter is waiting on a 3rd party PR to be merged [which itself is waiting on two other PRs]). This will hopefully be Jan/Feb.
I can manually trigger a draft release build, which will generate new wheels (that expire after ~24h) if you are unable to build pyflamegpu yourself.
How to build pyflamegpu lastest version?
Clone the git repo (or download the latest zip)
Then follow this guide from the docs.
Thanks for your help, I will try soon.
Install pyflamegpu 2.0.0rc1+cuda118 wheel into D:/Downloads/FLAMEGPU2/build/lib/Release/python/venv Looking in links: dist EXEC : error : Could not find a version that satisfies the requirement pyflamegpu==2.0.0rc1+cuda118 (from versions: non e) [D:\Downloads\FLAMEGPU2\build\swig\python\pyflamegpu.vcxproj] EXEC : error : No matching distribution found for pyflamegpu==2.0.0rc1+cuda118 [D:\Downloads\FLAMEGPU2\build\swig\pytho n\pyflamegpu.vcxproj]
Bug Description
The results simulated by using Python Agent API in Tutorial Code are different from those using c++ Agent API. https://docs.flamegpu.com/tutorial/index.html#complete-tutorial-code
To Reproduce
This is the result by using python agent api This is the result by using C++ agent api
Expected Behaviour
I think that the result of by using python agent api is wrong.
OS
win11
CUDA Versions
cuda 11
GPUs
3080
GPU Driver
No response
Additional Information
No response