Water-Systems-Management-UCM / calvin

reservoir network optimization
MIT License
0 stars 0 forks source link

Cookie Cut Failed #5

Open mlmaskey opened 4 years ago

mlmaskey commented 4 years ago

@msdogan, @nickrsan and @Water-Systems-Management-UCM/model-web I tried to export the subnet for Folsom Lake as you demonstrated in the workshop as follows.


(base) D:\PostDocResearch\UC Merced\Projects\NOAA\CALVIN\calvin\calvin\data>cnf matrix --format csv --start 1921-10 --stop 1922-10 --ts . --to linksWY1922 --max-ub 1000000000000 --debug all --verbose A204 CVPM07G CVPM07S HSD204 HSU204C67 HU204 C105 C107 C173 C67 C7 C8 D64 D85 D9 GW_07 HGP07 HGR07 SR_FOL EXT_SAC HNP204 HP204 HXI204 INT_SAC WTP204 WWP204 C16 C18 C19 HSU_D55 WTP205 C104 C20 D44 D503 D507 D511 D517 D55 PMP_ISOL_F D17 D509 A207 CVPM08G CVPM08S HSD207 HU207 GW_08 HGP08 HGR08 U207 WTP207


However, it got failed with the error network.edge.out. It worked above command if you exclude HGR08. But with this node, the importing matrix went to fail. Could you please suggest me on that.

*** matrix Input Parameters ***
{
  "_": [
    "matrix"
  ],
  "help": false,
  "no-header": false,
  "N": false,
  "noHeader": false,
  "verbose": true,
  "v": true,
  "format": "csv",
  "f": "csv",
  "start": "1921-10",
  "s": "1921-10",
  "stop": "1922-10",
  "t": "1922-10",
  "ts": ".",
  "S": ".",
  "to": "linksWY1922",
  "T": "linksWY1922",
  "max-ub": 1000000000000,
  "M": 1000000000000,
  "maxUb": 1000000000000,
  "debug": "all",
  "D": "all",
  "fs": ",",
  "F": ",",
  "config": "C:\\Users\\Mahesh",
  "c": "C:\\Users\\Mahesh",
  "$0": "C:\\Users\\Mahesh\\AppData\\Roaming\\npm\\node_modules\\calvin-network-tools\\bin\\cli.js",
  "data": "C:\\Users\\Mahesh\\Documents\\MustafaWorkshopCALVIN\\calvin-network-data\\data",
  "nodes": [
    "A204",
    "CVPM07G",
    "CVPM07S",
    "HSD204",
    "HSU204C67",
    "HU204",
    "C105",
    "C107",
    "C173",
    "C67",
    "C7",
    "C8",
    "D64",
    "D85",
    "D9",
    "GW_07",
    "HGP07",
    "HGR07",
    "SR_FOL",
    "EXT_SAC",
    "HNP204",
    "HP204",
    "HXI204",
    "INT_SAC",
    "WTP204",
    "WWP204",
    "C16",
    "C18",
    "C19",
    "HSU_D55",
    "WTP205",
    "C104",
    "C20",
    "D44",
    "D503",
    "D507",
    "D511",
    "D517",
    "D55",
    "PMP_ISOL_F",
    "D17",
    "D509",
    "A207",
    "CVPM08G",
    "CVPM08S",
    "HSD207",
    "HU207",
    "GW_08",
    "HGP08",
    "HGR08",
    "U207",
    "WTP207"
  ],
  "runtime": "C:\\Users\\Mahesh\\AppData\\Roaming\\npm\\node_modules\\calvin-network-tools\\HEC_Runtime"
}
**********************

Running matrix command.

Subnet:  ["A204","CVPM07G","CVPM07S","HSD204","HSU204C67","HU204","C105","C107","C173","C67","C7","C8","D64","D85","D9","GW_07","HGP07","HGR07","SR_FOL","EXT_SAC","HNP204","HP204","HXI204","INT_SAC","WTP204","WWP204","C16","C18","C19","HSU_D55","WTP205","C104","C20","D44","D503","D507","D511","D517","D55","PMP_ISOL_F","D17","D509","A207","CVPM08G","CVPM08S","HSD207","HU207","GW_08","HGP08","HGR08","U207","WTP207","C173-WTP207","D507-D509","EXT_SAC-HGR08","HSD207-D517","C104-C105","C16-C20","C18-C20","C19-C20","C7-C20","C8-C104","A204-HU204","CVPM07S-HSD204","HSU204C67-A204","HU204-CVPM07G","HU204-CVPM07S","C105-C107","C105-WTP204","C173-C107","C67-C7","C67-HSU204C67","C7-C8","C8-WTP204","CVPM07G-HGR07","D64-C8","D64-WTP204","D85-D64","D9-C173","D9-D85","GW_07-HGP07","HGP07-A204","HGR07-GW_07","HSD204-C7","SR_FOL-D9","SR_FOL-WTP204","HNP204-HXI204","HXI204-EXT_SAC","INT_SAC-WWP204","WWP204-HNP204","WWP204-HP204","WWP204-HGR07","HSU_D55-WTP205","D17-SR_FOL","D17-WTP204","D55-HSU_D55","C104-D44","C20-D55","D44-D503","D503-D511","D503-PMP_ISOL_F","D511-D55","D55-D507","WWP204-D44","A207-HU207","CVPM08S-HSD207","HU207-CVPM08G","HU207-CVPM08S","CVPM08G-HGR08","GW_08-HGP08","HGP08-A207","HGP08-U207","HGR08-GW_08","WTP207-U207","WWP204-HGR08"]
removing: CN5
removing: CN4
removing: CN3
removing: CN1
C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\matrix\utils\split.js:7
    if(id === network.edge.out[i].properties.hobbes.id) {
                                  ^

TypeError: Cannot read property 'properties' of undefined
    at Object.isInbound (C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\matrix\utils\split.js:7:35)    at module.exports (C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\matrix\link.js:40:16)
    at C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\matrix\index.js:110:22
    at Array.forEach (<anonymous>)
    at onSubnetReady (C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\matrix\index.js:103:13)
    at C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\matrix\index.js:78:7
    at C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\nodejs\matrix\utils\expand.js:31:8
    at C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\node_modules\async\lib\async.js:52:16
    at C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\node_modules\async\lib\async.js:269:32
    at C:\Users\Mahesh\AppData\Roaming\npm\node_modules\calvin-network-tools\node_modules\async\lib\async.js:44:16
msdogan commented 4 years ago

@mlmaskey did you make any changes to HGR08 node? Like adding a new link or something? If so make sure they are properly connected.

mlmaskey commented 4 years ago

@mlmaskey did you make any changes to HGR08 node? Like adding a new link or something? If so make sure they are properly connected.

@msdogan, No, I did not change anything from the default data. Moreover, this is the base case. I wonder it works without HGR08, But HGR08is the most important node to us.

Thanks