Items tagged with optimization

Feed
Also available: optimization

sys1:=-.736349402144656384 = -1.332282598*10^12*(-.99999999999999966)^po1-1.332282598*10^12*(-.99999999999999966)^po2-.735533633151605248*Resid;

sys2:=.326676717828940144 = 1.331567176*10^12*(-.99999999999999966)^po1+1.331567176*10^12*(-.99999999999999966)^po2+.325144093024965720*Resid;

sys3:=.590327283775080036 = -1.072184073*10^9*(-.99999999999999966)^po1-1.072184073*10^9*(-.99999999999999966)^po2+.589610307487437146*Resid;

Minimize(sys1, {sys2,sys3},assume = nonnegative);

complex value encountered;

I am trying to prove the equation of the least square estimator. For example, I have: 

X := Matrix(2,3,symbol=p)

Y:= Matrix(2,1,symbol=f)

b:= Matrix(2,1,symbol=n)

or Y=X.b

The known estimation of b results from the minimization of the objective function: 

S:=Transpose(X.b-Y).(X.b-Y).

We take the derivative of the above expression and set it equals with zero. 

Then the estimator is: b=MatrixInverse(Transpose(X).X).Transpose(X).Y

How can I get this expression using commands οn maple?

My final task is to change the objective function to see the different estimations. For example if I have the below objective function which is the results of estimation as equation:

S:=Transpose(X.b-Y).MatrixInverse(C).(X.b-Y)

where C:=Matrix(2,2,symbol=w)

Ofcorsse I know the answer, but I am not sure for more complicated objective functions.

 

 

 

 

Hi everyone,

I have a strange problem with the LSSolve function. I get an error when specifying an optimality tolerance as an option for LSSolve function : "unexpected parameters: optimalitytolerance = 1/1000" (see attached). When I remove the option, the LSSolve function works and returns something. Why ?

This is a problem for me because in my program I automatically generate lots of equations and I need to solve them using the same parameters.  "list1" is an example of a list that makes LSSolve to return an error and therefore it makes my program stop.
Is it possible, when LSSolve returns an Error, to re-run the function without the optimalitytolerance option ?
 

with(Optimization):

[0.127345646906885e-1-0.186555124779203e-2*D32-0.282637107183903e-3*D33, -0.427981372479296e-2+0.184372031092059e-1*D32+0.366060535331614e-2*D33, -0.279056870350439e-1+0.497068050546578e-1*D32+0.300683751452398e-1*D33, -0.159123153512316e-1-0.200310190531632e-2*D32+0.110642730744851e-1*D33, -0.358677392345135e-2-0.477282036776905e-2*D32+0.279495051520868e-2*D33, -.158025406913808+.301050727553470*D32+0.991309483578555e-1*D33, -0.767170565747362e-1+0.287589092672543e-1*D32+0.380554240544922e-1*D33, 0.134025593814442e-1-0.163134747085529e-1*D32-0.978424817965354e-2*D33, 0.177936771272063e-1-0.193555892719151e-1*D32-0.117324484775754e-1*D33, .136323651819599-.101383912457110*D32-0.800923073293239e-1*D33, 0.658540765374620e-1-.134530865070270*D32-0.449966493124888e-1*D33, 0.366589441985546e-1-0.923517762126252e-1*D32-0.313964041159186e-1*D33, 0.200320004853408e-2-0.454710553314498e-2*D32-0.121523285055995e-2*D33, 0.362766049610844e-2-0.103494064252009e-1*D32-0.347855768021822e-2*D33, 0.431461474510905e-2-0.122762710681104e-1*D32+0.305664301894285e-3*D33]

(1)

LSSolve(list1, [0 <= D32, 0 <= D33], optimalitytolerance = 10^(-3))

Error, (in Optimization:-LSSolve) unexpected parameters: optimalitytolerance = 1/1000

 

``

``

 

 

worksheet_help.mw



Thanks in advance,
Lilian

