mathematical-optimization

mathematical optimization library for Java --- free or open source recommendations?

Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger problems. Do I have to write my own implementations, or buy one of those commercial products (CPLEX and the l...

Optimal Rectangle hatching algorithm

Hi, I am looking for an algorithm to hatch a rectangle with shortest overall line length, so that an object of given area can be passed through the hatching. For example given a rectangle of 5x3 cm, and I hatch using parallel lines 1cm across, the biggest object I can pass through the hatch is a square of 1cm side. I have used an overa...

Optimization packages for R

Does anyone know of any optimization packages out there for R (similar to NUOPT for S+)? Thanks ...

Best open source Mixed Integer Optimization Solver

I am using CPLEX for solving huge optimization models (more than 100k variables) now I'd like to see if I can find an open source alternative, I solve mixed integer problems (MILP) and CPLEX works great but it is very expensive if we want to scale so I really need to find an alternative or start writing our own ad-hoc optimization librar...

Java Library? - Simplex / Linear Programming / Optimization

I'm looking for an optimization library. My two requirements are that it does not use JNI and that it does not have license restrictions preventing it from being used on multiple computers commercially. The only one I've found that meets these requirements is Choco, but it is unusably buggy. ...

Which algorithm for assigning shifts (discrete optimization problem)

I'm developing an application that optimally assigns shifts to nurses in a hospital. I believe this is a linear programming problem with discrete variables, and therefore probably NP-hard: For each day, each nurse (ca. 15-20) is assigned a shift There is a small number (ca. 6) of different shifts There is a considerable number of const...

Algorithm to determine if a given date/time is between two date/time pairs

I have an array of dates in a one week range stored in an unusual way. The Dates are stored in this numeric format: 12150 From left to right: 1st digit represents day: 1 = sunday, 2 = monday, 3 = tuesday, ...., 7 = saturday next two digits represent hour in a 24 hour system: 00 = midnight, 23 = 11pm next two digits represent minutes...

Linear algebra library for the D programming language.

I'm looking for a package to do matrix math with matrices of up to about 100 x 100. I need to, at a minimum, do inverses, multiplication and transposition. I'd prefer a more encapsulated interface over higher performance. ...

room/timeslot schedule optimization

People can chose up to 5 of 25 lectures in advance. All these lectures are given on one day in five rooms at five time slots. Each (preferred) lecture a listener can attend to makes her a bit happier, each lecture he chose but can't attend to (because another preferred lecture is in the same time slot) makes him a bit unhappier. The list...

Parallelogram contains Point

What way is the fastest of deciding whether a point is inside a parallelogram/rhomboid? ...

How calculate minimal waste when tailoring tubes

I have a rather mathematical problem I need to solve: The task is to cut a predefined number of tubes out of fixed length tubes with a minimum amount of waste material. So let's say I want to cut 10 1m tubes and 20 2,5m tubes out of tubes with a standardized length of 6m. I'm not sure what an algorithm for this kind of problem would l...

Single Precision Math Operations in .NET?

The .NET framework's Math functions mostly operate on double precision floats, there are no single precision (float) overloads. When working with single precision data in a high performance scenario this results in unnecessary casting and also calculating functions with more precision than is required, thus performance is affected to som...

Optimizing points distance to sphere test.

I would like to test if a point is within a particular distance of a sphere. So you have these variables... Point3F spherePnt; F32 sphereRadius; Point3F testPnt; I could do... F32 dist = ( spherePnt - testPnt ).len() - sphereRadius; If dist is positive it is outside the radius, if dist is negative it is inside the radius. Or as a...

Why is squaring a number faster than multiplying two random numbers?

Multiplying two binary numbers takes n^2 time, yet squaring a number can be done more efficiently somehow. (with n being the number of bits) How could that be? Or is it not possible? This is insanity! ...

Is there an iterative way to calculate radii along a scanline?

I am processing a series of points which all have the same Y value, but different X values. I go through the points by incrementing X by one. For example, I might have Y = 50 and X is the integers from -30 to 30. Part of my algorithm involves finding the distance to the origin from each point and then doing further processing. After ...

Optimization with Mathematica: Use BinCounts in Objective Function

Using Mathematica, I need to optimize a function that is defined in terms of BinCounts; the arguments that I want to maximize over define the bin cutpoints. I think the problem is that Mathematica expands the objective function in terms of the arguments before they have been given numerical values, so BinCounts complains that the bin...

Is Big O(logn) log base e?

For binary search tree type of data structures, I see the Big O notation is typically noted as O(logn). With a lowercase 'l' in log, does this imply log base e (n) as described by the natural logarithm? Sorry for the simple question but I've always had trouble distinguishing between the different implied logarithms. ...

What's the most efficient way to detect triangle-triangle intersections ?

How can I tell whether two triangles intersect in 2D Euclidean space? (i.e. classic 2D geometry) given the (X,Y) coordinates of each vertex in each triangle. ...

How can I convert this 'math model' to php?

Hi, i have mathematical problem which I'm unable to convert to PHP or explain differently. Can somebody send my in the right direction? I have two number which are in order (sequence). #1 and #2. I want to somehow compare those two numbers and get a positive number lower than 100 as the result of the comparison. The higher the values, ...

Coin-OR -- Extracting Gomory Cuts from Cgl (Coin-Or)

Hey, I'm trying to extract Cgl Gomory cuts out of the Cgl (Cut Generation Library) of Coin-Or The following is the code I'm using to extract the cuts - OsiCuts cutlist; CglGomory * gomory = new CglGomory(); gomory->setLimit(100); gomory->generateCuts(*sym, cutlist) ; where sym is an instance of OsiSymSolverInterface (the OsiSolverInt...