Multi Objective Shortest Path Problem on Python - networkx

Is there any fast python implementation (library) of Multi Objective Shortest Path Problem : Martins, MultiObjectiveA*, etc?

Related

I can't understand _chipmunk_cffi.lib cp

When I trace to _chipmunk_cffi.py, it is from pymunk._chipmunk_cffi_abi import ffi, lib, lib_path.
So I trace to _chipmunk_cffi_abi.py and it's only lib, lib_path = load_library(ffi, "chipmunk", debug_lib=_lib_debug) but I can't find ffi anymore. So what is that?
I want to see what is doing in space.step(), where can I find this?
Pymunk is not doing the actual simulation itself, but is using a separate c library called Chipmunk for that part. Chipmunk is written in C, and called from the Python code in Pymunk with the CFFI foreign function interface library. I dont think you can trace it directly from the Python side into C-code. Instead if you want to see what it is looking like you can check the c-source directly, for example the step function is here: https://github.com/viblo/pymunk/blob/0d79176cf2fd642bd2ce4005478cb8d6e37c1e9c/chipmunk_src/src/cpSpaceStep.c#L336

How do I find selfor in Octave?

I need to implement unsupervised neural network using Octave. For that, I need to use "selforgmap" function. How do I find that function in octave or what are the packages include this function?
When I use "selforgmap", I got an error like this.
selforgmap
error: 'selforgmap' undefined near line 1 column 1
help selforgmap
error: help: 'selforgmap' not found
As of now there does not appear to be any implementation of selforgmap in octave or any of it's packages. The current neural net package, nnet, can be found at Octave Forge and the Function Reference link will show you everything currently included.
The link Andy commented with above to a current reworking if the nnet package also does not currently include selforgmap, but this could obviously change. The included function files can be seen inside the inst folder.
if MATLAB's selforgmap is not an option for you, you will either need to code your own implementation or switch bto another programming language. A quick search does reveal a Python implementation of selforgmap that may serve your purpose.

Link AnyLogic and Matlab

I was wondering if it would be possible that link AnyLogic to Matlab?
I need a way that call a function from Matlab to Anylogic.
At this level AnyLogic should be considered as Java application, and the question should be formulated as Link Java and Matlab. You may search for different Java libraries that establish connection with MatLab and Java app, allowing to pass commands from app to Matlab, and get the result. Example of such library — matlabcontrol. There is also example model.
UPD: Matlab provides Java API for AnyLogic, so you may directly use it within AnyLogic. In this case third-party libraries are not required. For this purpose you need to add engine.jar to the model dependencies, the .jar is provided with Matlab, it is located in:
matlab\extern\engines\java\jar
Here is the model that invokes Matlab using the respective examples from:
matlab\extern\examples\engines\java
I'm not sure which direction you are talking about.
calling a matlab function in anylogic:
Since Anylogic is based on Java, you could use the Java Runtime class, and do something like:
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("C:\<a long path here>\matlab.exe" -nodisplay -nosplash -nodesktop -r "run('C:\<a long path here>\mfile.m');exit;"
after that you need to get the output from the process object pr and do your magic.
calling anylogic simulation in matlab:
have a look at : http://help.anylogic.com/topic/com.xj.anylogic.help/html/integration/Integration.html

Find K-shortest Path in Orientdb

I am new to OrientDB and I am trying to find top k shortest path in my graph.So I am creating my algorithm by applying from Yen's algorithm but I do not know how to use it to work in OrientDB ,or is there another ways to find K-shortest path in Orient Graph?
How should I do ?
Thank for all helping :]
If you already have the shortest path (only the shorter) could use directly the function present in OrientDB ShortestPath:

'+' packaging or modular programming in matlab: analog of python's import?

I come with the background in languages like Java or Python where modular programming is enabled by packaging system and import directive (aka namespace aliasing). Historically MATLAB's approach to resolve problems like naming conflicts boils down to setting/playing with MATLABPATH, renaming/extending identifiers with prefixes, etc. So far I have been successfully playing with native MATLAB packaging by prepending plus sign "+" before the folder name (MATLAB notation for package also see here). Obviously they are very long to type ;-) Basically I am back to the similar problem as discussed here with no solution. So let me paraphrased for my particular angle:
Assume I have folder +mypackage defined containing file myfun.m with the function code of the same name.
How to achieve aliasing for MATLAB function inside the user (non-java) package as illustrated by the following python code:
from mypackage import myfun
?
[EDIT] Please note that AFAIK import keyword works only for java classes (with jvm attached to MATLAB process). No, import is working perfectly fine for both functions and aliases for objects and function of both Java and MATLAB origin.
Possibly related but not the same.
[EDIT2]
python's
from mypackage import myfun as anotherfun
is equivalent to MATLAB's
anotherfun = #mypackage.myfun
Doesn't
import mypackage.myfun
work?
link to documentation