Hi everyone,

I am desperatly trying to find a reason to those weird results I get using LSSolve. It could really help me to understand, maybe I am using the function the wrong way.
I have a system of equations which is overdetermined that I wrote using an electrical simulation and kirchoff's laws.
I am trying to resolve it using the LSSolve function. Here is the list of residuals :

list := [-0.444299277411586e-2+(270.100000000000-Phi12_18)*D18, -.264819908561346+(627.030000000000-Phi23_18)*D18, .191242220011840+(-259.080000000000-Phi34_18)*D18, 0.269723795794403e-1+(-40.5060000000000-Phi45_18)*D18, 0.674200455699644e-2+(-10.1270000000000-Phi56_18)*D18, .109534122562258+(-197.290000000000-Phi67_18)*D18, 0.481462872723211e-3+(-2.41420000000000-Phi78_18)*D18, -0.346014532189641e-4+(-2.53290000000000-Phi89_18)*D18, -0.402474969346295e-4+(-2.94150000000000-Phi910_18)*D18, -0.632005430249463e-3+(-8.57100000000000-Phi1011_18)*D18, -0.105749265697549e-1+(-37.6580000000000-Phi1112_18)*D18, -0.116305497595306e-1+(-55.3250000000000-Phi1213_18)*D18, -0.581547498854927e-3+(-2.76630000000000-Phi1314_18)*D18, -0.371408130367776e-2+(-22.0900000000000-Phi1415_18)*D18, -0.886173700610320e-2+(-56.4810000000000-Phi1516_18)*D18, -0.478846208996643e-1+(262.447651185421-Phi12_18)*D29+(262.447651185421-Phi12_24)*D36, .348429199898355+(62.3165310883292-Phi23_18)*D29+(62.3165310883292-Phi23_24)*D36, .237294781239637+(41.8563477700905-Phi34_18)*D29+(41.8563477700905-Phi34_24)*D36, 0.356987380524040e-1+(6.12136413036823-Phi45_18)*D29+(6.12136413036823-Phi45_24)*D36, 0.892515544035472e-2+(1.53042068810978-Phi56_18)*D29+(1.53042068810978-Phi56_24)*D36, .163733792213247+(26.7554245920538-Phi67_18)*D29+(26.7554245920538-Phi67_24)*D36, 0.917897899527287e-3+(-0.110562085900856e-3-Phi78_18)*D29+(-0.110562085900856e-3-Phi78_24)*D36, 0.242480164562623e-4+(-.283316330467957-Phi89_18)*D29+(-.283316330467957-Phi89_24)*D36, 0.281967728090880e-4+(-.329007391842407-Phi910_18)*D29+(-.329007391842407-Phi910_24)*D36, -0.812318100863302e-3+(-1.22850243118112-Phi1011_18)*D29+(-1.22850243118112-Phi1011_24)*D36, -0.174002698946928e-1+(-9.57006175329410-Phi1112_18)*D29+(-9.57006175329410-Phi1112_24)*D36, -.125540933056649+(-44.2197489328973-Phi1213_18)*D29+(-44.2197489328973-Phi1213_24)*D36, -0.627722694977691e-2+(-2.21106159188713-Phi1314_18)*D29+(-2.21106159188713-Phi1314_24)*D36, -0.739424545575381e-1+(-24.8403831529913-Phi1415_18)*D29+(-24.8403831529913-Phi1415_24)*D36, -.203976357415920+(-68.0132712014090-Phi1516_18)*D29+(-68.0132712014090-Phi1516_24)*D36, 0.196522429267177e-1+(197.940000000000-Phi12_24)*D27, 0.368371276889244e-2+(57.8900000000000-Phi23_24)*D27, 0.144256702539785e-2+(48.4450000000000-Phi34_24)*D27, -0.115630146715321e-3+(10.-Phi45_24)*D27, -0.283028527731083e-4+(2.50010000000000-Phi56_24)*D27, -0.300476205822746e-2+(66.2640000000000-Phi67_24)*D27, -0.653509876948917e-3+(2.69040000000000-Phi78_24)*D27, -0.126753046978926e-2+(4.44790000000000-Phi89_24)*D27, -0.147212636486122e-2+(5.16530000000000-Phi910_24)*D27, -0.484316181019253e-2+(16.6000000000000-Phi1011_24)*D27, -0.298854531528585e-1+(96.8770000000000-Phi1112_24)*D27, -.120604432493978+(315.410000000000-Phi1213_24)*D27, -0.603334119632106e-2+(15.7700000000000-Phi1314_24)*D27, -0.664471982996522e-1+(167.170000000000-Phi1415_24)*D27, 0.786913003105101e-1+(-326.760000000000-Phi1516_24)*D27]


