linny-r 2.0.8 → 2.0.10

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.
Files changed (36) hide show
  1. package/README.md +3 -40
  2. package/package.json +6 -2
  3. package/server.js +19 -157
  4. package/static/images/solve-not-same-changed.png +0 -0
  5. package/static/images/solve-not-same-not-changed.png +0 -0
  6. package/static/images/solve-same-changed.png +0 -0
  7. package/static/images/solve-same-not-changed.png +0 -0
  8. package/static/index.html +137 -20
  9. package/static/linny-r.css +260 -23
  10. package/static/scripts/iro.min.js +7 -7
  11. package/static/scripts/linny-r-ctrl.js +126 -85
  12. package/static/scripts/linny-r-gui-actor-manager.js +23 -33
  13. package/static/scripts/linny-r-gui-chart-manager.js +56 -53
  14. package/static/scripts/linny-r-gui-constraint-editor.js +10 -14
  15. package/static/scripts/linny-r-gui-controller.js +644 -260
  16. package/static/scripts/linny-r-gui-dataset-manager.js +64 -66
  17. package/static/scripts/linny-r-gui-documentation-manager.js +11 -17
  18. package/static/scripts/linny-r-gui-equation-manager.js +22 -22
  19. package/static/scripts/linny-r-gui-experiment-manager.js +124 -141
  20. package/static/scripts/linny-r-gui-expression-editor.js +26 -12
  21. package/static/scripts/linny-r-gui-file-manager.js +42 -48
  22. package/static/scripts/linny-r-gui-finder.js +294 -55
  23. package/static/scripts/linny-r-gui-model-autosaver.js +2 -4
  24. package/static/scripts/linny-r-gui-monitor.js +35 -41
  25. package/static/scripts/linny-r-gui-paper.js +42 -70
  26. package/static/scripts/linny-r-gui-power-grid-manager.js +31 -34
  27. package/static/scripts/linny-r-gui-receiver.js +1 -2
  28. package/static/scripts/linny-r-gui-repository-browser.js +44 -46
  29. package/static/scripts/linny-r-gui-scale-unit-manager.js +32 -32
  30. package/static/scripts/linny-r-gui-sensitivity-analysis.js +61 -67
  31. package/static/scripts/linny-r-gui-undo-redo.js +94 -95
  32. package/static/scripts/linny-r-milp.js +20 -24
  33. package/static/scripts/linny-r-model.js +1932 -2274
  34. package/static/scripts/linny-r-utils.js +27 -27
  35. package/static/scripts/linny-r-vm.js +900 -998
  36. package/static/show-png.html +0 -113
