├── images └── intro.gif ├── scheduling ├── sat │ ├── zchaff_to_win_patch_todo.txt │ ├── satsch_mex.cpp │ └── zchaff_to_win.patch ├── Contents.m ├── news.txt ├── plugin │ ├── graphtoworkspace.m │ ├── getgraph.m │ ├── creategraph.m │ ├── createnodes.m │ ├── tored.m │ ├── toblue.m │ ├── getnamesanduserparams.m │ ├── tocolor.m │ └── nodestocolor.m ├── @task │ ├── display.m │ ├── horzcat.m │ ├── private │ │ └── set_helper.m │ ├── get_scht.m │ └── add_scht.m ├── contrib │ ├── tar.exe │ ├── gzip.exe │ ├── patch.exe │ ├── unzip.exe │ ├── cplexint9.zip │ ├── libiconv-2.dll │ ├── libintl-2.dll │ ├── matlabxml.zip │ ├── glpk-4.6.tar.gz │ ├── patch-2.5.9-6.exe │ └── matlabxml │ │ ├── xmlsave.p │ │ ├── celltostruct.p │ │ ├── chartostruct.p │ │ ├── edgetostruct.p │ │ ├── nodetostruct.p │ │ ├── structtoxml.p │ │ ├── tasktostruct.p │ │ ├── vartostruct.p │ │ ├── xmltostruct.p │ │ ├── doubletostruct.p │ │ ├── graphtostruct.p │ │ ├── logicaltostruct.p │ │ ├── structtostruct.p │ │ ├── tasksettostruct.p │ │ ├── structtoxml_part.p │ │ ├── graphicparamtostruct.p │ │ ├── structtoxml_part.m │ │ ├── xmlsave.m │ │ ├── celltostruct.m │ │ ├── chartostruct.m │ │ ├── doubletostruct.m │ │ ├── logicaltostruct.m │ │ ├── structtostruct.m │ │ ├── tasktostruct.m │ │ ├── edgetostruct.m │ │ ├── nodetostruct.m │ │ ├── tasksettostruct.m │ │ ├── graphtostruct.m │ │ ├── vartostruct.m │ │ ├── graphicparamtostruct.m │ │ ├── xmltostruct.m │ │ ├── structtoxml.m │ │ └── Contents.m ├── stdemos │ ├── mapa2.png │ ├── mapaDemo.png │ ├── texture │ │ ├── s1.jpg │ │ ├── s2.jpg │ │ ├── s3.jpg │ │ ├── s4.jpg │ │ ├── cover.jpg │ │ ├── river.jpg │ │ ├── wand.jpg │ │ ├── pedestal.jpg │ │ ├── hoist_chart.gif │ │ ├── hoist_demo_in.jpg │ │ └── hoist_demo_out.jpg │ ├── czech_regions.png │ ├── graphMCF_demo.mat │ ├── knapsack_demo.m │ ├── singlehoistdemo.m │ ├── brucker76_demo.mat │ ├── benchmarks │ │ ├── dsp │ │ │ ├── dct.mat │ │ │ ├── iir.mat │ │ │ ├── rls.mat │ │ │ ├── wdf.mat │ │ │ ├── diffeq.mat │ │ │ ├── elliptic.mat │ │ │ ├── jaumann.mat │ │ │ ├── rls_hsla.mat │ │ │ └── vanDongen.mat │ │ ├── qap │ │ │ ├── Chr12a.mat │ │ │ ├── Nug5.mat │ │ │ ├── Tai5a.mat │ │ │ ├── Nug6.mat │ │ │ ├── Tai6a.mat │ │ │ ├── Nug7.mat │ │ │ ├── Tai7a.mat │ │ │ ├── Tai8a.mat │ │ │ └── Nug8.mat │ │ ├── tsp │ │ │ └── czech_rep.mat │ │ ├── spntl │ │ │ └── spntl_graph.mat │ │ └── cssim │ │ │ ├── lwdf.m │ │ │ ├── dsvf.m │ │ │ └── psd.m │ ├── czech_regions_colored.png │ ├── dsvf.txt │ ├── soldiers.txt │ ├── soldiers2.txt │ ├── simple_init.m │ ├── graphcoloring_demo.m │ ├── sat_demo.m │ ├── spanningtree_demo.m │ └── algpcmax_demo.m ├── private │ ├── glpkcc.dll │ ├── glpkcc.mexa64 │ ├── glpkcc.mexglx │ ├── glpkcc.mexw32 │ ├── glpkcc.mexw64 │ ├── spntl_bab.dll │ ├── cssimparser.dll │ ├── glpkmex.mexmaci64 │ ├── grapheditcopy.png │ ├── grapheditcut.png │ ├── grapheditfit.png │ ├── grapheditgrid.png │ ├── graphedithelp.png │ ├── grapheditline.png │ ├── grapheditnew.png │ ├── grapheditopen.png │ ├── grapheditpaw.png │ ├── grapheditredo.png │ ├── grapheditsave.png │ ├── grapheditundo.png │ ├── spntl_bab.mexglx │ ├── spntl_bab.mexw32 │ ├── spntl_bab.mexw64 │ ├── cssimparser.mexglx │ ├── cssimparser.mexw32 │ ├── cssimparser.mexw64 │ ├── grapheditabout.png │ ├── grapheditarrow.png │ ├── grapheditattach.png │ ├── grapheditcenter.png │ ├── grapheditcircle.png │ ├── grapheditclock.jpg │ ├── grapheditexport.png │ ├── grapheditimport.png │ ├── grapheditopen2.png │ ├── grapheditopen3.png │ ├── grapheditpaste.png │ ├── grapheditpatch.png │ ├── grapheditprint.png │ ├── graphedittrash.png │ ├── grapheditdesigner.png │ ├── grapheditleftarrow.png │ ├── grapheditlibrary.png │ ├── grapheditpicture.png │ ├── grapheditpreview.png │ ├── grapheditrectangle.png │ ├── grapheditredcross.png │ ├── grapheditrefresh.png │ ├── grapheditzoomminus.png │ ├── grapheditzoomplus.png │ ├── shopScheduler.mexglx │ ├── shopScheduler.mexw32 │ ├── grapheditcopyformat.png │ ├── grapheditgreencheck.png │ ├── grapheditrightarrow.png │ ├── grapheditexportlibrary.png │ ├── grapheditimportlibrary.png │ ├── grapheditpropertyeditor.png │ ├── visisfunctionbase2.m │ ├── visisfunctionbase.m │ ├── grapheditplugin.xml │ ├── johnsonAlgorithm.m │ ├── sort_est.m │ └── tex2mtex.m ├── @job │ ├── display.m │ ├── private │ │ └── get_helper.m │ └── size.m ├── @ptask │ ├── display.m │ ├── util.m │ └── private │ │ └── set_helper.m ├── info.xml ├── @shop │ ├── private │ │ ├── shopTypes.m │ │ ├── getprocessorasmatrix.m │ │ └── getproctimeasmatrix.m │ ├── issquare.m │ ├── get_schedule.m │ └── display.m ├── @taskset │ ├── vertcat.m │ ├── end.m │ ├── count.m │ ├── util.m │ ├── size.m │ ├── private │ │ ├── schstruct.m │ │ └── setprio_rm.m │ ├── setprio.m │ └── get_correction.m ├── @graph │ ├── private │ │ ├── getemptyvalues.m │ │ └── grparam.m │ ├── display.m │ ├── pred.m │ ├── succ.m │ ├── adj.m │ ├── removeedge.m │ └── horzcat.m ├── @edge │ ├── display.m │ └── private │ │ └── set_helper.m ├── @node │ ├── display.m │ └── private │ │ └── set_helper.m ├── spntl │ ├── make.m │ └── spntl_candidates.c ├── @limitedbuffers │ ├── private │ │ ├── ismodel.m │ │ ├── checkCapacityMatrix.m │ │ ├── checkPairWiseCapacityMatrix.m │ │ └── set_helper.m │ └── display.m ├── @schedobj │ ├── private │ │ ├── grparam.m │ │ ├── set_helper.m │ │ └── get_props.m │ ├── loadobj.m │ ├── fieldnames.m │ └── schedobj.m ├── @problem │ └── private │ │ └── set_helper.m ├── @transportrobots │ └── private │ │ └── set_helper.m └── iscolor.m ├── documentation └── main.pdf └── .gitignore /images/intro.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/images/intro.gif -------------------------------------------------------------------------------- /scheduling/sat/zchaff_to_win_patch_todo.txt: -------------------------------------------------------------------------------- 1 | diff -uN distr win > zchaff_to_win.patch -------------------------------------------------------------------------------- /scheduling/Contents.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/Contents.m -------------------------------------------------------------------------------- /scheduling/news.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/news.txt -------------------------------------------------------------------------------- /documentation/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/documentation/main.pdf -------------------------------------------------------------------------------- /scheduling/plugin/graphtoworkspace.m: -------------------------------------------------------------------------------- 1 | function graphtoworkspace(g) 2 | assignin('base','g',g); -------------------------------------------------------------------------------- /scheduling/@task/display.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/@task/display.m -------------------------------------------------------------------------------- /scheduling/contrib/tar.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/tar.exe -------------------------------------------------------------------------------- /scheduling/contrib/gzip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/gzip.exe -------------------------------------------------------------------------------- /scheduling/contrib/patch.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/patch.exe -------------------------------------------------------------------------------- /scheduling/contrib/unzip.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/unzip.exe -------------------------------------------------------------------------------- /scheduling/stdemos/mapa2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/mapa2.png -------------------------------------------------------------------------------- /scheduling/private/glpkcc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/glpkcc.dll -------------------------------------------------------------------------------- /scheduling/sat/satsch_mex.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/sat/satsch_mex.cpp -------------------------------------------------------------------------------- /scheduling/stdemos/mapaDemo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/mapaDemo.png -------------------------------------------------------------------------------- /scheduling/contrib/cplexint9.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/cplexint9.zip -------------------------------------------------------------------------------- /scheduling/contrib/libiconv-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/libiconv-2.dll -------------------------------------------------------------------------------- /scheduling/contrib/libintl-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/libintl-2.dll -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml.zip -------------------------------------------------------------------------------- /scheduling/plugin/getgraph.m: -------------------------------------------------------------------------------- 1 | function g = getgraph(varargin) 2 | g = varargin{1}; 3 | assignin('base','g',g); -------------------------------------------------------------------------------- /scheduling/private/glpkcc.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/glpkcc.mexa64 -------------------------------------------------------------------------------- /scheduling/private/glpkcc.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/glpkcc.mexglx -------------------------------------------------------------------------------- /scheduling/private/glpkcc.mexw32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/glpkcc.mexw32 -------------------------------------------------------------------------------- /scheduling/private/glpkcc.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/glpkcc.mexw64 -------------------------------------------------------------------------------- /scheduling/private/spntl_bab.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/spntl_bab.dll -------------------------------------------------------------------------------- /scheduling/stdemos/texture/s1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/s1.jpg -------------------------------------------------------------------------------- /scheduling/stdemos/texture/s2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/s2.jpg -------------------------------------------------------------------------------- /scheduling/stdemos/texture/s3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/s3.jpg -------------------------------------------------------------------------------- /scheduling/stdemos/texture/s4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/s4.jpg -------------------------------------------------------------------------------- /scheduling/contrib/glpk-4.6.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/glpk-4.6.tar.gz -------------------------------------------------------------------------------- /scheduling/contrib/patch-2.5.9-6.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/patch-2.5.9-6.exe -------------------------------------------------------------------------------- /scheduling/private/cssimparser.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/cssimparser.dll -------------------------------------------------------------------------------- /scheduling/private/glpkmex.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/glpkmex.mexmaci64 -------------------------------------------------------------------------------- /scheduling/private/grapheditcopy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditcopy.png -------------------------------------------------------------------------------- /scheduling/private/grapheditcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditcut.png -------------------------------------------------------------------------------- /scheduling/private/grapheditfit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditfit.png -------------------------------------------------------------------------------- /scheduling/private/grapheditgrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditgrid.png -------------------------------------------------------------------------------- /scheduling/private/graphedithelp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/graphedithelp.png -------------------------------------------------------------------------------- /scheduling/private/grapheditline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditline.png -------------------------------------------------------------------------------- /scheduling/private/grapheditnew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditnew.png -------------------------------------------------------------------------------- /scheduling/private/grapheditopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditopen.png -------------------------------------------------------------------------------- /scheduling/private/grapheditpaw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditpaw.png -------------------------------------------------------------------------------- /scheduling/private/grapheditredo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditredo.png -------------------------------------------------------------------------------- /scheduling/private/grapheditsave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditsave.png -------------------------------------------------------------------------------- /scheduling/private/grapheditundo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditundo.png -------------------------------------------------------------------------------- /scheduling/private/spntl_bab.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/spntl_bab.mexglx -------------------------------------------------------------------------------- /scheduling/private/spntl_bab.mexw32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/spntl_bab.mexw32 -------------------------------------------------------------------------------- /scheduling/private/spntl_bab.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/spntl_bab.mexw64 -------------------------------------------------------------------------------- /scheduling/stdemos/czech_regions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/czech_regions.png -------------------------------------------------------------------------------- /scheduling/stdemos/graphMCF_demo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/graphMCF_demo.mat -------------------------------------------------------------------------------- /scheduling/stdemos/knapsack_demo.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/knapsack_demo.m -------------------------------------------------------------------------------- /scheduling/stdemos/singlehoistdemo.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/singlehoistdemo.m -------------------------------------------------------------------------------- /scheduling/stdemos/texture/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/cover.jpg -------------------------------------------------------------------------------- /scheduling/stdemos/texture/river.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/river.jpg -------------------------------------------------------------------------------- /scheduling/stdemos/texture/wand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/wand.jpg -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/xmlsave.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/xmlsave.p -------------------------------------------------------------------------------- /scheduling/private/cssimparser.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/cssimparser.mexglx -------------------------------------------------------------------------------- /scheduling/private/cssimparser.mexw32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/cssimparser.mexw32 -------------------------------------------------------------------------------- /scheduling/private/cssimparser.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/cssimparser.mexw64 -------------------------------------------------------------------------------- /scheduling/private/grapheditabout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditabout.png -------------------------------------------------------------------------------- /scheduling/private/grapheditarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditarrow.png -------------------------------------------------------------------------------- /scheduling/private/grapheditattach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditattach.png -------------------------------------------------------------------------------- /scheduling/private/grapheditcenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditcenter.png -------------------------------------------------------------------------------- /scheduling/private/grapheditcircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditcircle.png -------------------------------------------------------------------------------- /scheduling/private/grapheditclock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditclock.jpg -------------------------------------------------------------------------------- /scheduling/private/grapheditexport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditexport.png -------------------------------------------------------------------------------- /scheduling/private/grapheditimport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditimport.png -------------------------------------------------------------------------------- /scheduling/private/grapheditopen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditopen2.png -------------------------------------------------------------------------------- /scheduling/private/grapheditopen3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditopen3.png -------------------------------------------------------------------------------- /scheduling/private/grapheditpaste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditpaste.png -------------------------------------------------------------------------------- /scheduling/private/grapheditpatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditpatch.png -------------------------------------------------------------------------------- /scheduling/private/grapheditprint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditprint.png -------------------------------------------------------------------------------- /scheduling/private/graphedittrash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/graphedittrash.png -------------------------------------------------------------------------------- /scheduling/stdemos/brucker76_demo.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/brucker76_demo.mat -------------------------------------------------------------------------------- /scheduling/plugin/creategraph.m: -------------------------------------------------------------------------------- 1 | function g = creategraph(varargin) 2 | g = graph([0 1 0 1; 0 0 1 1; 1 0 0 1; 0 0 0 1]); 3 | -------------------------------------------------------------------------------- /scheduling/private/grapheditdesigner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditdesigner.png -------------------------------------------------------------------------------- /scheduling/private/grapheditleftarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditleftarrow.png -------------------------------------------------------------------------------- /scheduling/private/grapheditlibrary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditlibrary.png -------------------------------------------------------------------------------- /scheduling/private/grapheditpicture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditpicture.png -------------------------------------------------------------------------------- /scheduling/private/grapheditpreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditpreview.png -------------------------------------------------------------------------------- /scheduling/private/grapheditrectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditrectangle.png -------------------------------------------------------------------------------- /scheduling/private/grapheditredcross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditredcross.png -------------------------------------------------------------------------------- /scheduling/private/grapheditrefresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditrefresh.png -------------------------------------------------------------------------------- /scheduling/private/grapheditzoomminus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditzoomminus.png -------------------------------------------------------------------------------- /scheduling/private/grapheditzoomplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditzoomplus.png -------------------------------------------------------------------------------- /scheduling/private/shopScheduler.mexglx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/shopScheduler.mexglx -------------------------------------------------------------------------------- /scheduling/private/shopScheduler.mexw32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/shopScheduler.mexw32 -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/dct.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/dct.mat -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/iir.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/iir.mat -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/rls.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/rls.mat -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/wdf.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/wdf.mat -------------------------------------------------------------------------------- /scheduling/stdemos/texture/pedestal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/pedestal.jpg -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/celltostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/celltostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/chartostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/chartostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/edgetostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/edgetostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/nodetostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/nodetostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/structtoxml.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/structtoxml.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/tasktostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/tasktostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/vartostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/vartostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/xmltostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/xmltostruct.p -------------------------------------------------------------------------------- /scheduling/private/grapheditcopyformat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditcopyformat.png -------------------------------------------------------------------------------- /scheduling/private/grapheditgreencheck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditgreencheck.png -------------------------------------------------------------------------------- /scheduling/private/grapheditrightarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditrightarrow.png -------------------------------------------------------------------------------- /scheduling/stdemos/texture/hoist_chart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/hoist_chart.gif -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/doubletostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/doubletostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/graphtostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/graphtostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/logicaltostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/logicaltostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/structtostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/structtostruct.p -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/tasksettostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/tasksettostruct.p -------------------------------------------------------------------------------- /scheduling/private/grapheditexportlibrary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditexportlibrary.png -------------------------------------------------------------------------------- /scheduling/private/grapheditimportlibrary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditimportlibrary.png -------------------------------------------------------------------------------- /scheduling/private/grapheditpropertyeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/private/grapheditpropertyeditor.png -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/diffeq.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/diffeq.mat -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/elliptic.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/elliptic.mat -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/jaumann.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/jaumann.mat -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/rls_hsla.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/rls_hsla.mat -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Chr12a.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/qap/Chr12a.mat -------------------------------------------------------------------------------- /scheduling/stdemos/czech_regions_colored.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/czech_regions_colored.png -------------------------------------------------------------------------------- /scheduling/stdemos/texture/hoist_demo_in.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/hoist_demo_in.jpg -------------------------------------------------------------------------------- /scheduling/stdemos/texture/hoist_demo_out.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/texture/hoist_demo_out.jpg -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/structtoxml_part.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/structtoxml_part.p -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/dsp/vanDongen.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/dsp/vanDongen.mat -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/tsp/czech_rep.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/tsp/czech_rep.mat -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/graphicparamtostruct.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/contrib/matlabxml/graphicparamtostruct.p -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/spntl/spntl_graph.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CTU-IIG/TORSCHE/HEAD/scheduling/stdemos/benchmarks/spntl/spntl_graph.mat -------------------------------------------------------------------------------- /scheduling/plugin/createnodes.m: -------------------------------------------------------------------------------- 1 | function g = createnodes(g,varargin) 2 | g = graph; 3 | for i = 1:round(varargin{1}) 4 | n = node; 5 | n.Name = ['T_{' num2str(i) '}']; 6 | g.N(i) = n; 7 | end 8 | -------------------------------------------------------------------------------- /scheduling/plugin/tored.m: -------------------------------------------------------------------------------- 1 | function g = tored(g) 2 | for i = 1:length(g.N) 3 | node = g.N(i); 4 | set_graphic_param(node,'Color',[1 0 0]); 5 | g.N(i) = node; 6 | end 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io 3 | 4 | #Dolphin filesss 5 | .directory 6 | 7 | # Windows image file caches 8 | Thumbs.db 9 | ehthumbs.db 10 | 11 | # Folder config file 12 | Desktop.ini 13 | 14 | # Recycle Bin used on file shares 15 | $RECYCLE.BIN/ -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/structtoxml_part.m: -------------------------------------------------------------------------------- 1 | %STRUCTTOXML_PART utility function for STRUCTTOXML. 2 | % 3 | % See also structtoxml 4 | 5 | % Author(s): M. Kutil 6 | % Copyright (c) 2005 7 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 8 | 9 | -------------------------------------------------------------------------------- /scheduling/plugin/toblue.m: -------------------------------------------------------------------------------- 1 | function g = toblue(g) 2 | % 3 | % without parameters 4 | % 5 | for i = 1:length(g.N) 6 | node = g.N(i); 7 | set_graphic_param(node,'Color',[0 0 1]); 8 | g.N(i) = node; 9 | end 10 | g.Name = [g.Name 'blue']; 11 | -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Nug5.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Thu Jan 12 18:50:47 2006 IMPDPF -------------------------------------------------------------------------------- /scheduling/plugin/getnamesanduserparams.m: -------------------------------------------------------------------------------- 1 | function out = getnamesanduserparams(g) 2 | nodes = []; edges = []; 3 | for i = 1:length(g.N) 4 | nodes{i} = g.N{i}.Name; 5 | end 6 | for i = 1:length(g.E) 7 | edges{i} = g.E{i}.UserParam; 8 | end 9 | out = struct('Nodes',nodes,'Edges',edges); 10 | -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Tai5a.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Thu Jan 12 18:50:49 2006 IMPD_R8)_) 2 | R 3 | ?8?PF,(KOY,O# (#KY  -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Nug6.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Thu Jan 12 18:50:48 2006 IMXD$ 2 |  3 | XF$ -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Tai6a.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Thu Jan 12 18:50:50 2006 IMXD$_R8) 2 | _?,R?(K8 3 | (O),KOXF$Y# UT YU[ #T#R [# R -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/xmlsave.m: -------------------------------------------------------------------------------- 1 | %XMLSAVE save variables to file in xml format. 2 | % XMLSAVE(filename,variable1,variable2,variable3,...) save variables 3 | % into filename. 4 | % 5 | % See also vartostruct 6 | 7 | % Author(s): M. Kutil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/celltostruct.m: -------------------------------------------------------------------------------- 1 | %CELLTOSTRUCT convert cell to struct. 2 | % struct = CELLTOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml 6 | 7 | % Author(s): M. Kutil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/chartostruct.m: -------------------------------------------------------------------------------- 1 | %CHARTOSTRUCT convert char to struct. 2 | % struct = CHARTOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml 6 | 7 | % Author(s): M. Kutil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Nug7.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Thu Jan 12 18:50:48 2006 IMhD1 2 |  3 | hF1 -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Tai7a.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Thu Jan 12 18:50:50 2006 IMhD1_R8) 2 | ?_,(KOR 3 | ,Y#8( )?KY UO#UhF1T [ T#RE8 #V-[;RVL'-9[E[L$ 8;'9$ -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/doubletostruct.m: -------------------------------------------------------------------------------- 1 | %DOUBLETOSTRUCT convert double to struct. 2 | % struct = DOUBLETOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml 6 | 7 | % Author(s): M. Kutil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/logicaltostruct.m: -------------------------------------------------------------------------------- 1 | %CHARTOSTRUCT convert logical to struct. 2 | % struct = LOGICALTOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml 6 | 7 | % Author(s): P. Sucha 8 | % Copyright (c) 2006 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/structtostruct.m: -------------------------------------------------------------------------------- 1 | %STRUCTTOSTRUCT convert struct to struct. 2 | % struct = STRUCTTOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml 6 | 7 | % Author(s): M. Kutil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Tai8a.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Thu Jan 12 18:50:51 2006 IMpD@_R8) 2 | ?,(_ 3 | KOY#RK UT8?O ) [ ,YU[#(#T #pF@RE8V-[R;L'9;$=$GE$ RR8L= GV'$MJ-RGM[9GRJ -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/qap/Nug8.mat: -------------------------------------------------------------------------------- 1 | MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Thu Jan 12 18:50:49 2006 IMpD@ 2 |  3 |  4 |  5 |  6 |  7 | pF@ -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/tasktostruct.m: -------------------------------------------------------------------------------- 1 | %TASKTOSTRUCT convert taskset object to struct. 2 | % struct = TASKTOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml, task (scheduling toolbox) 6 | 7 | % Author(s): M. Kutil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/edgetostruct.m: -------------------------------------------------------------------------------- 1 | %EDGETOSTRUCT convert edge object to struct. 2 | % struct = EDGETOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml, edge (scheduling toolbox) 6 | 7 | % Author(s): M. Kutil, V. Navratil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/nodetostruct.m: -------------------------------------------------------------------------------- 1 | %NODETOSTRUCT convert node object to struct. 2 | % struct = NODETOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml, node (scheduling toolbox) 6 | 7 | % Author(s): M. Kutil, V. Navratil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/tasksettostruct.m: -------------------------------------------------------------------------------- 1 | %TASKSETTOSTRUCT convert taskset object to struct. 2 | % struct = TASKSETTOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml, taskset (scheduling toolbox) 6 | 7 | % Author(s): M. Kutil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/graphtostruct.m: -------------------------------------------------------------------------------- 1 | %GRAPHTOSTRUCT convert graph object to struct. 2 | % struct = GRAPHTOSTRUCT(variable, name) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % See also structtoxml, graph (scheduling toolbox) 6 | 7 | % Author(s): M. Kutil, V. Navratil 8 | % Copyright (c) 2005 9 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 10 | 11 | -------------------------------------------------------------------------------- /scheduling/plugin/tocolor.m: -------------------------------------------------------------------------------- 1 | function g = tocolor(g) 2 | if nargin == 1 3 | color = uisetcolor([1 1 1],'Graphedit - palette'); 4 | if (length(color) ~= 1) 5 | for i = 1:length(g.N) 6 | node = g.N(i); 7 | set_graphic_param(node,'Color',color); 8 | g.N(i) = node; 9 | end 10 | else 11 | g = []; 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/vartostruct.m: -------------------------------------------------------------------------------- 1 | %VARTOSTRUCT convert variables to struct. 2 | % struct = VARTOSTRUCT(variable) returns (xml)struct which 3 | % include all information from variable. 4 | % 5 | % This function cover in all function for specific data type, as 6 | % celltostruct, doubletostruct, structtostruct, ... 7 | % 8 | % See also structtoxml 9 | 10 | % Author(s): M. Kutil 11 | % Copyright (c) 2005 12 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 13 | 14 | -------------------------------------------------------------------------------- /scheduling/plugin/nodestocolor.m: -------------------------------------------------------------------------------- 1 | function g = nodestocolor(g) 2 | if isa(g,'graph') 3 | color = uisetcolor('Graphedit - palette'); 4 | if (length(color) ~= 1) 5 | for i = 1:length(g.N) 6 | node = g.N(i); 7 | set_graphic_param(node,'Color',color); 8 | g.N(i) = node; 9 | end 10 | g.Name = [g.Name ' - Color']; 11 | else 12 | g = []; 13 | end 14 | else 15 | g = []; 16 | end 17 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/graphicparamtostruct.m: -------------------------------------------------------------------------------- 1 | %GRAPHICPARAMTOSTRUCT convert graphics param from scheduling toolbox 2 | % objects (schedobj) to struct. 3 | % 4 | % struct = GRAPHICPARAMTOSTRUCT(variable) returns (xml)struct which 5 | % include all graphics information from scheduling toolbox objects 6 | % variable. 7 | % 8 | % See also structtoxml, (scheduling toolbox) 9 | 10 | % Author(s): M. Kutil, V. Navratil 11 | % Copyright (c) 2005 12 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 13 | 14 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/xmltostruct.m: -------------------------------------------------------------------------------- 1 | % struct= xml2struct(xmlfile,'validating',rncfile,'mixedContendEnabled',1) 2 | % 3 | % 4 | 5 | %---Validating xmlfile with rncfile -RELAX NG (compact syntax) 6 | %for i=1:length(varargin) 7 | % if strcmp(varargin{i},'-validating') 8 | % rncfile=varargin{i+1}; 9 | % break; 10 | % end 11 | %end 12 | %isValidating=any(strcmp(varargin,'-validating')); 13 | %isValidatingFunction=exist('validrnc','file')~=0; 14 | %if (isValidating & isValidatingFunction) 15 | % isXmlValid=validrnc(xmlfile,rncfile); 16 | %end 17 | 18 | -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/cssim/lwdf.m: -------------------------------------------------------------------------------- 1 | function Y=lwdf(X) 2 | 3 | %Arithmetic Units Declaration 4 | struct('operator','+','number',2,'proctime',1,'latency',1); 5 | struct('operator','*','number',1,'proctime',1,'latency',2); 6 | 7 | struct('frequency',2000000); 8 | 9 | %Variables Declaration 10 | K = 10000; 11 | 12 | alpha = 0.375; 13 | %alpha = 0.7; 14 | 15 | 16 | %I = num2cell(simout); 17 | I = ones(1,K); 18 | 19 | a = zeros(1,K); 20 | b = zeros(1,K); 21 | c = zeros(1,K); 22 | d = zeros(1,K); 23 | Y = zeros(1,K); 24 | 25 | 26 | %Iterative Algorithm 27 | for k=3:K 28 | a(k) = X(k) - c(k-2); 29 | b(k) = a(k) * alpha; 30 | c(k) = b(k) + X(k); 31 | d(k) = b(k) + c(k-2); 32 | Y(k) = X(k-1) + d(k); 33 | end 34 | 35 | 36 | Y 37 | 38 | 39 | -------------------------------------------------------------------------------- /scheduling/stdemos/dsvf.txt: -------------------------------------------------------------------------------- 1 | %Code for dsvf_demo 2 | 3 | #1 4 | in 0 5 | x(8) = 0.0079 * x(7); 6 | in 3 7 | x(1) = x(8); 8 | endparam 9 | 10 | #2 11 | in 0 12 | x(9) = L + x(1); 13 | in 1 14 | L = x(9); 15 | endparam 16 | 17 | #3 18 | in 0 19 | x(10) = 0.5 * x(7); 20 | in 3 21 | x(3) = x(10); 22 | endparam 23 | 24 | #4 25 | in 0 26 | x(11) = I - L; 27 | in 1 28 | x(4) = x(11); 29 | endparam 30 | 31 | #5 32 | in 0 33 | x(12) = x(4) - x(3); 34 | in 1 35 | x(5) = x(12); 36 | endparam 37 | 38 | #6 39 | in 0 40 | x(13) = 0.0079 * x(5); 41 | in 3 42 | x(6) = x(13); 43 | endparam 44 | 45 | #7 46 | in 0 47 | x(14) = x(6) + x(7); 48 | in 1 49 | x(7) = x(14); 50 | endparam 51 | 52 | #8 53 | in 0 54 | x(9) = x(5) + L; 55 | in 1 56 | x(2) = x(9); 57 | endparam 58 | -------------------------------------------------------------------------------- /scheduling/stdemos/soldiers.txt: -------------------------------------------------------------------------------- 1 | %Code for soldiers_demo 2 | 3 | UserParam.begin 4 | pause(0.1) 5 | cnt = floor(t+sampleTime); 6 | if cnt == t 7 | w=vrworld('soldiers.wrl'); 8 | open(w) 9 | node = vrnode(w,'Counter'); 10 | str{1} = {num2str(cnt)}; 11 | setfield(node,'string', str{1}) %#ok 12 | close(w) 13 | end 14 | endparam 15 | 16 | #1 17 | repeat 0:1:19 18 | Soldier1(1) = Soldier1(1) + 9/20; 19 | Soldier2(1) = Soldier2(1) + 9/20; 20 | endparam 21 | 22 | #2 23 | repeat 0:1:19 24 | Soldier2(1) = Soldier2(1) - 9/20; 25 | endparam 26 | 27 | #3 28 | repeat 0:1:89 29 | Soldier3(1) = Soldier3(1) + 9/90; 30 | Soldier4(1) = Soldier4(1) + 9/90; 31 | endparam 32 | 33 | #4 34 | repeat 0:1:9 35 | Soldier1(1) = Soldier1(1) - 9/10; 36 | endparam 37 | 38 | #5 39 | repeat 0:1:19 40 | Soldier1(1) = Soldier1(1) + 9/20; 41 | Soldier2(1) = Soldier2(1) + 9/20; 42 | endparam -------------------------------------------------------------------------------- /scheduling/stdemos/soldiers2.txt: -------------------------------------------------------------------------------- 1 | %Code for soldiers_demo 2 | 3 | UserParam.begin 4 | pause(0.1) 5 | cnt = floor(t+sampleTime); 6 | if cnt == t 7 | w=vrworld('soldiers.wrl'); 8 | open(w) 9 | node = vrnode(w,'Counter'); 10 | str{1} = {num2str(cnt)}; 11 | setfield(node,'string', str{1}) %#ok 12 | close(w) 13 | end 14 | endparam 15 | 16 | #1 17 | repeat 0:1:19 18 | Soldier1(1) = Soldier1(1) + 9/20; 19 | Soldier2(1) = Soldier2(1) + 9/20; 20 | endparam 21 | 22 | #2 23 | repeat 0:1:9 24 | Soldier1(1) = Soldier1(1) - 9/10; 25 | endparam 26 | 27 | #3 28 | repeat 0:1:49 29 | Soldier1(1) = Soldier1(1) + 9/50; 30 | Soldier3(1) = Soldier3(1) + 9/50; 31 | endparam 32 | 33 | #4 34 | repeat 0:1:9 35 | Soldier1(1) = Soldier1(1) - 9/10; 36 | endparam 37 | 38 | #5 39 | repeat 0:1:89 40 | Soldier1(1) = Soldier1(1) + 9/90; 41 | Soldier4(1) = Soldier4(1) + 9/90; 42 | endparam 43 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/structtoxml.m: -------------------------------------------------------------------------------- 1 | %STRUCTTOXML convert struct to xml. 2 | % docNode = STRUCTTOXML(struct) returns matlab (java) xml docNode 3 | % converted from (xml)struct. 4 | % 5 | % (xml)struct can include folowing fields: 6 | % struct.tag - xml tag name (char data type) 7 | % struct.attribut - struct with attributs for tag 8 | % struct.comment - comments in tag 9 | % struct.comment_pre - comments before tag 10 | % struct.data - data inside the tag. Allowed data types are 11 | % chars or cell with (xml)structs. 12 | % 13 | % Attribut example 14 | % struct.attribut.name = 'Name'; 15 | % struct.attribut.year = '1995'; 16 | % ouput: 17 | % 18 | % See also vartostruct 19 | 20 | % Author(s): M. Kutil 21 | % Copyright (c) 2005 22 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 23 | 24 | -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/cssim/dsvf.m: -------------------------------------------------------------------------------- 1 | function L=dsvf(I) 2 | 3 | %Arithmetic Units Declaration 4 | struct('operator','+','number',2,'proctime',1,'latency',2); 5 | struct('operator','*','number',1,'proctime',1,'latency',2); 6 | 7 | struct('frequency',220000); 8 | 9 | %Variables Declaration 10 | f = 50; 11 | fs = 40000; 12 | Q = 2; 13 | K = 1000; 14 | 15 | F1 = 0.0079; %2*pi*f/fs ||| ??? 2*sin(pi*f/fs) 16 | Q1 = 0.5; %1/Q; 17 | 18 | 19 | %I = num2cell(simout); 20 | I = ones(1,K); 21 | 22 | L = zeros(1,K); 23 | B = zeros(1,K); 24 | H = zeros(1,K); 25 | N = zeros(1,K); 26 | FB = zeros(1,K); 27 | QB = zeros(1,K); 28 | IL = zeros(1,K); 29 | FH = zeros(1,K); 30 | 31 | 32 | %Iterative Algorithm 33 | for k=2:K 34 | FB(k) = F1 * B(k-1); 35 | L(k) = L(k-1) + FB(k); %L = L + F1 * B 36 | QB(k) = Q1 * B(k-1); 37 | IL(k) = I(k) - L(k); 38 | H(k) = IL(k) - QB(k); %H = I - L -Q1*B 39 | FH(k) = F1 * H(k); 40 | B(k) = FH(k) + B(k-1); %B = F1 * H +B 41 | N(k) = H(k) + L(k); %N = H + L 42 | end 43 | 44 | 45 | L 46 | 47 | -------------------------------------------------------------------------------- /scheduling/contrib/matlabxml/Contents.m: -------------------------------------------------------------------------------- 1 | % MatlabXML Toolbox. 2 | % Version 0.0.3 12-Oct-2007 3 | % 4 | % General objects of toolbox 5 | % vartostruct - Convert variables to (xml)structure 6 | % structtoxml - Convert (xml)structure to xml 7 | % xmlsave - Save varibles to file in xml format 8 | % 9 | % Utility function 10 | % celltostruct - Convert cell to (xml)struct 11 | % doubletostruct - Convert double to (xml)struct 12 | % chartostruct - Convert char to (xml)struct 13 | % structtostruct - Convert struct to (xml)struct 14 | % logicaltostruct - Convert logical to (xml)struct 15 | % 16 | % TORSCHE Scheduling Toolbox for Matlab support function 17 | % ( http://rtime.felk.cvut.cz/scheduling-toolbox ) 18 | % tasktostruct - Convert task to (xml)struct 19 | % tasksettostruct - Convert taskset to (xml)struct 20 | % graphicparamtostruct - Convert graphic params from schedobj to (xml)struct 21 | % edgetostruct - Convert edge to (xml)struct 22 | % nodetostruct - Convert node to (xml)struct 23 | % graphtostruct - Convert graph to (xml)struct 24 | 25 | % Michal Kutil (kutilm@fel.cvut.cz - http://www.tim.cz) 26 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 27 | 28 | -------------------------------------------------------------------------------- /scheduling/sat/zchaff_to_win.patch: -------------------------------------------------------------------------------- 1 | diff -uN distr/zchaff_utils.cpp win/zchaff_utils.cpp 2 | --- distr/zchaff_utils.cpp 2006-09-27 17:43:51.000000000 +0200 3 | +++ win/zchaff_utils.cpp 2006-09-27 17:43:33.000000000 +0200 4 | @@ -37,8 +37,8 @@ 5 | #include 6 | #include 7 | #include 8 | -#include 9 | -#include 10 | +#include 11 | + 12 | 13 | int _global_debug_leveli = 0; 14 | 15 | @@ -79,11 +79,5 @@ 16 | } 17 | 18 | double get_cpu_time(void) { 19 | - double res; 20 | - struct rusage usage; 21 | - getrusage(RUSAGE_SELF, &usage); 22 | - res = usage.ru_utime.tv_usec + usage.ru_stime.tv_usec; 23 | - res *= 1e-6; 24 | - res += usage.ru_utime.tv_sec + usage.ru_stime.tv_sec; 25 | - return res; 26 | + return (double)clock()/(double)(CLOCKS_PER_SEC); 27 | } 28 | diff -uN distr/zverify_df.cpp win/zverify_df.cpp 29 | --- distr/zverify_df.cpp 2006-09-27 17:43:51.000000000 +0200 30 | +++ win/zverify_df.cpp 2006-09-27 17:43:33.000000000 +0200 31 | @@ -33,8 +33,6 @@ 32 | // of the possibility of those damages. 33 | // ********************************************************************* 34 | 35 | -#include 36 | -#include 37 | #include 38 | #include 39 | #include 40 | -------------------------------------------------------------------------------- /scheduling/private/visisfunctionbase2.m: -------------------------------------------------------------------------------- 1 | function [sys,x0,str,ts] = visisfunctionbase2(t,x,u,flag,sampleTime,TS,period) 2 | %Automatically generated S-Function 3 | 4 | switch flag 5 | case 0 6 | %initialize 7 | [sys,x0,str,ts]=mdlInitializeSizes(t,x,u,sampleTime,period,TS); 8 | case 2 9 | %Update discrete states 10 | sys=mdlUpdate(t+sampleTime,x,u,sampleTime,period,TS); 11 | case 3 12 | %Update discrete outputs 13 | sys=mdlOutputs(x); 14 | case 9 15 | %Terminate 16 | sys=mdlTerminate(); 17 | otherwise 18 | error(['Unhandled flag ',num2str(flag)]); 19 | end 20 | 21 | %% 22 | %Initialize 23 | function [sys,x0,str,ts]=mdlInitializeSizes(t,x,u,sampleTime,period,TS) 24 | 25 | sizes = simsizes; 26 | sizes.NumContStates = 0; 27 | sizes.NumDiscStates = 0; 28 | sizes.NumOutputs = 0; 29 | sizes.NumInputs = 0; 30 | sizes.DirFeedthrough = 1; 31 | sizes.NumSampleTimes = 1; 32 | 33 | sys = simsizes(sizes); 34 | x0 = []; 35 | str = []; 36 | ts = [-1 0]; 37 | 38 | %% 39 | %Update discrete states 40 | function sys=mdlUpdate(t,x,u,sampleTime,period,TS) 41 | 42 | sys = []; 43 | 44 | %% 45 | %Update discrete outputs 46 | function sys=mdlOutputs(x) 47 | 48 | sys = []; 49 | 50 | %% 51 | %Terminate 52 | function sys=mdlTerminate() 53 | 54 | sys = []; 55 | -------------------------------------------------------------------------------- /scheduling/private/visisfunctionbase.m: -------------------------------------------------------------------------------- 1 | function [sys,x0,str,ts] = visisfunctionbase(t,x,u,flag,file,sampleTime,TS,period) 2 | %Automatically generated S-Function 3 | 4 | switch flag 5 | case 0 6 | %initialize 7 | [sys,x0,str,ts]=mdlInitializeSizes(t,x,u,file,sampleTime,period,TS); 8 | case 2 9 | %Update discrete states 10 | sys=mdlUpdate(t+sampleTime,x,u,file,sampleTime,period,TS); 11 | case 3 12 | %Update discrete outputs 13 | sys=mdlOutputs(x); 14 | case 9 15 | %Terminate 16 | sys=mdlTerminate(); 17 | otherwise 18 | error(['Unhandled flag ',num2str(flag)]); 19 | end 20 | 21 | %% 22 | %Initialize 23 | function [sys,x0,str,ts]=mdlInitializeSizes(t,x,u,file,sampleTime,period,TS) 24 | 25 | sizes = simsizes; 26 | sizes.NumContStates = 0; 27 | sizes.NumDiscStates = 0; 28 | sizes.NumOutputs = 0; 29 | sizes.NumInputs = 0; 30 | sizes.DirFeedthrough = 1; 31 | sizes.NumSampleTimes = 1; 32 | 33 | sys = simsizes(sizes); 34 | x0 = []; 35 | str = []; 36 | ts = [-1 0]; 37 | 38 | %% 39 | %Update discrete states 40 | function sys=mdlUpdate(t,x,u,file,sampleTime,period,TS) 41 | 42 | sys = []; 43 | 44 | %% 45 | %Update discrete outputs 46 | function sys=mdlOutputs(x) 47 | 48 | sys = []; 49 | 50 | %% 51 | %Terminate 52 | function sys=mdlTerminate() 53 | 54 | sys = []; 55 | -------------------------------------------------------------------------------- /scheduling/private/grapheditplugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Finds Hamilton circuit in a graph 8 | 9 | graph\hamiltoncircuit.m 10 | 11 | 12 | 13 | Pohodi graph do workspace matlabu 14 | 15 | graphtoworkspace 16 | 17 | 18 | 19 | 20 | Graphics plugins 21 | 22 | 23 | nodestocolor.m 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | Creates graph with ordered number of nodes 32 | 33 | createnodes 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | plugin\pluginisselfloop 42 | 43 | 44 | 45 | pluginiscyclic 46 | 47 | 48 | 49 | pluginissimple 50 | 51 | 52 | -------------------------------------------------------------------------------- /scheduling/stdemos/benchmarks/cssim/psd.m: -------------------------------------------------------------------------------- 1 | function u = psd(e) 2 | 3 | 4 | %Arithmetic Units Declaration 5 | struct('operator','null','number',1,'proctime',1,'latency',1); 6 | struct('operator','+','number',1,'proctime',1,'latency',9); 7 | struct('operator','*','number',1,'proctime',1,'latency',2); 8 | struct('operator','/','number',1,'proctime',1,'latency',2); 9 | struct('operator','ifmin','number',1,'proctime',1,'latency',1); 10 | struct('operator','ifmax','number',1,'proctime',1,'latency',1); 11 | 12 | struct('frequency',48); 13 | 14 | %Variables Declaration 15 | K=10; 16 | si1=0; 17 | si2=0; 18 | si3=0; 19 | si4=0; 20 | s1=0; 21 | s2=0; 22 | s3=0; 23 | sd1=0; 24 | sd2=0; 25 | sd3=0; 26 | KK=0.85; 27 | ke=0; 28 | T=0.5; 29 | Ti=4.25; 30 | Td=1.24; 31 | umax=10; 32 | umin=-10; 33 | smin=-10; 34 | smax=10; 35 | c1=0.11765; %T/Ti 36 | c2=2.48; %Td/T 37 | 38 | 39 | %Iterative Algorithm 40 | for k=2:K-1 41 | ke(k)= e(k)*KK; 42 | si3(k) = ifmax(si2(k-1),smax); 43 | si4(k) = ifmin(si3(k),smin); 44 | si1(k) = c1*ke(k); 45 | si2(k) = si1(k)+si4(k); 46 | sd2(k) = sd1(k-1); 47 | sd1(k) = c2*ke(k); 48 | sd3(k) = sd1(k)-sd2(k); 49 | s1(k) = ke(k)+si4(k); 50 | s2(k) = s1(k)+sd3(k); 51 | s3(k) = ifmax(s2(k),umax); 52 | u(k) = ifmin(s3(k),umin); 53 | end 54 | 55 | 56 | %Subfunctions 57 | function y=ifmin(a1,a2) 58 | if(a1a2) 67 | y=a2; 68 | else 69 | y=a1; 70 | end 71 | return 72 | 73 | 74 | -------------------------------------------------------------------------------- /scheduling/@job/display.m: -------------------------------------------------------------------------------- 1 | function display(this) 2 | %DISPLAY Display Job 3 | % 4 | % Synopsis 5 | % DISPLAY(J) 6 | 7 | % Author: Jiri Cigler 8 | % Originator: Michal Kutil 9 | % Originator: Premysl Sucha 10 | % Project Responsible: Zdenek Hanzalek 11 | % Department of Control Engineering 12 | % FEE CTU in Prague, Czech Republic 13 | % Copyright (c) 2004 - 2009 14 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 15 | 16 | 17 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 18 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 19 | % and modified under the next licenses 20 | % 21 | % - GPL - GNU General Public License 22 | % 23 | % - and other licenses added by project originators or responsible 24 | % 25 | % Code can be modified and re-distributed under any combination 26 | % of the above listed licenses. If a contributor does not agree 27 | % with some of the licenses, he/she can delete appropriate line. 28 | % If you delete all lines, you are not allowed to distribute 29 | % source code and/or binaries utilizing code. 30 | % 31 | % -------------------------------------------------------------- 32 | % GNU General Public License 33 | % 34 | % TORSCHE Scheduling Toolbox for Matlab is free software; 35 | % you can redistribute it and/or modify it under the terms of the 36 | % GNU General Public License as published by the Free Software 37 | % Foundation; either version 2 of the License, or (at your option) 38 | % any later version. 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 41 | % that it will be useful, but WITHOUT ANY WARRANTY; 42 | % without even the implied warranty of MERCHANTABILITY or 43 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | % General Public License for more details. 45 | % 46 | % You should have received a copy of the GNU General Public License 47 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 48 | % to the Free Software Foundation, Inc., 59 Temple Place, 49 | % Suite 330, Boston, MA 02111-1307 USA 50 | 51 | 52 | 53 | disp(['Job with ',int2str(size(this.taskset.tasks, 2)),' tasks']); 54 | end 55 | 56 | %end .. @job/display 57 | -------------------------------------------------------------------------------- /scheduling/@ptask/display.m: -------------------------------------------------------------------------------- 1 | function display(T) 2 | %DISPLAY Display ptask 3 | % 4 | % Syntax 5 | % DISPLAY(T) 6 | 7 | 8 | % Author: Michal Kutil 9 | % Originator: Michal Kutil 10 | % Originator: Premysl Sucha 11 | % Project Responsible: Zdenek Hanzalek 12 | % Department of Control Engineering 13 | % FEE CTU in Prague, Czech Republic 14 | % Copyright (c) 2004 - 2009 15 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 16 | 17 | 18 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 19 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 20 | % and modified under the next licenses 21 | % 22 | % - GPL - GNU General Public License 23 | % 24 | % - and other licenses added by project originators or responsible 25 | % 26 | % Code can be modified and re-distributed under any combination 27 | % of the above listed licenses. If a contributor does not agree 28 | % with some of the licenses, he/she can delete appropriate line. 29 | % If you delete all lines, you are not allowed to distribute 30 | % source code and/or binaries utilizing code. 31 | % 32 | % -------------------------------------------------------------- 33 | % GNU General Public License 34 | % 35 | % TORSCHE Scheduling Toolbox for Matlab is free software; 36 | % you can redistribute it and/or modify it under the terms of the 37 | % GNU General Public License as published by the Free Software 38 | % Foundation; either version 2 of the License, or (at your option) 39 | % any later version. 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 42 | % that it will be useful, but WITHOUT ANY WARRANTY; 43 | % without even the implied warranty of MERCHANTABILITY or 44 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 45 | % General Public License for more details. 46 | % 47 | % You should have received a copy of the GNU General Public License 48 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 49 | % to the Free Software Foundation, Inc., 59 Temple Place, 50 | % Suite 330, Boston, MA 02111-1307 USA 51 | 52 | 53 | 54 | T.task 55 | disp([' Period: ',int2str(T.Period)]); 56 | 57 | -------------------------------------------------------------------------------- /scheduling/info.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 29 | 30 | 13 31 | TORSCHE Scheduling Toolbox for Matlab 32 | toolbox 33 | $toolbox/matlab/icons/matlabicon.gif 34 | 35 | 36 | 37 | 38 | 39 | graphedit 40 | $toolbox/matlab/icons/figureicon.gif 41 | 42 | 43 | 44 | 45 | doc scheduling 46 | $toolbox/matlab/icons/book_mat.gif 47 | 48 | 49 | 50 | 51 | demo toolbox TORSCHE 52 | $toolbox/matlab/icons/demoicon.gif 53 | 54 | 55 | 56 | 57 | web http://rtime.felk.cvut.cz/scheduling-toolbox/ -browser; 58 | $toolbox/matlab/icons/webicon.gif 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /scheduling/@shop/private/shopTypes.m: -------------------------------------------------------------------------------- 1 | function t = shopTypes() 2 | % SHOPTYPES Return cell of shop types 3 | % 4 | % Synopsis 5 | % t = SHOPTYPES() 6 | % 7 | % Description 8 | % Return cell of shop types. 9 | % 10 | 11 | 12 | % Author: Jiri Cigler 13 | % Originator: Michal Kutil 14 | % Originator: Premysl Sucha 15 | % Project Responsible: Zdenek Hanzalek 16 | % Department of Control Engineering 17 | % FEE CTU in Prague, Czech Republic 18 | % Copyright (c) 2004 - 2009 19 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 20 | 21 | 22 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 23 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 24 | % and modified under the next licenses 25 | % 26 | % - GPL - GNU General Public License 27 | % 28 | % - and other licenses added by project originators or responsible 29 | % 30 | % Code can be modified and re-distributed under any combination 31 | % of the above listed licenses. If a contributor does not agree 32 | % with some of the licenses, he/she can delete appropriate line. 33 | % If you delete all lines, you are not allowed to distribute 34 | % source code and/or binaries utilizing code. 35 | % 36 | % -------------------------------------------------------------- 37 | % GNU General Public License 38 | % 39 | % TORSCHE Scheduling Toolbox for Matlab is free software; 40 | % you can redistribute it and/or modify it under the terms of the 41 | % GNU General Public License as published by the Free Software 42 | % Foundation; either version 2 of the License, or (at your option) 43 | % any later version. 44 | % 45 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 46 | % that it will be useful, but WITHOUT ANY WARRANTY; 47 | % without even the implied warranty of MERCHANTABILITY or 48 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 49 | % General Public License for more details. 50 | % 51 | % You should have received a copy of the GNU General Public License 52 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 53 | % to the Free Software Foundation, Inc., 59 Temple Place, 54 | % Suite 330, Boston, MA 02111-1307 USA 55 | 56 | 57 | t = {'J','F','O','none'}; 58 | end 59 | -------------------------------------------------------------------------------- /scheduling/stdemos/simple_init.m: -------------------------------------------------------------------------------- 1 | function simple_init 2 | % 3 | % This document was automatically generated by Code Generator for Scheduling toolbox 4 | % 5 | 6 | ttInitKernel(1,1,'prioFP');% nbrOfInputs, nbrOfOutputs, fixed priority 7 | 8 | data.frequency=48; %simulation frequency 9 | data.reg1=0; % initialization of variable si1 10 | data.reg2=0; % initialization of variable si2 11 | data.reg3=0; % initialization of variable si3 12 | data.reg4=0; % initialization of variable si4 13 | data.reg5=0; % initialization of variable s1 14 | data.reg6=0; % initialization of variable s2 15 | data.reg7=0; % initialization of variable s3 16 | data.reg8=0; % initialization of variable sd1 17 | data.reg9=0; % initialization of variable sd2 18 | data.reg10=0; % initialization of variable sd3 19 | data.reg11=0; % initialization of variable ke 20 | data.reg12=0; % initialization of variable u 21 | data.units.unit1= [0,0]; % initialization of unit null 22 | data.units.unit2= [0,0,0,0,0,0,0,0,0,0]; % initialization of unit + 23 | data.units.unit3= [0,0,0]; % initialization of unit * 24 | data.units.unit4= [0,0,0]; % initialization of unit / 25 | data.units.unit5= [0,0]; % initialization of unit ifmin 26 | data.units.unit6= [0,0]; % initialization of unit ifmax 27 | data.units.unit7= [0,0]; % initialization of unit null 28 | data.units.unit8= [0,0]; % initialization of unit zero 29 | data.const1=10; % initialization of constant K 30 | data.const2=0.85; % initialization of constant KK 31 | data.const3=0.5; % initialization of constant T 32 | data.const4=4.25; % initialization of constant Ti 33 | data.const5=1.24; % initialization of constant Td 34 | data.const6=10; % initialization of constant umax 35 | data.const7=-10; % initialization of constant umin 36 | data.const8=-10; % initialization of constant smin 37 | data.const9=10; % initialization of constant smax 38 | data.const10=0.11765; % initialization of constant c1 39 | data.const11=2.48; % initialization of constant c2 40 | w=24; 41 | period = w/data.frequency; 42 | deadline = period; 43 | offset = 0; 44 | prio = 1; 45 | ttCreatePeriodictask('task1', offset, period, prio, 'code', data); 46 | -------------------------------------------------------------------------------- /scheduling/@taskset/vertcat.m: -------------------------------------------------------------------------------- 1 | function setoftasks = vertcat(varargin) 2 | %VERTCAT Error function for collumn vector 3 | % See also TASKSET. 4 | 5 | 6 | % Author: Michal Kutil 7 | % Originator: Michal Kutil 8 | % Originator: Premysl Sucha 9 | % Project Responsible: Zdenek Hanzalek 10 | % Department of Control Engineering 11 | % FEE CTU in Prague, Czech Republic 12 | % Copyright (c) 2004 - 2009 13 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 14 | 15 | 16 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 17 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 18 | % and modified under the next licenses 19 | % 20 | % - GPL - GNU General Public License 21 | % 22 | % - and other licenses added by project originators or responsible 23 | % 24 | % Code can be modified and re-distributed under any combination 25 | % of the above listed licenses. If a contributor does not agree 26 | % with some of the licenses, he/she can delete appropriate line. 27 | % If you delete all lines, you are not allowed to distribute 28 | % source code and/or binaries utilizing code. 29 | % 30 | % -------------------------------------------------------------- 31 | % GNU General Public License 32 | % 33 | % TORSCHE Scheduling Toolbox for Matlab is free software; 34 | % you can redistribute it and/or modify it under the terms of the 35 | % GNU General Public License as published by the Free Software 36 | % Foundation; either version 2 of the License, or (at your option) 37 | % any later version. 38 | % 39 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 40 | % that it will be useful, but WITHOUT ANY WARRANTY; 41 | % without even the implied warranty of MERCHANTABILITY or 42 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 43 | % General Public License for more details. 44 | % 45 | % You should have received a copy of the GNU General Public License 46 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 47 | % to the Free Software Foundation, Inc., 59 Temple Place, 48 | % Suite 330, Boston, MA 02111-1307 USA 49 | 50 | 51 | error('Set of tasks must be only row vector!'); 52 | %end .. @taskset/vertcat 53 | -------------------------------------------------------------------------------- /scheduling/@graph/private/getemptyvalues.m: -------------------------------------------------------------------------------- 1 | function emptyValues = getemptyvalues(dataTypes) 2 | % return empty values for detaType 3 | 4 | % Author: Michal Kutil 5 | % Originator: Michal Kutil 6 | % Originator: Premysl Sucha 7 | % Project Responsible: Zdenek Hanzalek 8 | % Department of Control Engineering 9 | % FEE CTU in Prague, Czech Republic 10 | % Copyright (c) 2004 - 2009 11 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 12 | 13 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 14 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 15 | % and modified under the next licenses 16 | % 17 | % - GPL - GNU General Public License 18 | % 19 | % - and other licenses added by project originators or responsible 20 | % 21 | % Code can be modified and re-distributed under any combination 22 | % of the above listed licenses. If a contributor does not agree 23 | % with some of the licenses, he/she can delete appropriate line. 24 | % If you delete all lines, you are not allowed to distribute 25 | % source code and/or binaries utilizing code. 26 | % 27 | % -------------------------------------------------------------- 28 | % GNU General Public License 29 | % 30 | % TORSCHE Scheduling Toolbox for Matlab is free software; 31 | % you can redistribute it and/or modify it under the terms of the 32 | % GNU General Public License as published by the Free Software 33 | % Foundation; either version 2 of the License, or (at your option) 34 | % any later version. 35 | % 36 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 37 | % that it will be useful, but WITHOUT ANY WARRANTY; 38 | % without even the implied warranty of MERCHANTABILITY or 39 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 40 | % General Public License for more details. 41 | % 42 | % You should have received a copy of the GNU General Public License 43 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 44 | % to the Free Software Foundation, Inc., 59 Temple Place, 45 | % Suite 330, Boston, MA 02111-1307 USA 46 | 47 | 48 | emptyValues = cell(1,length(dataTypes)); 49 | for i = 1:length(dataTypes) 50 | emptyValues{i} = eval([dataTypes{i} '([])']); 51 | end 52 | -------------------------------------------------------------------------------- /scheduling/@edge/display.m: -------------------------------------------------------------------------------- 1 | function display(E) 2 | %DISPLAY Display edge 3 | % 4 | % Syntax 5 | % DISPLAY(E) 6 | 7 | % Author: Michal Kutil 8 | % Originator: Michal Kutil 9 | % Originator: Premysl Sucha 10 | % Project Responsible: Zdenek Hanzalek 11 | % Department of Control Engineering 12 | % FEE CTU in Prague, Czech Republic 13 | % Copyright (c) 2004 - 2009 14 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 15 | 16 | 17 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 18 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 19 | % and modified under the next licenses 20 | % 21 | % - GPL - GNU General Public License 22 | % 23 | % - and other licenses added by project originators or responsible 24 | % 25 | % Code can be modified and re-distributed under any combination 26 | % of the above listed licenses. If a contributor does not agree 27 | % with some of the licenses, he/she can delete appropriate line. 28 | % If you delete all lines, you are not allowed to distribute 29 | % source code and/or binaries utilizing code. 30 | % 31 | % -------------------------------------------------------------- 32 | % GNU General Public License 33 | % 34 | % TORSCHE Scheduling Toolbox for Matlab is free software; 35 | % you can redistribute it and/or modify it under the terms of the 36 | % GNU General Public License as published by the Free Software 37 | % Foundation; either version 2 of the License, or (at your option) 38 | % any later version. 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 41 | % that it will be useful, but WITHOUT ANY WARRANTY; 42 | % without even the implied warranty of MERCHANTABILITY or 43 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | % General Public License for more details. 45 | % 46 | % You should have received a copy of the GNU General Public License 47 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 48 | % to the Free Software Foundation, Inc., 59 Temple Place, 49 | % Suite 330, Boston, MA 02111-1307 USA 50 | 51 | 52 | if length(E) > 1 53 | disp (['Set of ', int2str(length(E)), ' edges']); 54 | else 55 | disp(['Edge "',E.Name,'"']); 56 | end 57 | %end .. @edge/display 58 | -------------------------------------------------------------------------------- /scheduling/@node/display.m: -------------------------------------------------------------------------------- 1 | function display(N) 2 | %DISPLAY Display node 3 | % 4 | % Syntax 5 | % DISPLAY(N) 6 | 7 | 8 | % Author: Michal Kutil 9 | % Originator: Michal Kutil 10 | % Originator: Premysl Sucha 11 | % Project Responsible: Zdenek Hanzalek 12 | % Department of Control Engineering 13 | % FEE CTU in Prague, Czech Republic 14 | % Copyright (c) 2004 - 2009 15 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 16 | 17 | 18 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 19 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 20 | % and modified under the next licenses 21 | % 22 | % - GPL - GNU General Public License 23 | % 24 | % - and other licenses added by project originators or responsible 25 | % 26 | % Code can be modified and re-distributed under any combination 27 | % of the above listed licenses. If a contributor does not agree 28 | % with some of the licenses, he/she can delete appropriate line. 29 | % If you delete all lines, you are not allowed to distribute 30 | % source code and/or binaries utilizing code. 31 | % 32 | % -------------------------------------------------------------- 33 | % GNU General Public License 34 | % 35 | % TORSCHE Scheduling Toolbox for Matlab is free software; 36 | % you can redistribute it and/or modify it under the terms of the 37 | % GNU General Public License as published by the Free Software 38 | % Foundation; either version 2 of the License, or (at your option) 39 | % any later version. 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 42 | % that it will be useful, but WITHOUT ANY WARRANTY; 43 | % without even the implied warranty of MERCHANTABILITY or 44 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 45 | % General Public License for more details. 46 | % 47 | % You should have received a copy of the GNU General Public License 48 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 49 | % to the Free Software Foundation, Inc., 59 Temple Place, 50 | % Suite 330, Boston, MA 02111-1307 USA 51 | 52 | 53 | if length(N) > 1 54 | disp (['Set of ', int2str(length(N)), ' nodes']); 55 | else 56 | disp(['Node "',N.Name,'"']); 57 | end 58 | %end .. @node/display 59 | -------------------------------------------------------------------------------- /scheduling/@graph/display.m: -------------------------------------------------------------------------------- 1 | function display(G) 2 | %DISPLAY Display graph 3 | % 4 | % Syntax 5 | % DISPLAY(G) 6 | 7 | 8 | % Author: Michal Kutil 9 | % Originator: Michal Kutil 10 | % Originator: Premysl Sucha 11 | % Project Responsible: Zdenek Hanzalek 12 | % Department of Control Engineering 13 | % FEE CTU in Prague, Czech Republic 14 | % Copyright (c) 2004 - 2009 15 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 16 | 17 | 18 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 19 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 20 | % and modified under the next licenses 21 | % 22 | % - GPL - GNU General Public License 23 | % 24 | % - and other licenses added by project originators or responsible 25 | % 26 | % Code can be modified and re-distributed under any combination 27 | % of the above listed licenses. If a contributor does not agree 28 | % with some of the licenses, he/she can delete appropriate line. 29 | % If you delete all lines, you are not allowed to distribute 30 | % source code and/or binaries utilizing code. 31 | % 32 | % -------------------------------------------------------------- 33 | % GNU General Public License 34 | % 35 | % TORSCHE Scheduling Toolbox for Matlab is free software; 36 | % you can redistribute it and/or modify it under the terms of the 37 | % GNU General Public License as published by the Free Software 38 | % Foundation; either version 2 of the License, or (at your option) 39 | % any later version. 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 42 | % that it will be useful, but WITHOUT ANY WARRANTY; 43 | % without even the implied warranty of MERCHANTABILITY or 44 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 45 | % General Public License for more details. 46 | % 47 | % You should have received a copy of the GNU General Public License 48 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 49 | % to the Free Software Foundation, Inc., 59 Temple Place, 50 | % Suite 330, Boston, MA 02111-1307 USA 51 | 52 | 53 | disp([' ']); 54 | if size(G.Name,1) 55 | disp(['Graph "',G.Name,'"']); 56 | end 57 | disp([' adjacency matrix:']); 58 | disp(adj(G)); 59 | 60 | %end .. @graph/display 61 | -------------------------------------------------------------------------------- /scheduling/@ptask/util.m: -------------------------------------------------------------------------------- 1 | function u = util(ptask) 2 | %UTIL gets utilization of periodic task 3 | % 4 | % U = UTIL(PTASK) returns a nuber equal to execution time divided 5 | % by a period of the task. 6 | 7 | 8 | % Author: Michal Sojka 9 | % Author: Michal Kutil 10 | % Originator: Michal Kutil 11 | % Originator: Premysl Sucha 12 | % Project Responsible: Zdenek Hanzalek 13 | % Department of Control Engineering 14 | % FEE CTU in Prague, Czech Republic 15 | % Copyright (c) 2004 - 2009 16 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 17 | 18 | 19 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 20 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 21 | % and modified under the next licenses 22 | % 23 | % - GPL - GNU General Public License 24 | % 25 | % - and other licenses added by project originators or responsible 26 | % 27 | % Code can be modified and re-distributed under any combination 28 | % of the above listed licenses. If a contributor does not agree 29 | % with some of the licenses, he/she can delete appropriate line. 30 | % If you delete all lines, you are not allowed to distribute 31 | % source code and/or binaries utilizing code. 32 | % 33 | % -------------------------------------------------------------- 34 | % GNU General Public License 35 | % 36 | % TORSCHE Scheduling Toolbox for Matlab is free software; 37 | % you can redistribute it and/or modify it under the terms of the 38 | % GNU General Public License as published by the Free Software 39 | % Foundation; either version 2 of the License, or (at your option) 40 | % any later version. 41 | % 42 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 43 | % that it will be useful, but WITHOUT ANY WARRANTY; 44 | % without even the implied warranty of MERCHANTABILITY or 45 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 46 | % General Public License for more details. 47 | % 48 | % You should have received a copy of the GNU General Public License 49 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 50 | % to the Free Software Foundation, Inc., 59 Temple Place, 51 | % Suite 330, Boston, MA 02111-1307 USA 52 | 53 | 54 | 55 | u = get(ptask, 'ProcTime') / ptask.Period; 56 | -------------------------------------------------------------------------------- /scheduling/spntl/make.m: -------------------------------------------------------------------------------- 1 | function make 2 | %MAKE makefile for SPNTL algorithm 3 | % 4 | 5 | 6 | % Author: Premysl Sucha 7 | % Originator: Michal Kutil 8 | % Originator: Premysl Sucha 9 | % Project Responsible: Zdenek Hanzalek 10 | % Department of Control Engineering 11 | % FEE CTU in Prague, Czech Republic 12 | % Copyright (c) 2004 - 2009 13 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 14 | 15 | 16 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 17 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 18 | % and modified under the next licenses 19 | % 20 | % - GPL - GNU General Public License 21 | % 22 | % - and other licenses added by project originators or responsible 23 | % 24 | % Code can be modified and re-distributed under any combination 25 | % of the above listed licenses. If a contributor does not agree 26 | % with some of the licenses, he/she can delete appropriate line. 27 | % If you delete all lines, you are not allowed to distribute 28 | % source code and/or binaries utilizing code. 29 | % 30 | % -------------------------------------------------------------- 31 | % GNU General Public License 32 | % 33 | % TORSCHE Scheduling Toolbox for Matlab is free software; 34 | % you can redistribute it and/or modify it under the terms of the 35 | % GNU General Public License as published by the Free Software 36 | % Foundation; either version 2 of the License, or (at your option) 37 | % any later version. 38 | % 39 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 40 | % that it will be useful, but WITHOUT ANY WARRANTY; 41 | % without even the implied warranty of MERCHANTABILITY or 42 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 43 | % General Public License for more details. 44 | % 45 | % You should have received a copy of the GNU General Public License 46 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 47 | % to the Free Software Foundation, Inc., 59 Temple Place, 48 | % Suite 330, Boston, MA 02111-1307 USA 49 | 50 | 51 | fprintf('Compiling SPNTL_BAB: '); 52 | clear spntl_bab 53 | cmd = ['-outdir ..' filesep 'private spntl_bab.c spntl_candidates.c spntl_vexplor.c']; 54 | eval(['mex ' cmd]); 55 | fprintf('done.\n'); 56 | 57 | % end .. MAKE 58 | -------------------------------------------------------------------------------- /scheduling/@task/horzcat.m: -------------------------------------------------------------------------------- 1 | function setoftasks = horzcat(varargin) 2 | %HORZCAT Creates a TaskSet from tasks 3 | % Tasks = [T1 T2 T3 ... ] 4 | % See also TASKSET. 5 | 6 | 7 | % Author: Michal Kutil 8 | % Originator: Michal Kutil 9 | % Originator: Premysl Sucha 10 | % Project Responsible: Zdenek Hanzalek 11 | % Department of Control Engineering 12 | % FEE CTU in Prague, Czech Republic 13 | % Copyright (c) 2004 - 2009 14 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 15 | 16 | 17 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 18 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 19 | % and modified under the next licenses 20 | % 21 | % - GPL - GNU General Public License 22 | % 23 | % - and other licenses added by project originators or responsible 24 | % 25 | % Code can be modified and re-distributed under any combination 26 | % of the above listed licenses. If a contributor does not agree 27 | % with some of the licenses, he/she can delete appropriate line. 28 | % If you delete all lines, you are not allowed to distribute 29 | % source code and/or binaries utilizing code. 30 | % 31 | % -------------------------------------------------------------- 32 | % GNU General Public License 33 | % 34 | % TORSCHE Scheduling Toolbox for Matlab is free software; 35 | % you can redistribute it and/or modify it under the terms of the 36 | % GNU General Public License as published by the Free Software 37 | % Foundation; either version 2 of the License, or (at your option) 38 | % any later version. 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 41 | % that it will be useful, but WITHOUT ANY WARRANTY; 42 | % without even the implied warranty of MERCHANTABILITY or 43 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | % General Public License for more details. 45 | % 46 | % You should have received a copy of the GNU General Public License 47 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 48 | % to the Free Software Foundation, Inc., 59 Temple Place, 49 | % Suite 330, Boston, MA 02111-1307 USA 50 | 51 | 52 | try 53 | setoftasks = taskset(varargin); 54 | catch 55 | rethrow(lasterror) 56 | end 57 | %end .. @task/horzcat 58 | -------------------------------------------------------------------------------- /scheduling/@graph/private/grparam.m: -------------------------------------------------------------------------------- 1 | function [GrParam] = grparam() 2 | %GRPARAM Return graphics parameters for drawing an editing task 3 | % 4 | % [GRPARAM] = GRPARAM() 5 | % GRPARAM - struct with parameters 6 | 7 | % Author: Michal Kutil 8 | % Originator: Michal Kutil 9 | % Originator: Premysl Sucha 10 | % Project Responsible: Zdenek Hanzalek 11 | % Department of Control Engineering 12 | % FEE CTU in Prague, Czech Republic 13 | % Copyright (c) 2004 - 2009 14 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 15 | 16 | 17 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 18 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 19 | % and modified under the next licenses 20 | % 21 | % - GPL - GNU General Public License 22 | % 23 | % - and other licenses added by project originators or responsible 24 | % 25 | % Code can be modified and re-distributed under any combination 26 | % of the above listed licenses. If a contributor does not agree 27 | % with some of the licenses, he/she can delete appropriate line. 28 | % If you delete all lines, you are not allowed to distribute 29 | % source code and/or binaries utilizing code. 30 | % 31 | % -------------------------------------------------------------- 32 | % GNU General Public License 33 | % 34 | % TORSCHE Scheduling Toolbox for Matlab is free software; 35 | % you can redistribute it and/or modify it under the terms of the 36 | % GNU General Public License as published by the Free Software 37 | % Foundation; either version 2 of the License, or (at your option) 38 | % any later version. 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 41 | % that it will be useful, but WITHOUT ANY WARRANTY; 42 | % without even the implied warranty of MERCHANTABILITY or 43 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | % General Public License for more details. 45 | % 46 | % You should have received a copy of the GNU General Public License 47 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 48 | % to the Free Software Foundation, Inc., 59 Temple Place, 49 | % Suite 330, Boston, MA 02111-1307 USA 50 | 51 | 52 | % color off task 53 | GrParam.color = -1; 54 | GrParam.position = [0,0]; 55 | 56 | %end .. @task/grparam 57 | -------------------------------------------------------------------------------- /scheduling/@limitedbuffers/private/ismodel.m: -------------------------------------------------------------------------------- 1 | function out = ismodel(string) 2 | % ISMODEL Return true if input string corresponds with any kind of 3 | % model. 4 | 5 | 6 | % Author: Jiri Cigler 7 | % Originator: Michal Kutil 8 | % Originator: Premysl Sucha 9 | % Project Responsible: Zdenek Hanzalek 10 | % Department of Control Engineering 11 | % FEE CTU in Prague, Czech Republic 12 | % Copyright (c) 2004 - 2009 13 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 14 | 15 | 16 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 17 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 18 | % and modified under the next licenses 19 | % 20 | % - GPL - GNU General Public License 21 | % 22 | % - and other licenses added by project originators or responsible 23 | % 24 | % Code can be modified and re-distributed under any combination 25 | % of the above listed licenses. If a contributor does not agree 26 | % with some of the licenses, he/she can delete appropriate line. 27 | % If you delete all lines, you are not allowed to distribute 28 | % source code and/or binaries utilizing code. 29 | % 30 | % -------------------------------------------------------------- 31 | % GNU General Public License 32 | % 33 | % TORSCHE Scheduling Toolbox for Matlab is free software; 34 | % you can redistribute it and/or modify it under the terms of the 35 | % GNU General Public License as published by the Free Software 36 | % Foundation; either version 2 of the License, or (at your option) 37 | % any later version. 38 | % 39 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 40 | % that it will be useful, but WITHOUT ANY WARRANTY; 41 | % without even the implied warranty of MERCHANTABILITY or 42 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 43 | % General Public License for more details. 44 | % 45 | % You should have received a copy of the GNU General Public License 46 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 47 | % to the Free Software Foundation, Inc., 59 Temple Place, 48 | % Suite 330, Boston, MA 02111-1307 USA 49 | 50 | 51 | switch string 52 | case {'general','job-dependend','input','output','pair-wise'} 53 | out = 1; 54 | otherwise 55 | error('TORSCHE:limitedBuffers:invalidParam','Unknown new model, See help!'); 56 | end 57 | end 58 | 59 | -------------------------------------------------------------------------------- /scheduling/@schedobj/private/grparam.m: -------------------------------------------------------------------------------- 1 | function [GrParam] = grparam() 2 | %GRPARAM Return graphics parameters for drawing an editing task 3 | % 4 | % [GRPARAM] = GRPARAM() 5 | % GRPARAM - struct with parameters 6 | 7 | 8 | % Author: Michal Kutil 9 | % Originator: Michal Kutil 10 | % Originator: Premysl Sucha 11 | % Project Responsible: Zdenek Hanzalek 12 | % Department of Control Engineering 13 | % FEE CTU in Prague, Czech Republic 14 | % Copyright (c) 2004 - 2009 15 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 16 | 17 | 18 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 19 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 20 | % and modified under the next licenses 21 | % 22 | % - GPL - GNU General Public License 23 | % 24 | % - and other licenses added by project originators or responsible 25 | % 26 | % Code can be modified and re-distributed under any combination 27 | % of the above listed licenses. If a contributor does not agree 28 | % with some of the licenses, he/she can delete appropriate line. 29 | % If you delete all lines, you are not allowed to distribute 30 | % source code and/or binaries utilizing code. 31 | % 32 | % -------------------------------------------------------------- 33 | % GNU General Public License 34 | % 35 | % TORSCHE Scheduling Toolbox for Matlab is free software; 36 | % you can redistribute it and/or modify it under the terms of the 37 | % GNU General Public License as published by the Free Software 38 | % Foundation; either version 2 of the License, or (at your option) 39 | % any later version. 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 42 | % that it will be useful, but WITHOUT ANY WARRANTY; 43 | % without even the implied warranty of MERCHANTABILITY or 44 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 45 | % General Public License for more details. 46 | % 47 | % You should have received a copy of the GNU General Public License 48 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 49 | % to the Free Software Foundation, Inc., 59 Temple Place, 50 | % Suite 330, Boston, MA 02111-1307 USA 51 | 52 | 53 | % color off task 54 | GrParam.color = -1; 55 | GrParam.position = [0,0]; 56 | 57 | %end .. @task/grparam 58 | -------------------------------------------------------------------------------- /scheduling/@taskset/end.m: -------------------------------------------------------------------------------- 1 | function e_val = end(TS,k,n); 2 | %END Last index in taskset object 3 | % 4 | % END(TS,K,N) is called for indexing expressions involving the 5 | % object A when END is part of the K-th index out of N indices. 6 | 7 | 8 | % Author: Michal Kutil 9 | % Originator: Michal Kutil 10 | % Originator: Premysl Sucha 11 | % Project Responsible: Zdenek Hanzalek 12 | % Department of Control Engineering 13 | % FEE CTU in Prague, Czech Republic 14 | % Copyright (c) 2004 - 2009 15 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 16 | 17 | 18 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 19 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 20 | % and modified under the next licenses 21 | % 22 | % - GPL - GNU General Public License 23 | % 24 | % - and other licenses added by project originators or responsible 25 | % 26 | % Code can be modified and re-distributed under any combination 27 | % of the above listed licenses. If a contributor does not agree 28 | % with some of the licenses, he/she can delete appropriate line. 29 | % If you delete all lines, you are not allowed to distribute 30 | % source code and/or binaries utilizing code. 31 | % 32 | % -------------------------------------------------------------- 33 | % GNU General Public License 34 | % 35 | % TORSCHE Scheduling Toolbox for Matlab is free software; 36 | % you can redistribute it and/or modify it under the terms of the 37 | % GNU General Public License as published by the Free Software 38 | % Foundation; either version 2 of the License, or (at your option) 39 | % any later version. 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 42 | % that it will be useful, but WITHOUT ANY WARRANTY; 43 | % without even the implied warranty of MERCHANTABILITY or 44 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 45 | % General Public License for more details. 46 | % 47 | % You should have received a copy of the GNU General Public License 48 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 49 | % to the Free Software Foundation, Inc., 59 Temple Place, 50 | % Suite 330, Boston, MA 02111-1307 USA 51 | 52 | 53 | if n==1 54 | e_val = count(TS); 55 | else 56 | e_val = 1; 57 | end 58 | %end .. @taskset/end 59 | -------------------------------------------------------------------------------- /scheduling/@taskset/count.m: -------------------------------------------------------------------------------- 1 | function c=count(T) 2 | %COUNT returns number of tasks in the Set of Tasks 3 | % 4 | %Synopsis 5 | % count = COUNT(T) 6 | % 7 | %Description 8 | % Properties: 9 | % T: 10 | % - set of tasks 11 | % count: 12 | % - number of tasks 13 | % 14 | % See also TASKSET/SIZE 15 | 16 | 17 | % Author: Michal Kutil 18 | % Originator: Michal Kutil 19 | % Originator: Premysl Sucha 20 | % Project Responsible: Zdenek Hanzalek 21 | % Department of Control Engineering 22 | % FEE CTU in Prague, Czech Republic 23 | % Copyright (c) 2004 - 2009 24 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 25 | 26 | 27 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 28 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 29 | % and modified under the next licenses 30 | % 31 | % - GPL - GNU General Public License 32 | % 33 | % - and other licenses added by project originators or responsible 34 | % 35 | % Code can be modified and re-distributed under any combination 36 | % of the above listed licenses. If a contributor does not agree 37 | % with some of the licenses, he/she can delete appropriate line. 38 | % If you delete all lines, you are not allowed to distribute 39 | % source code and/or binaries utilizing code. 40 | % 41 | % -------------------------------------------------------------- 42 | % GNU General Public License 43 | % 44 | % TORSCHE Scheduling Toolbox for Matlab is free software; 45 | % you can redistribute it and/or modify it under the terms of the 46 | % GNU General Public License as published by the Free Software 47 | % Foundation; either version 2 of the License, or (at your option) 48 | % any later version. 49 | % 50 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 51 | % that it will be useful, but WITHOUT ANY WARRANTY; 52 | % without even the implied warranty of MERCHANTABILITY or 53 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 54 | % General Public License for more details. 55 | % 56 | % You should have received a copy of the GNU General Public License 57 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 58 | % to the Free Software Foundation, Inc., 59 Temple Place, 59 | % Suite 330, Boston, MA 02111-1307 USA 60 | 61 | 62 | c = length(T.tasks); 63 | %end .. @taskset/count 64 | -------------------------------------------------------------------------------- /scheduling/@shop/issquare.m: -------------------------------------------------------------------------------- 1 | function bool = issquare(sh) 2 | % ISSQUARE return 1 if all jobs in shop has same number of tasks, otherwise 0 3 | % 4 | % Synopsis 5 | % bool = ISSQUARE(sh) 6 | % 7 | % See also SHOP/SHOP. 8 | 9 | 10 | % Author: Jiri Cigler 11 | % Originator: Michal Kutil 12 | % Originator: Premysl Sucha 13 | % Project Responsible: Zdenek Hanzalek 14 | % Department of Control Engineering 15 | % FEE CTU in Prague, Czech Republic 16 | % Copyright (c) 2004 - 2009 17 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 18 | 19 | 20 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 21 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 22 | % and modified under the next licenses 23 | % 24 | % - GPL - GNU General Public License 25 | % 26 | % - and other licenses added by project originators or responsible 27 | % 28 | % Code can be modified and re-distributed under any combination 29 | % of the above listed licenses. If a contributor does not agree 30 | % with some of the licenses, he/she can delete appropriate line. 31 | % If you delete all lines, you are not allowed to distribute 32 | % source code and/or binaries utilizing code. 33 | % 34 | % -------------------------------------------------------------- 35 | % GNU General Public License 36 | % 37 | % TORSCHE Scheduling Toolbox for Matlab is free software; 38 | % you can redistribute it and/or modify it under the terms of the 39 | % GNU General Public License as published by the Free Software 40 | % Foundation; either version 2 of the License, or (at your option) 41 | % any later version. 42 | % 43 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 44 | % that it will be useful, but WITHOUT ANY WARRANTY; 45 | % without even the implied warranty of MERCHANTABILITY or 46 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 47 | % General Public License for more details. 48 | % 49 | % You should have received a copy of the GNU General Public License 50 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 51 | % to the Free Software Foundation, Inc., 59 Temple Place, 52 | % Suite 330, Boston, MA 02111-1307 USA 53 | 54 | 55 | lenghts = []; 56 | for i=1:max(size(sh.Jobs)) 57 | lenghts(i)=max(size(sh.Jobs(i))); 58 | end 59 | m = min(lenghts); 60 | M = max(lenghts); 61 | 62 | if m==M 63 | bool = 1; 64 | else 65 | bool = 0; 66 | end 67 | 68 | end%function 69 | 70 | -------------------------------------------------------------------------------- /scheduling/@taskset/util.m: -------------------------------------------------------------------------------- 1 | function u = util(taskset) 2 | %UTIL gets utilization of a set of tasks in the task set 3 | % 4 | % U = UTIL(TASKSET) returns a sum of utilizations of all periodic 5 | % tasks in the set. 6 | 7 | 8 | % Author: Michal Sojka 9 | % Originator: Michal Kutil 10 | % Originator: Premysl Sucha 11 | % Project Responsible: Zdenek Hanzalek 12 | % Department of Control Engineering 13 | % FEE CTU in Prague, Czech Republic 14 | % Copyright (c) 2004 - 2009 15 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 16 | 17 | 18 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 19 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 20 | % and modified under the next licenses 21 | % 22 | % - GPL - GNU General Public License 23 | % 24 | % - and other licenses added by project originators or responsible 25 | % 26 | % Code can be modified and re-distributed under any combination 27 | % of the above listed licenses. If a contributor does not agree 28 | % with some of the licenses, he/she can delete appropriate line. 29 | % If you delete all lines, you are not allowed to distribute 30 | % source code and/or binaries utilizing code. 31 | % 32 | % -------------------------------------------------------------- 33 | % GNU General Public License 34 | % 35 | % TORSCHE Scheduling Toolbox for Matlab is free software; 36 | % you can redistribute it and/or modify it under the terms of the 37 | % GNU General Public License as published by the Free Software 38 | % Foundation; either version 2 of the License, or (at your option) 39 | % any later version. 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 42 | % that it will be useful, but WITHOUT ANY WARRANTY; 43 | % without even the implied warranty of MERCHANTABILITY or 44 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 45 | % General Public License for more details. 46 | % 47 | % You should have received a copy of the GNU General Public License 48 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 49 | % to the Free Software Foundation, Inc., 59 Temple Place, 50 | % Suite 330, Boston, MA 02111-1307 USA 51 | 52 | 53 | u = 0; 54 | for i = 1:length(taskset.tasks), 55 | task = taskset.tasks{i}; 56 | if ismethod(task, 'util') 57 | u = u + util(task); 58 | end 59 | end % for i = 1:length(taskset. 60 | 61 | -------------------------------------------------------------------------------- /scheduling/@shop/get_schedule.m: -------------------------------------------------------------------------------- 1 | function [sch_start] = get_schedule (S) 2 | %GET_SCHEDULE gets schedule (starts time) 3 | % from a shop 4 | % 5 | %Synopsis 6 | % start = GET_SCHEDULE(S) 7 | % 8 | %Description 9 | % Properties: 10 | % S: 11 | % - shop 12 | % start: 13 | % - matrix of start times 14 | % 15 | % See also SHOP/ADD_SCHEDULE. 16 | 17 | 18 | % Author: Jiri Cigler 19 | % Originator: Michal Kutil 20 | % Originator: Premysl Sucha 21 | % Project Responsible: Zdenek Hanzalek 22 | % Department of Control Engineering 23 | % FEE CTU in Prague, Czech Republic 24 | % Copyright (c) 2004 - 2009 25 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 26 | 27 | 28 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 29 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 30 | % and modified under the next licenses 31 | % 32 | % - GPL - GNU General Public License 33 | % 34 | % - and other licenses added by project originators or responsible 35 | % 36 | % Code can be modified and re-distributed under any combination 37 | % of the above listed licenses. If a contributor does not agree 38 | % with some of the licenses, he/she can delete appropriate line. 39 | % If you delete all lines, you are not allowed to distribute 40 | % source code and/or binaries utilizing code. 41 | % 42 | % -------------------------------------------------------------- 43 | % GNU General Public License 44 | % 45 | % TORSCHE Scheduling Toolbox for Matlab is free software; 46 | % you can redistribute it and/or modify it under the terms of the 47 | % GNU General Public License as published by the Free Software 48 | % Foundation; either version 2 of the License, or (at your option) 49 | % any later version. 50 | % 51 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 52 | % that it will be useful, but WITHOUT ANY WARRANTY; 53 | % without even the implied warranty of MERCHANTABILITY or 54 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 55 | % General Public License for more details. 56 | % 57 | % You should have received a copy of the GNU General Public License 58 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 59 | % to the Free Software Foundation, Inc., 59 Temple Place, 60 | % Suite 330, Boston, MA 02111-1307 USA 61 | 62 | 63 | sch_start=[]; 64 | for i=1:max(size(S.Jobs)) 65 | sch_start(i,:)=get_schedule(S.Jobs{i}); 66 | end 67 | 68 | %end .. @shop/get_schedule 69 | -------------------------------------------------------------------------------- /scheduling/@taskset/size.m: -------------------------------------------------------------------------------- 1 | function size = size(TS) 2 | %SIZE returns number of tasks in the Set of Tasks 3 | % 4 | %Synopsis 5 | % size = SIZE(T) 6 | % 7 | %Description 8 | % Properties: 9 | % T: 10 | % - set of tasks 11 | % size: 12 | % - number of tasks 13 | % 14 | % Warning: This functions is deprecated. Please use function COUNT instead. 15 | % 16 | % See also TASKSET/COUNT 17 | 18 | 19 | % Author: Michal Kutil 20 | % Originator: Michal Kutil 21 | % Originator: Premysl Sucha 22 | % Project Responsible: Zdenek Hanzalek 23 | % Department of Control Engineering 24 | % FEE CTU in Prague, Czech Republic 25 | % Copyright (c) 2004 - 2009 26 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 27 | 28 | 29 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 30 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 31 | % and modified under the next licenses 32 | % 33 | % - GPL - GNU General Public License 34 | % 35 | % - and other licenses added by project originators or responsible 36 | % 37 | % Code can be modified and re-distributed under any combination 38 | % of the above listed licenses. If a contributor does not agree 39 | % with some of the licenses, he/she can delete appropriate line. 40 | % If you delete all lines, you are not allowed to distribute 41 | % source code and/or binaries utilizing code. 42 | % 43 | % -------------------------------------------------------------- 44 | % GNU General Public License 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is free software; 47 | % you can redistribute it and/or modify it under the terms of the 48 | % GNU General Public License as published by the Free Software 49 | % Foundation; either version 2 of the License, or (at your option) 50 | % any later version. 51 | % 52 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 53 | % that it will be useful, but WITHOUT ANY WARRANTY; 54 | % without even the implied warranty of MERCHANTABILITY or 55 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 56 | % General Public License for more details. 57 | % 58 | % You should have received a copy of the GNU General Public License 59 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 60 | % to the Free Software Foundation, Inc., 59 Temple Place, 61 | % Suite 330, Boston, MA 02111-1307 USA 62 | 63 | 64 | size = length(TS.tasks(:)); 65 | %end .. @taskset/size 66 | -------------------------------------------------------------------------------- /scheduling/@schedobj/loadobj.m: -------------------------------------------------------------------------------- 1 | function schout = loadobj(schin) 2 | %LOADOBJ for task class 3 | 4 | 5 | % Author: Michal Kutil 6 | % Originator: Michal Kutil 7 | % Originator: Premysl Sucha 8 | % Project Responsible: Zdenek Hanzalek 9 | % Department of Control Engineering 10 | % FEE CTU in Prague, Czech Republic 11 | % Copyright (c) 2004 - 2009 12 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 13 | 14 | 15 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 16 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 17 | % and modified under the next licenses 18 | % 19 | % - GPL - GNU General Public License 20 | % 21 | % - and other licenses added by project originators or responsible 22 | % 23 | % Code can be modified and re-distributed under any combination 24 | % of the above listed licenses. If a contributor does not agree 25 | % with some of the licenses, he/she can delete appropriate line. 26 | % If you delete all lines, you are not allowed to distribute 27 | % source code and/or binaries utilizing code. 28 | % 29 | % -------------------------------------------------------------- 30 | % GNU General Public License 31 | % 32 | % TORSCHE Scheduling Toolbox for Matlab is free software; 33 | % you can redistribute it and/or modify it under the terms of the 34 | % GNU General Public License as published by the Free Software 35 | % Foundation; either version 2 of the License, or (at your option) 36 | % any later version. 37 | % 38 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 39 | % that it will be useful, but WITHOUT ANY WARRANTY; 40 | % without even the implied warranty of MERCHANTABILITY or 41 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 42 | % General Public License for more details. 43 | % 44 | % You should have received a copy of the GNU General Public License 45 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 46 | % to the Free Software Foundation, Inc., 59 Temple Place, 47 | % Suite 330, Boston, MA 02111-1307 USA 48 | 49 | 50 | if isa(schin,'schedobj') 51 | schout = schin; 52 | else %taskin is ol version 53 | switch schin.version 54 | case 0 55 | schin.GrParam = grparam; 56 | otherwise 57 | error('Wrong version'); 58 | end 59 | schin.version = 0.01; 60 | 61 | schout = class(schin,'schedobj'); 62 | end 63 | %end .. @task/loadobj 64 | -------------------------------------------------------------------------------- /scheduling/@limitedbuffers/display.m: -------------------------------------------------------------------------------- 1 | function display (LB) 2 | % DISPLAY display properties of object limited buffers 3 | % 4 | % Synopsis 5 | % DISPLAY(LB) 6 | % 7 | % Description 8 | % Text display of limited buffers object LB 9 | % 10 | % See also LIMITEDBUFFERS/LIMITEDBUFFERS, SHOP/SHOP. 11 | 12 | 13 | % Author: Jiri Cigler 14 | % Originator: Michal Kutil 15 | % Originator: Premysl Sucha 16 | % Project Responsible: Zdenek Hanzalek 17 | % Department of Control Engineering 18 | % FEE CTU in Prague, Czech Republic 19 | % Copyright (c) 2004 - 2009 20 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 21 | 22 | 23 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 24 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 25 | % and modified under the next licenses 26 | % 27 | % - GPL - GNU General Public License 28 | % 29 | % - and other licenses added by project originators or responsible 30 | % 31 | % Code can be modified and re-distributed under any combination 32 | % of the above listed licenses. If a contributor does not agree 33 | % with some of the licenses, he/she can delete appropriate line. 34 | % If you delete all lines, you are not allowed to distribute 35 | % source code and/or binaries utilizing code. 36 | % 37 | % -------------------------------------------------------------- 38 | % GNU General Public License 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is free software; 41 | % you can redistribute it and/or modify it under the terms of the 42 | % GNU General Public License as published by the Free Software 43 | % Foundation; either version 2 of the License, or (at your option) 44 | % any later version. 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 47 | % that it will be useful, but WITHOUT ANY WARRANTY; 48 | % without even the implied warranty of MERCHANTABILITY or 49 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 50 | % General Public License for more details. 51 | % 52 | % You should have received a copy of the GNU General Public License 53 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 54 | % to the Free Software Foundation, Inc., 59 Temple Place, 55 | % Suite 330, Boston, MA 02111-1307 USA 56 | 57 | 58 | disp('Limited buffers'); 59 | disp([' Model: ', LB.Model]); 60 | disp(' Capacity: '); 61 | disp(LB.Capacity); 62 | if ~isempty(LB.Utilization) 63 | disp(' Utilization:'); 64 | disp(LB.Utilization); 65 | end; 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /scheduling/@job/private/get_helper.m: -------------------------------------------------------------------------------- 1 | function [Value, found] = get_helper(this, Property) 2 | %GET_HELPER Internal function for virtual property retrieval. 3 | % 4 | % [VALUE, found] = GET_HELPER(OBJECT, PROPERTY) returns PROPERTY VALUE. 5 | % found is true if the virtual PROPERTY exist othewise is found false. 6 | % 7 | % See also: GET 8 | 9 | 10 | % Author: Jiri Cigler 11 | % Originator: Michal Kutil 12 | % Originator: Premysl Sucha 13 | % Project Responsible: Zdenek Hanzalek 14 | % Department of Control Engineering 15 | % FEE CTU in Prague, Czech Republic 16 | % Copyright (c) 2004 - 2009 17 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 18 | 19 | 20 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 21 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 22 | % and modified under the next licenses 23 | % 24 | % - GPL - GNU General Public License 25 | % 26 | % - and other licenses added by project originators or responsible 27 | % 28 | % Code can be modified and re-distributed under any combination 29 | % of the above listed licenses. If a contributor does not agree 30 | % with some of the licenses, he/she can delete appropriate line. 31 | % If you delete all lines, you are not allowed to distribute 32 | % source code and/or binaries utilizing code. 33 | % 34 | % -------------------------------------------------------------- 35 | % GNU General Public License 36 | % 37 | % TORSCHE Scheduling Toolbox for Matlab is free software; 38 | % you can redistribute it and/or modify it under the terms of the 39 | % GNU General Public License as published by the Free Software 40 | % Foundation; either version 2 of the License, or (at your option) 41 | % any later version. 42 | % 43 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 44 | % that it will be useful, but WITHOUT ANY WARRANTY; 45 | % without even the implied warranty of MERCHANTABILITY or 46 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 47 | % General Public License for more details. 48 | % 49 | % You should have received a copy of the GNU General Public License 50 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 51 | % to the Free Software Foundation, Inc., 59 Temple Place, 52 | % Suite 330, Boston, MA 02111-1307 USA 53 | 54 | 55 | found = true; 56 | 57 | 58 | switch lower(Property) 59 | case 'jobuserparam' 60 | Value = this.taskset.TSUserParam; 61 | otherwise 62 | found =false; 63 | end 64 | 65 | end 66 | 67 | -------------------------------------------------------------------------------- /scheduling/@taskset/private/schstruct.m: -------------------------------------------------------------------------------- 1 | function struct = schstruct(varargin) 2 | %SCHSTRUCT Return empty (or add to input) schedule's structure 3 | % 4 | % struct = SCHSTRUCT([struct]) 5 | % struct - scheduling struct 6 | % 7 | % See also add_schedule. 8 | 9 | 10 | % Author: Michal Kutil 11 | % Originator: Michal Kutil 12 | % Originator: Premysl Sucha 13 | % Project Responsible: Zdenek Hanzalek 14 | % Department of Control Engineering 15 | % FEE CTU in Prague, Czech Republic 16 | % Copyright (c) 2004 - 2009 17 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 18 | 19 | 20 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 21 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 22 | % and modified under the next licenses 23 | % 24 | % - GPL - GNU General Public License 25 | % 26 | % - and other licenses added by project originators or responsible 27 | % 28 | % Code can be modified and re-distributed under any combination 29 | % of the above listed licenses. If a contributor does not agree 30 | % with some of the licenses, he/she can delete appropriate line. 31 | % If you delete all lines, you are not allowed to distribute 32 | % source code and/or binaries utilizing code. 33 | % 34 | % -------------------------------------------------------------- 35 | % GNU General Public License 36 | % 37 | % TORSCHE Scheduling Toolbox for Matlab is free software; 38 | % you can redistribute it and/or modify it under the terms of the 39 | % GNU General Public License as published by the Free Software 40 | % Foundation; either version 2 of the License, or (at your option) 41 | % any later version. 42 | % 43 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 44 | % that it will be useful, but WITHOUT ANY WARRANTY; 45 | % without even the implied warranty of MERCHANTABILITY or 46 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 47 | % General Public License for more details. 48 | % 49 | % You should have received a copy of the GNU General Public License 50 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 51 | % to the Free Software Foundation, Inc., 59 Temple Place, 52 | % Suite 330, Boston, MA 02111-1307 USA 53 | 54 | 55 | struct.desc = ''; % description 56 | struct.is = 0; % is schedule 57 | struct.time = []; % solving time 58 | struct.iterations = []; % number of interations 59 | struct.memory = []; % memory allocation 60 | 61 | %end .. @taskset/private/schstruct 62 | -------------------------------------------------------------------------------- /scheduling/@limitedbuffers/private/checkCapacityMatrix.m: -------------------------------------------------------------------------------- 1 | function out = checkCapacityMatrix(capacityMatrix) 2 | % CHECKCAPACITYMATRIX Return true if capacityMatrix has good properties. 3 | % Otherwise false. 4 | 5 | 6 | % Author: Jiri Cigler 7 | % Originator: Michal Kutil 8 | % Originator: Premysl Sucha 9 | % Project Responsible: Zdenek Hanzalek 10 | % Department of Control Engineering 11 | % FEE CTU in Prague, Czech Republic 12 | % Copyright (c) 2004 - 2009 13 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 14 | 15 | 16 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 17 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 18 | % and modified under the next licenses 19 | % 20 | % - GPL - GNU General Public License 21 | % 22 | % - and other licenses added by project originators or responsible 23 | % 24 | % Code can be modified and re-distributed under any combination 25 | % of the above listed licenses. If a contributor does not agree 26 | % with some of the licenses, he/she can delete appropriate line. 27 | % If you delete all lines, you are not allowed to distribute 28 | % source code and/or binaries utilizing code. 29 | % 30 | % -------------------------------------------------------------- 31 | % GNU General Public License 32 | % 33 | % TORSCHE Scheduling Toolbox for Matlab is free software; 34 | % you can redistribute it and/or modify it under the terms of the 35 | % GNU General Public License as published by the Free Software 36 | % Foundation; either version 2 of the License, or (at your option) 37 | % any later version. 38 | % 39 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 40 | % that it will be useful, but WITHOUT ANY WARRANTY; 41 | % without even the implied warranty of MERCHANTABILITY or 42 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 43 | % General Public License for more details. 44 | % 45 | % You should have received a copy of the GNU General Public License 46 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 47 | % to the Free Software Foundation, Inc., 59 Temple Place, 48 | % Suite 330, Boston, MA 02111-1307 USA 49 | 50 | 51 | if isnumeric(capacityMatrix) 52 | if size(capacityMatrix,1)==1 && size(capacityMatrix,2)>0 53 | out = 1; 54 | else 55 | error('TORSCHE:limitedBuffers:invalidParam','Data for this model should be vector, see help!') 56 | end; 57 | else 58 | error('TORSCHE:limitedBuffers:invalidParam','Data should be vector or matrix of numbers, see help!'); 59 | end 60 | end 61 | 62 | 63 | -------------------------------------------------------------------------------- /scheduling/@graph/pred.m: -------------------------------------------------------------------------------- 1 | function pred=pred(G,node) 2 | %PRED Return all predecessors of node from graph 3 | % 4 | % Syntax 5 | % pred = PRED(G,node) 6 | % node - node for which are computed predecessors 7 | % G - graph 8 | % pred - predecessors 9 | % 10 | % See also GRAPH/SUCC. 11 | 12 | 13 | % Author: Michal Kutil 14 | % Originator: Michal Kutil 15 | % Originator: Premysl Sucha 16 | % Project Responsible: Zdenek Hanzalek 17 | % Department of Control Engineering 18 | % FEE CTU in Prague, Czech Republic 19 | % Copyright (c) 2004 - 2009 20 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 21 | 22 | 23 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 24 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 25 | % and modified under the next licenses 26 | % 27 | % - GPL - GNU General Public License 28 | % 29 | % - and other licenses added by project originators or responsible 30 | % 31 | % Code can be modified and re-distributed under any combination 32 | % of the above listed licenses. If a contributor does not agree 33 | % with some of the licenses, he/she can delete appropriate line. 34 | % If you delete all lines, you are not allowed to distribute 35 | % source code and/or binaries utilizing code. 36 | % 37 | % -------------------------------------------------------------- 38 | % GNU General Public License 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is free software; 41 | % you can redistribute it and/or modify it under the terms of the 42 | % GNU General Public License as published by the Free Software 43 | % Foundation; either version 2 of the License, or (at your option) 44 | % any later version. 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 47 | % that it will be useful, but WITHOUT ANY WARRANTY; 48 | % without even the implied warranty of MERCHANTABILITY or 49 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 50 | % General Public License for more details. 51 | % 52 | % You should have received a copy of the GNU General Public License 53 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 54 | % to the Free Software Foundation, Inc., 59 Temple Place, 55 | % Suite 330, Boston, MA 02111-1307 USA 56 | 57 | 58 | v_adj = adj(G); 59 | pred = zeros(1,length(v_adj)); 60 | adj_tmp = v_adj; 61 | while sum(sum(adj_tmp)) 62 | pred(find(adj_tmp(:,node)))=1; 63 | adj_tmp = sign(adj_tmp*v_adj); 64 | end 65 | pred=find(pred); 66 | %end .. @graph/pred 67 | -------------------------------------------------------------------------------- /scheduling/@graph/succ.m: -------------------------------------------------------------------------------- 1 | function succ=succ(G,node) 2 | %SUCC Return all succecessors of node from graph 3 | % 4 | % Syntax 5 | % succ = SUCC(G,node) 6 | % node - node for which are computed succecessors 7 | % G - graph 8 | % succ - succecessors 9 | % 10 | % See also GRAPH/PRED. 11 | 12 | 13 | % Author: Michal Kutil 14 | % Originator: Michal Kutil 15 | % Originator: Premysl Sucha 16 | % Project Responsible: Zdenek Hanzalek 17 | % Department of Control Engineering 18 | % FEE CTU in Prague, Czech Republic 19 | % Copyright (c) 2004 - 2009 20 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 21 | 22 | 23 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 24 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 25 | % and modified under the next licenses 26 | % 27 | % - GPL - GNU General Public License 28 | % 29 | % - and other licenses added by project originators or responsible 30 | % 31 | % Code can be modified and re-distributed under any combination 32 | % of the above listed licenses. If a contributor does not agree 33 | % with some of the licenses, he/she can delete appropriate line. 34 | % If you delete all lines, you are not allowed to distribute 35 | % source code and/or binaries utilizing code. 36 | % 37 | % -------------------------------------------------------------- 38 | % GNU General Public License 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is free software; 41 | % you can redistribute it and/or modify it under the terms of the 42 | % GNU General Public License as published by the Free Software 43 | % Foundation; either version 2 of the License, or (at your option) 44 | % any later version. 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 47 | % that it will be useful, but WITHOUT ANY WARRANTY; 48 | % without even the implied warranty of MERCHANTABILITY or 49 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 50 | % General Public License for more details. 51 | % 52 | % You should have received a copy of the GNU General Public License 53 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 54 | % to the Free Software Foundation, Inc., 59 Temple Place, 55 | % Suite 330, Boston, MA 02111-1307 USA 56 | 57 | 58 | adj_var = adj(G); 59 | succ = zeros(1,length(adj_var)); 60 | adj_tmp = adj_var; 61 | while sum(sum(adj_tmp)) 62 | succ(find(adj_tmp(node,:)))=1; 63 | adj_tmp = sign(adj_tmp*adj_var); 64 | end 65 | succ=find(succ); 66 | %end .. @graph/succ 67 | -------------------------------------------------------------------------------- /scheduling/@graph/adj.m: -------------------------------------------------------------------------------- 1 | function matrix=adj(G) 2 | %ADJ Return adjacency matrix of graph 3 | % 4 | % Synopsis 5 | % matrix = ADJ(G) 6 | % 7 | % Description 8 | % Return adjacency matrix. 9 | % 10 | % Parameters: 11 | % G: 12 | % - Instance of Graph object 13 | % matrix: 14 | % - Adjacency matrix 15 | % 16 | % See also GRAPH/INC. 17 | 18 | 19 | % Author: Michal Kutil 20 | % Originator: Michal Kutil 21 | % Originator: Premysl Sucha 22 | % Project Responsible: Zdenek Hanzalek 23 | % Department of Control Engineering 24 | % FEE CTU in Prague, Czech Republic 25 | % Copyright (c) 2004 - 2009 26 | % $Revision: 2901 $ $Date:: 2009-03-26 13:51:04 +0100 #$ 27 | 28 | 29 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 30 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 31 | % and modified under the next licenses 32 | % 33 | % - GPL - GNU General Public License 34 | % 35 | % - and other licenses added by project originators or responsible 36 | % 37 | % Code can be modified and re-distributed under any combination 38 | % of the above listed licenses. If a contributor does not agree 39 | % with some of the licenses, he/she can delete appropriate line. 40 | % If you delete all lines, you are not allowed to distribute 41 | % source code and/or binaries utilizing code. 42 | % 43 | % -------------------------------------------------------------- 44 | % GNU General Public License 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is free software; 47 | % you can redistribute it and/or modify it under the terms of the 48 | % GNU General Public License as published by the Free Software 49 | % Foundation; either version 2 of the License, or (at your option) 50 | % any later version. 51 | % 52 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 53 | % that it will be useful, but WITHOUT ANY WARRANTY; 54 | % without even the implied warranty of MERCHANTABILITY or 55 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 56 | % General Public License for more details. 57 | % 58 | % You should have received a copy of the GNU General Public License 59 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 60 | % to the Free Software Foundation, Inc., 59 Temple Place, 61 | % Suite 330, Boston, MA 02111-1307 USA 62 | 63 | 64 | 65 | numEdges = size(G.eps,1); 66 | matrix = zeros(length(G.N)); 67 | for i = 1:numEdges 68 | matrix(G.eps(i,1),G.eps(i,2)) = matrix(G.eps(i,1),G.eps(i,2)) + 1; 69 | end 70 | 71 | %end .. @graph/adj 72 | -------------------------------------------------------------------------------- /scheduling/@shop/private/getprocessorasmatrix.m: -------------------------------------------------------------------------------- 1 | function out = getprocessorasmatrix(sh) 2 | %GETPROCESSORASMATRIX If the shop is square, then return matrix containing 3 | % collected dedicated processors 4 | % 5 | % VALUE = GETPROCESSORASMATRIX(SHOP) 6 | % 7 | % See also: GET 8 | 9 | 10 | % Author: Jiri Cigler 11 | % Originator: Michal Kutil 12 | % Originator: Premysl Sucha 13 | % Project Responsible: Zdenek Hanzalek 14 | % Department of Control Engineering 15 | % FEE CTU in Prague, Czech Republic 16 | % Copyright (c) 2004 - 2009 17 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 18 | 19 | 20 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 21 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 22 | % and modified under the next licenses 23 | % 24 | % - GPL - GNU General Public License 25 | % 26 | % - and other licenses added by project originators or responsible 27 | % 28 | % Code can be modified and re-distributed under any combination 29 | % of the above listed licenses. If a contributor does not agree 30 | % with some of the licenses, he/she can delete appropriate line. 31 | % If you delete all lines, you are not allowed to distribute 32 | % source code and/or binaries utilizing code. 33 | % 34 | % -------------------------------------------------------------- 35 | % GNU General Public License 36 | % 37 | % TORSCHE Scheduling Toolbox for Matlab is free software; 38 | % you can redistribute it and/or modify it under the terms of the 39 | % GNU General Public License as published by the Free Software 40 | % Foundation; either version 2 of the License, or (at your option) 41 | % any later version. 42 | % 43 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 44 | % that it will be useful, but WITHOUT ANY WARRANTY; 45 | % without even the implied warranty of MERCHANTABILITY or 46 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 47 | % General Public License for more details. 48 | % 49 | % You should have received a copy of the GNU General Public License 50 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 51 | % to the Free Software Foundation, Inc., 59 Temple Place, 52 | % Suite 330, Boston, MA 02111-1307 USA 53 | 54 | 55 | out = []; 56 | 57 | if issquare(sh) 58 | % out = max(size(sh.jobs)); 59 | for i=1:max(size(sh.Jobs)) 60 | out(i,:)=sh.Jobs{i}.Processor; 61 | end 62 | else 63 | warning('TORSCHE:shop:unsuportedFunctionCall','Method can be used if and only if all jobs of shop have same number of tasks'); 64 | 65 | end 66 | end 67 | 68 | -------------------------------------------------------------------------------- /scheduling/@shop/private/getproctimeasmatrix.m: -------------------------------------------------------------------------------- 1 | function out = getproctimeasmatrix(sh) 2 | %GETPROCTIMEASMATRIX If the shop is square, then return matrix containing 3 | % collected processing times 4 | % 5 | % VALUE = GETPROCTIMEASMATRIX(SHOP) 6 | % 7 | % See also: GET 8 | 9 | 10 | % Author: Jiri Cigler 11 | % Originator: Michal Kutil 12 | % Originator: Premysl Sucha 13 | % Project Responsible: Zdenek Hanzalek 14 | % Department of Control Engineering 15 | % FEE CTU in Prague, Czech Republic 16 | % Copyright (c) 2004 - 2009 17 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 18 | 19 | 20 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 21 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 22 | % and modified under the next licenses 23 | % 24 | % - GPL - GNU General Public License 25 | % 26 | % - and other licenses added by project originators or responsible 27 | % 28 | % Code can be modified and re-distributed under any combination 29 | % of the above listed licenses. If a contributor does not agree 30 | % with some of the licenses, he/she can delete appropriate line. 31 | % If you delete all lines, you are not allowed to distribute 32 | % source code and/or binaries utilizing code. 33 | % 34 | % -------------------------------------------------------------- 35 | % GNU General Public License 36 | % 37 | % TORSCHE Scheduling Toolbox for Matlab is free software; 38 | % you can redistribute it and/or modify it under the terms of the 39 | % GNU General Public License as published by the Free Software 40 | % Foundation; either version 2 of the License, or (at your option) 41 | % any later version. 42 | % 43 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 44 | % that it will be useful, but WITHOUT ANY WARRANTY; 45 | % without even the implied warranty of MERCHANTABILITY or 46 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 47 | % General Public License for more details. 48 | % 49 | % You should have received a copy of the GNU General Public License 50 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 51 | % to the Free Software Foundation, Inc., 59 Temple Place, 52 | % Suite 330, Boston, MA 02111-1307 USA 53 | 54 | 55 | out = []; 56 | 57 | if issquare(sh) 58 | %out = zeros(max(size(sh.jobs)),max(size(sh.jobs))); 59 | for i=1:max(size(sh.Jobs)) 60 | out(i,:)=sh.Jobs{i}.ProcTime; 61 | end 62 | else 63 | warning('TORSCHE:shop:unsuportedFunctionCall','Method can be used if and only if all jobs of shop have same number of tasks'); 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /scheduling/@limitedbuffers/private/checkPairWiseCapacityMatrix.m: -------------------------------------------------------------------------------- 1 | function out = checkPairWiseCapacityMatrix(capacityMatrix) 2 | % CHECKPAIRWISECAPACITYMATRIX Return true if capacityMatrix (for 3 | % pair-wise mode in this case) has good properties. 4 | 5 | 6 | % Author: Jiri Cigler 7 | % Originator: Michal Kutil 8 | % Originator: Premysl Sucha 9 | % Project Responsible: Zdenek Hanzalek 10 | % Department of Control Engineering 11 | % FEE CTU in Prague, Czech Republic 12 | % Copyright (c) 2004 - 2009 13 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 14 | 15 | 16 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 17 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 18 | % and modified under the next licenses 19 | % 20 | % - GPL - GNU General Public License 21 | % 22 | % - and other licenses added by project originators or responsible 23 | % 24 | % Code can be modified and re-distributed under any combination 25 | % of the above listed licenses. If a contributor does not agree 26 | % with some of the licenses, he/she can delete appropriate line. 27 | % If you delete all lines, you are not allowed to distribute 28 | % source code and/or binaries utilizing code. 29 | % 30 | % -------------------------------------------------------------- 31 | % GNU General Public License 32 | % 33 | % TORSCHE Scheduling Toolbox for Matlab is free software; 34 | % you can redistribute it and/or modify it under the terms of the 35 | % GNU General Public License as published by the Free Software 36 | % Foundation; either version 2 of the License, or (at your option) 37 | % any later version. 38 | % 39 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 40 | % that it will be useful, but WITHOUT ANY WARRANTY; 41 | % without even the implied warranty of MERCHANTABILITY or 42 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 43 | % General Public License for more details. 44 | % 45 | % You should have received a copy of the GNU General Public License 46 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 47 | % to the Free Software Foundation, Inc., 59 Temple Place, 48 | % Suite 330, Boston, MA 02111-1307 USA 49 | 50 | 51 | if isnumeric(capacityMatrix) 52 | if size(capacityMatrix,1)== size(capacityMatrix,2) 53 | out = 1; 54 | else 55 | error('TORSCHE:limitedBuffers:invalidParam','Data for this model should be matrix of dimension MxM, see help!') 56 | 57 | end; 58 | else 59 | error('TORSCHE:limitedBuffers:invalidParam','Data should be numbers of matrix of numbers, see help!'); 60 | end 61 | end 62 | 63 | -------------------------------------------------------------------------------- /scheduling/@taskset/private/setprio_rm.m: -------------------------------------------------------------------------------- 1 | function TS = setprio_rm(TS) 2 | %SETPRIO_RM Implements rate monotonic priority assignment. 3 | % 4 | % See also SETPRIO. 5 | 6 | 7 | % Author: Michal Sojka 8 | % Originator: Michal Kutil 9 | % Originator: Premysl Sucha 10 | % Project Responsible: Zdenek Hanzalek 11 | % Department of Control Engineering 12 | % FEE CTU in Prague, Czech Republic 13 | % Copyright (c) 2004 - 2009 14 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 15 | 16 | 17 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 18 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 19 | % and modified under the next licenses 20 | % 21 | % - GPL - GNU General Public License 22 | % 23 | % - and other licenses added by project originators or responsible 24 | % 25 | % Code can be modified and re-distributed under any combination 26 | % of the above listed licenses. If a contributor does not agree 27 | % with some of the licenses, he/she can delete appropriate line. 28 | % If you delete all lines, you are not allowed to distribute 29 | % source code and/or binaries utilizing code. 30 | % 31 | % -------------------------------------------------------------- 32 | % GNU General Public License 33 | % 34 | % TORSCHE Scheduling Toolbox for Matlab is free software; 35 | % you can redistribute it and/or modify it under the terms of the 36 | % GNU General Public License as published by the Free Software 37 | % Foundation; either version 2 of the License, or (at your option) 38 | % any later version. 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 41 | % that it will be useful, but WITHOUT ANY WARRANTY; 42 | % without even the implied warranty of MERCHANTABILITY or 43 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | % General Public License for more details. 45 | % 46 | % You should have received a copy of the GNU General Public License 47 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 48 | % to the Free Software Foundation, Inc., 59 Temple Place, 49 | % Suite 330, Boston, MA 02111-1307 USA 50 | 51 | 52 | try 53 | per = get(TS, 'Period'); 54 | catch 55 | error('This is applicable only for taskset with periodic task(s).'); 56 | end 57 | 58 | [a ind] = sort(per); 59 | for i=1:length(ind) 60 | j = ind(i); 61 | if per(j) ~= NaN 62 | eval(['TS.tasks{j}=' class(TS.tasks{j}) '(TS.tasks{j}, ' char(39) 'Weight' char(39) ', length(ind)-i+1);']); 63 | TS.tasks{j}; 64 | end % if prio(j) ~= NaN 65 | end % for i=1:length(ind) 66 | -------------------------------------------------------------------------------- /scheduling/@schedobj/private/set_helper.m: -------------------------------------------------------------------------------- 1 | function object = set_helper(object, property, value) 2 | %SET_HELPER Internal function for property setting. 3 | % 4 | % SET_HELPER(OBJECT, PROPERTY, VALUE) sets PROPERTY of an OBJECT to 5 | % the VALUE. 6 | % 7 | % This function has to be copied to every descendant of SCHEDOBJ 8 | % class. Matlab's OOP behavior is very limited and this function 9 | % allows us to overcome some of these limations. 10 | % 11 | % See also: SET 12 | 13 | 14 | % Author: Michal Sojka 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | if (isfield(struct(object), property)) 60 | eval(['object.' property '=value;']); 61 | else 62 | eval(['object.' object.parent ' = set_helper(object.' object.parent ', property, value);']); 63 | end 64 | -------------------------------------------------------------------------------- /scheduling/private/johnsonAlgorithm.m: -------------------------------------------------------------------------------- 1 | function jobs = johnsonAlgorithm(jobs) 2 | %JOHNSONALGORITHM Kernel of Johnson algorithm 3 | 4 | 5 | % Author: Jiri Cigler 6 | % Originator: Michal Kutil 7 | % Originator: Premysl Sucha 8 | % Project Responsible: Zdenek Hanzalek 9 | % Department of Control Engineering 10 | % FEE CTU in Prague, Czech Republic 11 | % Copyright (c) 2004 - 2009 12 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 13 | 14 | 15 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 16 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 17 | % and modified under the next licenses 18 | % 19 | % - GPL - GNU General Public License 20 | % 21 | % - and other licenses added by project originators or responsible 22 | % 23 | % Code can be modified and re-distributed under any combination 24 | % of the above listed licenses. If a contributor does not agree 25 | % with some of the licenses, he/she can delete appropriate line. 26 | % If you delete all lines, you are not allowed to distribute 27 | % source code and/or binaries utilizing code. 28 | % 29 | % -------------------------------------------------------------- 30 | % GNU General Public License 31 | % 32 | % TORSCHE Scheduling Toolbox for Matlab is free software; 33 | % you can redistribute it and/or modify it under the terms of the 34 | % GNU General Public License as published by the Free Software 35 | % Foundation; either version 2 of the License, or (at your option) 36 | % any later version. 37 | % 38 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 39 | % that it will be useful, but WITHOUT ANY WARRANTY; 40 | % without even the implied warranty of MERCHANTABILITY or 41 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 42 | % General Public License for more details. 43 | % 44 | % You should have received a copy of the GNU General Public License 45 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 46 | % to the Free Software Foundation, Inc., 59 Temple Place, 47 | % Suite 330, Boston, MA 02111-1307 USA 48 | 49 | 50 | if isempty(jobs) 51 | return; 52 | end 53 | %Create lists S1 and S2 and sort them. 54 | S1 = []; 55 | S2 = []; 56 | index1 = 1; 57 | index2 = 1; 58 | 59 | for i=1:size(jobs,2) 60 | if jobs(1,i) > jobs(2,i) 61 | S2(:,index2) = jobs(:,i); 62 | index2 = index2 + 1; 63 | else 64 | S1(:,index1) = jobs(:,i); 65 | index1 = index1 + 1; 66 | end 67 | end 68 | if ~isempty(S1) 69 | S1 = sortrows(S1',[1 2])'; 70 | end 71 | if ~isempty(S2) 72 | S2 = -1*sortrows(-1*S2',[2 1])'; 73 | end 74 | jobs = [S1, S2]; 75 | 76 | end 77 | -------------------------------------------------------------------------------- /scheduling/@job/size.m: -------------------------------------------------------------------------------- 1 | function varargout =size(this,varargin) 2 | %SIZE returns dimension of job 3 | % 4 | %Synopsis 5 | % size = SIZE(J) 6 | % 7 | %Description 8 | % Properties: 9 | % J: 10 | % - job object 11 | % size: 12 | % - dimension of job (vecotr 1xM) 13 | % 14 | % See also JOB/JOB. 15 | 16 | 17 | % Author: Jiri Cigler 18 | % Originator: Michal Kutil 19 | % Originator: Premysl Sucha 20 | % Project Responsible: Zdenek Hanzalek 21 | % Department of Control Engineering 22 | % FEE CTU in Prague, Czech Republic 23 | % Copyright (c) 2004 - 2009 24 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 25 | 26 | 27 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 28 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 29 | % and modified under the next licenses 30 | % 31 | % - GPL - GNU General Public License 32 | % 33 | % - and other licenses added by project originators or responsible 34 | % 35 | % Code can be modified and re-distributed under any combination 36 | % of the above listed licenses. If a contributor does not agree 37 | % with some of the licenses, he/she can delete appropriate line. 38 | % If you delete all lines, you are not allowed to distribute 39 | % source code and/or binaries utilizing code. 40 | % 41 | % -------------------------------------------------------------- 42 | % GNU General Public License 43 | % 44 | % TORSCHE Scheduling Toolbox for Matlab is free software; 45 | % you can redistribute it and/or modify it under the terms of the 46 | % GNU General Public License as published by the Free Software 47 | % Foundation; either version 2 of the License, or (at your option) 48 | % any later version. 49 | % 50 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 51 | % that it will be useful, but WITHOUT ANY WARRANTY; 52 | % without even the implied warranty of MERCHANTABILITY or 53 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 54 | % General Public License for more details. 55 | % 56 | % You should have received a copy of the GNU General Public License 57 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 58 | % to the Free Software Foundation, Inc., 59 Temple Place, 59 | % Suite 330, Boston, MA 02111-1307 USA 60 | 61 | 62 | if nargin==1 63 | if nargout <= 1 64 | varargout{1}=size(this.taskset.ProcTime); 65 | elseif nargout == 2 66 | varargout{1}=size(this.taskset.ProcTime,1); 67 | varargout{2}=size(this.taskset.ProcTime,2); 68 | else 69 | end 70 | elseif nargin==2 71 | varargout{1} = size(this.taskset.ProcTime,varargin{1}); 72 | end 73 | end 74 | %end .. @job/get 75 | -------------------------------------------------------------------------------- /scheduling/@task/private/set_helper.m: -------------------------------------------------------------------------------- 1 | function object = set_helper(object, property, value) 2 | %SET_HELPER Internal function for property setting. 3 | % 4 | % SET_HELPER(OBJECT, PROPERTY, VALUE) sets PROPERTY of an OBJECT to 5 | % the VALUE. 6 | % 7 | % This function has to be copied to every descendant of SCHEDOBJ 8 | % class. Matlab's OOP behavior is very limited and this function 9 | % allows us to overcome some of these limations. 10 | % 11 | % See also: SET 12 | 13 | 14 | % Author: Michal Sojka 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | if (isfield(struct(object), property)) 60 | eval(['object.' property '=value;']); 61 | else 62 | eval(['object.' object.parent ' = ' object.parent '(object.' object.parent ', property, value);']); 63 | end 64 | -------------------------------------------------------------------------------- /scheduling/@taskset/setprio.m: -------------------------------------------------------------------------------- 1 | function setprio(TS, rule) 2 | %SETPRIO sets priority (weight) of tasks acording to some rules. 3 | % 4 | %Synopsis 5 | % SETPRIO(T, RULE) 6 | % 7 | %Description 8 | % Properties: 9 | % T: 10 | % - set of tasks 11 | % RULE: 12 | % - 'rm' rate monotonic 13 | % 14 | % See also PTASK/PTASK 15 | 16 | 17 | % Author: Michal Sojka 18 | % Originator: Michal Kutil 19 | % Originator: Premysl Sucha 20 | % Project Responsible: Zdenek Hanzalek 21 | % Department of Control Engineering 22 | % FEE CTU in Prague, Czech Republic 23 | % Copyright (c) 2004 - 2009 24 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 25 | 26 | 27 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 28 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 29 | % and modified under the next licenses 30 | % 31 | % - GPL - GNU General Public License 32 | % 33 | % - and other licenses added by project originators or responsible 34 | % 35 | % Code can be modified and re-distributed under any combination 36 | % of the above listed licenses. If a contributor does not agree 37 | % with some of the licenses, he/she can delete appropriate line. 38 | % If you delete all lines, you are not allowed to distribute 39 | % source code and/or binaries utilizing code. 40 | % 41 | % -------------------------------------------------------------- 42 | % GNU General Public License 43 | % 44 | % TORSCHE Scheduling Toolbox for Matlab is free software; 45 | % you can redistribute it and/or modify it under the terms of the 46 | % GNU General Public License as published by the Free Software 47 | % Foundation; either version 2 of the License, or (at your option) 48 | % any later version. 49 | % 50 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 51 | % that it will be useful, but WITHOUT ANY WARRANTY; 52 | % without even the implied warranty of MERCHANTABILITY or 53 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 54 | % General Public License for more details. 55 | % 56 | % You should have received a copy of the GNU General Public License 57 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 58 | % to the Free Software Foundation, Inc., 59 Temple Place, 59 | % Suite 330, Boston, MA 02111-1307 USA 60 | 61 | 62 | objectname = inputname(1); 63 | if isempty(objectname), 64 | error('First argument to SETPRIO must be a named variable.') 65 | end 66 | 67 | switch rule 68 | case 'rm' 69 | TS = setprio_rm(TS); 70 | otherwise 71 | error('Unknown rule parameter'); 72 | end 73 | assignin('caller',objectname,TS) 74 | -------------------------------------------------------------------------------- /scheduling/@node/private/set_helper.m: -------------------------------------------------------------------------------- 1 | function object = set_helper(object, property, value) 2 | %SET_HELPER Internal function for property setting. 3 | % 4 | % SET_HELPER(OBJECT, PROPERTY, VALUE) sets PROPERTY of an OBJECT to 5 | % the VALUE. 6 | % 7 | % This function has to be copied to every descendant of SCHEDOBJ 8 | % class. Matlab's OOP behavior is very limited and this function 9 | % allows us to overcome some of these limations. 10 | % 11 | % See also: SET 12 | 13 | 14 | % Author: Michal Sojka 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | 60 | if (isfield(struct(object), property)) 61 | eval(['object.' property '=value;']); 62 | else 63 | eval(['object.' object.parent ' = ' object.parent '(object.' object.parent ', property, value);']); 64 | end 65 | -------------------------------------------------------------------------------- /scheduling/@problem/private/set_helper.m: -------------------------------------------------------------------------------- 1 | function object = set_helper(object, property, value) 2 | %SET_HELPER Internal function for property setting. 3 | % 4 | % SET_HELPER(OBJECT, PROPERTY, VALUE) sets PROPERTY of an OBJECT to 5 | % the VALUE. 6 | % 7 | % This function has to be copied to every descendant of SCHEDOBJ 8 | % class. Matlab's OOP behavior is very limited and this function 9 | % allows us to overcome some of these limations. 10 | % 11 | % See also: SET 12 | 13 | 14 | % Author: Michal Sojka 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | 60 | if (isfield(struct(object), property)) 61 | eval(['object.' property '=value;']); 62 | else 63 | eval(['object.' object.parent ' = ' object.parent '(object.' object.parent ', property, value);']); 64 | end 65 | -------------------------------------------------------------------------------- /scheduling/spntl/spntl_candidates.c: -------------------------------------------------------------------------------- 1 | /* 2 | *CANDIDATES Auxiliary algorithm for schedule with Positive and Negative Time-Lags 3 | * 4 | * see also SPNTL_BAB.C, BAB.C 5 | 6 | * Author: Premysl Sucha 7 | * Originator: Michal Kutil 8 | * Originator: Premysl Sucha 9 | * Project Responsible: Zdenek Hanzalek 10 | * Department of Control Engineering 11 | * FEE CTU in Prague, Czech Republic 12 | * Copyright (c) 2004 - 2009 13 | * $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 14 | 15 | 16 | * This file is part of TORSCHE Scheduling Toolbox for Matlab. 17 | * TORSCHE Scheduling Toolbox for Matlab can be used, copied 18 | * and modified under the next licenses 19 | * 20 | * - GPL - GNU General Public License 21 | * 22 | * - and other licenses added by project originators or responsible 23 | * 24 | * Code can be modified and re-distributed under any combination 25 | * of the above listed licenses. If a contributor does not agree 26 | * with some of the licenses, he/she can delete appropriate line. 27 | * If you delete all lines, you are not allowed to distribute 28 | * source code and/or binaries utilizing code. 29 | * 30 | * -------------------------------------------------------------- 31 | * GNU General Public License 32 | * 33 | * TORSCHE Scheduling Toolbox for Matlab is free software; 34 | * you can redistribute it and/or modify it under the terms of the 35 | * GNU General Public License as published by the Free Software 36 | * Foundation; either version 2 of the License, or (at your option) 37 | * any later version. 38 | * 39 | * TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 40 | * that it will be useful, but WITHOUT ANY WARRANTY; 41 | * without even the implied warranty of MERCHANTABILITY or 42 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU 43 | * General Public License for more details. 44 | * 45 | * You should have received a copy of the GNU General Public License 46 | * along with TORSCHE Scheduling Toolbox for Matlab; if not, write 47 | * to the Free Software Foundation, Inc., 59 Temple Place, 48 | * Suite 330, Boston, MA 02111-1307 USA 49 | * 50 | */ 51 | 52 | 53 | #include "spntl_bab.h" 54 | 55 | 56 | void candidates(int *partialSchedule, int *partialTc) 57 | { 58 | 59 | int i,j; 60 | 61 | for(i=0;i 7 | % Author: Vojtech Navratil 8 | % Originator: Michal Kutil 9 | % Originator: Premysl Sucha 10 | % Project Responsible: Zdenek Hanzalek 11 | % Department of Control Engineering 12 | % FEE CTU in Prague, Czech Republic 13 | % Copyright (c) 2004 - 2009 14 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 15 | 16 | 17 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 18 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 19 | % and modified under the next licenses 20 | % 21 | % - GPL - GNU General Public License 22 | % 23 | % - and other licenses added by project originators or responsible 24 | % 25 | % Code can be modified and re-distributed under any combination 26 | % of the above listed licenses. If a contributor does not agree 27 | % with some of the licenses, he/she can delete appropriate line. 28 | % If you delete all lines, you are not allowed to distribute 29 | % source code and/or binaries utilizing code. 30 | % 31 | % -------------------------------------------------------------- 32 | % GNU General Public License 33 | % 34 | % TORSCHE Scheduling Toolbox for Matlab is free software; 35 | % you can redistribute it and/or modify it under the terms of the 36 | % GNU General Public License as published by the Free Software 37 | % Foundation; either version 2 of the License, or (at your option) 38 | % any later version. 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 41 | % that it will be useful, but WITHOUT ANY WARRANTY; 42 | % without even the implied warranty of MERCHANTABILITY or 43 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | % General Public License for more details. 45 | % 46 | % You should have received a copy of the GNU General Public License 47 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 48 | % to the Free Software Foundation, Inc., 59 Temple Place, 49 | % Suite 330, Boston, MA 02111-1307 USA 50 | 51 | 52 | clc; 53 | disp('Demo of graph coloring algorithm.'); 54 | disp('-------------------------------------------'); 55 | 56 | 57 | A = [0 1 1 0 0 0 0; 58 | 0 0 0 1 1 0 0; 59 | 0 0 0 0 0 1 1; 60 | 0 0 0 0 0 0 0; 61 | 1 0 0 1 0 0 0; 62 | 1 0 0 0 1 0 1; 63 | 0 0 0 0 1 0 0]; 64 | g3 = graph('adj',A); 65 | g3.Name = 'G_{2}'; 66 | g4 = graphcoloring(g3); 67 | g4.Name = 'G_{2} - Colored'; 68 | 69 | graphedit(g3,g4); 70 | 71 | %end of file 72 | 73 | -------------------------------------------------------------------------------- /scheduling/@edge/private/set_helper.m: -------------------------------------------------------------------------------- 1 | function object = set_helper(object, property, value) 2 | %SET_HELPER Internal function for property setting. 3 | % 4 | % SET_HELPER(OBJECT, PROPERTY, VALUE) sets PROPERTY of an OBJECT to 5 | % the VALUE. 6 | % 7 | % This function has to be copied to every descendant of SCHEDOBJ 8 | % class. Matlab's OOP behavior is very limited and this function 9 | % allows us to overcome some of these limations. 10 | % 11 | % See also: SET 12 | 13 | 14 | % Author: Michal Sojka 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | if (isfield(struct(object), property)) 60 | 61 | eval(['object.' property '=value;']); 62 | 63 | else 64 | eval(['object.' object.parent ' = ' object.parent '(object.' object.parent ', property, value);']); 65 | end 66 | -------------------------------------------------------------------------------- /scheduling/@ptask/private/set_helper.m: -------------------------------------------------------------------------------- 1 | function object = set_helper(object, property, value) 2 | %SET_HELPER Internal function for property setting. 3 | % 4 | % SET_HELPER(OBJECT, PROPERTY, VALUE) sets PROPERTY of an OBJECT to 5 | % the VALUE. 6 | % 7 | % This function has to be copied to every descendant of SCHEDOBJ 8 | % class. Matlab's OOP behavior is very limited and this function 9 | % allows us to overcome some of these limations. 10 | % 11 | % See also: SET 12 | 13 | 14 | % Author: Michal Sojka 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | if (isfield(struct(object), property)) 60 | 61 | eval(['object.' property '=value;']); 62 | 63 | else 64 | eval(['object.' object.parent ' = ' object.parent '(object.' object.parent ', property, value);']); 65 | end 66 | -------------------------------------------------------------------------------- /scheduling/@shop/display.m: -------------------------------------------------------------------------------- 1 | function display (S) 2 | % DISPLAY Display properties of object shop. 3 | % 4 | % Synopsis 5 | % DISPLAY(s) 6 | % 7 | % Description 8 | % Text display of properties of shop s. 9 | % 10 | % See also JOB/JOB LIMITEDBUFFERS/LIMITEDBUFFERS, TRANSPORTROBOTS/TRANSPORTROBOTS. 11 | 12 | 13 | % Author: Jiri Cigler 14 | % Originator: Michal Kutil 15 | % Originator: Premysl Sucha 16 | % Project Responsible: Zdenek Hanzalek 17 | % Department of Control Engineering 18 | % FEE CTU in Prague, Czech Republic 19 | % Copyright (c) 2004 - 2009 20 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 21 | 22 | 23 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 24 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 25 | % and modified under the next licenses 26 | % 27 | % - GPL - GNU General Public License 28 | % 29 | % - and other licenses added by project originators or responsible 30 | % 31 | % Code can be modified and re-distributed under any combination 32 | % of the above listed licenses. If a contributor does not agree 33 | % with some of the licenses, he/she can delete appropriate line. 34 | % If you delete all lines, you are not allowed to distribute 35 | % source code and/or binaries utilizing code. 36 | % 37 | % -------------------------------------------------------------- 38 | % GNU General Public License 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is free software; 41 | % you can redistribute it and/or modify it under the terms of the 42 | % GNU General Public License as published by the Free Software 43 | % Foundation; either version 2 of the License, or (at your option) 44 | % any later version. 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 47 | % that it will be useful, but WITHOUT ANY WARRANTY; 48 | % without even the implied warranty of MERCHANTABILITY or 49 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 50 | % General Public License for more details. 51 | % 52 | % You should have received a copy of the GNU General Public License 53 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 54 | % to the Free Software Foundation, Inc., 59 Temple Place, 55 | % Suite 330, Boston, MA 02111-1307 USA 56 | 57 | 58 | disp(['Shop with ' int2str(size(S.Jobs,2)) ' jobs']); 59 | if ~isempty(S.TransportRobots) 60 | disp([' Robots: ' int2str(max(size(S.TransportRobots.transportationTimes)))]); 61 | end; 62 | if ~isempty(S.LimitedBuffers) 63 | disp([' Limited buffers: ' S.LimitedBuffers.Model]); 64 | end; 65 | if S.Schedule 66 | disp(' Schedule: Yes'); 67 | end; 68 | 69 | disp([' Shop type: ' S.Type]); 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /scheduling/@transportrobots/private/set_helper.m: -------------------------------------------------------------------------------- 1 | function object = set_helper(object, property, value) 2 | %SET_HELPER Internal function for property setting. 3 | % 4 | % SET_HELPER(OBJECT, PROPERTY, VALUE) sets PROPERTY of an OBJECT to 5 | % the VALUE. 6 | % 7 | % This function has to be copied to every descendant of SCHEDOBJ 8 | % class. Matlab's OOP behavior is very limited and this function 9 | % allows us to overcome some of these limations. 10 | % 11 | % See also: SET 12 | 13 | 14 | % Author: Michal Sojka 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | if (isfield(struct(object), property)) 60 | eval(['object.' property '=value;']); 61 | else 62 | 63 | eval(['object.' object.parent ' = ' object.parent '(object.' object.parent ', property, value);']); 64 | 65 | end 66 | 67 | 68 | -------------------------------------------------------------------------------- /scheduling/@schedobj/private/get_props.m: -------------------------------------------------------------------------------- 1 | function val = get_props(SCHEDOBJ) 2 | %GET_PROPS Returns structure of SCHEDOBJ properties. 3 | % 4 | % VAL = GEN_STRUCT(SCHEDOBJ,AllProps) returns the structure 5 | % containing all object properties. 6 | % 7 | % NOTE: this is an internal function which is used by the GET 8 | % method. Don't call this method yourself. 9 | 10 | % This version is used in this base class only. Inherited classes 11 | % should use a diferent version of this method. 12 | 13 | 14 | % Author: Michal Kutil 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | AllProps = fieldnames(SCHEDOBJ); 60 | 61 | for i=1:length(AllProps) 62 | eval (['val.' AllProps{i} '= get(SCHEDOBJ,''' AllProps{i} ''');']); 63 | end 64 | 65 | %end .. @schedobj/get_props 66 | -------------------------------------------------------------------------------- /scheduling/@task/get_scht.m: -------------------------------------------------------------------------------- 1 | function [start, length, processor, period] = get_scht (task) 2 | %GET_SCHT gets schedule (starts time and length of time) from a task 3 | % 4 | %Synopsis 5 | % [start, length, processor, period] = GET_SCHT(T) 6 | % 7 | %Description 8 | % Properties: 9 | % T: 10 | % - task 11 | % start: 12 | % - array of start times 13 | % length: 14 | % - array of lengths of time 15 | % processor: 16 | % - array of numbers of processor 17 | % period: 18 | % - task period 19 | % 20 | % See also TASK/ADD_SCHT 21 | 22 | 23 | % Author: Michal Kutil 24 | % Originator: Michal Kutil 25 | % Originator: Premysl Sucha 26 | % Project Responsible: Zdenek Hanzalek 27 | % Department of Control Engineering 28 | % FEE CTU in Prague, Czech Republic 29 | % Copyright (c) 2004 - 2009 30 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 31 | 32 | 33 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 34 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 35 | % and modified under the next licenses 36 | % 37 | % - GPL - GNU General Public License 38 | % 39 | % - and other licenses added by project originators or responsible 40 | % 41 | % Code can be modified and re-distributed under any combination 42 | % of the above listed licenses. If a contributor does not agree 43 | % with some of the licenses, he/she can delete appropriate line. 44 | % If you delete all lines, you are not allowed to distribute 45 | % source code and/or binaries utilizing code. 46 | % 47 | % -------------------------------------------------------------- 48 | % GNU General Public License 49 | % 50 | % TORSCHE Scheduling Toolbox for Matlab is free software; 51 | % you can redistribute it and/or modify it under the terms of the 52 | % GNU General Public License as published by the Free Software 53 | % Foundation; either version 2 of the License, or (at your option) 54 | % any later version. 55 | % 56 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 57 | % that it will be useful, but WITHOUT ANY WARRANTY; 58 | % without even the implied warranty of MERCHANTABILITY or 59 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 60 | % General Public License for more details. 61 | % 62 | % You should have received a copy of the GNU General Public License 63 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 64 | % to the Free Software Foundation, Inc., 59 Temple Place, 65 | % Suite 330, Boston, MA 02111-1307 USA 66 | 67 | 68 | start = task.schStart; 69 | length = task.schLength; 70 | processor = task.schProcessor; 71 | period = task.schPeriod; 72 | %end .. @task/get_scht 73 | -------------------------------------------------------------------------------- /scheduling/@limitedbuffers/private/set_helper.m: -------------------------------------------------------------------------------- 1 | function object = set_helper(object, property, value) 2 | %SET_HELPER Internal function for property setting. 3 | % 4 | % SET_HELPER(OBJECT, PROPERTY, VALUE) sets PROPERTY of an OBJECT to 5 | % the VALUE. 6 | % 7 | % This function has to be copied to every descendant of SCHEDOBJ 8 | % class. Matlab's OOP behavior is very limited and this function 9 | % allows us to overcome some of these limations. 10 | % 11 | % See also: SET 12 | 13 | 14 | % Author: Michal Sojka 15 | % Author: Jiri Cigler 16 | % Originator: Michal Kutil 17 | % Originator: Premysl Sucha 18 | % Project Responsible: Zdenek Hanzalek 19 | % Department of Control Engineering 20 | % FEE CTU in Prague, Czech Republic 21 | % Copyright (c) 2004 - 2009 22 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 23 | 24 | 25 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 26 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 27 | % and modified under the next licenses 28 | % 29 | % - GPL - GNU General Public License 30 | % 31 | % - and other licenses added by project originators or responsible 32 | % 33 | % Code can be modified and re-distributed under any combination 34 | % of the above listed licenses. If a contributor does not agree 35 | % with some of the licenses, he/she can delete appropriate line. 36 | % If you delete all lines, you are not allowed to distribute 37 | % source code and/or binaries utilizing code. 38 | % 39 | % -------------------------------------------------------------- 40 | % GNU General Public License 41 | % 42 | % TORSCHE Scheduling Toolbox for Matlab is free software; 43 | % you can redistribute it and/or modify it under the terms of the 44 | % GNU General Public License as published by the Free Software 45 | % Foundation; either version 2 of the License, or (at your option) 46 | % any later version. 47 | % 48 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 49 | % that it will be useful, but WITHOUT ANY WARRANTY; 50 | % without even the implied warranty of MERCHANTABILITY or 51 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 52 | % General Public License for more details. 53 | % 54 | % You should have received a copy of the GNU General Public License 55 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 56 | % to the Free Software Foundation, Inc., 59 Temple Place, 57 | % Suite 330, Boston, MA 02111-1307 USA 58 | 59 | 60 | if (isfield(struct(object), property)) 61 | eval(['object.' property '=value;']); 62 | else 63 | 64 | eval(['object.' object.parent ' = ' object.parent '(object.' object.parent ', property, value);']); 65 | end 66 | 67 | 68 | -------------------------------------------------------------------------------- /scheduling/@taskset/get_correction.m: -------------------------------------------------------------------------------- 1 | function [Value] = get_correction(taskset,Property,Value) 2 | %GET_CORRECTION Corection for automatic solved data from sched obj. 3 | % 4 | % VALUE = GET_CORRECTION(TASKSET,'PropertyName','Value') returns 5 | % repaired the value of the specified virtual property of 6 | % the TASKSET. 7 | % 8 | % NOTE: This function is for internal use only. Use GET instead. 9 | % 10 | % See also GET. 11 | 12 | 13 | % Author: Michal Kutil 14 | % Originator: Michal Kutil 15 | % Originator: Premysl Sucha 16 | % Project Responsible: Zdenek Hanzalek 17 | % Department of Control Engineering 18 | % FEE CTU in Prague, Czech Republic 19 | % Copyright (c) 2004 - 2009 20 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 21 | 22 | 23 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 24 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 25 | % and modified under the next licenses 26 | % 27 | % - GPL - GNU General Public License 28 | % 29 | % - and other licenses added by project originators or responsible 30 | % 31 | % Code can be modified and re-distributed under any combination 32 | % of the above listed licenses. If a contributor does not agree 33 | % with some of the licenses, he/she can delete appropriate line. 34 | % If you delete all lines, you are not allowed to distribute 35 | % source code and/or binaries utilizing code. 36 | % 37 | % -------------------------------------------------------------- 38 | % GNU General Public License 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is free software; 41 | % you can redistribute it and/or modify it under the terms of the 42 | % GNU General Public License as published by the Free Software 43 | % Foundation; either version 2 of the License, or (at your option) 44 | % any later version. 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 47 | % that it will be useful, but WITHOUT ANY WARRANTY; 48 | % without even the implied warranty of MERCHANTABILITY or 49 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 50 | % General Public License for more details. 51 | % 52 | % You should have received a copy of the GNU General Public License 53 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 54 | % to the Free Software Foundation, Inc., 59 Temple Place, 55 | % Suite 330, Boston, MA 02111-1307 USA 56 | 57 | 58 | switch lower(Property) 59 | case 'prec' % lower case 60 | S = full(Value); 61 | [i,j,s] = find(S); 62 | m = max(length(S),size(taskset)); 63 | S = sparse(i,j,s,m,m); 64 | Value = full(S); 65 | return; 66 | end 67 | 68 | %end .. @task/get_correction 69 | -------------------------------------------------------------------------------- /scheduling/private/sort_est.m: -------------------------------------------------------------------------------- 1 | function [taskset, order] = sort_est(taskset, varargin) 2 | %The Earliest Starting Time first is a scheduling strategy described by Blazewicz. 3 | % 4 | % [taskset order] = sort_est(taskset [, iteration, processor]) add schedule to set of tasks 5 | % taskset - set of tasks 6 | % order - list with re-arranged order 7 | % iteration - actual iteration 8 | % processor - processor with minimal time 9 | % 10 | % see also LISTSCH 11 | 12 | 13 | % Author: M. Stibor 14 | % Originator: Michal Kutil 15 | % Originator: Premysl Sucha 16 | % Project Responsible: Zdenek Hanzalek 17 | % Department of Control Engineering 18 | % FEE CTU in Prague, Czech Republic 19 | % Copyright (c) 2004 - 2009 20 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 21 | 22 | 23 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 24 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 25 | % and modified under the next licenses 26 | % 27 | % - GPL - GNU General Public License 28 | % 29 | % - and other licenses added by project originators or responsible 30 | % 31 | % Code can be modified and re-distributed under any combination 32 | % of the above listed licenses. If a contributor does not agree 33 | % with some of the licenses, he/she can delete appropriate line. 34 | % If you delete all lines, you are not allowed to distribute 35 | % source code and/or binaries utilizing code. 36 | % 37 | % -------------------------------------------------------------- 38 | % GNU General Public License 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is free software; 41 | % you can redistribute it and/or modify it under the terms of the 42 | % GNU General Public License as published by the Free Software 43 | % Foundation; either version 2 of the License, or (at your option) 44 | % any later version. 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 47 | % that it will be useful, but WITHOUT ANY WARRANTY; 48 | % without even the implied warranty of MERCHANTABILITY or 49 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 50 | % General Public License for more details. 51 | % 52 | % You should have received a copy of the GNU General Public License 53 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 54 | % to the Free Software Foundation, Inc., 59 Temple Place, 55 | % Suite 330, Boston, MA 02111-1307 USA 56 | 57 | 58 | if nargin>1 59 | if varargin{1}>1 60 | order = 1:length(taskset.tasks); 61 | return 62 | end 63 | end 64 | 65 | wreltime=taskset.releasetime./taskset.weight; 66 | [taskset order]=sort(taskset,wreltime,'inc'); % sort taskset 67 | 68 | % end of sort_est.m 69 | -------------------------------------------------------------------------------- /scheduling/@task/add_scht.m: -------------------------------------------------------------------------------- 1 | function task = add_scht (task, start, length, processor) 2 | %ADD_SCHT adds schedule (starts time and lenght of time) into a task 3 | % 4 | %Synopsis 5 | % Tout = ADD_SCHT(Tin, start, lenght[, processor]) 6 | % 7 | %Description 8 | % Properties: 9 | % Tout: 10 | % - new task with schedule 11 | % Tin: 12 | % - task without schedule 13 | % start: 14 | % - array of start time 15 | % lenght: 16 | % - array of length of time 17 | % processor: 18 | % - array of number of processor 19 | % 20 | % See also TASK/GET_SCHT 21 | 22 | 23 | % Author: Michal Kutil 24 | % Originator: Michal Kutil 25 | % Originator: Premysl Sucha 26 | % Project Responsible: Zdenek Hanzalek 27 | % Department of Control Engineering 28 | % FEE CTU in Prague, Czech Republic 29 | % Copyright (c) 2004 - 2009 30 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 31 | 32 | 33 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 34 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 35 | % and modified under the next licenses 36 | % 37 | % - GPL - GNU General Public License 38 | % 39 | % - and other licenses added by project originators or responsible 40 | % 41 | % Code can be modified and re-distributed under any combination 42 | % of the above listed licenses. If a contributor does not agree 43 | % with some of the licenses, he/she can delete appropriate line. 44 | % If you delete all lines, you are not allowed to distribute 45 | % source code and/or binaries utilizing code. 46 | % 47 | % -------------------------------------------------------------- 48 | % GNU General Public License 49 | % 50 | % TORSCHE Scheduling Toolbox for Matlab is free software; 51 | % you can redistribute it and/or modify it under the terms of the 52 | % GNU General Public License as published by the Free Software 53 | % Foundation; either version 2 of the License, or (at your option) 54 | % any later version. 55 | % 56 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 57 | % that it will be useful, but WITHOUT ANY WARRANTY; 58 | % without even the implied warranty of MERCHANTABILITY or 59 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 60 | % General Public License for more details. 61 | % 62 | % You should have received a copy of the GNU General Public License 63 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 64 | % to the Free Software Foundation, Inc., 59 Temple Place, 65 | % Suite 330, Boston, MA 02111-1307 USA 66 | 67 | 68 | 69 | task.schStart = start; 70 | task.schLength = length; 71 | if (exist('processor', 'var')) 72 | task.schProcessor = processor; 73 | end 74 | 75 | %end .. @task/add_scht 76 | -------------------------------------------------------------------------------- /scheduling/stdemos/sat_demo.m: -------------------------------------------------------------------------------- 1 | % SAT_DEMO Demo application of the scheduling with 'P|prec|Cmax' notation 2 | % by SAT solver use. 3 | % 4 | % See also SATSCH 5 | 6 | % Author(s): M. Kutil 7 | % Copyright (c) 2005 CTU FEE 8 | % $Revision: 2892 $ $Date: 2009-03-18 10:20:37 +0100 (st, 18 III 2009) $ 9 | 10 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 11 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 12 | % and modified under the next licenses 13 | % 14 | % - GPL - GNU General Public License 15 | % 16 | % - and other licenses added by project originators or responsible 17 | % 18 | % Code can be modified and re-distributed under any combination 19 | % of the above listed licenses. If a contributor does not agree 20 | % with some of the licenses, he/she can delete appropriate line. 21 | % If you delete all lines, you are not allowed to distribute 22 | % source code and/or binaries utilizing code. 23 | % 24 | % -------------------------------------------------------------- 25 | % GNU General Public License 26 | % 27 | % TORSCHE Scheduling Toolbox for Matlab is free software; 28 | % you can redistribute it and/or modify it under the terms of the 29 | % GNU General Public License as published by the Free Software 30 | % Foundation; either version 2 of the License, or (at your option) 31 | % any later version. 32 | % 33 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 34 | % that it will be useful, but WITHOUT ANY WARRANTY; 35 | % without even the implied warranty of MERCHANTABILITY or 36 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 37 | % General Public License for more details. 38 | % 39 | % You should have received a copy of the GNU General Public License 40 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 41 | % to the Free Software Foundation, Inc., 59 Temple Place, 42 | % Suite 330, Boston, MA 02111-1307 USA 43 | 44 | clc; 45 | disp(' SAT scheduler demo '); 46 | disp(' ----------------------'); 47 | 48 | %create set of tasks 49 | t1=task('task1',5,1,22); 50 | t2=task('task2',3,5,38); 51 | t3=task('task3',6,1,22); 52 | t4=task('task4',4,3,27); 53 | t5=task('task5',1,5,30); 54 | t6=task('task6',7,5,21); 55 | t7=task('task7',9,6,32); 56 | t8=task('task8',6,8,30); 57 | t9=task('task9',2,1,45); 58 | t10=task('task10',6,2,40); 59 | t11=task('task11',10,15,30); 60 | T=taskset([t1 t2 t3 t4 t5 t6 t7 t8 t9 t10]); 61 | 62 | disp(' '); 63 | disp('An instance of the scheduling problem:'); 64 | get(T) 65 | 66 | 67 | %define the problem 68 | p=problem('P|prec|Cmax'); 69 | subplot(2,1,1) 70 | plot(T); 71 | title('Scheduling problem'); 72 | 73 | TS = satsch(T,p,2); 74 | subplot(2,1,2) 75 | plot(TS); 76 | title('Solved schedule') 77 | 78 | %end of file 79 | -------------------------------------------------------------------------------- /scheduling/iscolor.m: -------------------------------------------------------------------------------- 1 | function out = iscolor (color) 2 | %ISCOLOR True for valid color. 3 | % ISCOLOR(C) returns 1 if C is RGB Value, 2 if C is long name, 3 for 4 | % short name and 0 otherwise. 5 | % 6 | % See to documentation (>>doc ColorSpec) for more information 7 | % See also COLOR2RGB 8 | 9 | % Author: Michal Kutil 10 | % Originator: Michal Kutil 11 | % Originator: Premysl Sucha 12 | % Project Responsible: Zdenek Hanzalek 13 | % Department of Control Engineering 14 | % FEE CTU in Prague, Czech Republic 15 | % Copyright (c) 2004 - 2009 16 | % $Revision: 2895 $ $Date:: 2009-03-18 11:24:58 +0100 #$ 17 | 18 | 19 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 20 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 21 | % and modified under the next licenses 22 | % 23 | % - GPL - GNU General Public License 24 | % 25 | % - and other licenses added by project originators or responsible 26 | % 27 | % Code can be modified and re-distributed under any combination 28 | % of the above listed licenses. If a contributor does not agree 29 | % with some of the licenses, he/she can delete appropriate line. 30 | % If you delete all lines, you are not allowed to distribute 31 | % source code and/or binaries utilizing code. 32 | % 33 | % -------------------------------------------------------------- 34 | % GNU General Public License 35 | % 36 | % TORSCHE Scheduling Toolbox for Matlab is free software; 37 | % you can redistribute it and/or modify it under the terms of the 38 | % GNU General Public License as published by the Free Software 39 | % Foundation; either version 2 of the License, or (at your option) 40 | % any later version. 41 | % 42 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 43 | % that it will be useful, but WITHOUT ANY WARRANTY; 44 | % without even the implied warranty of MERCHANTABILITY or 45 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 46 | % General Public License for more details. 47 | % 48 | % You should have received a copy of the GNU General Public License 49 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 50 | % to the Free Software Foundation, Inc., 59 Temple Place, 51 | % Suite 330, Boston, MA 02111-1307 USA 52 | 53 | 54 | out = 0; 55 | if isnumeric(color) 56 | if all(size(color) == [1 3]) 57 | if all(color <= 1) && all(color >= 0) 58 | out = 1; 59 | end 60 | end 61 | elseif ischar(color) 62 | if sum(strcmpi(color,{'yellow','magenta','cyan','red','green','blue','white','black'})) 63 | out = 2; 64 | elseif sum(strcmpi(color,{'y','m','c','r','g','b','w','k'})) 65 | out = 3; 66 | end 67 | end 68 | %end .. iscolor 69 | -------------------------------------------------------------------------------- /scheduling/@schedobj/fieldnames.m: -------------------------------------------------------------------------------- 1 | function [Props,AsgnVals,DefVal] = fieldnames(schedobj) 2 | %FIELDNAMES All public properties and their assignable values and default 3 | % value 4 | % 5 | % [PROPS,ASGNVALS,DEFVAL] = FIELDNAMES(SCHEDOBJ) 6 | % PROPS - list of public properties of the object SCHEDOBJ (a cell vector) 7 | % ASGNVALS - assignable values for these properties (a cell vector) 8 | % DEFVAL - default values 9 | % 10 | % See also SCHEDOBJ/GET, SCHEDOBJ/SET. 11 | 12 | 13 | % Author: Michal Kutil 14 | % Originator: Michal Kutil 15 | % Originator: Premysl Sucha 16 | % Project Responsible: Zdenek Hanzalek 17 | % Department of Control Engineering 18 | % FEE CTU in Prague, Czech Republic 19 | % Copyright (c) 2004 - 2009 20 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 21 | 22 | 23 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 24 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 25 | % and modified under the next licenses 26 | % 27 | % - GPL - GNU General Public License 28 | % 29 | % - and other licenses added by project originators or responsible 30 | % 31 | % Code can be modified and re-distributed under any combination 32 | % of the above listed licenses. If a contributor does not agree 33 | % with some of the licenses, he/she can delete appropriate line. 34 | % If you delete all lines, you are not allowed to distribute 35 | % source code and/or binaries utilizing code. 36 | % 37 | % -------------------------------------------------------------- 38 | % GNU General Public License 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is free software; 41 | % you can redistribute it and/or modify it under the terms of the 42 | % GNU General Public License as published by the Free Software 43 | % Foundation; either version 2 of the License, or (at your option) 44 | % any later version. 45 | % 46 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 47 | % that it will be useful, but WITHOUT ANY WARRANTY; 48 | % without even the implied warranty of MERCHANTABILITY or 49 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 50 | % General Public License for more details. 51 | % 52 | % You should have received a copy of the GNU General Public License 53 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 54 | % to the Free Software Foundation, Inc., 59 Temple Place, 55 | % Suite 330, Boston, MA 02111-1307 USA 56 | 57 | 58 | 59 | % SCHEDOBJ properties 60 | Props = {'Notes'}; % A row of properties 61 | 62 | % Also return assignable values if needed 63 | if nargout>1, 64 | 65 | AsgnVals = {'An arbitrary string'}; 66 | 67 | if nargout>2, 68 | DefVal = {''}; 69 | end 70 | end 71 | 72 | %end .. @schedobj/fieldnames 73 | -------------------------------------------------------------------------------- /scheduling/stdemos/spanningtree_demo.m: -------------------------------------------------------------------------------- 1 | % SPANNNINGTREE_DEMO Demo application of the graph coloring 2 | % 3 | % See also SPANNNINGTREE 4 | 5 | % Author: Roman Capek 6 | % Author: Vojtech Navratil 7 | % Originator: Michal Kutil 8 | % Originator: Premysl Sucha 9 | % Project Responsible: Zdenek Hanzalek 10 | % Department of Control Engineering 11 | % FEE CTU in Prague, Czech Republic 12 | % Copyright (c) 2004 - 2009 13 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 14 | 15 | 16 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 17 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 18 | % and modified under the next licenses 19 | % 20 | % - GPL - GNU General Public License 21 | % 22 | % - and other licenses added by project originators or responsible 23 | % 24 | % Code can be modified and re-distributed under any combination 25 | % of the above listed licenses. If a contributor does not agree 26 | % with some of the licenses, he/she can delete appropriate line. 27 | % If you delete all lines, you are not allowed to distribute 28 | % source code and/or binaries utilizing code. 29 | % 30 | % -------------------------------------------------------------- 31 | % GNU General Public License 32 | % 33 | % TORSCHE Scheduling Toolbox for Matlab is free software; 34 | % you can redistribute it and/or modify it under the terms of the 35 | % GNU General Public License as published by the Free Software 36 | % Foundation; either version 2 of the License, or (at your option) 37 | % any later version. 38 | % 39 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 40 | % that it will be useful, but WITHOUT ANY WARRANTY; 41 | % without even the implied warranty of MERCHANTABILITY or 42 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 43 | % General Public License for more details. 44 | % 45 | % You should have received a copy of the GNU General Public License 46 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 47 | % to the Free Software Foundation, Inc., 59 Temple Place, 48 | % Suite 330, Boston, MA 02111-1307 USA 49 | 50 | 51 | clc; 52 | disp('Spanning tree demo (greedy algorithm).'); 53 | disp('------------------------------------------------------'); 54 | 55 | 56 | %create graph 57 | disp(' '); 58 | disp('Adjacency matrix of the input graph'); 59 | A = [inf 1 2 inf 7;... 60 | inf inf 3 4 inf;... 61 | inf 9 inf 1 1;... 62 | 8 5 inf inf inf;... 63 | 7 inf 4 5 inf] 64 | g1 = graph(A); 65 | g1.Name = 'Input Graph'; 66 | 67 | %call the algorithm 68 | g2 = spanningtree(g1); 69 | g2.Name = 'Spanning Tree'; 70 | 71 | %display results 72 | graphedit(g1,g2); 73 | 74 | 75 | -------------------------------------------------------------------------------- /scheduling/@graph/removeedge.m: -------------------------------------------------------------------------------- 1 | function g = removeedge(g,listOfEdges) 2 | %REMOVEEDGE Removes ordered edge or edges. 3 | % 4 | % graph = REMOVEEDGE(graph,listOfEdges) 5 | % graph - object graph 6 | % listOfEdges - number (or array of numbers) of edge to removal 7 | % listOfEdges = 2; 8 | % listOfEdges = [2 3 4]; 9 | % listOfEdges = [2:4]; 10 | % 11 | % See also GRAPH, EDGE. 12 | 13 | 14 | % Author: Vojtech Navratil 15 | % Originator: Michal Kutil 16 | % Originator: Premysl Sucha 17 | % Project Responsible: Zdenek Hanzalek 18 | % Department of Control Engineering 19 | % FEE CTU in Prague, Czech Republic 20 | % Copyright (c) 2004 - 2009 21 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 22 | 23 | 24 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 25 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 26 | % and modified under the next licenses 27 | % 28 | % - GPL - GNU General Public License 29 | % 30 | % - and other licenses added by project originators or responsible 31 | % 32 | % Code can be modified and re-distributed under any combination 33 | % of the above listed licenses. If a contributor does not agree 34 | % with some of the licenses, he/she can delete appropriate line. 35 | % If you delete all lines, you are not allowed to distribute 36 | % source code and/or binaries utilizing code. 37 | % 38 | % -------------------------------------------------------------- 39 | % GNU General Public License 40 | % 41 | % TORSCHE Scheduling Toolbox for Matlab is free software; 42 | % you can redistribute it and/or modify it under the terms of the 43 | % GNU General Public License as published by the Free Software 44 | % Foundation; either version 2 of the License, or (at your option) 45 | % any later version. 46 | % 47 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 48 | % that it will be useful, but WITHOUT ANY WARRANTY; 49 | % without even the implied warranty of MERCHANTABILITY or 50 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 51 | % General Public License for more details. 52 | % 53 | % You should have received a copy of the GNU General Public License 54 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 55 | % to the Free Software Foundation, Inc., 59 Temple Place, 56 | % Suite 330, Boston, MA 02111-1307 USA 57 | 58 | 59 | numEdges = length(g.E); 60 | if ~isempty(listOfEdges) 61 | if numEdges >= max(listOfEdges) 62 | g.E(listOfEdges) = []; 63 | g.eps(listOfEdges,:) = []; 64 | else 65 | error('TORSCHE:graph:tooManyEdges', ['There are ' num2str(numEdges) ' edges in the graph.']); 66 | return; 67 | end 68 | end 69 | 70 | %end .. @graph/removeedge 71 | -------------------------------------------------------------------------------- /scheduling/private/tex2mtex.m: -------------------------------------------------------------------------------- 1 | function out=tex2mtex(in) 2 | %TEX2MTEX Reduce tex string to tex string acceptable by matlab 3 | % 4 | % Description 5 | % out=TEX2MTEX(in) 6 | % in - input string 7 | % out - output reduced string 8 | 9 | 10 | % Author: Michal Kutil 11 | % Originator: Michal Kutil 12 | % Originator: Premysl Sucha 13 | % Project Responsible: Zdenek Hanzalek 14 | % Department of Control Engineering 15 | % FEE CTU in Prague, Czech Republic 16 | % Copyright (c) 2004 - 2009 17 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 18 | 19 | 20 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 21 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 22 | % and modified under the next licenses 23 | % 24 | % - GPL - GNU General Public License 25 | % 26 | % - and other licenses added by project originators or responsible 27 | % 28 | % Code can be modified and re-distributed under any combination 29 | % of the above listed licenses. If a contributor does not agree 30 | % with some of the licenses, he/she can delete appropriate line. 31 | % If you delete all lines, you are not allowed to distribute 32 | % source code and/or binaries utilizing code. 33 | % 34 | % -------------------------------------------------------------- 35 | % GNU General Public License 36 | % 37 | % TORSCHE Scheduling Toolbox for Matlab is free software; 38 | % you can redistribute it and/or modify it under the terms of the 39 | % GNU General Public License as published by the Free Software 40 | % Foundation; either version 2 of the License, or (at your option) 41 | % any later version. 42 | % 43 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 44 | % that it will be useful, but WITHOUT ANY WARRANTY; 45 | % without even the implied warranty of MERCHANTABILITY or 46 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 47 | % General Public License for more details. 48 | % 49 | % You should have received a copy of the GNU General Public License 50 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 51 | % to the Free Software Foundation, Inc., 59 Temple Place, 52 | % Suite 330, Boston, MA 02111-1307 USA 53 | 54 | 55 | if iscell(in) 56 | for i = 1:length(in) 57 | out{i} = strreduce(in{i}); 58 | end 59 | else 60 | out = strreduce(in); 61 | end 62 | 63 | 64 | 65 | function out = strreduce(in) 66 | 67 | if ~ischar(in) 68 | error('TORSCHE:invalidDataTypes', 'Input string must be a string data type.'); 69 | end 70 | 71 | if length(in) > 0 72 | if (in(1) == '$') && (in(end) == '$') 73 | in = in(2:end-1); 74 | end 75 | 76 | if ~mod(sum(in == '$'),2) 77 | in = in(in ~= '$'); 78 | end 79 | end 80 | out = in; 81 | -------------------------------------------------------------------------------- /scheduling/@graph/horzcat.m: -------------------------------------------------------------------------------- 1 | function gOut = horzcat(varargin) 2 | %HORZCAT Concatenation of graph. 3 | % G = [G1 G2 G3 ... ] 4 | % 5 | % See also GRAPH. 6 | 7 | % Author: Vojtech Navratil 8 | % Originator: Michal Kutil 9 | % Originator: Premysl Sucha 10 | % Project Responsible: Zdenek Hanzalek 11 | % Department of Control Engineering 12 | % FEE CTU in Prague, Czech Republic 13 | % Copyright (c) 2004 - 2009 14 | % $Revision: 2896 $ $Date:: 2009-03-18 12:20:12 +0100 #$ 15 | 16 | 17 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 18 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 19 | % and modified under the next licenses 20 | % 21 | % - GPL - GNU General Public License 22 | % 23 | % - and other licenses added by project originators or responsible 24 | % 25 | % Code can be modified and re-distributed under any combination 26 | % of the above listed licenses. If a contributor does not agree 27 | % with some of the licenses, he/she can delete appropriate line. 28 | % If you delete all lines, you are not allowed to distribute 29 | % source code and/or binaries utilizing code. 30 | % 31 | % -------------------------------------------------------------- 32 | % GNU General Public License 33 | % 34 | % TORSCHE Scheduling Toolbox for Matlab is free software; 35 | % you can redistribute it and/or modify it under the terms of the 36 | % GNU General Public License as published by the Free Software 37 | % Foundation; either version 2 of the License, or (at your option) 38 | % any later version. 39 | % 40 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 41 | % that it will be useful, but WITHOUT ANY WARRANTY; 42 | % without even the implied warranty of MERCHANTABILITY or 43 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 44 | % General Public License for more details. 45 | % 46 | % You should have received a copy of the GNU General Public License 47 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 48 | % to the Free Software Foundation, Inc., 59 Temple Place, 49 | % Suite 330, Boston, MA 02111-1307 USA 50 | 51 | 52 | ni = nargin; 53 | if isa(varargin{1},'graph') && ni == 1 54 | gOut = varargin{1}; 55 | elseif ni > 1 56 | g1 = varargin{1}; 57 | g2 = varargin{2}; 58 | if isequal(g1.DataTypes,g2.DataTypes) 59 | gOut = g1; 60 | gOut.N = [g1.N g2.N]; 61 | gOut.E = [g1.E g2.E]; 62 | g2.eps = g2.eps + length(g1.N); 63 | gOut.eps = [g1.eps; g2.eps]; 64 | varargin{2} = gOut; 65 | gOut = horzcat(varargin{2:end}); % Recursion 66 | else 67 | error('There are various UserParams among ordered graphs.'); 68 | end 69 | end 70 | 71 | 72 | %end .. @graph/horzcat 73 | 74 | -------------------------------------------------------------------------------- /scheduling/stdemos/algpcmax_demo.m: -------------------------------------------------------------------------------- 1 | % ALGPCMAX_DEMO Demo application of the scheduling problem 'P||Cmax'. 2 | % 3 | % see also ALGPCMAX 4 | 5 | % Author: M. Silar 6 | % Originator: Michal Kutil 7 | % Originator: Premysl Sucha 8 | % Project Responsible: Zdenek Hanzalek 9 | % Department of Control Engineering 10 | % FEE CTU in Prague, Czech Republic 11 | % Copyright (c) 2004 - 2009 12 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 13 | 14 | 15 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 16 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 17 | % and modified under the next licenses 18 | % 19 | % - GPL - GNU General Public License 20 | % 21 | % - and other licenses added by project originators or responsible 22 | % 23 | % Code can be modified and re-distributed under any combination 24 | % of the above listed licenses. If a contributor does not agree 25 | % with some of the licenses, he/she can delete appropriate line. 26 | % If you delete all lines, you are not allowed to distribute 27 | % source code and/or binaries utilizing code. 28 | % 29 | % -------------------------------------------------------------- 30 | % GNU General Public License 31 | % 32 | % TORSCHE Scheduling Toolbox for Matlab is free software; 33 | % you can redistribute it and/or modify it under the terms of the 34 | % GNU General Public License as published by the Free Software 35 | % Foundation; either version 2 of the License, or (at your option) 36 | % any later version. 37 | % 38 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 39 | % that it will be useful, but WITHOUT ANY WARRANTY; 40 | % without even the implied warranty of MERCHANTABILITY or 41 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 42 | % General Public License for more details. 43 | % 44 | % You should have received a copy of the GNU General Public License 45 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 46 | % to the Free Software Foundation, Inc., 59 Temple Place, 47 | % Suite 330, Boston, MA 02111-1307 USA 48 | 49 | 50 | clc; 51 | disp('Demo of scheduling algorithm for problem ''P||Cmax''.'); 52 | disp('------------------------------------------------------'); 53 | 54 | % Example 5.1.2 from Pinedo, Scheduling - Theory, Algorithms 55 | % and Systems) 56 | T=taskset([7 7 6 6 5 5 4 4 4]); 57 | T.Name={'T_1' 'T_2' 'T_3' 'T_4' 'T_5' 'T_6' 'T_7' 'T_8' 'T_9'}; 58 | 59 | disp(' '); 60 | disp('An instance of the scheduling problem (example 5.1.2 - Pinedo, Scheduling, 2002):'); 61 | get(T) 62 | 63 | 64 | %define the problem 65 | p = problem('P||Cmax'); 66 | 67 | %call a scheduling algorithm 68 | T = algpcmax(T,p,4); 69 | 70 | plot(T); 71 | title('Schedule obtained by ''algpcmax'' algorithm.'); 72 | 73 | %end of file 74 | -------------------------------------------------------------------------------- /scheduling/@schedobj/schedobj.m: -------------------------------------------------------------------------------- 1 | function schedobj = schedobj(varargin) 2 | %SCHEDOBJ Creation of object schedobj. 3 | % 4 | % Creation: 5 | % schedobj = SCHEDOBJ() creates a schedobj 6 | 7 | 8 | % Author: Michal Kutil 9 | % Author: Michal Sojka 10 | % Originator: Michal Kutil 11 | % Originator: Premysl Sucha 12 | % Project Responsible: Zdenek Hanzalek 13 | % Department of Control Engineering 14 | % FEE CTU in Prague, Czech Republic 15 | % Copyright (c) 2004 - 2009 16 | % $Revision: 2897 $ $Date:: 2009-03-18 15:17:31 +0100 #$ 17 | 18 | 19 | % This file is part of TORSCHE Scheduling Toolbox for Matlab. 20 | % TORSCHE Scheduling Toolbox for Matlab can be used, copied 21 | % and modified under the next licenses 22 | % 23 | % - GPL - GNU General Public License 24 | % 25 | % - and other licenses added by project originators or responsible 26 | % 27 | % Code can be modified and re-distributed under any combination 28 | % of the above listed licenses. If a contributor does not agree 29 | % with some of the licenses, he/she can delete appropriate line. 30 | % If you delete all lines, you are not allowed to distribute 31 | % source code and/or binaries utilizing code. 32 | % 33 | % -------------------------------------------------------------- 34 | % GNU General Public License 35 | % 36 | % TORSCHE Scheduling Toolbox for Matlab is free software; 37 | % you can redistribute it and/or modify it under the terms of the 38 | % GNU General Public License as published by the Free Software 39 | % Foundation; either version 2 of the License, or (at your option) 40 | % any later version. 41 | % 42 | % TORSCHE Scheduling Toolbox for Matlab is distributed in the hope 43 | % that it will be useful, but WITHOUT ANY WARRANTY; 44 | % without even the implied warranty of MERCHANTABILITY or 45 | % FITNESS FOR A PARTICULAR PURPOSE. See the GNU 46 | % General Public License for more details. 47 | % 48 | % You should have received a copy of the GNU General Public License 49 | % along with TORSCHE Scheduling Toolbox for Matlab; if not, write 50 | % to the Free Software Foundation, Inc., 59 Temple Place, 51 | % Suite 330, Boston, MA 02111-1307 USA 52 | 53 | 54 | na = nargin; 55 | if na==3 56 | if isa(varargin{1},'schedobj') && ischar(varargin{2}) 57 | schedobj = set_helper(varargin{:}); 58 | return; 59 | end 60 | end 61 | 62 | 63 | % Create the structure 64 | 65 | % Fields should start with capital letter if they are directly 66 | % accessible via GET and SET method. See also FIELDNAMES. 67 | schedobj = struct(... 68 | 'Notes', '',... 69 | 'version', 0.01,... 70 | 'GrParam',grparam); 71 | 72 | % Label schedobj as an object of class SCHEDOBJ 73 | schedobj = class(schedobj, 'schedobj'); 74 | 75 | %end .. @schedobj/schedobj 76 | --------------------------------------------------------------------------------