I know that all D values must be positive. When resolving the system without any constraints (D >= 0), i get the values I expected (knowing the input I used in the simulation), with a really low error :

result := LSSolve(list);

[1.82130325886306*10^(-8), [D10 = 0.200009334740825e-2, D11 = 0.666620509302803e-3, D14 = 0.222215208246154e-2, D15 = 0.128202791383597e-2, D17 = 0.499886140344411e-2, D19 = 0.302925526676043e-3, D2 = 0.100002349341980e-2, D20 = 0.142849446596938e-3, D22 = 0.111121127122156e-1, D23 = 0.222228054119820e-2, D25 = 0.714293621502836e-3, D26 = 0.833326349912537e-3, D28 = 0.217396531719902e-3, D3 = 0.400217567900069e-3, D6 = 0.166878862202449e-3, D7 = 0.999969828547956e-2, Phi1011_17 = -1.22850243118112, Phi1011_19 = -20.5335193736012, Phi1011_21 = -104.090964313150, Phi1011_23 = 19.2144499395683, Phi1112_17 = -9.57006175329410, Phi1112_19 = -81.6848630234903, Phi1112_21 = -242.149849175388, Phi1112_23 = 109.001351349915, Phi1213_17 = -44.2197489328973, Phi1213_19 = -92.8267195929548, Phi1213_21 = -204.444165890808, Phi1213_23 = -61.4447612788985, Phi12_17 = 262.447651185421, Phi12_19 = 262.149192406679, Phi12_21 = 256.248405276737, Phi12_23 = 246.521172863223, Phi1314_17 = -2.21106159188713, Phi1314_19 = -4.64255435896474, Phi1314_21 = -10.2212158757032, Phi1314_23 = -3.07798400495386, Phi1415_17 = -24.8403831529913, Phi1415_19 = -30.5944507718603, Phi1415_21 = -45.5847025259923, Phi1415_23 = -77.3297680041818, Phi1516_17 = -68.0132712014090, Phi1516_19 = -74.2023324471993, Phi1516_21 = -95.1952296374558, Phi1516_23 = -132.328467080565, Phi23_17 = 62.3165310883292, Phi23_19 = 200.804225452845, Phi23_21 = 130.018791598707, Phi23_23 = 73.7043262431720, Phi34_17 = 41.8563477700905, Phi34_19 = 343.409987932231, Phi34_21 = 159.593996060841, Phi34_23 = 62.6564757702407, Phi45_17 = 6.12136413036823, Phi45_19 = 12.3839171939746, Phi45_21 = 46.0005281797016, Phi45_23 = 13.1665796516893, Phi56_17 = 1.53042068810978, Phi56_19 = 3.16614687399595, Phi56_21 = 11.4998114891963, Phi56_23 = 3.29093394692614, Phi67_17 = 26.7554245920538, Phi67_19 = -244.288977944524, Phi67_21 = 376.351493538080, Phi67_23 = 88.4830465193635, Phi78_17 = -0.110562085900856e-3, Phi78_19 = -6.28061380389266, Phi78_21 = 43.7035845962372, Phi78_23 = 3.35123473697264, Phi89_17 = -.283316330467957, Phi89_19 = -6.18811507913178, Phi89_21 = -13.9258224376815, Phi89_23 = 5.20325572546379, Phi910_17 = -.329007391842407, Phi910_19 = -7.18580970783931, Phi910_21 = -16.1669897128450, Phi910_23 = 6.04291224185087]]


