What is an Experiment and workspace in NetSim?#
After users design and simulate a network in NetSim it can be saved as an experiment. This experiment is saved in a Workspace. A workspace also contains the source codes, executable files, icons, data files, etc. A workspace can contain one or more experiments. While NetSim supports multiple workspaces, users generally work in the default workspace. The default workspace of NetSim will have the master source code and the master binaries (compiled library, executable and DLL files).
New workspaces need to be created when:
The user wants to modify the underlying source code of NetSim.
A user chooses to organize a large number of saved experiments. The experiments can be saved in a different workspace.
NetSim running on one PC/VM is time-shared between multiple users. Each user has his/her own workspace.
As mentioned earlier, NetSim stores your experiments (projects) in a folder termed as a Workspace. Default workspace is created in a user selected directory when NetSim is run for the first time after installation. Choose the path and enter the workspace name where you want the default workspace to be created.
Figure 4‑1: Default workspace created in Documents folder
This default workspace contains the following folders:
\src - contains protocol source codes.
\bin_x64 contains NetSim binaries for 64-bit.
Figure 4‑2: Default workspace containing the different folders
How does a user create and save an experiment in a workspace?#
To create an experiment, select New Simulation - \<Any Network> in the NetSim Home Screen as shown Figure 4‑3.
Figure 4‑3: NetSim Home Screen
The created experiment can be saved by clicking on File > Save button on the top left corner of the design window.
Figure 4‑4: Save/Save As an experiment by clicking on File
A save pop-up window appears which asks the user to input an Experiment Name and Description for the experiment. The workspace path is also shown in the window.
Figure 4‑5: Save popup window
User needs to input the Experiment Name (Description is optional) and then click on Save. The workspace path is non-editable. The experiment will be saved in the current workspace directory. Users can also select the files which are to be saved into the experiment folder.
The Configuration file will be mandatorily saved into the experiment folder.
Optional: Simulation output files such as Metrics.xml, Animation files, Event Trace file, Packet Trace file and Plot data (if enabled).
Optional: Protocol logs (if written) or Custom Log files (if codes have been modified for logging)
In our example, we saved the experiment with the name MANET and this experiment can be found in the default workspace path as shown below Figure 4‑6.
Figure 4‑6: Manet Example Saved in Workspace
Users can also see the saved experiments in Your Work menu as shown below Figure 4‑7.
Figure 4‑7: Saved experiments in Your work menu
If a Description was provided while saving the experiment, it will be displayed on Description panel on the right. Users can also edit the description for an experiment in the description panel.
Figure 4‑8: Description will be displayed on the right side of the description panel
The "Save As" option is also available to save the current experiment with a different name.
Users can Open file location where the experiment is saved, delete the experiment, Export the experiment or Cut (and paste inside a different folder), Free up Space is used to delete the files that may not be important there by reducing the folder size, an experiment by right-clicking on the experiment in the Your Work window as shown below in Figure 4‑9.
Figure 4‑9: Right click on experiment name to view different options like "Open file location, Cut, Delete, Export" and Free up Space etc.
If the user wants to move the experiment into a New folder, create a New folder by right clicking on the experiment panel (either in the white space below the experiment list or on the header) or click on the New folder icon which is present in Your Work as shown below in Figure 4‑10.
Figure 4‑10: Create a "New Folder" using New Folder icon
Figure 4‑11: Create a "New Folder" by right clicking on the experiment panel
After creating a New Folder cut and paste the experiment inside it as shown below in Figure 4‑12
Figure 4‑12: Cut and Paste the experiment in New Folder
Users can also free up space by deleting files which may not be important. Select the files and click on run. The deleted files can be regenerated by running the simulation again.
Figure 4‑13: Free up space window
In this example, we have saved all the files related to the experiment. You can see the various files stored in the experiment folder in Figure 4‑14.
Figure 4‑14: Simulation output files in experiment folder
Should each user have a workspace?#
There is no strict association between users and workspaces. A single user can have multiple workspaces (and in turn experiments in each workspace), or multiple users can operate in one workspace.
How does a user export an experiment?#
To save experiments in a different location, you have to first save the experiment in the current workspace and then use the export option present under Your work in the NetSim Home Screen as shown in Figure 4‑15.
Figure 4‑15: Export option present in Your work in NetSim Home Screen
If you click on the Export option, an Export Experiment panel appears where you can select the files to be exported. You can also select the source code and binaries if required. While the Configuration file is mandatory, other files are optional.
Figure 4‑16: Export Experiment pop-up window
You need to give the destination path and name of the experiment while exporting. The exported experiments will be saved with a .netsimexp extension.
Figure 4‑17: Select Export file and Path in export window
How does a user delete an Experiment in a workspace?#
Users can delete experiments by clicking on the delete icon as shown below in Figure 4‑18.
Figure 4‑18: Delete an Experiment in a workspace
It displays a popup window as shown in Figure 4‑19. Click on YES.
Figure 4‑19: Delete experiment confirmation window popup
How does a user create a new workspace?#
To create a new workspace, click on Workspaces present in Your work Menu shown as below
Figure 4‑20: Workspace options present in Your work Menu window
Then select List of Workspaces Options
Figure 4‑21: Select List of Workspaces option in Your work window
And select New Workspace
Figure 4‑22: Select New Workspace option
A New Workspace pop-up window appears where you can input the Workspace Name, Description and Workspace Path as shown below
Figure 4‑23: New Workspace pop-up window
How does a user switch between workspaces?#
Users can switch from one workspace to another. Select Your work >> Workspaces >> List of Workspaces and click on the workspace you want to switch to
Figure 4‑24: Switch between workspaces
And then select Set as Current symbol (the green tick mark) as shown below
Figure 4‑25: Select Green button to "Set as Current" workspace
How does a user export a workspace?#
Users can export only the workspace by selecting Your Work >> Workspaces >> Export Current Workspace as shown below in Figure 4‑26.
Figure 4‑26: Select Export option in Your work window
This will show the export workspace window panel in the right with all the existing experiments in that particular workspace. This option is similar to exporting an experiment. You can select the files which are to be exported as part of the workspace and then can select the source code and binaries if required. The Configuration file is mandatory and other files are optional.
Figure 4‑27: Adding default binaries, source code and icons to Selected Experiments list
Users can enter the name and path in which the workspace is to be exported and then click on Export.
Figure 4‑28: Enter the workspace name and select the export location
The workspace will be exported to the path selected. It will have the extension .netsimexp as shown in Figure 4‑29.
Figure 4‑29: Workspace exported to Location.
If you want to remove an experiment from the workspace being exported, right click on that experiment and click on remove as shown in Figure 4‑30.
Figure 4‑30: In Export list window Right click on experiment and select Remove
How does a user import experiment and workspace?#
You can import only an exported workspace, import experiments and workspaces by first selecting Your work and then selecting the Import option as shown in Figure 4‑31.
Figure 4‑31: Select Import option in Your work window
Importing Configuration.netsim file from experiment folder#
Once you click the import option from Your work the following window will open. Click on Experiment/Workspace file option and import the Configuration file. Enter the path from where the configuration file has to be imported as shown in Figure 4‑32.
Only files with ".netsim" extension can be imported.
By Selecting "Copy all files available in the folder" option user can import all files present along with Configuration.netsim.
Figure 4‑32: Importing configuration files
The imported experiment file will be available in the current workspace. It can be seen by clicking on Your Work as shown below
Import workspace or multiple experiments file#
This section explains how (i) You can import multiple experiments into your current workspace, and (ii) Import a complete workspace. Click Your work and then select Import option as shown below
Figure 4‑34: Import workspace/multiple experiments option in Your work window
You need to input the path from where (i) the experiments (a single folder) or (ii) the workspace will be imported. To import multiple experiments into the current workspace, click on the option as shown in Figure 4‑35.
Only previously exported experiment/workspaces with ". netsim_exp" extension can be imported.
By Selecting "Import source and binaries also" user can import source code and binaries present along with the exported experiments or workspace.
Figure 4‑35: Window for importing multiple experiments or workspace into current workspace
If the user wants to import the experiments into the new workspace, select the option as shown in Figure 4‑36, and proceed accordingly.
Figure 4‑36: Create a new workspace, and import experiments and source code/binaries, into the new workspace
If you import the experiments into the current workspace then experiments will be displayed in the Your Work menu of the current workspace as shown below.
Figure 4‑37: Imported experiments shown in Your Work of current workspace
If you create a new workspace and import experiments and binaries/source code then, these experiments will be shown in the Your Work Menu of the new workspace
Figure 4‑38: Imported experiments shown in Your Work menu of a newly created workspace
Import Experiments or Workspace folder#
User can import an experiment folder or a workspace folder by choosing the following option in the experiment import window as shown below
Figure 4‑39: Option to import Experiment/Workspace folder
You should give the path from where the workspace/experiment folder must be imported. Then click on import as shown below
Figure 4‑40: Window for navigation of experiments/workspace into current workspace
If you want to import the folder into new workspace, choose the option as shown below
Figure 4‑41: Importing the Experiment folder into new workspace
Import into current workspace vs. creating a new workspace#
A new workspace generally needs to be created when the underlying source code is likely to be modified. If you are importing only experiments, then they can be imported into your existing workspace. However, if you wish to import experiments plus the binaries/source codes then we recommend you create a new workspace for the same.
How does a user delete a workspace?#
You can delete a workspace by clicking on the delete icon shown below
Figure 4‑42: Delete a workspace by clicking on the delete icon in Your work window
Deleting a workspace will delete all the saved experiments and code modifications done in that workspace.
The following window appears if the current workspace is deleted or removed after re-installation of NetSim.
Figure 4‑43: Relocation workspace window
The "Relocate the workspace" option will allow the user to select a new location for the workspace which was removed/ deleted. User can also ignore the message by selecting "Ignore" option and clicking on OK button.
How does a user open and modify source codes?#
You can modify the source codes within a workspace. For doing this, select Your work ->Source code ->Open Code as shown below
Figure 4‑44: Open code option is available in Your work window
This opens the C source codes in MS Visual Studio. You can then modify the protocol codes and compile the codes. Then create a network in NetSim or open the saved experiment which simulates the protocol that has been modified. Run the simulation. This simulation will run per the modified code. Note that the changes in the source codes applies to the current workspace only.
How do I reset my code changes?#
Each workspace has two Reset options. They are reset:
Binaries (compiled files) to default
Code (source C codes) to default