An experimentation platform for negotiation protocols in a Freight Transport Multi Agent System.
As per current development we are offering two negotiation protocols:
- Iterated Contract Net (ICNET)
- Augmented Iterated Contract Net (AICNET)
The Experimental System (ES) was developed in Python 3, through the help of PyCharm IDE and IPython. We recommed using the ES in an IPython/Jupyter interface, as it facilitates experimentation.
The ES is dependent on the following standard Python3 libraries:
- os, for file operations.
- random, for generating pseudo-random numbers.
- copy, for object manipulation operations.
The ES is dependent on the following external Python3 libraries:
- NetworkX, for graph related operations.
- matplotlib, for plotting operations.
- NumPy, for statistics operations.
Just copy/download/replicate the code in main.py your Python IDE, then run it. The results of the experiments largely depend on the environment variables, which we recommend playing with before running the experiment.
Keep in mind that e is an object of the type Environment, through which the experiments are governed.
- Run an ICNET experiment with 1000 rounds (transport requests).
e.icnet_experiment(1000)
- Run an AICNET experiment with 1000 rounds (transport requests), considering a ranking based on PageRank. The third parameter, with boolean True/False values, determines if the ranking is increasing (False) or decreasng (True).
e.aicnet_experiment(1000,"pagerank",False)
At this point two sets of bids experiments bids_icnet (set 1) and bids_aicnet (set 2). The first have been obtained by running 2000 rounds of ICNET, while the second was obtained from 1000 rounds of ICNET followed by 1000 rounds of AICNET. Hence, the following commands are oriented on extracting results on the above simulations.
- Determine the average number of iterations per negotiation process for each bid set.
e.stats.get_avg_no_iterations_per_negotiation(1)
e.stats.get_avg_no_iterations_per_negotiation(2)
- Determine the average gain of transport providers for each bid set and the standard deviation. The average gain is computed as the winning price over the initial broker estimated price.
e.stats.get_transporter_gain_stats(1)
e.stats.get_transporter_gain_stats(2)
- Determine a statistics on the winning transport providers' personalities per bid set.
e.stats.get_winning_transporter_personality_stats(1)
e.stats.get_winning_transporter_personality_stats(2)
- Determine the number of failed negotiations per bids set.
e.stats.get_nr_of_failed_negotiations(1)
e.stats.get_nr_of_failed_negotiations(2)
- Plot a comparison on the number of transport provider' wins between bids sets.
e.stats.plot_sorted_winning_transporters()
- Plot a comparison on the transport provider' PageRank coefficients between the bids sets.
e.stats.plot_metric_comparison("pagerank")
In order to compute the PageRank coefficient, ES has performed an operation of building social graphs automatically for each bid set, which can also be done through the commands:
e.stats.build_graph(1)
e.stats.build_graph(2)
- ES is capable of exporting the social graphs in a .gml format (in current folder), for further analysis with other tools.
e.stats.save_graph(1,"icnet_graph")
e.stats.save_graph(2,"aicnet_graph")
- In our case we have used Gephi graph visualization and exploration platform, by importing the above mentioned .gml files.