Documentos de Académico
Documentos de Profesional
Documentos de Cultura
List of Experiments
Experiments Page N0
Aim:
To solve a transportation problem using Microsoft Excel Solver.
Problem Description:
A company has three cement factories F1, F2 and F3 which supply cement to four projects
sites locatedin towns 1, 2, 3 and 4. Each plant can supply 6,1,10 truckloads of cements daily
respectively and the daily cement requirements of the projects are respectively 7,5,3,2
truckloads. The transportation costsper truck load of cement (inhundreds of rupees) from
each plant to each project site are as follows:
Factory 1 2 3 11 7
Factory 2 1 0 6 1
Factory 3 5 8 15 9
Procedure:
1) Open Microsoft Excel.
2) If the solver add-in is not enabled in your office suit enable it by going to
File>Options>Add-ins>Manage> Excel Add-ins> Solver Add-in.
3) Restart the Microsoft Excel.
4) Create the cost matrix in Excel sheet as shown in the figure.
5) Create the solution matrix as shown in figure
Results:
Variable Cells
Cell Name Original Value Final Value Integer
$C$12 Factory 2 Project 1 0 0 Contin
$D$12 Factory 2 Project 2 5 5 Contin
$E$12 Factory 2 Project 3 1 1 Contin
$F$12 Factory 2 Project 4 0 0 Contin
$C$13 Factory 3 Project 1 0 0 Contin
$D$13 Factory 3 Project 2 0 0 Contin
$E$13 Factory 3 Project 3 1 1 Contin
Constraints
Cell Name Cell Value Formula Status Slack
$C$15 Project 1 7 $C$15=$C$7 Binding 0
$D$15 Project 2 5 $D$15=$D$7 Binding 0
$E$15 Project 3 3 $E$15=$E$7 Binding 0
$F$15 Project 4 2 $F$15=$F$7 Binding 0
$G$12 Factory 2 Supply 6 $G$12=$G$4 Binding 0
$G$13 Factory 3 Supply 1 $G$13=$G$5 Binding 0
$G$14 Factory 4 Supply 10 $G$14=$G$6 Binding 0
Aim:
To solve an assignment problem using Microsoft Excel Solver.
Problem Description:
Four jobs are to be done on four different machines. The cost (in rupees) of producing ‘i’th
job on ‘j’th machine is given below.
Procedure:
1) Open Microsoft Excel.
2) If the solver add-in is not enabled in your office suit enable it by going to
File>Options>Add-ins>Manage> Excel Add-ins> Solver Add-in.
3) Restart the Microsoft Excel.
4) Create the cost matrix in Excel sheet as shown in the figure.
5) Create the solution matrix as shown in figure
7) Solve.
Results:
Variable Cells
Original
Cell Name Value Final Value Integer
$C$13 Jobs 1 Machine 1 0 0 Contin
$D$13 Jobs 1 Machine 2 0 1 Contin
$E$13 Jobs 1 Machine 3 0 0 Contin
Constraints
Cell Name Cell Value Formula Status Slack
$C$17 Machine 1 1 $C$17=$C$19 Binding 0
$D$17 Machine 2 1 $D$17=$D$19 Binding 0
$E$17 Machine 3 1 $E$17=$E$19 Binding 0
$F$17 Machine 4 1 $F$17=$F$19 Binding 0
$G$13 Jobs 1 1 $G$13=$I$13 Binding 0
$G$14 Jobs 2 1 $G$14=$I$14 Binding 0
$G$15 Jobs 3 1 $G$15=$I$15 Binding 0
$G$16 Jobs 4 1 $G$16=$I$16 Binding 0
Aim:
To solve a transportation problem, using lingo optimization software.
Problem Description
A company has three cement factories F1, F2 and F3 which supply cement to four projects
sites locatedin towns 1, 2, 3 and 4. Each plant can supply 6,1,10 truckloads of cements daily
respectively and the daily cement requirements of the projects are respectively 7,5,3,2
truckloads. The transportation costsper truck load of cement (inhundreds of rupees) from
each plant to each project site are as follows:
Factory 1 2 3 11 7
Factory 2 1 0 6 1
Factory 3 5 8 15 9
Lingo Model
SETS:
FACTORY: SUPPLY;
WAREHOUSE: DEMAND;
SHIPLINKS (FACTORY, WAREHOUSE): COST,VOLUME;
ENDSETS
DATA:
FACTORY=F1..F3;
WAREHOUSE=W1,W2,W3,W4;
SUPPLY=6 1 10;
DEMAND=7 5 3 2;
COST= 2 3 11 7
1 0 6 1
5 8 15 9;
ENDDATA
!Objective Function;
MIN= @SUM(SHIPLINKS(I,J):COST(I,J)*VOLUME(I,J));
!Demand Constraint;
@FOR(WAREHOUSE(J):@SUM(FACTORY(I):VOLUME(I,J))= DEMAND(J));
!Supply Constraint;
@FOR(FACTORY(I):@SUM(WAREHOUSE(J):VOLUME(I,J))= SUPPLY(I));
Results:
Global optimal solution found.
Model Class: LP
Total variables: 12
Nonlinear variables: 0
Integer variables: 0
Total constraints: 8
Nonlinear constraints: 0
Total nonzeros: 35
Nonlinear nonzeros: 0
Variable Value
Reduced Cost
SUPPLY( F1) 6.000000 0.000000
SUPPLY( F2) 1.000000 0.000000
SUPPLY( F3) 10.00000 0.000000
DEMAND( W1) 7.000000 0.000000
DEMAND( W2) 5.000000 0.000000
DEMAND( W3) 3.000000 0.000000
DEMAND( W4) 2.000000 0.000000
COST( F1, W1) 2.000000 0.000000
COST( F1, W2) 3.000000 0.000000
COST( F1, W3) 11.00000 0.000000
COST( F1, W4) 7.000000 0.000000
COST( F2, W1) 1.000000 0.000000
COST( F2, W2) 0.000000 0.000000
COST( F2, W3) 6.000000 0.000000
COST( F2, W4) 1.000000 0.000000
COST( F3, W1) 5.000000 0.000000
COST( F3, W2) 8.000000 0.000000
COST( F3, W3) 15.00000 0.000000
COST( F3, W4) 9.000000 0.000000
VOLUME( F1, W1) 0.000000 1.000000
VOLUME( F1, W2) 5.000000 0.000000
VOLUME( F1, W3) 1.000000 0.000000
VOLUME( F1, W4) 0.000000 2.000000
VOLUME( F2, W1) 0.000000 5.000000
VOLUME( F2, W2) 0.000000 2.000000
VOLUME( F2, W3) 1.000000 0.000000
VOLUME( F2, W4) 0.000000 1.000000
Problem Description
Four jobs are to be done on four different machines. The cost (in rupees) of producing ‘i’th
job on ‘j’th machine is given below.
Lingo Model:
SETS:
MACHINE:REQ;
JOBS:ASSIGN;
ALLOCATIONS(MACHINE,JOBS):COST, ALLOC;
ENDSETS
DATA:
MACHINE=M1..M4;
REQ=1 1 1 1;
JOBS=JOBS1..JOBS4;
ASSIGN=1 1 1 1;
COST= 15 11 13 15
17 12 12 13
14 15 10 14
16 13 11 17;
ENDDATA
!Objetive function;
MIN= @SUM(ALLOCATIONS(I,J): COST(I,J)*ALLOC(I,J));
!Constraints;
@FOR(MACHINE(I):@SUM(JOBS(J):ALLOC(I,J))=1);
@FOR(JOBS(J):@SUM(MACHINE(I):ALLOC(I,J))=1);
Results:
Global optimal solution found.
Objective value: 49.00000
Infeasibilities: 0.000000
Total solver iterations: 7
Elapsed runtime seconds: 0.06
Model Class: LP
Total variables: 16
Nonlinear variables: 0
Integer variables: 0
Total constraints: 9
Nonlinear constraints: 0
Total nonzeros: 48
Nonlinear nonzeros: 0
Variable Value
Reduced Cost
REQ( M1) 1.000000 0.000000
REQ( M2) 1.000000 0.000000
REQ( M3) 1.000000 0.000000
REQ( M4) 1.000000 0.000000
ASSIGN( JOBS1) 1.000000 0.000000
ASSIGN( JOBS2) 1.000000 0.000000
ASSIGN( JOBS3) 1.000000 0.000000
ASSIGN( JOBS4) 1.000000 0.000000
COST( M1, JOBS1) 15.00000 0.000000
COST( M1, JOBS2) 11.00000 0.000000
COST( M1, JOBS3) 13.00000 0.000000
COST( M1, JOBS4) 15.00000 0.000000
COST( M2, JOBS1) 17.00000 0.000000
COST( M2, JOBS2) 12.00000 0.000000
COST( M2, JOBS3) 12.00000 0.000000
COST( M2, JOBS4) 13.00000 0.000000
COST( M3, JOBS1) 14.00000 0.000000
COST( M3, JOBS2) 15.00000 0.000000
COST( M3, JOBS3) 10.00000 0.000000
COST( M3, JOBS4) 14.00000 0.000000
COST( M4, JOBS1) 16.00000 0.000000
COST( M4, JOBS2) 13.00000 0.000000
COST( M4, JOBS3) 11.00000 0.000000
COST( M4, JOBS4) 17.00000 0.000000
ALLOC( M1, JOBS1) 0.000000 0.000000
ALLOC( M1, JOBS2) 1.000000 0.000000
ALLOC( M1, JOBS3) 0.000000 2.000000
ALLOC( M1, JOBS4) 0.000000 3.000000
ALLOC( M2, JOBS1) 0.000000 1.000000
Problem description:
Find the roots of the equation f(x)=x3 –x-1 lying between 1 and 2, using bisection method.
Procedure:
1) Choose two real numbers x0 and x1 such that f(x0)f(x1)<0
2) Set x2=(x0+x1)/2
3) i) if f(x0)f(x2)<0, the root lies in the interval (x0,x2). Then set x1=x2 and go to the
step 2 above.
4) ii) if f(x0)f(x2) >0, the root lies in the interval (x2,x1). Then set x0=x2 and go to the
step 2 above.
iii) if f(x0)f(x2)=0, it means that x2 is a root of the equation f(x)=0 and the
computation may be terminated
Program
#include<conio.h>
#include<math.h>
#define ESP 0.001
float F(float x)
{
float y=(x*x*x)-x-1;
return(y);
}
void main()
{
int i=1;
float x0,x1,x2;
double f1=0,f2=0,f0=0,t;
printf("\n Enter the value of x0:");
scanf("%f",&x0);
printf("\n Enter the value of x1:");
scanf("%f",&x1);
do
{
x2=(x0+x1)/2;
f0=F(x0);
f1=F(x1);
f2=F(x2);
printf("\n %d %f %f %f %1f %1f %1f",i,x0,x1,x2,f0,f1,f2);
if(f0*f2<0)
{
x1=x2;
}
else
{
x0=x2;
}
i++;
}
while(fabs(f2)>ESP);
printf("\nf2=%f\n",fabs(f2));
printf("\n \n Approx root=%f",x2);
}
Result:
Problem Description:
Given dy/dx= y-x where y(0)=2, find y(0.1) and y(0.1).
Procedure:
The solution of a differential equation is given by the following formula
y1=y0 +1/2(k1+k2 )
k1 =hf(x0, y0)
k2 =hf(x0 +h, y0 +k1)
{
f=F(x0,y0);
k1 = h * f;
f1 = F(x0+h,y0+k1);
k2 = h * f1;
y1 = y0 + ( k1 + k2)/2;
printf("\n\n k1 = %.4lf ",k1);
printf("\n\n k2 = %.4lf ",k2);
printf("\n\n y(%.4lf) = %.3lf ",x0+h,y1);
y0=y1;
}
getch();
}
Results:
Aim:
To analyze a cantilever beam with uniformly distributed load
Problem definition:
Find the deflection and stress distribution of a cantilever beam of 100mm x50mm
x20mm dimensionscarrying UDL of 50N over its entire length.
Procedure:
1) Create part and save it
Cantilever beam of required dimensions
3) Select simulation
4) Calculations
Results:
Material Properties
Model Reference Properties Components
Name: Alloy Steel SolidBody 1(Boss-
Model type: Linear Elastic Isotropic Extrude1)(canti)
Default failure Max von Mises Stress
criterion:
Yield strength: 6.20422e+008 N/m^2
Tensile strength: 7.23826e+008 N/m^2
Elastic modulus: 2.1e+011 N/m^2
Poisson's ratio: 0.28
Mass density: 7700 kg/m^3
Shear modulus: 7.9e+010 N/m^2
Thermal expansion 1.3e-005 /Kelvin
coefficient:
Curve Data:N/A
Fixed-1
Resultant Forces
Components X Y Z Resultant
Reaction force(N) 0.000480652 50.0008 0.00148129 50.0008
Reaction Moment(N-m) 0 0 0 0
Force-1
canti-Study 1-Stress-Stress1
Experiment No Date
Aim:
To create a pipe section and obtain velocity distribution of the fluid flowing through it
using SolidWorksFlowexpress.
Problem Description:
Velocity distribution of fluid flowing through a pipe of internal diameter 52 cm and 1m
length and inlet pressure 150kPa and outlet pressure 100kPa is to be generated.
Procedure:
1. Create part and save it
Select new
Select assembly
Select ok
3. Insert components
4. Select evaluate
5. Calculations
6. View on Results
Results:
A pipe section is created and the velocity distribution of fluid flowing through pipe is
obtained.
SolidWorksFloXpress Report
Model
Model Name: C:\Users\it\Desktop\New flow\Assem1.SLDASM
Fluid
Water
Environment Pressure 1
Type Environment Pressure
Faces <0>@lids-2
Temperature: 293.20 K
Environment Pressure 1
Type Environment Pressure
Faces <1>@lids-1
Temperature: 293.20 K
Results
Name Unit Value