Share/Save/Bookmark
Subscribe
 

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

  #1 (permalink)  
Old 01-17-2008, 12:24 PM
Registered User
 
Join Date: Jan 2008
Posts: 1
HEC-RAS and Matlab

I'm using Matlab to run HEC-RAS 4.0 via the matlab ActXserver function in order to do some monte carlo analysis this has worked fine with 3.x but a few things have changed with 4 and I'm wondering if anyone can help? The problem is:
I've found and set up the controller commands (CurrentProjectFile(), CurrentPlanFile() etc, etc and I'm assuming the way to start a simulation running is via Compute_CurrentPlan(). What I can't work out is what should go in the brackets! The VB viewer shows the required format to be:
Compute_CurrentPlan(ByRef nmsg As Integer, ByRef msg As System.Array) As Boolean
What should I use for these values??
Dave
Reply With Quote
  #2 (permalink)  
Old 04-02-2009, 02:07 PM
Registered User
 
Join Date: Apr 2009
Posts: 1
Quote:
Originally Posted by leedal View Post
I'm using Matlab to run HEC-RAS 4.0 via the matlab ActXserver function in order to do some monte carlo analysis this has worked fine with 3.x but a few things have changed with 4 and I'm wondering if anyone can help? The problem is:
I've found and set up the controller commands (CurrentProjectFile(), CurrentPlanFile() etc, etc and I'm assuming the way to start a simulation running is via Compute_CurrentPlan(). What I can't work out is what should go in the brackets! The VB viewer shows the required format to be:
Compute_CurrentPlan(ByRef nmsg As Integer, ByRef msg As System.Array) As Boolean
What should I use for these values??
Dave
Hello Dave,

I am working in a Research Project and I have to simulate a WateringChannel. I would like to use HEC-RAS but one partner of our Consortium has some doubts about usig HEC-RAS because They are no sure that it is possible to connect HEC-RAS and MATLAB. They are working with a Model Predictive Control which is developed in Matlab for controlling gates of the channel and they should to connect to HEC-RAS.
Do you know if there are some experience in HEC- RAS and MATLAB?
Could you send me some links where I can find documentation?
Thank in advance
Reply With Quote
  #3 (permalink)  
Old 07-19-2009, 09:32 AM
Registered User
 
Join Date: Jul 2009
Posts: 1
HEC-RAS and VB

Hello,
Probably it is too late... I was trying to perform Monte Carlo of hec-ras parameters. I don't know activeX technology too good, but according to my experiences it is very problematic issue. The HEC-RAS transfers most of information via reference to a structure called system.array. Matlab, as I know, can deal only with basic types like boolean, double and strings (etc). So it might be only possible to run model but you cannot read anything form it. However in older versions, I thing, it was possible to read results form a ASCII file *.bco (UNET out-file).

Only way to make it work together, is to write external program in for example Visual Basic (I prefer .NET version). And here are two possibilities:
- Write you own activeX controler in VB for hec-ras, which would translate system.array into basic types. Only problem is that all necessaryly libraries are not available for free.

- Use Hec-Ras together with Matlab from external program, written in environment, which can deal with System.arrays.
I have used here MS VB .NET and it works fine. Matlab, like Hec-ras, can be run as activex service. Off course it is not the most convenient solution.

If you have more detailed questions, I send code samples.

Best
Reply With Quote
  #4 (permalink)  
Old 08-05-2009, 12:54 PM
Registered User
 
Join Date: Aug 2009
Posts: 4
Compute_CurrentPlan.. try with this!

Hello!
Try with this: Compute_CurrentPlan(1,[1])
Don't ask me why.. my colleagues wrote the part of the Matlab code related to Hec-Ras and they are much more experienced than me. I use the version Hec-Ras 4.0 Beta, but it should work anyway.
Good luck!
Reply With Quote
  #5 (permalink)  
Old 09-11-2009, 04:38 PM
Registered User
 
Join Date: Sep 2009
Posts: 5
is it possible to feed HEC RAS with data from HMS automatically?
I mean, runn HMS and then RAS automaically gets the needed data
Reply With Quote
  #6 (permalink)  
Old 05-13-2010, 07:24 AM
Registered User
 
Join Date: May 2010
Posts: 1
how to.

Hello,

I would like to use the HEC-RAS from the matlab using the ActXserver.
Is anybody able to explain me how to call hec-ras from the matlab and how to run it? I need to make many run using different boundary conditions and different geometric data (I change the Manning's n of the main channel).
My version of matlab is 7 and my version of HEC-RAS is 3.1.3.

Thank you
Claudio
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:09 AM.