Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 356 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@ecterrab In your Reply to Ambrozy above, you included two examples in boxes. Those boxes appear in my browser as totally black rectangles with no writing. My browser is Google Chrome, and I tried viewing it on both Windows 10 and Android. Even if I use my Moderator power to view your Reply in the editor, they still appear like that.

Your attached worksheet does not show an example of it "not working for derivatives". Please update the worksheet.

Nonetheless, I do understand what the problem is, and I'm trying to come up with a solution. However, this is substantially more complicated than doing explicit functions.

@Joe Riel Oops, I had TransferFunction in my worksheet, not PrintSystem. I copy-and-pasted the wrong line!

@9009134 You can start by reading the help pages that come with the package. Let me know if you can access the help pages. (Help pages of third-party packages are accessed exactly the same way as regular Maple help pages.) On the main page ?DirectSearch there is a section labeled "Multi-objective optimization". Note that fitting model parameters to a finite set of data points is the same thing as minimizing the residuals using the parameters as decision variables. The most well known way is "least squares"---minimizing the sum of the squares of the residuals---but the DirectSearch package offers many alternatives to this (see ?DirectSearch,DataFit for a table listing those alternatives).

In the section "Multi-objective optimization", there are seven commands listed:

Minimax                 Weighted Minimax (Maximin) method
CompromiseProgramming   Compromise Programming method
WeightedSum             Weighted Sum method
BoundedObjective        Bounded Objective Function method
ModifiedTchebycheff     Modified Tchebycheff method
WeightedProduct         Weighted Product method
ExponentialWeightedSum  Exponential Weighted Sum method

I do not know much more about this subject.

@Carl Love I tested the above procedure in Windows 10 Home. I hope that others will test other OSs. Maple 2020 is required for the FileTools:-Walk command.

@Lenny I'd like to see that expression both before and after you converted it to a string.

@acer Yes, of course, a posted worksheet is better. I said what I said because I suspected that there was a simple fix that I didn't know the details of. And, it's really annoying when people post (through no fault of their own) these incredibly mangled 1D transcriptions of their code.

@9009134 The DirectSearch package (you'll need to download it, but it's free) does multi-objective fits and can use penalty methods.

@sand15 When the constraints are polynomial, simplify with side relations works much better than algsubs, in my opinion. For one thing, it processes the entire set of constraints as a whole.

@Ali Hassani I don't know any method to solve a set of equations in parallel. If you can find any method, I'd help implement it in Maple.

I don't quite see your pattern. If you can express it with symbols instead of numbers for the indices, then it'd be trivial for me to generate all the permutations, which you could then pass to simplify.

I've seen you use as an index before. Am I correct in guessing that is a fixed, constant symbol rather than a variable that may (possibly at some future unspecified time) be given an integer value similar to the other indices?

@acer I've seen this many times before: 2D Input being converted into some abomination of 1D input with operators in prefix-functional form and numerous explicit invocations of Typesetting:-. Perhaps it has something to do with interface(typesetting= extended)?

@Carl Love Here it is, albeit significantly more code than my estimate.

CopyDir:= proc(src::string, dest::string)
uses FT= FileTools;
local n:= 1+length(src), r, d, f, limb, ds:= kernelopts('dirsep');
    if not FT:-Exists(dest) then FT:-MakeDirectory(dest) fi;
    for r in FT:-Walk(src, 'topdown', 'followlinks') do
        limb:= cat(dest, ds, r:-dir[n..], ds);
        for d in r:-subdirs do
            (d-> `if`(FT:-Exists(d), 0, FT:-MakeDirectory(d)))(
                cat(limb, d)
            )
        od;
        seq(FT:-Copy(cat(r:-dir, ds, f), cat(limb, f)), f= r:-files) 
    od;
    return
end proc
:
#Example:
CopyDir("C:/Program Files/Maple 2020", "C:/Users/carlj/desktop/maple");

 

@winfredgg Since you had some interest in using eval, I modified my Answer above to use it correctly. I changed the first argument of semilogplot from a seq command to an eval command. This is how I would've done it myself anyway, had I not been following your use of seq. But there's nothing wrong with your use of seq!

@wolowizard Like this:

restart:
interface(labeling= false):
interface(rtablesize= 20):
#Note use of inert % operators:
F:= (x1,x2,x3,x4,x5)-> f(args) = 2%^x1%*(7%^x2+443%^x3+547%^x4+32%^x5):
V:= <4,7,8,0; 1,7,6,9; 0,1,3,5; 2,5,6,1>^+:
<seq(seq(F(k, seq(V[j])), j= 1..4), k= 1..5)>;

You could also change the addition operators to %+ in the definition of F.

So, you decide to completely ignore all warnings by setting interface(warnlevel= 0), and then you ask us for an explanation when something goes wrong? That setting should be reserved for expert use only, and only in finished, polished code.

First 159 160 161 162 163 164 165 Last Page 161 of 709