crestdsl / CREST

Continuous REactive SysTems DSL
https://crestdsl.github.io
MIT License
18 stars 2 forks source link

Port position issue in graphs #17

Open gmarthe opened 5 years ago

gmarthe commented 5 years ago

Sometimes Inputs ports are drawn to the right et Outputs are drawn to the left instead of the opposite, like in this simple code :

class Pump(Entity):

    """ - - - - - - - PORTS - - - - - - - - - - """

    water_in = Input(Resources.water, 100)
    water_send = Output(Resources.water, 2)

    """ - - - - - - - STATES & TRANSITIONS - - - - - - - - - - """        

    state = current = State()

    """ - - - - - - - - - - INFLUENCES - - - - - - - - - - - - """

    influ_water_pump = Influence(target = water_send, source = water_in)

elk.plot(Pump())

You can see on this pictures the actual and the expected graphs drawn respectively :

actual expected

gmarthe commented 5 years ago

Things become worse if you try to display your output in level 2 view, as the ports are not linked anymore, they appear at a random side of the entity : Boilerlevel2