When adding the constraints that D should be positive (and that are actually positive in the previous result), I get a worse result in term of precisions :

LSSolve(list, {D10 >= 0, D11 >= 0, D14 >= 0, D15 >= 0, D17 >= 0, D19 >= 0, D2 >= 0, D20 >= 0, D22 >= 0, D23 >= 0, D25 >= 0, D26 >= 0, D28 >= 0, D3 >= 0, D6 >= 0, D7 >= 0});

[0.667302976414869964e-1, [D10 = 0.240199442379079e-2, D11 = 0.666577572133538e-3, D14 = 0.222218786790062e-2, D15 = 0.128192441757651e-2, D17 = 0.278678889056743e-2, D19 = 0.200473317719685e-3, D2 = 0.109938538155804e-2, D20 = 0.840721762649974e-4, D22 = 0.685770482726534e-3, D23 = -1.387530857*10^(-312), D25 = 0.714397733627028e-3, D26 = 0.833201232339238e-3, D28 = 0.204319731851617e-3, D3 = 0.419994015872111e-3, D6 = 0.191996909862889e-3, D7 = 0.103884505319047e-1, Phi1011_17 = -.709707335593168, Phi1011_19 = -15.7863975896827, Phi1011_21 = -151.171843708558, Phi1011_23 = 19.2211409030343, Phi1112_17 = -8.90604676283968, Phi1112_19 = -75.8627539382983, Phi1112_21 = -311.423930967299, Phi1112_23 = 109.002880650927, Phi1213_17 = -54.9212365194647, Phi1213_19 = -89.9790565093006, Phi1213_21 = -250.971671756001, Phi1213_23 = -61.5160003335629, Phi12_17 = 251.480872515883, Phi12_19 = 255.977573006508, Phi12_21 = 254.397100891354, Phi12_23 = 246.524672366158, Phi1314_17 = -2.74614386328796, Phi1314_19 = -4.48401822538664, Phi1314_21 = -12.5381572344771, Phi1314_23 = -3.08154491280567, Phi1415_17 = -31.8947514252141, Phi1415_19 = -30.8090400512349, Phi1415_21 = -51.0499196769535, Phi1415_23 = -77.3268969229600, Phi1516_17 = -87.7947790488482, Phi1516_19 = -75.5403005246575, Phi1516_21 = -101.763771364478, Phi1516_23 = -132.314524393221, Phi23_17 = 94.0093590848714, Phi23_19 = 86.4429757025976, Phi23_21 = 108.554765004168, Phi23_23 = 73.7072279431268, Phi34_17 = 87.6938924370977, Phi34_19 = 82.3922347753764, Phi34_21 = 88.5582078636840, Phi34_23 = 62.6604078051191, Phi45_17 = 13.1910198060107, Phi45_19 = 69.3008595136787, Phi45_21 = 15.5530983566712, Phi45_23 = 13.1677681559684, Phi56_17 = 3.29792072169498, Phi56_19 = 17.4003349272078, Phi56_21 = 3.88187632917493, Phi56_23 = 3.29123115133383, Phi67_17 = 60.0045707036166, Phi67_19 = 54.3070868626015, Phi67_21 = 87.9421288802858, Phi67_23 = 88.4929920125095, Phi78_17 = .279952186311827, Phi78_19 = -3.50632712699693, Phi78_21 = -20.3872167203319, Phi78_23 = 3.35213748642018, Phi89_17 = -0.991299169828910e-1, Phi89_19 = -4.44636683843093, Phi89_21 = 297.888811926331, Phi89_23 = 5.20500671661437, Phi910_17 = -.115101700555720, Phi910_19 = -5.16603761776826, Phi910_21 = 346.033351291632, Phi910_23 = 6.04494564310825]]

