Coupling two SytemCommand which run python

22 views
Skip to first unread message

Cahyo Adisaputro

unread,
Jun 4, 2020, 5:04:02 AM6/4/20
to bcvtb
Hi Everyone

I am trying to run two SystemCommand actors which run python, the purpose is, in the first actor I am passing two variables which will be read from the second actor and perform mathematical operation then the result will be sent back to bcvtb.

The first actor send the variables as string and it can't be read by the second actor, even as a string (because it has \r\n suffix). Also both the variables are written in the same line (39\r\n89\r\n)

This will serve as my exercise, later I want to use both SystemCommand actors (which run python) to hande Radiance and Eplus.

I really hope if someone could help me.

Thanks in advance

Cahyo Adisaputro
Master Student at Politecnico di Milano

pythonsyscom.JPG


pythonCommand.rar

Thierry Nouidui

unread,
Jun 4, 2020, 9:15:12 AM6/4/20
to bc...@googlegroups.com
Did you check the BCVTB radiance example (examples/radiance40/system.xml)? There is an actor there that is parsing a string to a double (String2Double). You can right click on the actor and select "Open Actor" to look at its content. You should maybe use something similar between your two systemCommand actors so the second one can interpret the inputs of the first one correctly.


--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcvtb+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bcvtb/d9fd584e-6361-4af4-b822-70594d56b9d0%40googlegroups.com.


--
Prof. Thierry Nouidui
Nouidui Consulting Group
https://nouidui.com/index.php/consulting/

Cahyo Adisaputro

unread,
Jun 15, 2020, 6:31:15 PM6/15/20
to bcvtb
Hi Prof. Thierry

I managed to do that, using weather data parsing and string2double actor both from radiance examples. it is great. Thanks for the advice

Best regards,
Cahyo Adisaputro


On Thursday, 4 June 2020 15:15:12 UTC+2, Thierry Nouidui wrote:
Did you check the BCVTB radiance example (examples/radiance40/system.xml)? There is an actor there that is parsing a string to a double (String2Double). You can right click on the actor and select "Open Actor" to look at its content. You should maybe use something similar between your two systemCommand actors so the second one can interpret the inputs of the first one correctly.


On Thu, Jun 4, 2020 at 12:04 PM Cahyo Adisaputro <cahyo.a...@gmail.com> wrote:
Hi Everyone

I am trying to run two SystemCommand actors which run python, the purpose is, in the first actor I am passing two variables which will be read from the second actor and perform mathematical operation then the result will be sent back to bcvtb.

The first actor send the variables as string and it can't be read by the second actor, even as a string (because it has \r\n suffix). Also both the variables are written in the same line (39\r\n89\r\n)

This will serve as my exercise, later I want to use both SystemCommand actors (which run python) to hande Radiance and Eplus.

I really hope if someone could help me.

Thanks in advance

Cahyo Adisaputro
Master Student at Politecnico di Milano

pythonsyscom.JPG


--
You received this message because you are subscribed to the Google Groups "bcvtb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages