Get formatted equations from LP/MPS file - optimization

When solving problems with many (changing) constraints or objective components it is pretty hard to create documentation in form of formatted equations for it.
Is there an easy way to automatically create formatted equations (LaTeX, PDF,..) from LP/MPS files?
This would be a big help for me.
Thanks in advance!

See https://cs.stackexchange.com/questions/48510/help-wrapping-my-head-around-a-combinatorial-optimization-problem/50179#50179 for an example of a LaTeX representation of a GAMS model. I think with LP/MPS files you have lost too much structure and context. It would be very difficult to recover the original equations that formed these files. Almost like recovering the original C code from a .exe file.

Related

Compare PDF files visually(drawings and highlights) and merge the differences

I am trying to compare and merge 2 pdf files which has text, drawings and highlights/comments.
The old file will have highlights and comments but new file will have changes to text and drawing with out highlights or comments, I need to be able compare all the differences and merge the highlights and comments from old file back to the new file where applicable.
So far I have found some tools that does the comparison but not the merge/highlights. I have tested DiffPDF and it works for comparing but I am not sure how I can use that to merge the files. Any software/tool that does this already and is there a way to do the merge with diffpdf ?
There is no easy way to do what you are asking. Even if you go low level, there are big challenges to face. PDF is very different from other document formats in that there is no semantic structure embedded in the document, so it would be very hard for something like a merge process to be able to figure out what to do. You may need to try a completely different approach. Remember that PDF was designed essentially to display identically on different platforms. It was never designed for document editing.
Check this library for PDF Compare and highlighting the differences.
https://github.com/vinsguru/pdf-util

How to extract info from a file

this may be a beginner's question. I've tried searching for info but couldn't find anything. Part of my work requires me to convert a specific, proprietary, file type. Unfortunately the software is no longer supported and can't be found. I have no idea where to start on this. I would like to write a little utility to basically convert the file for me to a standard file. Question is where do I start? Conceptually what am I looking at here? Is this even possible?
You could start by understanding what is stored in the file. Is there a pattern to the data, what is the pattern, how it is repeated, etc.
Then open the file in binary mode and try to find if there is indeed a pattern. If there is one, you should be able to see it, even if in binary mode.
And lots of patience :-)

What are the specifications for a Wavefront .obj file?

I want to write a parser for Blender's .obj file. The file format seems self explanatory, but also it seems to be missing some data. For example, a simple cube (the default Blender cube) has 8 lines of vertexes, but I was expecting to see 36 lines (12 triangles to form a cube).
I think the confusion, at lease for me, stems from the way cubes are created in direct3d. Direct3d requires 36 vertexes to form a cube. So I am thinking that I need to infer the other 28 vertexes. This type of guessing could cause issues later on when trying to parse vertexes for more complex shapes. So, I thought if I could find the official specs on the file format it might provide me with some insight into how to interpret the data.
It seems that someone else had asked the same question before: How to get proper number of vertices in OBJ file from DCC tools such as Blender for use in OpenGL ES?
but it didn't have any useful information for me.
OBJ Spec
MTL Spec (you'll probably want this too at some point)
FYI OBJ is in no way related to Blender, it's just a common file format for simple models.

visiops automatic diagram building from xml file

I have found that VisioPS is able to draw diagram in xml from xml file using COM. Nice feature I can construct xml file and build diagram in visio. However for class diagram I need to add operations and attributes for classes. Is it possible to specify that information in xml file.
The link where information about visiops xml file is stored https://skydrive.live.com/?cid=1ff099edb1c7ebfa&id=1FF099EDB1C7EBFA%211421
Thanks in advance.
UPD
Link to the visio file with example: http://dl.dropbox.com/u/14767221/example.vsd
#misha - Thanks! now that I see what you are trying to accomplish it is easier to answer. The short answer is that the code in VisioPS is optimized around using the "basic" stencils (simple rectangular and oval shapes) and not stencils as complex as the UML stencils. The UML shapes are complicated and much harder for me to automate. I do think it is possible, and so I will take a look at how this could be added in future versions.

How to parse and load text file with Core Data?

I resort to your expertly advice because I am sort of "new" to Objective-C, I have read a couple of books and docs (namely Aaron Hillegass & Stephen G. Kochan's books), but some things are still unclear to me, for lack of practise.
To put you in context, I have a NSDocument project that uses Core Data for storage.
I struggle with 2 things right now: reading/writing to files, and table views ^^
So my first question is about Core Data : is it only able to save in SQL, XML or Binary format ?
Or can I use core data to read/write in any format, according to what I declared in the plist file ?
I am trying to work with .po files, and I want to display the translations in a table view containing 2 columns (1 for the msgid and the other for the msgstr).
To read and write files in the po format and display lines in my table view, I most likely need to parse the files using line endings and characters such as "#"as delimiters.
I haven't gotten around to doing that yet (I have no idea how to do that yet!), but I would like to know if it is possible or if I need to restart my project that doesn't use Core Data...
Please DO NOT just throw links to the apple documentation at me, it's the most confusing thing ever, and feels like it's made for experts only! I need me some human-readable explanations :)
Thanks a bunch for any help and advice you can give me!
It is possible to write a different storage format for Core Data, but it is not easy and it sounds like you are not at a level where that is a possibility (no shame there, I'm not either).
If you are only displaying data from the .po files then there is no need to use CoreData. CoreData is meant to provide a file storage solution. You create/edit data and save it using coredata. If you have no intention to create and edit data then get rid of coredata, it will only get in the way.