The basics are there, in the latest test version. But you’d have to do a lot of your own code at the present time. This feature is being worked on though and a much more friendly version will appear as time goes on.
One thing they put in JMRI is an import from XTrack CAD, so if you used XTrack to draw your layout you can quickly put the diagram in JMRI for the automation.
To add to Randy’s reply that the basics are there, one JMRI contributor has written an automation script that adds to those basics. He’s made it available to JMRI users, and he’s continually improving it. See: