Solving Maple Function Minimize Problem with Cristian

  • Maple
  • Thread starter cva
  • Start date
  • Tags
    Maple
In summary: If you want a variable to have a different value than what is given in the set, you need to use the command reshape, like thisreshape({[{A2 = 0.3304115674e-2, A3 = -.5155123546, A1 = 0.9409892271e-1},[A1,A2,A3]) .})In summary, to solve this problem you need to create a new set, and then use subs to extract the values for the variables in that set.
  • #1
cva
18
0
Hello,

I have a problem with maple. My code is like this:


f(A1(v),A2(v),A3(v))

fm:=minimize(f,A1=-1..1,A2=-1..1,A3=-1..1)

so that I obtain a fm(v). But I also need to find A1(v),A2(v),A3(v) that minimize f.

Do you know any way to do this?




Cristian
 
Physics news on Phys.org
  • #2
Use the location=true option for minimize, that is put

fm:=minimize(f,A1=-1..1,A2=-1..1,A3=-1..1, location=true);

by the way, if you need to know something of this nature, there's a reasonable chance of finding it in the help docs for whatever Maple command you are using. To get the help docs open for a Maple command,
like "minimize" put type

?minimize

at your Maple prompt.
 
  • #3
Thanks for your reply. My problem is that all these variables are function of v. and I need to have the dependence A1(v),A2(v) and A3(v).
fm:=minimize(..., location=true) gives an array , but unfortunatley ,aple does not keep the order of the variables, every time is different.

For example:

fm[1] := 0.2075577438e-1, {[{A2 = 0.3304115674e-2, A3 = -.5155123546, A1 = 0.9409892271e-1}, 0.2075577438e-1]}
fm[2] := 0.2074929592e-1, {[{At = 0., A1 = .5315345998, A2 = 0.9928747436e-1}, 0.2074929592e-1]}
What I need is fm(v) and A1(v), ... for which correspondening to fm(v).


Cristian
 

Attachments

  • hex-square-fast-loop05.zip
    12.7 KB · Views: 174
  • #4
Thanks for your reply. My problem is that all these variables are function of v. and I need to have the dependence A1(v),A2(v) and A3(v).
fm:=minimize(..., location=true) gives an array , but unfortunatley ,aple does not keep the order of the variables, every time is different.

For example:

fm[1] := 0.2075577438e-1, {[{A2 = 0.3304115674e-2, A3 = -.5155123546, A1 = 0.9409892271e-1}, 0.2075577438e-1]}
fm[2] := 0.2074929592e-1, {[{At = 0., A1 = .5315345998, A2 = 0.9928747436e-1}, 0.2074929592e-1]}
What I need is fm(v) and A1(v), ... for which correspondening to fm(v).


Cristian
 
  • #5
A set in Maple uses {}'s while a list uses []'s, Maple will not keep the order of objects placed in sets (e.g., if, in Maple, you put Set:={a,b,c};, then Maple may display Set={c,a,b}, or any other arrangement as it pleases), but order is maintained in a list by Maple ((e.g., if, in Maple, you put List:=[a,b,c];, then Maple will always display List=[a,b,c]).
 
  • #6
You might also try using the Minimize command in the Optimization package:

>with(Optimization);

>?Minimize

should get you started.
 
  • #7
Thanks for the answers.


Cristian
 
  • #8
Hello,

Meanwhile I was able to solve the problem.

The ouptput of fm:=minimize(..., location=true) is an array which contains the value of minima and a set like in the eq down.

fm[1] := 0.2075577438e-1, {[{A2 = 0.3304115674e-2, A3 = -.5155123546, A1 = 0.9409892271e-1}, 0.2075577438e-1]}

In fact the set {[{A2 = 0.3304115674e-2, A3 = -.5155123546, A1 = 0.9409892271e-1}, is not giving values to A1,A2,A3 is just the rule that those variables have to obey in oredr to have minima. The values can be extracted with the help of the command subs, like this

subs({[{A2 = 0.3304115674e-2, A3 = -.5155123546, A1 = 0.9409892271e-1},[A1,A2,A3]) .
The rule is applied to the variables.
 

Related to Solving Maple Function Minimize Problem with Cristian

What is a Maple function minimize problem?

A Maple function minimize problem is a mathematical optimization problem where the goal is to find the minimum value of a given function, subject to certain constraints. In other words, it is a method for finding the best possible solution for a given problem.

Who is Cristian?

Cristian is a person's name and does not have any specific relevance to solving Maple function minimize problems. It is likely that the person asking this question is referring to a specific individual or resource that they have come across while trying to solve their problem.

What is the process for solving a Maple function minimize problem?

The process for solving a Maple function minimize problem involves identifying the objective function, determining any constraints, and then using mathematical techniques such as derivatives or linear programming to find the optimal solution. In some cases, specialized software such as Maple may be used to assist with the calculations.

What is the difference between a maximum and a minimum value in a Maple function minimize problem?

A maximum value represents the highest point on a function, while a minimum value represents the lowest point. In a Maple function minimize problem, the objective is to find the minimum value of a function, which means finding the lowest possible value.

What are some common challenges when solving Maple function minimize problems?

Some common challenges when solving Maple function minimize problems include identifying the correct objective function, accurately defining constraints, and selecting the appropriate mathematical techniques for finding the optimal solution. Additionally, errors in calculations or inputting data can also lead to challenges in the solving process.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
283
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
7K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
2
Replies
61
Views
4K
Replies
7
Views
932
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
Back
Top