Click here to Skip to main content
15,889,200 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Gerry Schmitz11-Aug-18 9:19
mveGerry Schmitz11-Aug-18 9:19 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Gerry Schmitz10-Aug-18 7:38
mveGerry Schmitz10-Aug-18 7:38 
GeneralRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Stefan_Lang27-Aug-18 0:25
Stefan_Lang27-Aug-18 0:25 
AnswerRe: Start with a group of size X, divide it into Y groups, Z times, minimize overlap Pin
Patrice T1-Sep-18 16:42
mvePatrice T1-Sep-18 16:42 
QuestionSimplex Downhill... Pin
User 110609793-Aug-18 9:35
User 110609793-Aug-18 9:35 
AnswerRe: Simplex Downhill... Pin
Stefan_Lang5-Aug-18 21:33
Stefan_Lang5-Aug-18 21:33 
GeneralRe: Simplex Downhill... Pin
User 110609796-Aug-18 4:47
User 110609796-Aug-18 4:47 
GeneralRe: Simplex Downhill... Pin
Stefan_Lang7-Aug-18 2:21
Stefan_Lang7-Aug-18 2:21 
Hello again

I'll try to reformulate your problem in a more formal way.

First, you have an expression with 5 unknowns (w and the 4 components of c: c1, c2, c3 and c4). By your description, everything else are known values. In other words you have a function of 5 variables
f(w,c1,c2,c3,c4) = w*b+A*c


Next, you want this expression to come as close as possible to a target vector t. You can express this by defining a new function g that computes the difference between f(w,c) and t:
g(w, c) = w*b + A*c - t


And you want the resulting vector to be as small as possible:
norm(g(w0, c0)) = Minimum(norm(g(w, c))) for any w in [0,1] and any ci in [0,infinity]

Since this is a linear problem, none of the algorithms I previously suggested will be preferable. If you use the Euclidian norm, you can minimize the square of the norm instead, to avoid the square root, and turn the function into a quadratic function. That means there is only one minimum, and you don't need to care about getting stuck in local minima.

A quick search also found me this algorithm which I wasn't aware of before: Benson's algorithm - Wikipedia[^] . Maybe this will help.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: Simplex Downhill... Pin
User 110609797-Aug-18 21:23
User 110609797-Aug-18 21:23 
GeneralRe: Simplex Downhill... Pin
Stefan_Lang7-Aug-18 22:05
Stefan_Lang7-Aug-18 22:05 
GeneralRe: Simplex Downhill... Pin
User 110609798-Aug-18 1:41
User 110609798-Aug-18 1:41 
GeneralRe: Simplex Downhill... Pin
Stefan_Lang8-Aug-18 2:11
Stefan_Lang8-Aug-18 2:11 
GeneralRe: Simplex Downhill... Pin
User 110609798-Aug-18 10:18
User 110609798-Aug-18 10:18 
Questionhelp me~ for use..... #define macro ## #@ # Pin
dsyoon ds29-Jul-18 17:07
dsyoon ds29-Jul-18 17:07 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Daniel Pfeffer29-Jul-18 20:42
professionalDaniel Pfeffer29-Jul-18 20:42 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Richard MacCutchan29-Jul-18 21:26
mveRichard MacCutchan29-Jul-18 21:26 
AnswerRe: help me~ for use..... #define macro ## #@ # Pin
Chris Losinger30-Jul-18 8:32
professionalChris Losinger30-Jul-18 8:32 
QuestionRead text from a file and realloc when needed Pin
claymorehack6-Jul-18 4:02
claymorehack6-Jul-18 4:02 
AnswerRe: Read text from a file and realloc when needed Pin
Richard MacCutchan6-Jul-18 4:08
mveRichard MacCutchan6-Jul-18 4:08 
GeneralRe: Read text from a file and realloc when needed Pin
claymorehack7-Jul-18 22:46
claymorehack7-Jul-18 22:46 
GeneralRe: Read text from a file and realloc when needed Pin
Richard MacCutchan8-Jul-18 2:49
mveRichard MacCutchan8-Jul-18 2:49 
QuestionLookup table with angles Pin
cristiapi6-Jul-18 2:30
cristiapi6-Jul-18 2:30 
AnswerRe: Lookup table with angles Pin
Stefan_Lang5-Aug-18 23:09
Stefan_Lang5-Aug-18 23:09 
QuestionBig-O Notation Pin
Manish16927-Jun-18 18:31
Manish16927-Jun-18 18:31 
AnswerRe: Big-O Notation Pin
Richard Andrew x648-Jul-18 3:33
professionalRichard Andrew x648-Jul-18 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.