Dears,
These days I am doing a research secnario with Veins. As a first step, I am going to run the example veins scenario with vehicles re-rerouting option and without re-routing when accidents happen. Is this possible? Will it possible with configurations change? Anyway accidents(nodes getting stopped) needs to happen in both scenarios.
Thanks,
Rakkesh
To disable cars' rerouting you can comment out line https://github.com/sommer/veins/blob/veins-4.4/src/veins/modules/application/traci/TraCIDemo11p.cc#L54 but to make this configurable, you will need to implement an .ini parameter yourself.
Related
I am trying to push a event towards GA3, mimicking an event done by a browser towards GA. From this Event I want to fill Custom Dimensions(visibile in the user explorer and relate them to a GA ID which has visited the website earlier). Could this be done without influencing website data too much? I want to enrich someone's data from an external source.
So far I cant seem to find the minimum fields which has to be in the event call for this to work. Ive got these so far:
v=1&
_v=j96d&
a=1620641575&
t=event&
_s=1&
sd=24-bit&
sr=2560x1440&
vp=510x1287&
je=0&_u=QACAAEAB~&
jid=&
gjid=&
_u=QACAAEAB~&
cid=GAID&
tid=UA-x&
_gid=GAID&
gtm=gtm&
z=355736517&
uip=1.2.3.4&
ea=x&
el=x&
ec=x&
ni=1&
cd1=GAID&
cd2=Companyx&
dl=https%3A%2F%2Fexample.nl%2F&
ul=nl-nl&
de=UTF-8&
dt=example&
cd3=CEO
So far the Custom dimension fields dont get overwritten with new values. Who knows which is missing or can share a list of neccesary fields and example values?
Ok, a few things:
CD value will be overwritten only if in GA this CD's scope is set to the user-level. Make sure it is.
You need to know the client id of the user. You can confirm that you're having the right CID by using the user explorer in GA interface unless you track it in a CD. It allows filtering by client id.
You want to make this hit non-interactional, otherwise you're inflating the session number since G will generate sessions for normal hits. non-interactional hit would have ni=1 among the params.
Wait. Scope calculations don't happen immediately in real-time. They happen later on. Give it two days and then check the results and re-conduct your experiment.
Use a throwaway/test/lower GA property to experiment. You don't want to affect the production data while not knowing exactly what you do.
There. A good use case for such an activity would be something like updating a life time value of existing users and wanting to enrich the data with it without waiting for all of them to come in. That's useful for targeting, attribution and more.
Thank you.
This is the case. all CD's are user Scoped.
This is the case, we are collecting them.
ni=1 is within the parameters of each event call.
There are so many parameters, which parameters are neccesary?
we are using a test property for this.
We also got he Bot filtering checked out:
Bot filtering
It's hard to test when the User Explorer has a delay of 2 days and we are still not sure which parameters to use and which not. Who could help on the parameter part? My only goal is to update de CD's on the person. Who knows which parameters need to be part of the event call?
This is more of a theorical question.
Well, imagine that I have two programas that work simultaneously, the main one only do something when he receives a flag marked with true from a secondary program. So, this main program has a function that will keep asking to the secondary for the value of the flag, and when it gets true, it will do something.
What I learned at college is that the polling is the simplest way of doing that. But when I started working as an developer, coworkers told me that this method generate some overhead or it's waste of computation, by asking every certain amount of time for a value.
I tried to come up with some ideas for doing this in a different way, searched on the internet for something like this, but didn't found a useful way about how to do this.
I read about interruptions and passive ways that can cause the main program to get that data only if was informed by the secondary program. But how this happen? The main program will need a function to check for interruption right? So it will not end the same way as before?
What could I do differently?
There is no magic...
no program will guess when it has new information to be read, what you can do is decide between two approaches,
A -> asks -> B
A <- is informed <- B
whenever use each? it depends in many other factors like:
1- how fast you need the data be delivered from the moment it is generated? as far as possible? or keep a while and acumulate
2- how fast the data is generated?
3- how many simoultaneuos clients are requesting data at same server
4- what type of data you deal with? persistent? fast-changing?
If you are building something like a stocks analyzer where you need to ask the price of stocks everysecond (and it will change also everysecond) the approach you mentioned may be the best
if you are writing a chat based app like whatsapp where you need to check if there is some new message to the client and most of time wont... publish subscribe may be the best
but all of this is a very superficial look into a high impact architecture decision, it is not possible to get the best by just looking one factor
what i want to show is that
coworkers told me that this method generate some overhead or it's
waste of computation
it is not a right statement, it may be in some particular scenario but overhead will always exist in distributed systems
The typical way to prevent polling is by using the Publish/Subscribe pattern.
Your client program will subscribe to the server program and when an event occurs, the server program will publish to all its subscribers for them to handle however they need to.
If you flip the order of the requests you end up with something more similar to a standard web API. Your main program (left in your example) would be a server listening for requests. The secondary program would be a client hitting an endpoint on the server to trigger an event.
There's many ways to accomplish this in every language and it doesn't have to be tied to tcp/ip requests.
I'll add a few links for you shortly.
Well, in most of languages you won't implement such a low level. But theorically speaking, there are different waiting strategies, you are talking about active waiting. Doing this you can easily eat all your memory.
Most of languages implements libraries to allow you to start a process as a service which is at passive waiting and it is triggered when a request comes.
I am implementing an Accident Avoidance scheme in Veins. I modified the TracIDemo11p.cc and changed the onData function as following -
void TraCIDemo11p::onData(WaveShortMessage* wsm) {
findHost()->getDisplayString().updateWith("r=16,green");
annotations->scheduleErase(1, annotations->drawLine(wsm->getSenderPos(), traci->getPositionAt(simTime()), "blue"));
if (!sentMessage)
{
traci->commandSlowDown(0.0,4); //speed changes smoothly to 0 in 4sec
sendMessage(wsm->getWsmData());
}
}
I want the vehicles to decelerate and stop in 4 sec after receiving the message. But this thing is not happening. When accident occurs the first vehicle brakes immediately and the remaining vehicles stop as usual. Where am I going wrong? Please suggest.
As I wrote on the mailing list; I think that the cause of your problem is that SUMO automatically simulates the response of drivers to accidents or obstacles. If drivers see an accident, their response is to break with a specific pattern. SUMO is developed by the traffic science community to reflect this behavior with some degree of realism.
As far as I know, the commandSlowDown is intended as an additional feature, for example when you want to simulate vehicles slowing down for other reasons that SUMO does not simulate. In particular, you could use to slow down when you receive information about an accident that is further away (e.g., over multiple hops). I suspect that might be what you're trying to achieve, so are you sure that the other vehicles are receiving the message too?
The accident avoidance behavior overrides TraCI commands by default. You need to enable unsafe driving explicitly using the 'speed mode' command. See http://sumo.dlr.de/wiki/TraCI/Change_Vehicle_State#speed_mode_.280xb3.29
I'm trying to implement a very simple scenery on Veins (OMNeT++ + SUMO) with just three vehicles and one unique fixed RSU, but I'm new in Veins and I'm not able to move very well, despite the tons of documents, FAQs and tutorials I've already read!
My start point is the default TraCI scenary demo, but here the vehicles send and receive, while the RSU just send in broadcast. I managed to fix manually my RSU (adding a MapName.add.xml file and import it from MapName.sumo.cfg, and later modifying RSU.ned and omnetpp.ini). So, at this point I can see my RSU on the simulation map, and the SUMO simulation end well. But for resolve my problem I need to allow RSU not only to send, but also to receive (I have to establish a V2I2V communication).
The copious material I found is sometimes similar to my goal, but dispersive and lacking, and none found any solution. How to edit this default scenery to reach this outcome? Would be extraordinary to have a complete and working code, or be driven by someone more experienced than me.
Many thanks!
The tutorial that comes with Veins 4a2 already includes an RSU that receives data. When it does, it changes its color to green. See TraCIDemoRSU11p::onData for how this is done.
Windows Phone allows you to create and register system alarms with the ScheduledActionService. The options for recurrenceType are daily, weekly, etc.
I am trying to get alarms set for specific days. This is not possible using the recurrenceType enum. The only way I can see to achieve this is to create an alarm for each day specified. This way, for a single alarm that is created I will have to create a copy of it on every day I wish it to recur.
The only issue with this is displaying them. They cannot be given a 'Name' property and so there is no way to logically group these alarms in to a single "master" alarm.
has anyone encountered this issue? Is there a way to set alarms without using this scheduler service? I cannot think of a way around this and would appreciate any guidance.
The only example I'm aware of where someone was in a similar situation resulted in them not using the scheduler at all.
As they required a complex scheduling pattern they instead chose to not use any of the built in functionality but rather to create individual alarms as appropriate. They already had an existing BackgroundAgent and added functionality there to ensure that the next two alarms were always queued up.
Your exact requirements may make this possible.
I'd think carefully about adding an agent just for this though.