MyWork
Wednesday, June 26, 2013
vimeo tests
Friday, September 23, 2011
Optimize portfolio with solver
The most basic form of optimization programming is to write a linear program (LP) to find an answer that is based on a set of decision variables, linear constraints, and limited ranges. For example, a petroleum refinery could procure crude oil from two sources, minimize the purchase costs of crude oils that differ in quality, and meet minimum production levels of gasoline, jet fuel, and machine lubricant. You can use Solver Foundation to solve this problem by using variables, bounds, and the simplex solver. You can construct the model by using the AddVariable, AddRow, and AddGoal methods. For more information, see How to: Use Linear Programming using the Solver Foundation Solver APIs.
Quadratic Programming
You can use quadratic programs to solve economics problems such as optimizing a portfolio. A quadratic portfolio is a technique that economist Harry Markowitz developed to balance risk and return by mixing alternative investments. In this technique, the initial data is the performance history of a set of different investments. Linear calculations are performed on this data to determine the average rates of gain or loss, and then quadratic calculations are performed to determine the covariances, which are the amounts by which the average rates vary from one another over time. By using the Markowitz formulation, you can calculate a mix of investments to lower risk and achieve a relatively high average rate of return. For example, you could solve a portfolio to determine the lowest risk given a specific rate of return. For more information, see How to: Use Quadratic Programming to Optimize a Stock Portfolio.
Mixed Interger Linear Programming
Linear programs where some or all variables are required to be integers are known as mixed integer linear programs (MILP). This is applicable to problems where decisions are binary such as yes/no or items cannot be fractional. MILP problems can take an exponential time to solve due to the combinatorial solving process. To reduce the complexity, you can change the algorithm heuristics or use techniques such as branch-and-bound, efficient restarts, feasibility pumps, and cutting planes.
You can also use solution quality, or the gap, to reduce the time required to find a solution. A solve that is configured to find the best strict solution may take a long time, whereas a relaxed solution is one where not all the integer constraints are satisfied. The difference between the best strict solution and a relaxed solution is known as the gap, which can be adjusted to an acceptable tolerance level.
Cutting planes can be used to remove solutions that are not integer feasible and reduce the search space. You can enable this ability by setting the MixedIntegerGenerateCuts property to true. For more information, see How to: Make Investment Decisions using Mixed Integer Linear Programming.
Unconstraing Non-Linear ProgrammingTo find the local optimum of a general unbound and unconstrained objective function, you can use the compact quasi-newton (CQN) solver. It uses a variant of Newton’s method by twice differentiating the function to find the local optimum most steeply connected to the starting point. The solver stops computation when the ToleranceDifference and Tolerance properties are equal. For more information, see How to: Use Unconstrained Non-Linear Programming.
Parameter management
http://couchdb.apache.org/
http://net.tutsplus.com/tutorials/getting-started-with-couchdb/
mapping JSON protocol by JSon.net
http://james.newtonking.com/projects/json-net.aspx
C# persistence mapper
https://github.com/foretagsplatsen/Divan
Thursday, September 22, 2011
LitJSON lib C#
http://litjson.sourceforge.net/doc/manual.html#quickstart.mapping
http://litjson.sourceforge.net
public static void PersonToJson ()
{
Person bill = new Person ();
bill.Name = "William Shakespeare";
bill.Age = 51;
bill.Birthday = new DateTime (1564, 4, 26);
string json_bill = JsonMapper.ToJson (bill);
Console.WriteLine (json_bill);
// {"Name":"William Shakespeare","Age":51,"Birthday":"04/26/1564 00:00:00"}
}
Parameter storage technology
even so, parameters are many and multidimensional, also genetically evolving - they are not massive, like test results so the performance of a SQL db is not required.
in opposition, what is required and seems to be covered by NoSQL database approaches like CouchDB. http://wiki.apache.org/couchdb/
- autrak server to server communication. not always - on philosophy allows redundancy and loose connection between systems but being able to use a common repository.
- easy changing structure of storage. strategies with an evolutionary approach develop own models and therefore extend or reduce dimensions of data. this means - the storage model is dynamic. that is more important than high-throughput.
- Mutli version concurrency control is the power I need here.
- the google patented Map-reduce method helps to maintain still performance.
- consistency and conflicts between storages can be covered by the system.
- REST protocoll based JSON-API which is close to other service based storages.
- document oriented file management system.
- accessible from all available programming languages and OS.
- functional programming language Erlang is used.
- master/slave replication and caching of remotely managed data.
- docuemnts have a unique ID
- queries can traverse any document which has the correct fieldname inside. anything else does not matter. - very flexible for changing structure.
- new views can be created from query results, and simply create new documents with the combined results. this makes it easy to summarize and merge different data and structures without excessive relational database modelling and mapping.
- distributed database system and fully redundant
- open source and cloud based.
final summary - fucking simple to use and really powerful. core technolgy used by Google, Amazon & Co
Friday, September 9, 2011
Wednesday, August 24, 2011
Wordpress
Go to the includes/featured.php and edit this code:
$height = 220;
for text add this code to the end of the style.css:
width: 300px !important;
}