-
Notifications
You must be signed in to change notification settings - Fork 1
Cube Voyager Tips and Tricks
Model Version: v9.0.1
Issue: Getting arcpy error in the 6_UpdateWalkBuffer.s
script at line 258 createBusStops()
:
Execute Error('ERROR 999999: Error executing function.\nFailed to execute (AddField).\n',)
ArcyPy ERRORS:
Executing: AddField in_memory\Node_View TranStop SHORT 1 # # # NULLABLE NON_REQUIRED #
Start Time: Wed may 8 12:39:37 2024
Adding TranStop to in_memory\Node_view...
ERROR 999999: Error executing function.
Failed to execute (AddField).
Failed at Wed May 8 12:39:37 2024 (Elapsed Time: 0.01 seconds)
Fix: Unknown
Issue: The model gets stuck in Mode Choice 07_HBW_dest_choice.s
script for hours and hours.
Fix: There can be an issue with using too many cluster where a model user may over-estimate the number of cores available for Cluster. The values in Window's Resource Manager may show you more CPU threads than are actually available. Additionally, even if you list the number of cores available to be less than actual cores, it may still cause issues. Bentley recommends running the model with 16 clusters max. The model should still work well with fewer clusters.
Additional Fix: This error could occur also due to many models being run at once. Try to run only a few models at the same time. Or, reduce cluster cores even further.
Here are where clusters are defined in the 1_ControlCenter.block
file:
;CUBE CLUSTER parameters (use if Cube Cluster is available to reduce model run times)
;set to 1 to enable Cube Cluster multi-threading
UseCubeCluster = 1
CoresAvailable = 16 ;if uncertain number of processors in machine, can set to %NUMBER_OF_PROCESSORS%
if (UseCubeCluster=1)
DISTRIBUTE MULTISTEP=T INTRASTEP=T ;turn on global parameters for Cluster
*(Cluster.EXE ClusterNodeID 2-16 START EXIT) ;initiate Cluster command window to launch Voyager nodes (make sure ID & number of processors same as 'CoresAvailable' & 'DistribProcessID' variables)
;*(Cluster.EXE ClusterNodeID 2-16 STARTHIDE EXIT) ;initiate Cluster command window in Hide mode
else
DISTRIBUTE MULTISTEP=F INTRASTEP=F ;turn off global parameters for Cluster
endif
Using BSEARCH can be tricky, so here are some tips:
- It only works in a Matrix program.
- It looks for an exact match.
- Be careful when dealing with strings. Pay attention to leading/trailing spaces!
- Be careful with the number of records. If one file has more records than the other, it may not return a value outside the number of records allotted.
- The way you sort the input files may have an effect.
When matching based on LINKID, reconstruct the LINKID using the A and B nodes:
;create linkid
_ANode = LTRIM(STR(dba.1.A[lp_linkid], 10, 0))
_BNode = LTRIM(STR(dba.1.B[lp_linkid], 10, 0))
LINKID = _ANode + '_' + _BNode
In order to get BSEARCH to work with LINKID, I also had to SORT on LINKID when reading in the two input files. I'm not sure why...
You can read in a csv file in a network program via the FILEI LINKI
command. However, you must be careful. After a few hours of debugging, I realized that if values include spaces, the program will interpret them as delimiters -- instead of just using commas as delimiters.
The fix is unknown, since you can't specify what the delimiter is. Instead I avoided this mistake by reading in a dbf file instead.
If you get the F(168): String variable required
error, it can mean that the variable you're trying to assign to is not part of the li.1
network. So it needs an lw.
prefix.
Error:
RUN PGM=NETWORK MSG='Copy SEGID field from One Master Network to Another'
;NETWORK 1 IS MOST UP-TO-DATE
FILEI NETI[1] = 'MasterNet_v901_2024-02-22.net'
;NETWORK 2 HAS SOME SEGID EDITS
FILEI NETI[2] = 'MasterNet_v9 - 2023-1-18.net'
MERGE RECORD=F
PHASE=LINKMERGE
FILEO NETO = 'MasterNet_v901 - 2024-02-23.net'
;FROM NETWORK 1
DISTANCE = li.1.DISTANCE
...
OP23_50 = li.1.OP23_50
OP23_32UF = li.1.OP23_32UF
OP23_42UF = li.1.OP23_42UF
OP23_50UF = li.1.OP23_50UF
GIS23_32 = li.1.GIS23_32
GIS23_42 = li.1.GIS23_42
GIS23_50 = li.1.GIS23_50
SEGID_v9 = li.2.SEGID
**
F(168): String variable required
The lw.
needs to be added before the variable name:
Working Code:
RUN PGM=NETWORK MSG='Copy SEGID field from One Master Network to Another'
;NETWORK 1 IS MOST UP-TO-DATE
FILEI NETI[1] = 'MasterNet_v901_2024-02-22.net'
;NETWORK 2 HAS SOME SEGID EDITS
FILEI NETI[2] = 'MasterNet_v9 - 2023-1-18.net'
MERGE RECORD=F
PHASE=LINKMERGE
FILEO NETO = 'MasterNet_v901 - 2024-02-23.net'
;FROM NETWORK 1
DISTANCE = li.1.DISTANCE
...
OP23_50 = li.1.OP23_50
OP23_32UF = li.1.OP23_32UF
OP23_42UF = li.1.OP23_42UF
OP23_50UF = li.1.OP23_50UF
GIS23_32 = li.1.GIS23_32
GIS23_42 = li.1.GIS23_42
GIS23_50 = li.1.GIS23_50
lw.SEGID_v9 = li.2.SEGID
ENDPHASE
ENDRUN