## setting up constraints...

Sirs.

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

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)

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
)
]
);

 (2)

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

 (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.

 (4)

## Simplification of complex trigonometric equations...

Hello,

In the context of solving mechanical constraint equations, I often need to simplify trigonometric equation. In mathematica, the FullSimplify function makes the simplification I need. But, i'm using Maple for a long time and I would rather contnue my calculation with Mathematica.

May you see if so can help me to simplify this equation ?

Here the equation I would like to simplify with Maple :

TrigonometricEquation.mw

Here the result obtained with mathematica

résultatMma.pdf

Thanks a lot for your help

## Problem with range of plot...

Hi I'm not really sure how to phrase this but I'm doing projectile motion and I'm try to graph the solutions for v_0 by theta_0.

## Solving system with constraints ...

SYSTEMATIC APPROACH TO LIFTING EYE DESIGN

Moses

 Nomenclature Ab  = Required bearing area, sq in. (mm2) As  = Required shear area at hole, sq in. (mm2) Aw = Required cheek plate weld area, sq in. (mm2) b     = Distance from center of eye to the cross section, in. (mm) C    = Percentage distance of element from neutral axis D    = Diameter of lifting pin, in. (mm) e     = Distance between edge of cheek plate and edge of main plate, in. (mm) Fa   = Allowable normal stress, ksi (kN/mm2) Fv   = Allowable shear stress, ksi (kN/mm2) Fw  = Allowable shear stress for weld electrodes, ksi (kN/mm2) Fy   = Yield stress, ksi (kN/mm2) fa   =  Computed axial stress, ksi (kN/mm2) fb   =  Computed bending stress, ksi (kN/mm2) fmax = Maximum principal stress, ksi(kN/mm2) fv    = Computed shear stress, ksi (kN/mm2) g     = Distance between edge of cheek plate and main structure, in. (mm) h    = Length of lifting eye at any cross section between A-A and C-C, in. (mm) n   = Total number of lifting eyes used during the lift P  = Design load per lifting eye, kips (kN) R  = Radius to edge of lifting eye, in. (mm) Rh  = Radius of hole, in. (mm) r    = Radius of cheek plate, in. (mm) S   = Safety factor with respect to allowable stresses s  = Cheek plate weld size, in. (mm) T  = Total plate thickness, in. (mm) Tp  = Main plate thickness, in (mm) t    = Thickness of each cheek plate, in (mm) te  = Cheek plate weld throat, in. (mm) W  = Total lift weight of structure, kips (kN) α  =  Angle of taper, deg. β  =  Angle between vertical and lifting sling, deg. θ  =  Angle between attaching weldment and lifting sling, deg.

The design load for each lifting eye is given by:

 >
 >

In the above equation, n refers to number of lifting eyes to used for the lift, S is the safety factor with respect to allowable stresses, W is the total weight to be lifted, and β is the angle between the vertical direction and the lifting sling.This analysis applies only to lifting eyes shaped like the one in Fig. 1. For other shapes, the designer should re-evaluate the equations.

Radius of liftimg eye hole will depend upon the diameter of the pin, D, used in the lifting shackle. It is recommeded that the hole diameter not greater than 1 / 16 in. (2 mm) larger than tha pin diameter. The required bearing area for the pin is

 >

where Fy is the yield stress. This equation is based on allowable stresses as definde in Ref. 1, which considers stress concentrations in the vicinity of the hole. The designer may choose to use a technique which determines the stresses at the hole and should appropriately adjust the allowable stresses. The total plate thickness is then given by

 >

At this point, if the thickness, T, is too large to be economically feasible, it may be desirable to use cheek plates (Fig.2) around the hole in order to sustain the bearing stresses. In this case, the above thickness, T, is divided into a main plate of thickness Tp and two cheek plates each of thickness t:

 >

It is recommended that t be less than Tp to avoid excessive welding. The radius to the edge of lifting eye plate and the radii of the cheek plates, if they are used, are governed by the condition that the pin cannot shear through these plates. The required area for shear is

 >

It is possible to compute the required radii by equating the shaering area of the cheek plates plus the shearing area of the main plate to the total shear area. Theis a degree of uncertianty in choosing the appropriate shearing area. Minimum areas are used in the following equation, therefore, leading to conservative values for the radius of the main plate, R, and the radius of the cheek plate, r,

 >
 >

where Rh is the radius of the hole and e is the distance between the edge of the cheek plate and the edge of the main plate (Fig. 2). This difference should be large enough to allow space for welding the cheet plate to the main plate. A reasonable value for e is 1.5*t. It should be noted that the above equations assume there are two cheek plates. If cheek plates are not used, then simply let t equal zero and use Eq. 6 to determine R.

It is not necessary to check tension on this net section, since the allowable stress for shear is 0.4*Fy (Eq. 5); whereas the allowable stress for tension on a net section at a pin hole is given as 0.45*Fy (Ref. 1) which is greater than for shear. Size of weld between the cheek plates and the main plate can be determined as follows. The necessary weld area per cheek plate is

 >

where Fw is the allowable shear stress for the welding electrodes. The weld thickness, te is given by

 >

For a manual weld the size, s is given by

 >

To assure that this weld size is large enough to insure fusion and minimize distortion, it should be greater than the AISC suggested Minimum Fillet Weld Sizes (Ref. 1).

The axial stress due to uniform tension along a section is

 >

where h is the length of the section. The elemental bending stress which is distributed linearly along the section may be expressed as

 >

where C represents the distance of an element from the neutral axis and b is the distance from the center of the eye to the cross section. The shearing stress varies parabolically for section between A-A and B-B and is given as

 >

It is felt that Eq. 13 (i.e., parabolic shear stress distribution) is applicable to the cross sections between A-A and B-B and does not apply to the cross sections between B-B and C-C in the area of the taper. The taper creates discontinuities on the shear plane, which result in significantly large shear stress concentratons along the edge of the taper coincident to point of maximum bending stress. This problem will be addressed ina subsequent section of this article.

The maximum principal stress that exists on an element is given by

 >

or after dividing by the maximum allowable normal (i.e., tension) stress, Fa, gives a ratio that must be less than unity, where Fa has been taken as 0.6*Fy. A similar analysis for the maximum shear stress on the element yields

 >
 >
 >
 >
 >

The designer should now select several critical elements throughout the plate and apply the restrains of Eq. 16 and 17 to obtain a required minimum length for the selected cross section. Eq 18 through 21 apply for an element at the neutral axis of the section. C will be zero and Eq. 11, 13 and 16 reduce to

 >
 >

An element at the end of the section will be subjected to bending stresses but not shearing stresses.

For this case C = 0.5 and Eq. 16  becomes

 >

Using the quadratic formular to solve for h yields

 >

The largest value of h predicted by Eqs. 19, 21 and 23 can be used as a first estimate for the length of the cross section; however, intermediate elements, that is, between the edge and the center of the cross section, should also be checked to determine the appropriate length, h, of the section under consideration.

Cross sections A-A and B-B should be analyzed using the above approach. The designer should use his own discretion to select other cross sections for analysis.At cross section A-A, the lifting eye is assumed to be welded with complete penetration to the support structure. Once length, h, is determined, the angle of taper, α, should be investigated. It can be shown that normal stress and shear stress are related by

 >

Minimum required length, h, for cross sections between B-B and C-C can be computed by calculating the maximum shear stress for the most critical element of the cross section, which occurs at the tapered surface. It can be shown that the maximum principal stress would not control the required length, h. Using Eqs. 11 and 12 in conjunction with Eq 24, the maximum shear stress yields the following:

 >

If the above inequality is not satisfied, the angle of the taper, α, must be adjusted.

The adequacy of the structure to which the lifting eye is to be attached should be checked to verify that it is capable of sustaining the loads from the lifting eye.

In some instances, it may be justifiable to use a more sophisticated technique for analyzing the lifting eye as well as the supporting structure.

Input Variables

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >

 Output

Good Evening Everybody,

Could any one help me with the attached file. I'm trying to solve 9 equations with 9 unknowns with many constraints, I'm getting no output from Maple. Please help.

Regards,

Moses

## Simplification of trigonometric expression. IV...

Hello,

I have still some difficulties to conduct some specific trigonometric simplications but which are very common in mechanism study.

The equations are in the form :

sin(gamma0(t))*cos(beta0(t)) = -(sin(psi[1](t))*cos(theta[1](t))*cos(gamma[1](t))+sin(psi[1](t))*sin(theta[1](t))*sin(gamma[1](t))-cos(theta[1](t))*cos(psi[1](t))*sin(gamma[1](t))+cos(psi[1](t))*sin(theta[1](t))*cos(gamma[1](t)))*cos(beta[1](t))

I would like to obtain this equation after simplifications :

sin(gamma0(t))*cos(beta0(t)) = cos(beta[1](t))*sin(gamma[1](t)-theta[1](t)-psi[1](t))

I try to make a procedure to automatize the simplification of this kind of trigonometric equation.

Strangely, I noticed that the simplification is done only if there is a minus before the combine function. The simplification works but the result is wrong because i didn't obtain the good sign.

For you information, I try to make these simplifications with MMA and the FullSimplify function of MMA gives directly the expected result that is to say :

I'm sure that it shoud exist a good way to conduct this kind of simplications in Maple.

Can you help me to correct my procedure so to obtain the good result and be enough general, adaptative ?

Code here and attached in this post :

Initialisation
restart:
with(LinearAlgebra):
with(Student[MultivariateCalculus]):
with(plots):
with(MathML):
with(ListTools):
constants:= ({constants} minus {gamma})[]:
`evalf/gamma`:= proc() end proc:
`evalf/constant/gamma`:= proc() end proc:
unprotect(gamma);
Angular Constraint equations
eq_liaison:=sin(gamma0(t))*cos(beta0(t)) = -(sin(gamma[1](t))*sin(psi[1](t))*sin(theta[1](t))-sin(gamma[1](t))*cos(theta[1](t))*cos(psi[1](t))+cos(gamma[1](t))*sin(psi[1](t))*cos(theta[1](t))+cos(gamma[1](t))*cos(psi[1](t))*sin(theta[1](t)))*cos(beta[1](t));
Traitement
TrigoTransform2:= proc(Eq)
local S,S1,tt,pp,Eq2,ListVariables,ListVariablesMod,Subs,size,rhsEq2,lhsEq2;
#Construit une liste à plat#
ListVariables:=indets(Eq, function(identical(t)));
ListVariables:=[op(ListVariables)];
ListVariablesMod:=map(f->cat(op(0,f),_),ListVariables);
Subs:=ListVariables=~ListVariablesMod;
#Variables Changement#
Eq2:=Eq:
print("Equation traitée=",Eq2):
Eq2:=subs(Subs, Eq2);
print("Equation après subs=",Eq2):
#Trigonometric transformations#
lhsEq2:=applyrule([
cos(u::anything)*cos(v::anything)-sin(u::anything)*sin(v::anything)=cos(u+v),
cos(u::anything)*sin (v::anything)+sin(u::anything)*cos(v::anything)=sin(u+v),
sin(u::anything)*sin(v::anything)-cos(u::anything)*cos(v::anything)=-cos(u+v),
-sin(v::anything)*cos(u::anything)-sin(u::anything)*cos(v::anything)=-sin(u+v)], simplify(lhs(Eq2), size));
print("Equation lhsEq2 première analyse=",lhsEq2):
rhsEq2:=applyrule([
cos(u::anything)*cos(v::anything)-sin(u::anything)*sin(v::anything)=cos(u+v),
cos(u::anything)*sin (v::anything)+sin(u::anything)*cos(v::anything)=sin(u+v),
sin(u::anything)*sin(v::anything)-cos(u::anything)*cos(v::anything)=-cos(u+v),
-sin(v::anything)*cos(u::anything)-sin(u::anything)*cos(v::anything)=-sin(u+v)], simplify(rhs(Eq2), size));
print("Equation rhsEq2 première analyse=",rhsEq2):
try
lhsEq2:=(trigsubs(2*combine(lhsEq2))[])/2;
print("Equation lhsEq2=",lhsEq2):
catch:
lhsEq2:=lhs(Eq2);
end try;
try
rhsEq2:=(trigsubs(-2*combine(rhsEq2))[])/2;
print("Equation rhsEq2=",rhsEq2):
catch:
rhsEq2:=rhs(Eq2);
end try;
Eq2:= lhsEq2=rhsEq2;
#Variables Changement#
Eq2:=subs(map(t->rhs(t)=lhs(t),Subs),Eq2)
end proc:
TrigoTransform2(eq_liaison);

TrigoTransformEqAng2_anglais.mws

Thanks a lot for your help.

## Division of estate...

Wonder if this can be accomplished in Maple.

so I have a list of 100 items labeled {1..100} of various value {\$100, \$160, \$220, ......  , }

the task is to distribute these items among 3 people A,B,C so they get an approximately equal share.

Adding the values and dividing by 3 gives the dollar total to aim for.

This post has C.Love procedure for evenly sized groups

http://www.mapleprimes.com/questions/200480-Product-Grouping

but what i want is a method for different sized groups. ie 25 items for A, 35 for B and 40 for C (user defined).

additionally there is a fixed constraint: A has been bequeathed items 1,4,8; B items 2 and 20; C item 50.

restart:
S:= {3, 4, 5, 6, 8, 9, 28, 30, 35}:
SL:= [A,B,C,D,E,F,G,H,I]:
assign(Labels ~ (S) =~ SL); #Create remember table.
AllP:= [seq(P, P= Iterator:-SetPartitions(S, [[3,3]], compile= false))]:
lnp:= evalf(ln((`*`(S[]))^(1/3))):

Var:= proc(P::({list,set}(set)))
local r:= evalf(`+`(map(b-> abs(ln(`*`(b[]))-lnp), P)[]));
end proc:

Min:= proc(S::{list,set}, P::procedure)
local M:= infinity, X:= (), x, v;
for x in S do
v:= P(x);
if v < M then  M:= v;  X:= x  end if
end do;
X
end proc:

ans:= Min(AllP, Var);
[{3, 9, 35}, {4, 8, 28}, {5, 6, 30}]
subsindets(ans, posint, Labels);
[{I, A, F}, {B, E, G}, {C, D, H}]

## Minimization under several conditions ...

Hi all

Assume that we have a cost functional, namely J, which we want to be minimized but we have to set of constraint CC1 and CC2.

what should we do it?

The code which I have written is attached(Minimize J under CC1[i]=0 and CC2[i]=0)

any suggestion or guide is

Ph.D Candidate

Applied Mathematics Department

## How do I plot a polyhedron in 3D ?...

I have a linear problem with 4 variables (p0, p1,p2, p3) and a list of inequality constraints (shown below).  I would like to plot a polyhedral in 3 dimensions (p1,p2, p3 and omitting p0) showing the region that satisfies the inequalities.  That is, something similar to plots[inequal] but in 3d.  Any pointers would be appreciated.

/* Constraints */
+p0 <= 60;
-p0 +p1 >= 4;
-p0 +p2 >= 5;
-p0 +p3 >= -12;
+p0 -p2 >= -33;
+p1 -p2 >= -36;
+p2 <= 67;
-p2 +p3 >= -35;
+p0 -p3 >= 2;
+p1 -p3 >= 0;
+p2 -p3 >= 11;
+p3 <= 57;
+p0 -p1 >= -7;
+p1 <= 43;
-p1 +p2 >= 0;
-p1 +p3 >= -9;

## Minimization Process...

Hi all

I have the following segment of maple program which belongs to time delay systems dynamic. here C=X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P, is a matrix(vector) which comes from reordering the system terms and my goal is to minimizing J:=X.E.Transpose(X)+U.E.Transpose(U), subject to constraint C=0, but i don't know how to do so.

I will be so grateful if anyone can guide me

best wishes

Ph.D Candidate

Applied Mathematics Department

 > restart: with(Optimization): with(LinearAlgebra): macro(LA= LinearAlgebra): L:=1:  r:=2:  tau:= 1: interface(rtablesize= 2*r+1): Z:= Matrix(      2*r+1, 2*r+1,      [tau,       seq(evalf((L/(2*(iz-1)*Pi))*sin(2*(iz-1)*Pi*tau/L)), iz= 2..r+1),       seq(evalf((L/(2*(iz-1-r)*Pi))*(1-cos(2*(iz-1-r)*Pi*tau/L))), iz= r+2..2*r+1)       ],      scan= columns,      datatype= float[8] );                          Dtau00:= < 1 >: Dtau01:= Vector[row](r): Dtau02:= Vector[row](r): Dtau10:= Vector(r): Dtau20:= Vector(r): Dtau1:= LA:-DiagonalMatrix([seq(evalf(cos(2*i*Pi*tau/L)), i= 1..r)]): Dtau2:= LA:-DiagonalMatrix([seq(evalf(sin(2*i*Pi*tau/L)), i= 1..r)]): Dtau3:= -Dtau2: Dtau4:= copy(Dtau1): Dtau:= < < Dtau00 | Dtau01 | Dtau02 >,          < Dtau10 | Dtau1  | Dtau2  >,          < Dtau20 | Dtau3  | Dtau4  > >;   P00:= < L/2 >: P01:= Vector[row](r): P02:= Vector[row](r, j-> evalf(-L/j/Pi), datatype= float[8]): P10:= Vector(r): P20:= Vector(r, i-> evalf(L/2/i/Pi)): P1:= Matrix(r,r): P2:= LA:-DiagonalMatrix(P20): P3:= LA:-DiagonalMatrix(-P20): P4:= Matrix(r,r): P:= < < P00 | P01 | P02 >,       < P10 | P1  | P2  >,       < P20 | P3  | P4  > >; interface(rtablesize=2*r+1):    # optionally J:=Vector([L, L/2 \$ 2*r]):      # Matrix([[...]]) would also work here E:=DiagonalMatrix(J); X:=  Vector[row](2*r+1,symbol=a); U:=Vector[row](2*r+1,symbol=b); X0:= Vector[row](2*r+1,[1]); G:=Vector[row](2*r+1,[1]); C:=simplify(X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P);
 (1)
 > J:=X.E.Transpose(X)+U.E.Transpose(U);
 (2)
 > Minimize(J,{C=0});
 Error, (in Optimization:-NLPSolve) invalid arguments
 > #XP:=-.015+X[1]+add(X[l+1]*f1(l)+X[r+l+1]*f2(l), l= 1..r): #plot([XP,T1], t= 0..1);#,legend= "Solution Of x(t) with r=50"):
 >
 >
 >
 >

## Logic Seating Problem...

Birthday_LP.mw

I am attempting to solve the following using C.Loves Logicproblem package. But i do not know how to tell it either/or constaints. being a circular arrangement might also throw a spanner in the works.

Alans Birthday Logic Problem

It is Alan’s birthday and he is having a party. Seven other people will attend: Amy, Brad, Beth, Charles, Debbie, Emily and Frances.

Everyone will sit around the circular dining table. The seating arrangement must meet the following conditions:

• Amy and Alan sit together

• Brad and Beth sit together

• Charles sits next to either Debbie or Emily

• Frances sits next to Debbie

• Amy and Alan do not sit next to either Brad or Beth

• Brad does not sit next to Charles or Frances

• Debbie and Emily do not sit next to each other

• Alan does not sit next to either Debbie or Emily

• Amy does not sit next to Charles

Arrange the guests around the table to meet all of the conditions listed above.

restart:

Vars:= [Name,PN]:

Name:= [Alan,Amy, Brad, Beth, Charles, Debbie, Emily,Frances]:

PN:=[\$1..8]:

Rel(NotNextTo,Debbie,Emily,PN),Rel(NotNextTo,Alan,Debbie,PN),Rel(NotNextTo,Alan,Emily,PN),

Rel(NotNextTo,Amy,Charles,PN)]:

Birthday:= LogicProblem(Vars):

with(Birthday):

## Automatic calculation in dsolve ...

Following previous question at

http://www.mapleprimes.com/questions/149581-Improve-Algorithm-Dsolve

and also

http://www.mapleprimes.com/questions/149243-BVP-With-Constraining-Integrals

I wrote the following code

***********************

restart:

gama1:=0:

phi0:=0.00789:

rhocu:=2/(1-zet^2)*int((1-eta)*rho(eta)*c(eta)*u(eta),eta=0..1-zet):

eq1:=diff(u(eta),eta,eta)+1/(mu(eta)/mu1[w])+((1/(eta-1)+1/mu(eta)*(mu_phi*diff(phi(eta),eta)))*diff(u(eta),eta)):
eq2:=diff(T(eta),eta,eta)+1/(k(eta)/k1[w])*(2/(1-zet^2)*rho(eta)*c(eta)*u(eta)/(p2*10000)+( (a[k1]+2*b[k1]*phi(eta))/(1+a[k1]*phi1[w]+b[k1]*phi1[w]^2)*diff(phi(eta),eta)-k(eta)/k1[w]/(1-eta)*diff(T(eta),eta) )):
eq3:=diff(phi(eta),eta)-phi(eta)/(N[bt]*(1-gama1*T(eta))^2)*diff(T(eta),eta):
mu:=unapply(mu1[bf]*(1+a[mu1]*phi(eta)+b[mu1]*phi(eta)^2),eta):
k:=unapply(k1[bf]*(1+a[k1]*phi(eta)+b[k1]*phi(eta)^2),eta):
rhop:=3880:
rhobf:=998.2:
cp:=773:
cbf:=4182:
rho:=unapply(  phi(eta)*rhop+(1-phi(eta))*rhobf ,eta):
c:=unapply(  (phi(eta)*rhop*cp+(1-phi(eta))*rhobf*cbf )/rho(eta) ,eta):
mu_phi:=mu1[bf]*(a[mu1]+2*b[mu1]*phi(eta)):

