Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Question on fmincon input value

Subject: Question on fmincon input value

From: Haemish

Date: 30 Jan, 2013 10:51:08

Message: 1 of 3

Dear sir,

I try to solve optimizatino on hybrid vehicle.

I have some problems about fmincon and would you mind giving me an answer?

The input(generation engine power) range of the problem is 0 kW(off) or 20kW~150kW(on).

But fmincon input seems to require an input of continuous case. (The problem is how to treat 0 kW case)

Can I know if any solutions for that exit?

And can I know if fmincon matlab 2012 is better than SNOPT?

Sincerely yours,

Thank you.

Minjae Kim

Subject: Question on fmincon input value

From: Alan_Weiss

Date: 31 Jan, 2013 15:42:04

Message: 2 of 3

On 1/30/2013 5:51 AM, Haemish wrote:
> Dear sir,
>
> I try to solve optimizatino on hybrid vehicle.
>
> I have some problems about fmincon and would you mind giving me an
> answer?
>
> The input(generation engine power) range of the problem is 0 kW(off)
> or 20kW~150kW(on).
>
> But fmincon input seems to require an input of continuous case. (The
> problem is how to treat 0 kW case)
>
> Can I know if any solutions for that exit?
>
> And can I know if fmincon matlab 2012 is better than SNOPT?
>
> Sincerely yours,
>
> Thank you.
>
> Minjae Kim

Unfortunately, fmincon requires continuous variables, and does not
handle binary variables, which is what I understand you want. See
http://www.mathworks.com/help/optim/ug/choosing-a-solver.html#brhkghv-21

You might be able to do a search on all values of the binary variable,
if there are fewer than 20 or so. I mean, set each binary variable to 1
or 0 and solve the problem over the continuous variables. With 20 binary
variables there are 2^20 ~ 10^6 possibilities, and you might be able to
search that many continuous problems.

Good luck,

Alan Weiss
MATLAB mathematical toolbox documentation

Subject: Question on fmincon input value

From: Mouloud

Date: 6 Feb, 2013 15:54:08

Message: 3 of 3

"Haemish " <haemish@hanmail.net> wrote in message <keatus$frb$1@newscl01ah.mathworks.com>...
> Dear sir,
>
> I try to solve optimizatino on hybrid vehicle.
>
> I have some problems about fmincon and would you mind giving me an answer?
>
> The input(generation engine power) range of the problem is 0 kW(off) or 20kW~150kW(on).
>
> But fmincon input seems to require an input of continuous case. (The problem is how to treat 0 kW case)
>
> Can I know if any solutions for that exit?
>
> And can I know if fmincon matlab 2012 is better than SNOPT?
>
> Sincerely yours,
>
> Thank you.
>
> Minjae Kim

Hi,

I used fmincon to solve my energy management problem for hybrid vehicles and it gives me a good solution and you can see my publication "Using Quasi-Newton method for energy management in electrical multi source systems" . and you can cite it :-)

for your case, when the power is between zero (engine off) and 20 kW, I advice you to add a new constraint

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us