linny-r 1.4.2 → 1.4.4
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 +162 -74
- package/package.json +1 -1
- package/server.js +145 -49
- package/static/images/check-off-not-same-changed.png +0 -0
- package/static/images/check-off-not-same-not-changed.png +0 -0
- package/static/images/check-off-same-changed.png +0 -0
- package/static/images/check-off-same-not-changed.png +0 -0
- package/static/images/check-on-not-same-changed.png +0 -0
- package/static/images/check-on-not-same-not-changed.png +0 -0
- package/static/images/check-on-same-changed.png +0 -0
- package/static/images/check-on-same-not-changed.png +0 -0
- package/static/images/eq-not-same-changed.png +0 -0
- package/static/images/eq-not-same-not-changed.png +0 -0
- package/static/images/eq-same-changed.png +0 -0
- package/static/images/eq-same-not-changed.png +0 -0
- package/static/images/ne-not-same-changed.png +0 -0
- package/static/images/ne-not-same-not-changed.png +0 -0
- package/static/images/ne-same-changed.png +0 -0
- package/static/images/ne-same-not-changed.png +0 -0
- package/static/images/octaeder.svg +993 -0
- package/static/images/sort-asc-lead.png +0 -0
- package/static/images/sort-asc.png +0 -0
- package/static/images/sort-desc-lead.png +0 -0
- package/static/images/sort-desc.png +0 -0
- package/static/images/sort-not.png +0 -0
- package/static/index.html +72 -647
- package/static/linny-r.css +199 -417
- package/static/scripts/linny-r-gui-actor-manager.js +340 -0
- package/static/scripts/linny-r-gui-chart-manager.js +944 -0
- package/static/scripts/linny-r-gui-constraint-editor.js +681 -0
- package/static/scripts/linny-r-gui-controller.js +4005 -0
- package/static/scripts/linny-r-gui-dataset-manager.js +1176 -0
- package/static/scripts/linny-r-gui-documentation-manager.js +739 -0
- package/static/scripts/linny-r-gui-equation-manager.js +307 -0
- package/static/scripts/linny-r-gui-experiment-manager.js +1944 -0
- package/static/scripts/linny-r-gui-expression-editor.js +449 -0
- package/static/scripts/linny-r-gui-file-manager.js +392 -0
- package/static/scripts/linny-r-gui-finder.js +727 -0
- package/static/scripts/linny-r-gui-model-autosaver.js +230 -0
- package/static/scripts/linny-r-gui-monitor.js +448 -0
- package/static/scripts/linny-r-gui-paper.js +2789 -0
- package/static/scripts/linny-r-gui-receiver.js +323 -0
- package/static/scripts/linny-r-gui-repository-browser.js +819 -0
- package/static/scripts/linny-r-gui-scale-unit-manager.js +244 -0
- package/static/scripts/linny-r-gui-sensitivity-analysis.js +778 -0
- package/static/scripts/linny-r-gui-undo-redo.js +560 -0
- package/static/scripts/linny-r-model.js +27 -11
- package/static/scripts/linny-r-utils.js +17 -2
- package/static/scripts/linny-r-vm.js +31 -12
- package/static/scripts/linny-r-gui.js +0 -16761
package/README.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
<img src="https://sysmod.tbm.tudelft.nl/linny-r/images/logo.png" height="55px" alt="Linny-R">
|
2
2
|
|
3
|
-
|
4
|
-
<a href="https://en.wikipedia.org/wiki/Linear_programming" target="_blank">linear programming</a>
|
5
|
-
|
6
|
-
<a href="https://en.wikipedia.org/wiki/
|
3
|
+
Linny-R is an executable graphical specification language for mixed integer
|
4
|
+
<a href="https://en.wikipedia.org/wiki/Linear_programming" target="_blank">linear programming</a>
|
5
|
+
(MILP) problems, especially
|
6
|
+
<a href="https://en.wikipedia.org/wiki/Unit_commitment_problem_in_electrical_power_production"
|
7
|
+
target="_blank">unit commitment problems</a>
|
8
|
+
(UCP) and
|
9
|
+
<a href="https://en.wikipedia.org/wiki/Generation_expansion_planning"
|
10
|
+
target="_blank">generation expansion planning</a> (GEP).
|
7
11
|
|
8
12
|
The graphical language and WYSIWYG model editor are developed by **Pieter Bots** at
|
9
13
|
<a href="https://tudelft.nl" target="_blank">Delft University of Technology</a>.
|
@@ -16,8 +20,9 @@ and a graphical user interface (GUI) that runs in any modern browser.
|
|
16
20
|
These <a href="https://sysmod.tbm.tudelft.nl/linny-r/docs/?68" target="_blank">instruction videos</a>
|
17
21
|
published on YouTube give an idea of what Linny-R can do.
|
18
22
|
|
19
|
-
User documentation for Linny-R is still scant, but it is growing. You can contribute yourself
|
20
|
-
via the official user documentation site
|
23
|
+
User documentation for Linny-R is still scant, but it is growing. You can contribute yourself
|
24
|
+
(in "wiki fashion") via the official user documentation site
|
25
|
+
<a href="https://linny-r.info" target="_blank">https://linny-r.info</a>.
|
21
26
|
Technical documentation will be developed on GitHub: https://github.com/pwgbots/linny-r/wiki
|
22
27
|
|
23
28
|
## Installing Node.js
|
@@ -25,7 +30,7 @@ Technical documentation will be developed on GitHub: https://github.com/pwgbots/
|
|
25
30
|
Linny-R is developed as a JavaScript package, and requires that **Node.js** is installed on your computer.
|
26
31
|
This software can be downloaded from <a href="https://nodejs.org" target="_blank">https://nodejs.org</a>.
|
27
32
|
Make sure that you choose the correct installer for your computer.
|
28
|
-
Linny-R is developed using the _current_ release. Presently (
|
33
|
+
Linny-R is developed using the _current_ release. Presently (August 2023) this is 20.5.1.
|
29
34
|
|
30
35
|
Run the installer and accept the default settings.
|
31
36
|
There is **no** need to install the optional _Tools for Native Modules_.
|
@@ -36,33 +41,38 @@ Verify the installation by typing:
|
|
36
41
|
|
37
42
|
``node --version``
|
38
43
|
|
39
|
-
The response should be the version number of Node.js, for example: v20.
|
44
|
+
The response should be the version number of Node.js, for example: v20.5.1.
|
40
45
|
|
41
46
|
## Installing Linny-R
|
42
47
|
It is advisable to install Linny-R in a directory on your computer, not in a cloud.
|
43
|
-
In this installation guide, the path to this directory is denoted by `
|
48
|
+
In this installation guide, the path to this directory is denoted by `Linny-R`,
|
44
49
|
so in all commands you should replace this with the actual directory path.
|
45
|
-
On a Windows machine
|
46
|
-
and on a macOS machine
|
50
|
+
On a Windows machine the suggested path is `C:\Users\(your user name)\Documents\Linny-R`,
|
51
|
+
and on a macOS machine `/Users/(your user name)/Linny-R`.
|
52
|
+
|
53
|
+
To install Linny-R in this directory, first change to the parent directory like so:
|
54
|
+
|
55
|
+
``cd /Users/(your user name)``
|
47
56
|
|
48
|
-
|
57
|
+
Then create the `Linny-R` directory:
|
49
58
|
|
50
|
-
``mkdir
|
59
|
+
``mkdir Linny-R``
|
51
60
|
|
52
61
|
then change to it:
|
53
62
|
|
54
|
-
``cd
|
63
|
+
``cd Linny-R``
|
55
64
|
|
56
65
|
and then type at the command line prompt:
|
57
66
|
|
58
67
|
``npm install --prefix . linny-r``
|
59
68
|
|
60
|
-
**
|
69
|
+
> **Important**
|
70
|
+
> The spacing around the dot is essential. Type the command in lower case.
|
61
71
|
|
62
|
-
After installation has completed, `
|
72
|
+
After installation has completed, `Linny-R` should have this directory tree structure:
|
63
73
|
|
64
74
|
<pre>
|
65
|
-
|
75
|
+
Linny-R
|
66
76
|
|
|
67
77
|
+-node_modules
|
68
78
|
|
|
@@ -81,18 +91,19 @@ WORKING_DIRECTORY
|
|
81
91
|
+-sounds
|
82
92
|
</pre>
|
83
93
|
|
84
|
-
`
|
94
|
+
`Linny-R` should contain two JSON files `package.json` and `package-lock.json`
|
85
95
|
that should **not** be removed, or you will have to re-install Linny-R. It should also contain
|
86
96
|
a script file to facilitate (single click) launch: on a macOS machine the shell script `linny-r.command`,
|
87
97
|
on a Windows machine the batch script `linny-r.bat`. By default, this script file contains
|
88
98
|
two commands: first change to the Linny-R directory and then tell Node.js to launch the
|
89
99
|
start the Linny-R server.
|
90
100
|
|
91
|
-
**
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
101
|
+
> **Note**
|
102
|
+
> When configuring Linny-R for a network environment where individual users
|
103
|
+
> each have their personal work space (e.g., a virtual drive U:), you must edit this script file,
|
104
|
+
> adding the argument `workspace=path/to/workspace` to the `node` command.
|
105
|
+
> This will instruct Linny-R to create the `user` directory in this workspace directory
|
106
|
+
> instead of the Linny-R directory.
|
96
107
|
|
97
108
|
The `linny-r` directory should contain this file `README.md`,
|
98
109
|
the files `server.js` and `console.js` that will be run by Node.js,
|
@@ -107,43 +118,96 @@ It should also contain the style sheet `linny-r.css` required by the GUI.
|
|
107
118
|
The sub-directories of `static` contain files that are served to the browser by the script
|
108
119
|
`server.js` when it is running in Node.js.
|
109
120
|
|
121
|
+
#### Installing and using an earlier version of Linny-R
|
122
|
+
|
123
|
+
By default, **npm** will install the latest release of the Linny-R software.
|
124
|
+
As this software is developed as part of academic research, new features are added
|
125
|
+
without rigorous testing. Although much effort is dedicated to maintaining upward
|
126
|
+
and downward compatibility, you may find that the latest version does not work as
|
127
|
+
well for you as some earlier version. To re-install an earlier release, for example
|
128
|
+
version 1.4.0, open the CLI, change to your `Linny-R` directory, and then type:
|
129
|
+
|
130
|
+
``npm install linny-r@1.4.0``
|
131
|
+
|
132
|
+
> **Note**
|
133
|
+
> This will overwrite the contents of the `node_modules` directory, but
|
134
|
+
> it will not affect the files in your user space.
|
135
|
+
|
136
|
+
If you prefer to have different versions of Linny-R on your computer, you can
|
137
|
+
create a separate directory for a specific version, then change to this
|
138
|
+
directory and type:
|
139
|
+
|
140
|
+
``npm install --prefix . linny-r@1.4.0``
|
141
|
+
|
142
|
+
> **Note**
|
143
|
+
> To run a specific version in your browser, you must start the server from
|
144
|
+
> the directory where you installed this version.
|
145
|
+
> Should you wish to run two different versions concurrently, you must use
|
146
|
+
> the `port=[number]` option when you start the server for the second version.
|
147
|
+
|
110
148
|
## Configuring the MILP solver
|
111
149
|
|
112
|
-
Linny-R presently supports
|
113
|
-
Gurobi
|
114
|
-
but
|
150
|
+
Linny-R presently supports four MILP solvers: Gurobi, CPLEX, SCIP and LP_solve.
|
151
|
+
Gurobi and CPLEX are _considerably_ more powerful than the open source solvers SCIP and LP_solve,
|
152
|
+
but they require a license.
|
115
153
|
Academic licenses can be obtained by students and staff of eligible institutions.
|
116
154
|
|
155
|
+
> **Important**
|
156
|
+
> When installing a solver, it is advisable to accept the default file
|
157
|
+
> locations that are proposed by the installer.
|
158
|
+
> After installation, do **not** move files to some other directory,
|
159
|
+
> as this is bound to cause problems.
|
160
|
+
|
117
161
|
#### Installing Gurobi
|
118
162
|
|
119
|
-
The software you need to install is
|
163
|
+
The software you need to install is **Gurobi Optimizer**.
|
120
164
|
More information on how to obtain a license, and instructions for installing
|
121
165
|
Gurobi on your computer can be obtained via this URL:
|
122
|
-
https://www.gurobi.com/academia/academic-program-and-licenses/
|
166
|
+
<a href="https://www.gurobi.com/academia/academic-program-and-licenses/"
|
167
|
+
target="_blank">https://www.gurobi.com/academia/academic-program-and-licenses/</a>
|
123
168
|
|
124
169
|
When running a model, Linny-R will try to execute the command line application `gurobi_cl`.
|
125
170
|
It will look for this application in the directory specified in the environment variable PATH on your computer.
|
126
171
|
|
127
|
-
|
128
|
-
|
172
|
+
#### Installing CPLEX
|
173
|
+
|
174
|
+
The software you need to install is **CPLEX**.
|
175
|
+
More information on how to obtain a license, and instructions for installing
|
176
|
+
CPLEX on your computer can be obtained via this URL:
|
177
|
+
<a href="https://www.ibm.com/products/ilog-cplex-optimization-studio"
|
178
|
+
target="_blank">https://www.ibm.com/products/ilog-cplex-optimization-studio</a>
|
179
|
+
|
180
|
+
When running a model, Linny-R will try to execute the command line application `cplex`.
|
181
|
+
It will look for this application in the directory specified in the environment variable PATH
|
182
|
+
or more specifically in the environment variable CPLEX_STUDIO_BINARIES<em>nnnn</em>
|
183
|
+
(where _nnnn_ denotes the CPLEX version number) on your computer.
|
184
|
+
|
185
|
+
#### Installing SCIP
|
186
|
+
|
187
|
+
The SCIP software is open source. Instructions for installation can be found via this URL:
|
188
|
+
<a href="https://scipopt.org/doc/html/INSTALL.php" target="_blank">https://scipopt.org/doc/html/INSTALL.php</a>
|
189
|
+
|
190
|
+
When running a model, Linny-R will try to execute the command line application `scip`.
|
191
|
+
It will look for this application in the directory specified in the environment variable PATH on your computer.
|
129
192
|
|
130
193
|
#### Installing LP_solve
|
131
194
|
|
132
195
|
The LP_solve software is open source and can be downloaded via this URL:
|
133
|
-
https://sourceforge.net/projects/lpsolve
|
196
|
+
<a href="https://sourceforge.net/projects/lpsolve" target="_blank">https://sourceforge.net/projects/lpsolve</a>
|
134
197
|
|
135
|
-
To facilitate installation, the executable files for Windows and macOS can be downloaded from the Linny-R website
|
136
|
-
|
198
|
+
To facilitate installation, the executable files for Windows and macOS can be downloaded from the Linny-R website
|
199
|
+
at Delft University of Technology:
|
200
|
+
<a href="https://sysmod.tbm.tudelft.nl/linny-r/lp_solve" target="_blank">https://sysmod.tbm.tudelft.nl/linny-r/lp_solve</a>
|
137
201
|
|
138
202
|
There you will find links to download LP_solve applications that have been compiled for different platforms.
|
139
203
|
If you do not know which platform to choose, run Linny-R as described below, and the platform will be listed in its output.
|
140
204
|
If no matching LP_solve version is listed, you can try to compile the software from its source.
|
141
205
|
How to do this is explained on the page "Installing LP_solve on a Mac" on the Linny-R documentation site:
|
142
|
-
https://linny-r.info
|
206
|
+
<a href="https://linny-r.info" target="_blank">https://linny-r.info</a>
|
143
207
|
|
144
208
|
When you have downloaded the file (just `lp_solve` for macOS, `lp_solve.exe` for Windows),
|
145
|
-
you must copy or move this file to your `
|
146
|
-
as this is where Linny-R will look for it when it does not find
|
209
|
+
you must copy or move this file to your `Linny-R` directory,
|
210
|
+
as this is where Linny-R will look for it when it does not find one of the other solvers.
|
147
211
|
|
148
212
|
On a macOS machine, you must then make the file `lp_solve` executable.
|
149
213
|
Open Terminal and change to your Linny-R directory, and then type:
|
@@ -163,15 +227,15 @@ If you reach this stage, Linny-R will be able to run LP_solve.
|
|
163
227
|
|
164
228
|
## Running Linny-R
|
165
229
|
|
166
|
-
Open the Command Line Interface (CLI) of your computer, change to your
|
230
|
+
Open the Command Line Interface (CLI) of your computer, change to your Linny-R directory and type:
|
167
231
|
|
168
232
|
``node node_modules/linny-r/server launch``
|
169
233
|
|
170
234
|
This response should be something similar to:
|
171
235
|
|
172
236
|
<pre>
|
173
|
-
Node.js server for Linny-R version 1.2
|
174
|
-
Node.js version: v20.
|
237
|
+
Node.js server for Linny-R version 1.4.2
|
238
|
+
Node.js version: v20.5.1
|
175
239
|
... etc.
|
176
240
|
</pre>
|
177
241
|
|
@@ -181,21 +245,29 @@ The Linny-R GUI should show in your browser window,
|
|
181
245
|
while in the CLI you should see a long series of server log messages like:
|
182
246
|
|
183
247
|
<pre>
|
184
|
-
[2023-
|
185
|
-
[2023-
|
186
|
-
[2023-
|
248
|
+
[2023-08-29 22:55:17] Static file: /index.html
|
249
|
+
[2023-08-29 22:55:17] Static file: /scripts/iro.min.js
|
250
|
+
[2023-08-29 22:55:17] Static file: /images/open.png
|
187
251
|
... etc.
|
188
252
|
</pre>
|
189
253
|
|
254
|
+
> **Important**
|
255
|
+
> Do **not** close the CLI. If you do, the Linny-R GUI may still be
|
256
|
+
> visible in your browser, but you will be warned that it cannot connect
|
257
|
+
> to the server (at 127.0.0.1:5050). This means that you have to restart
|
258
|
+
> Linny-R from a new CLI.
|
259
|
+
|
190
260
|
After loading into the browser, Linny-R will try to connect to the solver.
|
191
|
-
If successful, a notification (blue background) will appear on the status bar
|
192
|
-
stating the name of the solver.
|
261
|
+
If successful, a notification (blue background) will appear on the status bar
|
262
|
+
at the bottom of the window, stating the name of the solver.
|
193
263
|
|
194
264
|
You can then test the GUI by creating a simple model.
|
195
265
|
Make one that has at least one process that outputs a product,
|
196
|
-
and this product must have a price or a set lower bound, otherwise the model
|
266
|
+
and this product must have a price or a set lower bound, otherwise the model
|
267
|
+
will have no objective function.
|
197
268
|
Then click on the _Solve_ button at the bottom of the left-hand tool bar.
|
198
|
-
The Linny-R icon in the upper left corner should start rotating, while the
|
269
|
+
The Linny-R icon in the upper left corner should start rotating, while the
|
270
|
+
status bar at the bottom should display:
|
199
271
|
|
200
272
|
<pre>
|
201
273
|
Solving block 1 of 1
|
@@ -209,10 +281,11 @@ Meanwhile, in the CLI, you should see a server log message like:
|
|
209
281
|
Solve block 1 a
|
210
282
|
</pre>
|
211
283
|
|
212
|
-
To end a modeling session, you can shut down the server by
|
213
|
-
in the upper right corner of the Linny-R GUI in your browser,
|
214
|
-
and then
|
215
|
-
you
|
284
|
+
To end a modeling session, you can shut down the server by clicking on the
|
285
|
+
local host icon in the upper right corner of the Linny-R GUI in your browser,
|
286
|
+
confirming that you want to leave, and then closing your browser (tab).
|
287
|
+
If you do not shut down the server from the browser, you can also stop the
|
288
|
+
server by repeatedly pressing ``Ctrl+C`` in the CLI.
|
216
289
|
|
217
290
|
## Command line options
|
218
291
|
|
@@ -222,7 +295,7 @@ Optionally, you can add more arguments to the `node` command:
|
|
222
295
|
dpi=[number] to overrule the default resolution (300 dpi) for Inkscape
|
223
296
|
launch to automatically launch Linny-R in your default browser
|
224
297
|
port=[number] to overrule the default port number (5050)
|
225
|
-
solver=[name] to overrule the default sequence (Gurobi, LP_solve)
|
298
|
+
solver=[name] to overrule the default sequence (Gurobi, CPLEX, SCIP, LP_solve)
|
226
299
|
workspace=[path] to overrule the default path for the user directory
|
227
300
|
</pre>
|
228
301
|
|
@@ -233,18 +306,18 @@ To facilitate start-up, you can create a shortcut icon for Linny-R on your deskt
|
|
233
306
|
On a Windows machine, open the _File Explorer_, select your Linny-R folder,
|
234
307
|
right-click on the batch file `linny-r.bat`, and select the _Create shortcut_ option.
|
235
308
|
Then right-click on the shortcut file to edit its properties, and click the _Change Icon_ button.
|
236
|
-
The dialog that then appears will allow you to go to the sub-folder
|
237
|
-
where you should select the file `linny-r.ico`.
|
309
|
+
The dialog that then appears will allow you to go to the sub-folder
|
310
|
+
`node_modules\linny-r\static\images`, where you should select the file `linny-r.ico`.
|
238
311
|
Finally, rename the shortcut to `Linny-R` and move or copy it to your desktop.
|
239
312
|
|
240
|
-
On a macOS machine, open
|
313
|
+
On a macOS machine, open Terminal and change to your Linny-R directory, and then type:
|
241
314
|
|
242
315
|
``chmod +x linny-r.command``
|
243
316
|
|
244
317
|
to make the script file executable.
|
245
|
-
To set the icon, open the folder that contains the file `linny-r.command`,
|
318
|
+
To set the icon, use Finder to open the folder that contains the file `linny-r.command`,
|
246
319
|
click on its icon (which still is plain) and open the _Info dialog_ by pressing ``Cmd+I``.
|
247
|
-
Then open your Linny-R folder in
|
320
|
+
Then open your Linny-R folder in Finder, change to the sub-folder `node_modules/linny-r/static/images`,
|
248
321
|
and from there drag/drop the file `linny-r.icns` on the icon shown in the top left corner of the _Info dialog_.
|
249
322
|
|
250
323
|
## User workspace
|
@@ -254,52 +327,66 @@ The sub-directories of this directory `user` are used by Linny-R to store files.
|
|
254
327
|
|
255
328
|
* `autosave` will contain models that have been _auto-saved_
|
256
329
|
* `channel` and `callback` will be used to interact with Linny-R via its _Receiver_
|
330
|
+
* `data` will be used by the _Dataset Manager_ to locate datasets for which a path
|
331
|
+
has been specified
|
257
332
|
* `diagrams` will be used to render Scalable Vector Graphics (SVG) files as
|
258
333
|
Portable Network Graphics (PNG) using Inkscape (if installed)
|
259
334
|
* `modules` will contain models stored in the `local host` _repository_
|
335
|
+
* `reports` will contain text files with time series data and statistics in tab-separated
|
336
|
+
format that can be imported or copy/pasted into Excel
|
260
337
|
* `solver` will contain the files that are exchanged with the Mixed Integer Linear Programming (MILP) solver
|
261
338
|
(the names of the files that will appear in this directory may vary, depending on the MILP-solver you use)
|
262
339
|
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
340
|
+
> **Note**
|
341
|
+
> By default, the `user` directory is created in your `Linny-R` directory.
|
342
|
+
> You can overrule this by starting the server with the `workspace=[path]` option.
|
343
|
+
> This will create a new, empty workspace (the directories listed above) in the specified path.
|
344
|
+
> It will **not** affect or duplicate information from existing workspaces.
|
267
345
|
|
268
346
|
## Installing Inkscape
|
269
347
|
|
270
348
|
Linny-R creates its diagrams and charts as SVG images.
|
271
349
|
When you download a diagram, it will be saved as a .svg file.
|
272
|
-
These files can be viewed and edited using Inkscape, an open source
|
350
|
+
These files can be viewed and edited using Inkscape, an open source
|
351
|
+
vector graphics editor.
|
273
352
|
|
274
|
-
As it may be tedious to first save a diagram as SVG and then render it
|
275
|
-
Linny-R features a *Render diagram as bitmap* button
|
353
|
+
As it may be tedious to first save a diagram as SVG and then render it
|
354
|
+
manually as a bitmap image, Linny-R features a *Render diagram as bitmap* button
|
355
|
+
on the top toolbar, and on the bottom toolbar of the _Chart manager_.
|
276
356
|
When you click it, Linny-R will send the image as SVG to the server.
|
277
357
|
The server script will save the SVG in the `user/diagrams` sub-directory,
|
278
|
-
and then try to execute an Inkscape command that will convert this SVG to
|
358
|
+
and then try to execute an Inkscape command that will convert this SVG to
|
359
|
+
a PNG image file in the same directory.
|
279
360
|
The file name will be `diagram-(date and time).png`.
|
280
|
-
Meanwhile, the browser will have opened a new tab that will be "waiting"
|
361
|
+
Meanwhile, the browser will have opened a new tab that will be "waiting"
|
362
|
+
for this PNG image to become available.
|
281
363
|
If rendering was successful, the image will appear in this browser tab;
|
282
364
|
if rendering failed, the original SVG image will be shown.
|
283
365
|
|
284
|
-
To install Inkscape, please look here:
|
366
|
+
To install Inkscape, please look here:
|
367
|
+
<a href="https://inkscape.org/release" target="_blank">https://inkscape.org/release</a>
|
285
368
|
|
286
|
-
Linny-R will automatically detect whether Inkscape is installed by searching
|
287
|
-
|
369
|
+
Linny-R will automatically detect whether Inkscape is installed by searching
|
370
|
+
for it in the environment variable PATH on your computer. On a macOS computer,
|
371
|
+
Linny-R will look for Inkscape in `/Applications/Inkscape.app/Contents/MacOS`.
|
288
372
|
|
289
|
-
|
290
|
-
|
373
|
+
> **Note**
|
374
|
+
> The installation wizard for Inkscape (version 1.3) may **not**
|
375
|
+
> add the application to the PATH variable. Please check whether you need to
|
376
|
+
> do this yourself.
|
291
377
|
|
292
378
|
## Using Linny-R console
|
293
379
|
|
294
380
|
The console-only version of Linny-R allows you to run a Linny-R model without a web browser.
|
295
381
|
This may be useful when you want run models from a script (shell script, Python, ...).
|
296
|
-
If you open a CLI box, change to your `
|
382
|
+
If you open a CLI box, change to your `Linny-R` directory, and then type:
|
297
383
|
|
298
384
|
``node node_modules/linny-r/console`` _(on Windows, use backslashes)_
|
299
385
|
|
300
386
|
you will see the command line options that allow you to run models in various ways.
|
301
387
|
|
302
|
-
**
|
388
|
+
> **Note**
|
389
|
+
> The console-only version is still in development, and does not provide all functions yet.
|
303
390
|
|
304
391
|
## Troubleshooting problems
|
305
392
|
|
@@ -307,8 +394,9 @@ If during any of the steps above you encounter problems, please try to diagnose
|
|
307
394
|
You can find a lot of useful information on the Linny-R user documentation website:
|
308
395
|
<a href="https://linny-r.info" target="_blank">https://linny-r.info</a>.
|
309
396
|
|
310
|
-
|
311
|
-
|
397
|
+
> **Important**
|
398
|
+
> To diagnose a problem, always look in the CLI box where Node.js is running,
|
399
|
+
> as informative server-side error messages will appear there.
|
312
400
|
|
313
401
|
Then also look at the console window of your browser.
|
314
402
|
Most browsers offer a _Web Developer Tools_ option via their application menu.
|