From: Nikita on
Hello Everyone,

I need to minimize a function that computes the cost of a pipeline system based on the diameters of pipes.

cost=cost(D1,D2,D3,...,Dn)

Every Diameter, D, can take one of these values and no other ones:

0.5
0.75
1
1.25
1.5
2
2.5
3
4

What type of optimization should I use? Discrete or constrained continuous? Which matlab function should I use?

I tried fminsearch. It gave me some negative values for the diameter.

Thanks!
From: John D'Errico on
"Nikita " <sharni(a)vt.edu> wrote in message <i0r1id$qng$1(a)fred.mathworks.com>...
> Hello Everyone,
>
> I need to minimize a function that computes the cost of a pipeline system based on the diameters of pipes.
>
> cost=cost(D1,D2,D3,...,Dn)
>
> Every Diameter, D, can take one of these values and no other ones:
>
> 0.5
> 0.75
> 1
> 1.25
> 1.5
> 2
> 2.5
> 3
> 4
>
> What type of optimization should I use? Discrete or constrained continuous? Which matlab function should I use?
>
> I tried fminsearch. It gave me some negative values for the diameter.
>
> Thanks!

Well, since fminsearch is neither discrete nor does it allow
constraints, nor does it work well for many parameters, it
would seem a poor choice. But you have found that out
already.

You have essentially a nonlinear integer programming
problem.

John
From: Marcus M. Edvall on
Hi Nikita,

If you are lucky you can model the problem with tomSym in TOMLAB and
automatically get 1st and 2nd order derivatives. Then KNITRO and
minlpBB are suitable solvers to test.

For small scale cases you can try glcDiredct.

Best wishes, Marcus
http://tomopt.com/
http://tomdyn.com/