The following class implements a reader-writer lock to use in the second readers-writers problem with python threads. In this problem, many readers can simultaneously access a share, and a writer has an exclusive access to this share. Additionally, the following constraints should be met: 1) no reader should be kept waiting if the share is currently opened for reading unless a writer is also waiting for the share, 2) no writer should be kept...
Perform Multiple Tasks Using Threads is an article in which author elaborates the procedure for creating and managing multithreaded programme with the help of C# mechanisum. In this tutorial users can learn about procedure for creating a thread...
Solution for the Travelling Salesman Problem using genetic algorithm. Speed, particularly at large data volumes, is of essence. The project uses advanced variants of cross-over and mutation algorithms in order to expedite search in the solution...
Cooperative multitasking offers an alternative to using threads. It can be harder to use in some cases (blocking IO) but in other it can be much easier (sharing data between tasks). This recipe shows how to use generators to achieve simple,...
We solve a binary distillation problem using the solution of a Riccati equation. We find that four plates are needed to achieve the desired product purity. We also compute the number of stages with the classical approach by stepping off stages...
When you're new at threading, using threads can be a bit daunting at first. If all you want is just to "run this function in parallel (= asynchronously) to the main program code", then this recipe can be of use. Simply use...
The non-linear regression problem (univariate or multivariate) is easily posed using a graphical user interface (GUI) that solves the problem using one of the following solvers: - nlinfit: only univariate problems. - lsqnonlin: can...
Function to solve the Minimum Perfect Matching on non-biparite graphs problem using Integer linear programming.
Returns vector of matched indices and cost of the match. Requires symmetric adjacent matrix of even rank.
The package HermiteEig calculates a finite number of numerical eigenvalues and eigenfunctions of Schroedinger problem using the Hermite spectral method
Controlling the 4-tank problem using a non linear controller This simulaiton demonstrates the capabilities of the APmonitor non linear controller on the non-linear 4 tank process. The goal of the project is to develope a fast non linear...
This module solves the widow problem using a client-side approach using jQuery. In typesetting, a widow is a single word on a line by itself at the end of a paragraph and is considered bad style.
It was inspired by Shaun Inman's work...
Vorbis Comment Reader/Writer Library
An implementation of LAYAGEN G(Diego-Mas 2010) for solves the layout planning problem using a simple genetic algorithm, and fully written in GAMBAS
XiMoL is an XML reader/writer (non-validating) library written in C++. It is a iostream-oriented library based on the STL and not a SAX or DOM library (like Xerces, expat, ...). Each object has its own reader/writer (operator<< and...
Tiny Config Reader: Config File Reader/Writer for Embedded Systems.
This will be an educational project for using threads and text-pattern-search in Java together with visualization. The people working on this project are only students of computer science. This work will supplement lectures and courses at the...
METALISM is a project that aims to simplify the first steps that every developer must follow to solve a problem using Multi-agent systems (MAS) and in consequence disseminating the use of MAS in the industry by means of simplifying the access to it.
Ninja INI is a simple, lightweight, and fast INI file reader & writer. It supports 3 levels (sections, keys, and containers), multiple keys with same name, parse command-line (argc & argv). Written in C++ with STL design and...
As input data, one has A: a 2xN or 3xN matrix whos columns are the coordinates of N source points. B: a 2xN or 3xN matrix whos columns are the coordinates of N target points. The syntax ...
The shelve module is a easy way to add persistence to your application via a DBM database. However, if you have multiple reader/writer combination you need to lock the file to prevent corruption. The shelve module itself does not provide locking... |