linny-r 1.7.0 → 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.
@@ -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
@@ -7124,24 +7124,24 @@ class Cluster extends NodeBox {
7124
7124
  class Node extends NodeBox {
7125
7125
  constructor(cluster, name, actor) {
7126
7126
  super(cluster, name, actor);
7127
- // Nodes are assigned a unique code as "shorthand notation"
7128
- // NOTE: decimal numbers for processes, Excel-style letter codes for
7127
+ // Nodes are assigned a unique code as "shorthand notation".
7128
+ // NOTE: Decimal numbers for processes, Excel-style letter codes for
7129
7129
  // products, i.e., A, ..., Z, AA, AB, etc.
7130
7130
  this.code = null;
7131
- // By default, nodes are NOT data products (only products can become data!)
7131
+ // By default, nodes are NOT data products (only products can become data).
7132
7132
  this.is_data = false;
7133
- // By default, node levels are continuous, but may be set to integer
7133
+ // By default, node levels are continuous, but may be set to integer.
7134
7134
  this.integer_level = false;
7135
- // Processes and products both have input attributes LB, UB and IL, and
7136
- // result attributes L and CP
7135
+ // Processes and products both have input attributes LB, UB and IL,
7136
+ // and result attributes L and CP.
7137
7137
  this.lower_bound = new Expression(this, 'LB', '');
7138
7138
  this.upper_bound = new Expression(this, 'UB', '');
7139
7139
  this.initial_level = new Expression(this, 'IL', '0');
7140
7140
  this.cost_price = [];
7141
- // NOTE: for processes, level denotes the production level, for products
7142
- // the stock level
7141
+ // NOTE: For processes, level denotes the production level, for products
7142
+ // the stock level.
7143
7143
  this.level = [];
7144
- // `inputs` is array of incoming links, `outputs` is array of outgoing links
7144
+ // `inputs` is array of incoming links, `outputs` is array of outgoing links.
7145
7145
  this.inputs = [];
7146
7146
  this.outputs = [];
7147
7147
  this.predecessors = [];
@@ -7162,13 +7162,13 @@ class Node extends NodeBox {
7162
7162
  }
7163
7163
 
7164
7164
  get hasBounds() {
7165
- // Returns TRUE if lower or upper bound is defined for this node
7165
+ // Return TRUE if lower or upper bound is defined for this node.
7166
7166
  return this.upper_bound.defined || this.lower_bound.defined;
7167
7167
  }
7168
7168
 
7169
7169
  setConstraintOffsets() {
7170
- // Sets the offset properties of the constraints that relate to this
7171
- // node; these properties are used when drawing these constraints.
7170
+ // Set the offset properties of the constraints that relate to this
7171
+ // node. These properties are used when drawing these constraints.
7172
7172
  const tbc = {top: [], bottom: [], thumb: []};
7173
7173
  for(let k in MODEL.constraints) if(MODEL.constraints.hasOwnProperty(k)) {
7174
7174
  const
@@ -7426,14 +7426,14 @@ class Node extends NodeBox {
7426
7426
  }
7427
7427
 
7428
7428
  canConstrain(node) {
7429
- // Returns TRUE if this node can constrain `node`
7430
- // NOTE: A node cannot constrain itself, and BOTH nodes must have upper bounds
7429
+ // Return TRUE if this node can constrain `node`.
7430
+ // NOTE: A node cannot constrain itself, and BOTH nodes must have upper bounds.
7431
7431
  return this !== node && this.upper_bound.defined && node.upper_bound.defined;
7432
7432
  }
7433
7433
 
7434
7434
  get costAddingConstraints() {
7435
- // Returns a (possibly empty) list of composite constraints that can
7436
- // transfer cost to this node
7435
+ // Return a (possibly empty) list of composite constraints that can
7436
+ // transfer cost to this node.
7437
7437
  let cac = [];
7438
7438
  for(let k in MODEL.constraints) if(MODEL.constraints.hasOwnProperty(k)) {
7439
7439
  const c = MODEL.constraints[k];
@@ -7448,7 +7448,7 @@ class Node extends NodeBox {
7448
7448
 
7449
7449
  convertLegacyBoundData(lb_data, ub_data) {
7450
7450
  // Convert time series data for LB and UB in legacy models to datasets,
7451
- // and replace attribute expressions by references to these datasets
7451
+ // and replace attribute expressions by references to these datasets.
7452
7452
  if(!lb_data && !ub_data) return;
7453
7453
  const same = lb_data === ub_data;
7454
7454
  if(lb_data) {
@@ -1076,6 +1076,7 @@ if(NODE) module.exports = {
1076
1076
  msecToTime: msecToTime,
1077
1077
  compactClockTime: compactClockTime,
1078
1078
  uniformDecimals: uniformDecimals,
1079
+ capitalized: capitalized,
1079
1080
  ellipsedText: ellipsedText,
1080
1081
  earlierVersion: earlierVersion,
1081
1082
  differences: differences,
@@ -1083,12 +1084,23 @@ if(NODE) module.exports = {
1083
1084
  ciCompare: ciCompare,
1084
1085
  endsWithDigits: endsWithDigits,
1085
1086
  indexOfMatchingBracket: indexOfMatchingBracket,
1087
+ monoSpaced: monoSpaced,
1088
+ monoSpacedVariables: monoSpacedVariables,
1086
1089
  patternList: patternList,
1087
1090
  patternMatch: patternMatch,
1088
- compareSelectors: compareSelectors,
1089
- stringToFloatArray: stringToFloatArray,
1091
+ matchingWildcardNumber: matchingWildcardNumber,
1090
1092
  escapeRegex: escapeRegex,
1093
+ wildcardMatchRegex: wildcardMatchRegex,
1094
+ wildcardFormat: wildcardFormat,
1095
+ matchingNumber: matchingNumber,
1096
+ matchingNumberInList: matchingNumberInList,
1097
+ compareWithTailNumbers: compareWithTailNumbers,
1098
+ compareSelectors: compareSelectors,
1099
+ compareCombinations: compareCombinations,
1091
1100
  addDistinct: addDistinct,
1101
+ mergeDistinct: mergeDistinct,
1102
+ iteratorSet: iteratorSet,
1103
+ integerSet: integerSet,
1092
1104
  setString: setString,
1093
1105
  tupelString: tupelString,
1094
1106
  tupelSetString: tupelSetString,
@@ -1097,6 +1109,7 @@ if(NODE) module.exports = {
1097
1109
  complement: complement,
1098
1110
  xmlEncoded: xmlEncoded,
1099
1111
  xmlDecoded: xmlDecoded,
1112
+ customizeXML: customizeXML,
1100
1113
  cleanXML: cleanXML,
1101
1114
  parseXML: parseXML,
1102
1115
  childNodeByTag: childNodeByTag,
@@ -1107,12 +1120,16 @@ if(NODE) module.exports = {
1107
1120
  parseLetterCode: parseLetterCode,
1108
1121
  randomID: randomID,
1109
1122
  escapedSingleQuotes: escapedSingleQuotes,
1123
+ safeDoubleQuotes: safeDoubleQuotes,
1110
1124
  nameToLines: nameToLines,
1125
+ hexToFloat: hexToFloat,
1126
+ stringToFloatArray: stringToFloatArray,
1111
1127
  hexToBytes: hexToBytes,
1128
+ bytesToHex: bytesToHex,
1112
1129
  arrayBufferToBase64: arrayBufferToBase64,
1113
1130
  base64ToArrayBuffer: base64ToArrayBuffer,
1114
1131
  encryptionKey: encryptionKey,
1115
1132
  encryptMessage: encryptMessage,
1116
1133
  decryptMessage: decryptMessage,
1117
- tryToDecrypt: tryToDecrypt
1134
+ tryToDecrypt: tryToDecrypt
1118
1135
  }