Carl Love

Carl Love

19627 Reputation

24 Badges

8 years, 44 days
Mt Laurel, New Jersey, United States
My name was formerly Carl Devore.

MaplePrimes Activity

These are replies submitted by Carl Love

You wrote:

  • The terms W1 and W2 are constant and assume precise values as a function of h.

Although I understood what you meant, at face value the above statement is self contradictory. A better wording would be "W1 and W2 are piecewise-constant functions of h." This is standard mathematical language; it is not derived from Maple's command piecewise.

@Spirithaunter You give up much too easily. There are a vast number of ways to do what you want. In particular, there is an error command, which will either stop the program or can be trapped with the try command to do anything you want.

MyCheck:= proc(F::{list, tabular}(realcons), UL::realcons)
        if ormap(i-> is(F[i-1]+F[i] >= UL), [$2..numelems(F)]) then
            error "pairwise sum limit exceeded"
            "expected 1st argument to be 1-dimensional with "
            "indices starting at 1"
    end try
end proc:

#Called via
MyCheck(F, 20);

You could also force a bad F to produce an invalid input error, like this:

    proc(F, UL::realcons)
            F::{list, tabular}(realcons) and 
            andmap(i-> is(F[i-1]+F[i] < UL), [$2..numelems(F)])
        end try
    end proc
MyProc:= proc(F::PairwiseSum(20))
end proc
F[1]:= 3: F[2]:= 20:
Error, invalid input: MyProc expects its 1st argument, F,
 to be of type PairwiseSum(20), but received F


@mmcdara I think that still only numeric edge weights are allowed. I recall writing an Answer here in the past few months with a kludgy workaround for that: You make the edge weights unusual numbers, numbers that won't otherwise appear in the problem. After calling DrawGraph​​​​​, substitute (using subs).the strings that you actually want for the string forms of the numbers. Of course, it works better when the old and new strings have the same length.

Although it's not realistic for an actual house, this problem supposes that the air doesn't move between rooms (convection), only the heat moves (conduction through the walls). So Newton's law applies to each pair of adjacent rooms (including the exterior), and the effect is additive.

@mmcdara The only thing that stopped me from answering this Question was that I didn't know how to account for the furnace F. Your solution says that the furnace raises the temperature of its surroundings at a constant rate, regardless of what that temperature is. My first guess was that it pumped out heat energy at a constant rate. Those two concepts are close to equal as long as the variation in the temperature of the surroundings isn't too extreme. And your way makes the ODEs linear, so it's likely what the professor intended. If you read the "boilerplate" on an actual furnace, the units will be energy/time (BTUs/hour in the US, I guess watts for the rest of the world) with an efficiency percentage given for the heat exchanger.

Anyway, vote up.

@Aschemer I am very curious about what is the optimal chunk size of the chunks from Y to use for this. Are the elements of Y generated iteratively? Are they stored on disk? It's clear to me that the automatic set sorting of X is beneficial for this. But it's not clear about the sorting of the chunks.

@raj2018 Any Reply posted to a Question's thread will put the thread at the head of the Recents queue, and thus anyone who pays attention to that will notice that there's a new Reply.

@student_md Looking at the inset integral formulas in your Question, they all essentially say this: "The symbolic integral of a product of 3 matrices and vectors equals that exact same product with a matrix of numeric constants thrown in the middle. The matrix of constants could be either the 2nd or the 3rd factor in the product." That doesn't make sense to me.

What are P(1) and P(2)?

@jrive I think that you meant to say that you disliked the position dependency of op, not that of indets, which is precisely the "master command" (within a family of commands) that allows you to avoid position dependency.

Anyway,, again I'm impressed that at this early stage in your Maple career you already realize some of the potential problems of position dependency. You may not realize this yet: The positions of many things can change from session to session. This makes position dependency much more of a problem than you otherwise realized. 

My most-common reaction to a parametric solution is "I don't want to see that much detail, although I do appreciate that it's there, and I certainly don't want to see a piecewise expression that's many screens wide." Filtering the output is tough work though, and it'd be great to have a subpackage to SolveTools for that. 

Now, I hope no-one takes that comment the wrong way, because the mathematical computation behind this is absolutely astounding, and the Maple code appears well written, although I've just skimmed it. It's in package RegularChains, which contains thousands of procedures (when you include the locals).

@nm I'm so sorry, change name to algebraic. I've been coding directly from my mind to my phone, with no Maple in between, the past few days because I'm on a long-distance household-moving project and getting very little sleep to boot. 

If you're syntax checking initial conditions from user input, you should check that they don't contain the independent variable (which would be nonsense IMO). Thinking about that is why I had name on my mind.

If you display your worksheet inline here, there's a good chance that I could answer your question immediately from my phone. I'm traveling at the moment, and so I can't load your linked worksheet into Maple to view it.

@emendes I have no question about either the syntax or semantics of @, so there's not much point in you making any major accuracy test of it. For any f, g, and x (even if they're sequences), (f@g)(x) = f(g(x)) and (f@g)~(x) = (f~@g~)(x). (In both cases, that's identical equality, not just mathematical equality.) The only question that I have is whether either of the forms on the left sides of those two are more efficient than the corresponding right sides, and whether that may depend on whether or g are built-in. 

Regarding the rational functions: Yes, that's exactly what I meant.

@Carl Love My Reply immediately above has been significantly updated, with very important details. I only added stuff without altering its original content. So, I'm just posting this to bump this thread up in the Recent queue.

1 2 3 4 5 6 7 Last Page 1 of 556