a[mu1]:=39.11:
b[mu1]:=533.9:
mu1[bf]:=9.93/10000:
a[k1]:=7.47:
b[k1]:=0:
k1[bf]:=0.597:
zet:=0.5:
#phi(0):=1:
#u(0):=0:
phi1[w]:=phi0:
N[bt]:=0.2:
mu1[w]:=mu(0):
k1[w]:=k(0):

eq1:=subs(phi(0)=phi0,u(0)=0,eq1):
eq2:=subs(phi(0)=phi0,u(0)=0,eq2):
eq3:=subs(phi(0)=phi0,u(0)=0,eq3):

p:=proc(pp2) global res,F0,F1,F2:
if not type([pp2],list(numeric)) then return 'procname(_passed)' end if:
res := dsolve({eq1=0,subs(p2=pp2,eq2)=0,eq3=0,u(0)=0,u(1-zet)=0,phi(0)=phi0,T(0)=0,D(T)(0)=1}, numeric,output=listprocedure):
F0,F1,F2:=op(subs(res,[u(eta),phi(eta),T(eta)])):
evalf(2/(1-zet^2)*Int((1-eta)*(F1(eta)*rhop+(1-F1(eta))*rhobf)*( F1(eta)*rhop*cp+(1-F1(eta))*rhobf*cbf )/(F1(eta)*rhop+(1-F1(eta))*rhobf)*F0(eta),eta=0..1-zet))-pp2*10000:
end proc:

