Can i do submodeling technique for an ODB file of abaqus? - scripting

i have an ODB file, i want to get result of some elements of the model. is it possible to do submodeling on ODB? If so, can I get abaqus script to do?

Related

When I using YOLO V3, how can i save detected object name with .txt file?

I am first using YOLO V3 for my project. I had finished testing detecting dog. horse... etc. But I only got images result. I want to get detected object's name as
txt file. For Example, I tested dog.jpg and there is a txt file created. inside of txt file, it written "dog".
help me how can I get Object's name result by with txt file.
If you don't want to modify the source code, try to use this popular repository https://github.com/AlexeyAB/darknet which has a feature to save the detection result's information
Example : To process a list of images data/train.txt and save results of detection to result.txt use:
./darknet detector test cfg/voc.data yolo-voc.cfg yolo-voc.weights -dont_show -ext_output < data/train.txt > result.txt
Now you can open the result.txt and see all information related to your detection result

Change output file format to *.csv using dymosim.exe instead of *.mat

I am trying to understand if it's possible to change the model output format to .csv instead of the default .mat file when simulating a model using dymosim.exe.
I can do this in dymola itself by using the function "convertMATtoCSV" in the base Data files library. Something like below,
DataFiles.convertMATtoCSV("output.mat", {"t"}, "output.csv");
Is there a way to do this conversion using dymosim.exe?
Kindly advise.
Thanks.
Note: cmd "dymosim.exe -h" has some options for .csv but I am not sure how to use this.
No, it is currently not possible to have dymosim.exe generated by Dymola write the result as csv-file. The CSV-options used by dymosim.exe are only for running multiple simulations.
You can:
Generate a txt result instead, if that is easier to handle for you. (By setting Simulation Setup>Output>Textual data format, this is stored as last element of settings in dsin.txt).
Perform the conversion using dymola\bin\alist.exe
Have the model write a cvs-file as well
Set up to perform this as a post-processing command in Dymola 2017 FD01.

Sifteo: how to create a file.txt with LUA script?

i'm trying to create a Sifteo game able to detect accelerometer data and write them on a file.txt;
I know that several methods exist that allow to visualize data on the shell (but it need to connect the base on the pc) or storing them in a StoredObject, but i'd like to create a text file.
In the documentation of sifteo sdk I found something about script lua.
I didn't understand it, Can you help me???
Thanks
If you're simply asking for how to make a .txt file in a lua script it should be something like
file = io.open("FileName.txt","w")
file:write("Information")
file:close()
If you're new to lua you can also insert information from a variable or a table by replacing it with the string "Information".
Hope this helped.

Exporting Mathematica Print[] Output to a .txt file

I have a large Mathematica notebook that uses Print[] commands periodically to output runtime messages. This is the only output (aside from exported files) that this notebook generates. Is there any way I can automate the export of this output to a .txt file without having to re-write the Print[] commands?
According to the documentation, Print outputs to the $Output channel which is a list of streams. So, at the beginning of the notebook,
strm = OpenWrite["output.log"];
AppendTo[ $Output, strm ];
and at the end of the notebook
Close[strm];
Note, if execution is interrupted prior to closing the stream, then you'll have to do it manually. Also, the above code will overwrite prior data in "output.log," so you may wish to use OpenAppend, instead.
Edit: to guarantee that Abort will be called, consider using one of the techniques outlined here.
You want the PutAppend command.

How to Store BLOB data in Sqlite Using Tcl

I have a Tcl TK application that has a Sqlite back-end. I pretty much understand the syntax for inserting, manipulating, and reading string data; however, I do not understand how to store pictures or files into Sqlite with Tcl.
I do know I have to create a column that holds BLOB data in Sqlite. I just don't know what to do on the Tcl side of things. If anyone knows how to do this or has a good reference to suggest for me, I would really appreciate it.
Thank you,
Damion
In my code, I basically open the file as a binary, load its content into a Tcl variable, and stuff that into the SQLite db. So, something like this...
# load the file's contents
set fileID [open $file RDONLY]
fconfigure $fileID -translation binary
set content [read $fileID}
close $fileID
# store the data in a blob field of the db
$db eval {INSERT OR REPLACE INTO files (content) VALUES ($content)}
Obviously, you'll want to season to taste, and you're table will probably contain additional columns...
The incrblob command looks like what you want: http://sqlite.org/tclsqlite.html#incrblob
The "incrblob" method
This method opens a TCL channel that
can be used to read or write into a
preexisting BLOB in the database. The
syntax is like this:
dbcmd incrblob ?-readonly?? ?DB? TABLE COLUMN ROWID
The command returns a new TCL channel
for reading or writing to the BLOB.
The channel is opened using the
underlying sqlite3_blob_open()
C-langauge interface. Close the
channel using the close command of
TCL.