SUMO tracefile mobility with ns3 - sumo

I'm trying to include a SUMO generated mobility (I generated the file mobility.tcl) into ns3 but it doesn't work and I got this error
cond="!(0 != model)", msg="node 0 does not have a MobilityModel", file=../src/buildings/helper/buildings-helper.cc, line=53
Ps: I have followed ns2-mobility-trace.cc and https://www.opensourceforu.com/2017/11/tracing-vehicular-mobility-ns-3/
Can you help me, please

Please see NS-3 mobility models docs for how to install the custom models
https://www.nsnam.org/docs/models/html/mobility.html#ns-2-mobilityhelper

Related

Any way to avoid the runtime restart when upgrading `google-cloud-language` in Google Colab?

I'm using Google's Natural Language API to run sentiment analysis on text blocks, and according to some instructions I'm following, I need t be using the latest version of google-cloud-language.
So I'm running this at the start of my Colab notebook.
!pip install --upgrade google-cloud-language
When I get to the end of that, it requires me to restart the runtime, which means I can't automatically run this along with my entire code, instead having to manually attend to the runtime restart.
This SO post touches on the topic, but only offers the 'crash' solution, and I'm wondering if anything else is available now 3 years later.
Restart kernel in Google Colab
So I'm curious if there's any workaround, or way to permanently upgrade google-cloud-language to avoid that?
Thank you for any input.
Here's the NL code I'm running, if helpful.
# Imports the Google Cloud client library
from google.cloud import language_v1
# Instantiates a client
client = language_v1.LanguageServiceClient()
def get_sentiment(text):
# The text to analyze
document = language_v1.Document(
content=text,
type_=language_v1.types.Document.Type.PLAIN_TEXT
)
# Detects the sentiment of the text
sentiment = client.analyze_sentiment(
request={"document": document}
).document_sentiment
return sentiment
dfTW01["sentiment"] = dfTW01["text"].apply(get_sentiment)

Ryu Controller gets no links

I am trying to build a ryu application with starts and tries to get the owl topology. Therefor I’m using the get_link and get_switch function from the ryu.topology.api. Getting the switches is no problem but the list of links is always empty.
I tried using the get_all_link as well but the result is the same.
So far I found a lot of examples were they use those functions but none of these work with my set up.
Here are some examples i tried:
https://github.com/Ehsan70/RyuApps/blob/master/BasicTopoLearner.py
get_all_link(self) outputting all possible LINKs for a topo
My Ryu version is 4.32 and Im using the tree topology from mininet
Cheers and thanks for your help
You have to enable the processing of lldp packets by the controller using the --observe-links option when starting ryu.
Do
ryu-manager --observe-links your_ryu_app.py
Also if you try to get the links at the time mininet is building the topology you may get nothing. So try to put a timer to delay the get_all_links method, or try polling the switches using a monitor thread (see traffic monitor in Ryubook)

How to find ARA-M sample APDUs?

I am trying to interface an applet in my USIM and an Android application.
I know that I have to install ARA-M applet on USIM in order to check access controls and submit my application-AID as a rule to communicate.
I checked this link and installed it on my sim, but I cannot communicate with this applet, all samples are using GlobalPlatformPro. when I run a commands like gp.exe --list, it returns 0x57 from ScardTransmit function which means ERROR_INVALID_PARAMETER and I don't know how to fix it.
Now I have 2 questions:
1) How can I fix GlobalPlatformPro error in order to run ARA-M samples?
2) How can I find standard commands for this applet (some sample APDUs to communicate and add access control rules)?
Thank you for helping.
I found the answer.
There is a paper on the matter here. It is a good place to get started. Global Platform has a repository here where you can find ARA applet and four test applets to get started.
The Global Platform Secure Element Access Control can also be a useful reference for those who are at the start point, like me.

Express-browserify and Watson Visual Recognition - TypeError: fs.existsSync is not a function

I'm trying to get the Watson Visual Recognition to run client side by using express-browserify with reference to the node-sdk for watson-developer-cloud. The VisualRecognitionV3 makes use of the fs package hence I get the fs.existsSync error when I'm trying to call it from the client-side as the browser doesn't know which filesystem to use. My question is how do I go about creating a so called 'abstraction layer' as I am restricted to using the express-browserify package for cross origin calls.
This thread is pretty helpful in shedding some light but I'm not sure where to start regarding the 'abstraction layer' or if there are any other solutions. Also, would something like socket.io work for this? I've linked a clone of the directory here as it seems less clunky than pasting the multiple portions below.
The repository can be cloned and just requires a personal iam_apikey with relevant launch configuration. Appreciate any pointers. Thanks!
I didn't manage to sort this out with express-browserify due to the require(fs) from browser issue but I was able to get it running using the express-ws package

Problems creating OData proxy class - connecting to Azure using Objective C

I hope anyone can help me.
My plan was to connect to Microsoft Azure with my iPhone application. I don't have any experiences using http requests with Objective C yet. So I searched all day long on how to use Azure with Objective C...
I found out that one should use OData to create a proxy class which should help to connect to Azure (http://www.interoperabilitybridges.com/projects/odata-client-for-objective-c-%28ios-macos%29).
So I tried configuring like it says in OData's user guide. But I don't understand how to create a proxy class: I tried to compile the odatagen.xcodeproj but I got a Range or index out of bounds error.
However I typed this in Terminal:
./odatagen /uri=https://{serviceNamespace}.serverbus.windows.net /out= users/xyz/Documents[...] /auth=acs /u=myusername /p=mypassword /at=https://{serviceNamespace}.serverbus.windows.net /sn={serviceNamespace} /ups=no
(Of course replacing {serviceNamespace} with the name of my service namespace etc.)
Did I get all those parameters right? I get an mystical error saying fileRange Error While moving xslt file: (null)... :-(
Or am I totally wrong and connecting my app with Azure works with different tools?
I'm sure you could get it working with what you're doing, but Microsoft have done a lot of the hard work for you. Take a look at the Windows Azure Toolkit for iOS on git hub, it's probably the best place to start.