# WSN-Simulator (WSN-Sim)
**WSN-Sim** is a Python-based Wireless Sensor Network (WSN) simulator supporting AODV and DSR protocols.
## Installation
To install the package, run the following command:
```bash
pip install wsn-sim
```
## Usage
You can use the simulator by specifying options directly via the command line:
```bash
wsn-sim --protocol AODV --steps 10 --nodes 20 --links 30
```
Alternatively, you can define these parameters in a `.cfg` file and provide the file path:
```ini
# config.cfg
[simulation]
protocol = AODV
steps = 10
nodes = 20
links = 30
```
Then run:
```bash
wsn-sim --config config.cfg
```
## Options
- `--config`: Path to the configuration file
- `--protocol`: Choose the routing protocol (AODV/DSR)
- `--steps`: Number of simulation steps
- `--nodes`: Number of nodes in the network
- `--links`: Number of random links between nodes
## Running Tests
To run the tests, use the following command:
```bash
python -m unittest discover tests
```
## Example
Here is an example of how to use the simulator:
1. Define your simulation parameters in a `.cfg` file:
```ini
# simulation_config.cfg
[simulation]
protocol = DSR
steps = 15
nodes = 25
links = 50
```
2. Run the simulation using the configuration file:
```bash
wsn-sim --config simulation_config.cfg
```
3. Alternatively, run the simulation with parameters directly from the command line:
```bash
wsn-sim --protocol DSR --steps 15 --nodes 25 --links 50
```
## License
This project is licensed under the MIT License.
## Contributing
If you would like to contribute to this project, please fork the repository and submit a pull request. We welcome all improvements, including bug fixes, new features, and documentation enhancements.
---
Raw data
{
"_id": null,
"home_page": "https://github.com/deepak7376/wsn_sim",
"name": "wsn-sim",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Deepak Yadav",
"author_email": "dky.united@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fd/97/b38f0201d5b64328b4e1a2a8f793d4abbc776e321f266e4ea5f8fb134250/wsn_sim-0.4.0.tar.gz",
"platform": null,
"description": "# WSN-Simulator (WSN-Sim)\n\n**WSN-Sim** is a Python-based Wireless Sensor Network (WSN) simulator supporting AODV and DSR protocols.\n\n## Installation\n\nTo install the package, run the following command:\n\n```bash\npip install wsn-sim\n```\n\n## Usage\n\nYou can use the simulator by specifying options directly via the command line:\n\n```bash\nwsn-sim --protocol AODV --steps 10 --nodes 20 --links 30\n```\n\nAlternatively, you can define these parameters in a `.cfg` file and provide the file path:\n\n```ini\n# config.cfg\n\n[simulation]\nprotocol = AODV\nsteps = 10\nnodes = 20\nlinks = 30\n```\n\nThen run:\n\n```bash\nwsn-sim --config config.cfg\n```\n\n## Options\n\n- `--config`: Path to the configuration file\n- `--protocol`: Choose the routing protocol (AODV/DSR)\n- `--steps`: Number of simulation steps\n- `--nodes`: Number of nodes in the network\n- `--links`: Number of random links between nodes\n\n## Running Tests\n\nTo run the tests, use the following command:\n\n```bash\npython -m unittest discover tests\n```\n\n## Example\n\nHere is an example of how to use the simulator:\n\n1. Define your simulation parameters in a `.cfg` file:\n\n ```ini\n # simulation_config.cfg\n [simulation]\n protocol = DSR\n steps = 15\n nodes = 25\n links = 50\n ```\n\n2. Run the simulation using the configuration file:\n\n ```bash\n wsn-sim --config simulation_config.cfg\n ```\n\n3. Alternatively, run the simulation with parameters directly from the command line:\n\n ```bash\n wsn-sim --protocol DSR --steps 15 --nodes 25 --links 50\n ```\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contributing\n\nIf you would like to contribute to this project, please fork the repository and submit a pull request. We welcome all improvements, including bug fixes, new features, and documentation enhancements.\n\n---\n",
"bugtrack_url": null,
"license": null,
"summary": "Wireless Sensor Network Simulator with AODV and DSR protocols",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/deepak7376/wsn_sim"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fd97b38f0201d5b64328b4e1a2a8f793d4abbc776e321f266e4ea5f8fb134250",
"md5": "94927e99574b0828eacbd5a533fb7aa3",
"sha256": "de3e437edff9e9a72d8eee2db8cb36338eaac324d40d192edf0518af9afd3154"
},
"downloads": -1,
"filename": "wsn_sim-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "94927e99574b0828eacbd5a533fb7aa3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6766,
"upload_time": "2024-07-06T14:01:13",
"upload_time_iso_8601": "2024-07-06T14:01:13.471630Z",
"url": "https://files.pythonhosted.org/packages/fd/97/b38f0201d5b64328b4e1a2a8f793d4abbc776e321f266e4ea5f8fb134250/wsn_sim-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-06 14:01:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "deepak7376",
"github_project": "wsn_sim",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "wsn-sim"
}