Skip to content

Commit

Permalink
Comments added to Startup.java
Browse files Browse the repository at this point in the history
  • Loading branch information
IngStefan authored May 4, 2021
1 parent 2a7b5b0 commit 8867183
Showing 1 changed file with 11 additions and 29 deletions.
40 changes: 11 additions & 29 deletions Simulation/src/main/java/mas/Simulation/Startup.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public static void main(String[] args) //throws URISyntaxException
int quarterMinute = 0;
boolean stateActivated = false;

long startTime; //*****************ZEITMESSUNGSVARIABLE
long endTime; //******************ZEITMESSUNG ENDE**************
long timeElapsed; //******************ZEITMESSUNG Berechnung**************
long startTime; //needed for time measurements
long endTime; //needed for time measurements
long timeElapsed; //needed for time measurements

//Preparing the start of the simulation
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.GERMAN);
Expand Down Expand Up @@ -97,9 +97,10 @@ public static void main(String[] args) //throws URISyntaxException
}
}


//checking if the expiration time for the offer transfer is over, then move to the next step
//******SIMULATION SPEED SETTINGS ******************

// 1 Minute Setting
// Checking if the expiration time for the offer transfer is over, then move to the next step
// if(dateNow.after(afterAddingOneMin)) {
// t = dateNow.getTime();
// afterAddingOneMin=new Date(t + (1 * 60000));
Expand All @@ -108,8 +109,8 @@ public static void main(String[] args) //throws URISyntaxException
// }


//Change the simulation speed at the activation day. before that, a quicker simulations speed for the planning mechanisms
//if(dateNow.after(startdate)) {
// Hybrid Setting
// Change the simulation speed at the activation day. before that, a quicker simulations speed for the planning mechanisms
if(step >= 3) {
//Normal Operation Time
//********* 15 Minutes Operations *************
Expand Down Expand Up @@ -138,9 +139,6 @@ public static void main(String[] args) //throws URISyntaxException
}
}




//create current time as String
dateNowString = formatter.format(dateNow);

Expand Down Expand Up @@ -168,7 +166,7 @@ public static void main(String[] args) //throws URISyntaxException
//broadcastLTW(2021);

/*
//*******TIMING MEASUREMENTS**************
//******* TIMING MEASUREMENTS **********
startTime = System.nanoTime();
System.out.println("Roundtrip START time in milliseconds : " + startTime / 1000000); //AUSGABE
// System.out.println( "Time: "+ dateNow +" and Iterator for Request: " +i );
Expand All @@ -182,29 +180,13 @@ public static void main(String[] args) //throws URISyntaxException
*/


//******************** SIMULATION SCENARIO **********
//State machine for hour blocks
if(!stateActivated) {
stateActivated = true;
String activationDay = DATE;
switch(step){
//*******TESTING AREA*********
// case 0:
// if(quarterMinute == 0) {
//// System.out.println( "***** TESTS *****" );
// System.out.println( "Timestamp: before 21.02.2022 00:00" );
//// requestNewSetpointLoadProfile(600,"TU_Company1_MRL",activationDay+"16:59:00.0");
//// startBalancing("TU_Company1_MRL", dateNowString,activationDay+"17:05:00.0");
////
// }else if(quarterMinute == 1) {
//
// }else if(quarterMinute == 2) {

// }else if(quarterMinute == 3) {

// }
// break;
//
// //********** Starting the Planning Mechanism **********
case 0:
if(quarterMinute == 0) {
System.out.println( "Timestamp: before 21.02.2022 00:00" );
Expand Down

0 comments on commit 8867183

Please sign in to comment.