linny-r 1.6.8 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2107,16 +2107,16 @@ class Paper {
2107
2107
  const ubs = (ub >= VM.PLUS_INFINITY && !proc.upper_bound.defined ?
2108
2108
  '\u221E' : VM.sig4Dig(ub));
2109
2109
  if(Math.abs(lb) > VM.NEAR_ZERO) {
2110
- // If lb <> 0 then lb...ub (with ellipsis)
2110
+ // If lb <> 0 then lb...ub (with ellipsis).
2111
2111
  s += '\u2026' + ubs;
2112
2112
  } else {
2113
- // If lb = 0 show only the upper bound
2113
+ // If lb = 0 show only the upper bound.
2114
2114
  s = ubs;
2115
2115
  lbw = 0;
2116
2116
  }
2117
2117
  }
2118
2118
  // Keep track of the width of the boundary text, as later it may be
2119
- // followed by more text
2119
+ // followed by more text.
2120
2120
  const
2121
2121
  bb = this.numberSize(s),
2122
2122
  btw = bb.width + 2,
@@ -2125,18 +2125,18 @@ class Paper {
2125
2125
  ty = y - hh + sh/2 + 1;
2126
2126
  proc.shape.addNumber(tx + btw/2, ty, s,
2127
2127
  {fill: 'black', 'font-style': bfs});
2128
- // Show start/stop-related status right of the process boundaries
2129
- // NOTE: lb must be > 0 for start/stop to work
2128
+ // Show start/stop-related status right of the process boundaries.
2129
+ // NOTE: lb must be > 0 for start/stop to work.
2130
2130
  if(proc.level_to_zero && lbw) {
2131
2131
  font_color = 'black';
2132
- // Underline the lower bound to indicate semi-continuity
2132
+ // Underline the lower bound to indicate semi-continuity.
2133
2133
  proc.shape.addPath(
2134
2134
  ['M', tx + lbo, ',', ty + sh/2, 'L', tx + lbo + lbw, ',', ty + sh/2],
2135
2135
  {'fill': 'none', stroke: font_color, 'stroke-width': 0.4});
2136
- // By default, no ON/OFF indicator
2136
+ // By default, no ON/OFF indicator.
2137
2137
  s = '';
2138
2138
  if(MODEL.solved && l !== VM.UNDEFINED) {
2139
- // Solver has been active
2139
+ // Solver has been active.
2140
2140
  const
2141
2141
  pl = proc.actualLevel(MODEL.t - 1),
2142
2142
  su = proc.start_ups.indexOf(MODEL.t),
@@ -2145,36 +2145,36 @@ class Paper {
2145
2145
  // Process is ON
2146
2146
  if(Math.abs(pl) < VM.NEAR_ZERO && su >= 0) {
2147
2147
  font_color = this.palette.switch_on_off;
2148
- // Start-up arrow or first-commit asterisk
2148
+ // Start-up arrow or first-commit asterisk.
2149
2149
  s = VM.LM_SYMBOLS[su ? VM.LM_STARTUP : VM.LM_FIRST_COMMIT];
2150
2150
  } else if(su >= 0) {
2151
2151
  font_color = 'black';
2152
- s = '\u25B3'; // Outline triangle up to indicate anomaly
2152
+ s = '\u25B3'; // Outline triangle up to indicate anomaly.
2153
2153
  }
2154
2154
  if(sd >= 0) {
2155
- // Should not occur, as for shut-down, level should be 0
2155
+ // Should not occur, as for shut-down, level should be 0.
2156
2156
  font_color = 'black';
2157
- s += '\u25BD'; // Add outline triangle down to indicate anomaly
2157
+ s += '\u25BD'; // Add outline triangle down to indicate anomaly.
2158
2158
  }
2159
2159
  } else {
2160
- // Process is OFF => check previous level
2160
+ // Process is OFF => check previous level.
2161
2161
  if(Math.abs(pl) > VM.NEAR_ZERO && sd >= 0) {
2162
- // Process was on, and is now switched OFF
2162
+ // Process was on, and is now switched OFF.
2163
2163
  font_color = this.palette.switch_on_off;
2164
2164
  s = VM.LM_SYMBOLS[VM.LM_SHUTDOWN];
2165
2165
  } else if(sd >= 0) {
2166
2166
  font_color = 'black';
2167
- s = '\u25BD'; // Outline triangle down to indicate anomaly
2167
+ s = '\u25BD'; // Outline triangle down to indicate anomaly.
2168
2168
  }
2169
2169
  if(su >= 0) {
2170
- // Should not occur, as for start-up, level should be > 0
2170
+ // Should not occur, as for start-up, level should be > 0.
2171
2171
  font_color = 'black';
2172
- s += '\u25B3'; // Add outline triangle up to indicate anomaly
2172
+ s += '\u25B3'; // Add outline triangle up to indicate anomaly.
2173
2173
  }
2174
2174
  }
2175
2175
  }
2176
2176
  if(s) {
2177
- // Special symbols are 5 pixels wide and 9 high
2177
+ // Special symbols are 5 pixels wide and 9 high.
2178
2178
  proc.shape.addText(x - hw + btw + 5, y - hh + 4.5, s,
2179
2179
  {fill: font_color});
2180
2180
  }
@@ -199,7 +199,7 @@ class GUIReceiver {
199
199
  // Keep listening, so check again after the time interval
200
200
  setTimeout(() => RECEIVER.listen(), RECEIVER.interval);
201
201
  })
202
- .catch(() => UI.warn(UI.WARNING.NO_CONNECTION, err));
202
+ .catch((err) => UI.warn(UI.WARNING.NO_CONNECTION, err));
203
203
  } else {
204
204
  RECEIVER.log('Executing: ' + RECEIVER.file_name);
205
205
  // NOTE: Virtual Machine will trigger the receiver's reporting
@@ -216,7 +216,7 @@ class GUIReceiver {
216
216
  }
217
217
  }
218
218
  })
219
- .catch(() => UI.warn(UI.WARNING.NO_CONNECTION, err));
219
+ .catch((err) => UI.warn(UI.WARNING.NO_CONNECTION, err));
220
220
  }
221
221
 
222
222
  report() {
@@ -232,7 +232,7 @@ class GUIReceiver {
232
232
  if(this.experiment || !this.active) {
233
233
  if(MODEL.running_experiment) {
234
234
  run = MODEL.running_experiment.active_combination_index;
235
- this.log(`Reporting: ${this.file_name} (run #${run})`);
235
+ this.log(`Reporting: ${file} (run #${run})`);
236
236
  }
237
237
  }
238
238
  // NOTE: If receiver is not active, path and file must be set.
@@ -284,7 +284,7 @@ class GUIReceiver {
284
284
  // the Experiment Manager.
285
285
  if(RECEIVER.active && !RECEIVER.experiment) RECEIVER.callBack();
286
286
  })
287
- .catch(() => UI.warn(UI.WARNING.NO_CONNECTION, err));
287
+ .catch((err) => UI.warn(UI.WARNING.NO_CONNECTION, err));
288
288
  }
289
289
 
290
290
  callBack() {
@@ -317,7 +317,7 @@ class GUIReceiver {
317
317
  }
318
318
  }
319
319
  })
320
- .catch(() => UI.warn(UI.WARNING.NO_CONNECTION, err));
320
+ .catch((err) => UI.warn(UI.WARNING.NO_CONNECTION, err));
321
321
  }
322
322
 
323
323
  } // END of class GUIReceiver