Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 338 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

ComplementaryIndices does the same work as ListEqn, so I think it is better (and easier to maintain.) If it looks long, you can replace it with something shorter, for example,

c:=LinearAlgebra:-ComplementaryIndices:

and then use it as Utot[c(Elim,NbNode)], for example,

ListEqn only looks shorter in this 4 lines of code, but it requires 2 rather long lines of definitions, which you can avoid using ComplementaryIndices. Or use ComplementaryIndices defining ListEqn as

ListEqn:=LinearAlgebra:-ComplementaryIndices(Elim,NbNode);

                       ListEqn := [1, 3, 5, 6]

Alec

ComplementaryIndices does the same work as ListEqn, so I think it is better (and easier to maintain.) If it looks long, you can replace it with something shorter, for example,

c:=LinearAlgebra:-ComplementaryIndices:

and then use it as Utot[c(Elim,NbNode)], for example,

ListEqn only looks shorter in this 4 lines of code, but it requires 2 rather long lines of definitions, which you can avoid using ComplementaryIndices. Or use ComplementaryIndices defining ListEqn as

ListEqn:=LinearAlgebra:-ComplementaryIndices(Elim,NbNode);

                       ListEqn := [1, 3, 5, 6]

Alec

Don't be ashamed. I didn't intend to offend you. Just made a few suggestions of better learning strategies.

Alec

Don't be ashamed. I didn't intend to offend you. Just made a few suggestions of better learning strategies.

Alec

The for-loop can be done by adding numbers to the objects - for example, A1, B1, etc. for the first case, A2, B2 for the second case etc. and do something like

for i to 4 do 
cat(A,i):= something;
cat(B,i):= something else;
...
od;

A better way is to include all your calculations in a procedure, or a module, and then call that procedure, or that module with different values of arguments.

Alec

The for-loop can be done by adding numbers to the objects - for example, A1, B1, etc. for the first case, A2, B2 for the second case etc. and do something like

for i to 4 do 
cat(A,i):= something;
cat(B,i):= something else;
...
od;

A better way is to include all your calculations in a procedure, or a module, and then call that procedure, or that module with different values of arguments.

Alec

I'm married.

Alec

Quadratic integer programming is also NP. Nevertheless, as far as I understand, they don't actually need the optimal solution - the model used is only an approximation anyway (predicted, which can be rather far from real situation, especially in the future) - what they actually want to have is the large enough range of solutions which are not too bad, to minimize the risk of investment. It seems to be even more important than to maximize the profit.

Actually, both parts are important. What I am saying is that comparing 2 cases - one with a high profit, but such that changing one or 2 of variables a little bit would bring a big loss instead, and another one - with, say, only a half profit of the first case, but such that changing several variables a little bit would give a little bit smaller, but about the same profit - the second case is definitely preferable. That doesn't seem to have been researched enough.

Alec 

Quadratic integer programming is also NP. Nevertheless, as far as I understand, they don't actually need the optimal solution - the model used is only an approximation anyway (predicted, which can be rather far from real situation, especially in the future) - what they actually want to have is the large enough range of solutions which are not too bad, to minimize the risk of investment. It seems to be even more important than to maximize the profit.

Actually, both parts are important. What I am saying is that comparing 2 cases - one with a high profit, but such that changing one or 2 of variables a little bit would bring a big loss instead, and another one - with, say, only a half profit of the first case, but such that changing several variables a little bit would give a little bit smaller, but about the same profit - the second case is definitely preferable. That doesn't seem to have been researched enough.

Alec 

Alejandro,

Assuming that you have python(x,y) installed, you can see how it is done there by starting pydee (it's in the second line, below Applications) with options --pylab --scipy. Then enter any plot command in the interactive console, for example,

plot([1,2,3])

and you'll see the plot at the l.h.s. It has a pan-zoom button (looking like a plus sign). Clicking it (that makes a mouse pointer look like a plus sign, too), moving a mouse pointer over the plot and then holding the right mouse button and moving the mouse to the rhs, you'll get zooming in exactly the way you wanted - only along the x-axis. Moving it up would do zooming only along the y-axis, and moving it diagonally would do a proportional zooming. So one can choose the version that he or she likes.

I deleted messages from my mail and couldn't find a link to the newsgroup archive on the web. Anyway, it was something about future enhancements, so it is not directly related to the topic in this thread.

Alec

Alejandro,

Assuming that you have python(x,y) installed, you can see how it is done there by starting pydee (it's in the second line, below Applications) with options --pylab --scipy. Then enter any plot command in the interactive console, for example,

plot([1,2,3])

and you'll see the plot at the l.h.s. It has a pan-zoom button (looking like a plus sign). Clicking it (that makes a mouse pointer look like a plus sign, too), moving a mouse pointer over the plot and then holding the right mouse button and moving the mouse to the rhs, you'll get zooming in exactly the way you wanted - only along the x-axis. Moving it up would do zooming only along the y-axis, and moving it diagonally would do a proportional zooming. So one can choose the version that he or she likes.

I deleted messages from my mail and couldn't find a link to the newsgroup archive on the web. Anyway, it was something about future enhancements, so it is not directly related to the topic in this thread.

Alec

But it is not what most people want. Most people want zooming proportionally - if x-interval is decreasing, decrease the y-interval, too. There were some discussions about that on the matplotlib mailing list not that long time ago.

Alec

But it is not what most people want. Most people want zooming proportionally - if x-interval is decreasing, decrease the y-interval, too. There were some discussions about that on the matplotlib mailing list not that long time ago.

Alec

If you search Google for integer quadratic programming software, it is easy to find several lists of links. In particular, NEOS list.

If I need something like that for myself, I usually end up writing my own programs (in assembly and C++ earlier, and in C# and Python recently.)

Alec

If you search Google for integer quadratic programming software, it is easy to find several lists of links. In particular, NEOS list.

If I need something like that for myself, I usually end up writing my own programs (in assembly and C++ earlier, and in C# and Python recently.)

Alec

First 54 55 56 57 58 59 60 Last Page 56 of 180