tsnkit.algorithms package¶
Submodules¶
tsnkit.algorithms.at module¶
Author: <Chuanyu> (skewcy@gmail.com) at.py (c) 2023 Desc: description Created: 2023-10-27T23:29:21.848Z
- tsnkit.algorithms.at.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.cg module¶
Author: <Chuanyu> (skewcy@gmail.com) cg.py (c) 2023 Desc: description Created: 2023-11-25T22:06:52.279Z
- class tsnkit.algorithms.cg.NodeCG(id: int, f: Stream, path: Path, offset: int)[source]¶
Bases:
object
- tsnkit.algorithms.cg.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.cp_wa module¶
Author: <Chuanyu> (skewcy@gmail.com) cp_wa.py (c) 2023 Desc: description Created: 2023-10-28T17:57:24.749Z
- tsnkit.algorithms.cp_wa.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.dt module¶
Author: <Chuanyu> (skewcy@gmail.com) dt.py (c) 2023 Desc: description Created: 2023-11-25T22:06:42.306Z
- tsnkit.algorithms.dt.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.i_ilp module¶
tsnkit.algorithms.i_omt module¶
Author: <Chuanyu> (skewcy@gmail.com) i_omt.py (c) 2023 Desc: description Created: 2023-10-29T04:56:09.748Z
- tsnkit.algorithms.i_omt.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.jrs_mc module¶
- tsnkit.algorithms.jrs_mc.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.jrs_nw module¶
Author: <Chuanyu> (skewcy@gmail.com) jrs_nw.py (c) 2023 Desc: description Created: 2023-10-24T01:34:49.259Z
- tsnkit.algorithms.jrs_nw.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.jrs_nw_l module¶
Author: <Chuanyu> (skewcy@gmail.com) jr_nw_l.py (c) 2023 Desc: description Created: 2023-10-24T03:51:06.135Z
- tsnkit.algorithms.jrs_nw_l.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.jrs_wa module¶
Author: <Chuanyu> (skewcy@gmail.com) jrs_wa.py (c) 2023 Desc: description Created: 2023-10-23T20:22:16.816Z
- tsnkit.algorithms.jrs_wa.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.ls module¶
Author: <Chuanyu> (skewcy@gmail.com) ls.py (c) 2023 Desc: description Created: 2023-11-06T00:26:19.423Z
- tsnkit.algorithms.ls.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.ls_pl module¶
Author: <Chuanyu> (skewcy@gmail.com) ls_pl.py (c) 2023 Desc: description Created: 2023-11-25T22:07:33.985Z
- tsnkit.algorithms.ls_pl.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
- tsnkit.algorithms.ls_pl.collision(l: Link, s: Stream, offset: int, sched_f: Dict[Link, Dict[Stream, List]], task: StreamSet) bool[source]¶
- tsnkit.algorithms.ls_pl.get_potential_violate(l: Link, s: Stream, offset: int, sched_f: Dict[Link, Dict[Stream, List]], task: StreamSet) List[List[Any]][source]¶
- tsnkit.algorithms.ls_pl.order1(i: Stream, j: Stream, o_i: int, on_i: int, o_j: int, on_j: int, task: StreamSet)[source]¶
- tsnkit.algorithms.ls_pl.order2(i: Stream, j: Stream, o_i: int, on_i: int, o_j: int, on_j: int, task: StreamSet)[source]¶
- tsnkit.algorithms.ls_pl.schedule_and_update(l: Link, sched_f: Dict[Link, Dict[Stream, List]], result: Dict[Link, Dict[Stream, List]], l2f: Dict[Link, List[Stream]], task: StreamSet)[source]¶
tsnkit.algorithms.ls_tb module¶
Author: <Chuanyu> (skewcy@gmail.com) ls_tb.py (c) 2023 Desc: description Created: 2023-10-31T02:34:04.531Z
- tsnkit.algorithms.ls_tb.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.smt_fr module¶
Author: <Chuanyu> (skewcy@gmail.com) smt_fr.py (c) 2023 Desc: description Created: 2023-10-28T13:58:46.205Z
- tsnkit.algorithms.smt_fr.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.smt_nw module¶
Author: <Chuanyu> (skewcy@gmail.com) smt_nw.py (c) 2023 Desc: description Created: 2023-10-22T17:59:16.407Z
- tsnkit.algorithms.smt_nw.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.smt_pr module¶
Author: <Chuanyu> (skewcy@gmail.com) smt_pr.py (c) 2023 Desc: description Created: 2023-10-29T00:04:36.044Z
- tsnkit.algorithms.smt_pr.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
tsnkit.algorithms.smt_wa module¶
Author: Chuanyu (skewcy@gmail.com) smt_wa.py (c) 2023 Desc: description Created: 2023-10-11T01:17:57.050Z
- tsnkit.algorithms.smt_wa.benchmark(name, task_path, net_path, output_path='./', workers=1) Statistics[source]¶
- class tsnkit.algorithms.smt_wa.smt_wa(workers=1)[source]¶
Bases:
object- static add_delay_const(solver: Solver, var: Dict[Stream, Dict[Link, Dict[str, ArithRef]]]) None[source]¶
- static add_flow_trans_const(solver: Solver, var: Dict[Stream, Dict[Link, Dict[str, ArithRef]]]) None[source]¶
- static add_frame_const(solver: Solver, var: Dict[Stream, Dict[Link, Dict[str, ArithRef]]]) None[source]¶
- static add_frame_isolation_const(solver: Solver, var: Dict[Stream, Dict[Link, Dict[str, ArithRef]]], task: StreamSet) None[source]¶
- static add_link_const(solver: Solver, var: Dict[Stream, Dict[Link, Dict[str, ArithRef]]], net: Network, task: StreamSet) None[source]¶
- static add_queue_range_const(solver: Solver, var: Dict[Stream, Dict[Link, Dict[str, ArithRef]]]) None[source]¶
- static get_gcl_list(result, var: Dict[Stream, Dict[Link, Dict[str, ArithRef]]], lcm: int) GCL[source]¶
- static get_release_time(result, var: Dict[Stream, Dict[Link, Dict[str, ArithRef]]]) Release[source]¶
- solve(**kwargs)¶
Module contents¶
Author: Chuanyu (skewcy@gmail.com) __init__.py (c) 2023 Desc: description Created: 2023-10-09T00:02:25.471Z
- DESC:
This is the template for how to integrate a new method into this benchmark. Please refer other methods for more details.
- class tsnkit.algorithms._Method(name)[source]¶
Bases:
ABC- _abc_impl = <_abc._abc_data object>¶
- abstractmethod init(task_path: str, network_path: str) bool[source]¶
Init the method with the task and network
- Args:
task_path (str): file path of the task network_path (str): file path of the network
- Returns:
bool: True if success
- abstractmethod prepare() bool[source]¶
Add constraints / preparation to the solver. Can simply return True if no constraints are needed (usually when no solver used).
- Returns:
bool: True if success
- abstractmethod solve() Statistics[source]¶
Solve the problem and return the statistics
- Returns:
Statistics object
- tsnkit.algorithms.benchmark(name: str, task_path: str, net_path: str, output_path: str = './', workers: int = 1) Statistics[source]¶
Implement this function to benchmark your method
- Args:
name (str): experiment name task_path (str): file path of the task net_path (str): file path of the network output_path (str): output folder path workers (int): number of workers
- Returns:
Statistics object