tlkenergy / sim-tlk

Roadmap and Issues for sim.TLK cloud based system simulation
2 stars 1 forks source link

How to plot a Boolean variable #48

Open Walshest opened 11 months ago

Walshest commented 11 months ago

How do we plot a Boolean variable?

We have one variable which goes truewhen the system is in steady state and the controllers arn't varying.

I have tried time varying plots & bar plots but the results always look like:

image
mateokurti commented 11 months ago

We need to internally discuss how to handle boolean results visualization.

As a quick solution to your issue, I think that it might help to convert the results from boolean to integers. The easiest way I can think of to achieve that is by a custom operation: a.multiply(1). As False is treated as 0 and True is treated as 1, the result will be a series with integers which could be plotted as usual.

Walshest commented 11 months ago

Thanks, The solution works for a good temporary solution:

image