Ask Your Question
0

Fortran version of rxpath

asked 2025-02-26 23:04:12 -0600

AS gravatar image

updated 2025-02-26 23:04:34 -0600

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.

edit retag flag offensive close merge delete

Comments

Can you show your code and describe the problem?

perolofl gravatar imageperolofl ( 2025-02-27 02:08:05 -0600 )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 gravatar imageAS ( 2025-02-27 11:04:37 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2025-02-28 04:46:38 -0600

perolofl gravatar image

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.

edit flag offensive delete link more

Comments

Thanks a lot!!

AS gravatar imageAS ( 2025-02-28 19:04:07 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2025-02-26 23:04:12 -0600

Seen: 143 times

Last updated: Feb 28