Skip to content

Commit 849be6c

Browse files
Jan WielemakerJan Wielemaker
Jan Wielemaker
authored and
Jan Wielemaker
committed
Various details
1 parent 8999bc9 commit 849be6c

File tree

2 files changed

+29
-22
lines changed

2 files changed

+29
-22
lines changed

gvugraph.pl

+8-4
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@
4949
dotty_process/1.
5050

5151
run_dotty(Program, File) :-
52-
process_create(path(Program), [File], [process(PID)]),
53-
assert(dotty_process(PID)),
54-
process_wait(PID, _),
55-
retractall(dotty_process(PID)).
52+
setup_call_cleanup(
53+
( process_create(path(Program), [File], [process(PID)]),
54+
assert(dotty_process(PID))
55+
),
56+
process_wait(PID, _),
57+
( retractall(dotty_process(PID)),
58+
catch(delete_file(File), _, true)
59+
)).
5660

5761
kill_dotties :-
5862
forall(dotty_process(PID),

test.pl

+21-18
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@
178178

179179
formula_graph(Sheet, File) :-
180180
sheet_dependency_graph(Sheet, UGraph),
181+
cell_graph(UGraph, File).
182+
183+
cell_graph(UGraph, File) :-
181184
graphml_write_ugraph(File, map_cell,
182185
[ key(node, 'Label', string),
183186
key(node, sheet, string),
@@ -231,33 +234,33 @@
231234
sheet_color('Parameters', green).
232235
sheet_color('Project', gray50).
233236
sheet_color('Technologiekeuzen', blue).
234-
sheet_color('Resultaten GUI', gray50).
235-
sheet_color('Stadsverkeer', gray50).
236-
sheet_color('Personenauto', gray50).
237-
sheet_color('Vrachtverkeer', gray50).
238-
sheet_color('GO WB', gray50).
239-
sheet_color('GO WN', gray50).
240-
sheet_color('GO Ut', gray50).
241-
sheet_color('Bedrijven Warmte', red).
242-
sheet_color('Chemie', gray50).
243-
sheet_color('Kunstmest', gray50).
244-
sheet_color('Staal', gray50).
245-
sheet_color('Landbouw', gray50).
237+
sheet_color('Resultaten GUI', red2).
238+
sheet_color('Stadsverkeer', salmon1).
239+
sheet_color('Personenauto', salmon2).
240+
sheet_color('Vrachtverkeer', salmon3).
241+
sheet_color('GO WB', goldenrod1).
242+
sheet_color('GO WN', goldenrod2).
243+
sheet_color('GO Ut', goldenrod3).
244+
sheet_color('Bedrijven Warmte', salmon4).
245+
sheet_color('Chemie', lightsalmon1).
246+
sheet_color('Kunstmest', lightsalmon2).
247+
sheet_color('Staal', lightsalmon3).
248+
sheet_color('Landbouw', lightsalmon4).
246249
sheet_color('Elektriciteitsproductie', gray50).
247250
sheet_color('Elektriciteitsopslag', gray50).
248251
sheet_color('Elektriciteitsbalans', gray50).
249252
sheet_color('Elektriciteit productie uren', gray50).
250253
sheet_color('Vloeibare brandstoffen', gray50).
251254
sheet_color('Methaan', gray50).
252255
sheet_color('Waterstof', gray50).
253-
sheet_color('Diverse gegevens', gray50).
256+
sheet_color('Diverse gegevens', green4).
254257
sheet_color('Voorraden', gray50).
255258
sheet_color('Infrastructuur', gray50).
256-
sheet_color('Resultaatoverzicht', gray50).
257-
sheet_color('Dataset 1', yellow).
258-
sheet_color('Dataset 2', gray50).
259-
sheet_color('Dataset 3', gray50).
260-
sheet_color('Doelen', gray50).
259+
sheet_color('Resultaatoverzicht', red3).
260+
sheet_color('Dataset 1', yellow1).
261+
sheet_color('Dataset 2', yellow2).
262+
sheet_color('Dataset 3', yellow3).
263+
sheet_color('Doelen', red4).
261264

262265

263266

0 commit comments

Comments
 (0)