Skip to content

Commit f9ec950

Browse files
committed
add startMessage
1 parent 9ea084c commit f9ec950

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

src/app/pretrained/pretrained.component.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ export class PretrainedComponent extends ViewController {
2020
super();
2121
}
2222

23+
private reload(): void {
24+
this.initConcrete();
25+
}
26+
27+
protected logStartMessage() {
28+
console.log('[' + new Date().toISOString() + ']: Evaluation of Agent is starting!'
29+
+ '\nStarting evaluation phase!'
30+
+ '\nCurrent Timestamp: ' + new Date().getTime());
31+
}
32+
2333
protected initConcrete(): void {
2434
this.loadedBrainCounter = 0;
2535
this.isFullyLoaded = false;
@@ -31,10 +41,6 @@ export class PretrainedComponent extends ViewController {
3141
this.world.switchTrainingModeOfAgents(false);
3242
}
3343

34-
private reload(): void {
35-
this.initConcrete();
36-
}
37-
3844
private async loadBrains(): Promise<any> {
3945
for (let i = 0; i < this.maxAgents; i++) {
4046
const brain = this.queryBrain(i);

src/app/viewcontroller/viewcontroller.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,18 @@ export abstract class ViewController implements OnInit {
6262
protected abstract initConcrete(): void;
6363

6464
public start(): void {
65-
console.log('[' + new Date().toISOString() + ']: Training of Agent is starting!'
66-
+ '\nStarting training phase!'
67-
+ '\nCurrent Timestamp: ' + new Date().getTime())
65+
this.logStartMessage();
6866
this.isPaused = false;
6967
this.setSimulationInterval(this.simSpeedIndex);
7068
this.setEvaluationInterval();
7169
}
7270

71+
protected logStartMessage() {
72+
console.log('[' + new Date().toISOString() + ']: Training of Agent is starting!'
73+
+ '\nStarting training phase!'
74+
+ '\nCurrent Timestamp: ' + new Date().getTime());
75+
}
76+
7377
public pause(): void {
7478
this.isPaused = true;
7579
this.setSimulationInterval(this.simSpeedIndex);

0 commit comments

Comments
 (0)