Welcome to the RAS Solution Forums HECRAS Controller HEC-RAS Controller with matlab

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8175
    Anonymous
    Guest

    Hi,

    Does anyone was able to control HEC-RAS using MATLAB? Any pointers will be appreciated. My direct email is [email protected]

    Regards,
    Art

    #13500
    Solomon
    Participant

    Return-Path:
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173])
    by mwork.nabble.com (Postfix) with ESMTP id ADCE12F58D8E
    for ; Sun, 6 Dec 2015 21:19:00 -0800 (PST)
    Received: by igvg19 with SMTP id g19so71854306igv.1
    for ; Sun, 06 Dec 2015 21:18:59 -0800 (PST)
    DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=gmail.com; s=20120113;
    h=mime-version:in-reply-to:references:from:date:message-id:subject:to
    :content-type;
    bh=Aqr7XYEBVdNtofQUfuvAQ6LLA6aVgAMbvrhtzVRzTeQ=;
    b=yDadAGD0cnpstkMPDhI/UK+uwgNw9HhEKI/2fmLfUeSauhfhL7tXQSEHZEpNOCS87t
    4MxAztQRPh7mCNuptqESmqfpX4cp6XivYQz0ZT4m8OQPDvIzhplTj8aLfJFKUfbSDC8h
    DlZVcSRMKDoYtKy2DBJzKbtjQucTpUR8o231qe6rfRpOXnfyvd+tcbXnpUHSrq8Yvo9N
    YrLzgxbO0hU/ALRPE0jmAa8adCNnHtyygmDPb9WQycvNfbm4RibX7PKSCPcNNUAhuvmU
    iyqzc6OE8MDtf+8JqDKTwQzjHdnnQe2LpAfg4M/5bQKNtfR7xCEOKUfkhZ21vHwPINPm
    +1QQ==
    X-Received: by 10.50.73.135 with SMTP id l7mr2941540igv.19.1449465539596; Sun,
    06 Dec 2015 21:18:59 -0800 (PST)
    MIME-Version: 1.0
    Received: by 10.79.114.201 with HTTP; Sun, 6 Dec 2015 21:18:40 -0800 (PST)
    In-Reply-To: <[email protected]>
    References: <[email protected]>
    From: Solomon Vimal
    Date: Sun, 6 Dec 2015 23:18:40 -0600
    Message-ID:
    Subject: Re: HEC-RAS Controller with matlab
    To: “Art [via HEC-RAS Help]”
    Content-Type: multipart/mixed; boundary=089e0129482c9a756d052647fe47

    –089e0129482c9a756d052647fe47
    Content-Type: multipart/alternative; boundary=089e0129482c9a7565052647fe45

    –089e0129482c9a7565052647fe45
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    You can use this attached code to call the controller. It was given to me
    by my advisor Dr. Gerald Corzo from UNESCO-IHE.

    Best,
    Solomon Vimal

    Solomon Vimal

    On 6 December 2015 at 15:41, Art [via HEC-RAS Help] < [email protected]> wrote:

    > Hi,
    >
    > Does anyone was able to control HEC-RAS using MATLAB? Any pointers will b=
    e
    > appreciated. My direct email is [email protected]
    >
    > Regards,
    > Art
    >
    > ——————————
    > If you reply to this email, your message will be added to the discussion
    > below:
    >
    > http://hec-ras-help.1091112.n5.nabble.com/HEC-RAS-Controller-with-matlab-=
    tp2170.html
    > To start a new topic under HECRAS Controller, email
    > [email protected]
    > To unsubscribe from HECRAS Controller, click here
    > <http://hec-ras-help.1091112.n5.nabble.com/template/NamlServlet.jtp?macro=
    =3Dunsubscribe_by_code&node=3D1184&code=3Dc29sb21vbi52aW1hbEBnbWFpbC5jb218M=
    TE4NHwtMTUwNDgwMjgwOQ=3D=3D>
    > .
    > NAML
    > <http://hec-ras-help.1091112.n5.nabble.com/template/NamlServlet.jtp?macro=
    =3Dmacro_viewer&id=3Dinstant_html%21nabble%3Aemail.naml&base=3Dnabble.naml.=
    namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.n=
    aml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabb=
    le.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-=
    nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamesp=
    ace-nabble.view.web.template.NodeNamespace&breadcrumbs=3Dnotify_subscribers=
    %21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_em=
    ail%21nabble%3Aemail.naml>
    >

    –089e0129482c9a7565052647fe45
    Content-Type: text/html; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    You can use this attached code to=
    call the controller. It was given to me by my advisor Dr. Gerald Corzo fro=
    m UNESCO-IHE.

    Best,
    Solomon Vimal

    <= font color=3D"#333333" face=3D"verdana, sans-serif">Solomon Vimal

    On 6 December 2015 at 15:41, Art [via HEC-RA=
    S Help] <[email protected]&g=
    t;
    wrote:

    .8ex;border-left:1px #ccc solid;padding-left:1ex">

    Hi,=20

    Does anyone was able to control HEC-RAS using MATLAB? Any pointers =
    will be appreciated. My direct email is [email protected]

    Regards,

    Art

    =09
    =09
    =09


    If you reply to this email, your message =
    will be added to the discussion below:

    http://hec-ras-help.1091112.n5.na=
    bble.com/HEC-RAS-Controller-with-matlab-tp2170.html


    To start a new topic under HECRAS Controller, email ml-node+s1091112n1=
    [email protected]
    To unsubscribe from HECRAS Controller, click here.
    NAML

    –089e0129482c9a7565052647fe45–
    –089e0129482c9a756d052647fe47
    Content-Type: application/octet-stream; name=”run_ras.m”
    Content-Disposition: attachment; filename=”run_ras.m”
    Content-Transfer-Encoding: base64
    X-Attachment-Id: f_ihvi9lip0

    ZnVuY3Rpb24gcnVuX3JhcyhyYXNfZmlsZSwgbl9jaGFubmVsLCBuX2Zsb29kcGxhaW4pDQoNCmg9
    YWN0eHNlcnZlcignUkFTNDEuSEVDUkFTQ09OVFJPTExFUicpOw0KDQolaGVyZSB0aGUgY29tbWFu
    ZCBkZXBlbmRzIG9uIHRoZSB2ZXJzaW9uIG9mIGhlY3JhcyB5b3UgaGF2ZQ0KJShpbiBteSBjYXNl
    IHZlcnNpb24gNC4xKSA6IHRoaXMga2V5IGNhbiBiZSBmb3VuZCBpbiB0aGUgd2luZG93cyByZWdp
    c3RlcnkNCg0KaC5Qcm9qZWN0X09wZW4ocmFzX2ZpbGUpOw0KDQpmb3IgeHMgPSAxIDogNjg7DQog
    ICAgaC5HZW9tZXRyeV9TZXRNYW5uX0xDaFIoJ1BvJywgJ3MyNV8wMl9zMjdjJywuLi4NCiAgICAg
    ICAgbnVtMnN0cih4cyksIG5fZmxvb2RwbGFpbiwgbl9jaGFubmVsLCBuX2Zsb29kcGxhaW4sICdF
    cnJvciAhIScpOw0KZW5kOw0KDQpoLlByb2plY3RfU2F2ZTsNCiVoLkNvbXB1dGVfSGlkZUNvbXB1
    dGF0aW9uV2luZG93OyAlVG8gaGlkZSBDb21wdXRhdGlvbiBXaW5kb3cNCmguQ29tcHV0ZV9DdXJy
    ZW50UGxhbigwLDApOw0KaC5Qcm9qZWN0X1NhdmU7DQoNCnRyeQ0KICAgIGguUXVpdA0KY2F0Y2gN
    CmVuZA0KDQpkZWxldGUoaCk7DQoNCg==
    –089e0129482c9a756d052647fe47–

    #13501
    Art
    Participant

    Hi Solomon,
    Many thanks for your response. I tried to use the function you sent me with no success. I am also using HEC-RAS 4.1. Can you post your main Matlab function that is calling the routine “run_ras.m”? I guess I am having a mistake there. Do you have also a Matlab function that runs HEC-RAS and extracts some data?

    Many thanks for your help!
    Art

    #13502
    Art
    Participant

    Hi all,

    Now I am able to run and control HEC-RAS from MATLAB. One of the tricks is that for some reason, you need to work in the C drive. If you work in the network drive it seems that there are some permission issues.

    Cheers,
    Art

    #13503
    Anonymous
    Guest

    Thank you Solomon for sharing your code.

    Regards

    #13504
    Anonymous
    Guest

    Hello,

    My code has such error:

    No method ‘Geometry_GetNode’ with matching signature found for class ‘COM.RAS41_HECRASCONTROLLER’.

    My code shows below, anybody can help me to solve this?

    clc;clear;close all;

    ras_file = ‘D:\RasModel\Program\HuaiRiverProject.prj’;

    h=actxserver(‘RAS41.HECRASCONTROLLER’);

    h.Project_Open(ras_file);

    riv=’Huaihe’;
    rch=’Middle’;
    rs=’116185.3′;
    bb=h.Geometry_GetNode(riv,rch,rs);

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.