Create a model that switches between two different states using Temporal Logic?
Posted
by
NLed
on Stack Overflow
See other posts from Stack Overflow
or by NLed
Published on 2012-11-04T18:12:57Z
Indexed on
2012/11/04
23:00 UTC
Read the original article
Hit count: 198
Im trying to design a model that can manage different requests for different water sources. Platform : MAC OSX, using latest Python with TuLip module installed.
For example,
Definitions :
Two water sources : w1 and w2
3 different requests : r1,r2,and r3
-
Specifications :
Water 1 (w1) is preferred, but w2 will be used if w1 unavailable.
Water 2 is only used if w1 is depleted.
r1 has the maximum priority.
If all entities request simultaneously, r1's supply must not fall below 50%.
-
The water sources are not discrete but rather continuous, this will increase the difficulty of creating the model. I can do a crude discretization for the water levels but I prefer finding a model for the continuous state first.
So how do I start doing that ?
Some of my thoughts :
- Create a matrix W where w1,w2 ? W
- Create a matrix R where r1,r2,r3 ? R
- or leave all variables singular without putting them in a matrix
I'm not an expert in coding so that's why I need help. Not sure what is the best way to start tackling this problem. I am only interested in the model, or a code sample of how can this be put together.
edit
Now imagine I do a crude discretization of the water sources to have w1=[0...4] and w2=[0...4] for 0, 25, 50, 75,100 percent respectively.
==> means implies
Usage of water sources :
- if w1[0]==>w2[4] -- meaning if water source 1 has 0%, then use 100% of water source 2 etc
- if w1[1]==>w2[3]
- if w1[2]==>w2[2]
- if w1[3]==>w2[1]
- if w1[4]==>w2[0]
r1=r2=r3=[0,1] -- 0 means request OFF and 1 means request ON
Now what model can be designed that will give each request 100% water depending on the values of w1 and w2 (w1 and w2 values are uncontrollable so cannot define specific value, but 0...4 is used for simplicity )
© Stack Overflow or respective owner