Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add digraph to cnf matrix #25

Open
qjhart opened this issue May 10, 2016 · 3 comments
Open

Add digraph to cnf matrix #25

qjhart opened this issue May 10, 2016 · 3 comments

Comments

@qjhart
Copy link
Collaborator

qjhart commented May 10, 2016

Here's a simple example, of a digraph. It would be nice if we could add these in with the cnf matrix command, although they do get complicated pretty quickly.

digraph g {
SOURCE -> "INBOUND.2001-08-31"
"INBOUND.2001-08-31" -> "SR_WHI.2001-08-31" [label=203];
"OUTBOUND.2001-08-31" -> SINK;
"SR_WHI.2001-08-31" -> "OUTBOUND.2001-08-31" [label= 1.348958];
"SR_WHI.2001-08-31" -> "OUTBOUND.2001-08-31" [label=5.226399];
"SR_WHI.2001-08-31" -> "OUTBOUND.2001-08-31" [label=202.909302];
SOURCE -> "INBOUND.2001-09-30";
"INBOUND.2001-09-30" -> "SR_WHI.2001-09-30" [label=186.47];
"OUTBOUND.2001-09-30" -> SINK;
"SR_WHI.2001-09-30" -> "OUTBOUND.2001-09-30" [label=0.317708];
"SR_WHI.2001-09-30" -> "OUTBOUND.2001-09-30" [label=8.92557];
"SR_WHI.2001-09-30" -> "OUTBOUND.2001-09-30" [label=176.010254];
SOURCE -> INITIAL;
INITIAL -> "SR_WHI.2001-08-31" [label=179.703156];
"SR_WHI.2001-08-31" -> "SR_WHI.2001-09-30" [label="10 10"];
"SR_WHI.2001-08-31" -> "SR_WHI.2001-09-30" [label="0 17.5"];
"SR_WHI.2001-08-31" -> "SR_WHI.2001-09-30" [label="0 70.484"];
"SR_WHI.2001-08-31" -> "SR_WHI.2001-09-30" [label="0 75.089"];
"SR_WHI.2001-08-31" -> "SR_WHI.2001-09-30" [label="0 8.427"];
"SR_WHI.2001-08-31" -> "SR_WHI.2001-09-30" [label="0 19.5"];
"SR_WHI.2001-08-31" -> "SR_WHI.2001-09-30" [label="0 19.5"];
"SR_WHI.2001-08-31" -> "SR_WHI.2001-09-30" [label="0 19.5"];
FINAL -> SINK;
"SR_WHI.2001-09-30" -> FINAL [label=173.271866];
SOURCE -> "INFLOW.2001-08-31" ;
"INFLOW.2001-08-31" -> "SR_WHI.2001-08-31" [label=4.39405];
SOURCE -> "INFLOW.2001-09-30" ;
"INFLOW.2001-09-30" -> "SR_WHI.2001-09-30" [label=4.363636];
}
@jrmerz
Copy link
Collaborator

jrmerz commented May 11, 2016

First pass at this library looks semi promising https://github.com/glejeune/node-graphviz. Hasn't been worked on in awhile, but seems to work. Obviously requires graphviz for png output.

jrmerz added a commit that referenced this issue May 11, 2016
@jrmerz
Copy link
Collaborator

jrmerz commented May 12, 2016

updates for args here: 600cf22

@qjhart Couple things.
I have updated the matrix commands arguments. Changes and reasons below:

  • --end is now --stop
    • --stop is the argument used by other commands with time series limiting
  • --max_ub is now --max-ub
    • inline with how other arguments are given
  • --matrix is now --to
    • this is made a little more sense to me, but happy to change back. eg. --to foo or --to STDOUT.
  • --nodes is now --outnodes
    • --nodes is already in use as global parameter

Both -f dot and -f png are implemented. Pull and npm install. The png creation requires graphviz to be in your path.

@jrmerz
Copy link
Collaborator

jrmerz commented May 12, 2016

For the graph output, I'm not sure which values you want on the link labels. Currently it's [k]:[cost]

@jrmerz jrmerz assigned qjhart and unassigned jrmerz Jun 3, 2016
@qjhart qjhart removed their assignment Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants