linny-r 1.1.23 → 1.2.0

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.
package/README.md CHANGED
@@ -25,7 +25,7 @@ Technical documentation will be developed on GitHub: https://github.com/pwgbots/
25
25
  Linny-R is developed as a JavaScript package, and requires that **Node.js** is installed on your computer.
26
26
  This software can be downloaded from <a href="https://nodejs.org" target="_blank">https://nodejs.org</a>.
27
27
  Make sure that you choose the correct installer for your computer.
28
- Linny-R is developed using the _current_ release. Presently (February 2023) this is 19.6.0.
28
+ Linny-R is developed using the _current_ release. Presently (April 2023) this is 20.0.0.
29
29
 
30
30
  Run the installer and accept the default settings.
31
31
  There is **no** need to install the optional _Tools for Native Modules_.
@@ -36,7 +36,7 @@ Verify the installation by typing:
36
36
 
37
37
  ``node --version``
38
38
 
39
- The response should be the version number of Node.js, for example: v19.6.0.
39
+ The response should be the version number of Node.js, for example: v20.0.0.
40
40
 
41
41
  ## Installing Linny-R
42
42
  It is advisable to install Linny-R in a directory on your computer, not in a cloud.
@@ -116,6 +116,7 @@ Academic licenses can be obtained by students and staff of eligible institutions
116
116
 
117
117
  #### Installing Gurobi
118
118
 
119
+ The software you need to install is '''Gurobi Optimizer'''.
119
120
  More information on how to obtain a license, and instructions for installing
120
121
  Gurobi on your computer can be obtained via this URL:
121
122
  https://www.gurobi.com/academia/academic-program-and-licenses/
@@ -170,7 +171,7 @@ This response should be something similar to:
170
171
 
171
172
  <pre>
172
173
  Node.js server for Linny-R version 1.1.21
173
- Node.js version: v19.6.0
174
+ Node.js version: v20.0.0
174
175
  ... etc.
175
176
  </pre>
176
177
 
@@ -180,9 +181,9 @@ The Linny-R GUI should show in your browser window,
180
181
  while in the CLI you should see a long series of server log messages like:
181
182
 
182
183
  <pre>
183
- [2022-10-17 14:55:37] Static file: /index.html
184
- [2022-10-17 14:55:37] Static file: /scripts/iro.min.js
185
- [2022-10-17 14:55:37] Static file: /images/open.png
184
+ [2023-04-29 22:55:17] Static file: /index.html
185
+ [2023-04-29 22:55:17] Static file: /scripts/iro.min.js
186
+ [2023-04-29 22:55:17] Static file: /images/open.png
186
187
  ... etc.
187
188
  </pre>
188
189
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linny-r",
3
- "version": "1.1.23",
3
+ "version": "1.2.0",
4
4
  "description": "Executable graphical language with WYSIWYG editor for MILP models",
5
5
  "main": "server.js",
6
6
  "scripts": {
Binary file
Binary file
Binary file
package/static/index.html CHANGED
@@ -165,7 +165,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
165
165
  // Inform user that newer version exists
166
166
  UI.check_update_modal.element('msg').innerHTML = [
167
167
  '<a href="', GITHUB_REPOSITORY,
168
- '/wiki/Linny-R-version-history" ',
168
+ '/wiki/Linny-R-version-history#%EF%B8%8F-current-',
169
+ info[1].replaceAll('.', ''), '" ',
169
170
  'title="Click to view version release notes" ',
170
171
  'target="_blank">Version <strong>',
171
172
  info[1], '</strong></a> released on ',
@@ -198,6 +199,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
198
199
  UNDO_STACK = new UndoStack();
199
200
  X_EDIT = new ExpressionEditor();
200
201
  ACTOR_MANAGER = new ActorManager();
202
+ SCALE_UNIT_MANAGER = new ScaleUnitManager();
201
203
  EQUATION_MANAGER = new EquationManager();
202
204
  FINDER = new Finder();
203
205
  CONSTRAINT_EDITOR = new ConstraintEditor();
@@ -487,7 +489,12 @@ and move the cursor over the status bar">
487
489
  </strong>
488
490
  </div>
489
491
  </div>
490
- </div>
492
+ </div>
493
+
494
+ <!-- the UNITS datalist is a placeholder for scale units -->
495
+ <datalist id="units-data">
496
+ <option value="1">
497
+ </datalist>
491
498
 
492
499
  <!-- the MODEL SETTINGS dialog allows the user to modify model parameters -->
493
500
  <div id="settings-modal" class="modal">
@@ -510,15 +517,21 @@ and move the cursor over the status bar">
510
517
  <td><input id="settings-author" type="text" autocomplete="off"
511
518
  style="width:270px"></td>
512
519
  </tr>
513
- </table>
514
- <table style="width:100%; white-space: nowrap">
515
520
  <tr>
516
521
  <td colspan="2">Default product unit:&nbsp;
517
- <input id="settings-product-unit" type="text" autocomplete="off"
518
- style="width:45px;margin-right:19px">Currency unit:&nbsp;
522
+ <input id="settings-product-unit" type="text"
523
+ list="units-data" autocomplete="off" style="width:80px">
524
+ <img id="settings-scale-units-btn" class="sbtn" src="images/scale.png"
525
+ title="View scale units">
526
+ </td>
527
+ </tr>
528
+ <tr>
529
+ <td colspan="2">Currency unit:&nbsp;
519
530
  <input id="settings-currency-unit" type="text" style="width:45px">
520
531
  </td>
521
532
  </tr>
533
+ </table>
534
+ <table style="width:100%; white-space: nowrap">
522
535
  <tr>
523
536
  <td style="padding:0px">
524
537
  <div id="settings-decimal-comma" class="box clear"></div>
@@ -599,6 +612,55 @@ and move the cursor over the status bar">
599
612
  </div>
600
613
  </div>
601
614
 
615
+ <!-- the SCALE UNITS dialog allows viewing/editing scale units -->
616
+ <div id="scale-units-modal" class="modal">
617
+ <div id="scale-units-dlg" class="inp-dlg">
618
+ <div class="dlg-title">
619
+ Scale units
620
+ <img class="close-btn" src="images/close.png">
621
+ </div>
622
+ <div id="scale-units-buttons">
623
+ <img id="scale-units-new-btn" class="btn enab" src="images/new.png"
624
+ title="New scale unit">
625
+ <img id="scale-units-edit-btn" class="btn disab" src="images/edit.png"
626
+ title="Edit selected scale unit">
627
+ <img id="scale-units-delete-btn" class="btn disab" src="images/delete.png"
628
+ title="Delete selected scale unit">
629
+ </div>
630
+ <div id="scale-units-scroll-area">
631
+ <table id="scale-units-table">
632
+ </table>
633
+ </div>
634
+ </div>
635
+ </div>
636
+
637
+ <!-- the ADD SCALE UNIT dialog prompts for a new scale unit -->
638
+ <div id="new-scale-unit-modal" class="modal">
639
+ <div id="new-scale-unit-dlg" class="inp-dlg">
640
+ <div class="dlg-title">
641
+ <span id="new-scale-unit-action" >Define new</span> scale unit
642
+ <img class="cancel-btn" src="images/cancel.png"">
643
+ <img class="ok-btn" src="images/ok.png">
644
+ </div>
645
+ <table>
646
+ <tr>
647
+ <td>Unit:</td>
648
+ <td title="Unit symbols must be alphanumeric and start with a letter.
649
+ NOTE: Unit symbols are case-sensitive, so BTU &ne; Btu">
650
+ <input id="new-scale-unit-name" type="text" autocomplete="off">
651
+ </td>
652
+ <td>=</td>
653
+ <td>
654
+ <input id="new-scale-unit-scalar" type="text" autocomplete="off">
655
+ </td>
656
+ <td title="Base unit (optional)">
657
+ <input id="new-scale-unit-base" type="text" list="units-data" autocomplete="off">
658
+ </td>
659
+ </tr>
660
+ </table>
661
+ </div>
662
+ </div>
663
+
602
664
  <!-- the REPOSITORY BROWSER dialog allows interaction with repositories -->
603
665
  <div id="repository-dlg" class="inp-dlg">
604
666
  <div id="repository-hdr" class="dragger dlg-title">Repository browser
@@ -741,7 +803,7 @@ and move the cursor over the status bar">
741
803
  <tr>
742
804
  <td>Module:</td>
743
805
  <td>
744
- <input id="store-bb-model-in-repository-name" type="text"
806
+ <input id="store-bb-in-repository-model-name" type="text"
745
807
  autocomplete="off" style="width:266px; font-size:12px;">
746
808
  </td>
747
809
  </tr>
@@ -947,7 +1009,7 @@ and move the cursor over the status bar">
947
1009
  <tr>
948
1010
  <td>Unit:</td>
949
1011
  <td>
950
- <input id="add-product-unit"
1012
+ <input id="add-product-unit" list="units-data"
951
1013
  style="width:70px" type="text" autocomplete="off">
952
1014
  </td>
953
1015
  <td style="width:20px;padding:0px">
@@ -1247,7 +1309,7 @@ and move the cursor over the status bar">
1247
1309
  <div id="product-name-lbl">Name:</div>
1248
1310
  <input id="product-name" type="text" autocomplete="off">
1249
1311
  <div id="product-unit-lbl">Unit:</div>
1250
- <input id="product-unit" type="text" autocomplete="off">
1312
+ <input id="product-unit" type="text" list="units-data" autocomplete="off">
1251
1313
  <div id="source" title="Source products may have level &lt; 0">
1252
1314
  <div id="product-source" class="box clear"></div>
1253
1315
  <div id="product-source-lbl">Source</div>
@@ -1283,7 +1345,7 @@ and move the cursor over the status bar">
1283
1345
  <div id="product-P-div">
1284
1346
  <div id="product-P-lbl">
1285
1347
  Price
1286
- <small>(<span id="product-currency"></span>/<span id="product-P-unit"></span>)</small>:
1348
+ <small>(<span id="product-currency"></span><span id="product-P-unit"></span>)</small>:
1287
1349
  </div>
1288
1350
  <input id="product-P" type="text" autocomplete="off">
1289
1351
  <img id="product-P-x" class="sbtn enab" src="images/edit.png"
@@ -1539,7 +1601,7 @@ and move the cursor over the status bar">
1539
1601
  <img class="ok-btn" src="images/ok.png">
1540
1602
  </div>
1541
1603
  <input id="new-selector-name" type="text"
1542
- title="Can contain only alphanumerical characters, +, -, and %
1604
+ title="Can contain only alphanumeric characters, +, -, and %
1543
1605
  NOTE: * and ? will be interpreted as wildcards"
1544
1606
  maxlength="10" autocomplete="off">
1545
1607
  <div id="new-selector-label">(1 to 10 characters)</div>
@@ -1555,7 +1617,7 @@ NOTE: * and ? will be interpreted as wildcards"
1555
1617
  <img class="ok-btn" src="images/ok.png">
1556
1618
  </div>
1557
1619
  <input id="rename-selector-name" type="text"
1558
- title="Can contain only alphanumerical characters, +, -, and %"
1620
+ title="Can contain only alphanumeric characters, +, -, and %"
1559
1621
  maxlength="10" autocomplete="off">
1560
1622
  <div id="rename-selector-label">(1 to 10 characters)</div>
1561
1623
  </div>
@@ -1575,6 +1637,8 @@ NOTE: * and ? will be interpreted as wildcards"
1575
1637
  </div>
1576
1638
  <div id="series-default-lbl">Default value:</div>
1577
1639
  <input id="series-default" type="text" autocomplete="off">
1640
+ <div id="series-unit-lbl">Unit:</div>
1641
+ <input id="series-unit" type="text" list="units-data" autocomplete="off">
1578
1642
  <div id="series-periodic" class="box clear"></div>
1579
1643
  <div id="series-periodic-lbl">Periodic</div>
1580
1644
  <div id="series-array" class="box clear"></div>
@@ -2015,8 +2079,12 @@ NOTE: * and ? will be interpreted as wildcards"
2015
2079
  title="Move dimension down in list">
2016
2080
  <img id="xp-d-settings-btn" class="v-btn" src="images/settings.png"
2017
2081
  title="Edit model settings dimensions">
2082
+ <img id="xp-d-iterator-btn" class="v-btn" src="images/iterator.png"
2083
+ title="Edit iterator ranges">
2018
2084
  <img id="xp-d-actor-btn" class="v-btn" src="images/actors.png"
2019
- title="Edit actor dimension">
2085
+ title="Edit actors dimension">
2086
+ <img id="xp-d-combination-btn" class="v-btn" src="images/combination.png"
2087
+ title="Edit combination dimensions">
2020
2088
  <img id="xp-d-delete-btn" class="v-btn" src="images/remove.png"
2021
2089
  title="Remove selected dimension from list">
2022
2090
  </div>
@@ -2232,6 +2300,55 @@ NOTE: * and ? will be interpreted as wildcards"
2232
2300
  </div>
2233
2301
  </div>
2234
2302
 
2303
+ <!-- the ITERATOR dialog permits editing the iterator ranges -->
2304
+ <div id="xp-iterator-modal" class="modal">
2305
+ <div id="xp-iterator-dlg" class="inp-dlg">
2306
+ <div class="dlg-title">
2307
+ Iterator ranges
2308
+ <img class="cancel-btn" src="images/cancel.png">
2309
+ <img class="ok-btn" src="images/ok.png">
2310
+ </div>
2311
+ <table id="xp-iterator-table">
2312
+ <tr>
2313
+ <td>i</td><td>=</td>
2314
+ <td>
2315
+ <input id="xp-iterator-i-from" type="text" class="range-limit"
2316
+ placeholder="0" maxlength="4" autocomplete="off">
2317
+ </td>
2318
+ <td>&hellip;</td>
2319
+ <td>
2320
+ <input id="xp-iterator-i-to" type="text" class="range-limit"
2321
+ placeholder="0" maxlength="4" autocomplete="off">
2322
+ </td>
2323
+ </tr>
2324
+ <tr>
2325
+ <td>j</td><td>=</td>
2326
+ <td>
2327
+ <input id="xp-iterator-j-from" type="text" class="range-limit"
2328
+ placeholder="0" maxlength="4" autocomplete="off">
2329
+ </td>
2330
+ <td>&hellip;</td>
2331
+ <td>
2332
+ <input id="xp-iterator-j-to" type="text" class="range-limit"
2333
+ placeholder="0" maxlength="4" autocomplete="off">
2334
+ </td>
2335
+ </tr>
2336
+ <tr>
2337
+ <td>k</td><td>=</td>
2338
+ <td>
2339
+ <input id="xp-iterator-k-from" type="text" class="range-limit"
2340
+ placeholder="0" maxlength="4" autocomplete="off">
2341
+ </td>
2342
+ <td>&hellip;</td>
2343
+ <td>
2344
+ <input id="xp-iterator-k-to" type="text" class="range-limit"
2345
+ placeholder="0" maxlength="4" autocomplete="off">
2346
+ </td>
2347
+ </tr>
2348
+ </table>
2349
+ </div>
2350
+ </div>
2351
+
2235
2352
  <!-- the SETTINGS dialog permits editing the model settings dimensions -->
2236
2353
  <div id="xp-settings-modal" class="modal">
2237
2354
  <div id="xp-settings-dlg" class="inp-dlg">
@@ -2344,6 +2461,74 @@ Example: s=0.5h t=1-480 b=24 l=24 (in this order: s t b l)">
2344
2461
  </div>
2345
2462
  </div>
2346
2463
 
2464
+ <!-- the COMBINATION dialog permits editing the combination dimensions -->
2465
+ <div id="xp-combination-modal" class="modal">
2466
+ <div id="xp-combination-dlg" class="inp-dlg">
2467
+ <div class="dlg-title">
2468
+ Combination dimensions
2469
+ <img class="close-btn" src="images/close.png">
2470
+ </div>
2471
+ <div id="xp-combination-s-header">Combination selectors:
2472
+ <img id="xp-combination-s-add-btn" class="v-btn" src="images/add.png"
2473
+ title="Add combination selector">
2474
+ </div>
2475
+ <div id="xp-combination-s-scroll-area">
2476
+ <table id="xp-combination-s-table">
2477
+ </table>
2478
+ </div>
2479
+ <div id="xp-combination-d-header">Combination dimensions:
2480
+ <img id="xp-combination-d-add-btn" class="v-btn" src="images/add.png"
2481
+ title="Add combination dimension">
2482
+ </div>
2483
+ <div id="xp-combination-d-scroll-area">
2484
+ <table id="xp-combination-d-table">
2485
+ </table>
2486
+ </div>
2487
+ </div>
2488
+ </div>
2489
+
2490
+ <!-- the COMBINATION SELECTOR dialog prompts for a selector + string -->
2491
+ <div id="xp-combination-selector-modal" class="modal">
2492
+ <div id="xp-combination-selector-dlg" class="inp-dlg">
2493
+ <div class="dlg-title">
2494
+ <span id="xp-combination-selector-action">Edit</span>
2495
+ combination selector
2496
+ <span id="xp-combination-selector-clear" class="sd-clear">
2497
+ (clear combination field to remove)
2498
+ </span>
2499
+ <img class="cancel-btn" src="images/cancel.png">
2500
+ <img class="ok-btn" src="images/ok.png">
2501
+ </div>
2502
+ <div style="padding: 2px; white-space: nowrap">
2503
+ <label>Selector:</label>
2504
+ <input id="xp-combination-selector-code" type="text"
2505
+ title="Max. 10 characters (only alphanumericals, +, -, and %)"
2506
+ maxlength="10" autocomplete="off">
2507
+ <label>Combination:</label>
2508
+ <input id="xp-combination-selector-string" type="text" autocomplete="off"
2509
+ title="One or more selectors, each from a different dimension">
2510
+ </div>
2511
+ </div>
2512
+ </div>
2513
+
2514
+ <!-- the COMBINATION DIMENSION dialog prompts for a combination dimension -->
2515
+ <div id="xp-combination-dimension-modal" class="modal">
2516
+ <div id="xp-combination-dimension-dlg" class="inp-dlg">
2517
+ <div class="dlg-title">
2518
+ <span id="xp-combination-dimension-action">Edit</span>
2519
+ combination dimension
2520
+ <span id="xp-combination-dimension-clear">(clear to remove)</span>
2521
+ <img class="cancel-btn" src="images/cancel.png">
2522
+ <img class="ok-btn" src="images/ok.png">
2523
+ </div>
2524
+ <div style="padding: 2px; white-space: nowrap"
2525
+ title="One or more combination selectors, separated by spaces">
2526
+ <label>Selectors:</label>
2527
+ <input id="xp-combination-dimension-string" type="text" autocomplete="off">
2528
+ </div>
2529
+ </div>
2530
+ </div>
2531
+
2347
2532
  <!-- The "clusters to ignore" dialog displays a scrollable list of clusters
2348
2533
  set to be ignored for specified selectors.
2349
2534
  NOTE: Changes to this list are discarded if CANCEL is clicked.