Skip to content

Commit

Permalink
Add a bool to specify if there is an arduino plugged or not #5
Browse files Browse the repository at this point in the history
  • Loading branch information
agrignard committed Apr 13, 2023
1 parent 857672b commit dfe4a10
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions models/main.gaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ global {

// UDP connection
/*int port <- 9877;
string url <- "localhost";*/
string url <- "localhost";*/
bool useArduino<-false;

// ---------------------------------------Agent Creation----------------------------------------------
init{
Expand Down Expand Up @@ -90,10 +91,13 @@ global {
}*/

// Arduino connection
create NetworkingAgent number: 1 {
do connect protocol: "arduino" to:"COM3";
if(useArduino){
create NetworkingAgent number: 1 {
do connect protocol: "arduino" to:"COM3";
}
}


write "FINISH INITIALIZATION";
initial_hour <- current_date.hour;
initial_minute <- current_date.minute;
Expand Down Expand Up @@ -161,7 +165,7 @@ global {
}
}

experiment generalScenario type: gui benchmark: false keep_simulations: false {
experiment generalScenario type: gui benchmark: false {//keep_simulations: false {
int fontSize <- 5;
int x_val <- 100;
int x_step <- 300;
Expand All @@ -174,7 +178,7 @@ experiment generalScenario type: gui benchmark: false keep_simulations: false {
output {
layout #split background: #black consoles: false controls: false editors: false navigator: false parameters: false toolbars: false tray: false tabs: true;

display dashboard antialias: false type: java2D fullscreen: 0 background: #black{
display dashboard antialias: false type: java2D fullscreen: false background: #black{
graphics Strings{
draw "AUTONOMOUS MICRO-MOBILITY FOR FOOD DELIVERIES" at: {200,125} color: #white font: font("Helvetica", 23, #bold);
//draw "FOR FOOD DELIVERIES" at: {1050,200} color: #white font: font("Helvetica", 25, #bold);
Expand Down

0 comments on commit dfe4a10

Please sign in to comment.