s1:=Student:-NumericalAnalysis:-Secant(p(pp2),pp2=[6,7],tolerance=1e-6);

HFloat(6.600456858832996)

p2:=%:

ruu:=evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet))):
phb:=evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta)*F1(eta),eta=0..1-zet))) / evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet))) :
TTb:=evalf(2/(1-zet^2)*(Int((1-eta)*F2(eta),eta=0..1-zet))):
rhouu:=evalf(2/(1-zet^2)*(Int((1-eta)*(F1(eta)*rhop+(1-F1(eta))*rhobf)*F0(eta),eta=0..1-zet))):
with(plots):
res(parameters=[R0,R1]):
odeplot(res,[[eta,u(eta)/ruu],[eta,phi(eta)/phb],[eta,T(eta)/TTb]],0..zet);

*************************************

as you can see at the second line of the code, the value of phi0:=0.00789. however, I want to modify the code in a way that phi0 is calculated with the following addition constraint

evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta)*F1(eta),eta=0..1-zet))) / evalf(2/(1-zet^2)*(Int((1-eta)*F0(eta),eta=0..1-zet)))-0.02=0

I would be most grateful if you could help me in this problem.

Amir

## Constraining Rigid Body Position...

In MapleSim, it is possible to constrain a rigid body in a multibody system to an arbitrary constraint?

Similarly to how a mass at the end of a simple pendulum can only move along a circle defined by the length of the pendulum, I was hoping to constrain one to a shape like an ellipse or sine wave.  I could then give it initial velocities and see how it would move along the shape over time.

I'd like to be able to define this constraint with an equation. ...

## Rolling Wheel Joint...

Hi people!

Why there is not a "Modelica.Mechanics.MultiBody.Joints.RollingWheel" (different from 1-D mechanics rolling wheel) in MapleSim 5? It is previewed in the Modelica language and SystemModeler has this implementation.

Is there a way to import the model o this joint from somewhere? If not, how could I model this non-holonimic constraint in MapleSim?

Thanks!

## Maximization problem...

I'm having trouble maximizing this funciton:

S=  (w1*E1+w2*E2+w3*E3)/(CoVar[1,2]), subject to the constraint w1+w2+w3=1

I need it to choose w1, w2, and w3 to maximize S