-
Notifications
You must be signed in to change notification settings - Fork 49
ScenarioDriver
Running Scenario Driver Building BioGears
Once you have a working solution of BioGears on Visual Studios, the first step is to begin building the code. Start by making sure you are running in "Release" and then click build or hit the F7 button on your keyboard. Upon completion, the final output message should indicate 0 failed builds.
After building the general BioGears code, it is important to also build specific components of the solution. Each component can be built by finding the proper file in the solution tab on Visual Studio, right clicking on it, and selecting the "build" option. The file that need to be built are as follows:
bg-cli or bg-scenario in the "Binaries" folder
STAGE in the "CMakePredefinedTargets" folder
gen-states in the "Java" folder
Setting Up a Scenario
Right click on scenario_driver again and select "Set as Startup Project." Now, when you run code, you will default to running the BioGears scenario driver. In order to select the appropriate scenario you wish to run, right click on "scenario_driver" yet again and select "Properties." Click on "Configuration Properties->Debugging" and make sure:
The working directory points to the appropriate folder where your scenarios folder is located
Default will be in core/build/runtime
The Command Arguments line points to the correct scenario file you wish to run with the .xml extension
Once settings are correct, apply them and select "OK." Now you can run visual studios and let the scenario play out. Running the Plotting Tool
To run the plotting tool compatible with the BioGears output, open a new command prompt. Using "cd," point the command line at the appropriate folder containing the Scenarios folder (now with results). Note, this should be the same as the working directory previously mentioned (ex: runtime). Plotting a Single Scenario
Since the plotter uses python, you will have to direct the command line to python followed by the folder of the plotter and finished with the results file you wish to plot. An example of this would be:
"python ../../share/python/bg-plotter.py Scenarios/FileFolder/File.csv"
Once completed, the code should generate a new folder within the designated "FileFolder" containing all the graphs from each physiology data request. Plotting a Folder Archive
Similar to plotting a single scenario's results, plotting a folder will require directing the command line to python and the plotting tool but will also need to identify as recursive and only point to the folder (as opposed to the file name). An example of this would be:
"python ../../share/python/bg-plotter.py -r Scenarios/FileFolder"
Once completed, the code should generate a new folder for each results file within the designated "FileFolder" containing all the graphs from each physiology data request.