Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Buongiorno a tutti, sono Alberto e sono nuovo del forum, scusate perchè probabilmente la domanda per voi è banale e magari è già stata posta da qualche altro utente ma sono veramente disperato.
Sto finendo gli studi in ingegneria meccanica al Polimi e sto facendo la tesi.
La mia tesi si riferisce precisamente allo scheduling della produzione industriale che può essere espresso come un grafo orientato (AoA) per poi, dopo opportune semplificazioni con serie e parallelo, arrivare ad avere una stima del tempo di completamento del prodotto.
Arriviamo alla parte per me ostica: abbiamo fatto un solo esame di programmazione C al primo anno, ma niente di accessivamente complesso. il mio professore pretende un programma in C++, scritto su Visual Studio 2008, in cui leggo il grafo, semplifico e vedo il risultato a schermo.
Visto che l'ambito non è propriamente il mio, ho letto parecchio materiale su Boost Graph Library e sto tentando (invano) di far girare un programma GIA' FATTO.
Il problema probabilmente, sta nel fatto che non riesco a far leggere gli header al compilatore e mi visualizza "fatal error".
voi sapete come aiutarmi? come faccio a far leggere gli header?
grazie mille delle risposte!
()
Newbie
Messaggi: Iscritto:
Postato alle 12:04
Giovedì, 07/02/2013
come non legge gli headers? Hai fatto un nuovo progetto e importato i file che ti servono?
Allora ragazzi il programma che devo far girare è questo che ho scritto nel post precedente.
adesso vi mostro passo dopo passo quello che ho fatto (scusate se è scritto in Inglese, ma la tesi la sto scrivendo così):
• From Visual Studio's File menu, select New > Project…
• In the left-hand pane of the resulting New Project dialog, select Visual C++ > Win32.
• In the right-hand pane, select Win32 Console Application (VS8.0) or Win32 Console Project (VS7.1).
• In the name field, enter “example”
• Right-click example in the Solution Explorer pane and select Properties from the resulting pop-up menu
• In Configuration Properties > C/C++ > General > Additional Include Directories, enter the path to the Boost root directory, for example
C:\Program Files\boost\boost_1_52_0
• In Configuration Properties > C/C++ > Precompiled Headers, change Use Precompiled Header (/Yu) to Not Using Precompiled Headers.3
• Replace the contents of the example.cpp generated by the IDE with the example code above.
• From the Build menu, select Build Solution.
To test your application, hit the F5 key and type the following into the resulting window, followed by the Return key.
Teoricamente, premendo F5 dovrebbe visualizzare a schermo i nomi delle città, ma mi visualizza questo... dove sbaglio?? il problema è che, lavorando, non posso neanche starci dietro s enon per mezza giornata alla tesi.. disastro!!
The algorithm repeats all the following steps until no vertices are present in the unsatisfied list:
1) Remove some vertex v from the unsatisfied list
2) Examine edges entering v. If two edges with the form (u,v) are found, apply a parallel reduction to them. Continue examining edges entering v and applying parallel reductions until either (i) only one edge leaves v or (ii) v is found to have two distinct predecessors
3) Examine edges leaving v. If two edges sith the form (v,w) are found, apply a parallel reduction to them. Continue examining edges leaving v and applying parallel reduction until either (i) only one edge leaves v or (ii) v is found to have two distinct successors
4) If only one edge (u,v) now enters v and only one edge (v,w) leaves v, carry out the following steps:
a. Apply a series reduction to delete v and replace (u,v) and (v,w) by a new edge (u,w)
b. If u is not the source and not on the unsatisfied list, add it to the unsatisfied list
c. If w is not the sink and not on the unsatisfied list, add it to the unsatisfied list
When the unsatisfied list is empty, we test whether any vertices other than the source and the sink remain. It so, the multidigraph is not reducible to a single edge. If not, we complete the reduction to a single edge by applying parallel reduction to the edges joining the source and sink.
a me, per uno che non ha mai fatto programmazione, non sembra facile