I also get the warning "limiting number of major iterations has been reached".
Can someone explain me?

It may not seem important at first sight, but sometimes when using my program I get wrong values and a negative D, which is not possible. Therefore I try to add a positive constraint, but the LLSolve function doesn't return anything except the error "no improved point could be found", which is weird because when I manually substitute the value I consider correct, i get a really low error. I can show you the related list of equations if you are interested...

 

Thanks in advance,

Lilian

restart;
res := dsolve({25*(diff(y(t), t, t))+4*(diff(y(t), t))-3*y(t) = cos(3*t), y(0) = 0, (D(y))(0) = 1}, numeric, method = rkf45);
with(Optimization);
Maximize(res, t = 0 .. 4);
 

Hi,

Although everyone one might know, but still I want to clarify the concept of Sensitivity analysis. Suppose we have an objective function Z in which we have two variables X & Y and two parameters a and b. So in sensitivity analysis, we systematically change the values of parameters ( for eg. changing value of "a" by 20%, then 40%, then 60%, similiarly for parameter "b"). At a time, we only change the value of one parameter and the values of other parameters remain fixed to their original value. Then we would again solve the model ( ie. objective function Z) and calculate the new values of objective function and variables.  Then we try to see the impact of parameter change on the value of objective function Z and on variables X & Y.

The formula for sensitivity analysis for parameter a is  for objective function Z =

 (new values of objective function  - old value of objective function)*100 / (old value of objective function)

Here new value of objective function Z denotes when we use changed value of paramter a (keeping other parameter values fixed to their original value) and old value of objective function denotes value of Z with all parameters (including parameter a) at their original value

Although I can do it by a for loop but it is not an efficient procedure and also time consuming. Can anybody suggest whether any package suitable for sensitivity analysis is available in maple.

Thanks for your attentive reading of problem.

Thanks and Regards,

Nilesh

 

Hi,

I have two objective function which I want to prove concave with respect to four independent variables jointly (simultaneously).

`TP1 is the first objective function which is defined  in sol1 equation. TP2 is the second objective function which is defined  in sol3 equation. I want to maximize both function. There are four decision variables (independent variables) in both the objective function expression- T,E,W,p. Ten  parameters used in both the equations are- alpha, beta, c, h, m, o, s, u, a, b.

1) My first question is - How can I prove both the function as a concave function with respect to four decision variables jointly. Can I specify some range of parameters in which both these function would behave like a concave function. The feasible range of these parameters are-

`[alpha>0, 0<= beta<1, c>0, h>0, 0<= m<=1, o>0, s>0, u>0, a>0] [ b>0 for objective function TP1 and b>1 for objective function TP2].

Some other restriction on parameters and variables are-  p>c  ,  T<=m , T>=0, E>=0, W>=0, W>=E.

2) My second question is if I simplify my first question and specify some specific values of parameters as I done for both objective function, then I got two new objective function in sol2 and sol4 equation. Now can I prove these two objective function (sol2 & sol4) as concave with respect to four decision variables T,E,W,p jointly. I want to prove concavity for these two objective function because if it is proved concave then The first order optimality solution would give me the global optimal solution. 

Maple worksheet is enclosed.

concavity_proof_question.mw

Thanks and Regards,

Nilesh

Hi

I have two equations as follows:

The goal is finding the parameter 'phi'. This parameter is a positive real numeric constant.

I uploaded two files that they are included two methods to solve the problem.

1.mw

2.mw

Is method in the first file mathematically logical? If it is a correct method, why the command fsolve dosent work?

In file 2, we have 2 equations with further indeterminantes. The constant 'phi' must be minimum possible amount. How we can use the commands like the Minimize in Optimization? Please hint me.

