/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/ /* [ Created with wxMaxima version 22.04.0 ] */ /* [wxMaxima: input start ] */ fpprintprec:4; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ T(t)=t/m; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ L(l,v):=l/(m*v); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ R0(ppd, l,q,L,cpd,cpm,n):=n*(ppd*l*q/(2*L)-cpd*l/L*dstCoeff-cpm); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ R1(ppd, l,demand,L,cpd,cpm,n):=ppd*l*demand-n*(cpd*l/L*dstCoeff+cpm); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ numer:true$ /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] l km, demand goods/month, ppd money/good/km [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ l:48$ demand:2.6$ ppd:0.29$ m:6.4$ dstCoeff:sqrt(2)$ /* [wxMaxima: input end ] */ /* [wxMaxima: comment start ] v km/h, cp capacity, tu hours for loading unloading, cpd cost/km, cpm cost/month [wxMaxima: comment end ] */ /* [wxMaxima: input start ] */ v:[6,3,5,4]$ cp:[1,4,4,6]$ tu:[5,5,5,5.5]$ cpd:[.09,0.12,0.14, 0.17]$ cpm:[0.24,0.24,0.48, 0.52]$ names:[Irish1,Irish1,pair1Irish,pair1Irish]$ /*piece goods 1,4,4,6*/ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ v1:2*l/(2*l/v*dstCoeff+tu)$ print("average velocity is",v1)$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ q:2*demand*L(l,v1)$ n:floor(q/cp)+1$ print("We need",q, "cargo to satisfy the demand and", n, "convoys to just overpass it.")$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ L1:n*cp/(2*demand)$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ print("Revenue",R0(ppd, l,cp,L(l,v1),cpd,cpm,n-1), "from", n-1, "convoys, unscheduled")$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ print("Revenue",R1(ppd, l,demand,L(l,v1),cpd,cpm,n), "from", n, "convoys unscheduled")$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ print("Revenue",maxRevenue:R1(ppd, l,demand,L1,cpd,cpm,n), "from", n, "convoys scheduled")$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ print("Scheduled departures every",floor(2*L1/n*m), "hours and", 60*mod(2*L1/n*m,1),"minutes, for", n, "convoys")$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ print("A convoy, unscheduled, needs", floor(2*L(l,v1)*m), "hours and", 60*mod(2*L(l,v1)*m,1),"minutes or",2*L(l,v1),"months between departures")$ /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ print("Every one carried good covers", 1/2/L(l,v1), "of the demand per month")$ /* [wxMaxima: input end ] */ /* Old versions of Maxima abort on loading files that end in a comment. */ "Created with wxMaxima 22.04.0"$