Comments (2)
Hello! You are unable to drag it into the experiments because, under the hood, the PyCommunicator object is an agent. It's for this same reason that you cannot drag in your own agent types or discrete event blocks into the experiment window.
To create an agent in the experiment window, you need to programmatically create the PyCommunicator object. I've written the object to be constructed using whatever settings you run your PyCommunicator object with normally.
However, when you do create it, you need to have access to a "live" Agent type - i.e., the code to construct it will only work in the "Before Simulation Run" and "After Simulation Run" callbacks, where you have access to your top-level agent.
Below is an example of a model which collects data across a Parameter Variation experiment, saves it to a Collection object, and after the last iteration, it will dump the data to a JSON file in the model directory (via the toJson
function). Let me know if you have any follow-up Qs about it.
Python In Experiment Screen Example.zip
from anylogic-pypeline.
I'm closing it, but again, feel free to ask follow-ups.
from anylogic-pypeline.
Related Issues (20)
- Agent population to json issue HOT 2
- Reinforcment Learning HOT 1
- Error with setting up python subprocess (Macbook) HOT 2
- Encoding error when trying to save a file on Windows HOT 1
- Python files missing HOT 1
- Issues with Python on Mac HOT 2
- "Run and Runresults are not defined" problem HOT 4
- Issue with reflectiveObjects HOT 2
- No able to open the model examples HOT 1
- Bug with Mac HOT 6
- Issue with AnyLogic 8.8.2 HOT 1
- Run Python scripts before each experiment run HOT 6
- jsonifier library error HOT 4
- Error during model creation in AnyLogic HOT 3
- Pypeline and AnyLogic Cloud HOT 3
- Unable to load a pickled object HOT 3
- Python and Anylogic Connection HOT 1
- Error in AnyLogic 8.8.5 HOT 2
- example model can not be opened HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anylogic-pypeline.