Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2230 > unrolled thread
| Started by | Matthias Bode <lvsaba@hotmail.com> |
|---|---|
| First post | 2011-05-09 10:20 +0000 |
| Last post | 2011-05-11 08:28 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Maximize, interpretation of result. Matthias Bode <lvsaba@hotmail.com> - 2011-05-09 10:20 +0000
Re: Maximize, interpretation of result. Peter Pein <petsie@dordos.net> - 2011-05-11 08:28 +0000
| From | Matthias Bode <lvsaba@hotmail.com> |
|---|---|
| Date | 2011-05-09 10:20 +0000 |
| Subject | Maximize, interpretation of result. |
| Message-ID | <iq8f61$5v3$1@smc.vnet.net> |
Hola:
>From the help browser:
In[27]:= Maximize[-2*x^2 - 3*x + 5, x]
Out[27]= {49/8, {x -> -(3/4)}}
Check:
In[28]:= -2*x^2 - 3*x + 5 /. x -> -(3/4)
Out[28]= 49/8
Fine!
Now:
In[35]:= Clear[tak, tat]
In[36]:= Maximize[{tat*35 + tak*40, tat + tak <= 500, tak >= tat, tak <= 2*tat}, {tat, tak}, Integers]
Out[36]= {24630, {tat -> 166, tak -> 332}}
Check:
In[30]:= tat*35 + tak*40 /. {tat -> 166,
tak -> 332}
Out[30]= 19090
How do I have to interpret the "24630"?
Saludos,
MATTHIAS BODE
S 17.35775=B0, W 066.14577=B0
2'740 m
AMSL.
[toc] | [next] | [standalone]
| From | Peter Pein <petsie@dordos.net> |
|---|---|
| Date | 2011-05-11 08:28 +0000 |
| Message-ID | <iqdhbd$1b5$1@smc.vnet.net> |
| In reply to | #2230 |
Am 09.05.2011 12:20, schrieb Matthias Bode:
> Hola:
>
>>From the help browser:
>
> In[27]:= Maximize[-2*x^2 - 3*x + 5, x]
>
> Out[27]= {49/8, {x -> -(3/4)}}
>
> Check:
>
> In[28]:= -2*x^2 - 3*x + 5 /. x -> -(3/4)
>
> Out[28]= 49/8
>
> Fine!
>
> Now:
>
> In[35]:= Clear[tak, tat]
>
> In[36]:= Maximize[{tat*35 + tak*40, tat + tak <= 500, tak >= tat, tak <= 2*tat}, {tat, tak}, Integers]
>
> Out[36]= {24630, {tat -> 166, tak -> 332}}
>
> Check:
>
> In[30]:= tat*35 + tak*40 /. {tat -> 166,
> tak -> 332}
>
> Out[30]= 19090
>
> How do I have to interpret the "24630"?
and what has 19090 to do with the expected outcome?
>
> Saludos,
>
> MATTHIAS BODE
> S 17.35775=B0, W 066.14577=B0
> 2'740 m
> AMSL.
Hi,
really strange is, that the true maximum is given by
NMaximize[{tat*35+tak*40,tat+tak<=500,tak>=tat,tak<=2*tat,
{tak,tat}\[Element]Integers},{tat,tak}]
yielding {19165.,{tat->167,tak->333}}
Peter
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web