@@ -1,113 +0,0 @@
1
- <!DOCTYPE html>
2
- <!--
3
- Linny-R is an executable graphical specification language for (mixed integer)
4
- linear programming (MILP) problems, especially unit commitment problems (UCP).
5
- The Linny-R language and tool have been developed by Pieter Bots at Delft
6
- University of Technology, starting in 2009. The project to develop a browser-
7
- based version started in 2017. See https://linny-r.org for more information.
8
-
9
- This HTML document (show-png.html) is loaded into a new browser tab when the
10
- user clicks on the "download diagram as PNG" button on the top button bar.
11
- It waits until the Linny-R model editor sets the URL of the rendered PNG image
12
- in the browser's localStorage, and then displays this PNG.
13
-
14
- NOTE: If the PNG of the diagram does not rotate the arrow heads, this is due to
15
- a known bug in older versions of Inkscape. The present Linny-R solver cannot
16
- upgrade to a more recent version of Inkscape.
17
- -->
18
-
19
- <!--
20
- Copyright (c) 2020-2024 Delft University of Technology
21
-
22
- Permission is hereby granted, free of charge, to any person obtaining a copy
23
- of this software and associated documentation files (the "Software"), to deal
24
- in the Software without restriction, including without limitation the rights
25
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26
- copies of the Software, and to permit persons to whom the Software is
27
- furnished to do so, subject to the following conditions:
28
-
29
- The above copyright notice and this permission notice shall be included in
30
- all copies or substantial portions of the Software.
31
-
32
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38
- SOFTWARE.
39
- -->
40
- <html lang="en-US">
41
- <head>
42
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
43
- <title>Diagram</title>
44
- <link rel="shortcut icon" type="image/png" href="images/icon.png">
45
- <script type="text/javascript">
46
- function lookForImage(n) {
47
- url = localStorage.getItem('png-url');
48
- if (url !== null) {
49
- let p = document.getElementById('png');
50
- p.src = url;
51
- p.style.display = 'block';
52
- document.getElementById('wait-div').style.display = 'none';
53
- document.getElementById('png-div').style.display = 'block';
54
- if(!url.endsWith('.png')) {
55
- document.getElementById('no-inkscape').style.display = 'block';
56
- }
57
- } else {
58
- if(n >= 75) {
59
- document.getElementById('no-response').style.display = 'block';
60
- }
61
- setTimeout(lookForImage, 200, n+1);
62
- }
63
- }
64
-
65
- function waitForImage() {
66
- document.getElementById('png-div').style.display = 'none';
67
- document.getElementById('wait-div').style.display = 'block';
68
- lookForImage(0);
69
- }
70
- </script>
71
- </head>
72
- <body onload="waitForImage();">
73
- <div id="wait-div" style="width: 95vh; margin: auto">
74
- <div style="text-align: center; font-family: sans-serif; color:gray">
75
- Rendering image &mdash; please wait...
76
- </div>
77
- <div>
78
- <svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"
79
- viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-ripple">
80
- <circle cx="50" cy="50" r="0" fill="none" stroke-width="5" stroke="rgb(245, 245, 245)">
81
- <animate attributeName="r" calcMode="spline" values="0;40" keyTimes="0;1" dur="1.5"
82
- keySplines="0 0.2 0.8 1" begin="-0.75s" repeatCount="indefinite"></animate>
83
- <animate attributeName="opacity" calcMode="spline" values="1;0" keyTimes="0;1" dur="1.5"
84
- keySplines="0.2 0 0.8 1" begin="-0.75s" repeatCount="indefinite"></animate>
85
- </circle>
86
- <circle cx="50" cy="50" r="0" fill="none" stroke-width="5" stroke="rgb(245, 245, 245)">
87
- <animate attributeName="r" calcMode="spline" values="0;40" keyTimes="0;1" dur="1.5"
88
- keySplines="0 0.2 0.8 1" begin="0s" repeatCount="indefinite"></animate>
89
- <animate attributeName="opacity" calcMode="spline" values="1;0" keyTimes="0;1" dur="1.5"
90
- keySplines="0.2 0 0.8 1" begin="0s" repeatCount="indefinite"></animate>
91
- </circle>
92
- </svg>
93
- </div>
94
- </div>
95
- <div id="png-div" title="Right-click to copy/save">
96
- <img id="png" width="95%" src="">
97
- </div>
98
- <div id="no-inkscape" style="display: none; position: absolute;
99
- border-radius: 8px; background-color: #f8f0ff; box-shadow: 0px 0px 3px 3px #a060f0;
100
- left: calc(50vw - 300px); top: 50px; width: 600px; height: 100px;
101
- text-align: center; font-family: sans-serif">
102
- <h3>Image not rendered as Portable Network Graphics (PNG)</h3>
103
- <p>Inkscape is not installed, or was not found by the Linny-R server.</p>
104
- </div>
105
- <div id="no-response" style="display: none; position: absolute;
106
- border-radius: 8px; background-color: #fff8f0; box-shadow: 0px 0px 3px 3px #f08030;
107
- left: calc(50vw - 300px); top: 50px; width: 600px; height: 100px;
108
- text-align: center; font-family: sans-serif">
109
- <h3>Image takes exceptionally long to render</h3>
110
- <p>Check the CLI box running Node.js for error messages.</p>
111
- </div>
112
- </body>
113
- </html>