Closed qjhart closed 8 years ago
Should be fixed. The upper and lower bounds CSV files are parsed after the initial crawl (which is preformed w/o $ref file read) but before the formatters here. This loop now checks for sinks, then looks through and checks for bounds within the sinks as well, adding all sink-bounds to the list of $ref objects to be read.
FYI, the hobbes-network-format now exposes a readFile method, which takes a parent object, attribute and callback, then reads in the $ref. so...
var parent = {
type : 'LMB',
bound : {
$ref : '/path/to/csv/data.csv'
}
}
hnf.readFile(parent, 'bound', () => {})
returns:
{
type : 'LMB',
bound : [[],[],[]...]
}
@qjhart @msdogan This fix has been pushed to v1.0.30 let me know how things look.
Also, v1.0.30 has a --no-descriptions for the build command. This flag will leave off the LD descriptions from the pri file. Use if your build is failing with the full buffer error.
@jrmerz version 1.0.30 seems to fix constrained flow bug, but this time prm build --prefix test
command didn't generate testPD.dss and testTS.dss files. It only created .pri file.
@msdogan can you provide OS? I have tested on OSX and win 7 and both are generating dss files for 1.0.30.
@jrmerz I am using Windows 7. dssWriterParams appears but it does not save dss files.
Can you run with --verbose flag, dump the output to a file and send it to me?
And/or we can schedule a hangout.
verbose output is saved in verbose.txt, attached here
Ok, the bug is the unescaped spaces in the file path 'Z:\HOBBEStoPRMcomparison (GitHub Desktop)'. I will look to fix, but for now, just run in a folder where there are no spaces in the path.
okay, yes it worked in a different folder. thanks
Cool, created a new ticket to track bug #29
@jrmerz Can you please make these fixes. I am doing them each time before initiating a run. I tried to fix for example by deleting node 'Sink_C41' in data file (calvin-network-data) but calvin-network-tools complained about that. Here is the issue I opened https://github.com/msdogan/HOBBEStoPRMcomparison/issues/3
I can take a look at those issues and you are on the right track, they should be done w/ edits to calvin-network-data repo. Can you post what prm was complaining about?
I want to delete node Sink_C41. This node is not connected to any node in the system. To do that, I delete the folder containing this node and information (Z:\calvin-network-data\data\san-joaquin-river\sierra-foothills\sink_c41). After that when I run prm build --prefix test
command, I get the attached error.
sink_c41.txt
after updating calvin-network-data, do I need to run npm install -g calvin-network-tools
and prm init
commands again?
and one more question @jrmerz :) Is there a way to point where the data file is before building a run?
Starting new issue for this #30
Think this has split out to multiple issues which are being tracked elsewhere.
Mustafa has documented some errors with the code at: https://github.com/msdogan/HOBBEStoPRMcomparison/issues/1
Regarding the missing 'BL' line: The reason for the missing BL link in the sink is due to the recursive nature of the writeLink() function in the file calvin-network-tools/nodejs/pri/format/link.js. In the if (np.sinks) function, if a sink is found, it calls a new writeLink() function. However, the CSV links are not dereferenced. As a result, the bounds are not filled out, and a BL line is not created. Example: /data/south-lahontan/mono-owens-area/sr_ol/node.geojson