linny-r 1.1.23 → 1.2.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.
- package/README.md +7 -6
- package/package.json +1 -1
- package/static/images/combination.png +0 -0
- package/static/images/iterator.png +0 -0
- package/static/images/scale.png +0 -0
- package/static/index.html +218 -13
- package/static/linny-r.css +220 -33
- package/static/scripts/linny-r-config.js +6 -0
- package/static/scripts/linny-r-ctrl.js +27 -7
- package/static/scripts/linny-r-gui.js +968 -166
- package/static/scripts/linny-r-model.js +889 -230
- package/static/scripts/linny-r-utils.js +5 -0
- package/static/scripts/linny-r-vm.js +310 -89
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 (
|
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:
|
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:
|
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
|
-
[
|
184
|
-
[
|
185
|
-
[
|
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
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:
|
517
|
-
<input id="settings-product-unit" type="text"
|
518
|
-
style="width:
|
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:
|
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 ≠ 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-
|
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>
|
@@ -789,6 +851,26 @@ and move the cursor over the status bar">
|
|
789
851
|
</div>
|
790
852
|
</div>
|
791
853
|
|
854
|
+
<!-- the CONFIRM LOAD modal asks to confirm to load model from repository -->
|
855
|
+
<div id="confirm-load-from-repo-modal" class="modal">
|
856
|
+
<div id="confirm-load-from-repo-dlg" class="inp-dlg">
|
857
|
+
<div class="dlg-title" style="background-color: #cc88b0">
|
858
|
+
Confirm load model
|
859
|
+
</div>
|
860
|
+
<div id="confirm-load-from-repo-msg">
|
861
|
+
Loading model
|
862
|
+
<span id="confirm-load-from-repo-mod-name"></span>
|
863
|
+
will discard changes you made to the current model. Continue?
|
864
|
+
</div>
|
865
|
+
<div id="confirm-load-from-repo-buttons">
|
866
|
+
<img class="ok-btn big-btn" src="images/ok.png">
|
867
|
+
Yes
|
868
|
+
<img class="cancel-btn big-btn" src="images/cancel.png">
|
869
|
+
No
|
870
|
+
</div>
|
871
|
+
</div>
|
872
|
+
</div>
|
873
|
+
|
792
874
|
<!-- the CONFIRM DELETE modal asks to confirm to delete module from repository -->
|
793
875
|
<div id="confirm-delete-from-repo-modal" class="modal">
|
794
876
|
<div id="confirm-delete-from-repo-dlg" class="inp-dlg">
|
@@ -947,7 +1029,7 @@ and move the cursor over the status bar">
|
|
947
1029
|
<tr>
|
948
1030
|
<td>Unit:</td>
|
949
1031
|
<td>
|
950
|
-
<input id="add-product-unit"
|
1032
|
+
<input id="add-product-unit" list="units-data"
|
951
1033
|
style="width:70px" type="text" autocomplete="off">
|
952
1034
|
</td>
|
953
1035
|
<td style="width:20px;padding:0px">
|
@@ -1247,7 +1329,7 @@ and move the cursor over the status bar">
|
|
1247
1329
|
<div id="product-name-lbl">Name:</div>
|
1248
1330
|
<input id="product-name" type="text" autocomplete="off">
|
1249
1331
|
<div id="product-unit-lbl">Unit:</div>
|
1250
|
-
<input id="product-unit" type="text" autocomplete="off">
|
1332
|
+
<input id="product-unit" type="text" list="units-data" autocomplete="off">
|
1251
1333
|
<div id="source" title="Source products may have level < 0">
|
1252
1334
|
<div id="product-source" class="box clear"></div>
|
1253
1335
|
<div id="product-source-lbl">Source</div>
|
@@ -1283,7 +1365,7 @@ and move the cursor over the status bar">
|
|
1283
1365
|
<div id="product-P-div">
|
1284
1366
|
<div id="product-P-lbl">
|
1285
1367
|
Price
|
1286
|
-
<small>(<span id="product-currency"></span
|
1368
|
+
<small>(<span id="product-currency"></span><span id="product-P-unit"></span>)</small>:
|
1287
1369
|
</div>
|
1288
1370
|
<input id="product-P" type="text" autocomplete="off">
|
1289
1371
|
<img id="product-P-x" class="sbtn enab" src="images/edit.png"
|
@@ -1539,7 +1621,7 @@ and move the cursor over the status bar">
|
|
1539
1621
|
<img class="ok-btn" src="images/ok.png">
|
1540
1622
|
</div>
|
1541
1623
|
<input id="new-selector-name" type="text"
|
1542
|
-
title="Can contain only
|
1624
|
+
title="Can contain only alphanumeric characters, +, -, and %
|
1543
1625
|
NOTE: * and ? will be interpreted as wildcards"
|
1544
1626
|
maxlength="10" autocomplete="off">
|
1545
1627
|
<div id="new-selector-label">(1 to 10 characters)</div>
|
@@ -1555,7 +1637,7 @@ NOTE: * and ? will be interpreted as wildcards"
|
|
1555
1637
|
<img class="ok-btn" src="images/ok.png">
|
1556
1638
|
</div>
|
1557
1639
|
<input id="rename-selector-name" type="text"
|
1558
|
-
title="Can contain only
|
1640
|
+
title="Can contain only alphanumeric characters, +, -, and %"
|
1559
1641
|
maxlength="10" autocomplete="off">
|
1560
1642
|
<div id="rename-selector-label">(1 to 10 characters)</div>
|
1561
1643
|
</div>
|
@@ -1575,6 +1657,8 @@ NOTE: * and ? will be interpreted as wildcards"
|
|
1575
1657
|
</div>
|
1576
1658
|
<div id="series-default-lbl">Default value:</div>
|
1577
1659
|
<input id="series-default" type="text" autocomplete="off">
|
1660
|
+
<div id="series-unit-lbl">Unit:</div>
|
1661
|
+
<input id="series-unit" type="text" list="units-data" autocomplete="off">
|
1578
1662
|
<div id="series-periodic" class="box clear"></div>
|
1579
1663
|
<div id="series-periodic-lbl">Periodic</div>
|
1580
1664
|
<div id="series-array" class="box clear"></div>
|
@@ -2015,8 +2099,12 @@ NOTE: * and ? will be interpreted as wildcards"
|
|
2015
2099
|
title="Move dimension down in list">
|
2016
2100
|
<img id="xp-d-settings-btn" class="v-btn" src="images/settings.png"
|
2017
2101
|
title="Edit model settings dimensions">
|
2102
|
+
<img id="xp-d-iterator-btn" class="v-btn" src="images/iterator.png"
|
2103
|
+
title="Edit iterator ranges">
|
2018
2104
|
<img id="xp-d-actor-btn" class="v-btn" src="images/actors.png"
|
2019
|
-
title="Edit
|
2105
|
+
title="Edit actors dimension">
|
2106
|
+
<img id="xp-d-combination-btn" class="v-btn" src="images/combination.png"
|
2107
|
+
title="Edit combination dimensions">
|
2020
2108
|
<img id="xp-d-delete-btn" class="v-btn" src="images/remove.png"
|
2021
2109
|
title="Remove selected dimension from list">
|
2022
2110
|
</div>
|
@@ -2232,6 +2320,55 @@ NOTE: * and ? will be interpreted as wildcards"
|
|
2232
2320
|
</div>
|
2233
2321
|
</div>
|
2234
2322
|
|
2323
|
+
<!-- the ITERATOR dialog permits editing the iterator ranges -->
|
2324
|
+
<div id="xp-iterator-modal" class="modal">
|
2325
|
+
<div id="xp-iterator-dlg" class="inp-dlg">
|
2326
|
+
<div class="dlg-title">
|
2327
|
+
Iterator ranges
|
2328
|
+
<img class="cancel-btn" src="images/cancel.png">
|
2329
|
+
<img class="ok-btn" src="images/ok.png">
|
2330
|
+
</div>
|
2331
|
+
<table id="xp-iterator-table">
|
2332
|
+
<tr>
|
2333
|
+
<td>i</td><td>=</td>
|
2334
|
+
<td>
|
2335
|
+
<input id="xp-iterator-i-from" type="text" class="range-limit"
|
2336
|
+
placeholder="0" maxlength="4" autocomplete="off">
|
2337
|
+
</td>
|
2338
|
+
<td>…</td>
|
2339
|
+
<td>
|
2340
|
+
<input id="xp-iterator-i-to" type="text" class="range-limit"
|
2341
|
+
placeholder="0" maxlength="4" autocomplete="off">
|
2342
|
+
</td>
|
2343
|
+
</tr>
|
2344
|
+
<tr>
|
2345
|
+
<td>j</td><td>=</td>
|
2346
|
+
<td>
|
2347
|
+
<input id="xp-iterator-j-from" type="text" class="range-limit"
|
2348
|
+
placeholder="0" maxlength="4" autocomplete="off">
|
2349
|
+
</td>
|
2350
|
+
<td>…</td>
|
2351
|
+
<td>
|
2352
|
+
<input id="xp-iterator-j-to" type="text" class="range-limit"
|
2353
|
+
placeholder="0" maxlength="4" autocomplete="off">
|
2354
|
+
</td>
|
2355
|
+
</tr>
|
2356
|
+
<tr>
|
2357
|
+
<td>k</td><td>=</td>
|
2358
|
+
<td>
|
2359
|
+
<input id="xp-iterator-k-from" type="text" class="range-limit"
|
2360
|
+
placeholder="0" maxlength="4" autocomplete="off">
|
2361
|
+
</td>
|
2362
|
+
<td>…</td>
|
2363
|
+
<td>
|
2364
|
+
<input id="xp-iterator-k-to" type="text" class="range-limit"
|
2365
|
+
placeholder="0" maxlength="4" autocomplete="off">
|
2366
|
+
</td>
|
2367
|
+
</tr>
|
2368
|
+
</table>
|
2369
|
+
</div>
|
2370
|
+
</div>
|
2371
|
+
|
2235
2372
|
<!-- the SETTINGS dialog permits editing the model settings dimensions -->
|
2236
2373
|
<div id="xp-settings-modal" class="modal">
|
2237
2374
|
<div id="xp-settings-dlg" class="inp-dlg">
|
@@ -2344,6 +2481,74 @@ Example: s=0.5h t=1-480 b=24 l=24 (in this order: s t b l)">
|
|
2344
2481
|
</div>
|
2345
2482
|
</div>
|
2346
2483
|
|
2484
|
+
<!-- the COMBINATION dialog permits editing the combination dimensions -->
|
2485
|
+
<div id="xp-combination-modal" class="modal">
|
2486
|
+
<div id="xp-combination-dlg" class="inp-dlg">
|
2487
|
+
<div class="dlg-title">
|
2488
|
+
Combination dimensions
|
2489
|
+
<img class="close-btn" src="images/close.png">
|
2490
|
+
</div>
|
2491
|
+
<div id="xp-combination-s-header">Combination selectors:
|
2492
|
+
<img id="xp-combination-s-add-btn" class="v-btn" src="images/add.png"
|
2493
|
+
title="Add combination selector">
|
2494
|
+
</div>
|
2495
|
+
<div id="xp-combination-s-scroll-area">
|
2496
|
+
<table id="xp-combination-s-table">
|
2497
|
+
</table>
|
2498
|
+
</div>
|
2499
|
+
<div id="xp-combination-d-header">Combination dimensions:
|
2500
|
+
<img id="xp-combination-d-add-btn" class="v-btn" src="images/add.png"
|
2501
|
+
title="Add combination dimension">
|
2502
|
+
</div>
|
2503
|
+
<div id="xp-combination-d-scroll-area">
|
2504
|
+
<table id="xp-combination-d-table">
|
2505
|
+
</table>
|
2506
|
+
</div>
|
2507
|
+
</div>
|
2508
|
+
</div>
|
2509
|
+
|
2510
|
+
<!-- the COMBINATION SELECTOR dialog prompts for a selector + string -->
|
2511
|
+
<div id="xp-combination-selector-modal" class="modal">
|
2512
|
+
<div id="xp-combination-selector-dlg" class="inp-dlg">
|
2513
|
+
<div class="dlg-title">
|
2514
|
+
<span id="xp-combination-selector-action">Edit</span>
|
2515
|
+
combination selector
|
2516
|
+
<span id="xp-combination-selector-clear" class="sd-clear">
|
2517
|
+
(clear combination field to remove)
|
2518
|
+
</span>
|
2519
|
+
<img class="cancel-btn" src="images/cancel.png">
|
2520
|
+
<img class="ok-btn" src="images/ok.png">
|
2521
|
+
</div>
|
2522
|
+
<div style="padding: 2px; white-space: nowrap">
|
2523
|
+
<label>Selector:</label>
|
2524
|
+
<input id="xp-combination-selector-code" type="text"
|
2525
|
+
title="Max. 10 characters (only alphanumericals, +, -, and %)"
|
2526
|
+
maxlength="10" autocomplete="off">
|
2527
|
+
<label>Combination:</label>
|
2528
|
+
<input id="xp-combination-selector-string" type="text" autocomplete="off"
|
2529
|
+
title="One or more selectors, each from a different dimension">
|
2530
|
+
</div>
|
2531
|
+
</div>
|
2532
|
+
</div>
|
2533
|
+
|
2534
|
+
<!-- the COMBINATION DIMENSION dialog prompts for a combination dimension -->
|
2535
|
+
<div id="xp-combination-dimension-modal" class="modal">
|
2536
|
+
<div id="xp-combination-dimension-dlg" class="inp-dlg">
|
2537
|
+
<div class="dlg-title">
|
2538
|
+
<span id="xp-combination-dimension-action">Edit</span>
|
2539
|
+
combination dimension
|
2540
|
+
<span id="xp-combination-dimension-clear">(clear to remove)</span>
|
2541
|
+
<img class="cancel-btn" src="images/cancel.png">
|
2542
|
+
<img class="ok-btn" src="images/ok.png">
|
2543
|
+
</div>
|
2544
|
+
<div style="padding: 2px; white-space: nowrap"
|
2545
|
+
title="One or more combination selectors, separated by spaces">
|
2546
|
+
<label>Selectors:</label>
|
2547
|
+
<input id="xp-combination-dimension-string" type="text" autocomplete="off">
|
2548
|
+
</div>
|
2549
|
+
</div>
|
2550
|
+
</div>
|
2551
|
+
|
2347
2552
|
<!-- The "clusters to ignore" dialog displays a scrollable list of clusters
|
2348
2553
|
set to be ignored for specified selectors.
|
2349
2554
|
NOTE: Changes to this list are discarded if CANCEL is clicked.
|