freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

dvd在線租賃模型(參考版)

2024-08-25 08:08本頁(yè)面
  

【正文】 } }。 } void insert(int x) { c[1] = x。 } c[i+1] = x。 i location 。 public: MyList() { size = 0。 // // } } 程序 4.( MyList): ifndef MYLIST_H define MYLIST_H struct MyList { int c[101]。 j++) 22 // cout perOrder[i].state[j].DVD 。 // // for(int j = 1 。 i 101 。 j++) cout [j] endl。 for(int j = 1 。 j 101 。 FindThird()。 FindFirst()。 } void main() { readDVD(e:\\)。 i = 。 21 if(bFind != 0) { InsertCustomer([i],lSecond)。 i = 。 } } } void FindSecond() { int bFind。 i++) { bFind = findDVD(i)。 for(int i = 1 。 } } if(i QueueSize) (CusIndex,QueueSize)。 i++) { if(perOrder[CusIndex].satisfyIndex perOrder[[i]].satisfyIndex) { (CusIndex,i1)。 20 } else { for(int i = 1 。CusQueue) { int QueueSize = 。 } } return 0。 perOrder[CustomerIndex].satisfyIndex += i。 perOrder[CustomerIndex].state[m].demandIndex = i。 //更新一下客戶的信息 perOrder[CustomerIndex].DVDAssigned++。 int k = dvdOnline[dvdDemand].totalDVD dvdOnline[dvdDemand].leftDVD。 dvdDemand = perOrder[CustomerIndex].demand[i]。 i 10 。 startIndex = perOrder[CustomerIndex].state[dvdAssigned].demandIndex。 int startIndex。 perOrder[i].satisfyIndex = 0。 } perOrder[i].DVDAssigned = 0。 j++) { cusIn expIndex。 i++) { for(int j = 1 。 for(int i = 1 。 } } void readCustomer(string FilePath) { fstream cusIn((),ios::in)。 dvdOnline[i].leftDVD = dvdOnline[i].totalDVD。 i 21 。 void readDVD(string FilePath) { 18 fstream dvdIn((),ios::in)。 MyList lFirst。 DVD dvdOnline[21]。 }。 int leftDVD。 }。 17 //當(dāng)前得到了幾張 DVD int DVDAssigned。 struct Customer { //客戶最想要的 19 張 DVD int demand[10]。 int demandIndex。 六、參考文獻(xiàn) [1] 王樹(shù)禾編著,《數(shù)學(xué)模型基礎(chǔ)》,中 國(guó)科學(xué)技術(shù)大學(xué)出版社出版, 1996 年。而且該模型有一定的推廣價(jià)值,可以廣泛應(yīng)用于銀行服務(wù)系統(tǒng)、醫(yī)院排隊(duì)系統(tǒng)等。 租賃工作結(jié)束 判斷有無(wú)存在等待分配的會(huì)員 有 無(wú) 有 無(wú) 管理員處是否存在 DVD 有 是 成為等待會(huì)員 開(kāi)始 判斷是否為等待會(huì)員。 10 租賃系數(shù) =滿意度小于等于 6 的人數(shù) /統(tǒng)計(jì)人數(shù) 得出可能服務(wù)人數(shù): 可能服務(wù)人數(shù) =加權(quán)人數(shù) *租賃系數(shù) 由此得下表 DVD1 DVD2 DVD3 DVD4 DVD5 DVD6 DVD7 DVD8 DVD9 DVD10 統(tǒng)計(jì)人數(shù) 53 37 46 34 37 42 41 48 41 51 加權(quán)人數(shù) 55 36 49 40 38 49 42 51 47 52 可能服務(wù)人數(shù) 36 24 34 32 28 38 29 39 35 33 DVD11 DVD12 DVD13 DVD14 DVD15 DVD16 DVD17 DVD18 DVD19 DVD20 統(tǒng)計(jì)人數(shù) 48 41 43 45 52 41 44 45 44 31 加權(quán)人數(shù) 49 45 46 43 50 41 44 45 47 31 可能服務(wù)人數(shù) 33 31 34 28 31 28 29 30 31 23 表 8 利用模型一: 11 11 npm CQp???? ( 15) 由 1p? 當(dāng) ??n 時(shí), 0?np 即: ? ?1m p CQ?? ( 16) 求解得 DVD1—— DVD20 的購(gòu)買張數(shù)如下表(表 9): DVD DVD1 DVD2 DVD3 DVD4 DVD5 DVD6 DVD7 DVD8 DVD9 DVD10 張數(shù) 14 9 14 12 11 15 11 15 13 13 DVD DVD11 DVD12 DVD13 DVD14 DVD15 DVD16 DVD17 DVD18 DVD19 DVD20 張數(shù) 13 12 13 11 12 11 11 12 12 9 表 9 在考慮問(wèn)題 3)時(shí),由于在一個(gè)月內(nèi),有部分會(huì)員要租賃 2 次,而部分會(huì)員只租賃1 次,和問(wèn)題 2)中的問(wèn)題相比,多了一個(gè)循環(huán)過(guò)程,此時(shí)問(wèn)題 2)中的分配模型已不適用,因此作如下改進(jìn): 增加判斷語(yǔ)句,在第 1 次租賃工作結(jié)束后,判斷在網(wǎng)站管理員處(系統(tǒng)中)是否存在 DVD,如果存在,轉(zhuǎn)入到開(kāi)始,重新開(kāi)始分配工作 ,使原來(lái)的等待會(huì)員和新來(lái)的會(huì)員開(kāi)始租賃 DVD,此時(shí)注意,等待會(huì)員應(yīng)優(yōu)先考慮租賃工作,然后才是新來(lái)的會(huì)員,以縮短等待會(huì)員的等待服務(wù)時(shí)間,如果沒(méi)有 DVD 存在,則等待會(huì)員和新到會(huì)員繼續(xù)等待。 步驟如下: 第一步:統(tǒng)計(jì)出每種 DVD 的有意向租賃的會(huì)員人數(shù)稱之為統(tǒng)計(jì)人數(shù) 第二步:由于 每個(gè)會(huì)員的偏愛(ài)不同,統(tǒng)計(jì)人數(shù)相同的兩張 DVD,它們的需求系數(shù)也不同,將導(dǎo)致實(shí)際租賃完全發(fā)生很大的變化,因?yàn)楦鶕?jù)偏愛(ài)程度,我們引入了權(quán)系數(shù): 權(quán)系數(shù) =統(tǒng)計(jì)人數(shù) *偏愛(ài)度均值 /統(tǒng)計(jì)人數(shù)的偏愛(ài)和值 其中偏愛(ài)度均值取偏愛(ài)數(shù)值( 19)的均值 5。 列出前 30 位會(huì)員獲得 DVD 的情況 前 30 名會(huì)員(即 C0001~C0030)獲得 DVD 的情況如下表: 表 7 會(huì)員獲得 DVD 情況 會(huì)員 所獲得的 DVD 編號(hào) C0001 D0003( 2) D0020( 4) D0017( 6) C0002 D0001( 1) D0006( 7) D0012( 2) C0003 D0012( 4) D0017( 2) D0020( 5) C0004 D0007( 7) D0011( 3) D0012( 1) C0005 D0006( 4) D0007( 7) D0019( 1) C0006 D0006( 8) D0012( 3) D0016( 2) C0007 D0007( 1) D0011( 4) D0020( 7) C0008 D0013( 1) D0016( 6) D0018( 5
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1