Moreover, if there is a method to solve this problem please help me to know.

Thank you very much 

 

 

Let be the number z so that |z+3-2*I| + |z-3-8*I| = 6*sqrt(2). Find min and max of the modulus of z. How can I find min and max of modulus of z with Maple.

Thank for your help!

I posted my question at here https://math.stackexchange.com/questions/2314488/how-can-i-find-maximum-and-minimum-modulus-of-a-complex-number.
With Mathematica, I got min is 22/5. This result is different from my solution by hand.

Repeat my problem. Let be the number z so that $|z+1| + 4|z-1| = 25$. Find the greastest and the least of the modulus of $z$. How can I find greastest and the least of modulus of z with Maple.

i have an optimization problem, i want to maximize an expression using assumption, what should i do?


 

restart:with(Optimization):

M1:=Matrix((1,4),[sqrt(p),0,0,sqrt(1-p)]);

M1 := Matrix(1, 4, {(1, 1) = p^(1/2), (1, 2) = 0, (1, 3) = 0, (1, 4) = (1-p)^(1/2)})

(1)

M2:=Matrix((1,4),[cos(theta[1])*cos(theta[2]),exp(I*phi[1])*sin(theta[1])*cos(theta[2]),exp(I*phi[2])*sin(theta[2])*cos(theta[1]),exp(I*(phi[1]+phi[2]))*sin(theta[1])*sin(theta[2])])^+;

M2 := Matrix(4, 1, {(1, 1) = cos(theta[1])*cos(theta[2]), (2, 1) = exp(I*phi[1])*sin(theta[1])*cos(theta[2]), (3, 1) = exp(I*phi[2])*sin(theta[2])*cos(theta[1]), (4, 1) = exp(I*(phi[1]+phi[2]))*sin(theta[1])*sin(theta[2])})

(2)

#Real:=rhs(op(op(2,Re(M1.M2))));

PP:=Re(M1.M2)(1,1);

Re(p^(1/2)*cos(theta[1])*cos(theta[2])+(1-p)^(1/2)*exp(I*(phi[1]+phi[2]))*sin(theta[1])*sin(theta[2]))

(3)

maximize(PP) assuming 0<p ,p<1;

Error, (in assuming) when calling 'maximize'. Received: 'invalid input: `minimize/continuous` expects its 2nd argument, yFP, to be of type {name, list(name)}, but received `theta[1]` = -infinity'

 

 


 

Download optimize.mw

   It’s that time of year again for the University of Waterloo’s Submarine Racing Team – international competitions for their WatSub are set to soon begin. With a new submarine design in place, they’re getting ready to suit up, dive in, and race against university teams from around the world.

 

   The WatSub team has come a long way from its roots in a 2014 engineering project. Growing to over 100 members, students have designed and redesigned their submarine in efforts to shave time off their race numbers while maintaining the required safety and performance standards. Their submarine – “Bolt,” as it’s named – was officially unveiled for the 2017 season on Thursday, June 1st.

 

 

   As the WatSub team says, "Everything is simple, until you go underwater."

 

 

    Designing a working submarine is no easy task, and that’s before you even think about all the details involved. Bolt needs to accommodate a pilot, be transported around the world, and cut through the water with speed, to name a few of the requirements if the WatSub team is to be a serious competitor.

 

    To help squeeze even more performance out of their design, the team has been using Maple to fine tune and optimize some of their most important structural components. At Maplesoft, we’ve been excited to maintain our sponsorship of the WatSub team as they continue to find new ways to push Bolt’s performance even further.

 

 

   The 2017 design unveiling on June 1st. After adding decals and final touches, Bolt will soon be ready to race.

 

   This year, the WatSub team has given their sub a whole new design, machining new body parts, optimizing the weight distribution of their gearbox, and installing a redesigned propeller system. Using Maple, they could go deep into design trade-offs early, and come away knowing the optimal gearbox design for their submarine.

 

   In just over a month, the WatSub team will take Bolt across the pond and compete in the European International Submarine Races (eISR). Many teams competing have been in existence for well over a decade, but the leaps and strides taken by the WatSub team have made them a serious competitor for this year.

  Best of luck to the WatSub team and their submarine, Bolt – we’re all rooting for you!

