0

Fortran version of rxpath

I was wondering if anyone has successfully used fortran version of rxpath api. I am having hard time using CALL FINDSHORTESTDISTANCEBETWEENTWOBUS, it's fortran version, although have used successfully the python version. Any help or example of successful use is appreciated.

AS's avatar
1
AS
asked 2025-02-26 23:04:12 -0500, updated 2025-02-26 23:04:34 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Can you show your code and describe the problem?

perolofl's avatar perolofl (2025-02-27 02:08:05 -0500) edit

This is an example from savnw case. I tried both with I as an integer, integer array of size 6. It gives dll error forrtl 157 error in both versions. CALL FINDSHORTESTDISTANCEBETWEENTWOBUS(0, 101, 3001, 9999,I ,ZIMP, IERR)

AS's avatar AS (2025-02-27 11:04:37 -0500) edit
add a comment see more comments

1 Answer

0

The following Fortran-90 code works:

integer :: IERR, IARRAY(99), TDIM=99
REAL :: RXVALUE 
CALL FINDSHORTESTDISTANCEBETWEENTWOBUS(0, 101, 3001, TDIM, IARRAY,RXVALUE, IERR)

Note that IARRAY must have the length of TDIM. You shouldn't set TDIM to 9999 and the array to length 6.

I also noted that TDIM must be a variable, not hard coded.

perolofl's avatar
3.8k
perolofl
answered 2025-02-28 04:46:38 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks a lot!!

AS's avatar AS (2025-02-28 19:04:07 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer