izhammulya

45 Reputation

4 Badges

0 years, 200 days

MaplePrimes Activity


These are questions asked by izhammulya

Dear all,
I found error something like this
"Error, (in Optimization:-LPSolve) maximal depth, 263, of branch and bound search is too small; use depthlimit option to increase depth"

How to use depthlimit option?
Could anyone give an example?
Thank you.

 

Dear all,

How to draw graph when the matrix and the position is given in cartesius coordinate?
For example, I have this matrix and the following coordinate

Matrix(9, 9, [[0, 0, 1, 0, 1, 1, 1, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0]])

#Coordinate
[40, 40], [22, 22], [36, 26], [21, 45], [45, 35], [55, 20], [55, 45], [26, 59], [55, 65]

For sure, we can use Graph package
GT := GraphTheory;
G := GT:-Graph(X);
GT:-DrawGraph(G):
How to assign the coordinate such that I get the result of drawing in cartesius ?

Thank you anyway

Dear All,
Perhaps my question is basic question, but I want to know more about LPSolve
Is it possible to join 2 solutions from different LPSolve?

For example, I have 2 solutions,
Sol[1] := [72.011122301, [t[4] = -.500000000000000, t[13] = .500000000000000, x[1, 4] = 1, x[1, 13] = 0, x[4, 1] = 0, x[4, 13] = 1, x[13, 1] = 1, x[13, 4] = 0]];
Sol[2] := [53.128387340, [t[6] = -2.00000000000000, t[7] = 0., t[8] = -.999999999999999, x[1, 6] = 1, x[1, 7] = 0, x[1, 8] = 0, x[6, 1] = 0, x[6, 7] = 0, x[6, 8] = 1, x[7, 1] = 1, x[7, 6] = 0, x[7, 8] = 0, x[8, 1] = 0, x[8, 6] = 0, x[8, 7] = 1]].

What I want to achieve is following:

(1) eliminating t variable and join those solution (all values of x). Thus, I got [ x[1, 4] = 1, x[1, 13] = 0, x[4, 1] = 0, x[4, 13] = 1, x[13, 1] = 1, x[13, 4] = 0,x[1, 6] = 1, x[1, 7] = 0, x[1, 8] = 0, x[6, 1] = 0, x[6, 7] = 0, x[6, 8] = 1, x[7, 1] = 1, x[7, 6] = 0, x[7, 8] = 0, x[8, 1] = 0, x[8, 6] = 0, x[8, 7] = 1]].
(2) Extracting the value of X. I know that sol[1][2] indicates the values of right hand side. But I want to get the value of each of x in sequence.
for example: I can get x[1,2]=1, x[1,8]=0, x[7,1]=0 and so on.
In this case, Maybe I can use
eval(x[1,8],sol[1]) for specific x.
But is there any nice way to get all values of x with some procedures?
 

Thanks for reading

 

Now I have new question

Is it possible to combine more than 1 list array? Like the following example

given A:= [1,5,7]

B:[23,56,12]

C:=[1,3]

Then I have

[1,56,1]

[5,12,3]

[7,23,1] and so on.

I have tried to use combinate. But I still have problem

Dear all,

Does anyone know how to do this case?

For example, given a sets A={20,15,10,30,46,78}. Then I put the upper bound = 50
I want to add the elements and stop adding before reaching or exceed the upperbound. So, what I want to achieve is

B={20,15,10} since 20+15+10 +30 = 75. Stop in 4th element.

Thank you

 

1 2 Page 1 of 2