Experts.

I'm trying to solve a Truck Routing Problem. I set in up in Maple and Excel, but I get a smaller minimum in the spreadsheet, than in Maple. Its like as if I havn't generated enough possible routes, even though i feel i've done an exaustive search. I realise the distance matrix violates the triangle inequality.  Any suggestions....

TRP_14x3.mw

Sirs.

Probably a brain fade, but I cant seem to code what i want.

constraints.mw
 

Tour2:=[[[1, 2, 3, 4]], [[1, 2], [1, 3, 4]], [[1, 3], [1, 2, 4]], [[1, 4], [1, 2, 3]], [[1, 2], [1, 3], [1, 4]]];M:=nops(Tour2):

[[[1, 2, 3, 4]], [[1, 2], [1, 3, 4]], [[1, 3], [1, 2, 4]], [[1, 4], [1, 2, 3]], [[1, 2], [1, 3], [1, 4]]]

(1)

interface(rtablesize=M):
  maxEnt:=max([seq(nops(Tour2[i]),i=1..M)]):
  Tours_Distances := Matrix
                     ( maxEnt,
                       M,
                       [ seq
                         ( [ seq
                             ( `if`( numelems(Tour2[i])>=j,
                                     d[i]*x[op(Tour2[i,j])]<=K,
                                    0
                                   ),
                               i=1..M
                             )
                           ],
                           j=1..maxEnt
                         )
                       ]
                     );

Tours_Distances := Matrix(3, 5, {(1, 1) = d[1]*x[1, 2, 3, 4] <= K, (1, 2) = d[2]*x[1, 2] <= K, (1, 3) = d[3]*x[1, 3] <= K, (1, 4) = d[4]*x[1, 4] <= K, (1, 5) = d[5]*x[1, 2] <= K, (2, 1) = 0, (2, 2) = d[2]*x[1, 3, 4] <= K, (2, 3) = d[3]*x[1, 2, 4] <= K, (2, 4) = d[4]*x[1, 2, 3] <= K, (2, 5) = d[5]*x[1, 3] <= K, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0, (3, 4) = 0, (3, 5) = d[5]*x[1, 4] <= K})

(2)

convert( (2), 'list', 'nested' );

[[d[1]*x[1, 2, 3, 4] <= K, d[2]*x[1, 2] <= K, d[3]*x[1, 3] <= K, d[4]*x[1, 4] <= K, d[5]*x[1, 2] <= K], [0, d[2]*x[1, 3, 4] <= K, d[3]*x[1, 2, 4] <= K, d[4]*x[1, 2, 3] <= K, d[5]*x[1, 3] <= K], [0, 0, 0, 0, d[5]*x[1, 4] <= K]]

(3)

 

But what I want is:

d[1]*x[1,2]+d[2]*x[2,3]+d[3]*x[3,4]<=K,d[1]*x[1,2]<=K,d[1]*x[1,3]+d[3]*x[3,4]<=K;      #.....etc.

 

 

 

 

 

d[1]*x[1, 2]+d[2]*x[2, 3]+d[3]*x[3, 4] <= K, d[1]*x[1, 2] <= K, d[1]*x[1, 3]+d[3]*x[3, 4] <= K

(4)

NULL


 

Download constraints.mw

 

i use optimization package with constraint hello >= 0

Minimize(xx=0, {hello >= 0})

but solution only return the case when hello = 0

how about hello > 0?

i would like to find all possible set of solutions using this constraint

do i need to set upper bound, such as {hello <= 7, hello >=0}

can it return solution when hello = 1.1, 1.2, ...2, 2.1, 2.2, 2.3, ....7

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